0

After making a bunch of CRUD-like apps, I've decided to venture out a bit and play with APIS. The Riot game API seems pretty simple to implement, as it is just a link follow by my API key.

ex: https://na.api.pvp.net/api/lol/na/v1.4/summoner/by-name/RiotSchmick?api_key=<key>

after googling for quite a while yesterday, I am still at lost how I can integrate this information.

Where should I put the above link, how do I store the information from the JSON, and how exactly does the MVC structure fit into this?

If I'm not storing any data (no users, just instant display of info based on API) Do I even need a database?

user3277633
  • 1,891
  • 6
  • 28
  • 48
  • Have you tried https://github.com/jnunemaker/httparty as mentioned on this question: http://stackoverflow.com/questions/13114125/using-rails-to-consume-web-services-apis ? – luchosrock Jul 14 '15 at 18:31
  • In this case we are using: https://github.com/rest-client/rest-client or https://github.com/digitalocean/resource_kit :) – Jan Strnádek Jul 14 '15 at 18:54
  • I looked up HTTParty, and it appears that it's what I'm looking for! After playing with it for a bit, I realized that most of uses of HTTParty is simply in a .rb file. Where would I put an API call in rails? Some say under lib/, other suggests app/helpers/. Is there a rails way of integrating such file? – user3277633 Jul 14 '15 at 21:14

0 Answers0