ring_client_api library
Ring Client API for Dart
Unofficial Dart API for Ring Doorbells, Cameras, Alarm Systems, and Smart Lighting.
Classes
- AccountMonitoringStatus
- Account monitoring status
- AdvancedMotionSettings
- Advanced motion settings
- AdvancedObjectSettings
- Advanced object settings
- AlarmInfo
- Alarm info structure
- AlexaSettings
- Alexa settings
- AnswerBody
- AnswerMessage
- SDP answer message
- AssetSession
- Asset session information
- Auth2faErrorResponse
- Auth 2FA error response
- Auth2faSuccessResponse
- Auth 2FA success response
- AuthTokenResponse
- Auth token response
- AutoreplySettings
- Autoreply settings
- BaseCameraData
- Base camera data structure
- BaseStation
- Base station data structure
- BaseStationOwner
- Base station owner information
- BasicPeerConnection
- Basic peer connection interface
- BeamBridge
- Beam bridge device data
- BeamBridgeMetadata
- Beam bridge metadata
- CameraAlerts
- Camera alerts structure
- CameraChimeSettings
- Chime settings for cameras
- CameraData
- Regular camera data (non-ONVIF)
- CameraDeviceSettingsData
- Camera device settings data (complete structure)
- CameraEvent
- Camera event structure
- CameraEventOptions
- Camera event options for querying
- CameraEventResponse
- Camera event response
- CameraFeatures
- Camera features structure
- CameraHealth
- Camera health information (extends ChimeHealth)
- CameraHealthData
- Camera health structure
- CameraOwner
- Camera owner information
- CameraSettingsData
- Camera settings structure
- CameraStartedMessage
- Camera started message
- ChimeAlerts
- Chime alerts structure
- ChimeData
- Chime data structure
- ChimeDoNotDisturb
- Chime do not disturb structure
- ChimeFeatures
- Chime features structure
- ChimeHealth
- Chime health information
- ChimeKind
- Chime kinds
- ChimeModel
- Chime model names
- ChimeOwner
- Chime owner information
- ChimeSettings
- Chime settings structure
- ChimeUpdate
- Chime update request structure
- ChimeUpdateSettings
- Chime update settings structure
- ClientDeviceSettings
- Client device settings
- CloseBody
- CloseMessage
- Close message
- CloseReason
- ComponentDevice
- Component device relationship
- ConciergeSettings
- Concierge settings
- CvDetectionType
- CV detection type structure
- CvDetectionTypes
- CV detection types
- CvProperties
- CV properties structure
- CvSettings
- CV settings
- CvThreshold
- CV threshold
-
DataResponse<
T> - Response with data and metadata
- DayNightConfig
- Day/Night configuration
- DeviceChimeSettings
- Device chime settings
- DingKindConstants
- Common ding kinds
- DingStateConstants
- Common ding states
- DispatchSignalType
- Dispatch signal type constants
- DoorbellType
- Doorbell types
- EmailAuth
- Email-based authentication
- ExtendedResponse
- Extended response with timestamp information
- FfmpegOptions
- FFmpeg options for video transcoding
- FloodlightSettings
- Floodlight settings structure
- GeneralSettings
- General settings
- GeoCoordinates
- Geographic coordinates
- HistoryOptions
- History options for querying device history
- HueSaturation
- Hue and saturation for lights
- IceCandidateBody
- IceCandidateMessage
- ICE candidate message
- IncomingMessage
- Union type for all incoming messages
- IntercomChimeSettings
- Intercom chime settings
- IntercomFunction
- Intercom function structure
- IntercomHandsetAlerts
- Intercom handset audio alerts
- IntercomHandsetAudioData
- Intercom handset audio data
- IntercomHandsetFeatures
- Intercom handset audio features
- IntercomHandsetMetadata
- Intercom handset audio metadata
- IntercomHandsetSettings
- Intercom handset audio settings
- IntercomSettings
- Intercom settings
- KeepAliveSettings
- Keep alive settings
- Location
- Represents a physical Ring location (home/building)
- LocationAddress
- Location address structure
- LocationModeActionConstants
- Location mode action constants
- LocationModeConstants
- Location mode constants
- LocationModeInputConstants
- Location mode input constants
- LocationModeResponse
- Location mode response
- LocationModeSecurityStatus
- Location mode security status
- LocationModeSetting
- Location mode setting for a device
- LocationModeSettings
- Location mode settings for all modes
- LocationModeSettingsResponse
- Location mode settings response
- LocationModeSharing
- Location mode sharing settings
- LocationOptions
- Options for Location configuration
- MotionSettings
- Motion settings
- MotionSnooze
- Motion snooze structure
- MotionZones
- Motion zones structure
- NotificationBody
- NotificationDetectionType
- Notification detection type constants
- NotificationMessage
- Notification message
- NotYetParticipatingDevice
- Not yet participating device
- OnvifCameraData
- ONVIF camera data
- OnvifCameraMetadata
- ONVIF camera metadata
- OnvifThirdPartyProperties
- ONVIF camera third party properties
- PaginationMeta
- Pagination metadata
- PeriodicalFootage
- Periodical footage structure
- PeriodicFootageMeta
- Periodic footage metadata
- PeriodicFootageResponse
- Periodic footage response
- PirSettings
- PIR settings
- PongMessage
- Pong message
- ProfileResponse
- Profile response
- PushNotificationAction
- Push notification action constants
- PushNotificationAlarm
- Push notification alarm inner structure
- PushNotificationAlarmGcmData
- Push notification alarm GCM data wrapper
- PushNotificationAlarmMeta
- Push notification alarm meta
- PushNotificationAlarmV2
- Push notification alarm v2 wrapper
- PushNotificationAnalytics
- Push notification analytics
- PushNotificationAndroidConfig
- Push notification Android config
- PushNotificationAps
- Push notification APS (Apple Push Service) structure
- PushNotificationDevice
- Push notification device
- PushNotificationDing
- Push notification ding details
- PushNotificationDingData
- Push notification data payload
- PushNotificationDingV2
- Push notification ding v2 (for motion/ding events)
- PushNotificationEvent
- Push notification event
- PushNotificationEventito
- Push notification eventito
- PushNotificationImage
- Push notification image
- PushNotificationIntercomUnlock
- Push notification intercom unlock inner structure
- PushNotificationIntercomUnlockGcmData
- Push notification intercom unlock GCM data wrapper
- PushNotificationIntercomUnlockV2
- Push notification intercom unlock v2 wrapper
- PushNotificationLiveSession
- Push notification live session
- PushNotificationLocation
- Push notification location
- RefreshTokenAuth
- Refresh token-based authentication
- RefreshTokenUpdate
- Refresh token update event
- RequestOptions
- Request options for HTTP calls
- RingApi
- Main Ring API client
- RingApiOptions
- Options for configuring the Ring API client
- RingCamera
- Ring camera device
- RingCameraKind
- Ring camera kinds
- RingCameraModel
- Mapping of camera kinds to model names
- RingChime
- Represents a Ring Chime or Chime Pro device
- RingDevice
- Represents a Ring device (Z-Wave or other connected device)
- RingDeviceCategory
- Ring device categories
- RingDeviceData
- Main ring device data structure
- RingDeviceHistoryEvent
- Ring device history event
- RingDevicesResponse
- Response from fetchRingDevices containing all device types
- RingDeviceType
- Ring device types as string constants
- RingIntercom
- Represents a Ring Intercom device
- RingLogger
- Logger interface for custom logging implementations
- RingRestClient
- Main REST client for Ring API
- RingtoneAudio
- Ringtone audio structure
- RingtoneOptions
- Ringtone options structure
- RTCIceCandidate
- ICE candidate for WebRTC connection
- ServerSettings
- Server settings structure
- SessionBody
- Session body common to all messages
- SessionCreatedMessage
- Session created message
- SessionDescription
- SDP offer/answer
- SessionStartedMessage
- Session started message
- SheilaSettings
- Sheila settings structure
- SimpleWebRtcSession
- Simple WebRTC session placeholder - use ring_camera for full implementation
- SirenInfo
- Siren info structure
- SirenStatus
- Siren status structure
- SnapshotSettings
- Snapshot settings
- SocketIoMessage
- Socket.IO message structure
- SocketTicketResponse
- Socket ticket response
- StreamInfoBody
- StreamInfoMessage
- Stream info message
- StreamingSession
- Streaming session placeholder - use ring_camera for full implementation
- Subscribed
- Base class for objects that manage stream subscriptions
- ThirdPartyGarageDoorOpener
- Third party garage door opener
- ThirdPartyGdoMetadata
- Third party garage door opener metadata
- ThirdPartyGdoProperties
- Third party garage door opener properties
- TicketAsset
- Ticket asset structure
- TwoStageVerificationStateConstants
- Two-stage verification state constants
- UnknownDevice
- Unknown device structure
- UserLocation
- User location structure
- UserPreferences
- User preferences
- UserProfile
- User profile
- VideoSearchResponse
- Video search response
- VideoSearchResult
- Video search result
- VideoSettings
- Video settings
- VodSettings
- VOD settings
- VolumeSettings
- Volume settings
- WeriftPeerConnection
- Stub implementation of WeriftPeerConnection
Enums
- AcStatus
- AC power status
- AlarmMode
- Alarm mode states
- AlarmState
- Alarm states
- BatteryBackup
- Battery backup status
- BatteryStatus
- Battery status
- ChimeSoundKind
- Chime sound kinds
- CloseReasonCode
- Close reason codes
- ConnectionState
- Connection states for WebRTC peer connection
- LockStatus
- Lock status
- MessageDataType
- Message data types
- MessageType
- Message types for Socket.IO communication
- MotionStatus
- Motion status
- ResponseType
- Response type: JSON or buffer
- SirenState
- Siren state
- TamperStatus
- Tamper status
- ThermostatMode
- Thermostat mode states
Constants
-
allAlarmStates
→ const List<
AlarmState> - All possible alarm states
- apiVersion → const int
- appApiBaseUrl → const String
- clientApiBaseUrl → const String
- API base URLs
- commandsApiBaseUrl → const String
- deviceApiBaseUrl → const String
- deviceListMessageType → const String
- Message type for device list requests
-
deviceTypesWithVolume
→ const List<
String> - Devices that support volume control
-
disabledLocationModes
→ const List<
String> - Disabled location modes
- fullDayMs → const int
- maxSnapshotRefreshSeconds → const int
- Constants
-
ringErrorCodes
→ const Map<
int, String> - Ring API error codes
-
ringIceServers
→ const List<
String> - ICE server URLs used by Ring cameras
-
settingsWhichRequireReboot
→ const List<
String> - Settings that require a chime reboot when changed
Properties
-
enabledDoorbellTypes
→ Set<
int> -
Set of enabled doorbell types
final
-
wiredModelsWithNoSnapshotDuringRecording
→ Set<
String> -
Set of wired camera models that cannot take snapshots during recording
final
Functions
-
appApi(
String path) → String - Helper function to build app API URL
-
buildSearchString(
Map< String, dynamic> search) → String - Build a URL query string from a map
-
cleanSnapshotUuid(
String? uuid) → String? - Clean snapshot UUID by removing everything after colon
-
clearTimeouts(
) → void - Clear all active timers
-
clientApi(
String path) → String - Helper function to build client API URL
-
commandsApi(
String path) → String - Helper function to build commands API URL
-
delay(
int milliseconds) → Future< void> - Delay execution for a specified number of milliseconds
-
deviceApi(
String path) → String - Helper function to build device API URL
-
enableDebug(
) → void - Enable debug logging
-
flattenDeviceData(
dynamic data) → RingDeviceData - Flatten device data from nested structure
-
fromBase64(
String encodedInput) → String - Decode base64 string
-
generateUuid(
[String? seed]) → String - Generate a UUID, optionally from a seed
-
getBatteryLevel(
dynamic data) → double? - Get battery level from camera data
-
getEndOfToday(
) → int - Get end of today in milliseconds
-
getHardwareId(
[String? systemId]) → Future< String> - Get a hardware ID for this system
-
getSearchQueryString(
Map< String, dynamic> options) → String - Build search query string from options
-
getStartOfToday(
) → int - Get start of today in milliseconds
-
isWebSocketSupportedAsset(
{required String kind}) → bool - Helper function to check if WebSocket is supported for an asset
-
logDebug(
dynamic message) → void - Log a debug message (only if debug is enabled)
-
logError(
dynamic message) → void - Log an error message
-
logInfo(
dynamic message) → void - Log an info message
-
mapAsync<
T, U> (List< T> records, Future<U> asyncMapper(T record)) → Future<List< U> > - Map a list of items asynchronously
-
parseBatteryLife(
dynamic batteryLife) → double? - Parse battery life from string or number
-
randomInteger(
) → int - Generate a random integer
-
randomString(
int length) → String - Generate a random string of specified length
-
requestInput(
String question) → Future< String> - Request input from stdin (for CLI tools)
-
requestWithRetry<
T> (RequestOptions options, {int retryCount = 0, Client? client}) → Future< DataResponse< T> > - Make HTTP request with retry logic
-
retryWithDelay<
T> (Future< T> fn(), {int maxRetries = 3, int initialDelayMs = 1000, double backoffMultiplier = 2.0}) → Future<T> - Retry a function with exponential backoff
-
stringify(
dynamic data) → String - Convert any data to a string representation
-
toBase64(
String input) → String - Encode string to base64
-
useLogger(
RingLogger logger) → void - Set a custom logger
Typedefs
- AnyCameraData = Object
- Union type for camera data - either CameraData or OnvifCameraData
- AssetKind = String
- Asset kinds
- DingKind = String
- Ding kind type Represents various event types for cameras and doorbells
- DingState = String
- Ding state type
- Firmware = String
- HealthCategory = String?
- Health category type Can be 'very_poor', 'poor', 'good', 'very_good', 'unknown', 'NA', or other string
- LocationMode = String
- Location mode type (includes disabled states)
- LocationModeAction = String
- Location mode action type
- LocationModeInput = String
- Location mode input type
-
Promise<
T> = Future< T> - Type alias for Promise (Future)
- SessionResponse = ProfileResponse
- Session response (alias for ProfileResponse)
- TwoStageVerificationState = String
- Two-stage verification state
Exceptions / Errors
- ResponseError
- Custom error for HTTP responses