An open API service indexing awesome lists of open source software.

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

Awesome Lists containing this project

README

          

**angular-vimeo-api-factory** is an angularjs module with a vimeo api factory.

[![npm version](https://badge.fury.io/js/angular-vimeo-api-factory.svg)](https://badge.fury.io/js/angular-vimeo-api-factory)
[![Bower version](https://badge.fury.io/bo/angular-vimeo-api-factory.svg)](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