giftsFloors
giftsFloors()
async def giftsFloors(authData: str) -> GiftsFloors
Retrieve all gifts floors [short names only]
Returns
GiftsFloors
object
Raises
authDataError
- ifauthData
is not providedrequestError
- if request fails
Parameters
authData
(str) - authentication data required for the api request
GiftsFloors object
Methods:
.toDict()
: Converts theGiftsFloors
object back to a dictionary format..floor(giftShortName)
: Get floor for specified gift by it's short name.
How to get short name of the gift
1) Without request: by using toShortName(gift_name)
function from aportalsmp.utils.functions
.
2) With request: by using collections()
-> .short_name
. See collections
Example
from aportalsmp.gifts import giftsFloors
from aportalsmp.auth import update_auth
import asyncio
auth = asyncio.run(update_auth(api_id=123, api_hash="..."))
async def main():
floors = await giftsFloors(auth)
print(floors.floor("plushpepe"), floors.floor("spicedwine"), floors.floor("spyagaric"))
# output: 4199.0 3.18 3.2
See used functions: update_auth
Last updated