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 🙏

© 2025 – Pkg Stats / Ryan Hefner

rankade-js-api

v1.0.16

Published

Rankade API JavaScript implementation

Downloads

24

Readme

Node.js module for rankade API

API reference https://rankade.com/api

Install

yarn add rankade-js-api

Usage

API access

In order to use API for your group you need to obtain API credentials by following that instructions https://rankade.com/api#intro

Example

'use strict'

const Rankade = require('rankade-js-lib')

// obtain credentials from group's API setting page
const rankade = new Rankade(
  'https://api.endpoint',
  'key',
  'secret',
  1500 // timeout
)

rankade.auth.auth()
  .then(success => {

    rankade.quota.quota()
      .then(success => {

        let quota = success.data.success
        console.log(quota)

    }).catch(error => {

        let errorFound = rankade.errors.parse(error)
        console.log(errorFound)

    })

}).catch(error => {

  let errorFound = rankade.errors.parse(error)
  console.log(errorFound)

})

Reference

Authentication

  • rankade.auth.auth() perform authentication and obtain the JWT token used for other API calls
  • rankade.auth.getAccessToken() retrieve the JWT token string
  • rankade.auth.setAccessToken(token) set the JWT token string
  • rankade.auth.isExpired() check if the token provided with the rankade.auth.auth() method is expired or not

Games

  • rankade.games.popular() retrieve rankade's popular games
  • rankade.games.list() retrieve group's games
  • rankade.games.search(name) search a game by giving a name or part of
  • rankade.games.create(name) create a game by name and retrieve it

Matches

  • rankade.matches.create(matches, dryrun) create matches by giving an array of objects accordant to specifications https://rankade.com/api#post-matches-match (see below the Match's object properties detail captcher)
  • rankade.matches.exists(id) check if a match already exists
  • rankade.matches.status() retrieve matches' queue/elaboration status
  • rankade.matches.list(subset = 'main', page = 1) retrieve group's matches

Players

  • rankade.players.players(page) retrieve group's players
  • rankade.players.player(name) create a ghost player

Subsets

  • rankade.subsets.list() retrieve group's subsets

Rankings

  • rankade.rankings.list(subset = 'main', match = 'last', page = 1) retrieve group's rankings

Quota

  • rankade.quota.quota() retrieve group's API quota usage

Change log

  • 2022-06-03 dependencies packages upgrade to latest version
  • 2021-09-29 dependencies packages upgrade
  • 2020-12-15 error object check in parse() function, readme edits
  • 2020-07-18 reformat code
  • 2020-04-01 added the rankade.matches.list method
  • 2019-08-21 added the rankade.rankings.list and rankade.subsets.list methods
  • 2019-08-08 added the rankade.players.player(name) method
  • 2019-06-26 added the rankade.auth.setAccessToken(token) method and updated the readme file
  • 2019-06-18 added the rankade.setKey(key), rankade.setSecret(secret) methods and players pagination
  • 2019-05-29 added the rankade.auth.isExpired() method and updated the readme file
  • 2019-05-23 api errors parsing
  • 2019-05-22 started implementation of basic calls