newswire | R Documentation |
This gets links and metadata for Times articles and blog posts.
newswire(n = 100, period = "recent", offset = 0, ..., key = getOption("NYTimesAPI")["Newswire"])
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. |
A list of news_item
objects containing information about the item,
e.g. the headline, byline, summary, when it was created published, updated, ...
Duncan Temple Lang
http://developer.nytimes.com/docs/times_newswire_api
if("NYTimesAPI" %in% names(options()) && "Best Sellers" %in% names(options("Newswire"))) {
vals = newswire()
sapply(vals, slot, "headline")
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.