1.0.4 • Published 8 years ago

bing-image-of-the-day v1.0.4

Weekly downloads
3
License
MIT
Repository
github
Last release
8 years ago

bing-image-of-the-day

travis build version downloads MIT license

Gets the urls from the bing's images of the day

Install

$ npm install bing-image-of-the-day

Example

var bingImg = require('bing-image-of-the-day');

// gets the raw object returned by the bing's image of the day service
bingImg.getRaw(
  1,                // [n=1] - How many images to return.
  bingImg.MKT.enUS, // [mkt='en-US'] - Tells which of the 8 markets Bing is available for you would like images from.
  0,                // [idx=0] - Tells where you want start from. 0 would start at the current day, 1 the previous day, etc.
  'js'              // [format='js'] - Set the format in which the data will be return.
  ).
  then(res => console.log(res)).
  catch(err => console.log(err));

// gets an array with the image's urls.
bingImg.getUrls(
  1,                // [n=1] - How many images to return.
  bingImg.MKT.enUS, // [mkt='en-US'] - Tells which of the 8 markets Bing is available for you would like images from.
  0,                // [idx=0] - Tells where you want start from. 0 would start at the current day, 1 the previous day, etc.
  'js'              // [format='js'] - Set the format in which the data will be return.
  ).
  then(res => console.log(res)).
  catch(err => console.log(err));

// download the images
bingImg.download(
  '.',              // [log='.'] - Location in which the images will be saved.
  1,                // [n=1] - How many images to return.
  bingImg.MKT.enUS, // [mkt='en-US'] - Tells which of the 8 markets Bing is available for you would like images from.
  0,                // [idx=0] - Tells where you want start from. 0 would start at the current day, 1 the previous day, etc.
  'js'              // [format='js'] - Set the format in which the data will be return.
  ).
  then(res => console.log(res)).
  catch(err => console.log(err));
1.0.4

8 years ago

1.0.3

8 years ago

1.0.2

8 years ago

1.0.1

8 years ago

0.2.0

8 years ago

0.1.3

8 years ago

0.1.1

8 years ago

0.1.0

8 years ago