Documentation
¶
Overview ¶
Package protocol contains Ring wire endpoint defaults used by the client.
Index ¶
Constants ¶
const ( DefaultUserAgent = "android:com.ringapp" RingClientID = "ring_official_android" RingScope = "client" )
const ( OAuthBaseURL = "https://oauth.ring.com" APIBaseURL = "https://api.ring.com" USSolutionsBaseURL = "https://prd-api-us.prd.rings.solutions" SignalingURL = "" /* 140-byte string literal not displayed */ ExperimentalEventWebSocketURL = "wss://api.ring.com/clients_api/ws" OAuthTokenPath = "/oauth/token" OAuthAuthorizePath = "/oauth/v2/authorize" OAuthSigninPath = "/oauth/v2/signin" OAuthCallbackURL = "https://ring.com/signin/callback" TicketPath = "/api/v1/clap/ticket/request/signalsocket" DevicesPath = "/clients_api/ring_devices" DevicesV3Path = "/device_info/v3/devices" DeviceDetailV3Path = "/device_info/v3/devices/{id}" LocationListV3Path = "/location_info/v3/locations" LocationDetailV4Path = "/location_info/v4/locations/{id}" LocationGroupsPath = "/groups/v1/locations/{id}/groups" LocationDevicesPath = "/groups/v1/locations/{id}/devices" DeviceTimelinePath = "/evm/v2/timeline/devices/{id}" HistoryDevicesPath = "/evm/v3/history/devices" CapturedTicketsPath = "/api/v1/clap/tickets" DeviceCommandPath = "/commands/v1/devices/{id}" PersistentLiveViewPath = "/duos/v1/devices/{id}/update" RecordingFavoritePath = "/clients_api/dings/{id}/favorite" RecordingDeletePath = "/clients_api/dings/{id}" SessionPath = "/clients_api/session" DingsActivePath = "/clients_api/dings/active" DingsHistoryPath = "/clients_api/dings/history" DoorbotHistoryPath = "/clients_api/doorbots/{id}/history" RecordingPath = "/clients_api/dings/{id}/recording" DeviceSettingsPath = "/devices/v1/devices/{id}/settings" DoorbotSirenOnPath = "/clients_api/doorbots/{id}/siren_on" DoorbotSirenOffPath = "/clients_api/doorbots/{id}/siren_off" LegacyChimePath = "/clients_api/chimes/{id}" LegacyDoorbotPath = "/clients_api/doorbots/{id}" LegacyChimeSoundPath = "/clients_api/chimes/{id}/play_sound" DoorbotLightOnPath = "/clients_api/doorbots/{id}/floodlight_light_on" DoorbotLightOffPath = "/clients_api/doorbots/{id}/floodlight_light_off" LegacySnapshotTimestampPath = "/clients_api/snapshots/timestamps" LegacySnapshotImagePath = "/clients_api/snapshots/image/{id}" )
const ( MethodLiveView = "live_view" MethodPlayback = "playback" MethodSDP = "sdp" MethodICE = "ice" MethodSessionCreated = "session_created" MethodActivateSession = "activate_session" MethodCameraStarted = "camera_started" MethodCameraOptions = "camera_options" MethodMicEnable = "mic_enable" MethodStreamOptions = "stream_options" MethodClose = "close" MethodPing = "ping" MethodPong = "pong" MethodRPC = "rpc" MethodNotification = "notification" MethodPushSubscribe = "push_subscribe" MethodPushSubscriptionAck = "push_subscription_ack" MethodPushHeartbeat = "push_heartbeat" MethodPushEvent = "push_event" MethodPushUnsubscribe = "push_unsubscribe" RPCPanStep = "PTZ.Pan.Step" RPCTiltStep = "PTZ.Tilt.Step" RPCPanContinuous = "PTZ.Pan.Continuous" RPCTiltContinuous = "PTZ.Tilt.Continuous" RPCPanHalted = "PTZ.Pan.Halted" JSONRPCVersion = "2.0" PTZVersion = 1 PTZMaxSpeed = 1.0 PanLeft = "LEFT" PanRight = "RIGHT" TiltUp = "UP" TiltDown = "DOWN" SDPTypeOffer = "offer" SDPTypeAnswer = "answer" SubscriptionStatusOK = "ok" SDPSendRecv = "sendrecv" SDPSendOnly = "sendonly" SDPRecvOnly = "recvonly" SDPInactive = "inactive" )
Signaling wire methods. These names follow the committed AsyncAPI payloads; lifecycle defaults belong to internal/signaling/policy.go instead.
const ( FieldDeviceID = "doorbot_id" FieldSessionID = "session_id" FieldEnabled = "enabled" FieldAudioEnabled = "audio_enabled" FieldVideoEnabled = "video_enabled" FieldDirection = "direction" FieldSpeed = "speed" FieldSessionIDRPC = "sessionId" FieldTimestamp = "timestamp" FieldVersion = "version" FieldCommand = "command" )
JSON keys used by the dynamic session and PTZ payloads. Typed wire bodies should be used where the payload shape is fixed.
const JWTCompactSegmentCount = 3
JWTCompactSegmentCount is the number of dot-separated parts in a compact JWS.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type EndpointSet ¶
type EndpointSet struct {
OAuthBaseURL string
APIBaseURL string
SolutionsBaseURL string
SignalingURL string
}
EndpointSet contains per-client service origins. Empty values inherit the selected region's evidenced defaults; URLs must be absolute HTTP(S)/WS(S).
func Profile ¶
func Profile(region string) EndpointSet
Profile returns the verified endpoint defaults for a region. Ring's public API and OAuth hosts are established, while only the US Solutions bootstrap origin is evidenced. EU and FE callers must provide SolutionsBaseURL.