Awesome
angular-dailymotion-api-factory is an angularjs module with a dailymotion api factory.
Author: Jonathan Hornung (JohnnyTheTank)
Usage
- Install via either bower, npm or downloaded files:
bower install --save angular-dailymotion-api-factory
npm install --save angular-dailymotion-api-factory
- download angular-dailymotion-api-factory.zip
- Add
jtt_dailymotion
to your application's module dependencies. - Include dependencies in your HTML.
- When using bower:
<script src="bower_components/angular-dailymotion-api-factory/dist/angular-dailymotion-api-factory.min.js"></script>
- When using npm:
<script src="node_modules/angular-dailymotion-api-factory/dist/angular-dailymotion-api-factory.min.js"></script>
- when using downloaded files
<script src="angular-dailymotion-api-factory.min.js"></script>
- 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
- docs: https://developer.dailymotion.com/api
- api explorer: https://developer.dailymotion.com/tools/apiexplorer
More angular-api-factories
bandsintown - dailymotion - facebook - flickr - footballdata - github - openweathermap - tumblr - vimeo - wikipedia - youtube
License
MIT