-
Notifications
You must be signed in to change notification settings - Fork 0
Home
JaWarrior12 edited this page Sep 11, 2024
·
6 revisions
dredarkLeaderboardLib is a package containing everything necessary to scan the Deep Space Airships (drednot.io) player leaderboards.
import dredarkLeaderboardLib
statistics = dredarkLeaderboardLib.Leaderboard() #Initiates the class object
statistics.scan_Leaderboard("leaderboard_URL",totalPages=10,limit=10) #Scans the URL given and fetches up to the limit, so in this example, the first 10 ships. Default limit is none
#The data is stored in instance variable, a dictionary, called shipData and can be accessed through statistics.shipData
print(statistics.return_data()) #Returns the shipData dict with a function
print(statistics.shipData) #Returns the data by directly calling the variables.
#Fetching an individual ship:
print(statistics.fetch_ship("hex","abc123") #Fetches the ship with the `hex code` of `abc123`
print(statistics.fetch_ship("name","artificial") #Fetches the player or clan with the `name` of `artificial`
print(statistics.fetch_ship("points","500") #Fetches the ship with `points (score)` of `1,000,000`. Points are stored as strings because they include the comma. If searching by points, it will look for a ship with the EXACT amount given
print(statistics.fetch_ship("rank",1) #Fetches the ship at `rank` `1`
Module List:
- Basic Module (Leaderboard) - Used for the active leaderboard season.
- Archive Module (ArchiveLeaderboard) - Used for all archived leaderboard seasons.
- Legacy Module (LegacyModule) - !!!DEPRECIATED!!! Replaced by the Archive Module, was used for the legacy wealth leaderboards.