Client class
The principal class for interacting with the Ruqqus API
Constructors
Properties
- accessToken ↔ String?
-
Stored token that allows the client to access Ruqqus' endpoints
getter/setter pair
- api ↔ API
-
Handler for HTTP calls to the API, as well as specific endpoints
latefinal
- hashCode → int
-
The hash code for this object.
no setterinherited
- isActive ↔ bool
-
Keeps track of whether the client had already previously obtained
an access token for when it needs to be refreshed
getter/setter pair
- log → Sprint
-
final
-
recurrentEvents
→ Map<
String, List< Function> > -
Mapping of events to a list of event handlers
finalinherited
-
refreshData
↔ Map<
String, String> -
Data required for refreshing the access token every hour
latefinal
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
-
singleEvents
→ Map<
String, List< Function> > -
Mapping of events to a list of one-time event handlers
finalinherited
Methods
-
clearListeners(
) → void -
This function attempt to remove all handlers from the
event
.inherited -
emit(
String event, [List arguments = const []]) → void -
This function triggers all the handlers currently listening
to
event
and passes themdata
inherited -
listenForSubmissions<
Submission extends Primary> ({Duration listeningDelay = minimumReadInterval, List< String> accumulatedIds = const []}) → Stream<Primary> -
Begins listening for submissions at with a delay
listeningDelay
-
login(
) → Future - Ruqqus: "Access tokens expire one hour after they are issued. To maintain ongoing access, you will need to use the refresh token to obtain a new access token."
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
on(
String event, Function handler) → void -
This function binds the
handler
as a listener to theevent
inherited -
once(
String event, Function handler) → void -
This function binds the
handler
as listener to the first occurrence of theevent
. Whenhandler
is called once, it is removed.inherited -
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Methods
Constants
- minimumReadInterval → const Duration
- Minimum interval between read requests
- minimumWriteInterval → const Duration
- Minimum interval between write requests