RoutingClient class
A routing JSON:API client
Constructors
- RoutingClient(UriDesign baseUri, {Client client = const Client()})
Properties
Methods
-
addMany(
String type, String id, String relationship, List< Identifier> identifiers, {Map<String, Object?> meta = const {}, Map<String, String> headers = const {}}) → Future<RelationshipUpdated< ToMany> > -
Adds
identifiers
to a to-many relationship identified bytype
,id
,relationship
. -
create(
String type, String id, {Map< String, Object?> attributes = const {}, Map<String, Identifier> one = const {}, Map<String, Iterable< many = const {}, Map<Identifier> >String, Object?> meta = const {}, Map<String, Object?> documentMeta = const {}, Map<String, String> headers = const {}, Iterable<String> include = const []}) → Future<ResourceUpdated> - Creates a new resource with the given id on the server.
-
createNew(
String type, {Map< String, Object?> attributes = const {}, Map<String, Identifier> one = const {}, Map<String, Iterable< many = const {}, Map<Identifier> >String, Object?> meta = const {}, Map<String, Object?> documentMeta = const {}, Map<String, String> headers = const {}, Iterable<String> include = const []}) → Future<ResourceCreated> -
Creates a new resource in the collection of type
type
. The server is responsible for assigning the resource id. -
deleteFromMany(
String type, String id, String relationship, List< Identifier> identifiers, {Map<String, Object?> meta = const {}, Map<String, String> headers = const {}}) → Future<RelationshipUpdated< Relationship> > -
Deletes
identifiers
from a to-many relationship identified bytype
,id
,relationship
. -
deleteResource(
String type, String id) → Future< Response> -
deleteToOne(
String type, String id, String relationship, {Map< String, String> headers = const {}}) → Future<RelationshipUpdated< ToOne> > -
fetchCollection(
String type, {Map< String, String> headers = const {}, Map<String, String> query = const {}, Map<String, String> page = const {}, Map<String, String> filter = const {}, Iterable<String> include = const [], Iterable<String> sort = const [], Map<String, Iterable< fields = const {}}) → Future<String> >CollectionFetched> -
Fetches a primary collection of type
type
. -
fetchRelatedCollection(
String type, String id, String relationship, {Map< String, String> headers = const {}, Map<String, String> page = const {}, Map<String, String> filter = const {}, Iterable<String> include = const [], Iterable<String> sort = const [], Map<String, Iterable< fields = const {}, Map<String> >String, String> query = const {}}) → Future<CollectionFetched> -
Fetches a related resource collection
identified by
type
,id
,relationship
. -
fetchRelatedResource(
String type, String id, String relationship, {Map< String, String> headers = const {}, Map<String, String> query = const {}, Map<String, String> filter = const {}, Iterable<String> include = const [], Map<String, Iterable< fields = const {}}) → Future<String> >RelatedResourceFetched> -
fetchResource(
String type, String id, {Map< String, String> headers = const {}, Map<String, String> filter = const {}, Iterable<String> include = const [], Map<String, Iterable< fields = const {}, Map<String> >String, String> query = const {}}) → Future<ResourceFetched> -
fetchToMany(
String type, String id, String relationship, {Map< String, String> headers = const {}, Map<String, String> query = const {}}) → Future<RelationshipFetched< ToMany> > -
fetchToOne(
String type, String id, String relationship, {Map< String, String> headers = const {}, Map<String, String> query = const {}}) → Future<RelationshipFetched< ToOne> > -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
replaceToMany(
String type, String id, String relationship, Iterable< Identifier> identifiers, {Map<String, Object?> meta = const {}, Map<String, String> headers = const {}}) → Future<RelationshipUpdated< ToMany> > -
replaceToOne(
String type, String id, String relationship, Identifier identifier, {Map< String, Object?> meta = const {}, Map<String, String> headers = const {}}) → Future<RelationshipUpdated< ToOne> > -
send(
Uri uri, Request request) → Future< Response> -
toString(
) → String -
A string representation of this object.
inherited
-
updateResource(
String type, String id, {Map< String, Object?> attributes = const {}, Map<String, Identifier> one = const {}, Map<String, Iterable< many = const {}, Map<Identifier> >String, Object?> meta = const {}, Map<String, Object?> documentMeta = const {}, Map<String, String> headers = const {}, Iterable<String> include = const []}) → Future<ResourceUpdated>
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited