Added settings for source type
This commit is contained in:
parent
e15ccb5510
commit
1aa77581a4
2 changed files with 5 additions and 1 deletions
|
@ -21,7 +21,9 @@ Bing.web("Pizza", function(error, res, body){
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
top: 10, // Number of results (max 50)
|
top: 10, // Number of results (max 50)
|
||||||
skip: 3 // Skip first 3 results
|
skip: 3, // Skip first 3 results
|
||||||
|
sources: "web+news", //Choises are web+image+video+news+spell
|
||||||
|
newssortby: "Date" //Choices are Date, Relevance
|
||||||
});
|
});
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
|
@ -62,6 +62,8 @@ var Bing = function( options ) {
|
||||||
+ qs.stringify({ "Query": "'" + query + "'" })
|
+ qs.stringify({ "Query": "'" + query + "'" })
|
||||||
+ "&$top=" + opts.top
|
+ "&$top=" + opts.top
|
||||||
+ "&$skip=" + opts.skip
|
+ "&$skip=" + opts.skip
|
||||||
|
+ (opts.sources ? "&Sources=%27" + opts.sources + "%27" : '')
|
||||||
|
+ (opts.newssortby ? "&NewsSortBy=%27" + opts.newssortby + "%27" : '')
|
||||||
+ (opts.market ? "&Market=%27" + opts.market + "%27" : '')
|
+ (opts.market ? "&Market=%27" + opts.market + "%27" : '')
|
||||||
+ (opts.adult ? "&Adult=%27" + opts.adult + "%27" : '')
|
+ (opts.adult ? "&Adult=%27" + opts.adult + "%27" : '')
|
||||||
+ (opts.imagefilters
|
+ (opts.imagefilters
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue