RingApi class
Main Ring API client
This is the primary entry point for interacting with Ring devices. Create an instance with either a refresh token or email/password.
Example:
final api = RingApi(
RefreshTokenAuth(refreshToken: 'your-token'),
options: RingApiOptions(debug: true),
);
final locations = await api.getLocations();
final cameras = await api.getCameras();
- Inheritance
-
- Object
- Subscribed
- RingApi
Constructors
- RingApi(dynamic authOptions, {RingApiOptions options = const RingApiOptions()})
- Create a new Ring API client
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
-
onRefreshTokenUpdated
↔ Stream<
RefreshTokenUpdate> -
Stream of refresh token updates
latefinal
- options → RingApiOptions
-
Configuration options for this API instance
final
- restClient → RingRestClient
-
The REST client for making API requests
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
addSubscription(
StreamSubscription subscription) → void -
Add a single subscription to be managed
inherited
-
addSubscriptions(
List< StreamSubscription> subscriptions) → void -
Add one or more subscriptions to be managed
inherited
-
disconnect(
) → Future< void> - Disconnect and cleanup all resources
-
dispose(
) → void -
Dispose of this object and cancel all subscriptions
override
-
fetchAmazonKeyLocks(
) → Future< List> - Fetch Amazon Key lock associations
-
fetchRawLocations(
) → Future< List< UserLocation> > - Fetch raw location data from the API
-
fetchRingDevices(
) → Future< RingDevicesResponse> - Fetch all Ring devices from the API
-
getCamera(
int cameraId) → Future< RingCamera?> - Get a specific camera by ID
-
getCameras(
) → Future< List< RingCamera> > - Get all cameras across all locations
-
getLocations(
) → Future< List< Location> > - Get all locations
-
getProfile(
) → Future< ProfileResponse> - Get user profile information
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
-
unsubscribe(
) → void -
Unsubscribe from all managed subscriptions
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited