Class: Infrawrench::SlackInstallationsNamespace
- Inherits:
-
Object
- Object
- Infrawrench::SlackInstallationsNamespace
- Defined in:
- lib/infrawrench/client.rb,
sig/infrawrench/sdk.rbs
Overview
client.slack.installations
Instance Method Summary collapse
-
#available_channels(installation_id:, org_id: nil, request_options: nil) ⇒ Hash
List channels the connected workspace can see.
-
#delete(installation_id:, org_id: nil, request_options: nil) ⇒ Hash
Disconnect a Slack workspace.
-
#initialize(transport) ⇒ SlackInstallationsNamespace
constructor
private
A new instance of SlackInstallationsNamespace.
Constructor Details
#initialize(transport) ⇒ SlackInstallationsNamespace
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Returns a new instance of SlackInstallationsNamespace.
3582 3583 3584 |
# File 'lib/infrawrench/client.rb', line 3582 def initialize(transport) @transport = transport end |
Instance Method Details
#available_channels(installation_id:, org_id: nil, request_options: nil) ⇒ Hash
List channels the connected workspace can see
Live call to Slack's conversations.list, for populating a channel picker. Returns non-archived public and private channels visible to the bot.
GET /api/org/orgId/slack/installations/installationId/available-channels
Raises on 400: Bad request
3602 3603 3604 3605 3606 3607 3608 3609 |
# File 'lib/infrawrench/client.rb', line 3602 def available_channels(installation_id:, org_id: nil, request_options: nil) @transport.request( http_method: "GET", path: "/api/org/{orgId}/slack/installations/{installationId}/available-channels", path_params: { "orgId" => org_id, "installationId" => installation_id }, request_options: ) end |
#delete(installation_id:, org_id: nil, request_options: nil) ⇒ Hash
Disconnect a Slack workspace
Stops all delivery to this workspace. The channel routing is retained, so re-installing restores it.
DELETE /api/org/orgId/slack/installations/installationId
Raises on 404: Not found
3626 3627 3628 3629 3630 3631 3632 3633 |
# File 'lib/infrawrench/client.rb', line 3626 def delete(installation_id:, org_id: nil, request_options: nil) @transport.request( http_method: "DELETE", path: "/api/org/{orgId}/slack/installations/{installationId}", path_params: { "orgId" => org_id, "installationId" => installation_id }, request_options: ) end |