title | type | duration | creator |
---|---|---|---|
Retrieve Data from an API Lab |
lab |
1:25 |
James Davis (NYC) |
In this lab, you will be exploring the Flickr API. Use the prompts below to find the correct API call.
Hint: Use the overview page and API Explorer (found at the bottom of each API page) to help form your API calls.
First, sign up for a Yahoo! account (sorry, there's no way to avoid it). Get the API key and save it somewhere.
Allocate 15 minutes for each task. Data should be returned in JSON format.
-
Task #1: Find the api call that allows you to search for all images of "cats".
-
Task #2: Find the api call that allows you to search for all images from "Charlotte, North Carolina."
-
Task #3: Get all of the comments for any photo.
-
Task #4: Search for a list of all the photos at your current latitude and longitude.
Bonus:
- For each task/API endpoint, write Java code that calls the API and returns a JSON object
- For task #1, using IntelliJ, write a script that hits the API endpoint you've identified, loops through the returned data, and prints out (to the console) just the URL of each cat image
- For task #3, using IntelliJ, write a script that hits the API endpoint you've identified, loops through the returned comments for the first photo at your current lat/long, and prints out (to the console) the first word of each comment...backwards!
- Add the correct API calls in the answers.md file
- If you attempt or complete the bonus, include your Java code in the pull request
A filled out answers.md file.
- All content is licensed under a CCBYNCSA 4.0 license.
- All software code is licensed under GNU GPLv3. For commercial use or alternative licensing, please contact legal@ga.co.