Sources class
Sources
This endpoint returns the subset of news publishers that TopHeadlines are available from. It's mainly a convenience endpoint that you can use to keep track of the publishers available on the API, and you can pipe it straight through to your users.
All parameters are optional.
Constructors
- Sources({Categories category, String language, String country })
Properties
- category → Categories
-
Find sources that display news of this category.
Possible options are contained in the Categories
enum.
Defaults to all categories.
final
- country → String
-
Find sources that display news in a specific country.
Possible options are contained in the Countries
class.
Defaults to all countries.
final
- language → String
-
Find sources that display news in a specific
language.
Possible options are: 'ar', 'de', 'en', 'es', 'fr',
'he', 'it', 'nl', 'no', 'pt', 'ru', 'se', 'ud', 'zh'.
Defaults to all languages.
final
-
parameters
→ Map<
String, dynamic> -
read-only
- 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