newswire: Access NY Times articles meta-data

newswireR Documentation

Access NY Times articles meta-data

Description

This gets links and metadata for Times articles and blog posts.

Usage

newswire(n = 100, period = "recent", offset = 0, ..., key = getOption("NYTimesAPI")["Newswire"])

Arguments

n

maximum number of elements in the result set

period

either "recent" or "last24hours"

offset

an integer multiple of 20. This gives the offset of the result set at which to start

...

additional parameters

key

the NY Times API key for accessing the Newswire service.

Value

A list of news_item objects containing information about the item, e.g. the headline, byline, summary, when it was created published, updated, ...

Author(s)

Duncan Temple Lang

References

http://developer.nytimes.com/docs/times_newswire_api

Examples

 if("NYTimesAPI" %in% names(options()) && "Best Sellers" %in% names(options("Newswire"))) {
    vals = newswire()
    sapply(vals, slot, "headline")
 }

omegahat/RNYTimes documentation built on Nov. 29, 2023, 12:39 a.m.