TodayRequest class

Inheritance

Constructors

TodayRequest(String host, String apiPath, {required String city, String? appName, String? appVersion})

Properties

apiPath String
Path to the API on the host
finalinherited
appName String?
Name of the app which uses the API
finalinherited
appVersion String?
Version of the app which uses the API
finalinherited
city String
finalinherited
endpoint String
The endpoint of the request, should be set by the subclass
final
hashCode int
The hash code for this object.
no setterinherited
host String
Host domain of the API
finalinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

baseRequest({Map<String, dynamic>? parameters, List<String> values = const []}) Future<String>
blueprint for a request, should called in the implementation of the formRequest method
inherited
formRequest([List<String>? values]) Future<String>
is called by the request and requestWithValuesmethod to form the request. Should be overridden by subclasses to add parameters
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
parseResponse(dynamic json) Today
Subclasses should implement this method to parse the response from the API. Is used in the request method.
override
request() Future<Today>
Request without values Specified, therefore the whole response is returned in parsed form.
inherited
requestWithValues(List<String> values) Future<List<String>>
A request with values specified, only the values of the given keys in values are in the response
inherited
sendRequest(Uri url) Future<String>
sends the request to the specified url
inherited
toString() String
A string representation of this object.
inherited
urlRequest(Uri url) Future<Today>
Same parsed return as request but from the given url. Can be used if the exact url for the request is provided externally. Should not be used if values are specified.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited