Client for the unofficial Nitro Type API.
$ yarn add nitrotype
# or
$ npm install nitrotype --save
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.post('rewards/daily')
console.log(res)
// Output: { success: true, data: { reward: true, next: 75600, type: 'money', value: 30000 } }
})()
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).
The base API url (https://nitrotype.com/api/
) is automatically prepended 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!
POST achievements/check
: idsGET achievements/claim/id/<achievementId>
POST auth/autologin
: id, tokenGET auth/facebook
POST auth/validate-email
: hash, userIDPOST login
: password, usernamePOST logout
POST register
: acceptPolicy, email, password, receiveContact, username
POST cars/<carId>/buy
: carID, passwordPOST cars/<carId>/paint
: angle, carID, passwordPOST cars/<carId>/sell
: carID, passwordPOST cars/<carId>/use
POST cars-arrange
: garage
GET friends
POST friends/<userId>/delete
POST friends/<userId>/request
POST friends/<userId>/sendcash
: amount, password, playersCash, recipient, feePercentGET friend-requests
POST friend-requests/accept-all
POST friend-requests/deny-all
POST friend-requests/<userId>/accept
POST friend-requests/<userId>/deny
POST items/cash-gifts
POST items/equip-loot
: lootID, type
GET news
GET news/<newsId>
GET players/<userId>
POST players/<userId>/team-invite
POST players/<userId>/report
POST players-search
: term
POST purchase
: product, purchaseFor, purchaseForUsernameGET purchase/refreshsession
POST purchase/stripesession
: product, purchaseFor, purchaseForUsername, purchaseMode
GET race/<raceId>
POST race/log-dq
: id, msg, logs, typePOST race/log-practice
: errors, secs, typedPOST race/problem-keys
: ak (all keys), ek (error keys)POST race/save-qualifying
: speed, accuracy, carID, raceSoundsPOST race/challenge
: wins, seconds, lessonID
GET referrals
POST referrals/<username>
POST rewards/daily
GET scoreboard
: board, grouping, seasonID, time
GET settings
POST settings/account
: contact, email, firstName, lastName, passwordPOST settings/bugs
: action, description, pagePOST settings/fpscache
: dq, error, errorMessage, errorStack, forceEarlyPlace, fps, perfTestFps, position, raceID, racerRenderDelay, renderer, socket, webglSupportPOST settings/password
: newPassword, newPassword2, passwordPOST settings/profile
: country, displayName, titleID, titlePOST settings/social
: allowFriendRequests, lookingForTeam, offlinePOST settings/sounds
: valuePOST settings/verify-email
POST settings/username
: usernamePOST settings/world
: worldID
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
GET teams/applications
POST teams/create
: minLevel, minSpeed, name, otherRequirements, password, tag, tagColorPOST teams/delete
: passwordPOST teams/leave
POST teams/motd
: messagePOST teams/search
: invites, level, speedPOST teams/status
: statusPOST teams/update
: minLevel, minSpeed, name, otherRequirements, password, tag, tagColor, enrollment, autoRemoveGET teams/<teamId>
POST teams/<teamId>/accept-invite
POST teams/<teamId>/apply
POST teams/<teamId>/ignore-invite
POST team-members/<userId>/demote
POST team-members/<userId>/promote
POST team-members/<userId>/remove
POST team-requests/accept-all
POST team-requests/deny-all
POST team-requests/<userId>/accept
POST team-requests/<userId>/deny
GET classes
POST contact
: body, email, namePOST contact/refund
: amount, body, ccLast4, date, email, name, postalCodePOST lostpass-change
: password, password2, userID, hashPOST lostpass-send
: emailPOST support/account-help
: alt_email, captchaKey, email_type, firstname, lastname, login, other, username
GET achievements
GET cars
POST news/<newsId>/comment
: comment, newsIDGET news/<newsId>/unapproved
POST news-comments/<commentId>/approve
POST news-comments/<commentId>/delete
POST news-comments/<commentId>/delete-and-moderate
POST news-comments/<commentId>/edit
: commentPOST buy-nitros
: password, quantityPOST sell-nitros
: password, quantityPOST purchase/cash
: product, purchaseFor, purchaseForUsernamePOST purchase/upgrade
: product, purchaseFor, purchaseForUsernameGET race/practice-lesson
POST settings/sessionbug
: loggedIn, paid, playerPOST settings/survey
: field, value