ft-next-article-transforms
v1.0.0-beta.3
Published
Collection of useful functions/helpers for raw CAPI articles
Readme
next-article-transforms
Collection of useful functions/helpers to make articles returned from CAPI more useful for next.
##Helpers
- getVisualCategorisation
Next currently categorizes content into three buckets - News, Analysis and comment. This function takes a raw v1 article from CAPI, and returns either 'news', 'analysis' or 'comment' based on the genre of the article.
var getVisualCategorisation = require('ft-next-article-transforms/src/v1/getVisualCategorisation');
var theme = getVisualCategorisation(article.raw.item); // if using ft-api-client pass in the raw capi item