npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

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, username
  • POST logout
  • POST register: password, username

Cars

  • GET cars
  • POST cars/<carId>/buy: carID, password
  • POST cars/<carId>/paint: angle, carID, password
  • POST cars/<carId>/sell: carID, password
  • POST cars/<carId>/use

Friends

  • GET friends
  • POST friends/<userId>/delete
  • POST friends/<userId>/request
  • POST friends/<userId>/sendcash: amount, password
  • GET friend-requests
  • POST friend-requests/accept-all
  • POST friend-requests/<userId>/accept

Nitros

  • POST buy-nitros: password, quantity
  • POST 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, page
  • GET stats/data/lastdays: limit, page
  • GET stats/data/racelog: limit, page
  • GET stats/graphs/bymonth: limit, page
  • GET stats/graphs/lastdays
  • GET stats/graphs/racelog
  • GET stats/summary

Teams

  • GET teams/applications
  • POST teams/search: invites
  • POST teams/status: status
  • GET 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: email
  • POST support/account-help: alt_email, captchaKey, email_type, firstname, lastname, login, other, username

License

MIT