slackapi

package module
v1.0.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 20, 2021 License: MIT Imports: 17 Imported by: 1

README

Slack API GoReport GoDoc

Slack, the "messaging app for teams" offers an API that has been used to build multiple projects around it, from bots to independent clients as well as integrations with other external services. This project aims to offer a low level experience for advanced users that want to either drop the web client or interact with the API for testing purpose.

Installation CLI

go get -u github.com/cixtor/slackcli

Installation Source

package main

import (
    "fmt"
    "github.com/cixtor/slackapi"
)

func main() {
    client := slackapi.New()
    fmt.Println(client.Version())
}

Features

The client is built on top of the Bot Users documentation. Most if not all the methods available in the API are implemented and can be executed placing a colon character as the suffix of each method.

Note that the client runs with the same chat session of the user that is using the program, but technically speaking the interaction is similar to that of a bot. This offers some advantages, for example, like other APIs and integrations, bot users are free. Unlike regular users, the actions they can perform are somewhat limited. For teams on the Free Plan, each bot user counts as a separate integration.

Implemented API Endpoints

  • 🔵 means the method has been implemented
  • 🔴 means the method is not implemented yet
  • 💀 means the method has been deprecated without a replacement
:shipit: Method Description
🔴 admin.apps.approve Approve an app for installation on a workspace
🔴 admin.apps.restrict Restrict an app for installation on a workspace
🔴 admin.apps.approved.list List approved apps for an org or workspace
🔴 admin.apps.requests.list List app requests for a team/workspace
🔴 admin.apps.restricted.list List restricted apps for an org or workspace
🔴 admin.conversations.restrictAccess.addGroup Add an allowlist of IDP groups for accessing a channel
🔴 admin.conversations.restrictAccess.listGroups List all IDP Groups linked to a channel
🔴 admin.conversations.restrictAccess.removeGroup Remove a linked IDP group linked from a private channel
🔴 admin.conversations.setTeams Set the workspaces in an Enterprise grid org that connect to a channel
🔴 admin.emoji.add Add an emoji
🔴 admin.emoji.addAlias Add an emoji alias
🔴 admin.emoji.list List emoji for an Enterprise Grid organization
🔴 admin.emoji.remove Remove an emoji across an Enterprise Grid organization
🔴 admin.emoji.rename Rename an emoji
🔴 admin.inviteRequests.approve Approve a workspace invite request
🔴 admin.inviteRequests.deny Deny a workspace invite request
🔴 admin.inviteRequests.list List all pending workspace invite requests
🔴 admin.inviteRequests.approved.list List all approved workspace invite requests
🔴 admin.inviteRequests.denied.list List all denied workspace invite requests
🔴 admin.teams.admins.list List all of the admins on a given workspace
🔴 admin.teams.create Create an Enterprise team
🔴 admin.teams.list List all teams on an Enterprise organization
🔴 admin.teams.owners.list List all of the owners on a given workspace
🔴 admin.teams.settings.info Fetch information about settings in a workspace
🔴 admin.teams.settings.setDefaultChannels Set the default channels of a workspace
🔴 admin.teams.settings.setDescription Set the description of a given workspace
🔴 admin.teams.settings.setDiscoverability An API method that allows admins to set the discoverability of a given workspace
🔴 admin.teams.settings.setIcon Sets the icon of a workspace
🔴 admin.teams.settings.setName Set the name of a given workspace
🔴 admin.usergroups.addChannels Add up to one hundred default channels to an IDP group
🔴 admin.usergroups.addTeams Associate one or more default workspaces with an organization-wide IDP group
🔴 admin.usergroups.listChannels List the channels linked to an org-level IDP group (user group)
🔴 admin.usergroups.removeChannels Remove one or more default channels from an org-level IDP group (user group)
🔴 admin.users.assign Add an Enterprise user to a workspace
🔴 admin.users.invite Invite a user to a workspace
🔴 admin.users.list List users on a workspace
🔴 admin.users.remove Remove a user from a workspace
🔴 admin.users.setAdmin Set an existing guest, regular user, or owner to be an admin user
🔴 admin.users.setExpiration Set an expiration for a guest user
🔴 admin.users.setOwner Set an existing guest, regular user, or admin user to be a workspace owner
🔴 admin.users.setRegular Set an existing guest user, admin user, or owner to be a regular user
🔴 admin.users.session.reset Wipes all valid sessions on all devices for a given user
🔵 api.test Checks API calling code
🔵 apps.list Lists associated applications
🔵 apps.connections.open Generate a temporary Socket Mode WebSocket URL that your app can connect to in order to receive events and interactive payloads over
🔵 apps.event.authorizations.list Get a list of authorizations for the given event context. Each authorization represents an app installation that the event is visible to
🔵 apps.manifest.create Create an app from an app manifest
🔵 apps.manifest.delete Permanently deletes an app created through app manifests
🔵 apps.manifest.export Export an app manifest from an existing app
🔵 apps.manifest.update Update an app from an app manifest
🔵 apps.manifest.validate Validate an app manifest
🔵 apps.uninstall Uninstalls your app from a workspace
🔵 auth.revoke Revokes a token
🔵 auth.teams.list List the workspaces a token can access
🔵 auth.test Checks authentication and identity
🔵 bots.info Gets information about a bot user
🔴 calls.add Registers a new Call
🔴 calls.end Ends a Call
🔴 calls.info Returns information about a Call
🔴 calls.update Updates information about a Call
🔴 calls.participants.add Registers new participants added to a Call
🔴 calls.participants.remove Registers participants removed from a Call
🔵 chat.delete Deletes a message
🔵 chat.deleteAttachment Deletes a message attachment
🔴 chat.deleteScheduledMessage Deletes a pending scheduled message from the queue
🔴 chat.getPermalink Retrieve a permalink URL for a specific extant message
🔵 chat.meMessage Share a me message into a channel
🔴 chat.postEphemeral Sends an ephemeral message to a user in a channel
🔵 chat.postMessage Sends a message to a channel
🔴 chat.scheduleMessage Schedules a message to be sent to a channel
🔴 chat.scheduledMessages.list Returns a list of scheduled messages
🔴 chat.unfurl Provide custom unfurl behavior for user-posted URLs
🔵 chat.update Updates a message
🔵 client.counts List mentions in different conversations
🔵 client.shouldReload Determine if the Slack client must reload or not
🔵 conversations.acceptSharedInvite Accepts an invitation to a Slack Connect channel
🔵 conversations.approveSharedInvite Approves an invitation to a Slack Connect channel
🔵 conversations.archive Archives a conversation
🔵 conversations.close Closes a direct message or multi-person direct message
🔵 conversations.create Initiates a public or private channel-based conversation
🔵 conversations.declineSharedInvite Declines a Slack Connect channel invite
🔵 conversations.genericInfo Retrieve information about various channels
🔵 conversations.history Fetches a conversation's history of messages and events
🔵 conversations.info Retrieve information about a conversation
🔵 conversations.invite Invites users to a channel
🔵 conversations.inviteShared Sends an invitation to a Slack Connect channel
🔵 conversations.join Joins an existing conversation
🔵 conversations.kick Removes a user from a conversation
🔵 conversations.leave Leaves a conversation
🔵 conversations.list Lists all channels in a Slack team
🔵 conversations.listConnectInvites Lists shared channel invites that have been generated or received but have not been approved by all parties
🔵 conversations.mark Sets the read cursor in a channel
🔵 conversations.members Retrieve members of a conversation
🔵 conversations.open Opens or resumes a direct message or multi-person direct message
🔵 conversations.rename Renames a conversation
🔵 conversations.replies Retrieve a thread of messages posted to a conversation
🔵 conversations.setPurpose Sets the purpose for a conversation
🔵 conversations.setTopic Sets the topic for a conversation
🔵 conversations.suggestions List Slack suggestions to join conversations
🔵 conversations.unarchive Reverses conversation archival
🔴 dialog.open Open a dialog with a user
🔵 dnd.endDnd Ends the current user's "Do Not Disturb" session immediately
🔵 dnd.endSnooze Ends the current user's snooze mode immediately
🔵 dnd.info Retrieves a user's current "Do Not Disturb" status
🔵 dnd.setSnooze Turns on "Do Not Disturb" mode for the current user, or changes its duration
🔵 dnd.teamInfo Retrieves the "Do Not Disturb" status for up to 50 users on a team
🔵 emoji.list Lists custom emoji for a team
🔵 eventlog.history Lists all the events since the specified time
🔵 files.comments.add Add a comment to an existing file
🔵 files.comments.delete Deletes an existing comment on a file
🔵 files.comments.edit Edit an existing file comment
🔵 files.delete Deletes a file
🔵 files.info Gets information about a team file
🔵 files.list Lists and filters team files
🔵 files.listAfterTime Lists and filters team files after this timestamp (inclusive)
🔵 files.listBeforeTime Lists and filters team files before this timestamp (inclusive)
🔵 files.listByChannel Lists and filters team files in a specific channel
🔵 files.listByType Lists and filters team files by type: all, posts, snippets, images, gdocs, zips, pdfs
🔵 files.listByUser Lists and filters team files created by a single user
🔵 files.revokePublicURL Revokes public/external sharing access for a file
🔵 files.sharedPublicURL Enables a file for public/external sharing
🔵 files.upload Uploads or creates a file
🔴 files.remote.add Adds a file from a remote service
🔴 files.remote.info Retrieve information about a remote file added to Slack
🔴 files.remote.list Retrieve information about a remote file added to Slack
🔴 files.remote.remove Remove a remote file
🔴 files.remote.share Share a remote file into a channel
🔴 files.remote.update Updates an existing remote file
🔵 help.issues.list List issues reported by the current user
🔵 migration.exchange For Enterprise Grid workspaces, map local user IDs to global user IDs
🔴 oauth.access Exchanges a temporary OAuth code for an API token
🔴 oauth.token Exchanges a temporary OAuth verifier code for a workspace token
🔴 oauth.v2.access Exchanges a temporary OAuth verifier code for an access token
🔵 pins.add Pins an item to a channel
🔵 pins.list Lists items pinned to a channel
🔵 pins.remove Un-pins an item from a channel
🔵 reactions.add Adds a reaction to an item
🔵 reactions.get Gets reactions for an item
🔵 reactions.list Lists reactions made by a user
🔵 reactions.remove Removes a reaction from an item
🔴 reminders.add Creates a reminder
🔴 reminders.complete Marks a reminder as complete
🔴 reminders.delete Deletes a reminder
🔴 reminders.info Gets information about a reminder
🔴 reminders.list Lists all reminders created by or for a given user
🔴 rtm.connect Starts a Real Time Messaging session
🔵 rtm.start Deprecated: Starts a Real Time Messaging session. Use rtm.connect instead
🔵 rtm.events Prints the API events in real time
🔵 search.all Searches for messages and files matching a query
🔵 search.files Searches for files matching a query
🔵 search.messages Searches for messages matching a query
🔵 search.modules Searches for modules matching a query
🔵 search.users Search users by name or email address
🔵 signup.checkEmail Checks if an email address is valid
🔵 signup.confirmEmail Confirm an email address for signup
🔵 stars.add Adds a star to an item
🔵 stars.list Lists stars for a user
🔵 stars.remove Removes a star from an item
🔵 team.accessLogs Gets the access logs for the current team
🔵 team.billableInfo Gets billable users information for the current team
🔵 team.billing.info Reads a workspace's billing plan information
🔵 team.channels.info Retrieve a list of channels in a specific team
🔵 team.channels.membership Retrieve membership information about a team
🔵 team.info Gets information about the current team
🔵 team.integrationLogs Gets the integration logs for the current team
🔵 team.listExternal List external teams and their corresponding information
🔵 team.preferences.list Retrieve a list of a workspace's team preferences
🔵 team.profile.get Retrieve a team's profile
🔴 usergroups.create Create a User Group
🔴 usergroups.disable Disable an existing User Group
🔴 usergroups.enable Enable a User Group
🔴 usergroups.list List all User Groups for a team
🔴 usergroups.update Update an existing User Group
🔴 usergroups.users.list List all users in a User Group
🔴 usergroups.users.update Update the list of users for a User Group
🔴 users.conversations List conversations the calling user may access
🔵 users.deletePhoto Delete the user profile photo
🔵 users.getPresence Gets user presence information
🔵 users.identity Get a user's identity
🔵 users.info Gets information about a user
🔵 users.list Lists all users in a Slack team
🔵 users.lookupByEmail Find a user with an email address
🔵 users.prefs.get Get user account preferences
🔵 users.prefs.set Set user account preferences
🔵 users.preparePhoto Upload a picture to use as the avatar
🔵 users.profile.get Retrieves a user's profile information
🔵 users.profile.set Set the profile information for a user
🔵 users.setAvatar Upload a picture and set it as the avatar
🔵 users.setEmail Changes the email address without confirmation
🔵 users.setPhoto Set the user profile photo
🔵 users.setPresence Manually sets user presence
🔵 users.setStatus Set the status message and emoji
🔵 users.setUsername Changes the username without admin privileges
🔵 version Displays the program version number
🔴 views.open Open a view for a user
🔴 views.publish Publish a static view for a User
🔴 views.push Push a view onto the stack of a root view
🔴 views.update Update an existing view
🔵 workflows.stepCompleted Indicate that an app's step in a workflow completed execution
🔵 workflows.stepFailed Indicate that an app's step in a workflow failed to execute
🔵 workflows.updateStep Update the configuration for a workflow step

Documentation

Index

Constants

This section is empty.

Variables

View Source
var EventTypes = map[string]interface{}{
	"accounts_changed":        AccountsChangedEvent{},
	"bot_added":               BotAddedEvent{},
	"bot_changed":             BotChangedEvent{},
	"channel_archive":         ChannelArchiveEvent{},
	"channel_created":         ChannelCreatedEvent{},
	"channel_deleted":         ChannelDeletedEvent{},
	"channel_history_changed": ChannelHistoryChangedEvent{},
	"channel_joined":          ChannelJoinedEvent{},
	"channel_left":            ChannelLeftEvent{},
	"channel_marked":          ChannelMarkedEvent{},
	"channel_rename":          ChannelRenameEvent{},
	"channel_unarchive":       ChannelUnarchiveEvent{},
	"commands_changed":        CommandsChangedEvent{},
	"desktop_notification":    DesktopNotification{},
	"dnd_updated":             DNDUpdatedEvent{},
	"dnd_updated_user":        DNDUpdatedEvent{},
	"email_domain_changed":    EmailDomainChangedEvent{},
	"emoji_changed":           EmojiChangedEvent{},
	"file_change":             FileChangeEvent{},
	"file_comment_added":      FileCommentAddedEvent{},
	"file_comment_deleted":    FileCommentDeletedEvent{},
	"file_comment_edited":     FileCommentEditedEvent{},
	"file_created":            FileCreatedEvent{},
	"file_deleted":            FileDeletedEvent{},
	"file_private":            FilePrivateEvent{},
	"file_public":             FilePublicEvent{},
	"file_shared":             FileSharedEvent{},
	"file_unshared":           FileUnsharedEvent{},
	"group_archive":           GroupArchiveEvent{},
	"group_close":             GroupCloseEvent{},
	"group_history_changed":   GroupHistoryChangedEvent{},
	"group_joined":            GroupJoinedEvent{},
	"group_left":              GroupLeftEvent{},
	"group_marked":            GroupMarkedEvent{},
	"group_open":              GroupOpenEvent{},
	"group_rename":            GroupRenameEvent{},
	"group_unarchive":         GroupUnarchiveEvent{},
	"hello":                   HelloEvent{},
	"im_close":                IMCloseEvent{},
	"im_created":              IMCreatedEvent{},
	"im_history_changed":      IMHistoryChangedEvent{},
	"im_marked":               IMMarkedEvent{},
	"im_open":                 IMOpenEvent{},
	"manual_presence_change":  ManualPresenceChangeEvent{},
	"message":                 MessageEvent{},
	"pin_added":               PinAddedEvent{},
	"pin_removed":             PinRemovedEvent{},
	"pref_change":             PrefChangeEvent{},
	"presence_change":         PresenceChangeEvent{},
	"reaction_added":          ReactionAddedEvent{},
	"reaction_removed":        ReactionRemovedEvent{},
	"reconnect_url":           ReconnectURLEvent{},
	"star_added":              StarAddedEvent{},
	"star_removed":            StarRemovedEvent{},
	"subteam_updated":         SubteamUpdated{},
	"team_domain_change":      TeamDomainChangeEvent{},
	"team_join":               TeamJoinEvent{},
	"team_migration_started":  TeamMigrationStartedEvent{},
	"team_pref_change":        TeamPrefChangeEvent{},
	"team_rename":             TeamRenameEvent{},
	"user_change":             UserChangeEvent{},
	"user_typing":             UserTypingEvent{},
}

EventTypes represents the data type for each websocket event.

Functions

This section is empty.

Types

type ACKMessage

type ACKMessage struct {
	Response
	ReplyTo   int    `json:"reply_to"`
	Text      string `json:"text"`
	Timestamp string `json:"ts"`
}

ACKMessage is used for messages received in reply to other messages

type AccessLog

type AccessLog struct {
	UserID    string      `json:"user_id"`
	Username  string      `json:"username"`
	DateFirst json.Number `json:"date_first"`
	DateLast  json.Number `json:"date_last"`
	Count     int         `json:"count"`
	IP        string      `json:"ip"`
	UserAgent string      `json:"user_agent"`
	ISP       string      `json:"isp"`
	Country   string      `json:"country"`
	Region    string      `json:"region"`
}

AccessLog defines the expected data from the JSON-encoded API response.

type AccountsChangedEvent

type AccountsChangedEvent struct {
	Type string `json:"type"`
}

AccountsChangedEvent represents the accounts changed event.

type AppAuthorization

type AppAuthorization struct {
	EnterpriseID string `json:"enterprise_id"`
	TeamID       string `json:"team_id"`
	UserID       string `json:"user_id"`
	IsBot        string `json:"is_bot"`
}

type AppCredentials

type AppCredentials struct {
	ClientID          string `json:"client_id"`
	ClientSecret      string `json:"client_secret"`
	VerificationToken string `json:"verification_token"`
	SigningSecret     string `json:"signing_secret"`
}

type AppIcons

type AppIcons struct {
	Image1024 string `json:"image_1024"`
	Image128  string `json:"image_128"`
	Image192  string `json:"image_192"`
	Image32   string `json:"image_32"`
	Image36   string `json:"image_36"`
	Image48   string `json:"image_48"`
	Image512  string `json:"image_512"`
	Image64   string `json:"image_64"`
	Image72   string `json:"image_72"`
	Image96   string `json:"image_96"`
}

type AppInfo

type AppInfo struct {
	ID    string   `json:"id"`
	Name  string   `json:"name"`
	Icons AppIcons `json:"icons"`
}

type AppManifest

type AppManifest struct {
	Metadata           AppManifestMetadata           `json:"_metadata"`
	DisplayInformation AppManifestDisplayInformation `json:"display_information"`
	Features           AppManifestFeatures           `json:"features"`
	OauthConfig        AppManifestOauthConfig        `json:"oauth_config"`
	Settings           AppManifestSettings           `json:"settings"`
}

type AppManifestDisplayInformation

type AppManifestDisplayInformation struct {
	Name            string `json:"name"`
	Description     string `json:"description"`
	BackgroundColor string `json:"background_color"`
	LongDescription string `json:"long_description"`
}

type AppManifestFeatures

type AppManifestFeatures struct {
	AppHome       AppManifestFeaturesAppHome `json:"app_home"`
	BotUser       AppManifestFeaturesBotUser `json:"bot_user"`
	SlashCommands []SlashCommand             `json:"slash_commands"`
	WorkflowSteps []WorkflowStep             `json:"workflow_steps"`
}

type AppManifestFeaturesAppHome

type AppManifestFeaturesAppHome struct {
	HomeTabEnabled             bool `json:"home_tab_enabled"`
	MessagesTabEnabled         bool `json:"messages_tab_enabled"`
	MessagesTabReadOnlyEnabled bool `json:"messages_tab_read_only_enabled"`
}

type AppManifestFeaturesBotUser

type AppManifestFeaturesBotUser struct {
	DisplayName  string `json:"display_name"`
	AlwaysOnline bool   `json:"always_online"`
}

type AppManifestMetadata

type AppManifestMetadata struct {
	MajorVersion int `json:"major_version"`
	MinorVersion int `json:"minor_version"`
}

type AppManifestOauthConfig

type AppManifestOauthConfig struct {
	RedirectURLs []string            `json:"redirect_urls"`
	Scopes       map[string][]string `json:"scopes"`
}

type AppManifestSettings

type AppManifestSettings struct {
	EventSubscriptions map[string][]string `json:"event_subscriptions"`
	Interactivity      struct {
		IsEnabled bool `json:"is_enabled"`
	} `json:"interactivity"`
	OrgDeployEnabled     bool `json:"org_deploy_enabled"`
	SocketModeEnabled    bool `json:"socket_mode_enabled"`
	IsHosted             bool `json:"is_hosted"`
	TokenRotationEnabled bool `json:"token_rotation_enabled"`
}

type AppsConnectionsOpenResponse

type AppsConnectionsOpenResponse struct {
	Response
	URL string `json:"url"`
}

type AppsEventAuthorizationsListInput

type AppsEventAuthorizationsListInput struct {
	EventContext string `json:"event_context"`
	Cursor       string `json:"cursor"`
	Limit        int    `json:"limit"`
}

type AppsEventAuthorizationsListResponse

type AppsEventAuthorizationsListResponse struct {
	Response
	Authorizations []AppAuthorization `json:"authorizations"`
}

type AppsListResponse

type AppsListResponse struct {
	Response
	Apps           []AppInfo `json:"apps"`
	CacheTimestamp string    `json:"cache_ts"`
}

type AppsManifestCreateResponse

type AppsManifestCreateResponse struct {
	Response
	AppID             string         `json:"app_id"`
	Credentials       AppCredentials `json:"credentials"`
	OauthAuthorizeURL string         `json:"oauth_authorize_url"`
}

type AppsManifestExportResponse

type AppsManifestExportResponse struct {
	Response
	Manifest AppManifest `json:"manifest"`
}

type AppsManifestUpdateResponse

type AppsManifestUpdateResponse struct {
	Response
	AppID              string `json:"app_id"`
	PermissionsUpdated bool   `json:"permissions_updated"`
}

type Attachment

type Attachment struct {
	Actions       []AttachmentAction `json:"actions,omitempty"`
	AuthorIcon    string             `json:"author_icon,omitempty"`
	AuthorLink    string             `json:"author_link,omitempty"`
	AuthorName    string             `json:"author_name,omitempty"`
	AuthorSubname string             `json:"author_subname,omitempty"`
	CallbackID    string             `json:"callback_id,omitempty"`
	Color         string             `json:"color,omitempty"`
	Fallback      string             `json:"fallback"`
	Fields        []AttachmentField  `json:"fields,omitempty"`
	Footer        string             `json:"footer,omitempty"`
	FooterIcon    string             `json:"footer_icon,omitempty"`
	FromURL       string             `json:"from_url"`
	ID            int                `json:"id"`
	ImageBytes    int                `json:"image_bytes"`
	ImageHeight   int                `json:"image_height"`
	ImageURL      string             `json:"image_url,omitempty"`
	ImageWidth    int                `json:"image_width"`
	MarkdownIn    []string           `json:"mrkdwn_in,omitempty"`
	Pretext       string             `json:"pretext,omitempty"`
	ServiceName   string             `json:"service_name"`
	Text          string             `json:"text"`
	ThumbHeight   int                `json:"thumb_height"`
	ThumbURL      string             `json:"thumb_url,omitempty"`
	ThumbWidth    int                `json:"thumb_width"`
	Timestamp     json.Number        `json:"ts,omitempty"`
	Title         string             `json:"title,omitempty"`
	TitleLink     string             `json:"title_link,omitempty"`
}

Attachment defines the expected data from the JSON-encoded API response.

type AttachmentAction

type AttachmentAction struct {
	Name            string                        `json:"name"`
	Text            string                        `json:"text"`
	Type            string                        `json:"type"`
	URL             string                        `json:"url"`
	Style           string                        `json:"style,omitempty"`
	Value           string                        `json:"value,omitempty"`
	DataSource      string                        `json:"data_source,omitempty"`
	MinQueryLength  int                           `json:"min_query_length,omitempty"`
	Options         []AttachmentActionOption      `json:"options,omitempty"`
	SelectedOptions []AttachmentActionOption      `json:"selected_options,omitempty"`
	OptionGroups    []AttachmentActionOptionGroup `json:"option_groups,omitempty"`
	Confirm         *ConfirmationField            `json:"confirm,omitempty"`
}

AttachmentAction defines a data type to append a button or select box into a message that users can interact with. A maximum of five actions may be added per attachment. Notice that the properties without the "omitempty" attribute are required, the rest are optional.

Valid values for Type are: "button", "select". Valid values for Style are: "default", "primary", "danger". Default value for the MinQueryLength property is: 1 (one). The Options property has a limit of one hundred entries.

type AttachmentActionCallback

type AttachmentActionCallback struct {
	CallbackID       string             `json:"callback_id"`
	ResponseURL      string             `json:"response_url"`
	AttachmentID     string             `json:"attachment_id"`
	ActionTimestamp  string             `json:"action_ts"`
	MessageTimestamp string             `json:"message_ts"`
	IsAppUnfurl      bool               `json:"is_app_unfurl"`
	Actions          []AttachmentAction `json:"actions"`
	OriginalMessage  Message            `json:"original_message"`
	Channel          Channel            `json:"channel"`
	Team             Team               `json:"team"`
	User             User               `json:"user"`
}

AttachmentActionCallback defines the structure of the data sent by Slack to your webhook when a user or bot clicks a button or selects an option from the select box in interactive messages.

type AttachmentActionOption

type AttachmentActionOption struct {
	Text        string `json:"text"`
	Value       string `json:"value"`
	Description string `json:"description,omitempty"`
}

AttachmentActionOption defines the structure of a single button option. Notice that both Text and Value are required properties, and there is a limit for the number of characters in the Description which is thirty (30).

type AttachmentActionOptionGroup

type AttachmentActionOptionGroup struct {
	Text    string                   `json:"text"`
	Options []AttachmentActionOption `json:"options"`
}

AttachmentActionOptionGroup defines the structure of a single select option.

type AttachmentField

type AttachmentField struct {
	Title string `json:"title"`
	Value string `json:"value"`
	Short bool   `json:"short"`
}

AttachmentField defines one single message attachment field.

type AuthRevokeResponse

type AuthRevokeResponse struct {
	Response
	Revoked bool `json:"revoked"`
}

type AuthTeamsListInput

type AuthTeamsListInput struct {
	Cursor      string `json:"cursor"`
	IncludeIcon bool   `json:"include_icon"`
	Limit       int    `json:"limit"`
}

type AuthTeamsListResponse

type AuthTeamsListResponse struct {
	Response
	Teams            []Team           `json:"teams"`
	ResponseMetadata ResponseMetadata `json:"response_metadata"`
}

type BillableInfo

type BillableInfo struct {
	BillingActive bool `json:"billing_active"`
}

type Bot

type Bot struct {
	ID      string            `json:"id"`
	Deleted bool              `json:"deleted"`
	Name    string            `json:"name"`
	Icons   map[string]string `json:"icons"`
}

Bot defines the expected data from the JSON-encoded API response.

type BotAddedEvent

type BotAddedEvent struct {
	Type string `json:"type"`
	Bot  Bot    `json:"bot"`
}

BotAddedEvent represents the bot added event.

type BotChangedEvent

type BotChangedEvent struct {
	Type string `json:"type"`
	Bot  Bot    `json:"bot"`
}

BotChangedEvent represents the bot changed event.

type Channel

type Channel struct {
	Created                 int            `json:"created"`
	Creator                 string         `json:"creator"`
	ID                      string         `json:"id"`
	IID                     string         `json:"iid"`
	IsArchived              bool           `json:"is_archived"`
	IsChannel               bool           `json:"is_channel"`
	IsGeneral               bool           `json:"is_general"`
	IsGroup                 bool           `json:"is_group"`
	IsMember                bool           `json:"is_member"`
	IsIm                    bool           `json:"is_im"`
	IsMpim                  bool           `json:"is_mpim"`
	IsPrivate               bool           `json:"is_private"`
	IsOrgShared             bool           `json:"is_org_shared"`
	IsOpen                  bool           `json:"is_open"`
	IsShared                bool           `json:"is_shared"`
	IsFrozen                bool           `json:"is_frozen"`
	User                    string         `json:"user"`
	LastRead                string         `json:"last_read"`
	Latest                  ChannelLatest  `json:"latest"`
	Members                 []string       `json:"members"`
	Name                    string         `json:"name"`
	NameNormalized          string         `json:"name_normalized"`
	MemberCount             int            `json:"member_count"`
	NumMembers              int            `json:"num_members"`
	Unlinked                int            `json:"unlinked"`
	Purpose                 ChannelPurpose `json:"purpose"`
	Topic                   ChannelTopic   `json:"topic"`
	Priority                int            `json:"priority"`
	UnreadCount             int            `json:"unread_count"`
	UnreadCountDisplay      int            `json:"unread_count_display"`
	IsPendingExtShared      bool           `json:"is_pending_ext_shared"`
	PendingShared           []string       `json:"pending_shared"`
	ParentConversation      interface{}    `json:"parent_conversation"`
	IsExtShared             bool           `json:"is_ext_shared"`
	SharedTeamIds           []string       `json:"shared_team_ids"`
	PendingConnectedTeamIds []string       `json:"pending_connected_team_ids"`
	PreviousNames           []string       `json:"previous_names"`
}

type ChannelArchiveEvent

type ChannelArchiveEvent ChannelInfoEvent

ChannelArchiveEvent represents the Channel archive event.

type ChannelCreatedEvent

type ChannelCreatedEvent struct {
	Type           string             `json:"type"`
	Channel        ChannelCreatedInfo `json:"channel"`
	EventTimestamp string             `json:"event_ts"`
}

ChannelCreatedEvent represents the Channel created event.

type ChannelCreatedInfo

type ChannelCreatedInfo struct {
	ID        string `json:"id"`
	IsChannel bool   `json:"is_channel"`
	Name      string `json:"name"`
	Created   int    `json:"created"`
	Creator   string `json:"creator"`
}

ChannelCreatedInfo represents the information associated with the Channel created event

type ChannelDeletedEvent

type ChannelDeletedEvent ChannelInfoEvent

ChannelDeletedEvent represents the Channel deleted event.

type ChannelHistoryChangedEvent

type ChannelHistoryChangedEvent struct {
	Type           string `json:"type"`
	Latest         string `json:"latest"`
	Timestamp      string `json:"ts"`
	EventTimestamp string `json:"event_ts"`
}

ChannelHistoryChangedEvent represents the Channel history changed event.

type ChannelInfoEvent

type ChannelInfoEvent struct {
	// channel_left
	// channel_deleted
	// channel_archive
	// channel_unarchive
	Type      string `json:"type"`
	Channel   string `json:"channel"`
	User      string `json:"user,omitempty"`
	Timestamp string `json:"ts,omitempty"`
}

ChannelInfoEvent represents the Channel info event.

type ChannelJoinedEvent

type ChannelJoinedEvent struct {
	Type    string  `json:"type"`
	Channel Channel `json:"channel"`
}

ChannelJoinedEvent represents the Channel joined event.

type ChannelLatest

type ChannelLatest struct {
	Text      string `json:"text"`
	Timestamp string `json:"ts"`
	Type      string `json:"type"`
	User      string `json:"user"`
}

ChannelLatest defines the expected data from the JSON-encoded API response.

type ChannelLeftEvent

type ChannelLeftEvent ChannelInfoEvent

ChannelLeftEvent represents the Channel left event.

type ChannelMarkedEvent

type ChannelMarkedEvent ChannelInfoEvent

ChannelMarkedEvent represents the Channel marked event.

type ChannelPurpose

type ChannelPurpose struct {
	Creator string `json:"creator"`
	LastSet int    `json:"last_set"`
	Value   string `json:"value"`
}

ChannelPurpose defines the expected data from the JSON-encoded API response.

type ChannelPurposeNow

type ChannelPurposeNow struct {
	Response
	Purpose string `json:"purpose"`
}

ChannelPurposeNow defines the expected data from the JSON-encoded API response.

type ChannelRenameEvent

type ChannelRenameEvent struct {
	Type      string            `json:"type"`
	Channel   ChannelRenameInfo `json:"channel"`
	Timestamp string            `json:"event_ts"`
}

ChannelRenameEvent represents the Channel rename event.

type ChannelRenameInfo

type ChannelRenameInfo struct {
	ID      string `json:"id"`
	Name    string `json:"name"`
	Created string `json:"created"`
}

ChannelRenameInfo represents the information associated with a Channel rename event

type ChannelTopic

type ChannelTopic struct {
	Creator string `json:"creator"`
	LastSet int    `json:"last_set"`
	Value   string `json:"value"`
}

ChannelTopic defines the expected data from the JSON-encoded API response.

type ChannelTopicNow

type ChannelTopicNow struct {
	Response
	Topic string `json:"topic"`
}

ChannelTopicNow defines the expected data from the JSON-encoded API response.

type ChannelUnarchiveEvent

type ChannelUnarchiveEvent ChannelInfoEvent

ChannelUnarchiveEvent represents the Channel unarchive event.

type ChatDeleteAttachmentInput added in v1.0.1

type ChatDeleteAttachmentInput struct {
	Channel    string `json:"channel"`
	Ts         string `json:"ts"`
	Attachment int    `json:"attachment"`
}

type ChatDeleteAttachmentResponse added in v1.0.1

type ChatDeleteAttachmentResponse struct {
	Response
	Channel    string `json:"channel"`
	Ts         string `json:"ts"`
	Attachment string `json:"attachment"`
}

type ClientAlerts added in v1.0.2

type ClientAlerts struct{}

type ClientCountsInput added in v1.0.2

type ClientCountsInput struct {
	OrgWideAware          bool `json:"org_wide_aware"`
	ThreadCountsByChannel bool `json:"thread_counts_by_channel"`
}

type ClientCountsResponse added in v1.0.2

type ClientCountsResponse struct {
	Response
	Alerts   ClientAlerts  `json:"alerts"`
	Threads  ClientThreads `json:"threads"`
	Channels []Mention     `json:"channels"`
	Mpims    []Mention     `json:"mpims"`
	Ims      []Mention     `json:"ims"`
}

type ClientShouldReloadInput added in v1.0.2

type ClientShouldReloadInput struct {
	VersionTs       int    `json:"version_ts"`
	BuildVersionTs  int    `json:"build_version_ts"`
	ConfigVersionTs int    `json:"config_version_ts"`
	TeamIDs         string `json:"team_ids"`
}

type ClientShouldReloadResponse added in v1.0.2

type ClientShouldReloadResponse struct {
	Response
	BuildVersionEnabled    bool `json:"build_version_enabled"`
	ShouldReload           bool `json:"should_reload"`
	ClientMinVersion       int  `json:"client_min_version"`
	ClientMinConfigVersion int  `json:"client_min_config_version"`
}

type ClientThreads added in v1.0.2

type ClientThreads struct {
	HasUnreads            bool        `json:"has_unreads"`
	MentionCount          int         `json:"mention_count"`
	MentionCountByChannel interface{} `json:"mention_count_by_channel"`
	UnreadCountByChannel  interface{} `json:"unread_count_by_channel"`
}

type CommandsChangedEvent

type CommandsChangedEvent struct {
	Type           string `json:"type"`
	EventTimestamp string `json:"event_ts"`
}

CommandsChangedEvent represents the commands changed event.

type Comment

type Comment struct {
	ID        string `json:"id,omitempty"`
	Created   int64  `json:"created,omitempty"`
	Timestamp int64  `json:"timestamp,omitempty"`
	User      string `json:"user,omitempty"`
	Comment   string `json:"comment,omitempty"`
}

Comment defines the expected data from the JSON-encoded API response.

type ConfirmationField

type ConfirmationField struct {
	Text        string `json:"text"`
	Title       string `json:"title,omitempty"`
	OkText      string `json:"ok_text,omitempty"`
	DismissText string `json:"dismiss_text,omitempty"`
}

ConfirmationField defines the information for the prompt boxes.

type ConversationsAcceptSharedInviteInput

type ConversationsAcceptSharedInviteInput struct {
	// Name of the channel. If the channel does not exist already in your
	// workspace, this name is the one that the channel will take.
	ChannelName string `json:"channel_name"`
	// ID of the channel that you'd like to accept.
	// Must provide either invite_id or channel_id.
	ChannelID string `json:"channel_id"`
	// Whether you'd like to use your workspace's free trial for Slack Connect.
	FreeTrialAccepted bool `json:"free_trial_accepted"`
	// See the shared_channel_invite_received event payload for more details
	// on how to retrieve the ID of the invitation.
	InviteID string `json:"invite_id"`
	// Whether the channel should be private.
	IsPrivate bool `json:"is_private"`
	// The ID of the workspace to accept the channel in. If an org-level token
	// is used to call this method, the team_id argument is required.
	TeamID string `json:"team_id"`
}

type ConversationsCreateInput

type ConversationsCreateInput struct {
	// Name of the public or private channel to create.
	Name string `json:"name"`
	// Create a private channel instead of a public one.
	IsPrivate bool `json:"is_private"`
	// Encoded team id to create the channel in, required if org token is used.
	TeamID string `json:"team_id"`
}

type ConversationsDeclineSharedInviteInput

type ConversationsDeclineSharedInviteInput struct {
	// ID of the Slack Connect invite to decline. Subscribe to the
	// shared_channel_invite_accepted event to receive IDs of Slack Connect
	// channel invites that have been accepted and are awaiting approval.
	InviteID string `json:"invite_id"`
	// The team or enterprise id of the other party involved in the invitation
	// you are declining
	TargetTeam string `json:"target_team"`
}

type ConversationsHistoryInput

type ConversationsHistoryInput struct {
	// Conversation ID to fetch history for.
	Channel string `json:"channel,omitempty"`
	// Paginate through collections of data by setting the cursor parameter to
	// a next_cursor attribute returned by a previous request's response_metadata.
	// Default value fetches the first "page" of the collection. See pagination
	// for more detail.
	Cursor string `json:"cursor,omitempty"`
	// Include messages with latest or oldest timestamp in results only when
	// either timestamp is specified.
	Inclusive bool `json:"inclusive,omitempty"`
	// End of time range of messages to include in results.
	Latest string `json:"latest,omitempty"`
	// The maximum number of items to return. Fewer than the requested number
	// of items may be returned, even if the end of the users list hasn't been
	// reached.
	Limit int `json:"limit,omitempty"`
	// Start of time range of messages to include in results.
	Oldest string `json:"oldest,omitempty"`
}

type ConversationsInviteSharedInput

type ConversationsInviteSharedInput struct {
	// ID of the channel on your team that you'd like to share
	Channel string `json:"channel"`
	// Optional email to receive this invite.
	// Either emails or user_ids must be provided.
	Emails []string `json:"emails"`
	// Optional boolean on whether invite is to a external limited member.
	// Defaults to true.
	ExternalLimited bool `json:"external_limited"`
	// Optional user_id to receive this invite. Either emails or user_ids
	// must be provided.
	UserIDs []string `json:"user_ids"`
}

type ConversationsInviteSharedResponse

type ConversationsInviteSharedResponse struct {
	Response
	InviteID              string `json:"invite_id"`
	IsLegacySharedChannel bool   `json:"is_legacy_shared_channel"`
}

type ConversationsListConnectInvitesInput

type ConversationsListConnectInvitesInput struct {
	// Maximum number of invites to return.
	Count int `json:"count"`
	// Set to next_cursor returned by previous call to list items in subsequent page.
	Cursor string `json:"cursor"`
	// Encoded team id for the workspace to retrieve invites for.
	TeamID string `json:"team_id"`
}

type ConversationsListConnectInvitesResponse

type ConversationsListConnectInvitesResponse struct {
	Response
	Invites []interface{} `json:"invites"`
}

ConversationsListConnectInvitesResponse is https://api.slack.com/methods/conversations.listConnectInvites#markdown

type ConversationsListInput

type ConversationsListInput struct {
	// Paginate through collections of data by setting the cursor parameter to
	// a next_cursor attribute returned by a previous request's response_metadata.
	// Default value fetches the first "page" of the collection. See pagination
	// for more detail.
	Cursor string `json:"cursor"`
	// Set to true to exclude archived channels from the list
	ExcludeArchived bool `json:"exclude_archived"`
	// The maximum number of items to return. Fewer than the requested number
	// of items may be returned, even if the end of the list hasn't been reached.
	// Must be an integer no larger than 1000.
	Limit int `json:"limit"`
	// Mix and match channel types by providing a comma-separated list of any
	// combination of public_channel, private_channel, mpim, im.
	Types []string `json:"types"`
}

type ConversationsMarkInput

type ConversationsMarkInput struct {
	// Conversation ID to fetch thread from.
	Channel string `json:"channel"`
	// Unique identifier of a thread's parent message.
	Timestamp string `json:"ts"`
}

type ConversationsMembersInput

type ConversationsMembersInput struct {
	Channel string `json:"channel"`
	Cursor  string `json:"cursor"`
	Limit   int    `json:"limit"`
}

type ConversationsOpenInput

type ConversationsOpenInput struct {
	// Resume a conversation by supplying an im or mpim's ID.
	Channel string `json:"channel"`
	// Do not create a direct message or multi-person direct message.
	// This is used to see if there is an existing dm or mpdm.
	PreventCreation bool `json:"prevent_creation"`
	// Indicates you want the full IM channel definition in the response.
	ReturnIm bool `json:"return_im"`
	// Comma separated lists of users. If only one user is included, this
	// creates a 1:1 DM. The ordering of the users is preserved whenever a
	// multi-person direct message is returned. Supply a channel when not
	// supplying users.
	Users string `json:"users"`
}

type ConversationsOpenResponse

type ConversationsOpenResponse struct {
	Response
	Channel
	NoOp        bool `json:"no_op"`
	AlreadyOpen bool `json:"already_open"`
}

type ConversationsRepliesInput

type ConversationsRepliesInput struct {
	// Conversation ID to fetch thread from.
	Channel string `json:"channel"`
	// Unique identifier of a thread's parent message.
	Timestamp string `json:"ts"`
	// Paginate through collections of data by setting the cursor parameter to
	// a next_cursor attribute returned by a previous request's response_metadata.
	// Default value fetches the first "page" of the collection. See pagination
	// for more detail.
	Cursor string `json:"cursor"`
	// Include messages with latest or oldest timestamp in results only when
	// either timestamp is specified.
	Inclusive bool `json:"inclusive"`
	// End of time range of messages to include in results.
	Latest string `json:"latest"`
	// The maximum number of items to return. Fewer than the requested number
	// of items may be returned, even if the end of the users list hasn't been
	// reached.
	Limit int `json:"limit"`
	// Start of time range of messages to include in results.
	Oldest string `json:"oldest"`
}

type ConversationsSuggestionsResponse added in v1.0.2

type ConversationsSuggestionsResponse struct {
	Response
	Status               string   `json:"status"`
	SuggestionTypesTried []string `json:"suggestion_types_tried"`
}

type CountChannel

type CountChannel struct {
	ID                  string `json:"id"`
	IsArchived          bool   `json:"is_archived"`
	IsGeneral           bool   `json:"is_general"`
	IsMember            bool   `json:"is_member"`
	IsMuted             bool   `json:"is_muted"`
	IsStarred           bool   `json:"is_starred"`
	MentionCount        int    `json:"mention_count"`
	MentionCountDisplay int    `json:"mention_count_display"`
	Name                string `json:"name"`
	NameNormalized      string `json:"name_normalized"`
	UnreadCount         int    `json:"unread_count"`
	UnreadCountDisplay  int    `json:"unread_count_display"`
}

CountChannel defines the expected data from the JSON-encoded API response.

type CountGroup

type CountGroup struct {
	ID                  string `json:"id"`
	IsArchived          bool   `json:"is_archived"`
	IsMpim              bool   `json:"is_mpim"`
	IsMuted             bool   `json:"is_muted"`
	IsOpen              bool   `json:"is_open"`
	IsStarred           bool   `json:"is_starred"`
	MentionCount        int    `json:"mention_count"`
	MentionCountDisplay int    `json:"mention_count_display"`
	Name                string `json:"name"`
	NameNormalized      string `json:"name_normalized"`
	UnreadCount         int    `json:"unread_count"`
	UnreadCountDisplay  int    `json:"unread_count_display"`
}

CountGroup defines the expected data from the JSON-encoded API response.

type CountInstantMessage

type CountInstantMessage struct {
	DmCount   int    `json:"dm_count"`
	ID        string `json:"id"`
	IsOpen    bool   `json:"is_open"`
	IsStarred bool   `json:"is_starred"`
	Name      string `json:"name"`
	UserID    string `json:"user_id"`
}

CountInstantMessage defines the expected data from the JSON-encoded API response.

type DNDStatus

type DNDStatus struct {
	Enabled            bool `json:"dnd_enabled"`
	NextStartTimestamp int  `json:"next_dnd_start_ts"`
	NextEndTimestamp   int  `json:"next_dnd_end_ts"`
	SnoozeInfo
}

DNDStatus defines the status of the do not disturb setting.

type DNDUpdatedEvent

type DNDUpdatedEvent struct {
	Type   string    `json:"type"`
	User   string    `json:"user"`
	Status DNDStatus `json:"dnd_status"`
}

DNDUpdatedEvent represents the update event for Do Not Disturb

type DesktopNotification

type DesktopNotification struct {
	Type           string `json:"type"`
	Title          string `json:"title"`
	Subtitle       string `json:"subtitle"`
	Msg            string `json:"msg"`
	Content        string `json:"content"`
	Channel        string `json:"channel"`
	LaunchURI      string `json:"launchUri"`
	AvatarImage    string `json:"avatarImage"`
	SsbFilename    string `json:"ssbFilename"`
	ImageURI       string `json:"imageUri"`
	EventTimestamp string `json:"event_ts"`
	IsShared       bool   `json:"is_shared"`
}

DesktopNotification represents the structure of an app alert.

type Edited

type Edited struct {
	User      string `json:"user,omitempty"`
	Timestamp string `json:"ts,omitempty"`
}

Edited defines the structure of a modified message.

type EmailDomainChangedEvent

type EmailDomainChangedEvent struct {
	Type           string `json:"type"`
	EventTimestamp string `json:"event_ts"`
	EmailDomain    string `json:"email_domain"`
}

EmailDomainChangedEvent represents the email domain changed event.

type EmojiChangedEvent

type EmojiChangedEvent struct {
	Type           string   `json:"type"`
	SubType        string   `json:"subtype"`
	Name           string   `json:"name"`
	Names          []string `json:"names"`
	Value          string   `json:"value"`
	EventTimestamp string   `json:"event_ts"`
}

EmojiChangedEvent represents the emoji changed event.

type ErrMsgs

type ErrMsgs struct {
	Message string `json:"message"`
	Pointer string `json:"pointer"`
}

type ErrorEvent

type ErrorEvent struct {
	Text string
}

ErrorEvent represents the websocket errors.

type Event

type Event struct {
	Type string `json:"type"`
	Data interface{}
}

Event defines the JSON-encoded output for RTM events.

type Field

type Field struct {
	Label string `json:"label"`
	Value string `json:"value"`
	Alt   string `json:"alt"`
}

Field defines the expected data from the JSON-encoded API response.

type Fields

type Fields map[string]Field

Fields defines the expected data from the JSON-encoded API response.

type File

type File struct {
	Channels           []string    `json:"channels"`
	CommentsCount      int         `json:"comments_count"`
	Created            int         `json:"created"`
	DeanimateGif       string      `json:"deanimate_gif"`
	EditLink           string      `json:"edit_link"`
	ExternalType       string      `json:"external_type"`
	Filetype           string      `json:"filetype"`
	Groups             []string    `json:"groups"`
	ID                 string      `json:"id"`
	ImageExifRotation  int         `json:"image_exif_rotation"`
	InitialComment     FileComment `json:"initial_comment"`
	InstantMessages    []string    `json:"ims"`
	Lines              int         `json:"lines"`
	LinesMore          int         `json:"lines_more"`
	Mimetype           string      `json:"mimetype"`
	Mode               string      `json:"mode"`
	Name               string      `json:"name"`
	NumStars           int         `json:"num_stars"`
	OriginalH          int         `json:"original_h"`
	OriginalW          int         `json:"original_w"`
	Permalink          string      `json:"permalink"`
	PermalinkPublic    string      `json:"permalink_public"`
	PrettyType         string      `json:"pretty_type"`
	Preview            string      `json:"preview"`
	PreviewHighlight   string      `json:"preview_highlight"`
	Reactions          []Reaction  `json:"reactions"`
	Score              string      `json:"score"`
	Size               int         `json:"size"`
	Thumb160           string      `json:"thumb_160"`
	Thumb360           string      `json:"thumb_360"`
	Thumb360Gif        string      `json:"thumb_360_gif"`
	Thumb360H          int         `json:"thumb_360_h"`
	Thumb360W          int         `json:"thumb_360_w"`
	Thumb480           string      `json:"thumb_480"`
	Thumb480Gif        string      `json:"thumb_480_gif"`
	Thumb480H          int         `json:"thumb_480_h"`
	Thumb480W          int         `json:"thumb_480_w"`
	Thumb64            string      `json:"thumb_64"`
	Thumb80            string      `json:"thumb_80"`
	Timestamp          int         `json:"timestamp"`
	Title              string      `json:"title"`
	URL                string      `json:"url"`
	URLDownload        string      `json:"url_download"`
	URLPrivate         string      `json:"url_private"`
	URLPrivateDownload string      `json:"url_private_download"`
	User               string      `json:"user"`
	Username           string      `json:"username"`
	DisplayAsBot       bool        `json:"display_as_bot"`
	Editable           bool        `json:"editable"`
	IsExternal         bool        `json:"is_external"`
	IsPublic           bool        `json:"is_public"`
	IsStarred          bool        `json:"is_starred"`
	PublicURLShared    bool        `json:"public_url_shared"`
	TopFile            bool        `json:"top_file"`
}

File defines the expected data from the JSON-encoded API response.

type FileChangeEvent

type FileChangeEvent fileActionEvent

FileChangeEvent represents the File change event.

type FileComment

type FileComment struct {
	Comment   string `json:"comment"`
	ID        string `json:"id"`
	User      string `json:"user"`
	Created   int    `json:"created"`
	Timestamp int    `json:"timestamp"`
	IsIntro   bool   `json:"is_intro"`
}

FileComment defines the expected data from the JSON-encoded API response.

type FileCommentAddedEvent

type FileCommentAddedEvent struct {
	Comment Comment `json:"comment"`
	// contains filtered or unexported fields
}

FileCommentAddedEvent represents the File comment added event.

type FileCommentDeletedEvent

type FileCommentDeletedEvent struct {
	Comment string `json:"comment"`
	// contains filtered or unexported fields
}

FileCommentDeletedEvent represents the File comment deleted event.

type FileCommentEditedEvent

type FileCommentEditedEvent struct {
	Comment Comment `json:"comment"`
	// contains filtered or unexported fields
}

FileCommentEditedEvent represents the File comment edited event.

type FileCreatedEvent

type FileCreatedEvent fileActionEvent

FileCreatedEvent represents the File created event.

type FileDeletedEvent

type FileDeletedEvent fileActionEvent

FileDeletedEvent represents the File deleted event.

type FileListArgs

type FileListArgs struct {
	Channel string `json:"channel"`
	Count   int    `json:"count"`
	Page    int    `json:"page"`
	TsFrom  string `json:"ts_from"`
	TsTo    string `json:"ts_to"`
	Types   string `json:"types"`
	User    string `json:"user"`
}

FileListArgs defines the data to send to the API service.

type FilePrivateEvent

type FilePrivateEvent fileActionEvent

FilePrivateEvent represents the File private event.

type FilePublicEvent

type FilePublicEvent fileActionEvent

FilePublicEvent represents the File public event.

type FileSharedEvent

type FileSharedEvent fileActionEvent

FileSharedEvent represents the File shared event.

type FileUnsharedEvent

type FileUnsharedEvent fileActionEvent

FileUnsharedEvent represents the File unshared event.

type FileUploadArgs

type FileUploadArgs struct {
	Channels       string `json:"channels"`
	Content        string `json:"content"`
	File           string `json:"file"`
	Filename       string `json:"filename"`
	Filetype       string `json:"filetype"`
	InitialComment string `json:"initial_comment"`
	Title          string `json:"title"`
}

FileUploadArgs defines the data to send to the API service.

type GroupArchiveEvent

type GroupArchiveEvent ChannelInfoEvent

GroupArchiveEvent represents the Group archive event.

type GroupCloseEvent

type GroupCloseEvent ChannelInfoEvent

GroupCloseEvent represents the Group close event.

type GroupCreatedEvent

type GroupCreatedEvent struct {
	Type    string             `json:"type"`
	User    string             `json:"user"`
	Channel ChannelCreatedInfo `json:"channel"`
}

GroupCreatedEvent represents the Group created event.

type GroupHistoryChangedEvent

type GroupHistoryChangedEvent ChannelHistoryChangedEvent

GroupHistoryChangedEvent represents the Group history changed event.

type GroupJoinedEvent

type GroupJoinedEvent ChannelJoinedEvent

GroupJoinedEvent represents the Group joined event.

type GroupLeftEvent

type GroupLeftEvent ChannelInfoEvent

GroupLeftEvent represents the Group left event.

type GroupMarkedEvent

type GroupMarkedEvent ChannelInfoEvent

GroupMarkedEvent represents the Group marked event.

type GroupOpenEvent

type GroupOpenEvent ChannelInfoEvent

GroupOpenEvent represents the Group open event.

type GroupRenameEvent

type GroupRenameEvent struct {
	Type      string          `json:"type"`
	Group     GroupRenameInfo `json:"channel"`
	Timestamp string          `json:"ts"`
}

GroupRenameEvent represents the Group rename event.

type GroupRenameInfo

type GroupRenameInfo struct {
	ID      string `json:"id"`
	Name    string `json:"name"`
	Created string `json:"created"`
}

GroupRenameInfo represents the group info related to the renamed group

type GroupUnarchiveEvent

type GroupUnarchiveEvent ChannelInfoEvent

GroupUnarchiveEvent represents the Group unarchive event.

type HelloEvent

type HelloEvent struct{}

HelloEvent represents the hello event.

type HelpIssuesListResponse

type HelpIssuesListResponse struct {
	Response
	Issues []string `json:"issues"`
}

type History

type History struct {
	Response
	Messages           []Message        `json:"messages"`
	HasMore            bool             `json:"has_more"`
	PinCount           int              `json:"pin_count"`
	UnreadCountDisplay int              `json:"unread_count_display"`
	ResponseMetadata   ResponseMetadata `json:"response_metadata"`
}

History defines the expected data from the JSON-encoded API response.

Example:

{
    "ok": true,
    "messages": [
        {
            "type": "message",
            "user": "U012AB3CDE",
            "text": "I find you punny and would like to smell your nose letter",
            "ts": "1512085950.000216"
        },
        {
            "type": "message",
            "user": "U061F7AUR",
            "text": "What, you want to smell my shoes better?",
            "ts": "1512104434.000490"
        }
    ],
    "has_more": true,
    "pin_count": 0,
    "response_metadata": {
        "next_cursor": "bmV4dF90czoxNTEyMDg1ODYxMDAwNTQz"
    }
}

type IMCloseEvent

type IMCloseEvent ChannelInfoEvent

IMCloseEvent represents the IM close event.

type IMCreatedEvent

type IMCreatedEvent struct {
	Type    string             `json:"type"`
	User    string             `json:"user"`
	Channel ChannelCreatedInfo `json:"channel"`
}

IMCreatedEvent represents the IM created event.

type IMHistoryChangedEvent

type IMHistoryChangedEvent ChannelHistoryChangedEvent

IMHistoryChangedEvent represents the IM history changed event.

type IMMarkedEvent

type IMMarkedEvent ChannelInfoEvent

IMMarkedEvent represents the IM marked event.

type IMMarkedHistoryChanged

type IMMarkedHistoryChanged ChannelInfoEvent

IMMarkedHistoryChanged represents the IM marked history changed event

type IMOpenEvent

type IMOpenEvent ChannelInfoEvent

IMOpenEvent represents the IM open event.

type Icon

type Icon struct {
	IconURL   string `json:"icon_url,omitempty"`
	IconEmoji string `json:"icon_emoji,omitempty"`
}

Icon defines the structure of an application icon.

type IntegrationLog

type IntegrationLog struct {
	ServiceID   int    `json:"service_id"`
	ServiceType string `json:"service_type"`
	UserID      string `json:"user_id"`
	UserName    string `json:"user_name"`
	Channel     string `json:"channel"`
	Date        string `json:"date"`
	ChangeType  string `json:"change_type"`
	Scope       string `json:"scope"`
}

type Item

type Item struct {
	Type      string   `json:"type"`
	Channel   string   `json:"channel,omitempty"`
	Message   *Message `json:"message,omitempty"`
	File      *File    `json:"file,omitempty"`
	Comment   *Comment `json:"comment,omitempty"`
	Timestamp string   `json:"ts,omitempty"`
}

Item defines the expected data for: message, file, or file comment.

type ManualPresenceChangeEvent

type ManualPresenceChangeEvent struct {
	Type     string `json:"type"`
	Presence string `json:"presence"`
}

ManualPresenceChangeEvent represents the manual presence change event.

type Mention added in v1.0.2

type Mention struct {
	ID           string `json:"id"`
	LastRead     string `json:"last_read"`
	Latest       string `json:"latest"`
	MentionCount int    `json:"mention_count"`
	HasUnreads   bool   `json:"has_unreads"`
}

type Message

type Message struct {
	IID              string         `json:"iid,omitempty"`
	Attachments      []Attachment   `json:"attachments,omitempty"`
	BotID            string         `json:"bot_id,omitempty"`
	Channel          string         `json:"channel,omitempty"`
	Comment          *Comment       `json:"comment,omitempty"`
	DeletedTimestamp string         `json:"deleted_ts,omitempty"`
	Edited           *Edited        `json:"edited,omitempty"`
	EventTimestamp   string         `json:"event_ts,omitempty"`
	File             *File          `json:"file,omitempty"`
	Icons            *Icon          `json:"icons,omitempty"`
	Inviter          string         `json:"inviter,omitempty"`
	ItemType         string         `json:"item_type,omitempty"`
	Members          []string       `json:"members,omitempty"`
	Name             string         `json:"name,omitempty"`
	OldName          string         `json:"old_name,omitempty"`
	ParentUserID     string         `json:"parent_user_id,omitempty"`
	Permalink        string         `json:"permalink,omitempty"`
	PinnedTo         []string       `json:"pinned_to,omitempty"`
	Purpose          string         `json:"purpose,omitempty"`
	Reactions        []ReactionItem `json:"reactions,omitempty"`
	Replies          []Reply        `json:"replies,omitempty"`
	ReplyCount       int            `json:"reply_count,omitempty"`
	ReplyTo          int            `json:"reply_to,omitempty"`
	Subtype          string         `json:"subtype,omitempty"`
	Team             string         `json:"team,omitempty"`
	Text             string         `json:"text,omitempty"`
	ThreadTimestamp  string         `json:"thread_ts,omitempty"`
	Timestamp        string         `json:"ts,omitempty"`
	Topic            string         `json:"topic,omitempty"`
	Type             string         `json:"type,omitempty"`
	User             string         `json:"user,omitempty"`
	Username         string         `json:"username,omitempty"`
	DisplayAsBot     bool           `json:"display_as_bot"`
	Hidden           bool           `json:"hidden,omitempty"`
	IsStarred        bool           `json:"is_starred,omitempty"`
	Upload           bool           `json:"upload,omitempty"`
}

Message defines the expected data from the JSON-encoded API response.

type MessageArgs

type MessageArgs struct {
	Attachments    []Attachment `json:"attachments"`
	Channel        string       `json:"channel"`
	IconEmoji      string       `json:"icon_emoji"`
	IconURL        string       `json:"icon_url"`
	Parse          string       `json:"parse"`
	Text           string       `json:"text"`
	ThreadTs       string       `json:"thread_ts"`
	Ts             string       `json:"ts"`
	Username       string       `json:"username"`
	AsUser         bool         `json:"as_user"`
	LinkNames      bool         `json:"link_names"`
	ReplyBroadcast bool         `json:"reply_broadcast"`
	UnfurlLinks    bool         `json:"unfurl_links"`
	UnfurlMedia    bool         `json:"unfurl_media"`
	Markdown       bool         `json:"mrkdwn"`
}

MessageArgs defines the data to send to the API service.

type MessageEvent

type MessageEvent Message

MessageEvent represents the message event.

type ModifiedMessage

type ModifiedMessage struct {
	Response
	Channel   string `json:"channel"`
	Text      string `json:"text"`
	Timestamp string `json:"ts"`
}

ModifiedMessage defines the expected data from the JSON-encoded API response.

type OrgMigrations added in v1.0.2

type OrgMigrations struct {
	DateUpdated int           `json:"date_updated"`
	Current     []interface{} `json:"current"`
}

type Owner

type Owner struct {
	Response
	Team   string `json:"team"`
	TeamID string `json:"team_id"`
	URL    string `json:"url"`
	User   string `json:"user"`
	UserID string `json:"user_id"`
}

Owner defines the expected data from the JSON-encoded API response.

type Pagination

type Pagination struct {
	First      int `json:"first"`
	Last       int `json:"last"`
	Page       int `json:"page"`
	PageCount  int `json:"page_count"`
	PerPage    int `json:"per_page"`
	TotalCount int `json:"total_count"`
}

type Paging

type Paging struct {
	Count int `json:"count"`
	Page  int `json:"page"`
	Pages int `json:"pages"`
	Total int `json:"total"`
}

Paging defines the expected data from the JSON-encoded API response.

type PinAddedEvent

type PinAddedEvent pinEvent

PinAddedEvent represents the Pin added event.

type PinRemovedEvent

type PinRemovedEvent pinEvent

PinRemovedEvent represents the Pin removed event.

type PinsListItem

type PinsListItem struct {
	Channel   string      `json:"channel"`
	Created   json.Number `json:"created"`
	CreatedBy string      `json:"created_by"`
	Message   Message     `json:"message"`
	Type      string      `json:"type"`
}

PinsListItem defines the JSON-encoded output for one pinned message.

type Post

type Post struct {
	Response
	Channel   string  `json:"channel"`
	Timestamp string  `json:"ts"`
	Message   Message `json:"message"`
}

Post defines the expected data from the JSON-encoded API response.

type PrefChangeEvent

type PrefChangeEvent struct {
	Type  string          `json:"type"`
	Name  string          `json:"name"`
	Value json.RawMessage `json:"value"`
}

PrefChangeEvent represents a user preferences change event

type PresenceChangeEvent

type PresenceChangeEvent struct {
	Type     string `json:"type"`
	Presence string `json:"presence"`
	User     string `json:"user"`
}

PresenceChangeEvent represents the presence change event.

type RTM

type RTM struct {
	Events chan Event
	// contains filtered or unexported fields
}

RTM is the real time messaging.

func (*RTM) Disconnect

func (rtm *RTM) Disconnect()

Disconnect kills the connection.

func (*RTM) ManageEvents

func (rtm *RTM) ManageEvents()

ManageEvents controls the websocket events.

type RTMInput

type RTMInput struct {
	BatchPresenceAware bool `json:"batch_presence_aware"`
	PresenceSub        bool `json:"presence_sub"`
}

RTMInput defines the data to send to the API service.

type RTMResponse

type RTMResponse struct {
	Response
	// Self                    null `json:"self"`
	// Team                    null `json:"team"`
	// LatestEventTS           null `json:"latest_event_ts"`
	// Channels                null `json:"channels"`
	// Groups                  null `json:"groups"`
	// IMS                     null `json:"ims"`
	// CacheTS                 null `json:"cache_ts"`
	// ReadOnlyChannels        null `json:"read_only_channels"`
	// CanManageSharedChannels null `json:"can_manage_shared_channels"`
	// Subteams                null `json:"subteams"`
	// DND                     null `json:"dnd"`
	// Users                   null `json:"users"`
	// CacheVersion            null `json:"cache_version"`
	// CacheTSVersion          null `json:"cache_ts_version"`
	// Bots                    null `json:"bots"`
	URL string `json:"url"`
}

RTMResponse defines the JSON-encoded output for RTM connection.

type Reaction

type Reaction struct {
	Count int      `json:"count"`
	Name  string   `json:"name"`
	Users []string `json:"users"`
}

Reaction defines the expected data from the JSON-encoded API response.

type ReactionAddedEvent

type ReactionAddedEvent reactionEvent

ReactionAddedEvent represents the Reaction added event.

type ReactionArgs

type ReactionArgs struct {
	Name        string `json:"name"`
	Channel     string `json:"channel"`
	File        string `json:"file"`
	FileComment string `json:"file_comment"`
	Full        bool   `json:"full"`
	Timestamp   string `json:"timestamp"`
}

ReactionArgs defines the data to send to the API service.

type ReactionItem

type ReactionItem struct {
	Channel     string          `json:"channel"`
	File        File            `json:"file"`
	FileComment string          `json:"file_comment"`
	Message     ReactionMessage `json:"message"`
	Type        string          `json:"type"`
	Timestamp   string          `json:"ts"`
}

ReactionItem defines the expected data from the JSON-encoded API response.

type ReactionListArgs

type ReactionListArgs struct {
	Count int    `json:"count"`
	Full  bool   `json:"full"`
	Page  int    `json:"page"`
	User  string `json:"user"`
}

ReactionListArgs defines the data to send to the API service.

type ReactionMessage

type ReactionMessage struct {
	Reactions []Reaction `json:"reactions"`
	Text      string     `json:"text"`
	Timestamp string     `json:"ts"`
	Type      string     `json:"type"`
	User      string     `json:"user"`
}

ReactionMessage defines the expected data from the JSON-encoded API response.

type ReactionRemovedEvent

type ReactionRemovedEvent reactionEvent

ReactionRemovedEvent represents the Reaction removed event.

type ReconnectURLEvent

type ReconnectURLEvent struct {
	Type string `json:"type"`
	URL  string `json:"url"`
}

ReconnectURLEvent represents the receiving reconnect url event.

type Reply

type Reply struct {
	User      string `json:"user,omitempty"`
	Timestamp string `json:"ts,omitempty"`
}

Reply defines the structure of a message reply.

type Response

type Response struct {
	Ok               bool             `json:"ok"`
	Error            string           `json:"error,omitempty"`
	Warning          string           `json:"warning,omitempty"`
	Needed           string           `json:"needed,omitempty"`
	Provided         string           `json:"provided,omitempty"`
	Errors           []ErrMsgs        `json:"errors,omitempty"`
	ResponseMetadata ResponseMetadata `json:"response_metadata,omitempty"`
}

Response defines the expected data from the JSON-encoded API response.

type ResponseBot

type ResponseBot struct {
	Response
	Bot Bot `json:"bot"`
}

ResponseBot defines the JSON-encoded output for Bot.

type ResponseChannelsInfo

type ResponseChannelsInfo struct {
	Response
	Channel Channel `json:"channel"`
}

type ResponseChannelsList

type ResponseChannelsList struct {
	Response
	Channels []Channel `json:"channels"`
}

ResponseChannelsList defines the JSON-encoded output for ChannelsList.

type ResponseConversationsClose

type ResponseConversationsClose struct {
	Response
	NoOp          bool `json:"no_op,omitempty"`
	AlreadyClosed bool `json:"already_closed,omitempty"`
}

type ResponseConversationsMembers

type ResponseConversationsMembers struct {
	Response
	Members          []string         `json:"members"`
	ResponseMetadata ResponseMetadata `json:"response_metadata"`
}

type ResponseDNDStatus

type ResponseDNDStatus struct {
	Response
	DNDStatus
}

ResponseDNDStatus defines the JSON-encoded output for DND status.

type ResponseDNDTeam

type ResponseDNDTeam struct {
	Response
	Cached bool                 `json:"cached"`
	Users  map[string]DNDStatus `json:"users"`
}

ResponseDNDTeam defines the JSON-encoded output for DND team status.

type ResponseEmailCheck

type ResponseEmailCheck struct {
	Response
	Type    string `json:"type"`
	Email   string `json:"email"`
	AuthURL string `json:"auth_url"`
}

ResponseEmailCheck defines the JSON-encoded output for Revocation.

type ResponseEmojiList

type ResponseEmojiList struct {
	Response
	CacheTimestamp string            `json:"cache_ts"`
	Emoji          map[string]string `json:"emoji"`
}

ResponseEmojiList defines the JSON-encoded output for EmojiList.

type ResponseEvent

type ResponseEvent struct {
	Type      string  `json:"type"`
	Channel   string  `json:"channel"`
	FileID    string  `json:"file_id"`
	UserID    string  `json:"user_id"`
	User      string  `json:"user"`
	ItemUser  string  `json:"item_user"`
	Subtype   string  `json:"subtype"`
	Hidden    bool    `json:"hidden"`
	IsMpim    bool    `json:"is_mpim"`
	Message   Message `json:"message,omitempty"`
	File      File    `json:"file,omitempty"`
	Reaction  string  `json:"reaction"`
	EventTS   string  `json:"event_ts"`
	Latest    string  `json:"latest"`
	Timestamp string  `json:"ts"`

	Item ResponseEventItem `json:"item"`
}

ResponseEvent defines the JSON-encoded output for Event.

type ResponseEventItem

type ResponseEventItem struct {
	Type      string `json:"type"`
	Channel   string `json:"channel"`
	Timestamp string `json:"ts"`
}

ResponseEventItem defines the JSON-encoded output for EventItem.

type ResponseEventlogs

type ResponseEventlogs struct {
	Response
	Events  []ResponseEvent `json:"events"`
	HasMore bool            `json:"has_more"`
	Total   int             `json:"total"`
}

ResponseEventlogs defines the JSON-encoded output for Eventlogs.

type ResponseFilesComments

type ResponseFilesComments struct {
	Response
	Comment FileComment `json:"comment"`
}

ResponseFilesComments defines the JSON-encoded output for FilesComments.

type ResponseFilesInfo

type ResponseFilesInfo struct {
	Response
	File     File          `json:"file"`
	Comments []FileComment `json:"comments"`
	Paging   Paging        `json:"paging"`
}

ResponseFilesInfo defines the JSON-encoded output for FilesInfo.

type ResponseFilesList

type ResponseFilesList struct {
	Response
	Files  []File `json:"files"`
	Paging Paging `json:"paging"`
}

ResponseFilesList defines the JSON-encoded output for FilesList.

type ResponseFilesSharedPublicURL

type ResponseFilesSharedPublicURL struct {
	Response
	File File `json:"file"`
}

ResponseFilesSharedPublicURL defines the JSON-encoded output for FilesSharedPublicURL.

type ResponseFilesUpload

type ResponseFilesUpload struct {
	Response
	File File `json:"file"`
}

ResponseFilesUpload defines the JSON-encoded output for FilesUpload.

type ResponseMetadata

type ResponseMetadata struct {
	Messages   []string `json:"messages"`
	Warnings   []string `json:"warnings"`
	NextCursor string   `json:"next_cursor"`
}

type ResponseMigrationExchange

type ResponseMigrationExchange struct {
	Response
	TeamID         string            `json:"team_id"`
	EnterpriseID   string            `json:"enterprise_id"`
	UserIDMap      map[string]string `json:"user_id_map"`
	InvalidUserIds []string          `json:"invalid_user_ids"`
}

ResponseMigrationExchange defines the expected data from the JSON-encoded API response.

type ResponsePinsList

type ResponsePinsList struct {
	Response
	Items []PinsListItem `json:"items"`
}

ResponsePinsList defines the JSON-encoded output for PinsList.

type ResponseReactionsGet

type ResponseReactionsGet struct {
	Response
	ReactionItem
}

ResponseReactionsGet defines the JSON-encoded output for ReactionsGet.

type ResponseReactionsList

type ResponseReactionsList struct {
	Response
	Items  []ReactionItem `json:"items"`
	Paging Paging         `json:"paging"`
}

ResponseReactionsList defines the JSON-encoded output for ReactionsList.

type ResponseSearch

type ResponseSearch struct {
	Response
	Query    string         `json:"query"`
	Files    SearchFiles    `json:"files"`
	Posts    SearchPosts    `json:"posts"`
	Messages SearchMessages `json:"messages"`
}

type ResponseSearchUsers

type ResponseSearchUsers struct {
	Response
	Results           []User   `json:"results"`
	PresenceActiveIds []string `json:"presence_active_ids"`
}

type ResponseSnoozeStatus

type ResponseSnoozeStatus struct {
	Response
	SnoozeInfo
}

ResponseSnoozeStatus defines the JSON-encoded output for set Snooze.

type ResponseStarsList

type ResponseStarsList struct {
	Response
	Items  []StarsListItem `json:"items"`
	Paging Paging          `json:"paging"`
}

ResponseStarsList defines the JSON-encoded output for StarsList.

type ResponseUserAvatar

type ResponseUserAvatar struct {
	Response
	UploadID  string                   `json:"upload_id"`
	UploadURL string                   `json:"upload_url"`
	Profile   ResponseUserPhotoProfile `json:"profile"`
}

ResponseUserAvatar defines the JSON-encoded output for UserAvatar.

type ResponseUserIdentity

type ResponseUserIdentity struct {
	Response
	Profile UserProfile `json:"profile"`
}

ResponseUserIdentity defines the JSON-encoded output for UserIdentity.

type ResponseUserPhoto

type ResponseUserPhoto struct {
	Response
	Profile ResponseUserPhotoProfile `json:"profile"`
}

ResponseUserPhoto defines the JSON-encoded output for UserPhoto.

type ResponseUserPhotoProfile

type ResponseUserPhotoProfile struct {
	AvatarHash    string `json:"avatar_hash"`
	Image1024     string `json:"image_1024"`
	Image192      string `json:"image_192"`
	Image24       string `json:"image_24"`
	Image32       string `json:"image_32"`
	Image48       string `json:"image_48"`
	Image512      string `json:"image_512"`
	Image72       string `json:"image_72"`
	ImageOriginal string `json:"image_original"`
}

ResponseUserPhotoProfile defines the JSON-encoded output for UserPhotoProfile.

type ResponseUserPhotoUpload

type ResponseUserPhotoUpload struct {
	Response
	ID  string `json:"id"`
	URL string `json:"url"`
}

ResponseUserPhotoUpload defines the JSON-encoded output for UserPhotoUpload.

type ResponseUserPrefs

type ResponseUserPrefs struct {
	Response
	Prefs UserPrefs `json:"prefs"`
}

ResponseUserPrefs defines the JSON-encoded output for UserPrefs.

type ResponseUsersCounts

type ResponseUsersCounts struct {
	Response
	Channels        []CountChannel        `json:"channels"`
	Groups          []CountGroup          `json:"groups"`
	InstantMessages []CountInstantMessage `json:"ims"`
}

ResponseUsersCounts defines the JSON-encoded output for UsersCounts.

type ResponseUsersGetPresence

type ResponseUsersGetPresence struct {
	Response
	UserPresence
}

ResponseUsersGetPresence defines the JSON-encoded output for UsersGetPresence.

type ResponseUsersIdentity

type ResponseUsersIdentity struct {
	Response
	Team Team          `json:"team"`
	User UsersIdentity `json:"user"`
}

ResponseUsersIdentity defines the JSON-encoded output for UsersIdentity.

type ResponseUsersInfo

type ResponseUsersInfo struct {
	Response
	User User `json:"user"`
}

ResponseUsersInfo defines the JSON-encoded output for UsersInfo.

type ResponseUsersList

type ResponseUsersList struct {
	Response
	Members          []User           `json:"members"`
	CacheTS          int              `json:"cache_ts"`
	ResponseMetadata ResponseMetadata `json:"response_metadata"`
}

ResponseUsersList defines the JSON-encoded output for UsersList.

type SearchArgs

type SearchArgs struct {
	Query     string `json:"query"`
	Count     int    `json:"count"`
	Highlight bool   `json:"highlight"`
	Page      int    `json:"page"`
	Sort      string `json:"sort"`
	SortDir   string `json:"sort_dir"`
}

SearchArgs defines the data to send to the API service.

type SearchChannel

type SearchChannel struct {
	ID                 string        `json:"id"`
	IsChannel          bool          `json:"is_channel"`
	IsExtShared        bool          `json:"is_ext_shared"`
	IsGroup            bool          `json:"is_group"`
	IsIM               bool          `json:"is_im"`
	IsMpim             bool          `json:"is_mpim"`
	IsOrgShared        bool          `json:"is_org_shared"`
	IsPendingExtShared bool          `json:"is_pending_ext_shared"`
	IsPrivate          bool          `json:"is_private"`
	IsShared           bool          `json:"is_shared"`
	Name               string        `json:"name"`
	PendingShared      []interface{} `json:"pending_shared"`
}

type SearchFiles

type SearchFiles struct {
	Matches    []File     `json:"matches"`
	Pagination Pagination `json:"pagination"`
	Paging     Paging     `json:"paging"`
	Total      int        `json:"total"`
}

type SearchMatches

type SearchMatches struct {
	// TODO(cixtor): find a way to convert this into a Message. Currently, the
	// problem is that Channel is not a string, which is what we get from the
	// API when we get a Message.
	Attachments []Attachment  `json:"attachments"`
	Channel     SearchChannel `json:"channel"`
	IID         string        `json:"iid"`
	Permalink   string        `json:"permalink"`
	Team        string        `json:"team"`
	Text        string        `json:"text"`
	Timestamp   string        `json:"ts"`
	Type        string        `json:"type"`
	User        string        `json:"user"`
	Username    string        `json:"username"`
}

type SearchMessages

type SearchMessages struct {
	Matches    []SearchMatches `json:"matches"`
	Pagination Pagination      `json:"pagination"`
	Paging     Paging          `json:"paging"`
	Total      int             `json:"total"`
}

type SearchModulesInput added in v1.0.2

type SearchModulesInput struct {
	ExcludeMyChannels    bool   `json:"exclude_my_channels"`
	ExtraMessageData     bool   `json:"extra_message_data"`
	Highlight            bool   `json:"highlight"`
	NoUserProfile        bool   `json:"no_user_profile"`
	Sort                 string `json:"sort"`
	SortDir              string `json:"sort_dir"`
	Browse               string `json:"browse"`
	BrowseSessionID      string `json:"browse_session_id"`
	ClientReqID          string `json:"client_req_id"`
	Count                int    `json:"count"`
	MaxFilterSuggestions int    `json:"max_filter_suggestions"`
	Module               string `json:"module"`
	Page                 int    `json:"page"`
	ChannelType          string `json:"channel_type"`
	Extracts             int    `json:"extracts"`
	Query                string `json:"query"`
	Team                 string `json:"team"`
}

type SearchModulesResponse added in v1.0.2

type SearchModulesResponse struct {
	Response
	Module     string      `json:"module"`
	Filters    interface{} `json:"filters"`
	Query      string      `json:"query"`
	Pagination Pagination  `json:"pagination"`
	Items      []Channel   `json:"items"`
}

type SearchPosts

type SearchPosts struct {
	Matches    []interface{} `json:"matches"`
	Pagination Pagination    `json:"pagination"`
	Paging     Paging        `json:"paging"`
	Total      int           `json:"total"`
}

type SearchUsersArgs

type SearchUsersArgs struct {
	Query               string `json:"query"`
	Count               int    `json:"count"`
	Fuzz                int    `json:"fuzz"`
	UAX29Tokenizer      bool   `json:"uax29_tokenizer"`
	SearchProfileFields bool   `json:"search_profile_fields"`
}

type SlackAPI

type SlackAPI struct {
	// contains filtered or unexported fields
}

SlackAPI defines the base object. It holds the API token, the information of the user account associated to such API token, the information for the robot session (if the user decides has activated it), a list of all the available public channels, a list of all the accessible private groups, and a list of the users registered into the Slack team.

func New

func New() *SlackAPI

New instantiates a new object.

func (*SlackAPI) APITest

func (s *SlackAPI) APITest(error string) Response

APITest is https://api.slack.com/methods/api.test

func (*SlackAPI) AppsConnectionsOpen

func (s *SlackAPI) AppsConnectionsOpen() AppsConnectionsOpenResponse

AppsConnectionsOpen is apps.connections.open

func (*SlackAPI) AppsList

func (s *SlackAPI) AppsList() AppsListResponse

AppsList lists associated applications.

func (*SlackAPI) AppsManifestCreate

func (s *SlackAPI) AppsManifestCreate(manifest string) AppsManifestCreateResponse

AppsManifestCreate is https://api.slack.com/methods/apps.manifest.create

func (*SlackAPI) AppsManifestDelete

func (s *SlackAPI) AppsManifestDelete(appID string) Response

AppsManifestDelete is https://api.slack.com/methods/apps.manifest.delete

func (*SlackAPI) AppsManifestExport

func (s *SlackAPI) AppsManifestExport(appID string) AppsManifestExportResponse

AppsManifestExport is https://api.slack.com/methods/apps.manifest.export

func (*SlackAPI) AppsManifestUpdate

func (s *SlackAPI) AppsManifestUpdate(appID string, manifest string) AppsManifestUpdateResponse

AppsManifestUpdate is https://api.slack.com/methods/apps.manifest.update

func (*SlackAPI) AppsManifestValidate

func (s *SlackAPI) AppsManifestValidate(manifest string, appID string) Response

AppsManifestValidate is https://api.slack.com/methods/apps.manifest.validate

func (*SlackAPI) AuthRevoke

func (s *SlackAPI) AuthRevoke(test bool) AuthRevokeResponse

AuthRevoke is https://api.slack.com/methods/auth.revoke

func (*SlackAPI) AuthTeamsList

func (s *SlackAPI) AuthTeamsList(input AuthTeamsListInput) AuthTeamsListResponse

AuthTeamsList is https://api.slack.com/methods/auth.teams.list

func (*SlackAPI) AuthTest

func (s *SlackAPI) AuthTest() (*Owner, error)

AuthTest checks authentication and identity.

func (*SlackAPI) BotsInfo

func (s *SlackAPI) BotsInfo(bot string) ResponseBot

BotsInfo gets information about a bot user.

func (*SlackAPI) ChatDelete

func (s *SlackAPI) ChatDelete(data MessageArgs) ModifiedMessage

ChatDelete deletes a message.

func (*SlackAPI) ChatDeleteAttachment added in v1.0.1

func (s *SlackAPI) ChatDeleteAttachment(input ChatDeleteAttachmentInput) ChatDeleteAttachmentResponse

ChatDeleteAttachment is https://api.slack.com/methods/chat.deleteAttachment

func (*SlackAPI) ChatMeMessage

func (s *SlackAPI) ChatMeMessage(data MessageArgs) ModifiedMessage

ChatMeMessage share a me message into a channel.

func (*SlackAPI) ChatPostMessage

func (s *SlackAPI) ChatPostMessage(input MessageArgs) Post

ChatPostMessage is https://api.slack.com/methods/chat.postMessage

func (*SlackAPI) ChatUpdate

func (s *SlackAPI) ChatUpdate(data MessageArgs) Post

ChatUpdate updates a message.

func (*SlackAPI) ClientCounts added in v1.0.2

func (s *SlackAPI) ClientCounts(input ClientCountsInput) ClientCountsResponse

ClientCounts is https://api.slack.com/methods/client.counts

func (*SlackAPI) ClientShouldReload added in v1.0.2

func (s *SlackAPI) ClientShouldReload(input ClientShouldReloadInput) ClientShouldReloadResponse

ClientShouldReload is https://api.slack.com/methods/client.shouldReload

func (*SlackAPI) ConversationsAcceptSharedInvite

func (s *SlackAPI) ConversationsAcceptSharedInvite(input ConversationsAcceptSharedInviteInput) Response

ConversationsAcceptSharedInvite is https://api.slack.com/methods/conversations.acceptSharedInvite

func (*SlackAPI) ConversationsApproveSharedInvite

func (s *SlackAPI) ConversationsApproveSharedInvite(invite_id string, target_team string) Response

ConversationsApproveSharedInvite is https://api.slack.com/methods/conversations.approveSharedInvite

func (*SlackAPI) ConversationsArchive

func (s *SlackAPI) ConversationsArchive(channel string) Response

ConversationsArchive archives a conversation.

func (*SlackAPI) ConversationsClose

func (s *SlackAPI) ConversationsClose(channel string) ResponseConversationsClose

ConversationsClose closes a direct message or multi-person direct message. Ref: https://api.slack.com/methods/conversations.close

func (*SlackAPI) ConversationsCreate

func (s *SlackAPI) ConversationsCreate(input ConversationsCreateInput) ResponseChannelsInfo

ConversationsCreate creates a channel.

func (*SlackAPI) ConversationsDeclineSharedInvite

func (s *SlackAPI) ConversationsDeclineSharedInvite(input ConversationsDeclineSharedInviteInput) Response

ConversationsDeclineSharedInvite is https://api.slack.com/methods/conversations.declineSharedInvite

func (*SlackAPI) ConversationsGenericInfo

func (s *SlackAPI) ConversationsGenericInfo(channels string) ResponseChannelsList

ConversationsGenericInfo retrieve information about a generic conversation.

func (*SlackAPI) ConversationsHistory

func (s *SlackAPI) ConversationsHistory(input ConversationsHistoryInput) History

ConversationsHistory fetches a conversation's history of messages and events.

func (*SlackAPI) ConversationsInfo

func (s *SlackAPI) ConversationsInfo(channel string) ResponseChannelsInfo

ConversationsInfo retrieve information about a conversation.

func (*SlackAPI) ConversationsInvite

func (s *SlackAPI) ConversationsInvite(channel string, users ...string) ResponseChannelsInfo

ConversationsInvite invites users to a channel.

func (*SlackAPI) ConversationsJoin

func (s *SlackAPI) ConversationsJoin(channel string) ResponseChannelsInfo

ConversationsJoin joins an existing conversation.

func (*SlackAPI) ConversationsKick

func (s *SlackAPI) ConversationsKick(channel string, user string) Response

ConversationsKick removes a user from a conversation.

func (*SlackAPI) ConversationsLeave

func (s *SlackAPI) ConversationsLeave(channel string) Response

ConversationsLeave leaves a conversation.

func (*SlackAPI) ConversationsList

func (s *SlackAPI) ConversationsList(input ConversationsListInput) ResponseChannelsList

ConversationsList lists all channels in a Slack team.

func (*SlackAPI) ConversationsListConnectInvites

ConversationsListConnectInvites retrieve members of a conversation.

func (*SlackAPI) ConversationsMark

func (s *SlackAPI) ConversationsMark(input ConversationsMarkInput) Response

ConversationsMark sets the read cursor in a channel.

func (*SlackAPI) ConversationsMembers

func (s *SlackAPI) ConversationsMembers(input ConversationsMembersInput) ResponseConversationsMembers

ConversationsMembers retrieve members of a conversation.

func (*SlackAPI) ConversationsRename

func (s *SlackAPI) ConversationsRename(channel string, name string) ResponseChannelsInfo

ConversationsRename renames a conversation.

func (*SlackAPI) ConversationsReplies

func (s *SlackAPI) ConversationsReplies(input ConversationsRepliesInput) History

ConversationsReplies lists all channels in a Slack team.

func (*SlackAPI) ConversationsSetPurpose

func (s *SlackAPI) ConversationsSetPurpose(channel string, purpose string) ChannelPurposeNow

ConversationsSetPurpose sets the purpose for a conversation.

func (*SlackAPI) ConversationsSetTopic

func (s *SlackAPI) ConversationsSetTopic(channel string, topic string) ChannelTopicNow

ConversationsSetTopic sets the topic for a conversation.

func (*SlackAPI) ConversationsSuggestions added in v1.0.2

func (s *SlackAPI) ConversationsSuggestions() ConversationsSuggestionsResponse

ConversationsSuggestions is https://api.slack.com/methods/conversations.suggestions

func (*SlackAPI) ConversationsUnarchive

func (s *SlackAPI) ConversationsUnarchive(channel string) Response

ConversationsUnarchive reverses conversation archival.

func (*SlackAPI) DNDEndDnd

func (s *SlackAPI) DNDEndDnd() Response

DNDEndDnd ends the current user's "Do Not Disturb" session immediately.

func (*SlackAPI) DNDEndSnooze

func (s *SlackAPI) DNDEndSnooze() ResponseDNDStatus

DNDEndSnooze ends the current user's snooze mode immediately.

func (*SlackAPI) DNDInfo

func (s *SlackAPI) DNDInfo(user string) ResponseDNDStatus

DNDInfo retrieves a user's current "Do Not Disturb" status

func (*SlackAPI) DNDSetSnooze

func (s *SlackAPI) DNDSetSnooze(minutes int) ResponseSnoozeStatus

DNDSetSnooze turns on "Do Not Disturb" mode for the current user.

func (*SlackAPI) DNDTeamInfo

func (s *SlackAPI) DNDTeamInfo(users string) ResponseDNDTeam

DNDTeamInfo retrieves the "Do Not Disturb" status for users on a team.

func (*SlackAPI) EmojiList

func (s *SlackAPI) EmojiList() ResponseEmojiList

EmojiList lists custom emoji for a team.

func (*SlackAPI) EventlogHistory

func (s *SlackAPI) EventlogHistory(start string) ResponseEventlogs

EventlogHistory lists all the events since the specified time.

func (*SlackAPI) FilesCommentsAdd

func (s *SlackAPI) FilesCommentsAdd(file string, comment string) ResponseFilesComments

FilesCommentsAdd add a comment to an existing file.

func (*SlackAPI) FilesCommentsDelete

func (s *SlackAPI) FilesCommentsDelete(file string, commentid string) Response

FilesCommentsDelete deletes an existing comment on a file.

func (*SlackAPI) FilesCommentsEdit

func (s *SlackAPI) FilesCommentsEdit(file string, commentid string, comment string) ResponseFilesComments

FilesCommentsEdit edit an existing file comment.

func (*SlackAPI) FilesDelete

func (s *SlackAPI) FilesDelete(file string) Response

FilesDelete deletes a file.

func (*SlackAPI) FilesInfo

func (s *SlackAPI) FilesInfo(file string, count int, page int) ResponseFilesInfo

FilesInfo gets information about a team file.

func (*SlackAPI) FilesList

func (s *SlackAPI) FilesList(data FileListArgs) ResponseFilesList

FilesList lists and filters team files. FilesListAfterTime lists and filters team files after this timestamp (inclusive). FilesListBeforeTime lists and filters team files before this timestamp (inclusive). FilesListByChannel lists and filters team files in a specific channel. FilesListByType lists and filters team files by type: all, posts, snippets, images, gdocs, zips, pdfs. FilesListByUser lists and filters team files created by a single user.

func (*SlackAPI) FilesRevokePublicURL

func (s *SlackAPI) FilesRevokePublicURL(file string) interface{}

FilesRevokePublicURL revokes public/external sharing access for a file.

func (*SlackAPI) FilesSharedPublicURL

func (s *SlackAPI) FilesSharedPublicURL(file string) ResponseFilesSharedPublicURL

FilesSharedPublicURL enables a file for public/external sharing.

func (*SlackAPI) FilesUpload

func (s *SlackAPI) FilesUpload(data FileUploadArgs) ResponseFilesUpload

FilesUpload uploads or creates a file.

func (*SlackAPI) HelpIssuesList

func (s *SlackAPI) HelpIssuesList() HelpIssuesListResponse

HelpIssuesList is https://api.slack.com/methods/help.issues.list

func (*SlackAPI) MigrationExchange

func (s *SlackAPI) MigrationExchange(users []string, order bool) ResponseMigrationExchange

MigrationExchange for Enterprise Grid workspaces, map local user IDs to global user IDs.

func (*SlackAPI) NewRTM

func (s *SlackAPI) NewRTM(input RTMInput) (*RTM, error)

NewRTM is https://api.slack.com/methods/rtm.connect

Example:

rtm, err := s.Client.NewRTM(slackapi.RTMInput{})
if err != nil {
  panic(err)
}
rtm.ManageEvents()
go func() {
  time.Sleep(time.Minute)
  rtm.Disconnect()
}()
for msg := range s.Session.Events {
  fmt.Printf("%#v\n", msg)
}

func (*SlackAPI) PinsAdd

func (s *SlackAPI) PinsAdd(channel string, itemid string) Response

PinsAdd pins an item to a channel.

func (*SlackAPI) PinsList

func (s *SlackAPI) PinsList(channel string) ResponsePinsList

PinsList lists items pinned to a channel.

func (*SlackAPI) PinsRemove

func (s *SlackAPI) PinsRemove(channel string, itemid string) Response

PinsRemove lists items pinned to a channel.

func (*SlackAPI) ReactionsAdd

func (s *SlackAPI) ReactionsAdd(data ReactionArgs) Response

ReactionsAdd adds a reaction to an item.

func (*SlackAPI) ReactionsGet

func (s *SlackAPI) ReactionsGet(data ReactionArgs) ResponseReactionsGet

ReactionsGet gets reactions for an item.

func (*SlackAPI) ReactionsList

func (s *SlackAPI) ReactionsList(data ReactionListArgs) ResponseReactionsList

ReactionsList lists reactions made by a user.

func (*SlackAPI) ReactionsRemove

func (s *SlackAPI) ReactionsRemove(data ReactionArgs) Response

ReactionsRemove removes a reaction from an item.

func (*SlackAPI) SearchAll

func (s *SlackAPI) SearchAll(data SearchArgs) ResponseSearch

SearchAll searches for messages and files matching a query.

func (*SlackAPI) SearchFiles

func (s *SlackAPI) SearchFiles(data SearchArgs) ResponseSearch

SearchFiles searches for files matching a query.

func (*SlackAPI) SearchMessages

func (s *SlackAPI) SearchMessages(data SearchArgs) ResponseSearch

SearchMessages searches for messages matching a query.

func (*SlackAPI) SearchModules added in v1.0.2

func (s *SlackAPI) SearchModules(input SearchModulesInput) SearchModulesResponse

SearchModules is https://api.slack.com/methods/search.modules

func (*SlackAPI) SearchUsers

func (s *SlackAPI) SearchUsers(input SearchUsersArgs) (ResponseSearchUsers, error)

SearchUsers searches for users matching a query.

func (*SlackAPI) SetCookie

func (s *SlackAPI) SetCookie(cookie string)

SetCookie sets the API cookie for the session. Slack changed the permissions of all their tokens; now if you inspect the HTTP requests from a web browser session and copy the token from there without copying the cookies, the other requests will fail.

func (*SlackAPI) SetDebug

func (s *SlackAPI) SetDebug(enable bool)

SetDebug instructs the library to print all HTTP requests.

func (*SlackAPI) SetTimeout

func (s *SlackAPI) SetTimeout(t time.Duration)

SetTimeout sets the maximum amount of time to wait for the HTTP request.

func (*SlackAPI) SetToken

func (s *SlackAPI) SetToken(token string)

SetToken sets the API token for the session.

func (*SlackAPI) SignupCheckEmail

func (s *SlackAPI) SignupCheckEmail(email string) ResponseEmailCheck

SignupCheckEmail checks if an email address is valid.

func (*SlackAPI) SignupConfirmEmail

func (s *SlackAPI) SignupConfirmEmail(email string) Response

SignupConfirmEmail confirm an email address for signup.

func (*SlackAPI) StarsAdd

func (s *SlackAPI) StarsAdd(channel string, itemid string) Response

StarsAdd adds a star to an item.

func (*SlackAPI) StarsList

func (s *SlackAPI) StarsList(count int, page int) ResponseStarsList

StarsList lists stars for a user.

func (*SlackAPI) StarsRemove

func (s *SlackAPI) StarsRemove(channel string, itemid string) Response

StarsRemove removes a star from an item.

func (*SlackAPI) TeamAccessLogs

func (s *SlackAPI) TeamAccessLogs(input TeamAccessLogsInput) TeamAccessLogsResponse

TeamAccessLogs is https://api.slack.com/methods/team.accessLogs

func (*SlackAPI) TeamBillableInfo

func (s *SlackAPI) TeamBillableInfo(teamID string, user string) TeamBillableInfoResponse

TeamBillableInfo is https://api.slack.com/methods/team.billableInfo

func (*SlackAPI) TeamBillingInfo

func (s *SlackAPI) TeamBillingInfo() TeamBillingInfoResponse

TeamBillingInfo is https://api.slack.com/methods/team.billing.info

func (*SlackAPI) TeamChannelsInfo added in v1.0.2

func (s *SlackAPI) TeamChannelsInfo(input TeamChannelsInfoInput) TeamChannelsInfoResponse

TeamChannelsInfo is https://api.slack.com/methods/team.channels.info

func (*SlackAPI) TeamChannelsMembership added in v1.0.2

func (s *SlackAPI) TeamChannelsMembership(input TeamChannelsMembershipInput) TeamChannelsMembershipResponse

TeamChannelsMembership is https://api.slack.com/methods/team.channels.membership

func (*SlackAPI) TeamInfo

func (s *SlackAPI) TeamInfo(team string) TeamInfoResponse

TeamInfo gets information about the current team.

The team parameter is to get info on, if omitted, will return information about the current team. Will only return team that the authenticated token is allowed to see through external shared channels

func (*SlackAPI) TeamListExternal added in v1.0.2

func (s *SlackAPI) TeamListExternal(input TeamListExternalInput) TeamListExternalResponse

TeamListExternal is https://api.slack.com/methods/team.listExternal

func (*SlackAPI) TeamPreferencesList

func (s *SlackAPI) TeamPreferencesList() TeamPreferencesListResponse

TeamPreferencesList https://api.slack.com/methods/team.preferences.list

func (*SlackAPI) TeamProfileGet

func (s *SlackAPI) TeamProfileGet() TeamProfileResponse

TeamProfileGet https://api.slack.com/methods/team.profile.get

func (*SlackAPI) UsersCounts

func (s *SlackAPI) UsersCounts() ResponseUsersCounts

UsersCounts count number of users in the team.

func (*SlackAPI) UsersDeletePhoto

func (s *SlackAPI) UsersDeletePhoto() Response

UsersDeletePhoto delete the user avatar.

func (*SlackAPI) UsersGetPresence

func (s *SlackAPI) UsersGetPresence(query string) ResponseUsersGetPresence

UsersGetPresence gets user presence information.

func (*SlackAPI) UsersID

func (s *SlackAPI) UsersID(query string, limit int) string

UsersID gets user identifier from username.

func (*SlackAPI) UsersIdentity

func (s *SlackAPI) UsersIdentity() ResponseUsersIdentity

UsersIdentity get a user's identity.

func (*SlackAPI) UsersInfo

func (s *SlackAPI) UsersInfo(query string) ResponseUsersInfo

UsersInfo gets information about a user.

func (*SlackAPI) UsersList

func (s *SlackAPI) UsersList(limit int, cursor string) ResponseUsersList

UsersList lists all users in a Slack team.

func (*SlackAPI) UsersListWithPresence

func (s *SlackAPI) UsersListWithPresence() ResponseUsersList

UsersListWithPresence lists all users in a Slack team.

func (*SlackAPI) UsersLookupByEmail

func (s *SlackAPI) UsersLookupByEmail(email string) User

UsersLookupByEmail find a user with an email address.

func (*SlackAPI) UsersPrefsGet

func (s *SlackAPI) UsersPrefsGet() ResponseUserPrefs

UsersPrefsGet get user account preferences.

func (*SlackAPI) UsersPrefsSet

func (s *SlackAPI) UsersPrefsSet(name string, value string) ResponseUserPrefs

UsersPrefsSet set user account preferences.

func (*SlackAPI) UsersPreparePhoto

func (s *SlackAPI) UsersPreparePhoto(image string) ResponseUserPhotoUpload

UsersPreparePhoto upload a picture to use as the avatar.

func (*SlackAPI) UsersProfileGet

func (s *SlackAPI) UsersProfileGet(query string) ResponseUserIdentity

UsersProfileGet retrieves a user's profile information.

func (*SlackAPI) UsersProfileGetWithLabels

func (s *SlackAPI) UsersProfileGetWithLabels(query string) ResponseUserIdentity

UsersProfileGetWithLabels retrieves a user's profile information.

func (*SlackAPI) UsersProfileSet

func (s *SlackAPI) UsersProfileSet(name string, value string) ResponseUserIdentity

UsersProfileSet set the profile information for a user.

func (*SlackAPI) UsersProfileSetMultiple

func (s *SlackAPI) UsersProfileSetMultiple(profile string) ResponseUserIdentity

UsersProfileSetMultiple set the profile information for a user.

func (*SlackAPI) UsersSetActive

func (s *SlackAPI) UsersSetActive() Response

UsersSetActive marks a user as active.

func (*SlackAPI) UsersSetAvatar

func (s *SlackAPI) UsersSetAvatar(image string) ResponseUserAvatar

UsersSetAvatar upload a picture and set it as the avatar.

func (*SlackAPI) UsersSetPhoto

func (s *SlackAPI) UsersSetPhoto(imageid string) ResponseUserPhoto

UsersSetPhoto define which picture will be the avatar.

func (*SlackAPI) UsersSetPresence

func (s *SlackAPI) UsersSetPresence(value string) Response

UsersSetPresence manually sets user presence.

func (*SlackAPI) UsersSetStatus

func (s *SlackAPI) UsersSetStatus(emoji string, text string) ResponseUserIdentity

UsersSetStatus set the status message and emoji.

func (*SlackAPI) WorkflowsStepCompleted

func (s *SlackAPI) WorkflowsStepCompleted(input WorkflowsStepCompletedInput) Response

WorkflowsStepCompleted https://api.slack.com/methods/workflows.stepCompleted

func (*SlackAPI) WorkflowsStepFailed

func (s *SlackAPI) WorkflowsStepFailed(input WorkflowsStepFailedInput) Response

WorkflowsStepFailed https://api.slack.com/methods/workflows.stepFailed

func (*SlackAPI) WorkflowsUpdateStep

func (s *SlackAPI) WorkflowsUpdateStep(input WorkflowsUpdateStepInput) Response

WorkflowsUpdateStep https://api.slack.com/methods/workflows.updateStep

type SlashCommand

type SlashCommand struct {
	Command      string `json:"command"`
	Description  string `json:"description"`
	UsageHint    string `json:"usage_hint"`
	ShouldEscape bool   `json:"should_escape"`
}

type SnoozeDebug

type SnoozeDebug struct {
	SnoozeEndDate string `json:"snooze_end_date,omitempty"`
}

SnoozeDebug defines the JSON-encoded output for SnoozeDebug.

type SnoozeInfo

type SnoozeInfo struct {
	SnoozeEnabled   bool        `json:"snooze_enabled,omitempty"`
	SnoozeEndTime   int         `json:"snooze_endtime,omitempty"`
	SnoozeRemaining int         `json:"snooze_remaining,omitempty"`
	SnoozeDebug     SnoozeDebug `json:"snooze_debug,omitempty"`
}

SnoozeInfo defines the JSON-encoded output for SnoozeInfo.

type StarAddedEvent

type StarAddedEvent starEvent

StarAddedEvent represents the Star added event.

type StarRemovedEvent

type StarRemovedEvent starEvent

StarRemovedEvent represents the Star removed event.

type StarsListItem

type StarsListItem struct {
	Type    string  `json:"type"`
	Channel string  `json:"channel"`
	Message Message `json:"message"`
	File    File    `json:"file"`
	Comment Comment `json:"comment"`
}

StarsListItem defines the expected data from the JSON-encoded API response.

type Subteam

type Subteam struct {
	ID                  string              `json:"id"`
	TeamID              string              `json:"team_id"`
	IsUserGroup         bool                `json:"is_usergroup"`
	IsSubteam           bool                `json:"is_subteam"`
	IsExternal          bool                `json:"is_external"`
	AutoProvision       bool                `json:"auto_provision"`
	Name                string              `json:"name"`
	Description         string              `json:"description"`
	Handle              string              `json:"handle"`
	DateCreate          int64               `json:"date_create"`
	DateUpdate          int64               `json:"date_update"`
	DateDelete          int64               `json:"date_delete"`
	AutoType            interface{}         `json:"auto_type"`
	EnterpriseSubteamID string              `json:"enterprise_subteam_id"`
	CreatedBy           string              `json:"created_by"`
	UpdatedBy           string              `json:"updated_by"`
	DeletedBy           string              `json:"deleted_by"`
	UserCount           int                 `json:"user_count"`
	Users               []string            `json:"users"`
	Prefs               map[string][]string `json:"prefs"`
}

Subteam represents the subteam metadata.

type SubteamUpdated

type SubteamUpdated struct {
	Type           string  `json:"type"`
	Subteam        Subteam `json:"subteam"`
	EventTimestamp string  `json:"event_ts"`
}

SubteamUpdated represents the changes in team metadata.

type Team

type Team struct {
	ID             string        `json:"id"`
	Name           string        `json:"name"`
	URL            string        `json:"url"`
	Domain         string        `json:"domain"`
	EmailDomain    string        `json:"email_domain"`
	Icon           TeamIcon      `json:"icon"`
	AvatarBaseURL  string        `json:"avatar_base_url"`
	IsVerified     bool          `json:"is_verified"`
	PublicURL      string        `json:"public_url"`
	OrgMigrations  OrgMigrations `json:"external_org_migrations"`
	Channels       []string      `json:"channels"`
	Counts         TeamCounts    `json:"counts"`
	DateCreated    int           `json:"date_created"`
	EnterpriseID   string        `json:"enterprise_id"`
	EnterpriseName string        `json:"enterprise_name"`
}

type TeamAccessLogsInput

type TeamAccessLogsInput struct {
	// End of time range of logs to include in results (inclusive).
	Before string `json:"before"`
	// Number of items to return per page.
	Count int `json:"count"`
	// Page number of results to return.
	Page int `json:"page"`
	// Encoded team id to get logs from, required if org token is used.
	TeamID string `json:"team_id"`
}

type TeamAccessLogsResponse

type TeamAccessLogsResponse struct {
	Response
	Logins []AccessLog `json:"logins"`
}

TeamAccessLogsResponse defines the JSON-encoded output for TeamAccessLogs.

type TeamBillableInfoResponse

type TeamBillableInfoResponse struct {
	Response
	BillableInfo map[string]BillableInfo `json:"billable_info"`
}

type TeamBillingInfoResponse

type TeamBillingInfoResponse struct {
	Response
	Plan string `json:"plan"`
}

type TeamChannelsInfoInput added in v1.0.2

type TeamChannelsInfoInput struct {
	TeamID          string   `json:"-"`
	CheckMembership bool     `json:"check_membership"`
	ChannelIDs      []string `json:"ids"`
}

type TeamChannelsInfoResponse added in v1.0.2

type TeamChannelsInfoResponse struct {
	Response
	Results []Channel `json:"results"`
}

type TeamChannelsMembershipInput added in v1.0.2

type TeamChannelsMembershipInput struct {
	TeamID  string   `json:"-"`
	Channel string   `json:"channel"`
	UserIDs []string `json:"users"`
}

type TeamChannelsMembershipResponse added in v1.0.2

type TeamChannelsMembershipResponse struct {
	Response
	Channel string   `json:"channel"`
	Members []string `json:"members"`
}

type TeamCounts added in v1.0.2

type TeamCounts struct {
	Im      int `json:"im"`
	Mpim    int `json:"mpim"`
	Private int `json:"private"`
	Public  int `json:"public"`
}

type TeamDomainChangeEvent

type TeamDomainChangeEvent struct {
	Type   string `json:"type"`
	URL    string `json:"url"`
	Domain string `json:"domain"`
}

TeamDomainChangeEvent represents the Team domain change event.

type TeamIcon

type TeamIcon struct {
	Image102      string `json:"image_102"`
	Image132      string `json:"image_132"`
	Image34       string `json:"image_34"`
	Image44       string `json:"image_44"`
	Image68       string `json:"image_68"`
	Image88       string `json:"image_88"`
	ImageOriginal string `json:"image_original"`
	Image230      string `json:"image_230"`
}

TeamIcon defines the expected data from the JSON-encoded API response.

type TeamInfoResponse

type TeamInfoResponse struct {
	Response
	Team Team `json:"team"`
}

type TeamIntegrationLogsInput

type TeamIntegrationLogsInput struct {
	// Filter logs to this Slack app. Defaults to all logs.
	AppID string `json:"app_id"`
	// Filter logs with this change type. Defaults to all logs.
	ChangeType string `json:"change_type"`
	// Number of items to return per page.
	Count string `json:"count"`
	// Page number of results to return.
	Page string `json:"page"`
	// Filter logs to this service. Defaults to all logs.
	ServiceID string `json:"service_id"`
	// Encoded team id to get logs from, required if org token is used
	TeamID string `json:"team_id"`
	// Filter logs generated by this user’s actions. Defaults to all logs.
	User string `json:"user"`
}

type TeamIntegrationLogsResponse

type TeamIntegrationLogsResponse struct {
	Response
	Logs   []IntegrationLog `json:"logs"`
	Paging Paging           `json:"paging"`
}

TeamIntegrationLogsResponse defines the JSON-encoded output for TeamIntegrationLogs.

type TeamJoinEvent

type TeamJoinEvent struct {
	Type string `json:"type"`
	User User   `json:"user"`
}

TeamJoinEvent represents the Team join event.

type TeamListExternalInput added in v1.0.2

type TeamListExternalInput struct {
	IncludeAllVisible   int `json:"include_all_visible"`
	IncludeApprovedOrgs int `json:"include_approved_orgs"`
}

type TeamListExternalResponse added in v1.0.2

type TeamListExternalResponse struct {
	Response
	Teams []Team `json:"teams"`
}

type TeamMigrationStartedEvent

type TeamMigrationStartedEvent struct {
	Type string `json:"type"`
}

TeamMigrationStartedEvent represents the Team migration started event.

type TeamPrefChangeEvent

type TeamPrefChangeEvent struct {
	Type  string   `json:"type"`
	Name  string   `json:"name,omitempty"`
	Value []string `json:"value,omitempty"`
}

TeamPrefChangeEvent represents the Team preference change event.

type TeamPreferencesListResponse

type TeamPreferencesListResponse struct {
	Response
	AllowMessageDeletion bool   `json:"allow_message_deletion"`
	DisplayRealNames     bool   `json:"display_real_names"`
	DisableFileUploads   string `json:"disable_file_uploads"`
	MsgEditWindowMins    int    `json:"msg_edit_window_mins"`
	WhoCanPostGeneral    string `json:"who_can_post_general"`
}

type TeamProfile

type TeamProfile struct {
	Fields []TeamProfileField `json:"fields"`
}

type TeamProfileField

type TeamProfileField struct {
	ID             string      `json:"id"`
	Ordering       int         `json:"ordering"`
	FieldName      string      `json:"field_name"`
	Label          string      `json:"label"`
	Hint           string      `json:"hint"`
	Type           string      `json:"type"`
	PossibleValues interface{} `json:"possible_values"`
	Options        interface{} `json:"options"`
	IsHidden       bool        `json:"is_hidden"`
}

TeamProfileField defines the expected data from the JSON-encoded API response.

type TeamProfileResponse

type TeamProfileResponse struct {
	Response
	Profile TeamProfile `json:"profile"`
}

type TeamRenameEvent

type TeamRenameEvent struct {
	Type           string `json:"type"`
	Name           string `json:"name,omitempty"`
	EventTimestamp string `json:"event_ts,omitempty"`
}

TeamRenameEvent represents the Team rename event.

type User

type User struct {
	Color             string      `json:"color"`
	ID                string      `json:"id"`
	Name              string      `json:"name"`
	Presence          string      `json:"presence"`
	Profile           UserProfile `json:"profile"`
	RealName          string      `json:"real_name"`
	Status            string      `json:"status"`
	TeamID            string      `json:"team_id"`
	TwoFactorType     string      `json:"two_factor_type"`
	Tz                string      `json:"tz"`
	TzLabel           string      `json:"tz_label"`
	TzOffset          int         `json:"tz_offset"`
	Deleted           bool        `json:"deleted"`
	Has2fa            bool        `json:"has_2fa"`
	IsAdmin           bool        `json:"is_admin"`
	IsBot             bool        `json:"is_bot"`
	IsOwner           bool        `json:"is_owner"`
	IsPrimaryOwner    bool        `json:"is_primary_owner"`
	IsRestricted      bool        `json:"is_restricted"`
	IsUltraRestricted bool        `json:"is_ultra_restricted"`
}

User defines the expected data from the JSON-encoded API response.

type UserChangeEvent

type UserChangeEvent struct {
	Type string `json:"type"`
	User User   `json:"user"`
}

UserChangeEvent represents the user change event.

type UserPrefs

type UserPrefs struct {
	AllNotificationsPrefs              interface{} `json:"all_notifications_prefs"`
	A11yFontSize                       string      `json:"a11y_font_size"`
	AtChannelSuppressedChannels        string      `json:"at_channel_suppressed_channels"`
	ChannelSort                        string      `json:"channel_sort"`
	ClientLogsPri                      string      `json:"client_logs_pri"`
	DndEndHour                         string      `json:"dnd_end_hour"`
	DndStartHour                       string      `json:"dnd_start_hour"`
	EmailAlerts                        string      `json:"email_alerts"`
	EmojiMode                          string      `json:"emoji_mode"`
	EmojiUse                           string      `json:"emoji_use"`
	FlannelServerPool                  string      `json:"flannel_server_pool"`
	FrecencyEntJumper                  string      `json:"frecency_ent_jumper"`
	FrecencyJumper                     string      `json:"frecency_jumper"`
	HighlightWords                     string      `json:"highlight_words"`
	LastSnippetType                    string      `json:"last_snippet_type"`
	LastTosAcknowledged                string      `json:"last_tos_acknowledged"`
	Locale                             string      `json:"locale"`
	LoudChannels                       string      `json:"loud_channels"`
	LoudChannelsSet                    string      `json:"loud_channels_set"`
	MacSsbBounce                       string      `json:"mac_ssb_bounce"`
	MessagesTheme                      string      `json:"messages_theme"`
	MutedChannels                      string      `json:"muted_channels"`
	NeverChannels                      string      `json:"never_channels"`
	NewMsgSnd                          string      `json:"new_msg_snd"`
	NewxpSeenLastMessage               string      `json:"newxp_seen_last_message"`
	PreferredSkinTone                  string      `json:"preferred_skin_tone"`
	PushAtChannelSuppressedChannels    string      `json:"push_at_channel_suppressed_channels"`
	PushLoudChannels                   string      `json:"push_loud_channels"`
	PushLoudChannelsSet                string      `json:"push_loud_channels_set"`
	PushMentionChannels                string      `json:"push_mention_channels"`
	PushSound                          string      `json:"push_sound"`
	SearchExcludeChannels              string      `json:"search_exclude_channels"`
	SearchSort                         string      `json:"search_sort"`
	SidebarBehavior                    string      `json:"sidebar_behavior"`
	SidebarTheme                       string      `json:"sidebar_theme"`
	SidebarThemeCustomValues           string      `json:"sidebar_theme_custom_values"`
	SsbSpaceWindow                     string      `json:"ssb_space_window"`
	TwoFactorBackupType                string      `json:"two_factor_backup_type"`
	TwoFactorType                      string      `json:"two_factor_type"`
	Tz                                 string      `json:"tz"`
	UserColors                         string      `json:"user_colors"`
	WinssbWindowFlashBehavior          string      `json:"winssb_window_flash_behavior"`
	DisplayRealNamesOverride           int         `json:"display_real_names_override"`
	EmailAlertsSleepUntil              int         `json:"email_alerts_sleep_until"`
	GrowthMsgLimitApproachingCtaCount  int         `json:"growth_msg_limit_approaching_cta_count"`
	GrowthMsgLimitApproachingCtaTs     int         `json:"growth_msg_limit_approaching_cta_ts"`
	GrowthMsgLimitLongReachedCtaCount  int         `json:"growth_msg_limit_long_reached_cta_count"`
	GrowthMsgLimitLongReachedCtaLastTs int         `json:"growth_msg_limit_long_reached_cta_last_ts"`
	GrowthMsgLimitReachedCtaCount      int         `json:"growth_msg_limit_reached_cta_count"`
	GrowthMsgLimitReachedCtaLastTs     int         `json:"growth_msg_limit_reached_cta_last_ts"`
	KKeyOmniboxAutoHideCount           int         `json:"k_key_omnibox_auto_hide_count"`
	LastSeenAtChannelWarning           int         `json:"last_seen_at_channel_warning"`
	OnboardingSlackbotConversationStep int         `json:"onboarding_slackbot_conversation_step"`
	PushIDleWait                       int         `json:"push_idle_wait"`
	WhatsNewRead                       int         `json:"whats_new_read"`
	A11yAnimations                     bool        `json:"a11y_animations"`
	AllChannelsLoud                    bool        `json:"all_channels_loud"`
	AllowCallsToSetCurrentStatus       bool        `json:"allow_calls_to_set_current_status"`
	AllUnreadsSortOrder                bool        `json:"all_unreads_sort_order"`
	ArrowHistory                       bool        `json:"arrow_history"`
	BoxEnabled                         bool        `json:"box_enabled"`
	ColorNamesInList                   bool        `json:"color_names_in_list"`
	ConfirmClearAllUnreads             bool        `json:"confirm_clear_all_unreads"`
	ConfirmShCallStart                 bool        `json:"confirm_sh_call_start"`
	ConfirmUserMarkedAway              bool        `json:"confirm_user_marked_away"`
	ConvertEmoticons                   bool        `json:"convert_emoticons"`
	DisplayDisplayNames                bool        `json:"display_display_names"`
	DndEnabled                         bool        `json:"dnd_enabled"`
	DropboxEnabled                     bool        `json:"dropbox_enabled"`
	EmailMisc                          bool        `json:"email_misc"`
	EmailWeekly                        bool        `json:"email_weekly"`
	EmojiAutocompleteBig               bool        `json:"emoji_autocomplete_big"`
	EnableReactEmojiPicker             bool        `json:"enable_react_emoji_picker"`
	EnableUnreadView                   bool        `json:"enable_unread_view"`
	EnhancedDebugging                  bool        `json:"enhanced_debugging"`
	EnterIsSpecialInTbt                bool        `json:"enter_is_special_in_tbt"`
	EnterpriseMigrationSeen            bool        `json:"enterprise_migration_seen"`
	ExpandInlineImages                 bool        `json:"expand_inline_imgs"`
	ExpandInternalInlineImages         bool        `json:"expand_internal_inline_imgs"`
	ExpandNonMediaAttachments          bool        `json:"expand_non_media_attachments"`
	ExpandSnippets                     bool        `json:"expand_snippets"`
	FKeySearch                         bool        `json:"f_key_search"`
	FullerTimestamps                   bool        `json:"fuller_timestamps"`
	FullTextExtracts                   bool        `json:"full_text_extracts"`
	GdriveAuthed                       bool        `json:"gdrive_authed"`
	GdriveEnabled                      bool        `json:"gdrive_enabled"`
	GraphicEmoticons                   bool        `json:"graphic_emoticons"`
	GrowlsEnabled                      bool        `json:"growls_enabled"`
	HasCreatedChannel                  bool        `json:"has_created_channel"`
	HasInvited                         bool        `json:"has_invited"`
	HasSearched                        bool        `json:"has_searched"`
	HasUploaded                        bool        `json:"has_uploaded"`
	HideHexSwatch                      bool        `json:"hide_hex_swatch"`
	HideUserGroupInfoPane              bool        `json:"hide_user_group_info_pane"`
	IntroToAppsMessageSeen             bool        `json:"intro_to_apps_message_seen"`
	Jumbomoji                          bool        `json:"jumbomoji"`
	KKeyOmnibox                        bool        `json:"k_key_omnibox"`
	LoadLato2                          bool        `json:"load_lato_2"`
	LsDisabled                         bool        `json:"ls_disabled"`
	MacSsbBullet                       bool        `json:"mac_ssb_bullet"`
	MarkMsgsReadImmediately            bool        `json:"mark_msgs_read_immediately"`
	MeasureCSSUsage                    bool        `json:"measure_css_usage"`
	MentionsExcludeAtChannels          bool        `json:"mentions_exclude_at_channels"`
	MentionsExcludeAtUserGroups        bool        `json:"mentions_exclude_at_user_groups"`
	MsgPreview                         bool        `json:"msg_preview"`
	MsgPreviewPersistent               bool        `json:"msg_preview_persistent"`
	MuteSounds                         bool        `json:"mute_sounds"`
	NoCreatedOverlays                  bool        `json:"no_created_overlays"`
	NoInvitesWidgetInSidebar           bool        `json:"no_invites_widget_in_sidebar"`
	NoJoinedOverlays                   bool        `json:"no_joined_overlays"`
	NoMacelectronBanner                bool        `json:"no_macelectron_banner"`
	NoMacssb1Banner                    bool        `json:"no_macssb1_banner"`
	NoMacssb2Banner                    bool        `json:"no_macssb2_banner"`
	NoOmniboxInChannels                bool        `json:"no_omnibox_in_channels"`
	NoTextInNotifications              bool        `json:"no_text_in_notifications"`
	NoWinssb1Banner                    bool        `json:"no_winssb1_banner"`
	ObeyInlineImageLimit               bool        `json:"obey_inline_img_limit"`
	OnboardingCancelled                bool        `json:"onboarding_cancelled"`
	OverloadedMessageEnabled           bool        `json:"overloaded_message_enabled"`
	PagekeysHandled                    bool        `json:"pagekeys_handled"`
	PostsFormattingGuide               bool        `json:"posts_formatting_guide"`
	PrevNextBtn                        bool        `json:"prev_next_btn"`
	PrivacyPolicySeen                  bool        `json:"privacy_policy_seen"`
	PromptedForEmailDisabling          bool        `json:"prompted_for_email_disabling"`
	PushDmAlert                        bool        `json:"push_dm_alert"`
	PushEverything                     bool        `json:"push_everything"`
	PushMentionAlert                   bool        `json:"push_mention_alert"`
	PushShowPreview                    bool        `json:"push_show_preview"`
	RequireAt                          bool        `json:"require_at"`
	SearchExcludeBots                  bool        `json:"search_exclude_bots"`
	SearchOnlyCurrentTeam              bool        `json:"search_only_current_team"`
	SearchOnlyMyChannels               bool        `json:"search_only_my_channels"`
	SeenCallsSsMainCoachmark           bool        `json:"seen_calls_ss_main_coachmark"`
	SeenCallsSsWindowCoachmark         bool        `json:"seen_calls_ss_window_coachmark"`
	SeenCallsVideoBetaCoachmark        bool        `json:"seen_calls_video_beta_coachmark"`
	SeenCallsVideoGaCoachmark          bool        `json:"seen_calls_video_ga_coachmark"`
	SeenCustomStatusBadge              bool        `json:"seen_custom_status_badge"`
	SeenCustomStatusCallout            bool        `json:"seen_custom_status_callout"`
	SeenDomainInviteReminder           bool        `json:"seen_domain_invite_reminder"`
	SeenGdriveCoachmark                bool        `json:"seen_gdrive_coachmark"`
	SeenGuestAdminSlackbotAnnouncement bool        `json:"seen_guest_admin_slackbot_announcement"`
	SeenHighlightsArrowsCoachmark      bool        `json:"seen_highlights_arrows_coachmark"`
	SeenHighlightsCoachmark            bool        `json:"seen_highlights_coachmark"`
	SeenIntlChannelNamesCoachmark      bool        `json:"seen_intl_channel_names_coachmark"`
	SeenMemberInviteReminder           bool        `json:"seen_member_invite_reminder"`
	SeenOnboardingChannels             bool        `json:"seen_onboarding_channels"`
	SeenOnboardingDirectMessages       bool        `json:"seen_onboarding_direct_messages"`
	SeenOnboardingInvites              bool        `json:"seen_onboarding_invites"`
	SeenOnboardingPrivateGroups        bool        `json:"seen_onboarding_private_groups"`
	SeenOnboardingRecentMentions       bool        `json:"seen_onboarding_recent_mentions"`
	SeenOnboardingSearch               bool        `json:"seen_onboarding_search"`
	SeenOnboardingSlackbotConversation bool        `json:"seen_onboarding_slackbot_conversation"`
	SeenOnboardingStarredItems         bool        `json:"seen_onboarding_starred_items"`
	SeenOnboardingStart                bool        `json:"seen_onboarding_start"`
	SeenRepliesCoachmark               bool        `json:"seen_replies_coachmark"`
	SeenSingleEmojiMsg                 bool        `json:"seen_single_emoji_msg"`
	SeenSsbPrompt                      bool        `json:"seen_ssb_prompt"`
	SeenThreadsNotificationBanner      bool        `json:"seen_threads_notification_banner"`
	SeenUnreadViewCoachmark            bool        `json:"seen_unread_view_coachmark"`
	SeenWelcome2                       bool        `json:"seen_welcome_2"`
	SeparatePrivateChannels            bool        `json:"separate_private_channels"`
	SeparateSharedChannels             bool        `json:"separate_shared_channels"`
	ShowAllSkinTones                   bool        `json:"show_all_skin_tones"`
	ShowJumperScores                   bool        `json:"show_jumper_scores"`
	ShowMemoryInstrument               bool        `json:"show_memory_instrument"`
	ShowTyping                         bool        `json:"show_typing"`
	SnippetEditorWrapLongLines         bool        `json:"snippet_editor_wrap_long_lines"`
	SpacesNewXpBannerDismissed         bool        `json:"spaces_new_xp_banner_dismissed"`
	SsEmojis                           bool        `json:"ss_emojis"`
	StartScrollAtOldest                bool        `json:"start_scroll_at_oldest"`
	TabUIReturnSelects                 bool        `json:"tab_ui_return_selects"`
	ThreadsEverything                  bool        `json:"threads_everything"`
	Time24                             bool        `json:"time24"`
	TwoFactorAuthEnabled               bool        `json:"two_factor_auth_enabled"`
	WebappSpellcheck                   bool        `json:"webapp_spellcheck"`
	WelcomeMessageHidden               bool        `json:"welcome_message_hidden"`
	WinssbRunFromTray                  bool        `json:"winssb_run_from_tray"`
}

UserPrefs defines the expected data from the JSON-encoded API response.

type UserPresence

type UserPresence struct {
	Presence        string `json:"presence"`
	ConnectionCount int    `json:"connection_count"`
	LastActivity    int    `json:"last_activity"`
	AutoAway        bool   `json:"auto_away"`
	ManualAway      bool   `json:"manual_away"`
	Online          bool   `json:"online"`
}

UserPresence defines the expected data from the JSON-encoded API response.

type UserProfile

type UserProfile struct {
	APIAppID           string      `json:"api_app_id"`
	BotID              string      `json:"bot_id"`
	AvatarHash         string      `json:"avatar_hash"`
	Email              string      `json:"email"`
	Fields             interface{} `json:"fields"`
	FirstName          string      `json:"first_name"`
	Image1024          string      `json:"image_1024"`
	Image192           string      `json:"image_192"`
	Image24            string      `json:"image_24"`
	Image32            string      `json:"image_32"`
	Image48            string      `json:"image_48"`
	Image512           string      `json:"image_512"`
	Image72            string      `json:"image_72"`
	ImageOriginal      string      `json:"image_original"`
	LastName           string      `json:"last_name"`
	Phone              string      `json:"phone"`
	RealName           string      `json:"real_name"`
	RealNameNormalized string      `json:"real_name_normalized"`
	StatusText         string      `json:"status_text"`
	StatusEmoji        string      `json:"status_emoji"`
	Skype              string      `json:"skype"`
	Title              string      `json:"title"`
}

UserProfile defines the expected data from the JSON-encoded API response.

type UserTypingEvent

type UserTypingEvent struct {
	Type    string `json:"type"`
	User    string `json:"user"`
	Channel string `json:"channel"`
}

UserTypingEvent represents the user typing event.

type UsersIdentity

type UsersIdentity struct {
	ID       string `json:"id"`
	Name     string `json:"name"`
	Email    string `json:"email"`
	Image24  string `json:"image_24"`
	Image32  string `json:"image_32"`
	Image48  string `json:"image_48"`
	Image72  string `json:"image_72"`
	Image192 string `json:"image_192"`
}

UsersIdentity defines the expected data from the JSON-encoded API response.

type WorkflowError

type WorkflowError struct {
	Message string `json:"message"`
}

type WorkflowStep

type WorkflowStep struct {
	Name       string `json:"name"`
	CallbackID string `json:"callback_id"`
}

type WorkflowsStepCompletedInput

type WorkflowsStepCompletedInput struct {
	// Context identifier that maps to the correct workflow step execution.
	WorkflowStepExecuteID string `json:"workflow_step_execute_id"`
	// Key-value object of outputs from your step. Keys of this object
	// reflect the configured key properties of your outputs array from
	// your workflow_step object.
	Outputs map[string]string `json:"outputs"`
}

type WorkflowsStepFailedInput

type WorkflowsStepFailedInput struct {
	// Context identifier that maps to the correct workflow step execution.
	WorkflowStepExecuteID string `json:"workflow_step_execute_id"`
	// A JSON-based object with a message property that should contain a
	// human readable error message.
	Error WorkflowError
}

type WorkflowsUpdateStepInput

type WorkflowsUpdateStepInput struct {
	// Context identifier that maps to the correct workflow step execution.
	WorkflowStepExecuteID string `json:"workflow_step_execute_id"`
	// JSON key-value map of inputs required from a user during configuration.
	// This is the data your app expects to receive when the workflow step
	// starts.
	//
	// Example:
	//
	//   {"title":{"value":"The Title"},"submitter":{"value":"{{user}}"}}
	Inputs interface{} `json:"inputs"`
	// An JSON array of output objects used during step execution. This is the
	// data your app agrees to provide when your workflow step was executed.
	//
	// Example:
	//
	//   [
	//     {"name":"ticket_id","type":"text","label":"Ticket ID"},
	//     {"name":"title","type":"text","label":"Title"}
	//   ]
	Outputs interface{} `json:"outputs"`
	// An optional field that can be used to override app image that is shown
	// in the Workflow Builder.
	StepImageURL string `json:"step_image_url"`
	// An optional field that can be used to override the step name that is
	// shown in the Workflow Builder.
	StepName string `json:"step_name"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL