Wanderlust Project

Hello everyone, this is my first question at codecademy forum. My question is regarding Wanderlust Project’s task 41. Here are the details:

“For a real challenge, try fetching venue photos! This will require an additional request for venue details for each venue, as the photo information is not returned in the initial request.”

Would you mind to guide me a little bit about the url to fetch.

Here is the URL: https://api.foursquare.com/v2/venues/VENUE_ID

I’m not sure how to get the VENUE_ID and make complete url. kindly guide me regarding this taks. thanks :slight_smile:

Hey there, welcome to the forums!

The VENUE_ID is returned as part of your fetch() to the API for the venue information.

You need to capture that detail, and build it into your subsequent API call. :slight_smile:

Thanks for your reply. I know we got the venue details when we call this async function getVenues(). In order to retrieve photos whether I need to create a separate async function and create a request in that function or I have to create another request in the same getVenues() function. kindly explain it a little bit more for me. Once I got the Id how would I have to construct the url. Would I have to replace the id with VENUE_ID in the url?.

Yes, in much the same way as you have with the original URI to search for the venue.

The documentation on using the photos endpoint is here.

There isn’t necessarily a single correct approach to solving these programming challenges, so perhaps you should pick an approach, try it, and see if you can get it to work. If it does, great; if not, find out why. Either way, you’ll learn something - probably more so than if I simply tell you what to do. :slight_smile:

1 Like

Yeah sure. thanks :slight_smile: