LoL - API Challenge
This Github repo is made for LoL API Challenge @RiotGamesAPI. This was an URF specific challenge more information can be found here.
The result of this project is a website which is Lelking.com (works on mobile too!). The project is made with Meteor and a further explanation about everything on the project and this repo is below.
What is meteor? And why?
More on Meteor and the differences between plain NodeJS and other frameworks here. ##Why so little code in the server folder?
Fortunately everything changed after URF stopped and all the data could be pulled once.
The application does not need to pull any data serverside and update the database every 5 minute as it did in the beginning (you can see the old server code in the "tests" folder). Instead a script was made to pull every match from the new API Challenge endpoint. Another script gets the champion information, makes champion objects, updates the champion objects and finally inserts them to the database. The scripts does not run with Meteor and that is also why they are in the "tests" folder. Everything in the "tests" folder does not get executed when running Meteor. The scripts are meant to run separately.
##Quick Guide This guide is not very friendly nor complete and it is more for the people who already has gotten their feet wet regarding NodeJS, Meteor, Git etc. Although beginners can just follow the straight forward guides on the following websites and of course use google to troubleshoot problems, information etc.
#####What to install
#####How to use
- Clone the repository.
git clone https://github.com/murilobast/apichallenge.git
- Open terminal and navigate to the folder.
npm install- Should create the folder "node_modules"
- Navigate to the folder "app"
meteor- Meteor should start running locally now.
- Open a new terminal session.
- Edit getMatches.coffee and getChampions.coffee where you provide your own API key.
- Run getMatches.coffee in the terminal.
- Run getChampions.coffee and follow the instructions in the code. (to uncomment delete the '#')
coffee getChampions.coffee- Run this command every time you uncomment the code.
http://localhost:3000/in your browser.
Please give us some feedback! It's very appreciated and if you're struggling trying to understand something please tweet us or send us a mail.
@Deam_me @Murilobast - Deam@Lelking.com Murilo@Lelking.com