Skip to content

A simple to use League of Legends API wrapper powered by Express.js and TypeScript

License

Notifications You must be signed in to change notification settings

danielsogl/lol-api-wrapper

Repository files navigation

League of Legends API Wrapper

A ready to run LoL API wrapper powered by Express.js and TypeScript

LoL Logo

Build Status

Deploy

About

This repository allows you to use the official LoL API with some awesome features.

  • Caching
  • Simple configuration
  • Only requests without another LoL Api library

Setup

To run the server you have to set following node environment variables. You can use the .env.EXAMPLE file to fill them out.

  • API_KEY: Your League of Legends API Key. You can generate your own key here
  • CHAMPION_GG_KEY: Your Champion.gg API Key. You can generate your own key here
  • DEFAULT_REGION: The default API region (EUW, NA, TR etc.)
  • SESSION_SECRET: The API Session private key. Just generate a random key

If you want to use redis without heroku you have to set the following key

  • REDIS_URL: YOur redis endpoint url
  • CACHE_TYPE=redis

Build

Because this repository is built in TypeScript you have to compile the *.ts files to plain JavaScript. Run npm run build and the compiled *.js files are placed inside the dist folder.

Deploy

I recommend using Heroku to deploy this repository because of nearly zero configuration and zero costs. Heroku also gives you the ability to use Redis as in-memory-database. The repository is already configured to run out of the box on Heroku.

Test

I added basic unit tests to this repository. You find them inside the ./tests folder. Feel free to add your own. To run the tests just run npm run tests.

About

A simple to use League of Legends API wrapper powered by Express.js and TypeScript

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published