Skip to content

Instantly share code, notes, and snippets.

@commuterjoy
Created March 5, 2015 16:12
Show Gist options
  • Save commuterjoy/dd006870480a62549abc to your computer and use it in GitHub Desktop.
Save commuterjoy/dd006870480a62549abc to your computer and use it in GitHub Desktop.
list of article summaries
# export apikey=`cat ~/.ftapi`; node summary.js
var client = require('ft-api-client')(process.env.apikey, { pollForPages: false });
client.get([
'03b49444-16c9-11e3-bced-00144feabdc0',
'7d9ee96e-3a70-11e4-bd08-00144feabdc0',
'a7008958-f2f3-11e3-a3f8-00144feabdc0'
]).then(function (articles) {
articles.forEach(function (article) {
console.log(article.id, article.paragraphs(0, 1).text())
})
}).catch(function (err) {
console.log(err);
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment