This was quite a struggle this week as I have never used API’s before. I have always wanted to, but as like most things in my life, I have been too scared to actually learn how they work. Well, as it so happened, the assignment for the week was to create a sketch using an external source. I had a very hard time actually finding API’s that really fit my passion for sports. ESPN has placed quite a few roadblocks to obtain their API’s and at least from my understanding – – it is no longer possible to obtain their data. Am I completely wrong, by chance? If so, any help in finding these JSON files of this information would be much appreciated.
Nonetheless, after some troubleshooting/signing up for random sites with the API’s that I wanted, I landed on the New York Times website. As per one of Shiffman’s last videos, I followed the steps in obtaining an API key and how to properly gather data from the New York Times. While, I could not find a sports API, I decided to instead use the movie API as film has always been a strong passion of mine. I obtained the data of all of the movies listed on this site and then set out to incorporate the information into a simple p5 sketch.
Again, following step by step based on yet another Shiffman video, I created a button and text field to search for the movies in my sketch. After preloading a stock image as a background, my sketch was pretty much set. It is quite boring to look at and will only refresh when you hit stop in the editor. Also, the text is not appearing next to the stock photo of Linoln like I had hoped. Instead, you will have to scroll down to underneath the photo to see the actual text summaries. Is this a CSS issue that can easily be altered?
For the time being, here is the API sketch in progress:
Here is the p5 code: