TopStories - randomSection
Example
const { TopStories } = require('nytimes-api');
const top = new TopStories('your-super-secret-api-key');
top.randomSection(data => console.log(data));
What does it do?
randomSection
returns a random section from the array you get if you were to use sections
. The code example above does the same.
Example Response
'opinion'
Last updated