Everything class

Everything

Search through millions of articles from over 30.000 large and small news sources and blogs. This includes breaking news as well as lesser articles. This endpoint suits article discovery and analysis, but can be used to retrieve articles for display, too.

You must include at least one query, sources, or domains.

Constructors

Everything({String query, List<String> sources, List<String> domains, List<String> excludeDomains, DateTime from, DateTime to, String language, SortBy sortBy, int pageSize: 20, int page })

Properties

domains → List<String>
A list of domains (e.g. bbc.co.uk, techcrunch.com) to restrict the search to.
final
excludeDomains → List<String>
A list of domains (e.g. bbc.co.uk, techcrunch.com) to remove from the results.
final
from → DateTime
A date and optional time for the oldest article allowed. [...]
final
language → String
The 2-letter ISO-639-1 code of the language you want to get headlines for. Possible options: 'ar', 'de', 'en', 'es', 'fr', 'he', 'it', 'nl', 'no', 'pt', 'ru', 'se', 'ud', 'zh'. [...]
final
page → int
Use this to page through the results.
final
pageSize → int
The number of results to return per page (request). 20 is the default, 100 is the maximum.
final
parameters → Map<String, dynamic>
read-only
query → String
Keywords or phrase to search for.
final
sortBy SortBy
The order to sort the articles in. Possible options: [...]
final
sources → List<String>
A list of identifiers (maximum 20) for the news sources or blogs you want headlines from. Use the Sources endpoint to locate these programmatically or look at https://newsapi.org/sources.
final
to → DateTime
A date and optional time for the newest article allowed. [...]
final
url → String
read-only
client → Client
final, inherited
hashCode → int
The hash code for this object. [...]
read-only, inherited
runtimeType → Type
A representation of the runtime type of the object.
read-only, inherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed. [...]
inherited
request(String apiKey) → Future<Map<String, dynamic>>
inherited
toString() → String
Returns a string representation of this object.
inherited

Operators

operator ==(dynamic other) → bool
The equality operator. [...]
inherited