CollectionModelRestApiQuery class

Builder for creating collection model adapters using REST APIs.

REST APIを利用したコレクションのモデルアダプターを作成するためのビルダー。

Inheritance

Constructors

CollectionModelRestApiQuery({required FutureOr<bool> match(ModelAdapterCollectionQuery query), required Uri endpoint(String endpoint, ModelAdapterCollectionQuery query), required FutureOr<Map<String, DynamicMap>> onLoaded(ApiResponse response), bool checkError(ApiResponse response)?, FutureOr<Map<String, String>> headers(ModelAdapterCollectionQuery query)?})
Builder for creating collection model adapters using REST APIs.
const

Properties

checkError bool Function(ApiResponse response)?
A function that returns true if the response is an error.
final
endpoint Uri Function(String endpoint, ModelAdapterCollectionQuery query)
A function that returns the endpoint of the collection.
final
hashCode int
The hash code for this object.
no setterinherited
headers FutureOr<Map<String, String>> Function(ModelAdapterCollectionQuery query)?
A function that returns the headers.
final
match FutureOr<bool> Function(ModelAdapterCollectionQuery query)
A function that returns true if the query matches.
finalinherited
onLoaded FutureOr<Map<String, DynamicMap>> Function(ApiResponse response)
Returns the loaded collection's data.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
process(ModelAdapterCollectionQuery query, RestApiModelAdapter adapter) Future<Map<String, DynamicMap>>
Describes the actual processing.
override
toString() String
A string representation of this object.
inherited

Operators

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