VIDEOS API WRAPPER
const { VideosApiClient } = require('@youon/videos-api-wrapper');
import { VideosApiClient } from '@youon/videos-api-wrapper';
const endpoints = new VideosApiClient("host",1,"key","token");
Initial config
these params are passed in the constructor of VideoApiClient
Param | Description |
---|---|
Host | Api Host endpoint |
Version | Api Version |
apiKey | Api Key Available on Accounts APP |
apiToken | Api Token Available on Accounts APP |
Methods
getChannels(params = null)
getChannelsByTag(iso, tag, params = null)
getChannel(channelId, params = null)
getPlaylists(channelId, params = null)
getPlaylist(channelId, playlistId, params = null)
getPlaylistVideos(channelId, playlistId, params = null)
getPlaylistLatestVideos(channelId, playlistId, params = null)
getVideo(channelId, playlistId, videoId, params = null)
getChannelVideos(channelId, params = null)
Params
the params argument is an object that is transformed into a query
type Params = {[key:string]:any}
{
ids : 'tags,video.tags',
iso : 'pt',
tag: 'programa'
}
//"ids=tags,video.tags&iso=pt&tag=programa"
URI | Description | Query parameters | Notes |
---|---|---|---|
getChannels(params = null) | Return a Channel list | ids=tags&iso=<ISO_LANGUAGE>&order_by=position&order=asc | desc |
getChannelsByTag(iso, tag, params = null) | Return a Channel List by tag | iso=<ISO_LANGUAGE>&tag=<TAG_SLUG>&ids=... | |
getChannel(channelId, params = null) | Show information about a Channel | ids=tags&iso=<ISO_LANGUAGE> | |
getPlaylists(channelId, params = null) | Return a Playlist list inside a Channel | iso=<ISO_LANGUAGE>&order_by=position&order=asc | desc |
getChannelVideos(channelId, params = null) | Return a Videos list inside a Channel | ids=profile.tags, playlists, profile.metadata, profile.assets, profile.albums, profile.body, video.versions, labels&order_by=position | title |
getPlaylist(channelId, playlistId, params = null) | Show information about a Playlist inside a Channel | iso=<ISO_LANGUAGE> | |
getPlaylistVideos(channelId, playlistId, params = null) | Return a Video lists inside a Playlist Channel | iso=<ISO_LANGUAGE>&ids=profile.tags, playlists, profile.metadata, profile.assets, profile.albums, profile.body, video.versions, labels&order_by=position | title |
getVideo(channelId, playlistId, videoId, params = null) | Show information about a Video | iso=<ISO_LANGUAGE>&ids=profile.tags, playlists, profile.metadata, profile.assets, profile.albums, profile.body, labels | |
getPlaylistLatestVideos(channelId, playlistId, params = null) | Latest videos | ids=profile.tags, playlists, profile.metadata, profile.assets, profile.albums, profile.body, video.versions, labels&order_by=position | title |