Awesome
angular-flickr-api-factory is an angularjs module with a flickr api factory.
Author: Jonathan Hornung (JohnnyTheTank)
Usage
- Install via either bower, npm or downloaded files:
bower install --save angular-flickr-api-factory
npm install --save angular-flickr-api-factory
- download angular-flickr-api-factory.zip
- Add
jtt_flickr
to your application's module dependencies. - Include dependencies in your HTML.
- When using bower:
<script src="bower_components/angular-flickr-api-factory/dist/angular-flickr-api-factory.min.js"></script>
- When using npm:
<script src="node_modules/angular-flickr-api-factory/dist/angular-flickr-api-factory.min.js"></script>
- when using downloaded files
<script src="angular-flickr-api-factory.min.js"></script>
- 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
- Docs: https://www.flickr.com/services/feeds/docs/photos_public/
- API Playground: https://apigee.com/console/flickr
- Flickr Username Converter: http://idgettr.com/
More angular-api-factories
bandsintown - dailymotion - facebook - flickr - footballdata - github - openweathermap - tumblr - vimeo - wikipedia - youtube
License
MIT