Client for the unofficial Nitro Type API.
$ yarn add nitrotype
# or
$ npm install nitrotype --saveThe 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/facebookPOST auth/validate-email: hash, userIDPOST login: password, usernamePOST logoutPOST 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>/usePOST cars-arrange: garage
GET friendsPOST friends/<userId>/deletePOST friends/<userId>/requestPOST friends/<userId>/sendcash: amount, password, playersCash, recipient, feePercentGET friend-requestsPOST friend-requests/accept-allPOST friend-requests/deny-allPOST friend-requests/<userId>/acceptPOST friend-requests/<userId>/deny
POST items/cash-giftsPOST items/equip-loot: lootID, type
GET newsGET news/<newsId>
GET players/<userId>POST players/<userId>/team-invitePOST players/<userId>/reportPOST players-search: term
POST purchase: product, purchaseFor, purchaseForUsernameGET purchase/refreshsessionPOST 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 referralsPOST referrals/<username>
POST rewards/daily
GET scoreboard: board, grouping, seasonID, time
GET settingsPOST 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-emailPOST 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/lastdaysGET stats/graphs/racelogGET stats/summary
GET teams/applicationsPOST teams/create: minLevel, minSpeed, name, otherRequirements, password, tag, tagColorPOST teams/delete: passwordPOST teams/leavePOST 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-invitePOST teams/<teamId>/applyPOST teams/<teamId>/ignore-invitePOST team-members/<userId>/demotePOST team-members/<userId>/promotePOST team-members/<userId>/removePOST team-requests/accept-allPOST team-requests/deny-allPOST team-requests/<userId>/acceptPOST 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 achievementsGET carsPOST news/<newsId>/comment: comment, newsIDGET news/<newsId>/unapprovedPOST news-comments/<commentId>/approvePOST news-comments/<commentId>/deletePOST news-comments/<commentId>/delete-and-moderatePOST 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-lessonPOST settings/sessionbug: loggedIn, paid, playerPOST settings/survey: field, value