goferito / node-bing-api

Node.js module for the Bing Search API (Cognitive Services)
MIT License
56 stars 28 forks source link

Fix typo when constructing query string #27

Closed r1chard5mith closed 7 years ago

r1chard5mith commented 7 years ago

(I think) opts.offset should be opts.skip consistent with adjacent lines (and the docs)

Currently the ‘skip’ parameter doesn’t work as expected when used like this:

Bing.images("Ninja Turtles", {top:3,skip:2}, function(error, result, body){ console.log(body.value); }

or this:

Bing.images("Ninja Turtles", {top:3,offset:2}, function(error, result, body){ console.log(body.value); }

but this works:

Bing.images("Ninja Turtles", {top:3,skip:2,offset:2}, function(error, result, body){ console.log(body.value); }

goferito commented 7 years ago

Fixed in v3.2.1