Update readme
This commit is contained in:
parent
c001bc6057
commit
b9cd97b042
1 changed files with 19 additions and 17 deletions
36
README.md
36
README.md
|
@ -25,8 +25,8 @@ var Bing = require('node-bing-api')({ accKey: "your-account-key" });
|
||||||
|
|
||||||
```js
|
```js
|
||||||
Bing.web("Pizza", {
|
Bing.web("Pizza", {
|
||||||
top: 10, // Number of results (max 50)
|
count: 10, // Number of results (max 50)
|
||||||
skip: 3 // Skip first 3 results
|
offset: 3 // Skip first 3 results
|
||||||
}, function(error, res, body){
|
}, function(error, res, body){
|
||||||
|
|
||||||
// body has more useful information besides web pages
|
// body has more useful information besides web pages
|
||||||
|
@ -40,9 +40,9 @@ Bing.web("Pizza", {
|
||||||
|
|
||||||
#### Composite Search (same as Web):
|
#### Composite Search (same as Web):
|
||||||
```js
|
```js
|
||||||
Bing.composite("xbox", {
|
Bing.composite("Playstation 4 Pro", {
|
||||||
top: 10, // Number of results (max 15 for news, max 50 if other)
|
count: 10, // Number of results (max 15 for news, max 50 if other)
|
||||||
skip: 3 // Skip first 3 results
|
offset: 3 // Skip first 3 results
|
||||||
}, function(error, res, body){
|
}, function(error, res, body){
|
||||||
console.log(body.news);
|
console.log(body.news);
|
||||||
});
|
});
|
||||||
|
@ -50,9 +50,9 @@ Bing.composite("xbox", {
|
||||||
|
|
||||||
#### News Search:
|
#### News Search:
|
||||||
```js
|
```js
|
||||||
Bing.news("xbox", {
|
Bing.news("Anonymous", {
|
||||||
top: 10, // Number of results (max 15)
|
count: 10, // Number of results (max 15)
|
||||||
skip: 3 // Skip first 3 results
|
offset: 3 // Skip first 3 results
|
||||||
}, function(error, res, body){
|
}, function(error, res, body){
|
||||||
console.log(body);
|
console.log(body);
|
||||||
});
|
});
|
||||||
|
@ -61,8 +61,8 @@ Bing.news("xbox", {
|
||||||
#### Video Search:
|
#### Video Search:
|
||||||
```js
|
```js
|
||||||
Bing.video("monkey vs frog", {
|
Bing.video("monkey vs frog", {
|
||||||
top: 10, // Number of results (max 50)
|
count: 10, // Number of results (max 50)
|
||||||
skip: 3 // Skip first 3 result
|
offset: 3 // Skip first 3 result
|
||||||
}, function(error, res, body){
|
}, function(error, res, body){
|
||||||
console.log(body);
|
console.log(body);
|
||||||
});
|
});
|
||||||
|
@ -71,8 +71,8 @@ Bing.video("monkey vs frog", {
|
||||||
#### Images Search:
|
#### Images Search:
|
||||||
```js
|
```js
|
||||||
Bing.images("Ninja Turtles", {
|
Bing.images("Ninja Turtles", {
|
||||||
top: 15, // Number of results (max 50)
|
count: 15, // Number of results (max 50)
|
||||||
skip: 3 // Skip first 3 result
|
offset: 3 // Skip first 3 result
|
||||||
}, function(error, res, body){
|
}, function(error, res, body){
|
||||||
console.log(body);
|
console.log(body);
|
||||||
});
|
});
|
||||||
|
@ -80,10 +80,12 @@ Bing.images("Ninja Turtles", {
|
||||||
|
|
||||||
#### Related Search (same as Web):
|
#### Related Search (same as Web):
|
||||||
```js
|
```js
|
||||||
Bing.relatedSearch('berlin', {market: 'en-US'}, function (err, res, body) {
|
Bing.relatedSearch('berlin'
|
||||||
var suggestions = body.relatedSearches.value.map(function(r){ return r.displayText; });
|
, { market: 'en-US' }
|
||||||
console.log(suggestions.join('\n'));
|
, (err, res, body) => {
|
||||||
});
|
const suggestions = body.relatedSearches.value.map(r => r.displayText)
|
||||||
|
console.log(suggestions.join('\n'))
|
||||||
|
})
|
||||||
```
|
```
|
||||||
|
|
||||||
#### Spelling Suggestions:
|
#### Spelling Suggestions:
|
||||||
|
@ -109,7 +111,7 @@ Available Options:
|
||||||
Getting spanish results:
|
Getting spanish results:
|
||||||
```js
|
```js
|
||||||
Bing.images("Ninja Turtles"
|
Bing.images("Ninja Turtles"
|
||||||
, {top: 5, market: 'es-ES'}
|
, {count: 5, market: 'es-ES'}
|
||||||
, function(error, res, body){
|
, function(error, res, body){
|
||||||
|
|
||||||
console.log(body);
|
console.log(body);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue