Class: Cloudflare::RealtimeKit::Participant

Inherits:
Cloudflare::Resource show all
Defined in:
lib/cloudflare/realtime_kit/participant.rb

Overview

A meeting participant — an invited user with a preset (host, speaker, viewer, etc.). Created in the context of a meeting via meeting.participants.create(…).

meeting.participants.create(
  custom_participant_id: "u-42",
  preset_name: "host_preset",
  name: "Alex",
  picture: "https://example.com/u/42.png"
)
participant.update(name: "Alexandra")
participant.regenerate_token
participant.destroy

Constant Summary

Constants inherited from Cloudflare::Resource

Cloudflare::Resource::ENVELOPE_KEYS

Instance Attribute Summary

Attributes inherited from Cloudflare::Resource

#scope

Instance Method Summary collapse

Methods inherited from Cloudflare::Resource

#==, #[], all, attribute, attributes, #attributes, collection_path, create, #destroy, find, has_many, has_one, #hash, #id, #initialize, member_path, read_only, read_only?, #reload, scope_params, scope_required, #set_attrs_from_response, #to_h, to_wire_keys, unwrap_envelope, #update, wire_kwarg, wire_name_for_request, wire_name_for_response

Constructor Details

This class inherits a constructor from Cloudflare::Resource

Instance Method Details

#regenerate_tokenObject

POST /meetings/meeting_id/participants/Cloudflare::Resource#id/token Mints a fresh token for an existing participant (e.g., when their previous token expired or was leaked).



33
34
35
36
37
# File 'lib/cloudflare/realtime_kit/participant.rb', line 33

def regenerate_token
  response = Connection.instance.request(:post, "#{member_path}/token")
  set_attrs_from_response(response)
  self
end