Alias Bing.search to Bing.web

This commit is contained in:
goferito 2015-03-08 14:30:56 +01:00
parent 7133f9343e
commit 87650a37f6
2 changed files with 6 additions and 2 deletions

View file

@ -16,7 +16,7 @@ var Bing = require('node-bing-api')({ accKey: "your-account-key" });
##### Web Search: ##### Web Search:
```js ```js
Bing.search("Pizza", function(error, res, body){ Bing.web("Pizza", function(error, res, body){
console.log(body); console.log(body);
}, },
{ {

View file

@ -119,10 +119,14 @@ var Bing = function( options ) {
* userAgent, reqTimeout, top, skip * userAgent, reqTimeout, top, skip
* @function * @function
*/ */
Bing.prototype.search = function(query, callback, options) { Bing.prototype.web = function(query, callback, options) {
this.searchVertical(query, "Web", callback, options); this.searchVertical(query, "Web", callback, options);
}; };
// Alias Bing.search to Bing.web
// Note: Keep this for compatibility with older versions
Bing.prototype.search = Bing.prototype.web;
/** /**
* Performs a Bing search in the Images vertical. * Performs a Bing search in the Images vertical.