RestApi class

A class to communicated with the firebase realtime database REST-API

Many methods of this class accept an eTag parameter. The Firebase ETag is the unique identifier for the current data at a specified location. If the data changes at that location, the ETag changes, too. If set, the class will request this eTag and return in via DbResponse.eTag.

Constructors

RestApi({required Client client, required String database, String basePath = '', String? idToken, Timeout? timeout, WriteSizeLimit? writeSizeLimit})
Default constructor.

Properties

basePath → String
A sub path in the database to use as virtual root path.
final
client → SSEClient
The HTTP-Client that should be used to send requests.
final
database → String
The name of the database to connect to.
final
hashCode → int
The hash code for this object.
no setterinherited
idToken ↔ String?
The idToken to use for requests.
getter/setter pair
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
timeout ↔ Timeout?
The timeout for read requests. See Timeout.
getter/setter pair
writeSizeLimit ↔ WriteSizeLimit?
The limit for how big write requests can be. See WriteSizeLimit.
getter/setter pair

Methods

delete({String? path, PrintMode? printMode, bool eTag = false, String? ifMatch}) → Future<DbResponse>
Sends a delete requests to the database to delete some data.
get({String? path, PrintMode? printMode, FormatMode? formatMode, bool? shallow, Filter? filter, bool eTag = false}) → Future<DbResponse>
Sends a get requests to the database to read some data.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
patch(Map<String, dynamic> updateChildren, {String? path, PrintMode? printMode}) → Future<DbResponse>
Sends a patch requests to the database to update some data.
post(dynamic body, {String? path, PrintMode? printMode, bool eTag = false}) → Future<DbResponse>
Sends a post requests to the database to create new data.
put(dynamic body, {String? path, PrintMode? printMode, bool eTag = false, String? ifMatch}) → Future<DbResponse>
Sends a put requests to the database to write some data.
stream({String? path, PrintMode? printMode, FormatMode? formatMode, bool? shallow, Filter? filter}) → Future<Stream<StreamEvent>>
Sends a get requests to the database to stream changes.
toString() → String
A string representation of this object.
inherited

Operators

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