examples/

directory
v0.7.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 5, 2026 License: Apache-2.0

README

Runnable examples

Set RING_ACCESS_TOKEN for the device examples. Run token-exchange with RING_USERNAME and RING_PASSWORD if you need a token. Set RING_DEVICE_ID for reboot and live session examples, or RING_CHIME_ID for the chime sound example. For WebRTC examples, RING_ICE_SERVERS_JSON optionally supplies your ICE server configuration.

Example Command What it shows
Token exchange go run ./examples/token-exchange Requests 2FA when needed and saves tokens.
Enumerate devices go run ./examples/enumerate-devices Lists device families and IDs.
Reboot device go run ./examples/reboot-device Sends one reboot request for RING_DEVICE_ID.
Chime sound go run ./examples/chime-sound Plays the ding test sound on RING_CHIME_ID.
RTC stream go run ./examples/rtc_stream Builds a Pion offer, starts a live session, and handles ICE. Use -audio or -trickle when needed.
RTC PTZ go run ./examples/rtc_ptz Starts a live session, pans right for one second, then stops.
Session push events go run ./examples/session_push_events Subscribes to push events for one device until interrupted.
Download recordings go run ./examples/download-recordings Retrieves recording history and saves media.

The RTC examples consume incoming packets but do not render video or provide a microphone track. Press Ctrl+C to close their sessions and connections.

Directories

Path Synopsis
Example chime-sound plays the ding test sound on an explicitly selected chime.
Example chime-sound plays the ding test sound on an explicitly selected chime.
internal
exampleerrors
Package exampleerrors adds operation context to example command errors.
Package exampleerrors adds operation context to example command errors.
Example reboot-device sends the recorded reboot command to one device.
Example reboot-device sends the recorded reboot command to one device.
Example rtc_ptz opens a live camera session, pans right briefly, and stops.
Example rtc_ptz opens a live camera session, pans right briefly, and stops.
Example rtc_stream generates a local Pion SDP offer and keeps Ring's signaling session alive.
Example rtc_stream generates a local Pion SDP offer and keeps Ring's signaling session alive.
Example session_push_events subscribes to device push notifications.
Example session_push_events subscribes to device push notifications.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL