JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 20
  • Score
    100M100P100Q47212F

RESTeemo API wrapper in Node.

Package Exports

  • resteemo

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (resteemo) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

node-resteemo

Build Status Dependency Status

RESTeemo API wrapper for Node. Powered by Quickfind.

Installation

$ npm install resteemo

API

As per RESTeemo's Terms and Conditions, you must provide contact details in the user agent of requests. node-resteemo will not fill in these details for you.

var teemo = require('resteemo')('string with contact info');

Player requests

teemo.player.create(platform, summoner, callback)

Returns an Object profile containing ID-based data for String summoner on String platform. Account and summoner IDs are not unique across platforms.

teemo.player.create('euw', 'guardsmanbob', function(err, profile) {
  if (err) throw err;

  console.log(profile);
  // => {
  // =>   summoner: {
  // =>     id: 20820067
  // =>   },
  // =>   account: {
  // =>     id: 24132405
  // =>   },
  // =>   name: 'Guardsman Bob',
  // =>   internalName: 'guardsmanbob',
  // =>   level: 30,
  // =>   icon: 30
  // => }
});

teemo.player.recentGames(platform, summoner, callback)

Not ready for use

Returns an Array of the last 10 matches (order is random) for String summoner on String platform.

teemo.player.recentGames('euw', 'guardsmanbob', function(err, games) {
  if (err) throw err;

  // Do stuff with Array `games`.
}));

teemo.player.influencePoints(platform, summoner, callback)

Returns lifetime influence point gains for String summoner on String platform.

teemo.player.recentGames('euw', 'guardsmanbob', function(err, points) {
  if (err) throw err;

  console.log(points);
  // => 596797
}));

Supported platforms

Below is a table of the platforms that RESTeemo claims it supports. When polling the API, the shorthand version of a platform is necessary, but you can pass the full version to node-resteemo if you'd like and it will internally use the shorthand version.

Short Full Actually supported
na North_America
br Brasil
euw Europe_West
eun Europe_East
ru Russia
tr Turkey

Release notes

1.2.0

  • Add support for full platform names
  • Remove redundant check of the existence of a callback
  • Update request to v2.21.0