Skip to content

Latest commit

 

History

History
123 lines (107 loc) · 4.63 KB

README.md

File metadata and controls

123 lines (107 loc) · 4.63 KB

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

npm version Bower version

Author: Jonathan Hornung (JohnnyTheTank)

Usage

  1. Install via either bower, npm 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
  2. Add jtt_vimeo to your application's module dependencies.
  3. Include dependencies in your HTML.
    1. When using bower:
    <script src="bower_components/angular-vimeo-api-factory/dist/angular-vimeo-api-factory.min.js"></script>
    1. When using npm:
    <script src="node_modules/angular-vimeo-api-factory/dist/angular-vimeo-api-factory.min.js"></script>
    1. when using downloaded files
    <script src="angular-vimeo-api-factory.min.js"></script>
  4. 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

More angular-api-factories

bandsintown - dailymotion - facebook - flickr - footballdata - github - openweathermap - tumblr - vimeo - wikipedia - youtube

License

MIT