alolstats

command module
v0.0.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 13, 2019 License: MIT Imports: 20 Imported by: 0

README

ALoLStats

Build status Coverage Status Docker License

Short Description

ALoLstats, a League of Legends Statistics aggregation and calculation server

Abstract

For players which want to be competitive or which are still learning it is essential to study various game metrics. Usually players use one of the various websites which exist solely for the purpose to present statistics about League of Legends and which give you informations like the lanes a certain champion should be played in or its win/loss and ban rates.

Most of those websites do not describe their methods how those informations were obtained, how the statistics is calculated and on which dataset the calculations are based on. In every scientific setting this would be a strict no-go and if bad underlying data is used, or wrong assumptions on the data are made, this can lead to misinterpretation of the results which may lead to wrong decision making.

In this project we aim to improve on that by implementing a completely open source (MIT license) solution to the calculation and preparation of statistics for various aspects of the game.

Currently the focus of development lies in the calculation of Champion statistics, like lane/role, average KDA, win/loss ratios, ban ratios and various other aspects related to Champions. In the near future Summoner data shall also be considered. The decisions on which features are tackled next are based on suggestions and requests by friends and colleagues and personal experiences while playing League of Legends.

The implementation is done in Go with the possibility to use R for complex statistical calculations. The data storage is interchangeable and currently a MongoDB backend is supported.

The Riot API client is implemented from scratch for this project, including region support and rate limit handling, and is currently based on V4 of the Riot API.

In combination with this backend a frontend called ALoLstats-web is also beeing developed.

These projects are used to power fuu.la.

How to run it

Probably the easiest way to try out ALoLstats is using Docker. Currently no official images are provided in a public registry, but it can be easily built using

make build-container-gitcommit

and then start it using

docker run --name ALoLstats -v /path/to/config/file.toml:/app/config/config.toml:ro hpsch/alolstats:latest

where /path/to/config/file.toml has to be replaced with the path to your config file.

An example is provided in the cfg/ directory and it is enough to insert your API key to use this config.

To expose the http port for the REST API use

-p 8000:8000

where 8000 should be exchanged with the port set in the config file.

API Reference (usually out of date and highly in flux)

The following endpoints are currently available. A detailed description will be provided at a later point when the API becomes more stable.

  • /v1/match?id=matchID: Returns informations of the match with id=matchID (e.g., 2585564744)
  • /v1/champions: Returns a list of all currently available champions
  • /v1/champion-rotations: Returns a list of the current free champion rotation
  • /v1/summoner/byname?name=summonerName: Returns information about a summoner specified by name=summonerName
  • /v1/summoner/bysummonerid?id=summonerID: Returns information about a summoner specified by name=summonerID
  • /v1/summoner/byaccountid?id=accountID: Returns information about a summoner specified by name=accountID
  • /v1/stats/overview: Temporary page which lists all available plots related to Champion statistics
  • /v1/stats/champion/byid?id=championId&gameversion=exactGameVersion: Returns stats for the Champion with id=championId and the specified game version (e.g., 110 and 8.24)
  • /v1/stats/champion/byname?name=championName&gameversion=exactGameVersion: Returns stats for the Champion with name=championName and the specified game version (e.g., Sivir and 8.24)
  • /v1/storage/summary: Returns information of the stored data in the storage or its backend

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
Package fetchrunner is used to automatically trigger downloads of summoner and match data such that is lands in storage
Package fetchrunner is used to automatically trigger downloads of summoner and match data such that is lands in storage
Package logging provides logging facilities for ALoLStats
Package logging provides logging facilities for ALoLStats
Package matchfilereader is used to read the seed data provided from Riot See https://developer.riotgames.com/getting-started.html for details
Package matchfilereader is used to read the seed data provided from Riot See https://developer.riotgames.com/getting-started.html for details
Package mongobackend provides a MongoDB storage backend for use with the storage package.
Package mongobackend provides a MongoDB storage backend for use with the storage package.
Package riotclient provides the Riot API Client interfaces
Package riotclient provides the Riot API Client interfaces
ratelimit
Package riotclientrl is a utility package to check the Rate Limit responses of the Riot API and gives suggestions on how long to wait to avoid beeing rate limit
Package riotclientrl is a utility package to check the Rate Limit responses of the Riot API and gives suggestions on how long to wait to avoid beeing rate limit
Package riotclientv4 provides the Riot API client for API version v4
Package riotclientv4 provides the Riot API client for API version v4
Package statsrunner is the statistics calculation part of ALoLStats and provides the calculation facilities and the API endpoints for retreiving the data.
Package statsrunner is the statistics calculation part of ALoLStats and provides the calculation facilities and the API endpoints for retreiving the data.
Package storage is a main component of ALoLStats as it provides the interface between Storage Backend, Riot Client and serves as an interface for StatsRunner and FetchRunner
Package storage is a main component of ALoLStats as it provides the interface between Storage Backend, Riot Client and serves as an interface for StatsRunner and FetchRunner

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL