NewsAPI class
A class for interacting with the News API.
Properties
Methods
-
getEverything(
{String? query, String? queryInTitle, String? sources, String? domains, String? excludeDomains, DateTime? from, DateTime? to, String? language, String? sortBy, int? pageSize, int? page}) → Future< List< Article> > - Fetches a list of articles based on the provided query parameters.
-
getSources(
{String? category, String? language, String? country}) → Future< List< Source> > - Fetches a list of news sources from the API.
-
getTopHeadlines(
{String? country, String? category, String? sources, String? query, int? pageSize, int? page}) → Future< List< Article> > - Fetches a list of top headlines based on the provided query parameters.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited