diff --git a/README.md b/README.md index 43ecb0a..4614c52 100644 --- a/README.md +++ b/README.md @@ -16,7 +16,7 @@ var Bing = require('node-bing-api')({ accKey: "your-account-key" }); ##### Web Search: ```js -Bing.search("Pizza", function(error, res, body){ +Bing.web("Pizza", function(error, res, body){ console.log(body); }, { diff --git a/lib/bing.js b/lib/bing.js index f9c52e5..6237616 100644 --- a/lib/bing.js +++ b/lib/bing.js @@ -119,10 +119,14 @@ var Bing = function( options ) { * userAgent, reqTimeout, top, skip * @function */ -Bing.prototype.search = function(query, callback, options) { +Bing.prototype.web = function(query, 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.