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.
3316 3317 3318 |
# File 'lib/infrawrench/client.rb', line 3316 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
3336 3337 3338 3339 3340 3341 3342 3343 |
# File 'lib/infrawrench/client.rb', line 3336 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
3360 3361 3362 3363 3364 3365 3366 3367 |
# File 'lib/infrawrench/client.rb', line 3360 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 |