RiotAPI.grab
RiotAPI.grab is wrapper for the League of Legends public API. By default, it is written and supported in typescript. Deployment is not yet complete. Reference to this official document.
Installation
npm
npm i --save riotapi-grab
Quick start
const RiotAPI Region = const riotAPI = "API key" Regionkr riotAPIStatus
The result values are returned with the model and the rate manager.
resultmodel /* Result data */resultrateManager /* Manager for corresponding API */
Configuration
Region
Region list. use it as a guide.
br: platform: 'BR1' host: 'br1.api.riotgames.com' eune: platform: 'EUN1' host: 'eun1.api.riotgames.com' euw: platform: 'EUW1' host: 'euw1.api.riotgames.com' jp: platform: 'JP1' host: 'jp1.api.riotgames.com' kr: platform: 'KR' host: 'kr.api.riotgames.com' lan: platform: 'LA1' host: 'la1.api.riotgames.com' las: platform: 'LA2' host: 'la2.api.riotgames.com' na: platform: 'NA1' host: 'na1.api.riotgames.com' oce: platform: 'OC1' host: 'oc1.api.riotgames.com' tr: platform: 'TR1' host: 'tr1.api.riotgames.com' ru: platform: 'RU' host: 'ru.api.riotgames.com' pbe: platform: 'PBE1' host: 'pbe1.api.riotgames.com'
Request retries
If not, the timeout is 1000 ms and 3 retries by default.
const RiotAPI Region = const config = requestOptions: shouldRetry: true // maximum amount of retries numberOfRetries: 3 // Required when API exponentially slow retryDelay: 1000 const riotAPI = "API key" Regionkr config
Rate Manager
Provides management of API usage and restrictions. It's not yet available, but it can be checked for monitoring.
RiotAPIStatus
Methods
A list of implementations as indicated in the official document. If anything is missing, please make an issue.
/* CHAMPION-V3 */RiotAPIChampionRiotAPIChampion /* CHAMPION-MASTERY-V3 */RiotAPIChampionMasteryRiotAPIChampionMasteryRiotAPIChampionMastery /* LEAGUE-V3 */RiotAPILeagueRiotAPILeagueRiotAPILeagueRiotAPILeague /* MATCH-V3 */RiotAPIMatchRiotAPIMatchRiotAPIMatchRiotAPIMatchRiotAPIMatch /* SPECTATOR-V3 */RiotAPISpectatorRiotAPISpectator /* LOL-STATUS-V3 */RiotAPIStatus /* SUMMONER-V3 */RiotAPISummonerRiotAPISummonerRiotAPISummoner /* THIRD-PARTY-CODE-V3 */RiotAPIThirdParty /* TOURNAMENT-STUB-V3 */RiotAPITournamentStubRiotAPITournamentStub
Setup develop
I hate to set it up and I prove it. I like making simple. So it's really simple. Just if you know how to write a typescript.
Just install dependensy library
npm i -g
And build for compile
npm run build
has not yet been written a test related code. going to add more soon.
test!!