Really struggling with the Random Quote Machine


#1

Alright, I’m really sorry to bother you, but I have been stuck for 5 days now. I have read almost every post on this problem and watched plenty of AJAX and jQUERY 1+hrs tutorials.

  • In tutorials, API url’s are usually just links. I’m not exactly sure how to obtain one. I’ve seen people on other posts saying, “I have used this one.” and I literally have no idea how they used ‘this’ one. At this point, to be honest, I’m not sure what an API is anymore.

  • I got the AJAX method, like the one used here. It makes absolutely perfect sense. The challenges involving using JSON in jQUERY also make perfect sense to me. I also understand, to an extent, how to manipulate the object once obtained. The thing is though, I’m really stuck trying to figure out how to summon the damned object/complex object.

I have been thinking of hard-coding all the quotes, but this is not the point of the challenge. I really want to know how to use an API, or what even an API is. I’d really love some guidance/helpful links. Thank you!


#2

If you’re having trouble wrapping your head around what APIs are and how they work, you might benefit from following some tutorials for working with specific APIs. Here is Codecademy’s “How to use APIs with Javascript”. (I believe they use the YouTube API.)

An API, broadly, is the method of communicating with a web application. Think of it kind of like the command line of a web app.