diff --git a/README.md b/README.md index 310e87f..c979847 100644 --- a/README.md +++ b/README.md @@ -31,6 +31,12 @@ Bing.images("Ninja Turtles", function(error, res, body){ console.log(body); }, {skip: 50}); ``` +Adding filter(s) for the Image Search +```js +Bing.images("Ninja Turtles", function(error, res, body){ + console.log(body); +}, {imagefilters: 'Size:Small+Color:Monochrome'}); +``` ##### Specify Market Getting spanish results: diff --git a/lib/bing.js b/lib/bing.js index f545393..f9c52e5 100644 --- a/lib/bing.js +++ b/lib/bing.js @@ -62,7 +62,10 @@ var Bing = function( options ) { + qs.stringify({ "Query": "'" + query + "'" }) + "&$top=" + opts.top + "&$skip=" + opts.skip - + (opts.market ? "&Market=%27" + opts.market + "%27" : ''); + + (opts.market ? "&Market=%27" + opts.market + "%27" : '') + + (opts.imagefilters + ? '&' + qs.stringify({ "ImageFilters": "'" + opts.imagefilters + "'" }) + : ''); request({ uri: reqUri,