A package to use the nitrotype api and get player or team stats
Project description
NT.py
What is this?
- gets racer stats
- gets team stats
- access the nitrotype api
Racer Class
Get the stats of a racer.
Arguments
- username
How to use it:
import nitrotype
racer = nitrotype.Racer('adl212')
print(racer.username)
This will print out adl212 You can see all the attributes of the Racer class here
Team Class
Get the stats of a team.
Arguments
- team tag
How to use it:
import nitrotype
team = nitrotype.Team('NTA')
print(team.leaders)
This will print out officers by type tuple (username, displayname) You can see all the attributes of the Team class here
Racer Attributes
Here are the attributes of the Racer class:
success
- returns a boolean of True or False- If False, then other attributes will not exist
tag
- The racer's current team's taguserid
- The userid of the racercarIDs
- A list of cars in nitrotype's car idsusername
- The username of the racername
- Current display name of the racertag_and_name
- The user's team tag and display name put together- If not in team, will only be the display name
membership
- Gold or regular membershipcar
- link to current car imagelevel
- Current level of racerexperience
- Amount of XP achievedpoints
- Amount of achievement points achievedcountry
- Country of racerviews
- Player profile viewscreated
- Account creation timecars_owned
- Amount of cars ownedcars_sold
- Amount of cars soldcars_total
- Amount of cars owned and owned beforecurrent_car
- The name of the current car equippedcarid
- The id of the current car equippednitros
- The nitros owned by a Racernitros_used
- Amount of nitros used by the Racernitros_total
- Amount of nitros owned and used by the racerraces
- Amount of races the racer has finishedfirst
- Amount of races the racer placed firstsecond
- Amount of races the racer placed secondthird
- Amount of races the racer placed thirdfirst_perc
- Percentage of races the racer placed firstsecond_perc
- Percentage of races the racer placed secondthird_perc
- Percentage of races the racer placed thirdwpm_average
- The racer's current wpm averagewpm_high
- The racer's current highest wpm Note: These stats might return an error as the racer may have not raced in the last 24 hours, in the season, or in the entire length of their accountboards
- The racer's stats in jsondaily_pre
- The racer's daily stats in jsondaily_races
- Amount of races in the last 24 hoursdaily_speed
- Average speed in the last 24 hoursdaily_accuracy
- Average accuracy in the last 24 hoursdaily_points
- Points accumulated from the last 24 hoursseason_pre
- The racer's season stats in jsonseason_races
- Amount of races in the current seasonseason_speed
- Average speed in the current seasonseason_accuracy
- Average accuracy in the current seasonseason_points
- Points accumulated from the current seasonfriend_reqs_allowed
- returns True if racer accepts friend requests, else it returns Falselooking_for_team
- returns True if racer accepts team invites, else it returns False
Team Attributes
Here are the attributes of the Team class:
data
- json data received from the nitrotype apisuccess
- returns a boolean of True or False- If False, then other attributes will not exist
info
- team info like name and the tag Note: These stats might return an error as the team may have not raced in the last 24 hours, in the season, or in the lifetime of the teamdaily_pre
- daily stats of team in jsondaily_races
- team races in the last 24 hoursdaily_speed
- average speed of team in the last 24 hoursdaily_accuracy
- average accuracy of team in the last 24 hoursdaily_points
- amount of points accumulated in the last 24 hoursseason_pre
- seasonal stats of team in jsonseason_races
- team races in the current seasonseason_speed
- average speed of team in the current seasonseason_accuracy
- average accuracy of team in the current seasonseason_points
- amount of points accumulated in the current seasonalltime_pre
- alltime stats of team in jsonalltime_races
- team races in alltimealltime_speed
- average speed of team in alltimealltime_accuracy
- average accuracy of team in alltimealltime_points
- amount of points accumulated in alltimeleaders
- officers by type tuple (username, displayname)captain
- captain by type tuple (username, displayname)tag_and_name
- The tag and name of a team put together- For example,
[NTA]*Ambassadors*
- For example,
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
NT.py-2.0.1.tar.gz
(12.4 kB
view hashes)
Built Distribution
NT.py-2.0.1-py3-none-any.whl
(12.2 kB
view hashes)