https://github.com/johnnythetank/angular-vimeo-api-factory
AngularJS factory for Vimeo JSON REST API requests
https://github.com/johnnythetank/angular-vimeo-api-factory
angular angular-factory angularjs api factory vimeo vimeo-api
Last synced: 9 months ago
JSON representation
AngularJS factory for Vimeo JSON REST API requests
- Host: GitHub
- URL: https://github.com/johnnythetank/angular-vimeo-api-factory
- Owner: JohnnyTheTank
- License: mit
- Created: 2015-12-05T03:26:19.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2016-06-21T00:30:58.000Z (almost 10 years ago)
- Last Synced: 2024-11-19T06:17:02.204Z (over 1 year ago)
- Topics: angular, angular-factory, angularjs, api, factory, vimeo, vimeo-api
- Language: JavaScript
- Size: 15.6 KB
- Stars: 6
- Watchers: 2
- Forks: 3
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
**angular-vimeo-api-factory** is an angularjs module with a vimeo api factory.
[](https://badge.fury.io/js/angular-vimeo-api-factory)
[](https://badge.fury.io/bo/angular-vimeo-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-vimeo-api-factory`
2. `npm install --save angular-vimeo-api-factory`
3. download [angular-vimeo-api-factory.zip](https://github.com/JohnnyTheTank/angular-vimeo-api-factory/zipball/master)
2. Add `jtt_vimeo` 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 `vimeoFactory`
### factory methods
#### getVideos
##### getVideosFromChannel
```js
// parameters: https://developer.vimeo.com/api/endpoints/channels#/{channel_id}/videos
vimeoFactory.getVideosFromChannel({
channel:"",
per_page:"", // (optional) valid values: 1-50 | default: 25
page:"", // (optional)
query:"", // (optional)
filter:"", // (optional)
filter_embeddable:"", // (optional)
sort:"", // (optional)
direction:"", // (optional)
access_token:""
}).then(function(_data){
//on success
}).catch(function (_data) {
//on error
});
```
##### getVideosFromUser
```js
// parameters: https://developer.vimeo.com/api/endpoints/users#/{user_id}/videos
vimeoFactory.getVideosFromUser({
user:"",
per_page:"", // (optional) valid values: 1-50 | default: 25
page:"", // (optional)
query:"", // (optional)
filter:"", // (optional)
filter_embeddable:"", // (optional)
sort:"", // (optional)
direction:"", // (optional)
access_token:""
}).then(function(_data){
//on success
}).catch(function (_data) {
//on error
});
```
##### getVideosFromCategory
```js
// parameters: https://developer.vimeo.com/api/endpoints/categories#/{category}/videos
vimeoFactory.getVideosFromCategory({
category:"",
per_page:"", // (optional) valid values: 1-50 | default: 25
page:"", // (optional)
query:"", // (optional)
filter:"", // (optional)
filter_embeddable:"", // (optional)
sort:"", // (optional)
direction:"", // (optional)
access_token:""
}).then(function(_data){
//on success
}).catch(function (_data) {
//on error
});
```
##### getVideosFromTag
```js
// parameters: https://developer.vimeo.com/api/endpoints/tags#/{word}/videos
vimeoFactory.getVideosFromTag({
tag:"",
per_page:"", // (optional) valid values: 1-50 | default: 25
page:"", // (optional)
query:"", // (optional)
sort:"", // (optional)
direction:"", // (optional)
access_token:""
}).then(function(_data){
//on success
}).catch(function (_data) {
//on error
});
```
## Vimeo JSON API
* docs: https://developer.vimeo.com/api/endpoints/
* api playground: https://developer.vimeo.com/api/playground/
## More angular-api-factories
[bandsintown](https://github.com/JohnnyTheTank/angular-bandsintown-api-factory) - [dailymotion](https://github.com/JohnnyTheTank/angular-dailymotion-api-factory) - [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** - [wikipedia](https://github.com/JohnnyTheTank/angular-wikipedia-api-factory) - [youtube](https://github.com/JohnnyTheTank/angular-youtube-api-factory)
## License
MIT