So lost on the wikipedia project

So lost on the wikipedia project
0

#1

I’ve been scratching my head for days on how to make an ajax call, specifically now with the wikipedia project. I’m feeling so hopeless. No matter how much I read up on it and tutorials I watch, it just isn’t clicking. How do you determine what goes into an ajax call? That’s my biggest question. I’m so overwhelmed.


#2

Yes, it is frustrating. API calls can be especially frustrating. Especially because they are complicated, every one is different, they are often poorly documented, and they change on ya’.

Don’t get frustrated. Beating your head against the desk is normal. It’s called “learning the hard way”.

Can you show us how you’re trying to do it? You can cut and paste your code, or if you are doing it in codepen or something similar you can just give a link to the pen.


#3

Did you do the Local Weather project yet? If so, you had to use a weather API for it?

Also, you seemed to have created a duplicate question with


#4

I know how you feel OP. I spent a few days reading through Wikipedia’s notes on using their API and nothing seemed to work. Drove me up the wall that did.


#5

ksjazzguitar hit the nail on the head. APIs can be a pain to deal with.

I just recently finished the Wikipedia viewer, so perhaps I can give you a few tips:

  • With the API’s sandbox, you may not have noticed that when you click the items in the leftward sidebar (ex. action=query), it opens up additional option settings for that item
  • If you add ‘&callback=?’ to the end of your API call (ie URL), then the API call should return the JSON in a form that CodePen will let you manipulate
  • The stringify method from this FCC exercise is particularly useful when figuring out how to use your JSON results