Description Usage Arguments Value Examples
get_sources
returns the news sources currently available on newsapi.org.
The sources can be filtered using category, language or country. If the arguments are empty
the query return all available sources.
1 2 | get_sources(category = NULL, language = NULL, country = NULL,
api_key = Sys.getenv("NEWS_API_KEY"))
|
category |
Category you want to get sources for as a string. Default: NULL. |
language |
The langauge you want to get sources for as a string. Default: NULL. |
country |
The country you want to get sources for as a string (e.g. "us"). Default: NULL. |
api_key |
String with the API key you get from newsapi.org.
Passing it is compulsory. Alternatively, function can be
provided from the global environment (see |
List with two dataframes:
1) Data frame with results_df
2) Data frame with meta_data
1 2 3 4 5 6 | ## Not run:
get_sources(api_key)
get_sources(api_key, category = "technology")
get_sources(api_key, language = "en")
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.