API wrapper for Loot Bot
Project description
LootBotApi
This is an API wrapper for Loot Bot (https://telegra.ph/Guida-alle-LootBot-API-04-06)
Installation
Download from PyPi
pip install LootBotApi
from LootBotApi import LootBotApi
api = LootBotApi(TOKEN)
--> the token can be found using the command /token on https://t.me/lootplusbot- Call the methods from the object created above
Methods
Api Wrapper
Most of this methods will return a list of Munch objects. This means that the attributes of the result can either be accessed as dictionary keys or object attributes
Items
get_items(rarity = None)
It returns all the items in the game, if rarity is passed it returns all the items of that rarityget_item(item)
It returns the info about a given item
print(api.get_item("Meccanismo di Ferro").id) #363
print(api.get_item(363).name) #Meccanismo di Ferro
History
get_history(place = "payments",limit = None,offset = None,fromPlayer = None,toPlayer = None,fromItem = None,toItem = None,both = None,fromPrice = None,toPrice = None,orderBy = "desc")
It returns the transactions with the specificied parameters
Players
get_players()
It returns all the players of LootBotget_player(player)
It returns the info about the player
Crafting
get_crafts()
It returns all the crafts in the gameget_craft_needed(item_id)
It returns the items requested to craft the itemget_craft_used(item_id)
It returns the item that you can craft using the item
items = api.get_craft_needed(363)
for item in items:
print(item.name)
#Perno
#Meccanismo di Legno
#Ferro
Shops
get_shop(shop)
It returns the infos about the shop
Cards
get_crafts()
It returns all the cards in the game
Global
get_global()
It returns the progress of the current global challenge, it's updated every hourget_info()
It returns infos about the current global challenge
Team
get_team(team)
it returns the infos about a team
Ricerche
get_searches(quantity)
It returns the searches made on the bot
Custom Methods
These methods are not natively implemented in the API but they are derived by them.
get_total_craft_points(item)
It returns the total craft points that you will get to craft the item
print(api.get_total_craft_points("Ordigno Polverizzatore")) #113
get_average_market_price(item)
It returns the average price of an item in the market as an integer
print(api.get_average_market_price("Ferro")) #37394
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
LootBotApi-0.2.1.tar.gz
(3.7 kB
view hashes)
Built Distribution
Close
Hashes for LootBotApi-0.2.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4b2a007bd0c3f594082d88468b27c2d9c0bdaf1fd34e34426effa3e07056485b |
|
MD5 | c40e9ed2e5b118dd934b2f18e70748c3 |
|
BLAKE2b-256 | ab1fefdd9593283bb124c84548fd3249306603e491cd37b93a99d1a51cee56d0 |