zed.gg
Riot Api wrapper for Node.js written in typescript. RateLimit is handled with our built in logic and with the response headers (even async!). The first request is always sync, so we can adjust our RateLimit handler to the headers. retry-after
case is not implemented yet. If you have any issues, just contact me on discord: nitash#3613
!
npm install zed.gg --save
Getting started
All methods do return a Promise<T>
so you can await it with ES6
;
Basic
;; ;; ; // Uses default development rate limits; // ZedGG with two rate limits. 100 calls in 10 secnds and 6000 calls in 600 seconds.
Exceptions
Exceptions are returned as CustomResponseException
. You can check it with instanceof
.
try catch ex
Summoners
zedGG.summoners.by.name'nitash'.thenconsole.logr;zedGG.summoners.by.accountId29987287.thenconsole.logr;zedGG.summoners.by.summonerId25837773.thenconsole.logr;
zedGG.summoners.by.*
returns a Summoner
Matchlists
;matchlistByAccountIdOptions.season = Season.PRESEASON2017;matchlistByAccountIdOptions.queue = Queue.RANKED_SOLO_5x5;matchlistByAccountIdOptions.beginIndex = 1;matchlistByAccountIdOptions.endIndex = 20;matchlistByAccountIdOptions.champion = 62;matchlistByAccountIdOptions.beginTime = new Date2017, 4, 10;matchlistByAccountIdOptions.endTime = new Date2017, 6, 10; zedGG.matchlists.by.accountId29987287.thenconsole.logr;zedGG.matchlists.by.accountId29987287, matchlistByAccountIdOptions.thenconsole.logr;zedGG.matchlists.by.accountIdRecent29987287.thenconsole.logr;
zedGG.matchlists.by.*
returns Matchlist
Matches
zedGG.matches.by.matchId3199845416.thenconsole.logr;
zedGG.matches.by.matchId
returns a Match
Leagues
zedGG.leagues.by.summonerId25837773.thenconsole.logr;
zedGG.leagues.by.summonerId
returns a LeagueList
Notes
This wrapper is far by perfect. We have a lot of work to do. In the coming week I will try to add as many endpoint requests as possible and better documentation.
Models
There is a lot of models which are exported. Just download the package and explore them in TypeScript! :)
Summoner
declare
Matchlist
declare
Match
declare
LeagueList
declare