API calls in Rails
<p>This feels like a dumb question, but the more I think about it the more confused I get: how (and where? Model? Controller?) do I make an API call in a Rails app?</p>

<p>I need to make a string of API calls, capture the returned data, save pieces of that data to a database, and then use that database info to make another API call. That repeats a couple times, building the data I need for the final API request (which winds up being a <code>POST</code> request, but I would probably need to save the "success" or "fail" message to the database too).</p>

<p>Typically, I use AJAX in my non-rails projects to APIs to get what I need...but those are more display-only situations, so I've never needed to save what the API returned. I think about 90% of my confusion stems from the fact that I'm trying to figure out how to make an AJAX call in a rails model, when really I should (somehow, and here is where my knowledge ends) be making an HTTP request in my model.</p>

<p>I may be missing something fundamentally about Ruby and/or Rails that allows me to make HTTP requests, so I would highly value any feedback/guidance on how to get started making these necessary API calls!</p>