Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/johnnythetank/angular-dailymotion-api-factory
AngularJS factory for Dailymotion JSON REST API requests
https://github.com/johnnythetank/angular-dailymotion-api-factory
angular angular-factory angularjs dailymotion dailymotion-api factory
Last synced: 13 days ago
JSON representation
AngularJS factory for Dailymotion JSON REST API requests
- Host: GitHub
- URL: https://github.com/johnnythetank/angular-dailymotion-api-factory
- Owner: JohnnyTheTank
- License: mit
- Created: 2015-12-22T15:49:51.000Z (almost 9 years ago)
- Default Branch: master
- Last Pushed: 2016-06-21T00:36:09.000Z (over 8 years ago)
- Last Synced: 2024-10-16T06:31:10.282Z (28 days ago)
- Topics: angular, angular-factory, angularjs, dailymotion, dailymotion-api, factory
- Language: JavaScript
- Size: 11.7 KB
- Stars: 3
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
**angular-dailymotion-api-factory** is an angularjs module with a dailymotion api factory.
[![npm version](https://badge.fury.io/js/angular-dailymotion-api-factory.svg)](https://badge.fury.io/js/angular-dailymotion-api-factory)
[![Bower version](https://badge.fury.io/bo/angular-dailymotion-api-factory.svg)](https://badge.fury.io/bo/angular-dailymotion-api-factory)Author: Jonathan Hornung ([JohnnyTheTank](https://github.com/JohnnyTheTank))
## Usage
1. Install via either [bower](http://bower.io/), [npm](https://www.npmjs.com/) 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](https://github.com/JohnnyTheTank/angular-dailymotion-api-factory/zipball/master)
2. Add `jtt_dailymotion` to your application's module dependencies.
3. Include dependencies in your HTML.
1. When using bower:
```html
```
2. When using npm:
```html
```
3. when using downloaded files
```html
```
4. Use the factory `dailymotionFactory`### factory methods
#### getVideos
##### getVideosFromUserById
Get all parameters [here](https://developer.dailymotion.com/tools/apiexplorer#/user/videos/list)
```js
// all parameters: https://developer.dailymotion.com/tools/apiexplorer#/user/videos/list
dailymotionFactory.getVideosFromUserById({
id:"",
search:"", // (optional)
limit:"", // (optional) valid values: 1-100 | default: 10
}).then(function(_data){
//on success
}).catch(function (_data) {
//on error
});
```##### getVideosFromChannelById
Get all parameters [here](https://developer.dailymotion.com/tools/apiexplorer#/channel/videos/list)
```js
// all parameters: https://developer.dailymotion.com/tools/apiexplorer#/channel/videos/list
dailymotionFactory.getVideosFromChannelById({
id:"",
search:"", // (optional)
limit:"", // (optional) valid values: 1-100 | default: 10
}).then(function(_data){
//on success
}).catch(function (_data) {
//on error
});
```##### getVideosFromPlaylistById
Get all parameters [here](https://developer.dailymotion.com/tools/apiexplorer#/playlist/videos/list)
```js
// all parameters: https://developer.dailymotion.com/tools/apiexplorer#/playlist/videos/list
dailymotionFactory.getVideosFromPlaylistById({
id:"",
limit:"", // (optional) valid values: 1-100 | default: 10
}).then(function(_data){
//on success
}).catch(function (_data) {
//on error
});
```##### getVideosByParams
Get all parameters [here](https://developer.dailymotion.com/tools/apiexplorer#/video/list)
```js
// all parameters: https://developer.dailymotion.com/tools/apiexplorer#/video/list
dailymotionFactory.getVideosByParams({
search:"", // (optional)
tags:"", // (optinal)
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](https://github.com/JohnnyTheTank/angular-bandsintown-api-factory) - **dailymotion** - [facebook](https://github.com/JohnnyTheTank/angular-facebook-api-factory) - [flickr](https://github.com/JohnnyTheTank/angular-flickr-api-factory) - [footballdata](https://github.com/JohnnyTheTank/angular-footballdata-api-factory) - [github](https://github.com/JohnnyTheTank/angular-github-api-factory) - [openweathermap](https://github.com/JohnnyTheTank/angular-openweathermap-api-factory) - [tumblr](https://github.com/JohnnyTheTank/angular-tumblr-api-factory) - [vimeo](https://github.com/JohnnyTheTank/angular-vimeo-api-factory) - [wikipedia](https://github.com/JohnnyTheTank/angular-wikipedia-api-factory) - [youtube](https://github.com/JohnnyTheTank/angular-youtube-api-factory)## License
MIT