module ChimeSdk::Controller::Attendees::Mixin

Controller implementation to be included in custom attendees controllers.

Public Instance Methods

create() click to toggle source

POST /meetings/:meeting_id/attendees

# File lib/chime_sdk/controller/attendees.rb, line 27
def create
  create_attendee
  render status: 201, json: @attendee
end
destroy() click to toggle source

DELETE /meetings/:meeting_id/attendees/:attendee_id

# File lib/chime_sdk/controller/attendees.rb, line 33
def destroy
  delete_attendee
  head 204
end
index() click to toggle source

GET /meetings/:meeting_id/attendees

# File lib/chime_sdk/controller/attendees.rb, line 15
def index
  list_attendees
  render json: { attendees: @attendees }
end
show() click to toggle source

GET /meetings/:meeting_id/attendees/:attendee_id

# File lib/chime_sdk/controller/attendees.rb, line 21
def show
  get_attendee
  render json: @attendee
end

Protected Instance Methods

application_attendee_metadata(attendee) click to toggle source

Appication metadata that attendees API returns as JSON response included in attendee resource. This is an optional parameter and configure it depending on your application. @api protected @param [Hash] attendee Attendee JSON object as hash @return [Hash] Appication metadata for attendees

# File lib/chime_sdk/controller/attendees.rb, line 120
def application_attendee_metadata(attendee)
  {}
end
attendee_id_param() click to toggle source

Request parameter representing attendee id such as params. Configure it depending on your application routes. @api protected @return [String, Integer] Attendee id from request parameter

# File lib/chime_sdk/controller/attendees.rb, line 54
def attendee_id_param
  params[:id]
end
attendee_request_id() click to toggle source

Unique attendee request id to identify attendee by Amazon Chime. Configure it depending on your application resources to identify attendee. For example, set “User-#{current_user.id}” by User model. @api protected @return [String] Unique attendee request id to identify attendee by Amazon Chime

# File lib/chime_sdk/controller/attendees.rb, line 63
def attendee_request_id
  "default"
end
attendee_resource_path(meeting_id, attendee_id, params = {}) click to toggle source

Path for attendees#show action such as attendee_path(meeting_id, attendee_id). Configure it depending on your application routes. @api protected @param [String] meeting_id Meeting id @param [String] attendee_id Attendee id @param [Hash] params Request parameters for path method @return [String] Path for attendees#index action such as attendees_path(meeting_id)

# File lib/chime_sdk/controller/attendees.rb, line 103
def attendee_resource_path(meeting_id, attendee_id, params = {})
  attendee_path(meeting_id, attendee_id, params)
end
attendee_resources_path(meeting_id, params = {}) click to toggle source

Path for attendees#index action such as attendees_path(meeting_id). Configure it depending on your application routes. @api protected @param [String] meeting_id Meeting id @param [Hash] params Request parameters for path method @return [String] Path for attendees#index action such as attendees_path(meeting_id)

# File lib/chime_sdk/controller/attendees.rb, line 92
def attendee_resources_path(meeting_id, params = {})
  attendees_path(meeting_id, params)
end
meeting_id_param() click to toggle source

Request parameter representing meeting id such as params. Configure it depending on your application routes. @api protected @return [String, Integer] Meeting id from request parameter

# File lib/chime_sdk/controller/attendees.rb, line 46
def meeting_id_param
  params[:meeting_id]
end
meeting_resource_path(meeting_id, params = {}) click to toggle source

Path for meetings#show action such as meeting_path(meeting_id). Configure it depending on your application routes. @api protected @param [String] meeting_id Meeting id @param [Hash] params Request parameters for path method @return [String] Path for meetings#show action such as meeting_path(meeting_id)

# File lib/chime_sdk/controller/attendees.rb, line 82
def meeting_resource_path(meeting_id, params = {})
  meeting_path(meeting_id, params)
end
meeting_resources_path(params = {}) click to toggle source

Path for meetings#index action such as meetings_path. Configure it depending on your application routes. @api protected @param [Hash] params Request parameters for path method @return [String] Path for meetings#index action such as meetings_path

# File lib/chime_sdk/controller/attendees.rb, line 72
def meeting_resources_path(params = {})
  meetings_path(params)
end
optional_attendee_tags() click to toggle source

Optional attendee tags to pass to Amazon Chime. This is an optional parameter and configure it depending on your application. @api protected @return [Array<Hash>] Optional tags for attendees

# File lib/chime_sdk/controller/attendees.rb, line 111
def optional_attendee_tags
  []
end