# rankade-js-api

> Rankade API JavaScript implementation

Latest version **1.1.0** (published 2025-10-28) · MIT license · 0 weekly downloads

## Install

```sh
npm install rankade-js-api
pnpm add rankade-js-api
yarn add rankade-js-api
bun add rankade-js-api
```

## Health

**Score 25/100 (F)** — status: maintenance-mode.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: stale; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.1.0 |
| Published | 2025-10-28 |
| First published | 2019-05-23 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 3 |
| Unpacked size | 10.6 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 6 |
| Author | akaneru |
| Maintainers | nerukhai |

## Links

- npm: https://www.npmjs.com/package/rankade-js-api
- Repository: https://github.com/akaneru/rankade-js-api
- Homepage: https://github.com/akaneru/rankade-js-api#readme
- Issues: https://github.com/akaneru/rankade-js-api/issues
- npm.io page: https://npm.io/package/rankade-js-api

## Dependencies (3)

- [jws](https://npm.io/package/jws.md) ^4.0.0
- [axios](https://npm.io/package/axios.md) ^1.13.0
- [query-string](https://npm.io/package/query-string.md) ^9.3.1

## Recent versions

- 1.1.0 (latest) — 2025-10-28
- 1.0.16 — 2022-06-03
- 1.0.15 — 2021-09-29
- 1.0.14 — 2021-09-29
- 1.0.13 — 2020-12-15
- 1.0.12 — 2020-07-19
- 1.0.11 — 2020-04-01
- 1.0.10 — 2019-08-21
- 1.0.9 — 2019-08-08
- 1.0.8 — 2019-06-26
- 1.0.7 — 2019-06-18
- 1.0.6 — 2019-05-29
- 1.0.5 — 2019-05-26
- 1.0.4 — 2019-05-23
- 1.0.2 — 2019-05-23
- … 1 more at https://npm.io/package/rankade-js-api/versions

## 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

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

#### Games

- <code>rankade.games.popular()</code> retrieve rankade's popular games
- <code>rankade.games.list()</code> retrieve group's games
- <code>rankade.games.search(name)</code> search a game by giving a name or part of
- <code>rankade.games.create(name)</code> create a game by name and retrieve it

#### Matches

- <code>rankade.matches.create(matches, dryrun)</code> 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)
- <code>rankade.matches.exists(id)</code> check if a match already exists
- <code>rankade.matches.status()</code> retrieve matches' queue/elaboration status
- <code>rankade.matches.list(subset = 'main', page = 1)</code> retrieve group's matches

#### Players

- <code>rankade.players.players(page)</code> retrieve group's players
- <code>rankade.players.player(name)</code> create a ghost player

#### Subsets

- <code>rankade.subsets.list()</code> retrieve group's subsets

#### Rankings

- <code>rankade.rankings.list(subset = 'main', match = 'last', page = 1)</code> retrieve group's rankings

#### Quota

- <code>rankade.quota.quota()</code> 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 <code>rankade.matches.list</code> method
- 2019-08-21 added the <code>rankade.rankings.list and rankade.subsets.list</code> methods
- 2019-08-08 added the <code>rankade.players.player(name)</code> method
- 2019-06-26 added the <code>rankade.auth.setAccessToken(token)</code> method and updated the readme file
- 2019-06-18 added the <code>rankade.setKey(key)</code>, <code>rankade.setSecret(secret)</code> methods and players pagination
- 2019-05-29 added the <code>rankade.auth.isExpired()</code> method and updated the readme file
- 2019-05-23 api errors parsing
- 2019-05-22 started implementation of basic calls

---
_Source: https://npm.io/package/rankade-js-api · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
