Blog
Going live in June 2024!
Going live in June 2024!
In the previous article, we went through the main pieces of the API-calling puzzle. Now, we use those pieces to actually make some API calls (you can do this in irb).
Let’s use a no-auth API to keep things simple to start: https://api.reporter.nih.gov/
We’re going to use the Net/HTTP gem, as well as json, so at the top of our file we should have:
...I’ve accessed data via APIs fairly frequently, but have not dived into the details of how those calls work. So let’s do that here.
APIs (Application Programming Interface) can generally be SOAP or REST (REpresentational State Transfer) - let’s focus on REST. There’s plenty to say about when and why to use APIs in making data available, but I want to look more at how to use them. What data...