# riot-games-api-wrapper

> Lightweight wrapper on the riot games api

Latest version **0.0.10** (published 2024-04-09) · MIT license · 0 weekly downloads

## Install

```sh
npm install riot-games-api-wrapper
pnpm add riot-games-api-wrapper
yarn add riot-games-api-wrapper
bun add riot-games-api-wrapper
```

## Health

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

Positive: has types; esm support; no vulnerabilities.

Warnings: low downloads; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.10 |
| Published | 2024-04-09 |
| First published | 2024-02-08 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 1 |
| Unpacked size | 8.3 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 1 |
| Author | titsex |
| Maintainers | titsex |
| Keywords | riot, games, api, wrapper, league, legends |

## Links

- npm: https://www.npmjs.com/package/riot-games-api-wrapper
- Repository: https://github.com/titsex/riot-games-api-wrapper
- Homepage: https://github.com/titsex/riot-games-api-wrapper#readme
- Issues: https://github.com/titsex/riot-games-api-wrapper/issues
- npm.io page: https://npm.io/package/riot-games-api-wrapper

## Dependencies (1)

- [league-of-legends-api-wrapper](https://npm.io/package/league-of-legends-api-wrapper.md) ^0.0.4

## Recent versions

- 0.0.10 (latest) — 2024-04-09
- 0.0.9 — 2024-04-09
- 0.0.8 — 2024-04-01
- 0.0.7 — 2024-02-12
- 0.0.6 — 2024-02-12
- 0.0.5 — 2024-02-11
- 0.0.4 — 2024-02-11
- 0.0.3 — 2024-02-11
- 0.0.2 — 2024-02-11
- 0.0.1 — 2024-02-08

## README

# riot-games-api-wrapper

> The purest wrapper over the riot games api

# Feature

| product           | api                                                                 | ☑️  |
| ----------------- | ------------------------------------------------------------------- | --- |
| Riot Games        | ACCOUNT-V1                                                          | ✅  |
| League of Legends | [See here](https://github.com/titsex/league-of-legends-api-wrapper) | ✅  |

# Using

```typescript
import RiotGamesAPI, { RiotGamesAccountRegion } from 'riot-games-api-wrapper'

const riot = new RiotGamesAPI([
    {
        token: 'RGAPI-b7957835-f168-41d2-82e8-fe75337713af',
        region: 'ru',
        product: 'LeagueOfLegends',
    },
])

riot.account.getByNameAndTag('titseх', 'snake', RiotGamesAccountRegion.EUROPE).then(console.log).catch(console.error)

riot.lol.status.get().then(console.log).catch(console.error)
```

# Documentation

### RiotGamesAPI[RiotGamesAPIOptions | RiotGamesAPIOptions[]]

-   `token` is required, to get it, follow the [Riot Developer Portal](https://developer.riotgames.com)
-   `region` is required, available: 'br1', 'eun1', 'euw1', 'jp1', 'kr', 'la1', 'la2', 'na1', 'oc1', 'ph1', 'ru', 'sg2', 'th2', 'tr1', 'tw2', 'vn2'
-   `product` is not required, available: 'LeagueOfLegends'

# Disclaimer

It so happened that riot games has its own token for each product (game).

This forced us to make separate packages for each game: [league-of-legends-api-wrapper](https://github.com/titsex/league-of-legends-api-wrapper)

It also forced us to make non-intuitive options in the constructor of the RiotGamesAPI class.

If you need a wrapper over the API of a specific product (game), use the appropriate package.

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