1.0.5 • Published 8 years ago

riotapi-npm v1.0.5

Weekly downloads
2
License
MIT
Repository
github
Last release
8 years ago

For many requirements use get and save in a variable or constant.

const riotapi = require('ritotapi-npm')

const options = {
    region: "${REGION}", 
    api_key: "${API_KEY}"
}

/** Types:
* 'id'        : Get summoner by id.
* 'accountId' : Get summoner by account id.
* 'name'      : Get summoner by account name
*/

riotapi.summoner.get(options, `${TYPE}`, `${SUMMONER}`) //type and summoner string
.then(result => console.log(result))
.catch(err => console.log(err))

/*
Summoner funcitons:
  'get'             : 'All summoner json',
  'getId'           : 'Summoner ID.',
  'getAccountId'    : 'Account ID.',
  'getName'         : 'Summoner name.',
  'getProfileIcon'  : 'ID of the summoner icon associated with the summoner.',
  'getRevisionDate' : 'Date summoner was last modified specified as epoch milliseconds. The following events will update this timestamp: profile icon change, playing the tutorial or advanced tutorial, finishing a game, summoner name change',
  'getLevel'        : 'Summoner level associated with the summoner.'
*/

For many requirements use get and save in a variable or constant.

const riotapi = require('ritotapi-npm')

const options = {
    region: "${REGION}", 
    api_key: "${API_KEY}"
}

/** Types:
* 'masteries'        : Get all summoner mastery with all the champions played.
* 'champion'         : Get specific mastery champion.
* 'score'            : Get total mastery in summoner
*/

riotapi.masteries.get(options, `${TYPE}`, `${SUMMONER}`, `${CHAMPION}`) //type, summoner and champion string
.then(result => console.log(result))
.catch(err => console.log(err))

/*
Masteries function (only type 'champion'):
  'get'                             : 'Get all json *exception can use with all types*',
  'getChampionId'                   : 'Champion ID for this entry.',
  'getChampionLevel'                : 'Champion level for specified player and champion combination.',
  'getChampionPoints'               : 'Total number of champion points for this player and champion combination - they are used to determine championLevel.',
  'getChampionPointsSinceLastLevel' : 'Number of points earned since current level has been achieved. Zero if player reached maximum champion level for this champion.',
  'getChampionPointsUntilNextLevel' : 'Number of points needed to achieve next level. Zero if player reached maximum champion level for this champion.',
  'getChestGranted'                 : 'Is chest granted for this champion or not in current season.',
  'getTokensEarned'                 : 'Only champion tokens earned *specific champion*',
  'getLasPlayTime'                  : 'Last time this champion was played by this player - in Unix milliseconds time format.', <= 
*/
1.0.5

8 years ago

1.0.4

8 years ago

1.0.3

8 years ago

1.0.2

8 years ago

1.0.1

8 years ago

1.0.0

8 years ago