Support for related search and spelling suggestions
This commit is contained in:
parent
f3909e5c0f
commit
8d3d53c261
3 changed files with 96 additions and 0 deletions
37
lib/bing.js
37
lib/bing.js
|
@ -258,6 +258,43 @@ Bing.prototype.images = function (query, options, callback) {
|
|||
};
|
||||
|
||||
|
||||
/**
|
||||
* Performs a Bing search in the Related Search vertical.
|
||||
*
|
||||
* @param {String} query Query term to search for.
|
||||
*
|
||||
* @param {Object} options Options to command, allows overriding
|
||||
* of rootUri, accKey (Bing API key),
|
||||
* userAgent, reqTimeout, top, skip,
|
||||
*
|
||||
* @param {requestCallback} callback Callback called with (potentially
|
||||
* json-parsed) response.
|
||||
* @function
|
||||
*/
|
||||
Bing.prototype.relatedSearch = function (query, options, callback) {
|
||||
this.searchVertical(query, "RelatedSearch", options, callback);
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* Performs a Bing search in the Spelling Suggestions vertical.
|
||||
*
|
||||
* @param {String} query Query term to search for.
|
||||
*
|
||||
* @param {Object} options Options to command, allows overriding
|
||||
* of rootUri, accKey (Bing API key),
|
||||
* userAgent, reqTimeout, top, skip,
|
||||
*
|
||||
* @param {requestCallback} callback Callback called with (potentially
|
||||
* json-parsed) response.
|
||||
* @function
|
||||
*/
|
||||
Bing.prototype.spelling = function (query, options, callback) {
|
||||
this.searchVertical(query, "SpellingSuggestions", options, callback);
|
||||
};
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Capitalises the first word of the passed string
|
||||
*
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue