Class: SlackWebApi::AdminInviteRequestsController
- Inherits:
-
BaseController
- Object
- BaseController
- SlackWebApi::AdminInviteRequestsController
- Defined in:
- lib/slack_web_api/controllers/admin_invite_requests_controller.rb
Overview
AdminInviteRequestsController
Constant Summary
Constants inherited from BaseController
Instance Attribute Summary
Attributes inherited from BaseController
Instance Method Summary collapse
-
#admin_invite_requests_approve(token, invite_request_id, team_id: nil) ⇒ ApiResponse
Approve a workspace invite request.
-
#admin_invite_requests_deny(token, invite_request_id, team_id: nil) ⇒ ApiResponse
Deny a workspace invite request.
-
#admin_invite_requests_list(token, team_id: nil, cursor: nil, limit: nil) ⇒ ApiResponse
List all pending workspace invite requests.
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
#admin_invite_requests_approve(token, invite_request_id, team_id: nil) ⇒ ApiResponse
Approve a workspace invite request. scope: admin.invites:write invite. invite request was made.
17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 |
# File 'lib/slack_web_api/controllers/admin_invite_requests_controller.rb', line 17 def admin_invite_requests_approve(token, invite_request_id, team_id: nil) @api_call .request(new_request_builder(HttpMethodEnum::POST, '/admin.inviteRequests.approve', Server::DEFAULT) .header_param(new_parameter(token, key: 'token') .is_required(true)) .form_param(new_parameter(invite_request_id, key: 'invite_request_id') .is_required(true)) .form_param(new_parameter(team_id, key: 'team_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(DefaultSuccessTemplate.method(:from_hash)) .is_api_response(true) .local_error('default', 'Typical error response', DefaultErrorTemplateException)) .execute end |
#admin_invite_requests_deny(token, invite_request_id, team_id: nil) ⇒ ApiResponse
Deny a workspace invite request. scope: admin.invites:write invite. invite request was made.
50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 |
# File 'lib/slack_web_api/controllers/admin_invite_requests_controller.rb', line 50 def admin_invite_requests_deny(token, invite_request_id, team_id: nil) @api_call .request(new_request_builder(HttpMethodEnum::POST, '/admin.inviteRequests.deny', Server::DEFAULT) .header_param(new_parameter(token, key: 'token') .is_required(true)) .form_param(new_parameter(invite_request_id, key: 'invite_request_id') .is_required(true)) .form_param(new_parameter(team_id, key: 'team_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(DefaultSuccessTemplate.method(:from_hash)) .is_api_response(true) .local_error('default', 'Typical error response', DefaultErrorTemplateException)) .execute end |
#admin_invite_requests_list(token, team_id: nil, cursor: nil, limit: nil) ⇒ ApiResponse
List all pending workspace invite requests. scope: admin.invites:read invite requests were made. field sent as part of the previous API response be returned by the API on each invocation. Must be between 1 - 1000, both inclusive
86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 |
# File 'lib/slack_web_api/controllers/admin_invite_requests_controller.rb', line 86 def admin_invite_requests_list(token, team_id: nil, cursor: nil, limit: nil) @api_call .request(new_request_builder(HttpMethodEnum::GET, '/admin.inviteRequests.list', Server::DEFAULT) .header_param(new_parameter(token, key: 'token') .is_required(true)) .header_param(new_parameter('application/x-www-form-urlencoded', key: 'Content-Type')) .query_param(new_parameter(team_id, key: 'team_id')) .query_param(new_parameter(cursor, key: 'cursor')) .query_param(new_parameter(limit, key: 'limit')) .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 |