First of all you need to install:
- python3
sudo apt-get install python3-pip
- Install from pip
sudo pip3 install neverlose
from neverlose import Client
from neverlose.models.events import BalanceTransfer
from neverlose.models.events import ItemPurchase
app = Client(
secret='my_secret', # Can be found on https://neverlose.cc/market/api
user_id=739 # Can be found on https://neverlose.cc/market/api
)
@app.on_item_purchase()
async def my_purchase_handler(data: ItemPurchase):
print(f'{data.username} just bought {data.item_id}')
@app.on_balance_transfer()
async def my_balance_transfer_handler(data: BalanceTransfer):
print(f'{data.username} ty for {data.amount}')
if __name__ == '__main__':
app.transfer_money(1.0, 'soufivw')
app.give_market_item('soufivw', 'IS6raE')
app.run_web()
Any contributions you make are greatly appreciated.
- Fork the Project
- Create your Feature Branch (
git checkout -b feature/AmazingFeature
) - Commit your Changes (
git commit -m 'Add some AmazingFeature'
) - Push to the Branch (
git push origin feature/AmazingFeature
) - Open a Pull Request
Distributed under the MIT License. See LICENSE.md
for more information.
Arsenii Esenin - [email protected]
Project Link: https://github.com/neverlosecc/api-wrapper