Reputation: 35
I'd like to get all Vimeo's videos from a channel.
I looked to the Vimeo API, created a key for my app but I found no simple method to get all videos with for example the id of the channel...
How to do that ?
Thx.
Upvotes: 1
Views: 9718
Reputation: 151
The answer above is correct, but I found myself looking for a solution on how to get the channel id.
There two options(that I found) to get the channel id
vimeo.config.channel.id
and it will return the id of the channel.
\"channel\"\:\{\"id\"\:\"(\d*)\"
It's taking the following part from the tag
vimeo.config = _extend((vimeo.config || {}), {"channel":{"id":"164226","url":"\/channels\/fenwn"},"sticky_topnav":{"excluded_pages":["Vimeo\\Controller\\AboutController:main","Vimeo\\Controller\\AboutController:profe
Upvotes: 1
Reputation: 3018
To get the list of videos in a channel, make an authenticated GET request to https://api.vimeo.com/channels/[channel_id]/videos
. The endpoint documentation can be found here: https://developer.vimeo.com/api/reference/channels#GET/channels/{channel_id}/videos
If you don't know the channel_id of a channel, you can substitute the id with the custom url of the channel. For instance, with the Staff Picks channel at https://vimeo.com/channels/staffpicks, make an authenticated GET request to https://api.vimeo.com/channels/staffpicks
That said, it's best practice to use the channel_id instead of the shortcut url name wherever possible. The Staff Picks channel, for example, returns "uri":"/channels/927"
Upvotes: 4