Demo Application
Learn how to integrate different endpoints of the Dailymotion Data API with the help of a React application.
We'll cover the following
This lesson walks us through a React application that integrates Dailymotion Data API. We'll use the endpoints related to the following operations in the application:
Retrieving videos
Retrieving playlists and videos
Retrieving channels and videos
Application workflow
Click the “Run” button in the widget below to run the application. Once the application has started, click the URL against “Your app can be found at:” to view the application.
After running the code below, the home page shows some videos from the Dailymotion website that we can play and watch.
The playlist page displays the list of playlists. We can also retrieve a specific playlist by clicking it.
The channel page displays the channel’s ID, name, and description. We can retrieve videos of a specific channel by clicking the channel's ID.
Note: We use a custom hook,
useFetch
, defined inuseFetch.js
to fetch the data from any API endpoint.Please use this lesson in the appendix to refresh the access token.
Get hands-on with 1200+ tech skills courses.