nitrotype
v1.0.0
Published
Client for the unofficial Nitro Type API.
Downloads
6
Readme
nitrotype.js
Client for the unofficial Nitro Type API.
Installation
$ yarn add nitrotype
# or
$ npm install nitrotype --save
Usage
The following example shows how to claim the daily reward:
const nitrotype = require('nitrotype')
const client = nitrotype({ username: '<YOUR_USERNAME_HERE>', password: '<YOUR_PASSWORD_HERE>' })
;(async () => {
await client.login()
const res = await client.get('rewards/daily')
console.log(res)
// Output: { success: true, data: { reward: true, next: 75600, type: 'money', value: 30000 } }
})()
Methods
Client#get(path[, options])
Client#post(path[, options])
options
should be an object that contains a data
object (for POST requests) and/or a params
object (for URL parameters).
Endpoints
The base API url (https://nitrotype.com/api/
) is automatically by the library. It will work even if you pass in just the endpoint. If you find an endpoint that isn't already documented below, please don't hesitate to open a pull request!
Achievements
GET achievements
POST achievements/check
: ids
Authentication
POST login
: password, usernamePOST logout
POST register
: password, username
Cars
GET cars
POST cars/<carId>/buy
: carID, passwordPOST cars/<carId>/paint
: angle, carID, passwordPOST cars/<carId>/sell
: carID, passwordPOST cars/<carId>/use
Friends
GET friends
POST friends/<userId>/delete
POST friends/<userId>/request
POST friends/<userId>/sendcash
: amount, passwordGET friend-requests
POST friend-requests/accept-all
POST friend-requests/<userId>/accept
Nitros
POST buy-nitros
: password, quantityPOST sell-nitros
: password, quantity
Players
POST players-search
: term
Purchase
POST purchase
: product, purchaseFor, purchaseForUsername
Race
GET race/<raceId>
POST race/save-qualifying
: carID, speed
Referrals
GET referrals
Rewards
GET rewards/daily
Scoreboard
GET scoreboard
: board, grouping, seasonID, time
Settings
GET settings
POST settings/profile
: country, displayName, gender, title
Stats
GET stats/data/bymonth
: limit, pageGET stats/data/lastdays
: limit, pageGET stats/data/racelog
: limit, pageGET stats/graphs/bymonth
: limit, pageGET stats/graphs/lastdays
GET stats/graphs/racelog
GET stats/summary
Teams
GET teams/applications
POST teams/search
: invitesPOST teams/status
: statusGET teams/<teamId>
POST teams/<teamId>/accept-invite
POST teams/<teamId>/apply
POST team-members/<userId>/remove
POST team-requests/accept-all
POST team-requests/<userId>/accept
POST team-requests/<userId>/deny
Miscellaneous
POST lostpass-send
: emailPOST support/account-help
: alt_email, captchaKey, email_type, firstname, lastname, login, other, username