NodeState class
Provides access to methods for obtaining and updating node state.
Constructors
- NodeState(String accessToken, [APIVersion version = APIVersion.v1])
- Contructs object to access node state methods.
Properties
- accessToken → String
-
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
changeEnableSchedule(
String nodeId, String id, ScheduleEnableOperation operation) → Future< void> - Helper function for change the enable status of a default Rainmaker schedule.
-
createSchedule(
String nodeId, String name, String id, List< ScheduleTrigger> triggers, Map<String, dynamic> action) → Future<void> - Helper function for adding a default Rainmaker schedule.
-
deleteSchedule(
String nodeId, String id) → Future< void> - Helper function for removing a default Rainmaker schedule.
-
editSchedule(
String nodeId, String id, {String? name, List< ScheduleTrigger> ? triggers, Map<String, dynamic> ? action}) → Future<void> - Helper function for editing a default Rainmaker schedule.
-
getState(
String nodeId) → Future< Map< String, dynamic> > -
Obtains the state of the node with id
nodeId
. -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
-
updateState(
String nodeId, Map< String, dynamic> params) → Future<void> -
Updates the state of a node with the given
params
.
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Methods
-
getMinutesFromMidnight(
DateTime time) → int - Helper function to get the number of minutes from midnight.