Module: Cloudflare::RealtimeKit
- Defined in:
- lib/cloudflare/realtime_kit.rb,
lib/cloudflare/realtime_kit/app.rb,
lib/cloudflare/realtime_kit/chat.rb,
lib/cloudflare/realtime_kit/preset.rb,
lib/cloudflare/realtime_kit/meeting.rb,
lib/cloudflare/realtime_kit/session.rb,
lib/cloudflare/realtime_kit/summary.rb,
lib/cloudflare/realtime_kit/webhook.rb,
lib/cloudflare/realtime_kit/analytics.rb,
lib/cloudflare/realtime_kit/recording.rb,
lib/cloudflare/realtime_kit/livestream.rb,
lib/cloudflare/realtime_kit/transcript.rb,
lib/cloudflare/realtime_kit/participant.rb,
lib/cloudflare/realtime_kit/active_session.rb,
lib/cloudflare/realtime_kit/livestream_session.rb,
lib/cloudflare/realtime_kit/session_participant.rb,
lib/cloudflare/realtime_kit/active_livestream_session.rb
Overview
Cloudflare RealtimeKit (formerly Dyte) — managed video/audio infrastructure for meetings, livestreams, recordings, sessions, and analytics. Each resource maps to a hand-written class under this namespace.
Defaults
Most resources (Meeting, Participant, Recording, …) live under an app. Set app_id once at process boot and every call defaults to it; pass app_id: per-call only to override.
api_token is the per-product token. Resolution chain when a request fires: per-call api_token: kwarg → Cloudflare::RealtimeKit.api_token → Cloudflare.api_token (top-level fallback) → raise.
Per-product tokens let you scope each product’s credentials tightly (e.g., a token with Realtime: Edit only) and rotate them independently. Top-level Cloudflare.api_token stays as a fallback for callers who don’t want per-product separation.
Cloudflare::RealtimeKit.api_token = ENV["REALTIMEKIT_API_TOKEN"]
Cloudflare::RealtimeKit.app_id = ENV["REALTIMEKIT_APP_ID"]
Cloudflare::RealtimeKit::Meeting.create(title: "Standup") # uses defaults
Cloudflare::RealtimeKit::Meeting.find(id, app_id: "other-app-id") # override
Defined Under Namespace
Modules: Analytics Classes: ActiveLivestreamSession, ActiveSession, App, Chat, Livestream, LivestreamSession, Meeting, Participant, Preset, Recording, Session, SessionParticipant, Summary, Transcript, Webhook
Class Attribute Summary collapse
-
.api_token ⇒ Object
Per-product API token.
-
.app_id ⇒ Object
Default app_id used when a resource call doesn’t pass one explicitly.
Class Attribute Details
.api_token ⇒ Object
Per-product API token. Falls back to Cloudflare.api_token when nil.
32 33 34 |
# File 'lib/cloudflare/realtime_kit.rb', line 32 def api_token @api_token end |
.app_id ⇒ Object
Default app_id used when a resource call doesn’t pass one explicitly.
29 30 31 |
# File 'lib/cloudflare/realtime_kit.rb', line 29 def app_id @app_id end |