Dittofi
Search…
Vimeo
What is Vimeo and how to integrate it into your Dittofi app.
The Vimeo API allows you to integrate videos, live streaming, in depth video analytics and much more into your app. For a complete list of services offered by Vimeo, head over to https://developer.vimeo.com/.
In this tutorial we are going to look integrating with Vimeo to retrieve all videos for an account. To do this we will look at:
  1. 1.
    Vimeo API reference
  2. 2.
    Build Vimeo web service inside Dittofi
  3. 3.
    Link the Get Videos endpoint to an action and event inside Dittofi

Step 1. Vimeo API reference

Step 1 of using the Vimeo API is to familiarize yourself with the Vimeo API reference. This can be found at https://developer.vimeo.com/api/reference, as shown below.
In the API documentation we are able to find (1) the base URL which is api.vimeo.com and (2) the protocol used by the API, the protocol is HTTPS. This will be needed later on.
Next, we want to know what functionality is offered by the Vimeo API. To see this, we need to find the list of endpoints that are offered by the API and, descriptions of what those endpoints each do. You can find these in the reference docs (as of May 2022, these are in the links on the left hand side of the page)
If you do a little bit of exploring, you will find that there is a lot of functionality offered by the Vimeo API and all of this functionality can be integrated into your Dittofi app.
We will show you how to integrate your Dittofi app with the following endpoint, used to get all the videos that a logged in user has uploaded, shown below. The principle is the same for all of the endpoints offered by Vimeo.

Step 2. Build Vimeo web service inside Dittofi

To integrate Vimeo into your Dittofi app, you need to start by (1) creating an app in the Dittofi Design Studio and (2) heading over to the Web Services tab as shown below.
Once you are inside the Web Services tab, you can create a new Vimeo Web Service by first clicking on
and second, filling in the Basic options in your Web Service as shown below.
NOTE
  • Name can be anything, here we call it Vimeo.
  • Protocol is HTTPS as it says in the API reference doc
  • Host is api.vimeo.com as it says in the API reference doc
  • Description is a link to the API reference docs which is useful if you need to quickly access the docs in the future.
Next, we need to start adding the Vimeo endpoints (the bits of Vimeo functionality) that we actually want to integrate with on the right hand side of our Vimeo Web Service. As shown below.
Note, we added the Endpoint, getUserVideos with the Path /users/{user_id}/videos/ by clicking on
and filling in the form, as below.
Basic options and content-types.
Variables.
NOTE
The Resp. Variable (response variable) is of type Custom Model. The reason we use a Custom Model is that the variable will need to store the data that comes back from the Vimeo API.
The Custom Model can be created from within the Custom Models tab, which is below the tools icon as shown below.
Next click on
and
, give your Custom Model a name and save it.
You can then add the attributes that you want to use from the Vimeo API response for example below we add total (of Kind Number) and page (of Kind Number) on the right hand side of our Custom Model.
Inside your Vimeo Web Service you will then have the Resp. Variable set as having the data structure vimeoVideo that we just created.
By itself your Vimeo Web Service is doing nothing. It is just sitting there waiting to run. To actually run it we need to create an Endpoint and Action that will trigger the Web Service and make sure that the Variable information such as Authentication, user_id and so on are correctly set.
To do this, we come over first to the Endpoints tab and create an endpoint called "Run Vimeo Web Service" as below.
To keep things simple for now, we do not pass any information that is required by our Vimeo Web Service such as user_id into our endpoint. For now we will just hard code it inside our action.
Lastly, we configure an action called "Run Vimeo Web Service" from inside our Actions tab, link the endpoint trigger event to our Run Vimeo Web Services Endpoint and add the HTTP Request event, as shown below.
NOTE
The HTTP request data inputs can either be variables passed in dynamically from your endpoint OR they can be set within your action OR they can be set within the Global Variables tab.
Once you've configured the HTTP request event, you can build your code and test it. You will see that inside your endpoint response, you'll get data for the two fields that we added into our vimeoVideo Custom Model.