Newsie v0.1.0 Newsie.Providers.NewsApi View Source
Client for News API
Configuration
Requires :api_key
to use.
See Newsie.ProviderConfig
for documentation on how to configure providers.
Link to this section Summary
Functions
Get a list of news sources provided by this API.
Link to this section Functions
Specs
config() :: keyword()
Get a list of news sources provided by this API.
Example
Newsie.Providers.NewsApi.list_sources(country: :gb)
{:ok, [ {
"id": "bbc-news",
"name": "BBC News",
"description": "Use BBC News for up-to-the-minute news, breaking news, video, audio and feature stories. BBC News provides trusted World and UK news as well as local and regional perspectives. Also entertainment, business, science, technology and health news.",
"url": "http://www.bbc.co.uk/news",
"category": "general",
"language": "en",
"country": "gb"
}, {
"id": "business-insider-uk",
"name": "Business Insider (UK)",
"description": "Business Insider is a fast-growing business site with deep financial, media, tech, and other industry verticals. Launched in 2007, the site is now the largest business news site on the web.",
"url": "http://uk.businessinsider.com",
"category": "business",
"language": "en",
"country": "gb"
} ]}
Specs
top_headlines(any()) :: {:error, any()} | {:ok, [Newsie.Article.t()]}