(channels-list & {:as args})
Calls Slack api channels.list
function and returns the list of available channels.
Calls Slack api `channels.list` function and returns the list of available channels.
(files-channel)
Calls Slack api channels.info
to check whether a channel named #metabase_files exists. If it doesn't, throws an
error that advices an admin to create it.
Calls Slack api `channels.info` to check whether a channel named #metabase_files exists. If it doesn't, throws an error that advices an admin to create it.
(GET endpoint & {:as params})
Make a GET request to the Slack API.
Make a GET request to the Slack API.
(POST endpoint & {:as params})
Make a POST request to the Slack API.
Make a POST request to the Slack API.
(post-chat-message! channel-id text-or-nil & [attachments])
Inputs: [channel-id :- su/NonBlankString text-or-nil :- (s/maybe s/Str) & [attachments]]
Calls Slack api chat.postMessage
function and posts a message to a given channel. attachments
should be
serialized JSON.
Inputs: [channel-id :- su/NonBlankString text-or-nil :- (s/maybe s/Str) & [attachments]] Calls Slack api `chat.postMessage` function and posts a message to a given channel. `attachments` should be serialized JSON.
(slack-configured?)
Is Slack integration configured?
Is Slack integration configured?
(slack-token)
(slack-token new-value)
Slack API bearer token obtained from https://api.slack.com/web#authentication
slack-token
is a string Setting. You can get its value by calling:
(slack-token)
and set its value by calling:
(slack-token <new-value>)
You can also set its value with the env var MB_SLACK_TOKEN
.
Clear its value by calling:
(slack-token nil)
Its default value is nil
.
Slack API bearer token obtained from https://api.slack.com/web#authentication `slack-token` is a string Setting. You can get its value by calling: (slack-token) and set its value by calling: (slack-token <new-value>) You can also set its value with the env var `MB_SLACK_TOKEN`. Clear its value by calling: (slack-token nil) Its default value is `nil`.
(upload-file! file filename channel-ids-str)
Inputs: [file :- NonEmptyByteArray filename :- su/NonBlankString channel-ids-str :- su/NonBlankString]
Calls Slack api files.upload
function and returns the body of the uploaded file.
Inputs: [file :- NonEmptyByteArray filename :- su/NonBlankString channel-ids-str :- su/NonBlankString] Calls Slack api `files.upload` function and returns the body of the uploaded file.
(users-list & {:as args})
Calls Slack api users.list
function and returns the list of available users.
Calls Slack api `users.list` function and returns the list of available users.
(websocket-url & {:as params})
Return a new WebSocket URL for Slack's Real Time Messaging API This makes an API request so don't call it more often than needed.
Return a new WebSocket URL for [Slack's Real Time Messaging API](https://api.slack.com/rtm) This makes an API request so don't call it more often than needed.
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close