From the course: Programming Foundations: APIs and Web Services

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

Consume a RESTful API

Consume a RESTful API

From the course: Programming Foundations: APIs and Web Services

Start my 1-month free trial

Consume a RESTful API

- [Instructor] In this demo, I will show you how to consume a publicly accessible restful API that tells programming jokes. I will also show you how to integrate this API into a mobile application, developed using iOS and SWIP. So first, let's look at the documentation on the programming jokes API. Notice there are two endpoints. The first endpoint returns one random joke, and the second endpoint returns 10 random jokes. For our use case, we will just grab one random joke. So now let's demo this fun application. So I've opened the code in X code, and I've launched the application, and I'm looking at the simulator here. To get a joke, click for a joke, you see the joke, and then the punchline will appear. So now let's review the public API. So let's go back to Chrome. And we are going to click on the grab a random joke link. And notice here we have an example indication of the API. So notice this is the URL and as a side note, a URL is the web address of an online resource and it has…

Contents