Slack v0.2.1 Slack.File View Source

Functions for working with files in Slack

Link to this section Summary

Functions

Delete a file from the team.

Get information about a file.

List files within the team.

Disable public sharing for a file.

Enable public sharing for a file.

Link to this section Functions

Delete a file from the team.

https://api.slack.com/methods/files.delete

Examples

Slack.client(token)
|> Slack.File.delete(file: "F1234467890")

Get information about a file.

https://api.slack.com/methods/files.info

Examples

Slack.client(token)
|> Slack.File.info(file: "F1234467890")

List files within the team.

https://api.slack.com/methods/files.list

Examples

Slack.client(token)
|> Slack.File.list
Link to this function

revokePublicURL(client, body \\ [])

View Source
revokePublicURL(Slack.Client.t(), Keyword.t()) :: Slack.slack_response()

Disable public sharing for a file.

https://api.slack.com/methods/files.revokePublicURL

Examples

Slack.client(token)
|> Slack.File.revokePublicURL(file: "F1234467890")
Link to this function

sharedPublicURL(client, body \\ [])

View Source
sharedPublicURL(Slack.Client.t(), Keyword.t()) :: Slack.slack_response()

Enable public sharing for a file.

https://api.slack.com/methods/files.sharedPublicURL

Examples

Slack.client(token)
|> Slack.File.sharedPublicURL(file: "F1234467890")

Upload a file.

https://api.slack.com/methods/files.upload

Examples

Slack.client(token)
|> Slack.File.upload(content: "File contents")