Demo Application
Learn how to build a functional Django application using Vimeo APIs.
We'll cover the following
This lesson walks us through a Django application that is integrated with Vimeo APIs. We used the following endpoints in the application workflow:
- Get categories
- Get all channels in a category
- Get all groups in a category
- Follow/unfollow a category
- Search videos
Workflow and APIs
Let’s dive into the code and see how we’ve integrated different Vimeo APIs into our Django application. We can see the contents of the "views.py" file in the widget below. Let’s discuss it line-by-line:
- Lines 5–8: We define the
headers
object for app authentication. - Lines 10–16: We define the
index
function that makes a call tocategories
endpoint to retrieve all the categories. - Lines 18–28: We use the
search
function to make a video search based on a query entered by a user. - Lines 30–33: We define the
getVideosOfCategory
function to retrieve videos from a specific category. - Lines 35–45: We make an API call to get a specific category.
- Lines 47–54: We define the
channels
function that returns all the channels in a category. - Lines 56–63: We define a
groups
method to get all the groups in the category. - Lines 65–77: We define a
follow
function that performs the “follow/unfollow a category” functionality.
Demo
Click the “Run” button in the widget below to start the application. Once the server gets started, click the URL next to “Your app can be found at:” to view the application in the new tab.
Note: The following widget shows only the required files to explain the Vimeo APIs.
Get hands-on with 1400+ tech skills courses.