Class: SlackWebApi::FilesCommentsController
- Inherits:
-
BaseController
- Object
- BaseController
- SlackWebApi::FilesCommentsController
- Defined in:
- lib/slack_web_api/controllers/files_comments_controller.rb
Overview
FilesCommentsController
Constant Summary
Constants inherited from BaseController
Instance Attribute Summary
Attributes inherited from BaseController
Instance Method Summary collapse
-
#files_comments_delete(token: nil, file: nil, id: nil) ⇒ ApiResponse
Deletes an existing comment on a file.
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
#files_comments_delete(token: nil, file: nil, id: nil) ⇒ ApiResponse
Deletes an existing comment on a file. scope: files:write:user
15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 |
# File 'lib/slack_web_api/controllers/files_comments_controller.rb', line 15 def files_comments_delete(token: nil, file: nil, id: nil) @api_call .request(new_request_builder(HttpMethodEnum::POST, '/files.comments.delete', Server::DEFAULT) .header_param(new_parameter(token, key: 'token')) .form_param(new_parameter(file, key: 'file')) .form_param(new_parameter(id, key: 'id')) .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(FilesCommentsDeleteSchema.method(:from_hash)) .is_api_response(true) .local_error('default', 'Standard failure response when used with an invalid token', FilesCommentsDeleteErrorSchemaException)) .execute end |