angular-vimeo-api-factory
v0.5.2
Published
angularjs factory for vimeo json rest api requests
Downloads
1
Maintainers
Readme
angular-vimeo-api-factory is an angularjs module with a vimeo api factory.
Author: Jonathan Hornung (JohnnyTheTank)
Usage
- Install via either bower, npm or downloaded files:
bower install --save angular-vimeo-api-factory
npm install --save angular-vimeo-api-factory
- download angular-vimeo-api-factory.zip
- Add
jtt_vimeo
to your application's module dependencies. - Include dependencies in your HTML.
- When using bower:
<script src="bower_components/angular-vimeo-api-factory/src/angular-vimeo-api-factory.min.js"></script>
- When using npm:
<script src="node_modules/angular-vimeo-api-factory/src/angular-vimeo-api-factory.min.js"></script>
- when using downloaded files
<script src="angular-vimeo-api-factory.min.js"></script>
- Use the factory
vimeoFactory
factory methods
getVideos
getVideosFromChannel
// parameters: https://developer.vimeo.com/api/endpoints/channels#/{channel_id}/videos
vimeoFactory.getVideosFromChannel({
channel:"<CHANNEL_NAME>",
per_page:"<ITEMS_PER_PAGE>", // (optional) valid values: 1-50 | default: 25
page:"<PAGE_NUMBER>", // (optional)
query:"<QUERY>", // (optional)
filter:"<FILTER>", // (optional)
filter_embeddable:"<FILTER_EMBEDDABLE>", // (optional)
sort:"<SORT>", // (optional)
direction:"<DIRECTION>", // (optional)
access_token:"<ACCESS_TOKEN>"
}).then(function(_data){
//on success
}).catch(function (_data) {
//on error
});
getVideosFromUser
// parameters: https://developer.vimeo.com/api/endpoints/users#/{user_id}/videos
vimeoFactory.getVideosFromUser({
user:"<USER_NAME>",
per_page:"<ITEMS_PER_PAGE>", // (optional) valid values: 1-50 | default: 25
page:"<PAGE_NUMBER>", // (optional)
query:"<QUERY>", // (optional)
filter:"<FILTER>", // (optional)
filter_embeddable:"<FILTER_EMBEDDABLE>", // (optional)
sort:"<SORT>", // (optional)
direction:"<DIRECTION>", // (optional)
access_token:"<ACCESS_TOKEN>"
}).then(function(_data){
//on success
}).catch(function (_data) {
//on error
});
getVideosFromCategory
// parameters: https://developer.vimeo.com/api/endpoints/categories#/{category}/videos
vimeoFactory.getVideosFromCategory({
category:"<CATEGORY_NAME>",
per_page:"<ITEMS_PER_PAGE>", // (optional) valid values: 1-50 | default: 25
page:"<PAGE_NUMBER>", // (optional)
query:"<QUERY>", // (optional)
filter:"<FILTER>", // (optional)
filter_embeddable:"<FILTER_EMBEDDABLE>", // (optional)
sort:"<SORT>", // (optional)
direction:"<DIRECTION>", // (optional)
access_token:"<ACCESS_TOKEN>"
}).then(function(_data){
//on success
}).catch(function (_data) {
//on error
});
getVideosFromTag
// parameters: https://developer.vimeo.com/api/endpoints/tags#/{word}/videos
vimeoFactory.getVideosFromTag({
tag:"<TAG_NAME>",
per_page:"<ITEMS_PER_PAGE>", // (optional) valid values: 1-50 | default: 25
page:"<PAGE_NUMBER>", // (optional)
query:"<QUERY>", // (optional)
sort:"<SORT>", // (optional)
direction:"<DIRECTION>", // (optional)
access_token:"<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/
License
MIT