# async-riot-wrapper

> An es6 Riot Wrapper using async/await

Latest version **1.0.0** (published 2018-05-15) · UNLICENSED license · 0 weekly downloads

## Install

```sh
npm install async-riot-wrapper
pnpm add async-riot-wrapper
yarn add async-riot-wrapper
bun add async-riot-wrapper
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.0 |
| Published | 2018-05-15 |
| First published | 2018-05-15 |
| Weekly downloads | 0 |
| License | UNLICENSED |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 24.6 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Petter Kaspersen |
| Maintainers | petter-kaspersen |

## Links

- npm: https://www.npmjs.com/package/async-riot-wrapper
- npm.io page: https://npm.io/package/async-riot-wrapper

## Dependencies (1)

- [node-fetch](https://npm.io/package/node-fetch.md) ^2.1.2

## Recent versions

- 1.0.0 (latest) — 2018-05-15

## README

# Lightweight ES6 Riot API Wrapper

This is a lightweight Riot API wrapper using async/await. The wrapper does not handle any rate limits, and is simply a tool to help you get data from the API.

### How to use:

```javascript
const api = require('async-riot-wrapper');

const riot = api('API-KEY');

async function howToUse() {
  const allChampions = await riot.getAllChampions('euw', true); // If true is not included, freeToPlay is automatically set to false.
}

howToUse();
```

### CHAMPION-MASTERY-V3

```javascript
/lol/champion-mastery/v3/champion-masteries/by-summoner/{summonerId}                            : getMasteryBySummonerID(SERVER, SUMMONER_ID);
/lol/champion-mastery/v3/champion-masteries/by-summoner/{summonerId}/by-champion/{championId}   : getMasteryBuSummonerChampID(SERVER, SUMMONER_ID, CHAMPION_ID);
/lol/champion-mastery/v3/scores/by-summoner/{summonerId}                                        : getMasteryScoresBySummonerID(SERVER, SUMMONER_ID);
```

### CHAMPION-V3

```javascript
/lol/platform/v3/champions          :   getAllChampions(SERVER, FREETOPLAY); // FREETOPLAY optional, default: false
/lol/platform/v3/champions/{id}     :   getChampionByID(SERVER, ID);
```

### LEAGUE-V3

```javascript
/lol/league/v3/challengerleagues/by-queue/{queue}     : getChallengersByQueue(SERVER, QUEUE);
/lol/league/v3/leagues/{leagueId}                     : getLeaguesByID(SERVER, ID);
/lol/league/v3/masterleagues/by-queue/{queue}         : getMasterLeaguesByQueue(SERVER, QUEUE);
/lol/league/v3/positions/by-summoner/{summonerId}     : getLeaguePositionsByID(SERVER, ID);
```

### LOL-STATIC-DATA-V3

All `params` are optional URL params that are to be passed with it, to get specific data. Pass as a string. Eg. `"?locale=en_US&tags=all"`.

```javascript
/lol/static-data/v3/champions                 : getStaticChampions(SERVER, PARAMS);
/lol/static-data/v3/champions/{id}            : getStaticChampionsByID(SERVER, ID, PARAMS);
/lol/static-data/v3/items                     : getStaticItems(SERVER, PARAMS);
/lol/static-data/v3/items/{id}                : getStaticItemsByID(SERVER, ID, PARAMS);
/lol/static-data/v3/language-strings          : getStaticLanguageStrings(SERVER, PARAMS);
/lol/static-data/v3/languages                 : getStaticLanguages(SERVER);
/lol/static-data/v3/maps                      : getStaticMaps(SERVER, PARAMS);
/lol/static-data/v3/masteries                 : getStaticMasteries(SERVER, PARAMS);
/lol/static-data/v3/masteries/{id}            : getStaticMasteriesByID(SERVER, ID, PARAMS);
/lol/static-data/v3/profile-icons             : getStaticProfileIcons(SERVER, PARAMS);
/lol/static-data/v3/realms                    : getStaticRealms(SERVER);
/lol/static-data/v3/reforged-rune-paths       : getStaticReforgedRunePaths(SERVER, PARAMS);
/lol/static-data/v3/reforged-rune-paths/{id}  : getStaticReforgedRunePathsByID(SERVER, ID, PARAMS);
/lol/static-data/v3/reforged-runes            : getStaticReforgedRunes(SERVER, PARAMS);
/lol/static-data/v3/reforged-runes/{id}       : getStaticReforgedRunesByID(SERVER, ID, PARAMS);
/lol/static-data/v3/runes                     : getStaticRunes(SERVER, PARAMS);
/lol/static-data/v3/runes/{id}                : getStaticRunesByID(SERVER, ID, PARAMS);
/lol/static-data/v3/summoner-spells           : getStaticSummonerSpells(SERVER, PARAMS);
/lol/static-data/v3/summoner-spells/{id}      : getStaticSummonerSpellsByID(SERVER, ID, PARAMS);
/lol/static-data/v3/tarball-links             : getStaticTarball(SERVER, PARAMS);
/lol/static-data/v3/versions                  : getStaticVersions(SERVER, PARAMS);
```

### LOL-STATUS-V3

```javascript
/lol/status/v3/shard-data                : getShardData(SERVER);
```

### MATCH-V3

```javascript
/lol/match/v3/matches/{matchId}                                     : getMatchByID(SERVER, MATCH_ID);
/lol/match/v3/matchlists/by-account/{accountId}                     : getMatchListByAccount( SERVER, ACCOUNT_ID, PARAMS);
/lol/match/v3/timelines/by-match/{matchId}                          : getMatchTimelineByID(SERVER, MATCH_ID);
/lol/match/v3/matches/by-tournament-code/{tournamentCode}/ids       : getMatchIDsByTournament(SERVER, TOURNAMENT_CODE);
/lol/match/v3/matches/{matchId}/by-tournament-code/{tournamentCode} : getMatchInfoByTournament(SERVER, MATCH_ID, TOURNAMENT_CODE);
```

### SPECTATOR-V3

```javascript
/lol/spectator/v3/active-games/by-summoner/{summonerId} : getActiveGame(SERVER, SUMMONERID);
/lol/spectator/v3/featured-games                        : getFeaturedGames(SERVER);
```

### SUMMONER-V3

```javascript
/lol/summoner/v3/summoners/by-account/{accountId} : getSummonerByAccountID(SERVER, ACCOUNT_ID);
/lol/summoner/v3/summoners/by-name/{summonerName} : getSummonerByName(SERVER, NAME);
/lol/summoner/v3/summoners/{summonerId}           : getSummonerBySummonerID(SERVER, SUMMONER_ID);
```

### THIRD-PARTY-CODE-V3

```javascript
/lol/platform/v3/third-party-code/by-summoner/{summonerId} : getThirdPartyCode(SERVER, SUMMONER_ID);
```

---
_Source: https://npm.io/package/async-riot-wrapper · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
