1.4.2 • Published 9 years ago

ft-next-article-genre v1.4.2

Weekly downloads
33
License
-
Repository
-
Last release
9 years ago

next-article-genre Build Status

Next currently categorizes content into four visually styling buckets - Default (News), Analysis, Comment and Lifestyle. This function takes a raw v1 article from CAPI, and returns either 'default', 'analysis', 'comment' or 'lifestyle' based on the genre of the article.

var getVisualCategorisation = require('ft-next-article-genre');
var theme = getVisualCategorisation(article.raw.item.metadata);

(August 2015 - as part of the design unification, genre differentiation has initially been turned off. This was achieved by defaulting the look up values for all genres to default. The original mapping is commented

To retrieve the genre that was previously returned pass in options as follows

var getEditorialTone = require('ft-next-article-genre');
var theme = getEditorialTone(article.raw.item.metadata, {requestedProp: 'editorialTone'});

).

1.4.2

9 years ago

1.4.1

9 years ago

0.0.0

9 years ago

1.4.0

9 years ago

1.3.2

9 years ago

1.3.1

9 years ago

1.3.0

9 years ago

1.2.1

9 years ago

1.2.0

9 years ago

1.1.0

9 years ago

1.0.1

9 years ago

1.0.0

9 years ago