Class: SlackWebApi::CallsParticipantsController
- Inherits:
-
BaseController
- Object
- BaseController
- SlackWebApi::CallsParticipantsController
- Defined in:
- lib/slack_web_api/controllers/calls_participants_controller.rb
Overview
CallsParticipantsController
Constant Summary
Constants inherited from BaseController
Instance Attribute Summary
Attributes inherited from BaseController
Instance Method Summary collapse
-
#calls_participants_add(token, id, users) ⇒ ApiResponse
Registers new participants added to a Call.
-
#calls_participants_remove(token, id, users) ⇒ ApiResponse
Registers participants removed from a Call.
Methods inherited from BaseController
#initialize, #new_parameter, #new_request_builder, #new_response_handler, user_agent, user_agent_parameters
Constructor Details
This class inherits a constructor from SlackWebApi::BaseController
Instance Method Details
#calls_participants_add(token, id, users) ⇒ ApiResponse
Registers new participants added to a Call. scope: calls:write [calls.add](/methods/calls.add) method. participants in the Call. [Read more on how to specify users here](/apis/calls#users).
18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 |
# File 'lib/slack_web_api/controllers/calls_participants_controller.rb', line 18 def calls_participants_add(token, id, users) @api_call .request(new_request_builder(HttpMethodEnum::POST, '/calls.participants.add', Server::DEFAULT) .header_param(new_parameter(token, key: 'token') .is_required(true)) .form_param(new_parameter(id, key: 'id') .is_required(true)) .form_param(new_parameter(users, key: 'users') .is_required(true)) .header_param(new_parameter('application/x-www-form-urlencoded', key: 'content-type')) .header_param(new_parameter('application/json', key: 'accept')) .auth(Single.new('slackAuth'))) .response(new_response_handler .deserializer(APIHelper.method(:custom_type_deserializer)) .deserialize_into(DefaultSuccessTemplate.method(:from_hash)) .is_api_response(true) .local_error('default', 'Typical error response', DefaultErrorTemplateException)) .execute end |
#calls_participants_remove(token, id, users) ⇒ ApiResponse
Registers participants removed from a Call. scope: calls:write [calls.add](/methods/calls.add) method. participants in the Call. [Read more on how to specify users here](/apis/calls#users).
53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 |
# File 'lib/slack_web_api/controllers/calls_participants_controller.rb', line 53 def calls_participants_remove(token, id, users) @api_call .request(new_request_builder(HttpMethodEnum::POST, '/calls.participants.remove', Server::DEFAULT) .header_param(new_parameter(token, key: 'token') .is_required(true)) .form_param(new_parameter(id, key: 'id') .is_required(true)) .form_param(new_parameter(users, key: 'users') .is_required(true)) .header_param(new_parameter('application/x-www-form-urlencoded', key: 'content-type')) .header_param(new_parameter('application/json', key: 'accept')) .auth(Single.new('slackAuth'))) .response(new_response_handler .deserializer(APIHelper.method(:custom_type_deserializer)) .deserialize_into(DefaultSuccessTemplate.method(:from_hash)) .is_api_response(true) .local_error('default', 'Typical error response', DefaultErrorTemplateException)) .execute end |