Skip to content

alvarogirona/lol-analytics

Folders and files

NameName
Last commit message
Last commit date

Latest commit

f6b4a21 · Jun 29, 2024
May 14, 2024
Jun 29, 2024
Apr 30, 2024
Jun 22, 2024
May 13, 2024
May 13, 2024
Apr 30, 2024
May 10, 2024
May 13, 2024
Jun 22, 2024
Jun 17, 2024
May 11, 2024
Jun 28, 2024

Repository files navigation

LoLAnalytics

Requirements

  • PostgreSQL
  • Elixir
  • RabbitMQ
  • MinIO

A docker-compose file is provided to run them locally.

Environment variables

The followign environment variables are required:

export RIOT_API_KEY="{API-KEY}"

export EX_AWS_SECRET_KEY="{SECRET}"
export EX_AWS_ACCESS_KEY="{ACCESS}"
export EX_AWS_ENDPOINT="{HOST}"
export EX_AWS_PORT="{PORT}" # minio defaults to 9000
export DATABASE_URL="ecto://{USERNAME}:{PASSWORD}@{HOST}/lol-analytics"
export SECRET_KEY_BASE="SECRET-KEY"

Running

mix deps.get
mix ecto.create && mix ecto.migrate
iex -S mix phx.server

Queueing a player

Scrapper.Queues.PlayerQueue.enqueue_puuid("PUUID")

The scrapper will retrieve player ranked history, enqueue it's teammates, and store every match in minio.

Processing

A Task to process the matches stored for a patch can be spawned by running:

LolAnalytics.MatchesProcessor.process_for_patch "14.12.594.4901"

Web site

A web site is exposed at localhost:4000.