This week we’ll focus on gathering data from an API for use in our Android applications. This means Friday’s independent project will require you integrate an API into the ongoing independent project you began last week.
In order to prepare, you must decide which API you’ll integrate ahead of time. You need to ensure the API functions as anticipated, contains the data you require, and that you can successfully gather the parameters necessary to make the proper requests.
Not sure where to begin? The following two resources offer expansive lists of APIs, organized by format, category, authentication requirements, and more:
Revisit the Android Independent Projects lesson for examples of how these APIs could be integrated into each of the 4 project categories.
You must complete the following steps before Thursday, as outlined in the Android Independent Projects lesson:
Select an API. Using the links above, Google, and any other resources you'd like, select an API with the content relevant for your project.
Research the API thoroughly. Not every resource is the same. Not every API is accessed in the same manner. Some APIs require complex multi-step authentication, others provide data in formats you may not be familiar with. Thoroughly research the API to ensure it does contain the information you’re seeking, and it will work with your project. Spend some careful time here. You don't want to begin work Friday only to discover your API doesn't work the way you anticipated.
Make thorough test requests. Confirm your research is accurate by actually requesting and receiving data from the API. Test each and every endpoint you anticipate your application will use. You don’t have to build an entire application to do this. Free Chrome extensions like Postman allow you to make test API requests with parameters of your choosing, and browse the response data. Postman offers a series of short tutorial videos on YouTube demonstrating how to install, open, and use their extension.
Be prepared to demonstrate the API to your instructor. After confirming your API will work in your application, be prepared to demonstrate it. Your instructor may ask you to demonstrate how you'll integrate your API choice. Explain to your instructor what the API is, how you will access it, the format it will return data in, and how you’ll use this data in your application. Be prepared to provide an example request and response.
Understand that the same objectives and deadlines apply. The same deadlines and objectives will apply to all students, regardless of their API choice. You will not be excused from objectives or deadlines due to unforeseen API issues. It is your responsibility to research your API, and confirm it will work before adding it to your project.
Lesson 13 of 21
Last updated more than 3 months ago.