Simple asynchronus wrapper for vk_api.
Version 1.0.0.
It isn't ideal, but it works...
- token
Token from vk api, that you can get, using oauth.vk.com
- sess
httpx.AsyncClient. You can use your own session, for example for using methods with proxy.
- v
Vk api version.
Creates and initializes ApiContext object with current VkApi object.
- name
Method name. You can see a list of all methods here.
- params
Parameters, with which method will be called. You can see it in https://vk.com/dev/method.name
Wrapper, for using api methods as ordinary class methods.
- api
Initialized VkApi object.
- api
VkApi object for longpoll initialization.
- v
Longpoll version.
- mode
Longpoll mode.
- get_pts
This parameter reserved.
- loop
Asyncio loop, which will be used by event listener and handlers.
Saving credintails for longpoll.
- get_ts
This parameter reserved.
Getting one not-parsed event from longpoll.
Longpoll-listening generator, yield parsed events.
Adding an async event handler.
- function
Asynchronus callback function, that will handle events. on_event listener call this function with passing event in first argument.
Group longpoll using the same functions, as user longpoll.
- api
VkApi object for group longpoll initialization.
- group_id
Id of group, in which longpoll will be setted.
- loop
Asyncio loop, which will be used by event listener and handlers.
Parsing array-event to dict.
- event
Source array-event.