module ChimeSdk::Controller::Attendees::Mixin
Controller
implementation to be included in custom attendees controllers.
Public Instance Methods
POST /meetings/:meeting_id/attendees
# File lib/chime_sdk/controller/attendees.rb, line 27 def create create_attendee render status: 201, json: @attendee end
DELETE /meetings/:meeting_id/attendees/:attendee_id
# File lib/chime_sdk/controller/attendees.rb, line 33 def destroy delete_attendee head 204 end
GET /meetings/:meeting_id/attendees
# File lib/chime_sdk/controller/attendees.rb, line 15 def index list_attendees render json: { attendees: @attendees } end
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
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
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
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
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
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
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
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
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