Skip to content

Commit

Permalink
Update README
Browse files Browse the repository at this point in the history
- Changed LIMIT to PER_PAGE_LIMIT and added an explanation as to what it does.
- Added an explanation for TOTALPAGES
  • Loading branch information
JaWarrior12 committed Oct 1, 2024
1 parent 5026175 commit f92c888
Showing 1 changed file with 11 additions and 11 deletions.
22 changes: 11 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,15 @@ Base Example:
import src.dredarkLeaderboardLib as dll

URL="https://drednot.io/leaderboard/?cat=boss_shield&by=pilot"
LIMIT=10
TOTALPAGES=10
statistics=dll.Leaderboard() #Initiates the Leaderboard Object
statistics.scan_Leaderboard(URL, TOTALPAGES, LIMIT) #Scrapes the provided URL and stores the data
print(statistics.shipData) #Prints the scrapped data
PER_PAGE_LIMIT=10 # Fetches the first 10 leaderboard entries on each page
TOTALPAGES=10 # Only reads from the first 10 pages
statistics=dll.Leaderboard() # Initiates the Leaderboard Object
statistics.scan_Leaderboard(URL, TOTALPAGES, PER_PAGE_LIMIT) # Scrapes the provided URL and stores the data
print(statistics.shipData) # Prints the scrapped data
#Or
print(statistics.return_data()) #Alternative Method to print data
print(statistics.fetch_ship("rank",10)) #Prints the entry at rank 10
print(statistics.fetch_ranks(1,10,True,True)) #Fetches Ranks 1-10 (1 & 10 are Included)
print(statistics.fetch_ranks(1,10,True,False)) #Fetches Ranks 1-10 (10 is exclusive, so only ranks 1-9 are actually returned)
print(statistics.fetch_ranks(1,10,False,True)) #Fetches Ranks 1-10 (1 is exclusive, so only ranks 2-10 are actually returned)
print(statistics.fetch_ranks(1,10,False,False)) #Fetches Ranks 1-10 (1 & 10 are exclusive, so only ranks 2-9 are actually returned)```
print(statistics.return_data()) # Alternative Method to print data
print(statistics.fetch_ship("rank",10)) # Prints the entry at rank 10
print(statistics.fetch_ranks(1,10,True,True)) # Fetches Ranks 1-10 (1 & 10 are Included)
print(statistics.fetch_ranks(1,10,True,False)) # Fetches Ranks 1-10 (10 is exclusive, so only ranks 1-9 are actually returned)
print(statistics.fetch_ranks(1,10,False,True)) # Fetches Ranks 1-10 (1 is exclusive, so only ranks 2-10 are actually returned)
print(statistics.fetch_ranks(1,10,False,False)) # Fetches Ranks 1-10 (1 & 10 are exclusive, so only ranks 2-9 are actually returned)```

0 comments on commit f92c888

Please sign in to comment.