Learn R Programming

rzeit2 (version 0.2.3)

get_content: Content endpoint

Description

Exposes a search in the ZEIT online archive on the content endpoint and returns results for the given query.

Usage

get_content(query, limit = 10, offset = 0, sort = "release_date asc",
  begin_date = NULL, end_date = NULL,
  api_key = Sys.getenv("ZEIT_ONLINE_KEY"))

Arguments

query

character. Search query term.

limit

integer. The number of results given back. Please use get_content_all if the limit exceeds 1000 rows.

offset

integer. Offset for the list of matches.

sort

character. Sort search result by various fields. For example: sort=release_date asc, uuid desc.

begin_date

character. Begin date - Restricts responses to results with publication dates of the date specified or later. In the form YYYYMMDD.

end_date

character. End date - Restricts responses to results with publication dates of the date specified or earlier. In the form YYYYMMDD.

api_key

character. The personal api code. To request an API key see: http://developer.zeit.de/quickstart/ This parameter is by default set to the R Environment.

Value

A list including articles and meta information about the query.

Details

get_content is the function, which interacts directly with the ZEIT Online API. I only used the content endpoint for this package. There are further endpoints (e.g. /author, /product) not included into this package to further specify the search if needed. The whole list of possible endpoints can be accessed here http://developer.zeit.de/docs/.

References

http://developer.zeit.de

See Also

get_content_all

Examples

Run this code
# NOT RUN {
get_content(query = "Merkel")
# }
# NOT RUN {
# }

Run the code above in your browser using DataLab