Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/feeeek/vkthingy
Asynchronous api wrapper for the game from vk.com
https://github.com/feeeek/vkthingy
vk
Last synced: 6 days ago
JSON representation
Asynchronous api wrapper for the game from vk.com
- Host: GitHub
- URL: https://github.com/feeeek/vkthingy
- Owner: FeeeeK
- License: gpl-3.0
- Created: 2021-03-24T18:05:22.000Z (almost 4 years ago)
- Default Branch: master
- Last Pushed: 2021-03-31T17:40:05.000Z (over 3 years ago)
- Last Synced: 2024-11-15T22:38:09.006Z (about 1 month ago)
- Topics: vk
- Language: Python
- Homepage:
- Size: 42 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# VKSlaves
Asynchronous api wrapper for the game from vk.com called "slaves"# Example of usage
```python
import asyncio
from vkslaves import SlavesAPI
from vkslaves.errors import SlaveAreLockedError, NotEnoughMoneyErrorslaves_api = SlavesAPI(
app_auth="vk_access_token_settings=friends,status&vk_app_id=7794757..."
)async def main():
await slaves_api.start() # update .me and .slaves
print(slaves_api.me.balance) # get your balance
user = await slaves_api.user(1) # get info about vk.com/id1
print(user.master_id) # get id of user's master
try:
await svales_api.buy_slave(1)
except SlaveAreLockedError:
print(" Oh no :( ")
except NotEnoughMoneyError:
print(" I need more money :( ")asyncio.run(main())
```### I'm too lazy to write documentation, just look at the names of the functions and docstrings