Tutorial: Build a Public Holidays app
First step in building the challenge is to inspect the OpenHolidaysAPI.
What is the API request we need to make to retrieve the list of holidays for a country?
When we go to the OpenHolidays API page, we can see we can try out the API, so let's do that:

This opens a Swagger API documentation website - which lists all available endpoints and details about what parameters they expect, while also allowing us to send requests and try out the endpoints.

The first endpoint listed is a GET
request to /PublicHolidays
. If you click "Try it out", the fields become editable and we can try out the request!
For testing purposes, let's request the holidays for The Netherlands (country code NL), in English (EN), for the current year:

After we press "Execute", we can see the response:

With the sample JSON in hand, we can start building the app to display the holidays returned by the API.
Unlock access to the full exercise solution
Exercise solutions are available to paying subscribers only.
Unlock solutions to all the challenges by subscribing below.
Not sure what to expect from the solutions?
Check out this
free "Restaurant Reservation Widget" tutorial
to see if you like it.
All solutions come with:
- detailed breakdown of each step
- screenshots
- code samples
- full working source code