This is a small app that allows users to read through the stats of all of the League of Legends Champions. They can also favorite the champions to view them one screen to compare some of the basic stats and keep a running list of favorites. I used the champion data from Fantasy Data API to seed my database at first and on production have a rake task that updates the database every day at midnight.
Production: Lol Champs
- Clone down the repo:
$ git clone [email protected]:TimothyFell/lol_champs.git blol_champs
- Run:
$ bundle install # Installs dependencies
- Setup the database:
$ rails db:{create,migrate} # Creates and builds the postgresql databases
If you'd like to contribute to this project, fork this repository then follow the installation instructions below. Once you've finished the feature or fixes you wish to contribute, send us a pull request and one of us will review it before merging. If we have any suggestions, comments or questions we will leave them as comments on you pull request. Thank you in advance.
To run the tests locally run the following command:
$ bundle exec rspec
The only API call I make in this project is in my rake task. If you want to duplicate the functionality you will need to visit Fantasy Data and request and API key for their LOL endpoints. Once you do, follow these steps.
- Install Figaro files
$ bundle exec figaro install # creates figaro files
- In the
application.yml
file that just got created, add the following:
FANTASY_DATA_API_KEY: your_brand_new_api_key
This is a simple database where users and champions are joined by a favorites table to reduce data duplication.