get_sources: Returns selected sources from newsapi.org
Description
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.
Usage
get_sources(category = NULL, language = NULL, country = NULL,
api_key = Sys.getenv("NEWS_API_KEY"))
Arguments
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 set_api_key).
Value
List with two dataframes:
1) Data frame with results_df
2) Data frame with meta_data