Open ilyazub opened 3 years ago
@jvmvik @hartator What do you think?
I don't know if it helps but here I have two ways of implementing an endpoint to be used with https://shields.io/endpoint. A big thanks to @ilyazub for helping me with that.
Certainly a promise
api version would make the code there much more elegant and succinct.
Now only callbacks are supported for
SerpApiSearch#json
.The workaround is to promisify functions, but out-of-the-box support would be great. Test with the workaround here.
PS. Node.js HTTPS module is used to send requests.
got
has a simpler API and the response stream is handled by the library.https://github.com/serpapi/google-search-results-nodejs/blob/cbadec5122a4362774fce66e219adcc872d71ead/lib/SerpApiSearch.js#L72-L95