0.4.2 • Published 5 years ago

@youon/videos-api-wrapper v0.4.2

Weekly downloads
1
License
MIT
Repository
-
Last release
5 years ago

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

ParamDescription
HostApi Host endpoint
VersionApi Version
apiKeyApi Key Available on Accounts APP
apiTokenApi 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"
URIDescriptionQuery parametersNotes
getChannels(params = null)Return a Channel listids=tags&iso=<ISO_LANGUAGE>&order_by=position&order=ascdesc
getChannelsByTag(iso, tag, params = null)Return a Channel List by tagiso=<ISO_LANGUAGE>&tag=<TAG_SLUG>&ids=...
getChannel(channelId, params = null)Show information about a Channelids=tags&iso=<ISO_LANGUAGE>
getPlaylists(channelId, params = null)Return a Playlist list inside a Channeliso=<ISO_LANGUAGE>&order_by=position&order=ascdesc
getChannelVideos(channelId, params = null)Return a Videos list inside a Channelids=profile.tags, playlists, profile.metadata, profile.assets, profile.albums, profile.body, video.versions, labels&order_by=positiontitleduration&order=ascdescA order_by=title so faz sentido se se passar uma iso
getPlaylist(channelId, playlistId, params = null)Show information about a Playlist inside a Channeliso=<ISO_LANGUAGE>
getPlaylistVideos(channelId, playlistId, params = null)Return a Video lists inside a Playlist Channeliso=<ISO_LANGUAGE>&ids=profile.tags, playlists, profile.metadata, profile.assets, profile.albums, profile.body, video.versions, labels&order_by=positiontitleduration&order=ascdescA order_by=title so faz sentido se se passar uma iso
getVideo(channelId, playlistId, videoId, params = null)Show information about a Videoiso=<ISO_LANGUAGE>&ids=profile.tags, playlists, profile.metadata, profile.assets, profile.albums, profile.body, labels
getPlaylistLatestVideos(channelId, playlistId, params = null)Latest videosids=profile.tags, playlists, profile.metadata, profile.assets, profile.albums, profile.body, video.versions, labels&order_by=positiontitleduration&order=ascdescA order_by=title so faz sentido se se passar uma iso
0.4.2

5 years ago

0.4.1

5 years ago

0.4.0

5 years ago

0.3.0

5 years ago

0.2.0

5 years ago

0.1.0

5 years ago