@joemccann/robintrack-api

1.0.0Β β€’Β PublicΒ β€’Β Published

Robintrack API

πŸ“ˆ Unofficial node.js client for accessing the APIs called on Robintrack.net.

Installation

npm i -S @joemccann/robintrack-api

Usage

const rta = require('@joemccann/robintrack-api')

const params = {
  method: 'largest_popularity_increases',
  options: {
    hours_ago: 48,
    limit: 50,
    percentage: true,
    min_popularity: 50,
    start_index: 0
  }
}

try {
  const {
    data = [],
    statusCode = 0
  } = await rta(params)
  console.dir(data) // [...]
  console.log(statusCode) // 200
}
catch(e){
  console.error(e)
}

Supported Methods

  • largest_popularity_changes
  • largest_popularity_decreases
  • largest_popularity_increases
  • least_popular
  • total_symbols
  • most_popular

Support Options

  • hours_ago
  • limit
  • percentage
  • min_popularity
  • start_index

NOTE: The method total_symbols doesn't support any options.

For more information on the requests and responses view the test file.

Tests

npm i -D
npm test

License

MIT

Authors

Readme

Keywords

Package Sidebar

Install

npm i @joemccann/robintrack-api

Weekly Downloads

2

Version

1.0.0

License

MIT

Unpacked Size

10.1 kB

Total Files

5

Last publish

Collaborators

  • joemccann