wire: Wire

wireR Documentation

Wire

Description

With the Times Newswire API, you can get links and metadata for Times' articles as soon as they are published on NYTimes.com. The Times Newswire API provides an up-to-the-minute stream of published articles. You can filter results by source (all, nyt, or iht) and section (arts, business, ...).

Usage

ny_wire_content(url)

ny_wire_section_list()

ny_wire_source(section, pages = 1, source = c("all", "nyt", "iht"))

ny_wire_period(
  section,
  period = 12,
  pages = 1,
  source = c("all", "nyt", "iht")
)

Arguments

url

The complete URL of a specific news item.

section

Name of section as returned by ny_wire_section_list.

pages

Number of pages of results to return.

source

Name of the source; all, New York Times nyt, International New York Times iht.

period

Limits the set of items by time published, integer in number of hours.

Functions

  • ny_wire_content - Get content based on URL.

  • ny_wire_section_list - Returns list of sections, useful for other calls.

  • ny_wire_source - Returns list of wires by source and section.

  • ny_wire_period - Returns list of wires by source limited by period.

Examples

## Not run: 
nytimes_key("xXXxxXxXxXXx")
sections <- ny_wire_section_list()
wires <- ny_wire_source(sample(sections$section, 1))

## End(Not run)


news-r/nytimes documentation built on Nov. 10, 2024, 9:28 a.m.