RestAPIService<DataType extends Jsonable<Object> > class
abstract
- Implementers
Constructors
- RestAPIService.new({RestAPI? restAPI, void onInit()?, required String baseUrl, DataType? dataType, String? token, TokenCallback? tokenCallback, String? apiKey, Duration? connectTimeout, Duration? receiveTimeout, Duration? sendTimeout, HttpClientAdapter? httpClientAdapter})
Properties
- apiKey → String?
-
API key to be used on requests
final
- baseUrl → String
-
Base api url
final
- connectTimeout → Duration?
-
Timeout for requests.
final
- dataType → DataType?
-
Generic Jsonable DataType to allow for parsing of JSON data
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- httpClientAdapter → HttpClientAdapter?
-
Set this adapter if you need control over http requests
final
- onInit → void Function()?
-
final
- receiveTimeout → Duration?
-
Timeout for receiving data.
final
- restAPI → RestAPI
-
RestAPI instance to be used by the service
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- sendTimeout → Duration?
-
Timeout for sending data, like when using stream upload or Tus protocol.
final
- token → String?
-
API Authorization Bearer token
final
- tokenCallback → TokenCallback?
-
Callback to asynchronously get API Authorization Bearer token
final
Methods
-
dioErrorToCustomHttpResponse(
DioException error) → GoogleHTTPResponse -
dispose(
) → void -
genericParseResponse<
DataTypeGeneric> (Future futureResponse, {DataTypeGeneric? dataType}) → Future< GoogleHTTPResponse< DataTypeGeneric> > -
genericParseResponseAsList<
DataTypeGeneric extends Jsonable< (Object> ?>Future futureResponse, {DataTypeGeneric? dataType}) → Future< GoogleHTTPResponse< List< >DataTypeGeneric> > -
getSaveResponse<
ContainerDataTypeGeneric> (Future futureResponse) → Future< GoogleHTTPResponse> -
httpResponseToCustomHttpResponse(
HttpResponse response) → GoogleHTTPResponse -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
parseResponse(
Future futureResponse) → Future< GoogleHTTPResponse< DataType> > -
parseResponseAsList(
Future futureResponse) → Future< GoogleHTTPResponse< List< >DataType> > -
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited