6.0.0 • Published 5 years ago
@datafire/nytimes_most_popular_api v6.0.0
@datafire/nytimes_most_popular_api
Client library for Most Popular API
Installation and Usage
npm install --save @datafire/nytimes_most_popular_apilet nytimes_most_popular_api = require('@datafire/nytimes_most_popular_api').create({
"api-key": ""
});
.then(data => {
console.log(data);
});Description
Get lists of NYT Articles based on shares, emails, and views.
Actions
mostemailed.section.time_period.json.get
Most Emailed by Section & Time Period
nytimes_most_popular_api.mostemailed.section.time_period.json.get({
"section": "",
"time-period": ""
}, context)Input
- input
object- section required
string(values: Arts, Automobiles, Blogs, Books, Business Day, Education, Fashion & Style, Food, Health, Job Market, Magazine, membercenter, Movies, Multimedia, N.Y.%20%2F%20Region, NYT Now, Obituaries, Open, Opinion, Public Editor, Real Estate, Science, Sports, Style, Sunday Review, T Magazine, Technology, The Upshot, Theater, Times Insider, Today’s Paper, Travel, U.S., World, Your Money, all-sections): Limits the results by one or more sections. You can use - time-period required
string(values: 1, 7, 30): Number of days1 | 7 | 30corresponds to a day, a week, or a month of content.
- section required
Output
- output
object- copyright
string - num_results
integer - results
array- items ArticleWithCountType
- status
string
- copyright
mostshared.section.time_period.json.get
Most Shared by Section & Time Period
nytimes_most_popular_api.mostshared.section.time_period.json.get({
"section": "",
"time-period": ""
}, context)Input
- input
object- section required
string(values: Arts, Automobiles, Blogs, Books, Business Day, Education, Fashion & Style, Food, Health, Job Market, Magazine, membercenter, Movies, Multimedia, N.Y.%20%2F%20Region, NYT Now, Obituaries, Open, Opinion, Public Editor, Real Estate, Science, Sports, Style, Sunday Review, T Magazine, Technology, The Upshot, Theater, Times Insider, Today’s Paper, Travel, U.S., World, Your Money, all-sections): Limits the results by one or more sections. You can use - time-period required
string(values: 1, 7, 30): Number of days1 | 7 | 30corresponds to a day, a week, or a month of content.
- section required
Output
- output
object- copyright
string - num_results
integer - results
array- items Article
- status
string
- copyright
mostviewed.section.time_period.json.get
Most Viewed by Section & Time Period
nytimes_most_popular_api.mostviewed.section.time_period.json.get({
"section": "",
"time-period": ""
}, context)Input
- input
object- section required
string(values: Arts, Automobiles, Blogs, Books, Business Day, Education, Fashion & Style, Food, Health, Job Market, Magazine, membercenter, Movies, Multimedia, N.Y.%20%2F%20Region, NYT Now, Obituaries, Open, Opinion, Public Editor, Real Estate, Science, Sports, Style, Sunday Review, T Magazine, Technology, The Upshot, Theater, Times Insider, Today’s Paper, Travel, U.S., World, Your Money, all-sections): Limits the results by one or more sections. You can use - time-period required
string(values: 1, 7, 30): Number of days1 | 7 | 30corresponds to a day, a week, or a month of content.
- section required
Output
- output
object- copyright
string - num_results
integer - results
array- items Article
- status
string
- copyright
Definitions
Article
- Article
object
ArticleWithCountType
- ArticleWithCountType
object- abstract
string - byline
string - column
string - count_type
string - des_facet DesFacet
- geo_facet GeoFacet
- media
array- items
object- caption
string - copyright
string - media-metadata
object- format
string - height
integer - url
string - width
integer
- format
- subtype
string - type
string
- caption
- items
- org_facet OrgFacet
- per_facet PerFacet
- published_date
string - section
string - source
string - title
string - url
string
- abstract
DesFacet
- DesFacet
GeoFacet
- GeoFacet
string(values: )
OrgFacet
- OrgFacet
array
PerFacet
- PerFacet
array