EasyApi class

Constructors

EasyApi({String? apiHost})
Create a new instance of EasyApi.

Properties

apiHost String
The API host. Can be set when creating a new instance of EasyApi.
getter/setter pair
badHost bool
Whether the API host is bad.
getter/setter pair
booted bool
Whether the API has booted.
getter/setter pair
hashCode int
The hash code for this object.
no setterinherited
headers Map<String, String>
getter/setter pair
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
session ↔ Session
The current authenticated session.
getter/setter pair
token String
Set the token.
getter/setter pair

Methods

authCheck() Future
Check if the user is authenticated.
boot() Future
Boot the API.
login(String email, String password) Future<Session?>
Login to the API.
logout() Future<void>
Logout of the API.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
onError(dynamic handler(EasyError)) → dynamic
Add an error handler, which will be called when an error occurs during an API call.
toString() String
A string representation of this object.
inherited

Operators

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