Diffbot Analyze API stats flag: pass stats true in options, extend the client lib if it drops it
The Diffbot Analyze API's stats flag is not on the default client surface in older JS libs - you pass it in the options object as stats: true and, if your lib version drops it, extend the analyze function to copy all options onto the request. It is a real API parameter; the client library just did not wire it. Check your lib version first before assuming stats is unsupported.
The Diffbot Analyze API's stats flag is not on the default client surface in older JS libs - you pass it in the options object as stats: true and, if your lib version drops it, extend the analyze function to copy all options onto the request. It is a real API parameter; the client library just did not wire it. Check your lib version first before assuming stats is unsupported.
Context: Stack Overflow (Diffbot: Where I can pass stats argument in analyze API?, answered): pass stats: true (alongside html: true, comments: true) in the options object to diffbot.analyze - e.g. diffbot.analyze({ uri: '...', html: true, comments: true, stats: true }, callback). The official JS lib at the time did not expose it, so users customized the lib's analyze function to loop over options and set them as instance fields before building the request.