Skip to content

npm-flickr/flickr-photo-urls

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

flickr-photo-urls

Get source urls with varied sizes of a Flickr photo

Install

$ npm install flickr-photo-urls

Usage

var urls = require('flickr-photo-urls')({
  key: 'api-key'
})

urls('14321741011', function (error, result) {
  if (error) return callback(error);

  result.square
  // => { "label": "Square", "width": 75, "height": 75, "source": "https:\/\/farm3.staticflickr.com\/2922\/14321741011_aeb3b41d62_s.jpg", "url": "https:\/\/www.flickr.com\/photos\/azer\/14321741011\/sizes\/sq\/", "photo": true }

  result.large2048
  // => { "label": "Large 2048", "width": 2048, "height": 1365, "source": "https:\/\/farm3.staticflickr.com\/2922\/14321741011_3c581b37ec_k.jpg", "url": "https:\/\/www.flickr.com\/photos\/azer\/14321741011\/sizes\/k\/", "photo": true }
})

See test.js for more info.

flickr-client can be passed to avoid repeating auth options:

var client = require('flickr-client')({
  key: 'api-key'
});

var urls = require('flickr-photo-urls')(client)

About

Get source urls with varied sizes of a Flickr photo

Resources

Stars

Watchers

Forks

Packages

No packages published