Documentation ¶
Index ¶
- Constants
- Variables
- func ErrorForErrorCode(code string) error
- func EscapeMessage(text string) string
- type AccountsChangedEvent
- type ApiTestResponse
- type AuthTestResponse
- type BotAddedEvent
- type BotChangedEvent
- type Channel
- type ChannelArchiveEvent
- type ChannelCreatedEvent
- type ChannelDeletedEvent
- type ChannelHistoryChangedEvent
- type ChannelJoinedEvent
- type ChannelLeftEvent
- type ChannelMarkedEvent
- type ChannelRenameEvent
- type ChannelUnarchiveEvent
- type ChannelsArchiveResponse
- type ChannelsCreateResponse
- type ChannelsHistoryResponse
- type ChannelsInfoResponse
- type ChannelsInviteResponse
- type ChannelsJoinResponse
- type ChannelsKickResponse
- type ChannelsLeaveResponse
- type ChannelsListResponse
- type ChannelsMarkResponse
- type ChannelsRenameResponse
- type ChannelsSetPurposeResponse
- type ChannelsSetTopicResponse
- type ChannelsUnarchiveResponse
- type ChatDeleteResponse
- type ChatPostMessageResponse
- type ChatUpdateResponse
- type Client
- func (c *Client) ApiTest(optional url.Values) (*ApiTestResponse, error)
- func (c *Client) AuthTest() (*AuthTestResponse, error)
- func (c *Client) ChannelsArchive(channel string) (*ChannelsArchiveResponse, error)
- func (c *Client) ChannelsCreate(name string) (*ChannelsCreateResponse, error)
- func (c *Client) ChannelsHistory(channel string, optional url.Values) (*ChannelsHistoryResponse, error)
- func (c *Client) ChannelsInfo(channel string) (*ChannelsInfoResponse, error)
- func (c *Client) ChannelsInvite(channel, user string) (*ChannelsInviteResponse, error)
- func (c *Client) ChannelsJoin(name string) (*ChannelsJoinResponse, error)
- func (c *Client) ChannelsKick(channel, user string) (*ChannelsKickResponse, error)
- func (c *Client) ChannelsLeave(channel string) (*ChannelsLeaveResponse, error)
- func (c *Client) ChannelsList(optional url.Values) (*ChannelsListResponse, error)
- func (c *Client) ChannelsMark(channel string, ts Time) (*ChannelsMarkResponse, error)
- func (c *Client) ChannelsRename(channel, name string) (*ChannelsRenameResponse, error)
- func (c *Client) ChannelsSetPurpose(channel, purpose string) (*ChannelsSetPurposeResponse, error)
- func (c *Client) ChannelsSetTopic(channel, topic string) (*ChannelsSetTopicResponse, error)
- func (c *Client) ChannelsUnarchive(channel string) (*ChannelsUnarchiveResponse, error)
- func (c *Client) ChatDelete(channel string, ts Time) (*ChatDeleteResponse, error)
- func (c *Client) ChatPostMessage(channel, text string, optional url.Values) (*ChatPostMessageResponse, error)
- func (c *Client) ChatUpdate(channel, text string, ts Time, optional url.Values) (*ChatUpdateResponse, error)
- func (c *Client) DndEndDnd() (*DndEndDndResponse, error)
- func (c *Client) DndEndSnooze() (*DndEndSnoozeResponse, error)
- func (c *Client) DndInfo(optional url.Values) (*DndInfoResponse, error)
- func (c *Client) DndSetSnooze(minutes time.Duration) (*DndSetSnoozeResponse, error)
- func (c *Client) DndTeamInfo(optional url.Values) (*DndTeamInfoResponse, error)
- func (c *Client) Do(method Method, args url.Values, v interface{}) error
- func (c *Client) DoWithBody(method Method, content_type string, body io.Reader, v interface{}) error
- func (c *Client) EmojiList() (*EmojiListResponse, error)
- func (c *Client) FilesCommentsAdd(file, comment string) (*FilesCommentsAddResponse, error)
- func (c *Client) FilesCommentsDelete(file, comment_id string) (*FilesCommentsDeleteResponse, error)
- func (c *Client) FilesCommentsEdit(file, comment_id, comment string) (*FilesCommentsEditResponse, error)
- func (c *Client) FilesDelete(file string) (*FilesDeleteResponse, error)
- func (c *Client) FilesInfo(file string, optional url.Values) (*FilesInfoResponse, error)
- func (c *Client) FilesList(optional url.Values) (*FilesListResponse, error)
- func (c *Client) FilesUpload(filename string, file io.Reader, optional url.Values) (*FilesUploadResponse, error)
- func (c *Client) GroupsArchive(channel string) (*GroupsArchiveResponse, error)
- func (c *Client) GroupsClose(channel string) (*GroupsCloseResponse, error)
- func (c *Client) GroupsCreate(name string) (*GroupsCreateResponse, error)
- func (c *Client) GroupsCreateChild(channel string) (*GroupsCreateChildResponse, error)
- func (c *Client) GroupsHistory(channel string, optional url.Values) (*GroupsHistoryResponse, error)
- func (c *Client) GroupsInfo(channel string) (*GroupsInfoResponse, error)
- func (c *Client) GroupsInvite(channel, user string) (*GroupsInviteResponse, error)
- func (c *Client) GroupsKick(channel, user string) (*GroupsKickResponse, error)
- func (c *Client) GroupsLeave(channel string) (*GroupsLeaveResponse, error)
- func (c *Client) GroupsList(optional url.Values) (*GroupsListResponse, error)
- func (c *Client) GroupsMark(channel string, ts Time) (*GroupsMarkResponse, error)
- func (c *Client) GroupsOpen(channel string) (*GroupsOpenResponse, error)
- func (c *Client) GroupsRename(channel, name string) (*GroupsRenameResponse, error)
- func (c *Client) GroupsSetPurpose(channel, purpose string) (*GroupsSetPurposeResponse, error)
- func (c *Client) GroupsSetTopic(channel, topic string) (*GroupsSetTopicResponse, error)
- func (c *Client) GroupsUnarchive(channel string) (*GroupsUnarchiveResponse, error)
- func (c *Client) ImClose(channel string) (*ImCloseResponse, error)
- func (c *Client) ImHistory(channel string, optional url.Values) (*ImHistoryResponse, error)
- func (c *Client) ImList() (*ImListResponse, error)
- func (c *Client) ImMark(channel string, ts Time) (*ImMarkResponse, error)
- func (c *Client) ImOpen(user string) (*ImOpenResponse, error)
- func (c *Client) MpimClose(channel string) (*MpimCloseResponse, error)
- func (c *Client) MpimHistory(channel string, optional url.Values) (*MpimHistoryResponse, error)
- func (c *Client) MpimList() (*MpimListResponse, error)
- func (c *Client) MpimMark(channel string, ts Time) (*MpimMarkResponse, error)
- func (c *Client) MpimOpen(users []string) (*MpimOpenResponse, error)
- func (c *Client) NewRTMClient(options url.Values) *RTMClient
- func (c *Client) OauthAccess(client_id, client_secret, code string, optional url.Values) (*OauthAccessResponse, error)
- func (c *Client) PinsAdd(channel string, optional url.Values) (*PinsAddResponse, error)
- func (c *Client) PinsList(channel string) (*PinsListResponse, error)
- func (c *Client) PinsRemove(channel string, optional url.Values) (*PinsRemoveResponse, error)
- func (c *Client) RTMStart(optional url.Values) (*RTMStartResponse, error)
- func (c *Client) ReactionsAdd(name string, optional url.Values) (*ReactionsAddResponse, error)
- func (c *Client) ReactionsGet(optional url.Values) (*ReactionsGetResponse, error)
- func (c *Client) ReactionsList(optional url.Values) (*ReactionsListResponse, error)
- func (c *Client) ReactionsRemove(name string, optional url.Values) (*ReactionsRemoveResponse, error)
- func (c *Client) SearchAll(query string, optional url.Values) (*SearchAllResponse, error)
- func (c *Client) SearchFiles(query string, optional url.Values) (*SearchFilesResponse, error)
- func (c *Client) SearchMessages(query string, optional url.Values) (*SearchMessagesResponse, error)
- func (c *Client) StarsAdd(optional url.Values) (*StarsAddResponse, error)
- func (c *Client) StarsList(optional url.Values) (*StarsListResponse, error)
- func (c *Client) StarsRemove(optional url.Values) (*StarsRemoveResponse, error)
- func (c *Client) TeamAccessLogs(optional url.Values) (*TeamAccessLogsResponse, error)
- func (c *Client) TeamInfo() (*TeamInfoResponse, error)
- func (c *Client) TeamIntegrationLogs(optional url.Values) (*TeamIntegrationLogsResponse, error)
- func (c *Client) UsergroupsCreate(name string, optional url.Values) (*UsergroupsCreateResponse, error)
- func (c *Client) UsergroupsDisable(usergroup string, optional url.Values) (*UsergroupsDisableResponse, error)
- func (c *Client) UsergroupsEnable(usergroup string, optional url.Values) (*UsergroupsEnableResponse, error)
- func (c *Client) UsergroupsList(optional url.Values) (*UsergroupsListResponse, error)
- func (c *Client) UsergroupsUpdate(usergroup string, optional url.Values) (*UsergroupsUpdateResponse, error)
- func (c *Client) UsergroupsUsersList(usergroup string, optional url.Values) (*UsergroupsUsersListResponse, error)
- func (c *Client) UsergroupsUsersUpdate(usergroup string, users []string, optional url.Values) (*UsergroupsUsersUpdateResponse, error)
- func (c *Client) UsersGetPresence(user string) (*UsersGetPresenceResponse, error)
- func (c *Client) UsersInfo(user string) (*UsersInfoResponse, error)
- func (c *Client) UsersList(optional url.Values) (*UsersListResponse, error)
- func (c *Client) UsersSetActive() (*UsersSetActiveResponse, error)
- func (c *Client) UsersSetPresence(presence Presence) (*UsersSetPresenceResponse, error)
- type CommandsChangedEvent
- type Comment
- type DndEndDndResponse
- type DndEndSnoozeResponse
- type DndInfoResponse
- type DndSetSnoozeResponse
- type DndTeamInfoResponse
- type DndUpdatedEvent
- type DndUpdatedUserEvent
- type Duration
- type EmailDomainChangedEvent
- type EmojiChangedEvent
- type EmojiListResponse
- type File
- type FileChangeEvent
- type FileCommentAddedEvent
- type FileCommentDeletedEvent
- type FileCommentEditedEvent
- type FileCreatedEvent
- type FileDeletedEvent
- type FilePrivateEvent
- type FilePublicEvent
- type FileSharedEvent
- type FileType
- type FileUnsharedEvent
- type FilesCommentsAddResponse
- type FilesCommentsDeleteResponse
- type FilesCommentsEditResponse
- type FilesDeleteResponse
- type FilesInfoResponse
- type FilesListResponse
- type FilesUploadResponse
- type Group
- type GroupArchiveEvent
- type GroupCloseEvent
- type GroupHistoryChangedEvent
- type GroupJoinedEvent
- type GroupLeftEvent
- type GroupMarkedEvent
- type GroupOpenEvent
- type GroupRenameEvent
- type GroupUnarchiveEvent
- type GroupsArchiveResponse
- type GroupsCloseResponse
- type GroupsCreateChildResponse
- type GroupsCreateResponse
- type GroupsHistoryResponse
- type GroupsInfoResponse
- type GroupsInviteResponse
- type GroupsKickResponse
- type GroupsLeaveResponse
- type GroupsListResponse
- type GroupsMarkResponse
- type GroupsOpenResponse
- type GroupsRenameResponse
- type GroupsSetPurposeResponse
- type GroupsSetTopicResponse
- type GroupsUnarchiveResponse
- type HelloEvent
- type IM
- type ImCloseEvent
- type ImCloseResponse
- type ImCreatedEvent
- type ImHistoryChangedEvent
- type ImHistoryResponse
- type ImListResponse
- type ImMarkResponse
- type ImMarkedEvent
- type ImOpenEvent
- type ImOpenResponse
- type Item
- type LogEntry
- type Login
- type MPIM
- type ManualPresenceChangeEvent
- type Message
- type MessageAttachment
- type MessageAttachmentAction
- type MessageAttachmentActionConfirm
- type MessageAttachmentField
- type MessageEvent
- type MessageSubtypeBotMessageEvent
- type MessageSubtypeChannelArchiveEvent
- type MessageSubtypeChannelJoinEvent
- type MessageSubtypeChannelLeaveEvent
- type MessageSubtypeChannelNameEvent
- type MessageSubtypeChannelPurposeEvent
- type MessageSubtypeChannelTopicEvent
- type MessageSubtypeChannelUnarchiveEvent
- type MessageSubtypeFileCommentEvent
- type MessageSubtypeFileMentionEvent
- type MessageSubtypeFileShareEvent
- type MessageSubtypeGroupArchiveEvent
- type MessageSubtypeGroupJoinEvent
- type MessageSubtypeGroupLeaveEvent
- type MessageSubtypeGroupNameEvent
- type MessageSubtypeGroupPurposeEvent
- type MessageSubtypeGroupTopicEvent
- type MessageSubtypeGroupUnarchiveEvent
- type MessageSubtypeMeMessageEvent
- type MessageSubtypeMessageChangedEvent
- type MessageSubtypeMessageDeletedEvent
- type MessageSubtypePinnedItemEvent
- type MessageSubtypeUnpinnedItemEvent
- type Method
- type MpimCloseResponse
- type MpimHistoryResponse
- type MpimListResponse
- type MpimMarkResponse
- type MpimOpenResponse
- type OauthAccessResponse
- type PinAddedEvent
- type PinRemovedEvent
- type PinsAddResponse
- type PinsListResponse
- type PinsRemoveResponse
- type PrefChangeEvent
- type Presence
- type PresenceChangeEvent
- type RTMClient
- type RTMStartResponse
- type ReactionAddedEvent
- type ReactionRemovedEvent
- type ReactionsAddResponse
- type ReactionsGetResponse
- type ReactionsListResponse
- type ReactionsRemoveResponse
- type ReconnectUrlEvent
- type ResultMessage
- type SearchAllResponse
- type SearchFilesResponse
- type SearchMessagesResponse
- type StarAddedEvent
- type StarRemovedEvent
- type StarsAddResponse
- type StarsListResponse
- type StarsRemoveResponse
- type SubteamCreatedEvent
- type SubteamSelfAddedEvent
- type SubteamSelfRemovedEvent
- type SubteamUpdatedEvent
- type Team
- type TeamAccessLogsResponse
- type TeamDomainChangeEvent
- type TeamInfoResponse
- type TeamIntegrationLogsResponse
- type TeamJoinEvent
- type TeamMigrationStartedEvent
- type TeamPlanChangeEvent
- type TeamPrefChangeEvent
- type TeamProfileChangeEvent
- type TeamProfileDeleteEvent
- type TeamProfileReorderEvent
- type TeamRenameEvent
- type Time
- type UnrecognizedEvent
- type User
- type UserChangeEvent
- type UserGroup
- type UserTypingEvent
- type UsergroupsCreateResponse
- type UsergroupsDisableResponse
- type UsergroupsEnableResponse
- type UsergroupsListResponse
- type UsergroupsUpdateResponse
- type UsergroupsUsersListResponse
- type UsergroupsUsersUpdateResponse
- type UsersGetPresenceResponse
- type UsersInfoResponse
- type UsersListResponse
- type UsersSetActiveResponse
- type UsersSetPresenceResponse
Constants ¶
const ( SlackAPIURL = "https://slack.com/api" Version = "slk 0.1" )
const ( AccountInactiveErrorCode = `account_inactive` AlreadyArchivedErrorCode = `already_archived` AlreadyInChannelErrorCode = `already_in_channel` AlreadyPinnedErrorCode = `already_pinned` AlreadyReactedErrorCode = `already_reacted` AlreadyStarredErrorCode = `already_starred` BadClientSecretErrorCode = `bad_client_secret` BadRedirectUriErrorCode = `bad_redirect_uri` BadTimestampErrorCode = `bad_timestamp` CantArchiveGeneralErrorCode = `cant_archive_general` CantDeleteErrorCode = `cant_delete` CantDeleteFileErrorCode = `cant_delete_file` CantDeleteMessageErrorCode = `cant_delete_message` CantEditErrorCode = `cant_edit` CantInviteErrorCode = `cant_invite` CantInviteSelfErrorCode = `cant_invite_self` CantKickFromGeneralErrorCode = `cant_kick_from_general` CantKickFromLastChannelErrorCode = `cant_kick_from_last_channel` CantKickSelfErrorCode = `cant_kick_self` CantLeaveGeneralErrorCode = `cant_leave_general` CantLeaveLastChannelErrorCode = `cant_leave_last_channel` CantUpdateMessageErrorCode = `cant_update_message` ChannelNotFoundErrorCode = `channel_not_found` ComplianceExportsPreventDeletionErrorCode = `compliance_exports_prevent_deletion` EditWindowClosedErrorCode = `edit_window_closed` FileCommentNotFoundErrorCode = `file_comment_not_found` FileDeletedErrorCode = `file_deleted` FileNotFoundErrorCode = `file_not_found` GroupContainsOthersErrorCode = `group_contains_others` InvalidArrayArgErrorCode = `invalid_array_arg` InvalidAuthErrorCode = `invalid_auth` InvalidChannelErrorCode = `invalid_channel` InvalidCharsetErrorCode = `invalid_charset` InvalidClientIdErrorCode = `invalid_client_id` InvalidCodeErrorCode = `invalid_code` InvalidFormDataErrorCode = `invalid_form_data` InvalidNameErrorCode = `invalid_name` InvalidPostTypeErrorCode = `invalid_post_type` InvalidPresenceErrorCode = `invalid_presence` InvalidTimestampErrorCode = `invalid_timestamp` InvalidTsLatestErrorCode = `invalid_ts_latest` InvalidTsOldestErrorCode = `invalid_ts_oldest` IsArchivedErrorCode = `is_archived` LastMemberErrorCode = `last_member` LastRaChannelErrorCode = `last_ra_channel` MessageNotFoundErrorCode = `message_not_found` MigrationInProgressErrorCode = `migration_in_progress` MissingDurationErrorCode = `missing_duration` MissingPostTypeErrorCode = `missing_post_type` MsgTooLongErrorCode = `msg_too_long` NameTakenErrorCode = `name_taken` NoChannelErrorCode = `no_channel` NoCommentErrorCode = `no_comment` NoItemSpecifiedErrorCode = `no_item_specified` NoReactionErrorCode = `no_reaction` NoTextErrorCode = `no_text` NotArchivedErrorCode = `not_archived` NotAuthedErrorCode = `not_authed` NotAuthorizedErrorCode = `not_authorized` NotEnoughUsersErrorCode = `not_enough_users` NotInChannelErrorCode = `not_in_channel` NotInGroupErrorCode = `not_in_group` NotPinnedErrorCode = `not_pinned` NotStarredErrorCode = `not_starred` OverPaginationLimitErrorCode = `over_pagination_limit` PaidOnlyErrorCode = `paid_only` PermissionDeniedErrorCode = `permission_denied` PostingToGeneralChannelDeniedErrorCode = `posting_to_general_channel_denied` RateLimitedErrorCode = `rate_limited` RequestTimeoutErrorCode = `request_timeout` RestrictedActionErrorCode = `restricted_action` SnoozeEndFailedErrorCode = `snooze_end_failed` SnoozeFailedErrorCode = `snooze_failed` SnoozeNotActiveErrorCode = `snooze_not_active` TooLongErrorCode = `too_long` TooManyEmojiErrorCode = `too_many_emoji` TooManyReactionsErrorCode = `too_many_reactions` TooManyUsersErrorCode = `too_many_users` UnknownErrorErrorCode = `unknown_error` UnknownTypeErrorCode = `unknown_type` UserDisabledErrorCode = `user_disabled` UserDoesNotOwnChannelErrorCode = `user_does_not_own_channel` UserIsBotErrorCode = `user_is_bot` UserIsRestrictedErrorCode = `user_is_restricted` UserIsUltraRestrictedErrorCode = `user_is_ultra_restricted` UserNotFoundErrorCode = `user_not_found` UserNotVisibleErrorCode = `user_not_visible` UsersListNotSuppliedErrorCode = `users_list_not_supplied` )
const ( AccountsChangedEventCode = `accounts_changed` // The list of accounts a user is signed into has changed BotAddedEventCode = `bot_added` // An integration bot was added BotChangedEventCode = `bot_changed` // An integration bot was changed ChannelArchiveEventCode = `channel_archive` // A team channel was archived ChannelCreatedEventCode = `channel_created` // A team channel was created ChannelDeletedEventCode = `channel_deleted` // A team channel was deleted ChannelHistoryChangedEventCode = `channel_history_changed` // Bulk updates were made to a channel's history ChannelJoinedEventCode = `channel_joined` // You joined a channel ChannelLeftEventCode = `channel_left` // You left a channel ChannelMarkedEventCode = `channel_marked` // Your channel read marker was updated ChannelRenameEventCode = `channel_rename` // A team channel was renamed ChannelUnarchiveEventCode = `channel_unarchive` // A team channel was unarchived CommandsChangedEventCode = `commands_changed` // A team slash command has been added or changed DndUpdatedEventCode = `dnd_updated` // Do not Disturb settings changed for the current user DndUpdatedUserEventCode = `dnd_updated_user` // Do not Disturb settings changed for a team member EmailDomainChangedEventCode = `email_domain_changed` // The team email domain has changed EmojiChangedEventCode = `emoji_changed` // A team custom emoji has been added or changed FileChangeEventCode = `file_change` // A file was changed FileCommentAddedEventCode = `file_comment_added` // A file comment was added FileCommentDeletedEventCode = `file_comment_deleted` // A file comment was deleted FileCommentEditedEventCode = `file_comment_edited` // A file comment was edited FileCreatedEventCode = `file_created` // A file was created FileDeletedEventCode = `file_deleted` // A file was deleted FilePrivateEventCode = `file_private` // A file was made private FilePublicEventCode = `file_public` // A file was made public GroupArchiveEventCode = `group_archive` // A private group was archived GroupCloseEventCode = `group_close` // You closed a group channel GroupHistoryChangedEventCode = `group_history_changed` // Bulk updates were made to a group's history GroupJoinedEventCode = `group_joined` // You joined a private group GroupLeftEventCode = `group_left` // You left a private group GroupMarkedEventCode = `group_marked` // A private group read marker was updated GroupOpenEventCode = `group_open` // You opened a group channel GroupRenameEventCode = `group_rename` // A private group was renamed GroupUnarchiveEventCode = `group_unarchive` // A private group was unarchived HelloEventCode = `hello` // The client has successfully connected to the server ImCloseEventCode = `im_close` // You closed a direct message channel ImCreatedEventCode = `im_created` // A direct message channel was created ImHistoryChangedEventCode = `im_history_changed` // Bulk updates were made to a DM channel's history ImMarkedEventCode = `im_marked` // A direct message read marker was updated ImOpenEventCode = `im_open` // You opened a direct message channel ManualPresenceChangeEventCode = `manual_presence_change` // You manually updated your presence MessageEventCode = `message` // A message was sent to a channel PinAddedEventCode = `pin_added` // A pin was added to a channel PinRemovedEventCode = `pin_removed` // A pin was removed from a channel PrefChangeEventCode = `pref_change` // You have updated your preferences PresenceChangeEventCode = `presence_change` // A team member's presence changed ReactionAddedEventCode = `reaction_added` // A team member has added an emoji reaction to an item ReactionRemovedEventCode = `reaction_removed` // A team member removed an emoji reaction ReconnectUrlEventCode = `reconnect_url` // Experimental StarAddedEventCode = `star_added` // A team member has starred an item StarRemovedEventCode = `star_removed` // A team member removed a star SubteamCreatedEventCode = `subteam_created` // A user group has been added to the team SubteamSelfAddedEventCode = `subteam_self_added` // You have been added to a user group SubteamSelfRemovedEventCode = `subteam_self_removed` // You have been removed from a user group SubteamUpdatedEventCode = `subteam_updated` // An existing user group has been updated or its members changed TeamDomainChangeEventCode = `team_domain_change` // The team domain has changed TeamJoinEventCode = `team_join` // A new team member has joined TeamMigrationStartedEventCode = `team_migration_started` // The team is being migrated between servers TeamPlanChangeEventCode = `team_plan_change` // The team billing plan has changed TeamPrefChangeEventCode = `team_pref_change` // A team preference has been updated TeamProfileChangeEventCode = `team_profile_change` // Team profile fields have been updated TeamProfileDeleteEventCode = `team_profile_delete` // Team profile fields have been deleted TeamProfileReorderEventCode = `team_profile_reorder` // Team profile fields have been reordered TeamRenameEventCode = `team_rename` // The team name has changed UserChangeEventCode = `user_change` // A team member's data has changed UserTypingEventCode = `user_typing` // A channel member is typing a message // message subtype MessageSubtypeBotMessageEventCode = `bot_message` // A message was posted by an integration MessageSubtypeMeMessageEventCode = `me_message` // A /me message was sent MessageSubtypeMessageChangedEventCode = `message_changed` // A message was changed MessageSubtypeMessageDeletedEventCode = `message_deleted` // A message was deleted MessageSubtypeChannelJoinEventCode = `channel_join` // A team member joined a channel MessageSubtypeChannelLeaveEventCode = `channel_leave` // A team member left a channel MessageSubtypeChannelTopicEventCode = `channel_topic` // A channel topic was updated MessageSubtypeChannelPurposeEventCode = `channel_purpose` // A channel purpose was updated MessageSubtypeChannelNameEventCode = `channel_name` // A channel was renamed MessageSubtypeChannelArchiveEventCode = `channel_archive` // A channel was archived MessageSubtypeChannelUnarchiveEventCode = `channel_unarchive` // A channel was unarchived MessageSubtypeGroupJoinEventCode = `group_join` // A team member joined a group MessageSubtypeGroupLeaveEventCode = `group_leave` // A team member left a group MessageSubtypeGroupTopicEventCode = `group_topic` // A group topic was updated MessageSubtypeGroupPurposeEventCode = `group_purpose` // A group purpose was updated MessageSubtypeGroupNameEventCode = `group_name` // A group was renamed MessageSubtypeGroupArchiveEventCode = `group_archive` // A group was archived MessageSubtypeGroupUnarchiveEventCode = `group_unarchive` // A group was unarchived MessageSubtypeFileCommentEventCode = `file_comment` // A comment was added to a file MessageSubtypeFileMentionEventCode = `file_mention` // A file was mentioned in a channel MessageSubtypePinnedItemEventCode = `pinned_item` // An item was pinned in a channel MessageSubtypeUnpinnedItemEventCode = `unpinned_item` // An item was unpinned from a channel )
const ( FileTypeAll FileType = `all` // All files FileTypePosts FileType = `posts` // Posts FileTypeSnippets FileType = `snippets` // Snippets FileTypeImages FileType = `images` // Image files FileTypeGdocs FileType = `gdocs` // Google docs FileTypeZips FileType = `zips` // Zip files FileTypePdfs FileType = `pdfs` // PDF files PresenceAuto Presence = `auto` PresenceAway Presence = `away` ItemTypeChannel = `channel` ItemTypeFile = `file` ItemTypeFileComment = `file_comment` ItemTypeGroup = `group` ItemTypeIM = `im` ItemTypeMessage = `message` )
Variables ¶
var ( ErrAccountInactive = errors.New("account_inactive: Authentication token is for a deleted user or team.") ErrAlreadyArchived = errors.New("already_archived: Already been archived.") ErrAlreadyInChannel = errors.New("already_in_channel: Invited user is already in the channel.") ErrAlreadyPinned = errors.New("already_pinned: The specified item is already pinned to the channel.") ErrAlreadyReacted = errors.New("already_reacted: The specified item already has the user/reaction combination.") ErrAlreadyStarred = errors.New("already_starred: The specified item has already been starred by the authenticated user.") ErrBadClientSecret = errors.New("bad_client_secret: Value passed for client_secret was invalid.") ErrBadRedirectUri = errors.New("bad_redirect_uri: Value passed for redirect_uri did not match the redirect_uri in the original request.") ErrBadTimestamp = errors.New("bad_timestamp: Value passed for timestamp was invalid.") ErrCantArchiveGeneral = errors.New("cant_archive_general: You cannot archive the general channel") ErrCantDelete = errors.New("cant_delete: The requested comment could not be deleted.") ErrCantDeleteFile = errors.New("cant_delete_file: Authenticated user does not have permission to delete this file.") ErrCantDeleteMessage = errors.New("cant_delete_message: Authenticated user does not have permission to delete this message.") ErrCantEdit = errors.New("cant_edit: The requested file could not be found.") ErrCantInvite = errors.New("cant_invite: User cannot be invited to this channel/group.") ErrCantInviteSelf = errors.New("cant_invite_self: Authenticated user cannot invite themselves to a channel/group.") ErrCantKickFromGeneral = errors.New("cant_kick_from_general: User cannot be removed from #general.") ErrCantKickFromLastChannel = errors.New("cant_kick_from_last_channel: User cannot be removed from the last channel they're in.") ErrCantKickSelf = errors.New("cant_kick_self: You can't remove yourself from a group") ErrCantLeaveGeneral = errors.New("cant_leave_general: Authenticated user cannot leave the general channel") ErrCantLeaveLastChannel = errors.New("cant_leave_last_channel: Authenticated user cannot leave the last channel they are in") ErrCantUpdateMessage = errors.New("cant_update_message: Authenticated user does not have permission to update this message.") ErrChannelNotFound = errors.New("channel_not_found: Value passed for channel was invalid.") ErrComplianceExportsPreventDeletion = errors.New("compliance_exports_prevent_deletion: Compliance exports are on, messages can not be deleted") ErrEditWindowClosed = errors.New("edit_window_closed: The timeframe for editing the comment has expired.") ErrFileCommentNotFound = errors.New("file_comment_not_found: File comment specified by file_comment does not exist.") ErrFileDeleted = errors.New("file_deleted: The requested file was previously deleted.") ErrFileNotFound = errors.New("file_not_found: The requested file could not be found.") ErrGroupContainsOthers = errors.New("group_contains_others: Restricted accounts cannot archive groups containing others.") ErrInvalidArrayArg = errors.New("invalid_array_arg: The method was passed a PHP-style array argument (e.g. with a name like foo[7] ). These are never valid with the Slack API.") ErrInvalidAuth = errors.New("invalid_auth: Invalid authentication token.") ErrInvalidChannel = errors.New("invalid_channel: One or more channels supplied are invalid") ErrInvalidCharset = errors.New("invalid_charset: The method was called via a POST request, but the charset specified in the Content-Type header was invalid. Valid charset names are: utf-8 iso-8859-1 .") ErrInvalidClientId = errors.New("invalid_client_id: Value passed for client_id was invalid.") ErrInvalidCode = errors.New("invalid_code: Value passed for code was invalid.") ErrInvalidFormData = errors.New("invalid_form_data: The method was called via a POST request with Content-Type application/x-www-form-urlencoded or multipart/form-data, but the form data was either missing or syntactically invalid.") ErrInvalidName = errors.New("invalid_name: New name is invalid") ErrInvalidPostType = errors.New("invalid_post_type: The method was called via a POST request, but the specified Content-Type was invalid. Valid types are: application/json application/x-www-form-urlencoded multipart/form-data text/plain .") ErrInvalidPresence = errors.New("invalid_presence: Value passed for presence was invalid.") ErrInvalidTimestamp = errors.New("invalid_timestamp: Value passed for timestamp was invalid.") ErrInvalidTsLatest = errors.New("invalid_ts_latest: Value passed for latest was invalid") ErrInvalidTsOldest = errors.New("invalid_ts_oldest: Value passed for oldest was invalid") ErrIsArchived = errors.New("is_archived: Channel/Group has been archived.") ErrLastMember = errors.New("last_member: Authenticated user is the last member of a group and cannot leave it") ErrLastRaChannel = errors.New("last_ra_channel: You cannot archive the last channel for a restricted account.") ErrMessageNotFound = errors.New("message_not_found: Message specified by channel and/or timestamp does not exist.") ErrMigrationInProgress = errors.New("migration_in_progress: Team is being migrated between servers. See the team_migration_started event documentation for details.") ErrMissingDuration = errors.New("missing_duration: No value provided for num_minutes") ErrMissingPostType = errors.New("missing_post_type: The method was called via a POST request and included a data payload, but the request did not include a Content-Type header.") ErrMsgTooLong = errors.New("msg_too_long: Message text is too long") ErrNameTaken = errors.New("name_taken: New channel name is taken") ErrNoChannel = errors.New("no_channel: No group name was passed.") ErrNoComment = errors.New("no_comment: The comment field was empty.") ErrNoItemSpecified = errors.New("no_item_specified: One of file, file_comment, or timestamp was not specified.") ErrNoReaction = errors.New("no_reaction: The specified item does not have the user/reaction combination.") ErrNoText = errors.New("no_text: No message text provided") ErrNotArchived = errors.New("not_archived: Channel/Group is not archived.") ErrNotAuthed = errors.New("not_authed: No authentication token provided.") ErrNotAuthorized = errors.New("not_authorized: Caller cannot rename this channel") ErrNotEnoughUsers = errors.New("not_enough_users: Needs at least 2 users to open") ErrNotInChannel = errors.New("not_in_channel: User was not in the channel.") ErrNotInGroup = errors.New("not_in_group: User or caller were are not in the group") ErrNotPinned = errors.New("not_pinned: The specified item is not pinned to the channel.") ErrNotStarred = errors.New("not_starred: The specified item is not currently starred by the authenticated user.") ErrOverPaginationLimit = errors.New("over_pagination_limit: It is not possible to request more than 1000 items per page or more than 100 pages.") ErrPaidOnly = errors.New("paid_only: This is only available to paid teams.") ErrPermissionDenied = errors.New("permission_denied: The user does not have permission take that action.") ErrPostingToGeneralChannelDenied = errors.New("posting_to_general_channel_denied: An admin has restricted posting to the #general channel.") ErrRateLimited = errors.New("rate_limited: Application has posted too many messages, read the Rate Limit documentation for more information") ErrRequestTimeout = errors.New("request_timeout: The method was called via a POST request, but the POST data was either missing or truncated.") ErrRestrictedAction = errors.New("restricted_action: A team preference prevents the authenticated user from that action.") ErrSnoozeEndFailed = errors.New("snooze_end_failed: There was a problem setting the user's Do Not Disturb status") ErrSnoozeFailed = errors.New("snooze_failed: There was a problem setting the user's Do Not Disturb status") ErrSnoozeNotActive = errors.New("snooze_not_active: Snooze is not active for this user and cannot be ended") ErrTooLong = errors.New("too_long: Text was longer than 250 characters.") ErrTooManyEmoji = errors.New("too_many_emoji: The limit for distinct reactions (i.e. emoji) on the item has been reached.") ErrTooManyReactions = errors.New("too_many_reactions: The limit for reactions a person may add to the item has been reached.") ErrTooManyUsers = errors.New("too_many_users: Needs at most 8 users to open") ErrUnknownError = errors.New("unknown_error: There was a mysterious problem ending the user's Do Not Disturb session") ErrUnknownType = errors.New("unknown_type: Value passed for types was invalid") ErrUserDisabled = errors.New("user_disabled: The user has been disabled.") ErrUserDoesNotOwnChannel = errors.New("user_does_not_own_channel: Calling user does not own this DM channel.") ErrUserIsBot = errors.New("user_is_bot: This method cannot be called by a bot user.") ErrUserIsRestricted = errors.New("user_is_restricted: This method cannot be called by a restricted user or single channel guest.") ErrUserIsUltraRestricted = errors.New("user_is_ultra_restricted: This method cannot be called by a single channel guest.") ErrUserNotFound = errors.New("user_not_found: Value passed for user was invalid.") ErrUserNotVisible = errors.New("user_not_visible: The requested user is not visible to the calling user") ErrUsersListNotSupplied = errors.New("users_list_not_supplied: Missing users in request") )
Functions ¶
func ErrorForErrorCode ¶
func EscapeMessage ¶
Types ¶
type AccountsChangedEvent ¶
type AccountsChangedEvent struct {
Type string `json:"type"`
}
https://api.slack.com/events/accounts_changed
{ "type": "accounts_changed" }
type ApiTestResponse ¶
type ApiTestResponse struct { OK bool `json:"ok"` Error string `json:"error"` Args map[string]string `json:"args"` }
https://api.slack.com/methods/api.test
{ "ok": true, "args": { "foo": "bar" } }
{ "ok": false, "error": "my_error", "args": { "error": "my_error" } }
type AuthTestResponse ¶
type AuthTestResponse struct { OK bool `json:"ok"` Error string `json:"error"` URL string `json:"url"` Team string `json:"team"` User string `json:"user"` TeamID string `json:"team_id"` UserID string `json:"user_id"` }
https://api.slack.com/methods/auth.test
{ "ok": true, "url": "https:\/\/myteam.slack.com\/", "team": "My Team", "user": "cal", "team_id": "T12345", "user_id": "U12345" }
type BotAddedEvent ¶
type BotAddedEvent struct { Type string `json:"type"` Bot struct { ID string `json:"id"` Name string `json:"name"` Icons map[string]string `json:"icons"` } `json:"bot"` }
https://api.slack.com/events/bot_added
{ "type": "bot_added", "bot": { "id": "B024BE7LH", "name": "hugbot", "icons": { "image_48": "https:\/\/slack.com\/path\/to\/hugbot_48.png" } } }
type BotChangedEvent ¶
type BotChangedEvent struct { Type string `json:"type"` Bot struct { ID string `json:"id"` Name string `json:"name"` Icons map[string]string `json:"icons"` } `json:"bot"` }
https://api.slack.com/events/bot_changed
{ "type": "bot_changed", "bot": { "id": "B024BE7LH", "name": "hugbot", "icons": { "image_48": "https:\/\/slack.com\/path\/to\/hugbot_48.png" } } }
type Channel ¶
type Channel struct { ID string `json:"id"` Name string `json:"name"` IsChannel bool `json:"is_channel"` Created Time `json:"created"` Creator string `json:"creator"` IsArchived bool `json:"is_archived"` IsGeneral bool `json:"is_general"` Members []string `json:"members"` Topic struct { Creator string `json:"creator"` LastSet Time `json:"last_set"` Value string `json:"value"` } `json:"topic"` Purpose struct { Creator string `json:"creator"` LastSet Time `json:"last_set"` Value string `json:"value"` } `json:"purpose"` IsMember bool `json:"is_member"` LastRead Time `json:"last_read"` LatestMessage *Message `json:"latest"` UnreadCount int `json:"unread_count"` UnreadCountDisplay int `json:"unread_count_display"` }
https://api.slack.com/types/channel
{ "id": "C024BE91L", "name": "fun", "is_channel": "true", "created": 1360782804, "creator": "U024BE7LH", "is_archived": false, "is_general": false, "members": [ "U024BE7LH", ], "topic": { "value": "Fun times", "creator": "U024BE7LV", "last_set": 1369677212 }, "purpose": { "value": "This channel is for fun", "creator": "U024BE7LH", "last_set": 1360782804 } "is_member": true, "last_read": "1401383885.000061", "latest": { … } "unread_count": 0, "unread_count_display": 0 }
type ChannelArchiveEvent ¶
type ChannelArchiveEvent struct { Type string `json:"type"` Channel string `json:"channel"` User string `json:"user"` }
https://api.slack.com/events/channel_archive
{ "type": "channel_archive", "channel": "C024BE91L", "user": "U024BE7LH" }
type ChannelCreatedEvent ¶
type ChannelCreatedEvent struct { Type string `json:"type"` Channel struct { ID string `json:"id"` Name string `json:"name"` Created Time `json:"created"` Creator string `json:"creator"` } `json:"channel"` }
https://api.slack.com/events/channel_created
{ "type": "channel_created", "channel": { "id": "C024BE91L", "name": "fun", "created": 1360782804, "creator": "U024BE7LH" } }
type ChannelDeletedEvent ¶
https://api.slack.com/events/channel_deleted
{ "type": "channel_deleted", "channel": "C024BE91L" }
type ChannelHistoryChangedEvent ¶
type ChannelHistoryChangedEvent struct { Type string `json:"type"` Latest Time `json:"latest"` Timestamp Time `json:"ts"` EventTimestamp Time `json:"event_ts"` }
https://api.slack.com/events/channel_history_changed
{ "type": "channel_history_changed", "latest": "1358877455.000010", "ts": "1361482916.000003", "event_ts": "1361482916.000004" }
type ChannelJoinedEvent ¶
https://api.slack.com/events/channel_joined
{ "type": "channel_joined", "channel": { ... } }
type ChannelLeftEvent ¶
https://api.slack.com/events/channel_left
{ "type": "channel_left", "channel": "C024BE91L" }
type ChannelMarkedEvent ¶
type ChannelMarkedEvent struct { Type string `json:"type"` Channel string `json:"channel"` Timestamp Time `json:"ts"` }
https://api.slack.com/events/channel_marked
{ "type": "channel_marked", "channel": "C024BE91L", "ts": "1401383885.000061" }
type ChannelRenameEvent ¶
type ChannelRenameEvent struct { Type string `json:"type"` Channel struct { ID string `json:"id"` Name string `json:"name"` Created Time `json:"created"` } `json:"channel"` }
https://api.slack.com/events/channel_rename
{ "type": "channel_rename", "channel": { "id":"C02ELGNBH", "name":"new_name", "created":1360782804 } }
type ChannelUnarchiveEvent ¶
type ChannelUnarchiveEvent struct { Type string `json:"type"` Channel string `json:"channel"` User string `json:"user"` }
https://api.slack.com/events/channel_unarchive
{ "type": "channel_unarchive", "channel": "C024BE91L", "user": "U024BE7LH" }
type ChannelsCreateResponse ¶
type ChannelsCreateResponse struct { OK bool `json:"ok"` Error string `json:"error"` Channel *Channel `json:"channel"` }
https://api.slack.com/methods/channels.create
{ "ok": true, "channel": { "id": "C024BE91L", "name": "fun", "created": 1360782804, "creator": "U024BE7LH", "is_archived": false, "is_member": true, "is_general": false, "last_read": "0000000000.000000", "latest": null, "unread_count": 0, "unread_count_display": 0, "members": [ ], "topic": { }, "purpose": { } } }
type ChannelsHistoryResponse ¶
type ChannelsHistoryResponse struct { OK bool `json:"ok"` Error string `json:"error"` Latest Time `json:"latest"` Messages []*Message `json:"messages"` HasMore bool `json:"has_more"` }
https://api.slack.com/methods/channels.history
{ "ok": true, "latest": "1358547726.000003", "messages": [ { "type": "message", "ts": "1358546515.000008", "user": "U2147483896", "text": "Hello" }, { "type": "message", "ts": "1358546515.000007", "user": "U2147483896", "text": "World", "is_starred": true, "reactions": [ { "name": "space_invader", "count": 3, "users": [ "U1", "U2", "U3" ] }, { "name": "sweet_potato", "count": 5, "users": [ "U1", "U2", "U3", "U4", "U5" ] } ] }, { "type": "something_else", "ts": "1358546515.000007", "wibblr": true } ], "has_more": false }
type ChannelsInfoResponse ¶
type ChannelsInfoResponse struct { OK bool `json:"ok"` Error string `json:"error"` Channel *Channel `json:"channel"` }
https://api.slack.com/methods/channels.info
{ "ok": true, "channel": { "id": "C024BE91L", "name": "fun", "created": 1360782804, "creator": "U024BE7LH", "is_archived": false, "is_general": false, "is_member": true, "members": [ ], "topic": { }, "purpose": { }, "last_read": "1401383885.000061", "latest": { }, "unread_count": 0, "unread_count_display": 0 } }
type ChannelsInviteResponse ¶
type ChannelsInviteResponse struct { OK bool `json:"ok"` Error string `json:"error"` Channel *Channel `json:"channel"` }
https://api.slack.com/methods/channels.invite
{ "ok": true, "channel": { "id": "C024BE91L", "name": "fun", "created": 1360782804, "creator": "U024BE7LH", "is_archived": false, "is_member": true, "is_general": false, "last_read": "1401383885.000061", "latest": { }, "unread_count": 0, "unread_count_display": 0, "members": [ ], "topic": { "value": "Fun times", "creator": "U024BE7LV", "last_set": 1369677212 }, "purpose": { "value": "This channel is for fun", "creator": "U024BE7LH", "last_set": 1360782804 } } }
type ChannelsJoinResponse ¶
type ChannelsJoinResponse struct { OK bool `json:"ok"` Error string `json:"error"` AlreadyInChannel bool `json:"already_in_channel"` Channel *Channel `json:"channel"` }
https://api.slack.com/methods/channels.join
{ "ok": true, "channel": { "id": "C024BE91L", "name": "fun", "created": 1360782804, "creator": "U024BE7LH", "is_archived": false, "is_member": true, "is_general": false, "last_read": "1401383885.000061", "latest": { }, "unread_count": 0, "unread_count_display": 0, "members": [ ], "topic": { "value": "Fun times", "creator": "U024BE7LV", "last_set": 1369677212 }, "purpose": { "value": "This channel is for fun", "creator": "U024BE7LH", "last_set": 1360782804 } } }
{ "ok": true, "already_in_channel": true, "channel": { "id": "C024BE91L", "name": "fun", "created": 1360782804, "creator": "U024BE7LH", "is_archived": false, "is_general": false } }
type ChannelsLeaveResponse ¶
type ChannelsLeaveResponse struct { OK bool `json:"ok"` Error string `json:"error"` NotInChannel bool `json:"not_in_channel"` }
https://api.slack.com/methods/channels.leave
{ "ok": true }
{ "ok": true, "not_in_channel": true }
type ChannelsListResponse ¶
type ChannelsListResponse struct { OK bool `json:"ok"` Error string `json:"error"` Channels []*Channel `json:"channels"` }
https://api.slack.com/methods/channels.list
{ "ok": true, "channels": [ { "id": "C024BE91L", "name": "fun", "created": 1360782804, "creator": "U024BE7LH", "is_archived": false, "is_member": false, "num_members": 6, "topic": { "value": "Fun times", "creator": "U024BE7LV", "last_set": 1369677212 }, "purpose": { "value": "This channel is for fun", "creator": "U024BE7LH", "last_set": 1360782804 } }, .... ] }
type ChannelsRenameResponse ¶
type ChannelsRenameResponse struct { OK bool `json:"ok"` Error string `json:"error"` Channel *Channel `json:"channel"` }
https://api.slack.com/methods/channels.rename
{ "ok": true, "channel": { "id": "C024BE91L", "is_channel": true, "name": "new_name", "created": 1360782804 } }
type ChannelsSetPurposeResponse ¶
type ChannelsSetPurposeResponse struct { OK bool `json:"ok"` Error string `json:"error"` Purpose string `json:"purpose"` }
https://api.slack.com/methods/channels.setPurpose
{ "ok": true, "purpose": "This is the new purpose!" }
type ChannelsSetTopicResponse ¶
type ChannelsSetTopicResponse struct { OK bool `json:"ok"` Error string `json:"error"` Topic string `json:"topic"` }
https://api.slack.com/methods/channels.setTopic
{ "ok": true, "topic": "This is the new topic!" }
type ChatDeleteResponse ¶
type ChatDeleteResponse struct { OK bool `json:"ok"` Error string `json:"error"` Channel string `json:"channel"` Timestamp Time `json:"ts"` }
https://api.slack.com/methods/chat.delete
{ "ok": true, "channel": "C024BE91L", "ts": "1401383885.000061" }
type ChatPostMessageResponse ¶
type ChatPostMessageResponse struct { OK bool `json:"ok"` Error string `json:"error"` Timestamp Time `json:"ts"` Channel string `json:"channel"` Message *Message `json:"message"` }
https://api.slack.com/methods/chat.postMessage
{ "ok": true, "ts": "1405895017.000506", "channel": "C024BE91L", "message": {} }
type ChatUpdateResponse ¶
type ChatUpdateResponse struct { OK bool `json:"ok"` Error string `json:"error"` Channel string `json:"channel"` Timestamp Time `json:"ts"` Text string `json:"text"` }
https://api.slack.com/methods/chat.update
{ "ok": true, "channel": "C024BE91L", "ts": "1401383885.000061", "text": "Updated Text" }
type Client ¶
type Client struct { Debug bool // contains filtered or unexported fields }
func (*Client) AuthTest ¶
func (c *Client) AuthTest() (*AuthTestResponse, error)
func (*Client) ChannelsArchive ¶
func (c *Client) ChannelsArchive(channel string) (*ChannelsArchiveResponse, error)
https://api.slack.com/methods/channels.archive req:channel // C1234567890 // Required // Channel to archive
func (*Client) ChannelsCreate ¶
func (c *Client) ChannelsCreate(name string) (*ChannelsCreateResponse, error)
https://api.slack.com/methods/channels.create req:name // mychannel // Required // Name of channel to create
func (*Client) ChannelsHistory ¶
func (c *Client) ChannelsHistory(channel string, optional url.Values) (*ChannelsHistoryResponse, error)
https://api.slack.com/methods/channels.history req:channel // C1234567890 // Required // Channel to fetch history for. opt:latest // 1234567890.123456 // Optional // , default=now End of time range of messages to include in results. opt:oldest // 1234567890.123456 // Optional // , default=0 Start of time range of messages to include in results. opt:inclusive // 1 // Optional // , default=0 Include messages with latest or oldest timestamp in results. opt:count // 100 // Optional // , default=100 Number of messages to return, between 1 and 1000. opt:unreads // 1 // Optional // , default=0 Include unread_count_display in the output?
func (*Client) ChannelsInfo ¶
func (c *Client) ChannelsInfo(channel string) (*ChannelsInfoResponse, error)
https://api.slack.com/methods/channels.info req:channel // C1234567890 // Required // Channel to get info on
func (*Client) ChannelsInvite ¶
func (c *Client) ChannelsInvite(channel, user string) (*ChannelsInviteResponse, error)
https://api.slack.com/methods/channels.invite req:channel // C1234567890 // Required // Channel to invite user to. req:user // U1234567890 // Required // User to invite to channel.
func (*Client) ChannelsJoin ¶
func (c *Client) ChannelsJoin(name string) (*ChannelsJoinResponse, error)
https://api.slack.com/methods/channels.join req:name // C024BE91L // Required // Name of channel to join
func (*Client) ChannelsKick ¶
func (c *Client) ChannelsKick(channel, user string) (*ChannelsKickResponse, error)
https://api.slack.com/methods/channels.kick req:channel // C1234567890 // Required // Channel to remove user from. req:user // U1234567890 // Required // User to remove from channel.
func (*Client) ChannelsLeave ¶
func (c *Client) ChannelsLeave(channel string) (*ChannelsLeaveResponse, error)
https://api.slack.com/methods/channels.leave req:channel // C1234567890 // Required // Channel to leave
func (*Client) ChannelsList ¶
func (c *Client) ChannelsList(optional url.Values) (*ChannelsListResponse, error)
https://api.slack.com/methods/channels.list opt:exclude_archived // 1 // Optional // , default=0 Don't return archived channels.
func (*Client) ChannelsMark ¶
func (c *Client) ChannelsMark(channel string, ts Time) (*ChannelsMarkResponse, error)
https://api.slack.com/methods/channels.mark req:channel // C1234567890 // Required // Channel to set reading cursor in. req:ts // 1234567890.123456 // Required // Timestamp of the most recently seen message.
func (*Client) ChannelsRename ¶
func (c *Client) ChannelsRename(channel, name string) (*ChannelsRenameResponse, error)
https://api.slack.com/methods/channels.rename req:channel // C1234567890 // Required // Channel to rename req:name // new_name // Required // New name for channel.
func (*Client) ChannelsSetPurpose ¶
func (c *Client) ChannelsSetPurpose(channel, purpose string) (*ChannelsSetPurposeResponse, error)
https://api.slack.com/methods/channels.setPurpose req:channel // C1234567890 // Required // Channel to set the purpose of req:purpose // My Purpose // Required // The new purpose
func (*Client) ChannelsSetTopic ¶
func (c *Client) ChannelsSetTopic(channel, topic string) (*ChannelsSetTopicResponse, error)
https://api.slack.com/methods/channels.setTopic req:channel // C1234567890 // Required // Channel to set the topic of req:topic // My Topic // Required // The new topic
func (*Client) ChannelsUnarchive ¶
func (c *Client) ChannelsUnarchive(channel string) (*ChannelsUnarchiveResponse, error)
https://api.slack.com/methods/channels.unarchive req:channel // C1234567890 // Required // Channel to unarchive
func (*Client) ChatDelete ¶
func (c *Client) ChatDelete(channel string, ts Time) (*ChatDeleteResponse, error)
https://api.slack.com/methods/chat.delete req:channel // C1234567890 // Required // Channel containing the message to be deleted. req:ts // 1405894322.002768 // Required // Timestamp of the message to be deleted.
func (*Client) ChatPostMessage ¶
func (c *Client) ChatPostMessage(channel, text string, optional url.Values) (*ChatPostMessageResponse, error)
https://api.slack.com/methods/chat.postMessage req:channel // C1234567890 // Required // Channel, private group, or IM channel to send message to. Can be an encoded ID, or a name. See below for more details. req:text // Hello world // Required // Text of the message to send. See below for an explanation of formatting. opt:username // My Bot // Optional // Name of bot. opt:as_user // true // Optional // Pass true to post the message as the authed user, instead of as a bot opt:parse // full // Optional // Change how messages are treated. See below. opt:link_names // 1 // Optional // Find and link channel names and usernames. opt:attachments // [{"pretext": "pre-hello", "text": "text-world"}] // Optional // Structured message attachments. opt:unfurl_links // true // Optional // Pass true to enable unfurling of primarily text-based content. opt:unfurl_media // false // Optional // Pass false to disable unfurling of media content. opt:icon_url // http://lorempixel.com/48/48 // Optional // URL to an image to use as the icon for this message opt:icon_emoji // :chart_with_upwards_trend: // Optional // emoji to use as the icon for this message. Overridesicon_url
func (*Client) ChatUpdate ¶
func (c *Client) ChatUpdate(channel, text string, ts Time, optional url.Values) (*ChatUpdateResponse, error)
https://api.slack.com/methods/chat.update req:ts // 1405894322.002768 // Required // Timestamp of the message to be updated. req:channel // C1234567890 // Required // Channel containing the message to be updated. req:text // Hello world // Required // New text for the message, using the default formatting rules. opt:attachments // [{"pretext": "pre-hello", "text": "text-world"}] // Optional // Structured message attachments. opt:parse // none // Optional // Change how messages are treated. See below. opt:link_names // 1 // Optional // Find and link channel names and usernames.
func (*Client) DndEndDnd ¶
func (c *Client) DndEndDnd() (*DndEndDndResponse, error)
func (*Client) DndEndSnooze ¶
func (c *Client) DndEndSnooze() (*DndEndSnoozeResponse, error)
func (*Client) DndInfo ¶
func (c *Client) DndInfo(optional url.Values) (*DndInfoResponse, error)
https://api.slack.com/methods/dnd.info opt:user // U1234 // Optional // User to fetch status for (defaults to current user)
func (*Client) DndSetSnooze ¶
func (c *Client) DndSetSnooze(minutes time.Duration) (*DndSetSnoozeResponse, error)
https://api.slack.com/methods/dnd.setSnooze req:num_minutes // 60 // Required // Number of minutes, from now, to snooze until.
func (*Client) DndTeamInfo ¶
func (c *Client) DndTeamInfo(optional url.Values) (*DndTeamInfoResponse, error)
https://api.slack.com/methods/dnd.teamInfo opt:users // U1234,U4567 // Optional // Comma-separated list of users to fetch Do Not Disturb status for
func (*Client) DoWithBody ¶
func (*Client) EmojiList ¶
func (c *Client) EmojiList() (*EmojiListResponse, error)
func (*Client) FilesCommentsAdd ¶
func (c *Client) FilesCommentsAdd(file, comment string) (*FilesCommentsAddResponse, error)
https://api.slack.com/methods/files.comments.add req:file // F1234567890 // Required // File to add a comment to. req:comment // Everyone should take a moment to read this file. // Required // Text of the comment to add.
func (*Client) FilesCommentsDelete ¶
func (c *Client) FilesCommentsDelete(file, comment_id string) (*FilesCommentsDeleteResponse, error)
https://api.slack.com/methods/files.comments.delete req:file // F1234567890 // Required // File to delete a comment from. req:id // Fc1234567890 // Required // The comment to delete.
func (*Client) FilesCommentsEdit ¶
func (c *Client) FilesCommentsEdit(file, comment_id, comment string) (*FilesCommentsEditResponse, error)
https://api.slack.com/methods/files.comments.edit req:file // F1234567890 // Required // File containing the comment to edit. req:id // Fc1234567890 // Required // The comment to edit. req:comment // Everyone should take a moment to read this file, seriously. // Required // Text of the comment to edit.
func (*Client) FilesDelete ¶
func (c *Client) FilesDelete(file string) (*FilesDeleteResponse, error)
https://api.slack.com/methods/files.delete req:file // // Required // ID of file to delete.
func (*Client) FilesInfo ¶
https://api.slack.com/methods/files.info req:file // // Required // File to fetch info for opt:count // 20 // Optional // , default=100 Number of items to return per page. opt:page // 2 // Optional // , default=1 Page number of results to return.
func (*Client) FilesList ¶
func (c *Client) FilesList(optional url.Values) (*FilesListResponse, error)
https://api.slack.com/methods/files.list opt:user // U1234567890 // Optional // Filter files created by a single user. opt:channel // C1234567890 // Optional // Filter files appearing in a specific channel, indicated by its ID. opt:ts_from // 123456789 // Optional // , default=0 Filter files created after this timestamp (inclusive). opt:ts_to // 123456789 // Optional // , default=now Filter files created before this timestamp (inclusive). opt:types // all,posts,snippets,images,gdocs,zips,pdfs // Optional (multiple) // , default=all Filter files by type: opt:count // 20 // Optional // , default=100 Number of items to return per page. opt:page // 2 // Optional // , default=1 Page number of results to return.
func (*Client) FilesUpload ¶
func (c *Client) FilesUpload(filename string, file io.Reader, optional url.Values) (*FilesUploadResponse, error)
https://api.slack.com/methods/files.upload req:file // ... // Required // File contents via multipart/form-data. req:filename // foo.txt // Required // Filename of file. opt:content // ... // Optional // File contents via a POST var. opt:filetype // php // Optional // Slack-internal file type identifier. opt:title // My File // Optional // Title of file. opt:initial_comment // Best! // Optional // Initial comment to add to file. opt:channels // C1234567890 // Optional // Comma-separated list of channel names or IDs where the file will be shared.
func (*Client) GroupsArchive ¶
func (c *Client) GroupsArchive(channel string) (*GroupsArchiveResponse, error)
https://api.slack.com/methods/groups.archive req:channel // G1234567890 // Required // Private channel to archive
func (*Client) GroupsClose ¶
func (c *Client) GroupsClose(channel string) (*GroupsCloseResponse, error)
https://api.slack.com/methods/groups.close req:channel // G1234567890 // Required // Private channel to close.
func (*Client) GroupsCreate ¶
func (c *Client) GroupsCreate(name string) (*GroupsCreateResponse, error)
https://api.slack.com/methods/groups.create req:name // // Required // Name of private channel to create
func (*Client) GroupsCreateChild ¶
func (c *Client) GroupsCreateChild(channel string) (*GroupsCreateChildResponse, error)
https://api.slack.com/methods/groups.createChild req:channel // G1234567890 // Required // Private channel to clone and archive.
func (*Client) GroupsHistory ¶
https://api.slack.com/methods/groups.history req:channel // G1234567890 // Required // Private channel to fetch history for. opt:latest // 1234567890.123456 // Optional // , default=now End of time range of messages to include in results. opt:oldest // 1234567890.123456 // Optional // , default=0 Start of time range of messages to include in results. opt:inclusive // 1 // Optional // , default=0 Include messages with latest or oldest timestamp in results. opt:count // 100 // Optional // , default=100 Number of messages to return, between 1 and 1000. opt:unreads // 1 // Optional // , default=0 Include unread_count_display in the output?
func (*Client) GroupsInfo ¶
func (c *Client) GroupsInfo(channel string) (*GroupsInfoResponse, error)
https://api.slack.com/methods/groups.info req:channel // C1234567890 // Required // Private channel to get info on
func (*Client) GroupsInvite ¶
func (c *Client) GroupsInvite(channel, user string) (*GroupsInviteResponse, error)
https://api.slack.com/methods/groups.invite req:channel // G1234567890 // Required // Private channel to invite user to. req:user // U1234567890 // Required // User to invite.
func (*Client) GroupsKick ¶
func (c *Client) GroupsKick(channel, user string) (*GroupsKickResponse, error)
https://api.slack.com/methods/groups.kick req:channel // G1234567890 // Required // Private channel to remove user from. req:user // U1234567890 // Required // User to remove from private channel.
func (*Client) GroupsLeave ¶
func (c *Client) GroupsLeave(channel string) (*GroupsLeaveResponse, error)
https://api.slack.com/methods/groups.leave req:channel // G1234567890 // Required // Private channel to leave
func (*Client) GroupsList ¶
func (c *Client) GroupsList(optional url.Values) (*GroupsListResponse, error)
https://api.slack.com/methods/groups.list opt:exclude_archived // 1 // Optional // , default=0 Don't return archived private channels.
func (*Client) GroupsMark ¶
func (c *Client) GroupsMark(channel string, ts Time) (*GroupsMarkResponse, error)
https://api.slack.com/methods/groups.mark req:channel // G1234567890 // Required // Private channel to set reading cursor in. req:ts // 1234567890.123456 // Required // Timestamp of the most recently seen message.
func (*Client) GroupsOpen ¶
func (c *Client) GroupsOpen(channel string) (*GroupsOpenResponse, error)
https://api.slack.com/methods/groups.open req:channel // G1234567890 // Required // Private channel to open.
func (*Client) GroupsRename ¶
func (c *Client) GroupsRename(channel, name string) (*GroupsRenameResponse, error)
https://api.slack.com/methods/groups.rename req:channel // C1234567890 // Required // Private channel to rename req:name // // Required // New name for private channel.
func (*Client) GroupsSetPurpose ¶
func (c *Client) GroupsSetPurpose(channel, purpose string) (*GroupsSetPurposeResponse, error)
https://api.slack.com/methods/groups.setPurpose req:channel // C1234567890 // Required // Private channel to set the purpose of req:purpose // My Purpose // Required // The new purpose
func (*Client) GroupsSetTopic ¶
func (c *Client) GroupsSetTopic(channel, topic string) (*GroupsSetTopicResponse, error)
https://api.slack.com/methods/groups.setTopic req:channel // C1234567890 // Required // Private channel to set the topic of req:topic // My Topic // Required // The new topic
func (*Client) GroupsUnarchive ¶
func (c *Client) GroupsUnarchive(channel string) (*GroupsUnarchiveResponse, error)
https://api.slack.com/methods/groups.unarchive req:channel // G1234567890 // Required // Private channel to unarchive
func (*Client) ImClose ¶
func (c *Client) ImClose(channel string) (*ImCloseResponse, error)
https://api.slack.com/methods/im.close req:channel // D1234567890 // Required // Direct message channel to close.
func (*Client) ImHistory ¶
https://api.slack.com/methods/im.history req:channel // D1234567890 // Required // Direct message channel to fetch history for. opt:latest // 1234567890.123456 // Optional // , default=now End of time range of messages to include in results. opt:oldest // 1234567890.123456 // Optional // , default=0 Start of time range of messages to include in results. opt:inclusive // 1 // Optional // , default=0 Include messages with latest or oldest timestamp in results. opt:count // 100 // Optional // , default=100 Number of messages to return, between 1 and 1000. opt:unreads // 1 // Optional // , default=0 Include unread_count_display in the output?
func (*Client) ImList ¶
func (c *Client) ImList() (*ImListResponse, error)
func (*Client) ImMark ¶
func (c *Client) ImMark(channel string, ts Time) (*ImMarkResponse, error)
https://api.slack.com/methods/im.mark req:channel // D1234567890 // Required // Direct message channel to set reading cursor in. req:ts // 1234567890.123456 // Required // Timestamp of the most recently seen message.
func (*Client) ImOpen ¶
func (c *Client) ImOpen(user string) (*ImOpenResponse, error)
https://api.slack.com/methods/im.open req:user // U1234567890 // Required // User to open a direct message channel with.
func (*Client) MpimClose ¶
func (c *Client) MpimClose(channel string) (*MpimCloseResponse, error)
https://api.slack.com/methods/mpim.close req:channel // // Required // MPIM to close.
func (*Client) MpimHistory ¶
https://api.slack.com/methods/mpim.history req:channel // // Required // Multiparty direct message to fetch history for. opt:latest // 1234567890.123456 // Optional // , default=now End of time range of messages to include in results. opt:oldest // 1234567890.123456 // Optional // , default=0 Start of time range of messages to include in results. opt:inclusive // 1 // Optional // , default=0 Include messages with latest or oldest timestamp in results. opt:count // 100 // Optional // , default=100 Number of messages to return, between 1 and 1000. opt:unreads // 1 // Optional // , default=0 Include unread_count_display in the output?
func (*Client) MpimList ¶
func (c *Client) MpimList() (*MpimListResponse, error)
func (*Client) MpimMark ¶
func (c *Client) MpimMark(channel string, ts Time) (*MpimMarkResponse, error)
https://api.slack.com/methods/mpim.mark req:channel // G1234567890 // Required // multiparty direct message channel to set reading cursor in. req:ts // 1234567890.123456 // Required // Timestamp of the most recently seen message.
func (*Client) MpimOpen ¶
func (c *Client) MpimOpen(users []string) (*MpimOpenResponse, error)
https://api.slack.com/methods/mpim.open req:users // U1234567890,U2345678901,U3456789012 // Required // Comma separated lists of users. The ordering of the users is preserved whenever a MPIM group is returned.
func (*Client) OauthAccess ¶
func (c *Client) OauthAccess(client_id, client_secret, code string, optional url.Values) (*OauthAccessResponse, error)
https://api.slack.com/methods/oauth.access req:client_id // 4b39e9-752c4 // Required // Issued when you created your application. req:client_secret // 33fea0113f5b1 // Required // Issued when you created your application. req:code // ccdaa72ad // Required // The code param returned via the OAuth callback. opt:redirect_uri // http://example.com // Optional // This must match the originally submitted URI (if one was sent).
func (*Client) PinsAdd ¶
https://api.slack.com/methods/pins.add req:channel // C1234567890 // Required // Channel to pin the item in. opt:file // F1234567890 // Optional // File to pin. opt:file_comment // Fc1234567890 // Optional // File comment to pin. opt:timestamp // 1234567890.123456 // Optional // Timestamp of the message to pin.
func (*Client) PinsList ¶
func (c *Client) PinsList(channel string) (*PinsListResponse, error)
https://api.slack.com/methods/pins.list req:channel // C1234567890 // Required // Channel to get pinned items for.
func (*Client) PinsRemove ¶
https://api.slack.com/methods/pins.remove req:channel // C1234567890 // Required // Channel where the item is pinned to. opt:file // F1234567890 // Optional // File to un-pin. opt:file_comment // Fc1234567890 // Optional // File comment to un-pin. opt:timestamp // 1234567890.123456 // Optional // Timestamp of the message to un-pin.
func (*Client) RTMStart ¶
func (c *Client) RTMStart(optional url.Values) (*RTMStartResponse, error)
https://api.slack.com/methods/rtm.start opt:simple_latest // // Optional // Return timestamp only for latest message object of each channel (improves performance). opt:no_unreads // // Optional // Skip unread counts for each channel (improves performance). opt:mpim_aware // // Optional // Returns MPIMs to the client in the API response.
func (*Client) ReactionsAdd ¶
https://api.slack.com/methods/reactions.add req:name // thumbsup // Required // Reaction (emoji) name. opt:file // F1234567890 // Optional // File to add reaction to. opt:file_comment // Fc1234567890 // Optional // File comment to add reaction to. opt:channel // C1234567890 // Optional // Channel where the message to add reaction to was posted. opt:timestamp // 1234567890.123456 // Optional // Timestamp of the message to add reaction to.
func (*Client) ReactionsGet ¶
func (c *Client) ReactionsGet(optional url.Values) (*ReactionsGetResponse, error)
https://api.slack.com/methods/reactions.get opt:file // F1234567890 // Optional // File to get reactions for. opt:file_comment // Fc1234567890 // Optional // File comment to get reactions for. opt:channel // C1234567890 // Optional // Channel where the message to get reactions for was posted. opt:timestamp // 1234567890.123456 // Optional // Timestamp of the message to get reactions for. opt:full // // Optional // If true always return the complete reaction list.
func (*Client) ReactionsList ¶
func (c *Client) ReactionsList(optional url.Values) (*ReactionsListResponse, error)
https://api.slack.com/methods/reactions.list opt:user // U1234567890 // Optional // Show reactions made by this user. Defaults to the authed user. opt:full // // Optional // If true always return the complete reaction list. opt:count // 20 // Optional // , default=100 Number of items to return per page. opt:page // 2 // Optional // , default=1 Page number of results to return.
func (*Client) ReactionsRemove ¶
func (c *Client) ReactionsRemove(name string, optional url.Values) (*ReactionsRemoveResponse, error)
https://api.slack.com/methods/reactions.remove req:name // thumbsup // Required // Reaction (emoji) name. opt:file // F1234567890 // Optional // File to remove reaction from. opt:file_comment // Fc1234567890 // Optional // File comment to remove reaction from. opt:channel // C1234567890 // Optional // Channel where the message to remove reaction from was posted. opt:timestamp // 1234567890.123456 // Optional // Timestamp of the message to remove reaction from.
func (*Client) SearchAll ¶
https://api.slack.com/methods/search.all req:query // pickleface // Required // Search query. May contains booleans, etc. opt:sort // timestamp // Optional // , default=score Return matches sorted by either score or timestamp. opt:sort_dir // asc // Optional // , default=desc Change sort direction to ascending (asc) or descending (desc). opt:highlight // 1 // Optional // Pass a value of 1 to enable query highlight markers (see below). opt:count // 20 // Optional // , default=20 Number of items to return per page. opt:page // 2 // Optional // , default=1 Page number of results to return.
func (*Client) SearchFiles ¶
https://api.slack.com/methods/search.files req:query // pickleface // Required // Search query. May contain booleans, etc. opt:sort // timestamp // Optional // , default=score Return matches sorted by either score or timestamp. opt:sort_dir // asc // Optional // , default=desc Change sort direction to ascending (asc) or descending (desc). opt:highlight // 1 // Optional // Pass a value of 1 to enable query highlight markers (see below). opt:count // 20 // Optional // , default=20 Number of items to return per page. opt:page // 2 // Optional // , default=1 Page number of results to return.
func (*Client) SearchMessages ¶
https://api.slack.com/methods/search.messages req:query // pickleface // Required // Search query. May contains booleans, etc. opt:sort // timestamp // Optional // , default=score Return matches sorted by either score or timestamp. opt:sort_dir // asc // Optional // , default=desc Change sort direction to ascending (asc) or descending (desc). opt:highlight // 1 // Optional // Pass a value of 1 to enable query highlight markers (see below). opt:count // 20 // Optional // , default=20 Number of items to return per page. opt:page // 2 // Optional // , default=1 Page number of results to return.
func (*Client) StarsAdd ¶
func (c *Client) StarsAdd(optional url.Values) (*StarsAddResponse, error)
https://api.slack.com/methods/stars.add opt:file // F1234567890 // Optional // File to add star to. opt:file_comment // Fc1234567890 // Optional // File comment to add star to. opt:channel // C1234567890 // Optional // Channel to add star to, or channel where the message to add star to was posted (used with timestamp). opt:timestamp // 1234567890.123456 // Optional // Timestamp of the message to add star to.
func (*Client) StarsList ¶
func (c *Client) StarsList(optional url.Values) (*StarsListResponse, error)
https://api.slack.com/methods/stars.list opt:user // U1234567890 // Optional // Show stars by this user. Defaults to the authed user. opt:count // 20 // Optional // , default=100 Number of items to return per page. opt:page // 2 // Optional // , default=1 Page number of results to return.
func (*Client) StarsRemove ¶
func (c *Client) StarsRemove(optional url.Values) (*StarsRemoveResponse, error)
https://api.slack.com/methods/stars.remove opt:file // F1234567890 // Optional // File to remove star from. opt:file_comment // Fc1234567890 // Optional // File comment to remove star from. opt:channel // C1234567890 // Optional // Channel to remove star from, or channel where the message to remove star from was posted (used with timestamp). opt:timestamp // 1234567890.123456 // Optional // Timestamp of the message to remove star from.
func (*Client) TeamAccessLogs ¶
func (c *Client) TeamAccessLogs(optional url.Values) (*TeamAccessLogsResponse, error)
https://api.slack.com/methods/team.accessLogs opt:count // 20 // Optional // , default=100 Number of items to return per page. opt:page // 2 // Optional // , default=1 Page number of results to return.
func (*Client) TeamInfo ¶
func (c *Client) TeamInfo() (*TeamInfoResponse, error)
func (*Client) TeamIntegrationLogs ¶
func (c *Client) TeamIntegrationLogs(optional url.Values) (*TeamIntegrationLogsResponse, error)
https://api.slack.com/methods/team.integrationLogs opt:service_id // // Optional // Filter logs to this service. Defaults to all logs. opt:app_id // // Optional // Filter logs to this Slack app. Defaults to all logs. opt:user // U1234567890 // Optional // Filter logs generated by this user’s actions. Defaults to all logs. opt:change_type // added // Optional // Filter logs with this change type. Defaults to all logs. opt:count // 20 // Optional // , default=100 Number of items to return per page. opt:page // 2 // Optional // , default=1 Page number of results to return.
func (*Client) UsergroupsCreate ¶
func (c *Client) UsergroupsCreate(name string, optional url.Values) (*UsergroupsCreateResponse, error)
https://api.slack.com/methods/usergroups.create req:name // My Test Team // Required // A name for the user group. Must be unique among user groups. opt:handle // // Optional // A mention handle. Must be unique among channels, users and user groups. opt:description // // Optional // A short description of the user group. opt:channels // // Optional // A comma separated string of encoded channel IDs for which the user group uses as a default. opt:include_count // 1 // Optional // Include the number of users in each user group.
func (*Client) UsergroupsDisable ¶
func (c *Client) UsergroupsDisable(usergroup string, optional url.Values) (*UsergroupsDisableResponse, error)
https://api.slack.com/methods/usergroups.disable req:usergroup // S0604QSJC // Required // The encoded ID of the user group to disable. opt:include_count // 1 // Optional // Include the number of users in the user group.
func (*Client) UsergroupsEnable ¶
func (c *Client) UsergroupsEnable(usergroup string, optional url.Values) (*UsergroupsEnableResponse, error)
https://api.slack.com/methods/usergroups.enable req:usergroup // S0604QSJC // Required // The encoded ID of the user group to enable. opt:include_count // 1 // Optional // Include the number of users in the user group.
func (*Client) UsergroupsList ¶
func (c *Client) UsergroupsList(optional url.Values) (*UsergroupsListResponse, error)
https://api.slack.com/methods/usergroups.list opt:include_disabled // 1 // Optional // Include disabled user groups. opt:include_count // 1 // Optional // Include the number of users in each user group. opt:include_users // 1 // Optional // Include the list of users for each user group.
func (*Client) UsergroupsUpdate ¶
func (c *Client) UsergroupsUpdate(usergroup string, optional url.Values) (*UsergroupsUpdateResponse, error)
https://api.slack.com/methods/usergroups.update req:usergroup // S0604QSJC // Required // The encoded ID of the user group to update. opt:name // My Test Team // Optional // A name for the user group. Must be unique among user groups. opt:handle // // Optional // A mention handle. Must be unique among channels, users and user groups. opt:description // // Optional // A short description of the user group. opt:channels // // Optional // A comma separated string of encoded channel IDs for which the user group uses as a default. opt:include_count // 1 // Optional // Include the number of users in the user group.
func (*Client) UsergroupsUsersList ¶
func (c *Client) UsergroupsUsersList(usergroup string, optional url.Values) (*UsergroupsUsersListResponse, error)
https://api.slack.com/methods/usergroups.users.list req:usergroup // S0604QSJC // Required // The encoded ID of the user group to update. opt:include_disabled // 1 // Optional // Allow results that involve disabled user groups.
func (*Client) UsergroupsUsersUpdate ¶
func (c *Client) UsergroupsUsersUpdate(usergroup string, users []string, optional url.Values) (*UsergroupsUsersUpdateResponse, error)
https://api.slack.com/methods/usergroups.users.update req:usergroup // S0604QSJC // Required // The encoded ID of the user group to update. req:users // U060R4BJ4,U060RNRCZ // Required // A comma separated string of encoded user IDs that represent the entire list of users for the user group. opt:include_count // 1 // Optional // Include the number of users in the user group.
func (*Client) UsersGetPresence ¶
func (c *Client) UsersGetPresence(user string) (*UsersGetPresenceResponse, error)
https://api.slack.com/methods/users.getPresence req:user // U1234567890 // Required // User to get presence info on. Defaults to the authed user.
func (*Client) UsersInfo ¶
func (c *Client) UsersInfo(user string) (*UsersInfoResponse, error)
https://api.slack.com/methods/users.info req:user // U1234567890 // Required // User to get info on
func (*Client) UsersList ¶
func (c *Client) UsersList(optional url.Values) (*UsersListResponse, error)
https://api.slack.com/methods/users.list opt:presence // 1 // Optional // Whether to include presence data in the output
func (*Client) UsersSetActive ¶
func (c *Client) UsersSetActive() (*UsersSetActiveResponse, error)
func (*Client) UsersSetPresence ¶
func (c *Client) UsersSetPresence(presence Presence) (*UsersSetPresenceResponse, error)
https://api.slack.com/methods/users.setPresence req:presence // (auto or away) // Required // Either
type CommandsChangedEvent ¶
type CommandsChangedEvent struct { Type string `json:"type"` EventTimestamp Time `json:"event_ts"` }
https://api.slack.com/events/commands_changed
{ "type": "commands_changed", "event_ts" : "1361482916.000004" }
type DndEndSnoozeResponse ¶
type DndEndSnoozeResponse struct { OK bool `json:"ok"` Error string `json:"error"` DndEnabled bool `json:"dnd_enabled"` NextDndStartTimestamp Time `json:"next_dnd_start_ts"` NextDndEndTimestamp Time `json:"next_dnd_end_ts"` SnoozeEnabled bool `json:"snooze_enabled"` }
https://api.slack.com/methods/dnd.endSnooze
{ "ok": true, "dnd_enabled": true, "next_dnd_start_ts": 1450418400, "next_dnd_end_ts": 1450454400, "snooze_enabled": false }
type DndInfoResponse ¶
type DndInfoResponse struct { OK bool `json:"ok"` Error string `json:"error"` DndEnabled bool `json:"dnd_enabled"` NextDndStartTimestamp Time `json:"next_dnd_start_ts"` NextDndEndTimestamp Time `json:"next_dnd_end_ts"` SnoozeEnabled bool `json:"snooze_enabled"` SnoozeEndTime Time `json:"snooze_endtime"` SnoozeRemaining Duration `json:"snooze_remaining"` }
https://api.slack.com/methods/dnd.info
{ "ok": true, "dnd_enabled": true, "next_dnd_start_ts": 1450416600, "next_dnd_end_ts": 1450452600, "snooze_enabled": true, "snooze_endtime": 1450416600, "snooze_remaining": 1196 }
type DndSetSnoozeResponse ¶
type DndSetSnoozeResponse struct { OK bool `json:"ok"` Error string `json:"error"` SnoozeEnabled bool `json:"snooze_enabled"` SnoozeEndTime Time `json:"snooze_endtime"` SnoozeRemaining Duration `json:"snooze_remaining"` }
https://api.slack.com/methods/dnd.setSnooze
{ "ok": true, "snooze_enabled": true, "snooze_endtime": 1450373897, "snooze_remaining": 60, }
type DndTeamInfoResponse ¶
type DndTeamInfoResponse struct { OK bool `json:"ok"` Error string `json:"error"` Users map[string]struct { DndEnabled bool `json:"dnd_enabled"` NextDndEndTimestamp Time `json:"next_dnd_end_ts"` NextDndStartTimestamp Time `json:"next_dnd_start_ts"` } `json:"users"` }
https://api.slack.com/methods/dnd.teamInfo
{ "ok": true, "users": { "U023BECGF": { "dnd_enabled": true, "next_dnd_start_ts": 1450387800, "next_dnd_end_ts": 1450423800 }, "U058CJVAA": { "dnd_enabled": false, "next_dnd_start_ts": 1, "next_dnd_end_ts": 1 } } }
type DndUpdatedEvent ¶
type DndUpdatedEvent struct { Type string `json:"type"` User string `json:"user"` DndStatus struct { DndEnabled bool `json:"dnd_enabled"` NextDndStartTimestamp Time `json:"next_dnd_start_ts"` NextDndEndTimestamp Time `json:"next_dnd_end_ts"` SnoozeEnabled bool `json:"snooze_enabled"` SnoozeEndtime Time `json:"snooze_endtime"` } `json:"dnd_status"` }
https://api.slack.com/events/dnd_updated
{ "type": "dnd_updated", "user": "U1234", "dnd_status": { "dnd_enabled": true, "next_dnd_start_ts": 1450387800, "next_dnd_end_ts": 1450423800, "snooze_enabled": true, "snooze_endtime": 1450373897 } }
type DndUpdatedUserEvent ¶
type DndUpdatedUserEvent struct { Type string `json:"type"` User string `json:"user"` DndStatus struct { DndEnabled bool `json:"dnd_enabled"` NextDndStartTimestamp Time `json:"next_dnd_start_ts"` NextDndEndTimestamp Time `json:"next_dnd_end_ts"` } `json:"dnd_status"` }
https://api.slack.com/events/dnd_updated_user
{ "type": "dnd_updated_user", "user": "U1234", "dnd_status": { "dnd_enabled": true, "next_dnd_start_ts": 1450387800, "next_dnd_end_ts": 1450423800 } }
type Duration ¶
func NewDuration ¶
func (Duration) MarshalJSON ¶
func (Duration) SlackString ¶
func (*Duration) UnmarshalJSON ¶
type EmailDomainChangedEvent ¶
type EmailDomainChangedEvent struct { Type string `json:"type"` EmailDomain string `json:"email_domain"` EventTimestamp Time `json:"event_ts"` }
https://api.slack.com/events/email_domain_changed
{ "type": "email_domain_changed", "email_domain":"example.com", "event_ts": "1360782804.083113" }
type EmojiChangedEvent ¶
https://api.slack.com/events/emoji_changed
{ "type": "emoji_changed", "event_ts" : "1361482916.000004" }
type EmojiListResponse ¶
type EmojiListResponse struct { OK bool `json:"ok"` Error string `json:"error"` Emoji map[string]string `json:"emoji"` }
https://api.slack.com/methods/emoji.list
{ "ok": true, "emoji": { "bowtie": "https:\/\/my.slack.com\/emoji\/bowtie\/46ec6f2bb0.png", "squirrel": "https:\/\/my.slack.com\/emoji\/squirrel\/f35f40c0e0.png", "shipit": "alias:squirrel" } }
type File ¶
type File struct { ID string `json:"id"` Created Time `json:"created"` Timestamp Time `json:"timestamp"` Name string `json:"name"` Title string `json:"title"` Mimetype string `json:"mimetype"` Filetype string `json:"filetype"` PrettyType string `json:"pretty_type"` User string `json:"user"` Mode string `json:"mode"` Editable bool `json:"editable"` IsExternal bool `json:"is_external"` ExternalType string `json:"external_type"` Username string `json:"username"` Size int `json:"size"` URLPrivate string `json:"url_private"` URLPrivateDownload string `json:"url_private_download"` 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"` Thumb480H int `json:"thumb_480_h"` Thumb480W int `json:"thumb_480_w"` Thumb64 string `json:"thumb_64"` Thumb80 string `json:"thumb_80"` Permalink string `json:"permalink"` PermalinkPublic string `json:"permalink_public"` EditLink string `json:"edit_link"` Preview string `json:"preview"` PreviewHighlight string `json:"preview_highlight"` Lines int `json:"lines"` LinesMore int `json:"lines_more"` IsPublic bool `json:"is_public"` DisplayAsBot bool `json:"display_as_bot"` Channels []string `json:"channels"` Groups []string `json:"groups"` Ims []string `json:"ims"` InitialComment *Comment `json:"initial_comment"` NumStars int `json:"num_stars"` IsStarred bool `json:"is_starred"` PinnedTo []string `json:"pinned_to"` Reactions []struct { Count int `json:"count"` Name string `json:"name"` Users []string `json:"users"` } `json:"reactions"` CommentsCount int `json:"comments_count"` }
https://api.slack.com/types/file
{ "id" : "F2147483862", "created" : 1356032811, "timestamp" : 1356032811, "name" : "file.htm", "title" : "My HTML file", "mimetype" : "text\/plain", "filetype" : "text", "pretty_type": "Text", "user" : "U2147483697", "mode" : "hosted", "editable" : true, "is_external": false, "external_type": "", "username": "", "size" : 12345, "url_private": "https:\/\/slack.com\/files-pri\/T024BE7LD-F024BERPE\/1.png", "url_private_download": "https:\/\/slack.com\/files-pri\/T024BE7LD-F024BERPE\/download\/1.png", "thumb_64": "https:\/\/slack-files.com\/files-tmb\/T024BE7LD-F024BERPE-c66246\/1_64.png", "thumb_80": "https:\/\/slack-files.com\/files-tmb\/T024BE7LD-F024BERPE-c66246\/1_80.png", "thumb_360": "https:\/\/slack-files.com\/files-tmb\/T024BE7LD-F024BERPE-c66246\/1_360.png", "thumb_360_gif": "https:\/\/slack-files.com\/files-tmb\/T024BE7LD-F024BERPE-c66246\/1_360.gif", "thumb_360_w": 100, "thumb_360_h": 100, "thumb_480": "https:\/\/slack-files.com\/files-tmb\/T024BE7LD-F024BERPE-c66246\/1_480.png", "thumb_480_w": 480, "thumb_480_h": 480, "thumb_160": "https:\/\/slack-files.com\/files-tmb\/T024BE7LD-F024BERPE-c66246\/1_160.png", "permalink" : "https:\/\/tinyspeck.slack.com\/files\/cal\/F024BERPE\/1.png", "permalink_public" : "https:\/\/tinyspeck.slack.com\/T024BE7LD-F024BERPE-3f9216b62c", "edit_link" : "https:\/\/tinyspeck.slack.com\/files\/cal\/F024BERPE\/1.png/edit", "preview" : "<!DOCTYPE html>\n<html>\n<meta charset='utf-8'>", "preview_highlight" : <div class=\"sssh-code\"><div class=\"sssh-line\"><pre><!DOCTYPE html...", "lines" : 123, "lines_more": 118, "is_public": true, "public_url_shared": false, "display_as_bot" : false, "channels": ["C024BE7LT", ...], "groups": ["G12345", ...], "ims": ["D12345", ...], "initial_comment": {...}, "num_stars": 7, "is_starred": true, "pinned_to": ["C024BE7LT", ...], "reactions": [ { "name": "astonished", "count": 3, "users": [ "U1", "U2", "U3" ] }, { "name": "facepalm", "count": 1034, "users": [ "U1", "U2", "U3", "U4", "U5" ] } ], "comments_count": 1 }
type FileChangeEvent ¶
https://api.slack.com/events/file_change
{ "type": "file_change", "file": {} }
type FileCommentAddedEvent ¶
type FileCommentAddedEvent struct { Type string `json:"type"` File *File `json:"file"` Comment *Comment `json:"comment"` }
https://api.slack.com/events/file_comment_added
{ "type": "file_comment_added", "file": {}, "comment": {} }
type FileCommentDeletedEvent ¶
type FileCommentDeletedEvent struct { Type string `json:"type"` File *File `json:"file"` Comment string `json:"comment"` }
https://api.slack.com/events/file_comment_deleted
{ "type": "file_comment_deleted", "file": {}, "comment": "Fc67890" }
type FileCommentEditedEvent ¶
type FileCommentEditedEvent struct { Type string `json:"type"` File *File `json:"file"` Comment *Comment `json:"comment"` }
https://api.slack.com/events/file_comment_edited
{ "type": "file_comment_edited", "file": {}, "comment": {} }
type FileCreatedEvent ¶
https://api.slack.com/events/file_created
{ "type": "file_created", "file": {} }
type FileDeletedEvent ¶
type FileDeletedEvent struct { Type string `json:"type"` FileID string `json:"file_id"` EventTimestamp Time `json:"event_ts"` }
https://api.slack.com/events/file_deleted
{ "type": "file_deleted", "file_id": "F2147483862", "event_ts": "1361482916.000004" }
type FilePrivateEvent ¶
https://api.slack.com/events/file_private
{ "type": "file_private", "file": "F2147483862" }
type FilePublicEvent ¶
https://api.slack.com/events/file_public
{ "type": "file_public", "file": {} }
type FileSharedEvent ¶
type FileSharedEvent struct {}
https://api.slack.com/events/file_shared
{ "type": "file_shared", "file": {} }
type FileUnsharedEvent ¶
type FileUnsharedEvent struct {}
https://api.slack.com/events/file_unshared
{ "type": "file_unshared", "file": {} }
type FilesCommentsAddResponse ¶
type FilesCommentsAddResponse struct { OK bool `json:"ok"` Error string `json:"error"` Comment *Comment `json:"comment"` }
https://api.slack.com/methods/files.comments.add
{ "ok": true, "comment": { "id": "Fc1234567890", "created": 1356032811, "timestamp": 1356032811, "user": "U1234567890", "comment": "Everyone should take a moment to read this file." } }
type FilesCommentsDeleteResponse ¶
https://api.slack.com/methods/files.comments.delete
{ "ok": true }
type FilesCommentsEditResponse ¶
type FilesCommentsEditResponse struct { OK bool `json:"ok"` Error string `json:"error"` Comment *Comment `json:"comment"` }
https://api.slack.com/methods/files.comments.edit
{ "ok": true, "comment": { "id": "Fc1234567890", "created": 1356032811, "timestamp": 1356032811, "user": "U1234567890", "comment": "Everyone should take a moment to read this file, seriously." } }
type FilesInfoResponse ¶
type FilesInfoResponse struct { OK bool `json:"ok"` Error string `json:"error"` File *File `json:"file"` Comments []*Comment `json:"comments"` Paging struct { Count int `json:"count"` Page int `json:"page"` Pages int `json:"pages"` Total int `json:"total"` } `json:"paging"` }
https://api.slack.com/methods/files.info
{ "ok": true, "file": { "id" : "F2147483862", "timestamp" : 1356032811, "name" : "file.htm", "title" : "My HTML file", "mimetype" : "text\/plain", "filetype" : "text", "pretty_type": "Text", "user" : "U2147483697", "mode" : "hosted", "editable" : true, "is_external": false, "external_type": "", "size" : 12345, "url": "https:\/\/slack-files.com\/files-pub\/T024BE7LD-F024BERPE-09acb6\/1.png", "url_download": "https:\/\/slack-files.com\/files-pub\/T024BE7LD-F024BERPE-09acb6\/download\/1.png", "url_private": "https:\/\/slack.com\/files-pri\/T024BE7LD-F024BERPE\/1.png", "url_private_download": "https:\/\/slack.com\/files-pri\/T024BE7LD-F024BERPE\/download\/1.png", "thumb_64": "https:\/\/slack-files.com\/files-tmb\/T024BE7LD-F024BERPE-c66246\/1_64.png", "thumb_80": "https:\/\/slack-files.com\/files-tmb\/T024BE7LD-F024BERPE-c66246\/1_80.png", "thumb_360": "https:\/\/slack-files.com\/files-tmb\/T024BE7LD-F024BERPE-c66246\/1_360.png", "thumb_360_gif": "https:\/\/slack-files.com\/files-tmb\/T024BE7LD-F024BERPE-c66246\/1_360.gif", "thumb_360_w": 100, "thumb_360_h": 100, "permalink" : "https:\/\/tinyspeck.slack.com\/files\/cal\/F024BERPE\/1.png", "edit_link" : "https:\/\/tinyspeck.slack.com\/files\/cal\/F024BERPE\/1.png/edit", "preview" : "<!DOCTYPE html>\n<html>\n<meta charset='utf-8'>", "preview_highlight" : <div class=\"sssh-code\"><div class=\"sssh-line\"><pre><!DOCTYPE html...", "lines" : 123, "lines_more": 118, "is_public": true, "public_url_shared": false, "channels": ["C024BE7LT", ...], "groups": ["G12345", ...], "initial_comment": {...}, "num_stars": 7, "is_starred": true }, "comments": [ { "id": "Fc027BN9L9", "timestamp": 1356032811, "user": "U2147483697", "comment": "This is a comment" } ], "paging": { "count": 100, "total": 2, "page": 1, "pages": 0 } }
type FilesListResponse ¶
type FilesListResponse struct { OK bool `json:"ok"` Error string `json:"error"` Files []*File `json:"files"` Paging struct { Count int `json:"count"` Page int `json:"page"` Pages int `json:"pages"` Total int `json:"total"` } `json:"paging"` }
https://api.slack.com/methods/files.list
{ "ok": true, "files": [ {...}, {...}, {...}, ... ], "paging": { "count": 100, "total": 295, "page": 1, "pages": 3 } }
type FilesUploadResponse ¶
type FilesUploadResponse struct { OK bool `json:"ok"` Error string `json:"error"` File *File `json:"file"` }
https://api.slack.com/methods/files.upload
{ "ok": true, "file": {...} }
type Group ¶
type Group struct { ID string `json:"id"` Name string `json:"name"` IsGroup bool `json:"is_group"` Created Time `json:"created"` Creator string `json:"creator"` IsArchived bool `json:"is_archived"` IsMpim bool `json:"is_mpim"` Members []string `json:"members"` Topic struct { Creator string `json:"creator"` LastSet Time `json:"last_set"` Value string `json:"value"` } `json:"topic"` Purpose struct { Creator string `json:"creator"` LastSet Time `json:"last_set"` Value string `json:"value"` } `json:"purpose"` LastRead Time `json:"last_read"` Latest *Message `json:"latest"` UnreadCount int `json:"unread_count"` UnreadCountDisplay int `json:"unread_count_display"` }
https://api.slack.com/types/group
{ "id": "G024BE91L", "name": "secretplans", "is_group": "true", "created": 1360782804, "creator": "U024BE7LH", "is_archived": false, "is_mpim": false, "members": [ "U024BE7LH" ], "topic": { "value": "Secret plans on hold", "creator": "U024BE7LV", "last_set": 1369677212 }, "purpose": { "value": "Discuss secret plans that no-one else should know", "creator": "U024BE7LH", "last_set": 1360782804 }, "last_read": "1401383885.000061", "latest": { … } "unread_count": 0, "unread_count_display": 0 }
type GroupArchiveEvent ¶
https://api.slack.com/events/group_archive
{ "type": "group_archive", "channel": "G024BE91L" }
type GroupCloseEvent ¶
type GroupCloseEvent struct { Type string `json:"type"` User string `json:"user"` Channel string `json:"channel"` }
https://api.slack.com/events/group_close
{ "type": "group_close", "user": "U024BE7LH", "channel": "G024BE91L" }
type GroupHistoryChangedEvent ¶
type GroupHistoryChangedEvent struct { Type string `json:"type"` Latest Time `json:"latest"` Timestamp Time `json:"ts"` EventTimestamp Time `json:"event_ts"` }
https://api.slack.com/events/group_history_changed
{ "type": "group_history_changed", "latest": "1358877455.000010", "ts": "1361482916.000003", "event_ts": "1361482916.000004" }
type GroupJoinedEvent ¶
https://api.slack.com/events/group_joined
{ "type": "group_joined", "channel": {} }
type GroupLeftEvent ¶
https://api.slack.com/events/group_left
{ "type": "group_left", "channel": {} }
type GroupMarkedEvent ¶
type GroupMarkedEvent struct { Type string `json:"type"` Channel string `json:"channel"` Timestamp Time `json:"ts"` }
https://api.slack.com/events/group_marked
{ "type": "group_marked", "channel": "G024BE91L", "ts": "1401383885.000061" }
type GroupOpenEvent ¶
type GroupOpenEvent struct { Type string `json:"type"` User string `json:"user"` Channel string `json:"channel"` }
https://api.slack.com/events/group_open
{ "type": "group_open", "user": "U024BE7LH", "channel": "G024BE91L" }
type GroupRenameEvent ¶
type GroupRenameEvent struct { Type string `json:"type"` Channel struct { ID string `json:"id"` Name string `json:"name"` Created Time `json:"created"` } `json:"channel"` }
https://api.slack.com/events/group_rename
{ "type": "group_rename", "channel": { "id":"G02ELGNBH", "name":"new_name", "created":1360782804 } }
type GroupUnarchiveEvent ¶
https://api.slack.com/events/group_unarchive
{ "type": "group_unarchive", "channel": "G024BE91L" }
type GroupsCloseResponse ¶
type GroupsCloseResponse struct { OK bool `json:"ok"` Error string `json:"error"` NOOP bool `json:"no_op"` AlreadyClosed bool `json:"already_closed"` }
https://api.slack.com/methods/groups.close
{ "ok": true }
{ "ok": true, "no_op": true, "already_closed": true }
type GroupsCreateChildResponse ¶
type GroupsCreateChildResponse struct { OK bool `json:"ok"` Error string `json:"error"` Group *Group `json:"group"` }
https://api.slack.com/methods/groups.createChild
{ "ok": true, "group": { "id": "G024BE91L", "name": "secretplans", "is_group": "true", "created": 1360782804, "creator": "U024BE7LH", "is_archived": false, "members": [ "U024BE7LH" ] } }
type GroupsCreateResponse ¶
type GroupsCreateResponse struct { OK bool `json:"ok"` Error string `json:"error"` Group *Group `json:"group"` }
https://api.slack.com/methods/groups.create
{ "ok": true, "group": { "id": "G024BE91L", "name": "secretplans", "is_group": "true", "created": 1360782804, "creator": "U024BE7LH", "is_archived": false, "is_open": true, "last_read": "0000000000.000000", "latest": null, "unread_count": 0, "unread_count_display": 0, "members": [ "U024BE7LH" ], "topic": { "value": "Secret plans on hold", "creator": "U024BE7LV", "last_set": 1369677212 }, "purpose": { "value": "Discuss secret plans that no-one else should know", "creator": "U024BE7LH", "last_set": 1360782804 } } }
type GroupsHistoryResponse ¶
type GroupsHistoryResponse struct { OK bool `json:"ok"` Error string `json:"error"` Latest Time `json:"latest"` Messages []*Message `json:"group"` HasMore bool `json:"has_more"` }
https://api.slack.com/methods/groups.history
{ "ok": true, "latest": "1358547726.000003", "messages": [ { "type": "message", "ts": "1358546515.000008", "user": "U2147483896", "text": "Hello" }, { "type": "message", "ts": "1358546515.000007", "user": "U2147483896", "text": "World", "is_starred": true, }, { "type": "something_else", "ts": "1358546515.000007", "wibblr": true } ], "has_more": false }
type GroupsInfoResponse ¶
type GroupsInfoResponse struct { OK bool `json:"ok"` Error string `json:"error"` Group *Group `json:"group"` }
}, }
type GroupsInviteResponse ¶
type GroupsInviteResponse struct { OK bool `json:"ok"` Error string `json:"error"` AlreadyInGroup bool `json:"already_in_group"` Group *Group `json:"group"` }
https://api.slack.com/methods/groups.invite
{ "ok": true, "group": { }, }
{ "ok": true, "already_in_group": true, "group": {}, }
type GroupsListResponse ¶
type GroupsListResponse struct { OK bool `json:"ok"` Error string `json:"error"` Groups []*Group `json:"groups"` }
https://api.slack.com/methods/groups.list
{ "ok": true, "groups": [ { "id": "G024BE91L", "name": "secretplans", "created": 1360782804, "creator": "U024BE7LH", "is_archived": false, "members": [ "U024BE7LH" ], "topic": { "value": "Secret plans on hold", "creator": "U024BE7LV", "last_set": 1369677212 }, "purpose": { "value": "Discuss secret plans that no-one else should know", "creator": "U024BE7LH", "last_set": 1360782804 } } ] }
type GroupsOpenResponse ¶
type GroupsOpenResponse struct { OK bool `json:"ok"` Error string `json:"error"` NOOP bool `json:"no_op"` AlreadyOpen bool `json:"already_open"` }
https://api.slack.com/methods/groups.open
{ "ok": true }
{ "ok": true, "no_op": true, "already_open": true }
type GroupsRenameResponse ¶
type GroupsRenameResponse struct { OK bool `json:"ok"` Error string `json:"error"` Channel *Channel `json:"channel"` }
https://api.slack.com/methods/groups.rename
{ "ok": true, "channel": { "id": "C024BE91L", "is_group": true, "name": "new_name", "created": 1360782804 } }
type GroupsSetPurposeResponse ¶
type GroupsSetPurposeResponse struct { OK bool `json:"ok"` Error string `json:"error"` Purpose string `json:"purpose"` }
https://api.slack.com/methods/groups.setPurpose
{ "ok": true, "purpose": "This is the new purpose!" }
type GroupsSetTopicResponse ¶
type GroupsSetTopicResponse struct { OK bool `json:"ok"` Error string `json:"error"` Topic string `json:"topic"` }
https://api.slack.com/methods/groups.setTopic
{ "ok": true, "topic": "This is the new topic!" }
type HelloEvent ¶
type HelloEvent struct {
Type string `json:"type"`
}
https://api.slack.com/events/hello
{ "type": "hello" }
type IM ¶
type IM struct { ID string `json:"id"` IsIm bool `json:"is_im"` User string `json:"user"` Created Time `json:"created"` IsUserDeleted bool `json:"is_user_deleted"` }
https://api.slack.com/types/im
{ "id": "D024BFF1M", "is_im": true, "user": "U024BE7LH", "created": 1360782804, "is_user_deleted": false }
type ImCloseEvent ¶
type ImCloseEvent struct { Type string `json:"type"` User string `json:"user"` Channel string `json:"channel"` }
https://api.slack.com/events/im_close
{ "type": "im_close", "user": "U024BE7LH", "channel": "D024BE91L" }
type ImCloseResponse ¶
type ImCloseResponse struct { OK bool `json:"ok"` Error string `json:"error"` NOOP bool `json:"no_op"` AlreadyClosed bool `json:"already_closed"` }
https://api.slack.com/methods/im.close
{ "ok": true }
{ "ok": true, "no_op": true, "already_closed": true }
type ImCreatedEvent ¶
type ImCreatedEvent struct { Type string `json:"type"` Channel *Channel `json:"channel"` User string `json:"user"` }
https://api.slack.com/events/im_created
{ "type": "im_created", "user": "U024BE7LH", "channel": {} }
type ImHistoryChangedEvent ¶
type ImHistoryChangedEvent struct { Type string `json:"type"` Latest Time `json:"latest"` Timestamp Time `json:"ts"` EventTimestamp Time `json:"event_ts"` }
https://api.slack.com/events/im_history_changed
{ "type": "im_history_changed", "latest": "1358877455.000010", "ts": "1361482916.000003", "event_ts": "1361482916.000004" }
type ImHistoryResponse ¶
type ImHistoryResponse struct { OK bool `json:"ok"` Error string `json:"error"` Latest Time `json:"latest"` Messages []*Message `json:"group"` HasMore bool `json:"has_more"` }
https://api.slack.com/methods/im.history
{ "ok": true, "latest": "1358547726.000003", "messages": [ { "type": "message", "ts": "1358546515.000008", "user": "U2147483896", "text": "Hello" }, { "type": "message", "ts": "1358546515.000007", "user": "U2147483896", "text": "World", "is_starred": true, }, { "type": "something_else", "ts": "1358546515.000007", "wibblr": true } ], "has_more": false }
type ImListResponse ¶
type ImListResponse struct { OK bool `json:"ok"` Error string `json:"error"` IMs []*IM `json:"ims"` }
https://api.slack.com/methods/im.list
{ "ok": true, "ims": [ { "id": "D024BFF1M", "is_im": true, "user": "USLACKBOT", "created": 1372105335, "is_user_deleted": false }, { "id": "D024BE7RE", "is_im": true, "user": "U024BE7LH", "created": 1356250715, "is_user_deleted": false }, ] }
type ImMarkedEvent ¶
type ImMarkedEvent struct { Type string `json:"type"` Channel string `json:"channel"` Timestamp Time `json:"ts"` }
https://api.slack.com/events/im_marked
{ "type": "im_marked", "channel": "D024BE91L", "ts": "1401383885.000061" }
type ImOpenEvent ¶
type ImOpenEvent struct { Type string `json:"type"` User string `json:"user"` Channel string `json:"channel"` }
https://api.slack.com/events/im_open
{ "type": "im_open", "user": "U024BE7LH", "channel": "D024BE91L" }
type ImOpenResponse ¶
type ImOpenResponse struct { OK bool `json:"ok"` Error string `json:"error"` NOOP bool `json:"no_op"` AlreadyOpen bool `json:"already_open"` Channel *Channel `json:"channel"` }
https://api.slack.com/methods/im.open
{ "ok": true, "channel": { "id": "D024BFF1M" } }
{ "ok": true, "no_op": true, "already_open": true, "channel": { "id": "D024BFF1M" } }
type Item ¶
type Item struct { Type string `json:"type"` Channel json.RawMessage `json:"channel"` Message json.RawMessage `json:"message"` File json.RawMessage `json:"file"` Comment json.RawMessage `json:"comment"` Created Time `json:"created"` Reactions []struct { Name string `json:"name"` Count int `json:"count"` Users []string `json:"users"` } `json:"reactions"` Timestamp Time `json:"ts"` }
TODO: something
type Login ¶
type Login struct { Count int `json:"count"` Country string `json:"country"` DateFirst Time `json:"date_first"` DateLast Time `json:"date_last"` IP string `json:"ip"` Isp string `json:"isp"` Region string `json:"region"` UserAgent string `json:"user_agent"` UserID string `json:"user_id"` Username string `json:"username"` }
type MPIM ¶
type MPIM struct { ID string `json:"id"` Name string `json:"name"` IsMpim bool `json:"is_mpim"` IsGroup bool `json:"is_group"` Created Time `json:"created"` Creator string `json:"creator"` Members []string `json:"members"` LastRead Time `json:"last_read"` Latest *Message `json:"latest"` UnreadCount int `json:"unread_count"` UnreadCountDisplay int `json:"unread_count_display"` }
https://api.slack.com/types/mpim
{ "id": "G024BE91L", "name": "mpdm-user1--user2--user3-1", "is_mpim": true, "is_group": false, "created": 1360782804, "creator": "U024BE7LH", "members": [ "U024BE7LH" ], "last_read": "1401383885.000061", "latest": { … } "unread_count": 0, "unread_count_display": 0 }
type ManualPresenceChangeEvent ¶
type ManualPresenceChangeEvent struct { Type string `json:"type"` Presence Presence `json:"presence"` }
https://api.slack.com/events/manual_presence_change
{ "type": "manual_presence_change", "presence": "away" }
type MessageAttachment ¶
type MessageAttachment struct { AuthorIcon string `json:"author_icon,omitempty"` AuthorLink string `json:"author_link,omitempty"` AuthorName string `json:"author_name,omitempty"` Color string `json:"color,omitempty"` Fallback string `json:"fallback,omitempty"` Fields []*MessageAttachmentField `json:"fields,omitempty"` ImageURL string `json:"image_url,omitempty"` MarkdownIn []string `json:"mrkdwn_in,omitempty"` Pretext string `json:"pretext,omitempty"` Text string `json:"text,omitempty"` ThumbURL string `json:"thumb_url,omitempty"` Title string `json:"title,omitempty"` TitleLink string `json:"title_link,omitempty"` Timestamp int `json:"ts"` CallbackId string `json:"callback_id"` AttachmentType string `json:"attachment_type"` Actions []*MessageAttachmentAction `json:"actions"` }
https://api.slack.com/docs/attachments
{ "fallback": "Required plain-text summary of the attachment.", "color": "#36a64f", "pretext": "Optional text that appears above the attachment block", "author_name": "Bobby Tables", "author_link": "http://flickr.com/bobby/", "author_icon": "http://flickr.com/icons/bobby.jpg", "title": "Slack API Documentation", "title_link": "https://api.slack.com/", "text": "Optional text that appears within the attachment", "fields": [ { "title": "Priority", "value": "High", "short": false } ], "image_url": "http://my-website.com/path/to/image.jpg", "thumb_url": "http://example.com/path/to/thumb.png", "footer": "Slack API", "footer_icon": "https://platform.slack-edge.com/img/default_application_icon.png", "ts": 123456789 }
type MessageAttachmentAction ¶
type MessageAttachmentAction struct { Name string `json:"name,omitempty"` Text string `json:"text,omitempty"` Style string `json:"style,omitempty"` Type string `json:"type,omitempty"` Value string `json:"value,omitempty"` Confirm *MessageAttachmentActionConfirm }
adding for button support
type MessageAttachmentField ¶
type MessageEvent ¶
type MessageEvent struct { Type string `json:"type"` Channel string `json:"channel"` User string `json:"user"` Text string `json:"text"` Timestamp Time `json:"ts"` IsStarred bool `json:"is_starred"` PinnedTo []string `json:"pinned_to"` Reactions []struct { Count int `json:"count"` Name string `json:"name"` Users []string `json:"users"` } `json:"reactions"` Edited struct { User string `json:"user"` Timestamp Time `json:"ts"` } }
https://api.slack.com/events/message
{ "type": "message", "channel": "C2147483705", "user": "U2147483697", "text": "Hello world", "ts": "1355517523.000005" "is_starred": true, "pinned_to": ["C024BE7LT"], "reactions": [ { "name": "astonished", "count": 3, "users": [ "U1", "U2", "U3" ] }, { "name": "facepalm", "count": 1034, "users": [ "U1", "U2", "U3", "U4", "U5" ] } ], "edited": { "user": "U2147483697", "ts": "1355517536.000001" } }
type MessageSubtypeBotMessageEvent ¶
type MessageSubtypeBotMessageEvent struct { Type string `json:"type"` Subtype string `json:"subtype"` Timestamp Time `json:"ts"` Text string `json:"text"` BotID string `json:"bot_id"` Username string `json:"username"` Icons map[string]string `json:"icons"` }
https://api.slack.com/events/message/bot_message
{ "type": "message", "subtype": "bot_message", "ts": "1358877455.000010", "text": "Pushing is the answer", "bot_id": "BB12033", "username": "github", "icons": {} }
type MessageSubtypeChannelArchiveEvent ¶
type MessageSubtypeChannelArchiveEvent struct { Type string `json:"type"` Subtype string `json:"subtype"` Timestamp Time `json:"ts"` Text string `json:"text"` User string `json:"user"` Members []string `json:"members"` }
https://api.slack.com/events/message/channel_archive
{ "type": "message", "subtype": "channel_archive", "ts": "1361482916.000003", "text": "<U1234|@cal> archived the channel", "user": "U1234", "members": ["U1234", "U5678"] }
type MessageSubtypeChannelJoinEvent ¶
type MessageSubtypeChannelJoinEvent struct { Type string `json:"type"` Subtype string `json:"subtype"` Timestamp Time `json:"ts"` User string `json:"user"` Text string `json:"text"` }
https://api.slack.com/events/message/channel_join
{ "type": "message", "subtype": "channel_join", "ts": "1358877458.000011", "user": "U2147483828", "text": "<@U2147483828|cal> has joined the channel" }
type MessageSubtypeChannelLeaveEvent ¶
type MessageSubtypeChannelLeaveEvent struct { Type string `json:"type"` Subtype string `json:"subtype"` Timestamp Time `json:"ts"` User string `json:"user"` Text string `json:"text"` }
https://api.slack.com/events/message/channel_leave
{ "type": "message", "subtype": "channel_leave", "ts": "1358877455.000010", "user": "U2147483828", "text": "<@U2147483828|cal> has left the channel" }
type MessageSubtypeChannelNameEvent ¶
type MessageSubtypeChannelNameEvent struct { Type string `json:"type"` Subtype string `json:"subtype"` Timestamp Time `json:"ts"` User string `json:"user"` OldName string `json:"old_name"` NewName string `json:"name"` Text string `json:"text"` }
https://api.slack.com/events/message/channel_name
{ "type": "message", "subtype": "channel_name", "ts": "1358877455.000010", "user": "U2147483828", "old_name": "random", "name": "watercooler", "text": "<@U2147483828|cal> has renamed the channek from \"random\" to \"watercooler\"" }
type MessageSubtypeChannelPurposeEvent ¶
type MessageSubtypeChannelPurposeEvent struct { Type string `json:"type"` Subtype string `json:"subtype"` Timestamp Time `json:"ts"` User string `json:"user"` Purpose string `json:"purpose"` Text string `json:"text"` }
https://api.slack.com/events/message/channel_purpose
{ "type": "message", "subtype": "channel_purpose", "ts": "1358877455.000010", "user": "U2147483828", "purpose": "whatever", "text": "<@U2147483828|cal> set the channel purpose: whatever" }
type MessageSubtypeChannelTopicEvent ¶
type MessageSubtypeChannelTopicEvent struct { Type string `json:"type"` Subtype string `json:"subtype"` Timestamp Time `json:"ts"` User string `json:"user"` Topic string `json:"topic"` Text string `json:"text"` }
https://api.slack.com/events/message/channel_topic
{ "type": "message", "subtype": "channel_topic", "ts": "1358877455.000010", "user": "U2147483828", "topic": "hello world", "text": "<@U2147483828|cal> set the channel topic: hello world" }
type MessageSubtypeChannelUnarchiveEvent ¶
type MessageSubtypeChannelUnarchiveEvent struct { Type string `json:"type"` Subtype string `json:"subtype"` Timestamp Time `json:"ts"` Text string `json:"text"` User string `json:"user"` }
https://api.slack.com/events/message/channel_unarchive
{ "type": "message", "subtype": "channel_unarchive", "ts": "1361482916.000003", "text": "<U1234|@cal> un-archived the channel", "user": "U1234" }
type MessageSubtypeFileCommentEvent ¶
type MessageSubtypeFileCommentEvent struct { Type string `json:"type"` Subtype string `json:"subtype"` Timestamp Time `json:"ts"` Text string `json:"text"` File *File `json:"file"` Comment *Comment `json:"comment"` }
https://api.slack.com/events/message/file_comment
{ "type": "message", "subtype": "file_comment", "ts": "1361482916.000003", "text": "<@cal> commented on a file: ...", "file": {}, "comment": {} }
type MessageSubtypeFileMentionEvent ¶
type MessageSubtypeFileMentionEvent struct { Type string `json:"type"` Subtype string `json:"subtype"` Timestamp Time `json:"ts"` Text string `json:"text"` File *File `json:"file"` User string `json:"user"` }
https://api.slack.com/events/message/file_mention
{ "type": "message", "subtype": "file_mention", "ts": "1358877455.000010", "text": "<@cal> mentioned a file: <https:...7.png|7.png>", "file": {}, "user": "U2147483697" }
type MessageSubtypeFileShareEvent ¶
type MessageSubtypeFileShareEvent struct {}
https://api.slack.com/events/message/file_share
{ "type": "message", "subtype": "file_share", "ts": "1358877455.000010", "text": "<@cal> uploaded a file: <https:...7.png|7.png>", "file": {}, "user": "U2147483697", "upload": true }
type MessageSubtypeGroupArchiveEvent ¶
type MessageSubtypeGroupArchiveEvent struct { Type string `json:"type"` Subtype string `json:"subtype"` Timestamp Time `json:"ts"` Text string `json:"text"` User string `json:"user"` Members []string `json:"members"` }
https://api.slack.com/events/message/group_archive
{ "type": "message", "subtype": "group_archive", "ts": "1361482916.000003", "text": "<U1234|@cal> archived the group", "user": "U1234", "members": ["U1234", "U5678"] }
type MessageSubtypeGroupJoinEvent ¶
type MessageSubtypeGroupJoinEvent struct { Type string `json:"type"` Subtype string `json:"subtype"` Timestamp Time `json:"ts"` User string `json:"user"` Text string `json:"text"` }
https://api.slack.com/events/message/group_join
{ "type": "message", "subtype": "group_join", "ts": "1358877458.000011", "user": "U2147483828", "text": "<@U2147483828|cal> has joined the group" }
type MessageSubtypeGroupLeaveEvent ¶
type MessageSubtypeGroupLeaveEvent struct { Type string `json:"type"` Subtype string `json:"subtype"` Timestamp Time `json:"ts"` User string `json:"user"` Text string `json:"text"` }
https://api.slack.com/events/message/group_leave
{ "type": "message", "subtype": "group_leave", "ts": "1358877455.000010", "user": "U2147483828", "text": "<@U2147483828|cal> has left the group" }
type MessageSubtypeGroupNameEvent ¶
type MessageSubtypeGroupNameEvent struct { Type string `json:"type"` Subtype string `json:"subtype"` Timestamp Time `json:"ts"` User string `json:"user"` OldName string `json:"old_name"` NewName string `json:"name"` Text string `json:"text"` }
https://api.slack.com/events/message/group_name
{ "type": "message", "subtype": "group_name", "ts": "1358877455.000010", "user": "U2147483828", "old_name": "random", "name": "watercooler", "text": "<@U2147483828|cal> has renamed the group from \"random\" to \"watercooler\"" }
type MessageSubtypeGroupPurposeEvent ¶
type MessageSubtypeGroupPurposeEvent struct { Type string `json:"type"` Subtype string `json:"subtype"` Timestamp Time `json:"ts"` User string `json:"user"` Purpose string `json:"purpose"` Text string `json:"text"` }
https://api.slack.com/events/message/group_purpose
{ "type": "message", "subtype": "group_purpose", "ts": "1358877455.000010", "user": "U2147483828", "purpose": "whatever", "text": "<@U2147483828|cal> set the group purpose: whatever" }
type MessageSubtypeGroupTopicEvent ¶
type MessageSubtypeGroupTopicEvent struct { Type string `json:"type"` Subtype string `json:"subtype"` Timestamp Time `json:"ts"` User string `json:"user"` Topic string `json:"topic"` Text string `json:"text"` }
https://api.slack.com/events/message/group_topic
{ "type": "message", "subtype": "group_topic", "ts": "1358877455.000010", "user": "U2147483828", "topic": "hello world", "text": "<@U2147483828|cal> set the group topic: hello world" }
type MessageSubtypeGroupUnarchiveEvent ¶
type MessageSubtypeGroupUnarchiveEvent struct { Type string `json:"type"` Subtype string `json:"subtype"` Timestamp Time `json:"ts"` Text string `json:"text"` User string `json:"user"` }
https://api.slack.com/events/message/group_unarchive
{ "type": "message", "subtype": "group_unarchive", "ts": "1361482916.000003", "text": "<U1234|@cal> un-archived the group", "user": "U1234" }
type MessageSubtypeMeMessageEvent ¶
type MessageSubtypeMeMessageEvent struct { Type string `json:"type"` Subtype string `json:"subtype"` Channel string `json:"channel"` User string `json:"user"` Text string `json:"text"` Timestamp Time `json:"ts"` }
https://api.slack.com/events/message/me_message
{ "type": "message", "subtype": "me_message", "channel": "C2147483705", "user": "U2147483697", "text": "is doing that thing", "ts": "1355517523.000005" }
type MessageSubtypeMessageChangedEvent ¶
type MessageSubtypeMessageChangedEvent struct { Type string `json:"type"` Subtype string `json:"subtype"` Hidden bool `json:"hidden"` Channel string `json:"channel"` Timestamp Time `json:"ts"` Message struct { Type string `json:"type"` User string `json:"user"` Text string `json:"text"` Timestamp Time `json:"ts"` Edited struct { Timestamp Time `json:"ts"` User string `json:"user"` } `json:"edited"` } `json:"message"` }
https://api.slack.com/events/message/message_changed
{ "type": "message", "subtype": "message_changed", "hidden": true, "channel": "C2147483705", "ts": "1358878755.000001", "message": { "type": "message", "user": "U2147483697", "text": "Hello, world!", "ts": "1355517523.000005", "edited": { "user": "U2147483697", "ts": "1358878755.000001" } } }
type MessageSubtypeMessageDeletedEvent ¶
type MessageSubtypeMessageDeletedEvent struct { Type string `json:"type"` Subtype string `json:"subtype"` Hidden bool `json:"hidden"` Channel string `json:"channel"` Timestamp Time `json:"ts"` DeletedTimestamp Time `json:"deleted_ts"` }
https://api.slack.com/events/message/message_deleted
{ "type": "message", "subtype": "message_deleted", "hidden": true, "channel": "C2147483705", "ts": "1358878755.000001", "deleted_ts": "1358878749.000002" }
type MessageSubtypePinnedItemEvent ¶
type MessageSubtypePinnedItemEvent struct { Type string `json:"type"` Subtype string `json:"subtype"` User string `json:"user"` ItemType string `json:"item_type"` Text string `json:"text"` Item *Item `json:"item"` Channel string `json:"channel"` Timestamp Time `json:"ts"` }
https://api.slack.com/events/message/pinned_item
{ "type": "message", "subtype": "pinned_item", "user": "U024BE7LH", "item_type": "F", "text": "<@U024BE7LH|cal> pinned their Image <https:...7.png|7.png> to this channel.", "item": {}, "channel": "C02ELGNBH", "ts": "1360782804.083113" }
type MessageSubtypeUnpinnedItemEvent ¶
type MessageSubtypeUnpinnedItemEvent struct { Type string `json:"type"` Subtype string `json:"subtype"` User string `json:"user"` ItemType string `json:"item_type"` Text string `json:"text"` Item *Item `json:"item"` Channel string `json:"channel"` Timestamp Time `json:"ts"` }
https://api.slack.com/events/message/unpinned_item
{ "type": "message", "subtype": "unpinned_item", "user": "USLACKBOT", "item_type": "G", "text": "<@U024BE7LH|cal> unpinned the message you pinned to the secretplans group.", "item": {}, "channel": "G024BE91L", "ts": "1360782804.083113" }
type Method ¶
type Method string
const ( ApiTestMethod Method = `api.test` AuthTestMethod Method = `auth.test` ChannelsArchiveMethod Method = `channels.archive` ChannelsCreateMethod Method = `channels.create` ChannelsHistoryMethod Method = `channels.history` ChannelsInfoMethod Method = `channels.info` ChannelsInviteMethod Method = `channels.invite` ChannelsJoinMethod Method = `channels.join` ChannelsKickMethod Method = `channels.kick` ChannelsLeaveMethod Method = `channels.leave` ChannelsListMethod Method = `channels.list` ChannelsMarkMethod Method = `channels.mark` ChannelsRenameMethod Method = `channels.rename` ChannelsSetPurposeMethod Method = `channels.setPurpose` ChannelsSetTopicMethod Method = `channels.setTopic` ChannelsUnarchiveMethod Method = `channels.unarchive` ChatDeleteMethod Method = `chat.delete` ChatPostMessageMethod Method = `chat.postMessage` ChatUpdateMethod Method = `chat.update` DndEndDndMethod Method = `dnd.endDnd` DndEndSnoozeMethod Method = `dnd.endSnooze` DndInfoMethod Method = `dnd.info` DndSetSnoozeMethod Method = `dnd.setSnooze` DndTeamInfoMethod Method = `dnd.teamInfo` EmojiListMethod Method = `emoji.list` FilesCommentsAddMethod Method = `files.comments.add` FilesCommentsDeleteMethod Method = `files.comments.delete` FilesCommentsEditMethod Method = `files.comments.edit` FilesDeleteMethod Method = `files.delete` FilesInfoMethod Method = `files.info` FilesListMethod Method = `files.list` FilesUploadMethod Method = `files.upload` GroupsArchiveMethod Method = `groups.archive` GroupsCloseMethod Method = `groups.close` GroupsCreateMethod Method = `groups.create` GroupsCreateChildMethod Method = `groups.createChild` GroupsHistoryMethod Method = `groups.history` GroupsInfoMethod Method = `groups.info` GroupsInviteMethod Method = `groups.invite` GroupsKickMethod Method = `groups.kick` GroupsLeaveMethod Method = `groups.leave` GroupsListMethod Method = `groups.list` GroupsMarkMethod Method = `groups.mark` GroupsOpenMethod Method = `groups.open` GroupsRenameMethod Method = `groups.rename` GroupsSetPurposeMethod Method = `groups.setPurpose` GroupsSetTopicMethod Method = `groups.setTopic` GroupsUnarchiveMethod Method = `groups.unarchive` ImCloseMethod Method = `im.close` ImHistoryMethod Method = `im.history` ImListMethod Method = `im.list` ImMarkMethod Method = `im.mark` ImOpenMethod Method = `im.open` MpimCloseMethod Method = `mpim.close` MpimHistoryMethod Method = `mpim.history` MpimListMethod Method = `mpim.list` MpimMarkMethod Method = `mpim.mark` MpimOpenMethod Method = `mpim.open` OauthAccessMethod Method = `oauth.access` PinsAddMethod Method = `pins.add` PinsListMethod Method = `pins.list` PinsRemoveMethod Method = `pins.remove` ReactionsAddMethod Method = `reactions.add` ReactionsGetMethod Method = `reactions.get` ReactionsListMethod Method = `reactions.list` ReactionsRemoveMethod Method = `reactions.remove` RTMStartMethod Method = `rtm.start` SearchAllMethod Method = `search.all` SearchFilesMethod Method = `search.files` SearchMessagesMethod Method = `search.messages` StarsAddMethod Method = `stars.add` StarsListMethod Method = `stars.list` StarsRemoveMethod Method = `stars.remove` TeamAccessLogsMethod Method = `team.accessLogs` TeamInfoMethod Method = `team.info` TeamIntegrationLogsMethod Method = `team.integrationLogs` UsergroupsCreateMethod Method = `usergroups.create` UsergroupsDisableMethod Method = `usergroups.disable` UsergroupsEnableMethod Method = `usergroups.enable` UsergroupsListMethod Method = `usergroups.list` UsergroupsUpdateMethod Method = `usergroups.update` UsergroupsUsersListMethod Method = `usergroups.users.list` UsergroupsUsersUpdateMethod Method = `usergroups.users.update` UsersGetPresenceMethod Method = `users.getPresence` UsersInfoMethod Method = `users.info` UsersListMethod Method = `users.list` UsersSetActiveMethod Method = `users.setActive` UsersSetPresenceMethod Method = `users.setPresence` )
type MpimCloseResponse ¶
type MpimCloseResponse struct { OK bool `json:"ok"` Error string `json:"error"` NOOP bool `json:"no_op"` AlreadyClosed bool `json:"already_closed"` }
https://api.slack.com/methods/mpim.close
{ "ok": true }
{ "ok": true, "no_op": true, "already_closed": true }
type MpimHistoryResponse ¶
type MpimHistoryResponse struct { OK bool `json:"ok"` Error string `json:"error"` Latest Time `json:"latest"` Messages []*Message `json:"group"` HasMore bool `json:"has_more"` }
https://api.slack.com/methods/mpim.history
{ "ok": true, "latest": "1358547726.000003", "messages": [ { "type": "message", "ts": "1358546515.000008", "user": "U2147483896", "text": "Hello" }, { "type": "message", "ts": "1358546515.000007", "user": "U2147483896", "text": "World", "is_starred": true, }, { "type": "something_else", "ts": "1358546515.000007", "wibblr": true } ], "has_more": false }
type MpimListResponse ¶
type MpimListResponse struct { OK bool `json:"ok"` Error string `json:"error"` Groups []*Group `json:"groups"` }
https://api.slack.com/methods/mpim.list
{ "ok": true, "groups": [ { "id": "G024BE91L", "name": "dm-messaging-user-1", "created": 1360782804, "creator": "U024BE7LH", "is_archived": false, "is_mpim": true "members": [ "U024BE7LH", "U1234567890", "U2345678901", "U3456789012" ], "topic": { "value": "Group messaging.", "creator": "U024BE7LH", "last_set": 1360782804 }, "purpose": { "value": "Group messaging with: @user @user_a @user_b @user_c", "creator": "U024BE7LH", "last_set": 1360782804 } } ] }
type MpimOpenResponse ¶
type MpimOpenResponse struct { OK bool `json:"ok"` Error string `json:"error"` Group *Group `json:"group"` }
https://api.slack.com/methods/mpim.open
{ "ok": true, "group": { "id": "G024BE91L", "name": "mpdm-user--user_a--user_b--user_c-1", "is_group": "true", "created": 1360782804, "creator": "U024BE7LH", "is_archived": false, "is_open": false, "is_mpim": true, "last_read": "0000000000.000000", "latest": null, "unread_count": 0, "unread_count_display": 0, "members": [ "U024BE7LH", "U1234567890", "U2345678901", "U3456789012" ], "topic": { "value": "Group messaging.", "creator": "U024BE7LH", "last_set": 1360782804 }, "purpose": { "value": "Group messaging with: @user @user_a @user_b @user_c", "creator": "U024BE7LH", "last_set": 1360782804 } } }
type OauthAccessResponse ¶
type OauthAccessResponse struct { AccessToken string `json:"access_token"` Scope string `json:"scope"` }
https://api.slack.com/methods/oauth.access
{ "access_token": "xoxt-23984754863-2348975623103", "scope": "read" }
type PinAddedEvent ¶
type PinAddedEvent struct { Type string `json:"type"` User string `json:"user"` ChannelID string `json:"channel_id"` EventTimestamp Time `json:"event_ts"` Item *Item `json:"item"` }
https://api.slack.com/events/pin_added
{ "type": "pin_added", "user": "U024BE7LH", "channel_id": "C02ELGNBH", "item": {}, "event_ts": "1360782804.083113" }
type PinRemovedEvent ¶
type PinRemovedEvent struct { Type string `json:"type"` User string `json:"user"` ChannelID string `json:"channel_id"` Item *Item `json:"item"` HasPins bool `json:"has_pins"` EventTimestamp Time `json:"event_ts"` }
https://api.slack.com/events/pin_removed
{ "type": "pin_removed", "user": "U024BE7LH", "channel_id": "C02ELGNBH", "item": {}, "has_pins": false, "event_ts": "1360782804.083113" }
type PinsListResponse ¶
type PinsListResponse struct { OK bool `json:"ok"` Error string `json:"error"` Items []*Item `json:"items"` }
https://api.slack.com/methods/pins.list
{ "ok": true, "items": [ { "type": "message", "channel": "C2147483705", "message": {...}, }, { "type": "file", "file": { ... }, } { "type": "file_comment", "file": { ... }, "comment": { ... }, } ] }
type PrefChangeEvent ¶
type PrefChangeEvent struct { Type string `json:"type"` Name string `json:"name"` Value interface{} `json:"value"` }
https://api.slack.com/events/pref_change
{ "type": "pref_change", "name": "messages_theme", "value": "dense" }
type PresenceChangeEvent ¶
type PresenceChangeEvent struct { Type string `json:"type"` User string `json:"user"` Presence Presence `json:"presence"` }
https://api.slack.com/events/presence_change
{ "type": "presence_change", "user": "U024BE7LH", "presence": "away" }
type RTMClient ¶
type RTMClient struct { Response *RTMStartResponse Events struct { AccountsChanged chan *AccountsChangedEvent BotAdded chan *BotAddedEvent BotChanged chan *BotChangedEvent ChannelArchive chan *ChannelArchiveEvent ChannelCreated chan *ChannelCreatedEvent ChannelDeleted chan *ChannelDeletedEvent ChannelHistoryChanged chan *ChannelHistoryChangedEvent ChannelJoined chan *ChannelJoinedEvent ChannelLeft chan *ChannelLeftEvent ChannelMarked chan *ChannelMarkedEvent ChannelRename chan *ChannelRenameEvent ChannelUnarchive chan *ChannelUnarchiveEvent CommandsChanged chan *CommandsChangedEvent DndUpdated chan *DndUpdatedEvent DndUpdatedUser chan *DndUpdatedUserEvent EmailDomainChanged chan *EmailDomainChangedEvent EmojiChanged chan *EmojiChangedEvent FileChange chan *FileChangeEvent FileCommentAdded chan *FileCommentAddedEvent FileCommentDeleted chan *FileCommentDeletedEvent FileCommentEdited chan *FileCommentEditedEvent FileCreated chan *FileCreatedEvent FileDeleted chan *FileDeletedEvent FilePrivate chan *FilePrivateEvent FilePublic chan *FilePublicEvent FileShared chan *FileSharedEvent FileUnshared chan *FileUnsharedEvent GroupArchive chan *GroupArchiveEvent GroupClose chan *GroupCloseEvent GroupHistoryChanged chan *GroupHistoryChangedEvent GroupJoined chan *GroupJoinedEvent GroupLeft chan *GroupLeftEvent GroupMarked chan *GroupMarkedEvent GroupOpen chan *GroupOpenEvent GroupRename chan *GroupRenameEvent GroupUnarchive chan *GroupUnarchiveEvent Hello chan *HelloEvent ImClose chan *ImCloseEvent ImCreated chan *ImCreatedEvent ImHistoryChanged chan *ImHistoryChangedEvent ImMarked chan *ImMarkedEvent ImOpen chan *ImOpenEvent ManualPresenceChange chan *ManualPresenceChangeEvent Message chan *MessageEvent PinAdded chan *PinAddedEvent PinRemoved chan *PinRemovedEvent PrefChange chan *PrefChangeEvent PresenceChange chan *PresenceChangeEvent ReactionAdded chan *ReactionAddedEvent ReactionRemoved chan *ReactionRemovedEvent ReconnectUrl chan *ReconnectUrlEvent StarAdded chan *StarAddedEvent StarRemoved chan *StarRemovedEvent SubteamCreated chan *SubteamCreatedEvent SubteamSelfAdded chan *SubteamSelfAddedEvent SubteamSelfRemoved chan *SubteamSelfRemovedEvent SubteamUpdated chan *SubteamUpdatedEvent TeamDomainChange chan *TeamDomainChangeEvent TeamJoin chan *TeamJoinEvent TeamMigrationStarted chan *TeamMigrationStartedEvent TeamPlanChange chan *TeamPlanChangeEvent TeamPrefChange chan *TeamPrefChangeEvent TeamProfileChange chan *TeamProfileChangeEvent TeamProfileDelete chan *TeamProfileDeleteEvent TeamProfileReorder chan *TeamProfileReorderEvent TeamRename chan *TeamRenameEvent UserChange chan *UserChangeEvent UserTyping chan *UserTypingEvent MessageSubtypeBotMessage chan *MessageSubtypeBotMessageEvent MessageSubtypeMeMessage chan *MessageSubtypeMeMessageEvent MessageSubtypeMessageChanged chan *MessageSubtypeMessageChangedEvent MessageSubtypeMessageDeleted chan *MessageSubtypeMessageDeletedEvent MessageSubtypeChannelJoin chan *MessageSubtypeChannelJoinEvent MessageSubtypeChannelLeave chan *MessageSubtypeChannelLeaveEvent MessageSubtypeChannelTopic chan *MessageSubtypeChannelTopicEvent MessageSubtypeChannelPurpose chan *MessageSubtypeChannelPurposeEvent MessageSubtypeChannelName chan *MessageSubtypeChannelNameEvent MessageSubtypeChannelArchive chan *MessageSubtypeChannelArchiveEvent MessageSubtypeChannelUnarchive chan *MessageSubtypeChannelUnarchiveEvent MessageSubtypeGroupJoin chan *MessageSubtypeGroupJoinEvent MessageSubtypeGroupLeave chan *MessageSubtypeGroupLeaveEvent MessageSubtypeGroupTopic chan *MessageSubtypeGroupTopicEvent MessageSubtypeGroupPurpose chan *MessageSubtypeGroupPurposeEvent MessageSubtypeGroupName chan *MessageSubtypeGroupNameEvent MessageSubtypeGroupArchive chan *MessageSubtypeGroupArchiveEvent MessageSubtypeGroupUnarchive chan *MessageSubtypeGroupUnarchiveEvent MessageSubtypeFileShare chan *MessageSubtypeFileShareEvent MessageSubtypeFileComment chan *MessageSubtypeFileCommentEvent MessageSubtypeFileMention chan *MessageSubtypeFileMentionEvent MessageSubtypePinnedItem chan *MessageSubtypePinnedItemEvent MessageSubtypeUnpinnedItem chan *MessageSubtypeUnpinnedItemEvent Unrecognized chan UnrecognizedEvent Error chan error } // contains filtered or unexported fields }
type RTMStartResponse ¶
type RTMStartResponse struct { OK bool `json:"ok"` Error string `json:"error"` URL string `json:"url"` }
https://api.slack.com/methods/rtm.start
{ "ok": true, "url": "wss:\/\/ms9.slack-msgs.com\/websocket\/7I5yBpcvk", "self": { "id": "U023BECGF", "name": "bobby", "prefs": {}, "created": 1402463766, "manual_presence": "active" }, "team": { "id": "T024BE7LD", "name": "Example Team", "email_domain": "", "domain": "example", "icon": {}, "msg_edit_window_mins": -1, "over_storage_limit": false "prefs": {}, "plan": "std" }, "users": [ ], "channels": [ ], "groups": [ ], "mpims": [ ], "ims": [ ], "bots": [ ], }
type ReactionAddedEvent ¶
type ReactionAddedEvent struct { Type string `json:"type"` User string `json:"user"` Name string `json:"name"` Item *Item `json:"item"` EventTimestamp Time `json:"event_ts"` }
https://api.slack.com/events/reaction_added
{ "type": "reaction_added", "user": "U024BE7LH", "name": "thumbsup", "item": {"a":"b"}, "event_ts": "1360782804.083113" }
type ReactionRemovedEvent ¶
type ReactionRemovedEvent struct { Type string `json:"type"` User string `json:"user"` Name string `json:"name"` Item map[string]string `json:"item"` EventTimestamp Time `json:"event_ts"` }
https://api.slack.com/events/reaction_removed
{ "type": "reaction_removed", "user": "U024BE7LH", "name": "thumbsup", "item": {"a":"b"}, "event_ts": "1360782804.083113" }
type ReactionsGetResponse ¶
type ReactionsGetResponse struct { OK bool `json:"ok"` Error string `json:"error"` Type string `json:"type"` Channel string `json:"channel"` Message *Message `json:"message"` }
https://api.slack.com/methods/reactions.get
{ "type": "message", "channel": "C2147483705", "message": { ... "reactions": [ { "name": "astonished", "count": 3, "users": [ "U1", "U2", "U3" ] }, { "name": "clock1" "count": 2, "users": [ "U1", "U2", "U3" ] } ] }, },
type ReactionsListResponse ¶
type ReactionsListResponse struct { OK bool `json:"ok"` Error string `json:"error"` Items []*Item `json:"items"` Paging struct { Count int `json:"count"` Page int `json:"page"` Pages int `json:"pages"` Total int `json:"total"` } `json:"paging"` }
https://api.slack.com/methods/reactions.list
{ "ok": true, "items": [ { "type": "message", "channel": "C2147483705", "message": { ... "reactions": [ { "name": "astonished", "count": 3, "users": [ "U1", "U2", "U3" ] }, { "name": "clock1" "count": 2, "users": [ "U1", "U2", "U3" ] } ] }, }, { "type": "file", "file": { ... }, "reactions": [ { "name": "thumbsup", "count": 1, "users": [ "U1" ] } ] } { "type": "file_comment", "file": { ... }, "comment": { ... }, "reactions": [ { "name": "facepalm", "count": 1034, "users": [ "U1", "U2", "U3", "U4", "U5" ] } ] } ], "paging": { "count": 100, "total": 4, "page": 1, "pages": 1 } }
type ReconnectUrlEvent ¶
type ReconnectUrlEvent struct {
Type string `json:"type"`
}
https://api.slack.com/events/reconnect_url
{ "type": "reconnect_url" }
type ResultMessage ¶
type ResultMessage struct { Type string `json:"type"` Channel struct { ID string `json:"id"` Name string `json:"name"` } `json:"channel"` Next struct { Text string `json:"text"` Timestamp Time `json:"ts"` Type string `json:"type"` User string `json:"user"` Username string `json:"username"` } `json:"next"` Next2 struct { Text string `json:"text"` Timestamp Time `json:"ts"` Type string `json:"type"` User string `json:"user"` Username string `json:"username"` } `json:"next_2"` Permalink string `json:"permalink"` Previous struct { Text string `json:"text"` Timestamp Time `json:"ts"` Type string `json:"type"` User string `json:"user"` Username string `json:"username"` } `json:"previous"` Previous2 struct { Text string `json:"text"` Timestamp Time `json:"ts"` Type string `json:"type"` User string `json:"user"` Username string `json:"username"` } `json:"previous_2"` Text string `json:"text"` Timestamp Time `json:"ts"` User string `json:"user"` Username string `json:"username"` }
type SearchAllResponse ¶
type SearchAllResponse struct { OK bool `json:"ok"` Error string `json:"error"` Query string `json:"query"` Files struct { Matches []*File `json:"matches"` Paging struct { Count int `json:"count"` Page int `json:"page"` Pages int `json:"pages"` Total int `json:"total"` } `json:"paging"` } `json:"files"` Messages struct { Matches []*Message `json:"matches"` Paging struct { Count int `json:"count"` Page int `json:"page"` Pages int `json:"pages"` Total int `json:"total"` } `json:"paging"` } `json:"messages"` }
https://api.slack.com/methods/search.all
{ "ok": true, "query": "Best Pickles", "messages": {...}, "files": {...} }
{ "matches": [], "paging": { "count": 100, - number of records per page "total": 15, - total records matching query "page": 1, - page of records returned "pages": 1 - total pages matching query } }
type SearchFilesResponse ¶
type SearchFilesResponse struct { OK bool `json:"ok"` Error string `json:"error"` Query string `json:"query"` Files struct { Total int `json:"total"` Paging struct { Count int `json:"count"` Page int `json:"page"` Pages int `json:"pages"` Total int `json:"total"` } `json:"paging"` Matches []*File `json:"matches"` } `json:"files"` }
https://api.slack.com/methods/search.files
{ "ok": true, "query": "test", "files": { "total": 829, "paging": { "count": 20, "total": 829, "page": 1, "pages": 42 }, "matches": [ {...}, {...}, {...} ] } }
type SearchMessagesResponse ¶
type SearchMessagesResponse struct { OK bool `json:"ok"` Error string `json:"error"` Query string `json:"query"` Messages struct { Total int `json:"total"` Paging struct { Count int `json:"count"` Page int `json:"page"` Pages int `json:"pages"` Total int `json:"total"` } `json:"paging"` Matches []*ResultMessage `json:"matches"` } `json:"messages"` }
https://api.slack.com/methods/search.messages
{ "ok": true, "query": "test", "messages": { "total": 829, "paging": { "count": 20, "total": 829, "page": 1, "pages": 42 }, "matches": [ {...}, {...}, {...} ] } }
{ "type": "message", "channel": { "id": "C2147483753", "name": "foo" }, "user": "U2147483709", "username": "johnnytest", "ts": "1359414002.000003", "text": "mention test: johnnyrodgers". "permalink": "https:\/\/example.slack.com\/channels\/foo\/p1359414002000003", "previous_2": { "user": "U2147483709", "username": "johnnytest", "text": "This was said before before", "ts": "1359413987.000000", "type": "message" }, "previous": { "user": "U2147483709", "username": "johnnytest", "text": "This was said before", "ts": "1359414001.000000", "type": "message" }, "next": { "user": "U2147483709", "username": "johnnytest", "text": "This was said after", "ts": "1359414020.000000", "type": "message" }, "next_2": { "user": "U2147483709", "username": "johnnytest", "text": "This was said after after", "ts": "1359414021.000000", "type": "message" } }
type StarAddedEvent ¶
type StarAddedEvent struct { Type string `json:"type"` User string `json:"user"` Item *Item `json:"item"` EventTimestamp Time `json:"event_ts"` }
https://api.slack.com/events/star_added
{ "type": "star_added", "user": "U024BE7LH", "item": {}, "event_ts": "1360782804.083113" }
type StarRemovedEvent ¶
type StarRemovedEvent struct { Type string `json:"type"` User string `json:"user"` Item *Item `json:"item"` EventTimestamp Time `json:"event_ts"` }
https://api.slack.com/events/star_removed
{ "type": "star_removed", "user": "U024BE7LH", "item": {}, "event_ts": "1360782804.083113" }
type StarsListResponse ¶
type StarsListResponse struct { OK bool `json:"ok"` Error string `json:"error"` Items []*Item `json:"items"` Paging struct { Count int `json:"count"` Page int `json:"page"` Pages int `json:"pages"` Total int `json:"total"` } `json:"paging"` }
https://api.slack.com/methods/stars.list
{ "ok": true, "items": [ { "type": "message", "channel": "C2147483705", "message": {...} }, { "type": "file", "file": { ... } } { "type": "file_comment", "file": { ... }, "comment": { ... } } { "type": "channel", "channel": "C2147483705" } ], "paging": { "count": 100, "total": 4, "page": 1, "pages": 1 } }
type SubteamCreatedEvent ¶
type SubteamCreatedEvent struct { Type string `json:"type"` Subteam struct { ID string `json:"id"` TeamID string `json:"team_id"` IsUsergroup bool `json:"is_usergroup"` Name string `json:"name"` Description string `json:"description"` Handle string `json:"handle"` IsExternal bool `json:"is_external"` DateCreated Time `json:"date_create"` DateUpdated Time `json:"date_update"` DateDeleted Time `json:"date_delete"` AutoType string `json:"auto_type"` CreatedBy string `json:"created_by"` UpdatedBy string `json:"updated_by"` DeletedBy string `json:"deleted_by"` Prefs map[string]interface{} `json:"prefs"` UserCount int `json:"user_count"` } `json:"subteam"` }
] }, "user_count": "0" } }
type SubteamSelfAddedEvent ¶
type SubteamSelfAddedEvent struct { Type string `json:"type"` SubteamID string `json:"subteam_id"` }
https://api.slack.com/events/subteam_self_added
{ "type": "subteam_self_added", "subteam_id": "S0615G0KT" }
type SubteamSelfRemovedEvent ¶
type SubteamSelfRemovedEvent struct { Type string `json:"type"` SubteamID string `json:"subteam_id"` }
https://api.slack.com/events/subteam_self_removed
{ "type": "subteam_self_removed", "subteam_id": "S0615G0KT" }
type SubteamUpdatedEvent ¶
type SubteamUpdatedEvent struct { Type string `json:"type"` Subteam struct { ID string `json:"id"` TeamID string `json:"team_id"` IsUsergroup bool `json:"is_usergroup"` Name string `json:"name"` Description string `json:"description"` Handle string `json:"handle"` IsExternal bool `json:"is_external"` DateCreated Time `json:"date_create"` DateUpdated Time `json:"date_update"` DateDeleted Time `json:"date_delete"` AutoType string `json:"auto_type"` CreatedBy string `json:"created_by"` UpdatedBy string `json:"updated_by"` DeletedBy string `json:"deleted_by"` Prefs map[string]interface{} `json:"prefs"` UserCount int `json:"user_count"` Users []string `json:"users"` } `json:"subteam"` }
] }, "users": [ "U060RNRCZ", "U060ULRC0", "U06129G2V", "U061309JM" ], "user_count": "4" } }
type Team ¶
type Team struct { ID string `json:"id"` Domain string `json:"domain"` EmailDomain string `json:"email_domain"` Icon 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"` ImageDefault bool `json:"image_default"` } `json:"icon"` MsgEditWindow Duration `json:"msg_edit_window_mins"` Name string `json:"name"` OverStorageLimit bool `json:"over_storage_limit"` Plan string `json:"plan"` Prefs map[string]interface{} `json:"prefs"` }
type TeamAccessLogsResponse ¶
type TeamAccessLogsResponse struct { OK bool `json:"ok"` Error string `json:"error"` Logins []*Login `json:"logins"` Paging struct { Count int `json:"count"` Page int `json:"page"` Pages int `json:"pages"` Total int `json:"total"` } `json:"paging"` }
https://api.slack.com/methods/team.accessLogs
{ "ok": true, "logins": [ { "user_id": "U12345", "username": "bob", "date_first": 1422922864, "date_last": 1422922864, "count": 1, "ip": "127.0.0.1", "user_agent": "SlackWeb Mozilla\/5.0 (Macintosh; Intel Mac OS X 10_10_2) AppleWebKit\/537.36 (KHTML, like Gecko) Chrome\/41.0.2272.35 Safari\/537.36", "isp": "BigCo ISP", "country": "US", "region": "CA" }, { "user_id": "U45678", "username": "alice", "date_first": 1422922493, "date_last": 1422922493, "count": 1, "ip": "127.0.0.1", "user_agent": "SlackWeb Mozilla\/5.0 (iPhone; CPU iPhone OS 8_1_3 like Mac OS X) AppleWebKit\/600.1.4 (KHTML, like Gecko) Version\/8.0 Mobile\/12B466 Safari\/600.1.4", "isp": "BigCo ISP", "country": "US", "region": "CA" }, ], "paging": { "count": 100, "total": 2, "page": 1, "pages": 1 } }
type TeamDomainChangeEvent ¶
type TeamDomainChangeEvent struct { Type string `json:"type"` URL string `json:"url"` Domain string `json:"domain"` }
https://api.slack.com/events/team_domain_change
{ "type": "team_domain_change", "url": "https://my.slack.com", "domain": "my" }
type TeamInfoResponse ¶
type TeamInfoResponse struct { OK bool `json:"ok"` Error string `json:"error"` Team *Team `json:"team"` }
https://api.slack.com/methods/team.info
{ "ok": true, "team": { "id": "T12345", "name": "My Team", "domain": "example", "email_domain": "", "icon": { "image_34": "https:\/\/...", "image_44": "https:\/\/...", "image_68": "https:\/\/...", "image_88": "https:\/\/...", "image_102": "https:\/\/...", "image_132": "https:\/\/...", "image_default": true } } }
type TeamIntegrationLogsResponse ¶
type TeamIntegrationLogsResponse struct { OK bool `json:"ok"` Error string `json:"error"` Logs []*LogEntry `json:"logins"` Paging struct { Count int `json:"count"` Page int `json:"page"` Pages int `json:"pages"` Total int `json:"total"` } `json:"paging"` }
https://api.slack.com/methods/team.integrationLogs
{ "ok": true, "logs": [ { "service_id": "1234567890", "service_type": "Google Calendar", "user_id": "U1234ABCD", "user_name": "Johnny", "channel": "C1234567890", "date": "1392163200", "change_type": "enabled", "scope": "incoming-webhook" }, { "app_id": "2345678901", "app_type": "Johnny App" "user_id": "U2345BCDE", "user_name": "Billy", "date": "1392163201", "change_type": "added" "scope": "chat:write:user,channels:read" }, { "service_id": "3456789012", "service_type": "Airbrake", "user_id": "U3456CDEF", "user_name": "Joey", "channel": "C1234567890", "date": "1392163202", "change_type": "disabled", "reason": "user", "scope": "incoming-webhook" }, "paging": { "count": 3, "total": 3, "page": 1, "pages": 1 } ] }
type TeamMigrationStartedEvent ¶
type TeamMigrationStartedEvent struct {
Type string `json:"type"`
}
https://api.slack.com/events/team_migration_started
{ "type": "team_migration_started" }
type TeamPlanChangeEvent ¶
https://api.slack.com/events/team_plan_change
{ "type": "team_plan_change", "plan": "std" }
type TeamPrefChangeEvent ¶
type TeamPrefChangeEvent struct { Type string `json:"type"` Name string `json:"name"` Value bool `json:"value"` }
https://api.slack.com/events/team_pref_change
{ "type": "team_pref_change", "name": "slackbot_responses_only_admins", "value": true }
type TeamProfileChangeEvent ¶
type TeamProfileChangeEvent struct { Type string `json:"type"` Profile struct { Fields []map[string]interface{} `json:"profile"` } `json:"profile"` }
https://api.slack.com/events/team_profile_change
{ "type": "team_profile_change", "profile": { "fields": [{"a":"b"}] } }
type TeamProfileDeleteEvent ¶
type TeamProfileDeleteEvent struct { Type string `json:"type"` Profile struct { Fields []string `json:"fields"` } `json:"profile"` }
https://api.slack.com/events/team_profile_delete
{ "type": "team_profile_delete", "profile": { "fields": [ "Xf06054AAA"] } }
type TeamProfileReorderEvent ¶
type TeamProfileReorderEvent struct { Type string `json:"type"` Profile struct { Fields []map[string]string `json:"profile"` } `json:"profile"` }
https://api.slack.com/events/team_profile_reorder
{ "type": "team_profile_reorder", "profile": { "fields": [{"a":"b"}] } }
type TeamRenameEvent ¶
https://api.slack.com/events/team_rename
{ "type": "team_rename", "name": "New Team Name Inc." }
type UnrecognizedEvent ¶
type UnrecognizedEvent map[string]interface{}
type User ¶
type User struct { ID string `json:"id"` Name string `json:"name"` Deleted bool `json:"deleted"` Color string `json:"color"` Profile struct { FirstName string `json:"first_name"` LastName string `json:"last_name"` RealName string `json:"real_name"` Email string `json:"email"` Phone string `json:"phone"` Skype string `json:"skype"` 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"` } `json:"profile"` IsAdmin bool `json:"is_admin"` IsOwner bool `json:"is_owner"` IsPrimaryOwner bool `json:"is_primary_owner"` IsRestricted bool `json:"is_restricted"` IsUltraRestricted bool `json:"is_ultra_restricted"` Has2fa bool `json:"has_2fa"` TwoFactorType string `json:"two_factor_type"` HasFiles bool `json:"has_files"` }
https://api.slack.com/types/user
{ "id": "U023BECGF", "name": "bobby", "deleted": false, "color": "9f69e7", "profile": { "first_name": "Bobby", "last_name": "Tables", "real_name": "Bobby Tables", "email": "bobby@slack.com", "skype": "my-skype-name", "phone": "+1 (123) 456 7890", "image_24": "https:\/\/...", "image_32": "https:\/\/...", "image_48": "https:\/\/...", "image_72": "https:\/\/...", "image_192": "https:\/\/..." }, "is_admin": true, "is_owner": true, "is_primary_owner": true, "is_restricted": false, "is_ultra_restricted": false, "has_2fa": false, "two_factor_type": 'sms', "has_files": true }
type UserChangeEvent ¶
https://api.slack.com/events/user_change
{ "type": "user_change", "user": {} }
type UserGroup ¶
type UserGroup struct { ID string `json:"id"` TeamID string `json:"team_id"` IsUsergroup bool `json:"is_usergroup"` Name string `json:"name"` Description string `json:"description"` Handle string `json:"handle"` IsExternal bool `json:"is_external"` DateCreated Time `json:"date_create"` DateUpdated Time `json:"date_update"` DateDeleted Time `json:"date_delete"` AutoType string `json:"auto_type"` CreatedBy string `json:"created_by"` UpdatedBy string `json:"updated_by"` DeletedBy string `json:"deleted_by"` Prefs map[string]interface{} `json:"prefs"` Users []string `json:"users"` UserCount string `json:"user_count"` }
https://api.slack.com/types/usergroup
{ "id": "S0614TZR7", "team_id": "T060RNRCH", "is_usergroup": true, "name": "Team Admins", "description": "A group of all Administrators on your team.", "handle": "admins", "is_external": false, "date_create": 1446598059, "date_update": 1446670362, "date_delete": 0, "auto_type": "admin", "created_by": "USLACKBOT", "updated_by": "U060RNRCZ", "deleted_by": null, "prefs": { "channels": [], "groups": [] }, "users": [ "U060RNRCZ", "U060ULRC0", "U06129G2V", "U061309JM" ], "user_count": "4" }
type UserTypingEvent ¶
type UserTypingEvent struct { Type string `json:"type"` Channel string `json:"channel"` User string `json:"user"` }
https://api.slack.com/events/user_typing
{ "type": "user_typing", "channel": "C02ELGNBH", "user": "U024BE7LH" }
type UsergroupsCreateResponse ¶
type UsergroupsCreateResponse struct { OK bool `json:"ok"` Error string `json:"error"` UserGroup *UserGroup `json:"user_group"` }
https://api.slack.com/methods/usergroups.create
{ "ok": true, "usergroup": { "id": "S0615G0KT", "team_id": "T060RNRCH", "is_usergroup": true, "name": "Marketing Team", "description": "Marketing gurus, PR experts and product advocates.", "handle": "marketing-team", "is_external": false, "date_create": 1446746793, "date_update": 1446746793, "date_delete": 0, "auto_type": null, "created_by": "U060RNRCZ", "updated_by": "U060RNRCZ", "deleted_by": null, "prefs": { "channels": [], "groups": [] }, "user_count": "0" } }
type UsergroupsDisableResponse ¶
type UsergroupsDisableResponse struct { OK bool `json:"ok"` Error string `json:"error"` UserGroup *UserGroup `json:"user_group"` }
https://api.slack.com/methods/usergroups.disable
{ "ok": true, "usergroup": { "id": "S0615G0KT", "team_id": "T060RNRCH", "is_usergroup": true, "name": "Marketing Team", "description": "Marketing gurus, PR experts and product advocates.", "handle": "marketing-team", "is_external": false, "date_create": 1446746793, "date_update": 1446747568, "date_delete": 1446747568, "auto_type": null, "created_by": "U060RNRCZ", "updated_by": "U060RNRCZ", "deleted_by": "U060RNRCZ", "prefs": { "channels": [], "groups": [] }, "user_count": "0" } }
type UsergroupsEnableResponse ¶
type UsergroupsEnableResponse struct { OK bool `json:"ok"` Error string `json:"error"` UserGroup *UserGroup `json:"user_group"` }
https://api.slack.com/methods/usergroups.enable
{ "ok": true, "usergroup": { "id": "S0615G0KT", "team_id": "T060RNRCH", "is_usergroup": true, "name": "Marketing Team", "description": "Marketing gurus, PR experts and product advocates.", "handle": "marketing-team", "is_external": false, "date_create": 1446746793, "date_update": 1446747767, "date_delete": 0, "auto_type": null, "created_by": "U060RNRCZ", "updated_by": "U060RNRCZ", "deleted_by": null, "prefs": { "channels": [], "groups": [] }, "user_count": "0" } }
type UsergroupsListResponse ¶
type UsergroupsListResponse struct { OK bool `json:"ok"` Error string `json:"error"` UserGroups []*UserGroup `json:"user_groups"` }
https://api.slack.com/methods/usergroups.list
{ "ok": true, "usergroups": [ { "id": "S0614TZR7", "team_id": "T060RNRCH", "is_usergroup": true, "name": "Team Admins", "description": "A group of all Administrators on your team.", "handle": "admins", "is_external": false, "date_create": 1446598059, "date_update": 1446670362, "date_delete": 0, "auto_type": "admin", "created_by": "USLACKBOT", "updated_by": "U060RNRCZ", "deleted_by": null, "prefs": { "channels": [], "groups": [] }, "user_count": "2" }, { "id": "S06158AV7", "team_id": "T060RNRCH", "is_usergroup": true, "name": "Team Owners", "description": "A group of all Owners on your team.", "handle": "owners", "is_external": false, "date_create": 1446678371, "date_update": 1446678371, "date_delete": 0, "auto_type": "owner", "created_by": "USLACKBOT", "updated_by": "USLACKBOT", "deleted_by": null, "prefs": { "channels": [], "groups": [] }, "user_count": "1" }, { "id": "S0615G0KT", "team_id": "T060RNRCH", "is_usergroup": true, "name": "Marketing Team", "description": "Marketing gurus, PR experts and product advocates.", "handle": "marketing-team", "is_external": false, "date_create": 1446746793, "date_update": 1446747767, "date_delete": 1446748865, "auto_type": null, "created_by": "U060RNRCZ", "updated_by": "U060RNRCZ", "deleted_by": null, "prefs": { "channels": [], "groups": [] }, "user_count": "0" } ] }
type UsergroupsUpdateResponse ¶
type UsergroupsUpdateResponse struct { OK bool `json:"ok"` Error string `json:"error"` UserGroup *UserGroup `json:"user_group"` }
https://api.slack.com/methods/usergroups.update
{ "ok": true, "usergroup": { "id": "S0615G0KT", "team_id": "T060RNRCH", "is_usergroup": true, "name": "Marketing Gurus", "description": "Marketing gurus, PR experts and product advocates.", "handle": "marketing-team", "is_external": false, "date_create": 1446746793, "date_update": 1446748574, "date_delete": 0, "auto_type": null, "created_by": "U060RNRCZ", "updated_by": "U060RNRCZ", "deleted_by": null, "prefs": { "channels": [], "groups": [] }, "user_count": "0" } }
type UsergroupsUsersListResponse ¶
https://api.slack.com/methods/usergroups.users.list
{ "ok": true, "users": [ "U060R4BJ4" ] }
type UsergroupsUsersUpdateResponse ¶
type UsergroupsUsersUpdateResponse struct { OK bool `json:"ok"` Error string `json:"error"` UserGroup *UserGroup `json:"user_group"` }
https://api.slack.com/methods/usergroups.users.update
{ "ok": true, "usergroup": { "id": "S0616NG6M", "team_id": "T060R4BHN", "is_usergroup": true, "name": "Marketing Team", "description": "Marketing gurus, PR experts and product advocates.", "handle": "marketing-team", "is_external": false, "date_create": 1447096577, "date_update": 1447102109, "date_delete": 0, "auto_type": null, "created_by": "U060R4BJ4", "updated_by": "U060R4BJ4", "deleted_by": null, "prefs": { "channels": [], "groups": [] }, "users": [ "U060R4BJ4", "U060RNRCZ" ], "user_count": 1 } }
type UsersGetPresenceResponse ¶
type UsersGetPresenceResponse struct { OK bool `json:"ok"` Error string `json:"error"` Presence Presence `json:"presence"` Online bool `json:"online"` AutoAway bool `json:"auto_away"` ManualAway bool `json:"manual_away"` ConnectionCount int `json:"connection_count"` LastActivity Time `json:"last_activity"` }
https://api.slack.com/methods/users.getPresence
{ "ok": true, "presence": "active", "online": true, "auto_away": false, "manual_away": false, "connection_count": 1, "last_activity": 1419027078 }
type UsersInfoResponse ¶
type UsersInfoResponse struct { OK bool `json:"ok"` Error string `json:"error"` User *User `json:"user"` }
https://api.slack.com/methods/users.info
{ "ok": true, "user": { "id": "U023BECGF", "name": "bobby", "deleted": false, "color": "9f69e7", "profile": { "first_name": "Bobby", "last_name": "Tables", "real_name": "Bobby Tables", "email": "bobby@slack.com", "skype": "my-skype-name", "phone": "+1 (123) 456 7890", "image_24": "https:\/\/...", "image_32": "https:\/\/...", "image_48": "https:\/\/...", "image_72": "https:\/\/...", "image_192": "https:\/\/..." }, "is_admin": true, "is_owner": true, "has_2fa": true, "has_files": true } }
type UsersListResponse ¶
type UsersListResponse struct { OK bool `json:"ok"` Error string `json:"error"` Members []*User `json:"members"` }
https://api.slack.com/methods/users.list
{ "ok": true, "members": [ { "id": "U023BECGF", "name": "bobby", "deleted": false, "color": "9f69e7", "profile": { "first_name": "Bobby", "last_name": "Tables", "real_name": "Bobby Tables", "email": "bobby@slack.com", "skype": "my-skype-name", "phone": "+1 (123) 456 7890", "image_24": "https:\/\/...", "image_32": "https:\/\/...", "image_48": "https:\/\/...", "image_72": "https:\/\/...", "image_192": "https:\/\/..." }, "is_admin": true, "is_owner": true, "has_2fa": false, "has_files": true } ] }