goferito / node-bing-api

Node.js module for the Bing Search API (Cognitive Services)
MIT License
56 stars 28 forks source link

Composite Search Error #22

Closed waqas19921 closed 8 years ago

waqas19921 commented 8 years ago

when i try to execute composite search following error occurs

[Error: Parameter: Sources has an invalid pattern of characters]

Here is my code

Bing.composite("animal", {
        sources: 'web+news', //Choises are web+image+video+news+spell
        top: 10,  // Number of results (max 15 for news, max 50 if other)
        skip: 3,   // Skip first 3 results
        newsSortBy: "Date" //Choices are Date, Relevance
    }, function (error, response, body) {
        console.log(error, body);
        console.log(body);
    });
goferito commented 8 years ago

Thank you, you are right. The '+' symbol had to by uri encoded. Its fixed now and published.

waqas19921 commented 8 years ago

Thanks for the fix.