jackmcguire1 / riot-global-rankings

A hackathon submission for global rankings DEV POST hackaton for Riot x AWS

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

riot-global-rankings

This repository is for the AWS x League Of Legends Hackathon - Global Power Rankings - LoL Esports Data

Go Report Card codecov

About

  • This repository contains the API for the Global Power Rankings Hackathon sponsored by AWS x Riot

  • Team rankings are based on accumulated wins and losses of tournament matches where the type is 'BestOf' and mode is 'Classic'.

Devpost Project Submission

https://devpost.com/software/riot-rankings

Requirements

  • MongoDB ATLAS cluster - AWS - US-EAST-1
  • mongodb/brew/mongodb-database-tools
  • Python3
  • GO 1.21+
  • AWS SAM [lambda, API Gateway, etc]
  • Docker Desktop 4.24+
  • Docker Compose 2.22.0+

SETUP

CLI tools

brew install mongodb/brew/mongodb-database-tools

Swagger

Copy the contents of ./swagger.yml to Swagger Editor and begin invoking the Serverless API endpoints.

https://app.swaggerhub.com/apis/jackmcguire1/Riot-Global-Rankings/1.0.1

Run With Docker

docker-compose up -d

docker compose watch

Import data to Mongo

  1. run python3 ./tools/get_riot_files.py
  2. create a database on your MongoDB Atlas cluster called riot
  3. cd ./esports-data

  4. mongoimport --uri 'mongodb+srv://{ADDRESSS}' --collection tournaments --type json --file tournaments.json --jsonArray

  5. mongoimport --uri 'mongodb+srv://{ADDRESSS}' --collection mappings --type json --file mapping_data.json --jsonArray

  6. mongoimport --uri 'mongodb+srv://{ADDRESSS}' --collection leagues --type json --file leagues.json --jsonArray7.

  7. mongoimport --uri 'mongodb+srv://{ADDRESSS}' --collection teams --type json --file teams.json --jsonArray

  8. mongoimport --uri 'mongodb+srv://{ADDRESSS}' --collection players --type json --file players.json --jsonArray

Relevant links

About

A hackathon submission for global rankings DEV POST hackaton for Riot x AWS


Languages

Language:Go 93.5%Language:Python 5.8%Language:Dockerfile 0.6%