This course has been designed to help the Java beginner understand how to establish connections to RESTful APIs. Examples will be taught on a Windows environment using Eclipse and Java. The course will make minimal use of 3rd party libraries to help the student fully understand what their software is doing. We will cover the structure of an API call, the most commonly used authentication methods, and handling responses.
No tests or quizzes. Lets just write some code.
Introduction And Setup
A quick introduction to me and what you'll be learning in this course. Source code for all finished lessons is linked in the last lesson.
A step by step guide to getting Java installed on your windows computer. If you are not using windows, you can still complete this course by following another guide to get Java installed on the operating system of your choice. You can freely skip this video if you already have Java installed.
A step by step guide to getting the Eclipse IDE installed on your windows computer. If you are not using windows, you can still complete this course by following another guide to get Eclipse installed on the operating system of your choice. You can also use any other IDE that you're familiar with. You can freely skip this video if you already have an IDE installed.
This video will go over creating your first "hello world" project in Eclipse. If you're already familiar with setting up a project in your IDE, go ahead and skip this video.
Structure of an API call
A very quick overview of what REST means.
Description of the 4 HTTP verbs that we will cover in this course.
A discussion about the structure of a URL, and writing code to help us generate our URLs.
An explanation of what request headers are.
We write some code that will actually connect to our first API. This API is publicly available data, and therefore requires no authentication.
We will connect to Nasa's API with API key authentication.
We will connect to Pivotal Tracker, a project management software system with Basic Authentication.
After you finish this lesson, you will notice we re-used a lot of code. Spend some time figuring out how you can make those pieces re-usable.
During this lesson we will connect to Asana using OAuth authentication.
After you finish this lesson, write some additional classes to get data from the tasks you've added to Asana.
Handling Responses and Nuances of APIs
Good error handling is a must.
APIs are always changing. While some API providers do a great job of documenting their API versions and changes, not all do.
This means that the Code you write needs to be flexible and capable of handling exceptions that might occur.
We cover response headers that are returned with an API response, and handling API rate limits. After this lesson is finished, see if you can pace your calls to the NASA API so that you could have a regularly updating website without going over your API rate limit.