Module: ChimeSdk::Controller::Attendees::Mixin
- Extended by:
- ActiveSupport::Concern
- Defined in:
- lib/chime_sdk/controller/attendees.rb
Overview
Controller implementation to be included in custom attendees controllers.
Instance Method Summary collapse
-
#application_attendee_metadata(attendee) ⇒ Hash
protected
Appication metadata that attendees API returns as JSON response included in attendee resource.
-
#attendee_id_param ⇒ String, Integer
protected
Request parameter representing attendee id such as params[:id].
-
#attendee_request_id ⇒ String
protected
Unique attendee request id to identify attendee by Amazon Chime.
-
#attendee_resource_path(meeting_id, attendee_id, params = {}) ⇒ String
protected
Path for attendees#show action such as attendee_path(meeting_id, attendee_id).
-
#attendee_resources_path(meeting_id, params = {}) ⇒ String
protected
Path for attendees#index action such as attendees_path(meeting_id).
-
#create ⇒ Object
POST /meetings/:meeting_id/attendees.
-
#destroy ⇒ Object
DELETE /meetings/:meeting_id/attendees/:attendee_id.
-
#index ⇒ Object
GET /meetings/:meeting_id/attendees.
-
#meeting_id_param ⇒ String, Integer
protected
Request parameter representing meeting id such as params[:meeting_id].
-
#meeting_resource_path(meeting_id, params = {}) ⇒ String
protected
Path for meetings#show action such as meeting_path(meeting_id).
-
#meeting_resources_path(params = {}) ⇒ String
protected
Path for meetings#index action such as meetings_path.
-
#optional_attendee_tags ⇒ Array<Hash>
protected
Optional attendee tags to pass to Amazon Chime.
-
#show ⇒ Object
GET /meetings/:meeting_id/attendees/:attendee_id.
Instance Method Details
#application_attendee_metadata(attendee) ⇒ Hash (protected)
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.
120 121 122 |
# File 'lib/chime_sdk/controller/attendees.rb', line 120 def (attendee) {} end |
#attendee_id_param ⇒ String, Integer (protected)
Request parameter representing attendee id such as params[:id]. Configure it depending on your application routes.
54 55 56 |
# File 'lib/chime_sdk/controller/attendees.rb', line 54 def attendee_id_param params[:id] end |
#attendee_request_id ⇒ String (protected)
Unique attendee request id to identify attendee by Amazon Chime. Configure it depending on your application resources to identify attendee. For example, set "User-#ChimeSdk::Controller::Attendees::Mixin.current_usercurrent_user.id" by User model.
63 64 65 |
# File 'lib/chime_sdk/controller/attendees.rb', line 63 def attendee_request_id "default" end |
#attendee_resource_path(meeting_id, attendee_id, params = {}) ⇒ String (protected)
Path for attendees#show action such as attendee_path(meeting_id, attendee_id). Configure it depending on your application routes.
103 104 105 |
# 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 = {}) ⇒ String (protected)
Path for attendees#index action such as attendees_path(meeting_id). Configure it depending on your application routes.
92 93 94 |
# File 'lib/chime_sdk/controller/attendees.rb', line 92 def attendee_resources_path(meeting_id, params = {}) attendees_path(meeting_id, params) end |
#create ⇒ Object
POST /meetings/:meeting_id/attendees
27 28 29 30 |
# File 'lib/chime_sdk/controller/attendees.rb', line 27 def create create_attendee render status: 201, json: @attendee end |
#destroy ⇒ Object
DELETE /meetings/:meeting_id/attendees/:attendee_id
33 34 35 36 |
# File 'lib/chime_sdk/controller/attendees.rb', line 33 def destroy delete_attendee head 204 end |
#index ⇒ Object
GET /meetings/:meeting_id/attendees
15 16 17 18 |
# File 'lib/chime_sdk/controller/attendees.rb', line 15 def index list_attendees render json: { attendees: @attendees } end |
#meeting_id_param ⇒ String, Integer (protected)
Request parameter representing meeting id such as params[:meeting_id]. Configure it depending on your application routes.
46 47 48 |
# File 'lib/chime_sdk/controller/attendees.rb', line 46 def meeting_id_param params[:meeting_id] end |
#meeting_resource_path(meeting_id, params = {}) ⇒ String (protected)
Path for meetings#show action such as meeting_path(meeting_id). Configure it depending on your application routes.
82 83 84 |
# 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 = {}) ⇒ String (protected)
Path for meetings#index action such as meetings_path. Configure it depending on your application routes.
72 73 74 |
# File 'lib/chime_sdk/controller/attendees.rb', line 72 def meeting_resources_path(params = {}) meetings_path(params) end |
#optional_attendee_tags ⇒ Array<Hash> (protected)
Optional attendee tags to pass to Amazon Chime. This is an optional parameter and configure it depending on your application.
111 112 113 |
# File 'lib/chime_sdk/controller/attendees.rb', line 111 def [] end |
#show ⇒ Object
GET /meetings/:meeting_id/attendees/:attendee_id
21 22 23 24 |
# File 'lib/chime_sdk/controller/attendees.rb', line 21 def show get_attendee render json: @attendee end |