Skip to content

Unofficial asynchronous Python library that implements the Wargaming.net API and Lesta Games API functionality

License

Notifications You must be signed in to change notification settings

tankalxat34/WgLestaAPI

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

28 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

WgLestaAPI

Unofficial Python library that facilitates working with API Wargaming.net and API Lesta Games functionality via Python.

Downloads Downloads Downloads Supported Versions Version GitHub Repo stars

By downloading this library you fully agree with all official documents Lesta Games and Wargaming.net about Lesta Games and Wargaming.net products. The author of the library (Alexander Podstrechny) is not responsible for your actions performed with the help of this program code.

Installing the library

Run the command below at the command line

pip install WgLestaAPI

Example of use

Async way

main.py contains:

from WgLestaAPI import aio
import asyncio

method = aio.Method("account.info", "wot", account_id=563982544, application_id="your_app_id")

response = asyncio.run(method.execute())

print(response)

output is:

{"status": "ok", "meta": {"count": 1}, "data": {"563982544": {"client_language": "", "last_battle_time": 1569011404, "account_id": 563982544, "created_at": 1564320823, "updated_at": 1686648157, ... "tanking_factor": 0.0}, "frags": None}, "nickname": "tankalxat34", "logout_at": 1597741881}

No-async way

from WgLestaAPI import Application

# Creating a Query with your application_id
query = Application.Query(application_id=APP_ID)

# Adding the necessary parameters
query.extend(search="tank", limit=5)

# Creating the method `account.list` of the game World of Tanks Blitz on the EU-region with the passed parameters
m = Application.Method("account.list", game_shortname="wotb", query=query, region="eu")

# Executing the method
mExecuted = m.execute()

# Your handing of server response
print(mExecuted["data"][0]["account_id"]) # 58114596

# If you wish, you can follow a link to the official website of the API owner with documentation
print(m.docs) # https://developers.wargaming.net/reference/all/wotb/account/list/

Library functionality

The library implements the basic functions of API Lesta Games and API Wargaming.net. All requests are made through your application, which you previously created on Lesta Games or on Wargaming.net. Some features are listed below:

  • Getting information about the player, his equipment and medals.
  • Obtaining information about the clan.
  • Getting information about vehicles.
  • And other methods.

Copyright Notice

This program code is not a product of Lesta Games and was developed according to Lesta Games DPP rules.

This program code is not a product of Wargaming.net and is developed according to WG DPP rules.

About

Unofficial asynchronous Python library that implements the Wargaming.net API and Lesta Games API functionality

Topics

Resources

License

Stars

Watchers

Forks

Languages