RoutingClient class
A routing JSON:API client
Constructors
- RoutingClient(UriDesign _baseUri, Client _client)
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
addMany(
String type, String id, String relationship, List< Identifier> identifiers, {Map<String, Object?> meta = const {}, Map<String, List< headers = const {}}) → Future<String> >RelationshipUpdated< ToMany> > -
Adds the
identifiers
to the 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, List< headers = const {}, Iterable<String> >QueryEncodable> query = const []}) → Future<ResourceUpdated> -
Creates a new resource with the given
type
andid
on the server. -
createNew(
String type, {String? lid, Map< String, Object?> attributes = const {}, Map<String, NewIdentifier> one = const {}, Map<String, Iterable< many = const {}, Map<NewIdentifier> >String, Object?> meta = const {}, Map<String, Object?> documentMeta = const {}, Map<String, List< headers = const {}, Iterable<String> >QueryEncodable> query = 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, List< headers = const {}}) → Future<String> >RelationshipUpdated< Relationship> > -
Deletes the
identifiers
from the to-many relationship identified bytype
,id
,relationship
. -
deleteResource(
String type, String id, {Map< String, List< headers = const {}, Iterable<String> >QueryEncodable> query = const []}) → Future<Response> -
Deletes the resource identified by
type
andid
. -
deleteToOne(
String type, String id, String relationship, {Map< String, List< headers = const {}, Iterable<String> >QueryEncodable> query = const []}) → Future<RelationshipUpdated< ToOne> > -
Removes the to-one relationship
identified by
type
,id
, andrelationship
.. -
fetchCollection(
String type, {Map< String, List< headers = const {}, Iterable<String> >QueryEncodable> query = const []}) → Future<CollectionFetched> -
Fetches the primary collection of type
type
. -
fetchRelatedCollection(
String type, String id, String relationship, {Map< String, List< headers = const {}, Iterable<String> >QueryEncodable> query = const []}) → Future<CollectionFetched> -
Fetches the related resource collection
identified by
type
,id
,relationship
. -
fetchRelatedResource(
String type, String id, String relationship, {Map< String, List< headers = const {}, Iterable<String> >QueryEncodable> query = const []}) → Future<RelatedResourceFetched> -
Fetches the related resource
identified by
type
,id
,relationship
. -
fetchResource(
String type, String id, {Map< String, List< headers = const {}, Iterable<String> >QueryEncodable> query = const []}) → Future<ResourceFetched> -
Fetches the resource identified by
type
andid
. -
fetchToMany(
String type, String id, String relationship, {Map< String, List< headers = const {}, Iterable<String> >QueryEncodable> query = const []}) → Future<RelationshipFetched< ToMany> > -
Fetches the to-many relationship
identified by
type
,id
,relationship
. -
fetchToOne(
String type, String id, String relationship, {Map< String, List< headers = const {}, Iterable<String> >QueryEncodable> query = const []}) → Future<RelationshipFetched< ToOne> > -
Fetches the to-one relationship
identified by
type
,id
,relationship
. -
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, List< headers = const {}, Iterable<String> >QueryEncodable> query = const []}) → Future<RelationshipUpdated< ToMany> > -
Replaces the to-many relationship
identified by
type
,id
, andrelationship
by setting the newidentifiers
. -
replaceToOne(
String type, String id, String relationship, Identifier identifier, {Map< String, Object?> meta = const {}, Map<String, List< headers = const {}, Iterable<String> >QueryEncodable> query = const []}) → Future<RelationshipUpdated< ToOne> > -
Replaces the to-one relationship
identified by
type
,id
, andrelationship
by setting the newidentifier
. -
send(
Uri uri, Request request) → Future< Response> -
Sends the
request
to theuri
on the server. This method can be used to send any non-standard requests. -
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, List< headers = const {}, Iterable<String> >QueryEncodable> query = const []}) → Future<ResourceUpdated> -
Updates the resource identified by
type
andid
.
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited