Skip to content

JohnnyTheTank/angular-flickr-api-factory

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

angular-flickr-api-factory is an angularjs module with a flickr 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-flickr-api-factory
    2. npm install --save angular-flickr-api-factory
    3. download angular-flickr-api-factory.zip
  2. Add jtt_flickr to your application's module dependencies.
  3. Include dependencies in your HTML.
    1. When using bower:
    <script src="bower_components/angular-flickr-api-factory/dist/angular-flickr-api-factory.min.js"></script>
    1. When using npm:
    <script src="node_modules/angular-flickr-api-factory/dist/angular-flickr-api-factory.min.js"></script>
    1. when using downloaded files
    <script src="angular-flickr-api-factory.min.js"></script>
  4. Use the factory flickrFactory

factory methods

flickrFactory.getImagesFromUserById({
    id:"<USER_ID>", // username converter: http://idgettr.com/
    lang:"<LANGUAGE>", // (optional) https://www.flickr.com/services/feeds/
}).then(function(_data){
    //on success
}).catch(function (_data) {
    //on error
});
flickrFactory.getImagesFromUserById({
    ids:"<USER_ID_1>,<USER_ID_2>", // username converter: http://idgettr.com/
    lang:"<LANGUAGE>", // (optional) https://www.flickr.com/services/feeds/
}).then(function(_data){
    //on success
}).catch(function (_data) {
    //on error
});
flickrFactory.getImagesByTags({
    tags:"<TAG_1>,<TAG_2>",
    tagmode:"<TAG_MODE>", // (optional) Control whether items must have ALL the tags (tagmode=all), or ANY (tagmode=any) of the tags. Default is ALL.
    lang:"<LANGUAGE>", // (optional) https://www.flickr.com/services/feeds/
}).then(function(_data){
    //on success
}).catch(function (_data) {
    //on error
});

Flickr JSONP API

More angular-api-factories

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

License

MIT