Skip to content

Latest commit

 

History

History
105 lines (88 loc) · 4.25 KB

README.md

File metadata and controls

105 lines (88 loc) · 4.25 KB

angular-dailymotion-api-factory is an angularjs module with a dailymotion api factory.

npm version Bower version

Author: Jonathan Hornung (JohnnyTheTank)

Usage

  1. Install via either bower, npm or downloaded files:
    1. bower install --save angular-dailymotion-api-factory
    2. npm install --save angular-dailymotion-api-factory
    3. download angular-dailymotion-api-factory.zip
  2. Add jtt_dailymotion to your application's module dependencies.
  3. Include dependencies in your HTML.
    1. When using bower:
    <script src="bower_components/angular-dailymotion-api-factory/dist/angular-dailymotion-api-factory.min.js"></script>
    1. When using npm:
    <script src="node_modules/angular-dailymotion-api-factory/dist/angular-dailymotion-api-factory.min.js"></script>
    1. when using downloaded files
    <script src="angular-dailymotion-api-factory.min.js"></script>
  4. Use the factory dailymotionFactory

factory methods

getVideos

getVideosFromUserById

Get all parameters here

// all parameters: https://developer.dailymotion.com/tools/apiexplorer#/user/videos/list
dailymotionFactory.getVideosFromUserById({
    id:"<USER_ID>",
    search:"<SEARCH_TERM>", // (optional)
    limit:"<LIMIT>", // (optional) valid values: 1-100 | default: 10
}).then(function(_data){
    //on success
}).catch(function (_data) {
    //on error
});
getVideosFromChannelById

Get all parameters here

// all parameters: https://developer.dailymotion.com/tools/apiexplorer#/channel/videos/list
dailymotionFactory.getVideosFromChannelById({
    id:"<CHANNEL_ID>",
    search:"<SEARCH_TERM>", // (optional)
    limit:"<LIMIT>", // (optional) valid values: 1-100 | default: 10
}).then(function(_data){
    //on success
}).catch(function (_data) {
    //on error
});
getVideosFromPlaylistById

Get all parameters here

// all parameters: https://developer.dailymotion.com/tools/apiexplorer#/playlist/videos/list
dailymotionFactory.getVideosFromPlaylistById({
    id:"<PLAYLIST_ID>",
    limit:"<LIMIT>", // (optional) valid values: 1-100 | default: 10
}).then(function(_data){
    //on success
}).catch(function (_data) {
    //on error
});
getVideosByParams

Get all parameters here

// all parameters: https://developer.dailymotion.com/tools/apiexplorer#/video/list
dailymotionFactory.getVideosByParams({
    search:"<SEARCH_TERM>", // (optional)
    tags:"<TAGS>", // (optinal)
    limit:"<LIMIT>", // (optional) valid values: 1-100 | default: 10
}).then(function(_data){
    //on success
}).catch(function (_data) {
    //on error
});

Dailymotion JSON API

More angular-api-factories

bandsintown - dailymotion - facebook - flickr - footballdata - github - openweathermap - tumblr - vimeo - wikipedia - youtube

License

MIT