项目作者: JohnnyTheTank

项目描述 :
AngularJS Factory for Flickr JSON REST API requests
高级语言: JavaScript
项目地址: git://github.com/JohnnyTheTank/angular-flickr-api-factory.git
创建时间: 2015-12-13T00:10:11Z
项目社区:https://github.com/JohnnyTheTank/angular-flickr-api-factory

开源协议:MIT License

下载


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:
      1. <script src="bower_components/angular-flickr-api-factory/dist/angular-flickr-api-factory.min.js"></script>
    2. When using npm:
      1. <script src="node_modules/angular-flickr-api-factory/dist/angular-flickr-api-factory.min.js"></script>
    3. when using downloaded files
      1. <script src="angular-flickr-api-factory.min.js"></script>
  4. Use the factory flickrFactory

factory methods

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

Flickr JSONP API

More angular-api-factories

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

License

MIT