Documentation
¶
Overview ¶
Package slack implements a REST client for Slack services.
Index ¶
- Constants
- Variables
- type AuthRevokeCall
- type AuthService
- type AuthTestCall
- type BotsInfoCall
- type BotsService
- type ChannelLink
- type ChannelsArchiveCall
- type ChannelsCreateCall
- type ChannelsHistoryCall
- func (c *ChannelsHistoryCall) Count(count int) *ChannelsHistoryCall
- func (c *ChannelsHistoryCall) Do(ctx context.Context) (*objects.ChannelsHistoryResponse, error)
- func (c *ChannelsHistoryCall) FromValues(v url.Values) error
- func (c *ChannelsHistoryCall) Inclusive(inclusive bool) *ChannelsHistoryCall
- func (c *ChannelsHistoryCall) Latest(latest string) *ChannelsHistoryCall
- func (c *ChannelsHistoryCall) Oldest(oldest string) *ChannelsHistoryCall
- func (c *ChannelsHistoryCall) Timestamp(timestamp string) *ChannelsHistoryCall
- func (c *ChannelsHistoryCall) Unreads(unreads bool) *ChannelsHistoryCall
- func (c *ChannelsHistoryCall) ValidateArgs() error
- func (c *ChannelsHistoryCall) Values() (url.Values, error)
- type ChannelsInfoCall
- func (c *ChannelsInfoCall) Do(ctx context.Context) (*objects.Channel, error)
- func (c *ChannelsInfoCall) FromValues(v url.Values) error
- func (c *ChannelsInfoCall) IncludeLocale(includeLocale bool) *ChannelsInfoCall
- func (c *ChannelsInfoCall) ValidateArgs() error
- func (c *ChannelsInfoCall) Values() (url.Values, error)
- type ChannelsInviteCall
- type ChannelsJoinCall
- func (c *ChannelsJoinCall) Do(ctx context.Context) (*objects.Channel, error)
- func (c *ChannelsJoinCall) FromValues(v url.Values) error
- func (c *ChannelsJoinCall) Validate(validate bool) *ChannelsJoinCall
- func (c *ChannelsJoinCall) ValidateArgs() error
- func (c *ChannelsJoinCall) Values() (url.Values, error)
- type ChannelsKickCall
- type ChannelsLeaveCall
- type ChannelsListCall
- func (c *ChannelsListCall) Do(ctx context.Context) (objects.ChannelList, error)
- func (c *ChannelsListCall) ExcludeArchive(excludeArchive bool) *ChannelsListCall
- func (c *ChannelsListCall) ExcludeMembers(excludeMembers bool) *ChannelsListCall
- func (c *ChannelsListCall) FromValues(v url.Values) error
- func (c *ChannelsListCall) Limit(limit int) *ChannelsListCall
- func (c *ChannelsListCall) ValidateArgs() error
- func (c *ChannelsListCall) Values() (url.Values, error)
- type ChannelsMarkCall
- type ChannelsRenameCall
- func (c *ChannelsRenameCall) Do(ctx context.Context) (*objects.Channel, error)
- func (c *ChannelsRenameCall) FromValues(v url.Values) error
- func (c *ChannelsRenameCall) Validate(validate bool) *ChannelsRenameCall
- func (c *ChannelsRenameCall) ValidateArgs() error
- func (c *ChannelsRenameCall) Values() (url.Values, error)
- type ChannelsRepliesCall
- type ChannelsService
- func (s *ChannelsService) Archive(channel string) *ChannelsArchiveCall
- func (s *ChannelsService) Create(name string) *ChannelsCreateCall
- func (s *ChannelsService) History(channel string) *ChannelsHistoryCall
- func (s *ChannelsService) Info(channel string) *ChannelsInfoCall
- func (s *ChannelsService) Invite(channel string, user string) *ChannelsInviteCall
- func (s *ChannelsService) Join(name string) *ChannelsJoinCall
- func (s *ChannelsService) Kick(channel string, user string) *ChannelsKickCall
- func (s *ChannelsService) Leave(channel string) *ChannelsLeaveCall
- func (s *ChannelsService) List() *ChannelsListCall
- func (s *ChannelsService) Mark(channel string) *ChannelsMarkCall
- func (s *ChannelsService) Rename(channel string, name string) *ChannelsRenameCall
- func (s *ChannelsService) Replies(channel string, threadTimestamp string) *ChannelsRepliesCall
- func (s *ChannelsService) SetPurpose(channel string, purpose string) *ChannelsSetPurposeCall
- func (s *ChannelsService) SetTopic(channel string, topic string) *ChannelsSetTopicCall
- func (s *ChannelsService) Unarchive(channel string) *ChannelsUnarchiveCall
- type ChannelsSetPurposeCall
- type ChannelsSetTopicCall
- type ChannelsUnarchiveCall
- type ChatDeleteCall
- func (c *ChatDeleteCall) AsUser(asUser bool) *ChatDeleteCall
- func (c *ChatDeleteCall) Do(ctx context.Context) (*objects.ChatResponse, error)
- func (c *ChatDeleteCall) FromValues(v url.Values) error
- func (c *ChatDeleteCall) Timestamp(timestamp string) *ChatDeleteCall
- func (c *ChatDeleteCall) ValidateArgs() error
- func (c *ChatDeleteCall) Values() (url.Values, error)
- type ChatMeMessageCall
- func (c *ChatMeMessageCall) Do(ctx context.Context) (*objects.ChatResponse, error)
- func (c *ChatMeMessageCall) FromValues(v url.Values) error
- func (c *ChatMeMessageCall) Text(text string) *ChatMeMessageCall
- func (c *ChatMeMessageCall) ValidateArgs() error
- func (c *ChatMeMessageCall) Values() (url.Values, error)
- type ChatPostMessageCall
- func (c *ChatPostMessageCall) AsUser(asUser bool) *ChatPostMessageCall
- func (c *ChatPostMessageCall) Attachment(attachment *objects.Attachment) *ChatPostMessageCall
- func (c *ChatPostMessageCall) Do(ctx context.Context) (*objects.ChatResponse, error)
- func (c *ChatPostMessageCall) EscapeText(escapeText bool) *ChatPostMessageCall
- func (c *ChatPostMessageCall) FromValues(v url.Values) error
- func (c *ChatPostMessageCall) IconEmoji(iconEmoji string) *ChatPostMessageCall
- func (c *ChatPostMessageCall) IconURL(iconURL string) *ChatPostMessageCall
- func (c *ChatPostMessageCall) LinkNames(linkNames bool) *ChatPostMessageCall
- func (c *ChatPostMessageCall) Markdown(markdown bool) *ChatPostMessageCall
- func (c *ChatPostMessageCall) Parse(parse string) *ChatPostMessageCall
- func (c *ChatPostMessageCall) SetAttachments(attachments objects.AttachmentList) *ChatPostMessageCall
- func (c *ChatPostMessageCall) Text(text string) *ChatPostMessageCall
- func (c *ChatPostMessageCall) UnfurlLinks(unfurlLinks bool) *ChatPostMessageCall
- func (c *ChatPostMessageCall) UnfurlMedia(unfurlMedia bool) *ChatPostMessageCall
- func (c *ChatPostMessageCall) Username(username string) *ChatPostMessageCall
- func (c *ChatPostMessageCall) ValidateArgs() error
- func (c *ChatPostMessageCall) Values() (url.Values, error)
- type ChatService
- func (s *ChatService) Delete(channel string) *ChatDeleteCall
- func (s *ChatService) MeMessage(channel string) *ChatMeMessageCall
- func (s *ChatService) PostMessage(channel string) *ChatPostMessageCall
- func (s *ChatService) Unfurl(channel string, timestamp string, unfurls string) *ChatUnfurlCall
- func (s *ChatService) Update(channel string) *ChatUpdateCall
- type ChatUnfurlCall
- type ChatUpdateCall
- func (c *ChatUpdateCall) AsUser(asUser bool) *ChatUpdateCall
- func (c *ChatUpdateCall) Attachment(attachment *objects.Attachment) *ChatUpdateCall
- func (c *ChatUpdateCall) Do(ctx context.Context) (*objects.ChatResponse, error)
- func (c *ChatUpdateCall) FromValues(v url.Values) error
- func (c *ChatUpdateCall) LinkNames(linkNames bool) *ChatUpdateCall
- func (c *ChatUpdateCall) Parse(parse string) *ChatUpdateCall
- func (c *ChatUpdateCall) SetAttachments(attachments objects.AttachmentList) *ChatUpdateCall
- func (c *ChatUpdateCall) Text(text string) *ChatUpdateCall
- func (c *ChatUpdateCall) Timestamp(timestamp string) *ChatUpdateCall
- func (c *ChatUpdateCall) ValidateArgs() error
- func (c *ChatUpdateCall) Values() (url.Values, error)
- type Client
- func (c *Client) Auth() *AuthService
- func (c *Client) Bots() *BotsService
- func (c *Client) Channels() *ChannelsService
- func (c *Client) Chat() *ChatService
- func (c *Client) Emoji() *EmojiService
- func (c *Client) Groups() *GroupsService
- func (c *Client) OAuth() *OAuthService
- func (c *Client) RTM() *RTMService
- func (c *Client) Reactions() *ReactionsService
- func (c *Client) Reminders() *RemindersService
- func (c *Client) Usergroups() *UsergroupsService
- func (c *Client) UsergroupsUsers() *UsergroupsUsersService
- func (c *Client) Users() *UsersService
- func (c *Client) UsersProfile() *UsersProfileService
- type ControlSequence
- type EmojiListCall
- type EmojiService
- type ExternalLink
- type GroupsArchiveCall
- type GroupsCreateCall
- func (c *GroupsCreateCall) Do(ctx context.Context) (*objects.Group, error)
- func (c *GroupsCreateCall) FromValues(v url.Values) error
- func (c *GroupsCreateCall) Validate(validate bool) *GroupsCreateCall
- func (c *GroupsCreateCall) ValidateArgs() error
- func (c *GroupsCreateCall) Values() (url.Values, error)
- type GroupsCreateChildCall
- type GroupsHistoryCall
- func (c *GroupsHistoryCall) Count(count int) *GroupsHistoryCall
- func (c *GroupsHistoryCall) Do(ctx context.Context) (*string, objects.MessageList, error)
- func (c *GroupsHistoryCall) FromValues(v url.Values) error
- func (c *GroupsHistoryCall) Inclusive(inclusive bool) *GroupsHistoryCall
- func (c *GroupsHistoryCall) Latest(latest string) *GroupsHistoryCall
- func (c *GroupsHistoryCall) Oldest(oldest string) *GroupsHistoryCall
- func (c *GroupsHistoryCall) Unreads(unreads bool) *GroupsHistoryCall
- func (c *GroupsHistoryCall) ValidateArgs() error
- func (c *GroupsHistoryCall) Values() (url.Values, error)
- type GroupsInfoCall
- func (c *GroupsInfoCall) Do(ctx context.Context) (*objects.Group, error)
- func (c *GroupsInfoCall) FromValues(v url.Values) error
- func (c *GroupsInfoCall) IncludeLocale(includeLocale bool) *GroupsInfoCall
- func (c *GroupsInfoCall) ValidateArgs() error
- func (c *GroupsInfoCall) Values() (url.Values, error)
- type GroupsInviteCall
- type GroupsKickCall
- type GroupsLeaveCall
- type GroupsListCall
- func (c *GroupsListCall) Do(ctx context.Context) (objects.GroupList, error)
- func (c *GroupsListCall) ExcludeArchived(excludeArchived bool) *GroupsListCall
- func (c *GroupsListCall) ExcludeMembers(excludeMembers bool) *GroupsListCall
- func (c *GroupsListCall) FromValues(v url.Values) error
- func (c *GroupsListCall) ValidateArgs() error
- func (c *GroupsListCall) Values() (url.Values, error)
- type GroupsMarkCall
- type GroupsOpenCall
- type GroupsRenameCall
- func (c *GroupsRenameCall) Do(ctx context.Context) (*objects.Group, error)
- func (c *GroupsRenameCall) FromValues(v url.Values) error
- func (c *GroupsRenameCall) Validate(validate bool) *GroupsRenameCall
- func (c *GroupsRenameCall) ValidateArgs() error
- func (c *GroupsRenameCall) Values() (url.Values, error)
- type GroupsRepliesCall
- type GroupsService
- func (s *GroupsService) Archive(channel string) *GroupsArchiveCall
- func (s *GroupsService) Create(name string) *GroupsCreateCall
- func (s *GroupsService) CreateChild(channel string) *GroupsCreateChildCall
- func (s *GroupsService) History(channel string) *GroupsHistoryCall
- func (s *GroupsService) Info(channel string) *GroupsInfoCall
- func (s *GroupsService) Invite(channel string, user string) *GroupsInviteCall
- func (s *GroupsService) Kick(channel string, user string) *GroupsKickCall
- func (s *GroupsService) Leave(channel string) *GroupsLeaveCall
- func (s *GroupsService) List() *GroupsListCall
- func (s *GroupsService) Mark(channel string, timestamp string) *GroupsMarkCall
- func (s *GroupsService) Open(channel string) *GroupsOpenCall
- func (s *GroupsService) Rename(channel string, name string) *GroupsRenameCall
- func (s *GroupsService) Replies(channel string, threadTimestamp string) *GroupsRepliesCall
- func (s *GroupsService) SetPurpose(channel string, purpose string) *GroupsSetPurposeCall
- func (s *GroupsService) SetTopic(channel string, topic string) *GroupsSetTopicCall
- func (s *GroupsService) Unarchive(channel string) *GroupsUnarchiveCall
- type GroupsSetPurposeCall
- type GroupsSetTopicCall
- type GroupsUnarchiveCall
- type Logger
- type OAuthAccessCall
- func (c *OAuthAccessCall) Do(ctx context.Context) (*objects.OAuthAccessResponse, error)
- func (c *OAuthAccessCall) FromValues(v url.Values) error
- func (c *OAuthAccessCall) RedirectURI(redirectURI string) *OAuthAccessCall
- func (c *OAuthAccessCall) ValidateArgs() error
- func (c *OAuthAccessCall) Values() (url.Values, error)
- type OAuthService
- type Option
- type RTMService
- type RTMStartCall
- type ReactionsAddCall
- func (c *ReactionsAddCall) Channel(channel string) *ReactionsAddCall
- func (c *ReactionsAddCall) Do(ctx context.Context) error
- func (c *ReactionsAddCall) File(file string) *ReactionsAddCall
- func (c *ReactionsAddCall) FileComment(fileComment string) *ReactionsAddCall
- func (c *ReactionsAddCall) FromValues(v url.Values) error
- func (c *ReactionsAddCall) Timestamp(timestamp string) *ReactionsAddCall
- func (c *ReactionsAddCall) ValidateArgs() error
- func (c *ReactionsAddCall) Values() (url.Values, error)
- type ReactionsGetCall
- func (c *ReactionsGetCall) Channel(channel string) *ReactionsGetCall
- func (c *ReactionsGetCall) Do(ctx context.Context) (*objects.ReactionsGetResponse, error)
- func (c *ReactionsGetCall) File(file string) *ReactionsGetCall
- func (c *ReactionsGetCall) FileComment(fileComment string) *ReactionsGetCall
- func (c *ReactionsGetCall) FromValues(v url.Values) error
- func (c *ReactionsGetCall) Full(full bool) *ReactionsGetCall
- func (c *ReactionsGetCall) Timestamp(timestamp string) *ReactionsGetCall
- func (c *ReactionsGetCall) ValidateArgs() error
- func (c *ReactionsGetCall) Values() (url.Values, error)
- type ReactionsListCall
- func (c *ReactionsListCall) Count(count int) *ReactionsListCall
- func (c *ReactionsListCall) Do(ctx context.Context) (*objects.ReactionsListResponse, error)
- func (c *ReactionsListCall) FromValues(v url.Values) error
- func (c *ReactionsListCall) Full(full bool) *ReactionsListCall
- func (c *ReactionsListCall) Page(page int) *ReactionsListCall
- func (c *ReactionsListCall) User(user string) *ReactionsListCall
- func (c *ReactionsListCall) ValidateArgs() error
- func (c *ReactionsListCall) Values() (url.Values, error)
- type ReactionsRemoveCall
- func (c *ReactionsRemoveCall) Channel(channel string) *ReactionsRemoveCall
- func (c *ReactionsRemoveCall) Do(ctx context.Context) error
- func (c *ReactionsRemoveCall) File(file string) *ReactionsRemoveCall
- func (c *ReactionsRemoveCall) FileComment(fileComment string) *ReactionsRemoveCall
- func (c *ReactionsRemoveCall) FromValues(v url.Values) error
- func (c *ReactionsRemoveCall) Timestamp(timestamp string) *ReactionsRemoveCall
- func (c *ReactionsRemoveCall) ValidateArgs() error
- func (c *ReactionsRemoveCall) Values() (url.Values, error)
- type ReactionsService
- type RemindersAddCall
- func (c *RemindersAddCall) Do(ctx context.Context) (*objects.Reminder, error)
- func (c *RemindersAddCall) FromValues(v url.Values) error
- func (c *RemindersAddCall) User(user string) *RemindersAddCall
- func (c *RemindersAddCall) ValidateArgs() error
- func (c *RemindersAddCall) Values() (url.Values, error)
- type RemindersCompleteCall
- type RemindersDeleteCall
- type RemindersInfoCall
- type RemindersListCall
- type RemindersService
- func (s *RemindersService) Add(text string, time int) *RemindersAddCall
- func (s *RemindersService) Complete(reminder string) *RemindersCompleteCall
- func (s *RemindersService) Delete(reminder string) *RemindersDeleteCall
- func (s *RemindersService) Info(reminder string) *RemindersInfoCall
- func (s *RemindersService) List() *RemindersListCall
- type UserLink
- type UsergroupsCreateCall
- func (c *UsergroupsCreateCall) Channels(channels string) *UsergroupsCreateCall
- func (c *UsergroupsCreateCall) Description(description string) *UsergroupsCreateCall
- func (c *UsergroupsCreateCall) Do(ctx context.Context) (*objects.Usergroup, error)
- func (c *UsergroupsCreateCall) FromValues(v url.Values) error
- func (c *UsergroupsCreateCall) Handle(handle string) *UsergroupsCreateCall
- func (c *UsergroupsCreateCall) IncludeCount(includeCount bool) *UsergroupsCreateCall
- func (c *UsergroupsCreateCall) ValidateArgs() error
- func (c *UsergroupsCreateCall) Values() (url.Values, error)
- type UsergroupsDisableCall
- func (c *UsergroupsDisableCall) Do(ctx context.Context) (*objects.Usergroup, error)
- func (c *UsergroupsDisableCall) FromValues(v url.Values) error
- func (c *UsergroupsDisableCall) IncludeCount(includeCount bool) *UsergroupsDisableCall
- func (c *UsergroupsDisableCall) ValidateArgs() error
- func (c *UsergroupsDisableCall) Values() (url.Values, error)
- type UsergroupsEnableCall
- func (c *UsergroupsEnableCall) Do(ctx context.Context) (*objects.Usergroup, error)
- func (c *UsergroupsEnableCall) FromValues(v url.Values) error
- func (c *UsergroupsEnableCall) IncludeCount(includeCount bool) *UsergroupsEnableCall
- func (c *UsergroupsEnableCall) ValidateArgs() error
- func (c *UsergroupsEnableCall) Values() (url.Values, error)
- type UsergroupsListCall
- func (c *UsergroupsListCall) Do(ctx context.Context) (objects.UsergroupList, error)
- func (c *UsergroupsListCall) FromValues(v url.Values) error
- func (c *UsergroupsListCall) IncludeCount(includeCount bool) *UsergroupsListCall
- func (c *UsergroupsListCall) IncludeDisabled(includeDisabled bool) *UsergroupsListCall
- func (c *UsergroupsListCall) IncludeUsers(includeUsers bool) *UsergroupsListCall
- func (c *UsergroupsListCall) ValidateArgs() error
- func (c *UsergroupsListCall) Values() (url.Values, error)
- type UsergroupsService
- func (s *UsergroupsService) Create(name string) *UsergroupsCreateCall
- func (s *UsergroupsService) Disable(usergroup string) *UsergroupsDisableCall
- func (s *UsergroupsService) Enable(usergroup string) *UsergroupsEnableCall
- func (s *UsergroupsService) List() *UsergroupsListCall
- func (s *UsergroupsService) Update(usergroup string) *UsergroupsUpdateCall
- type UsergroupsUpdateCall
- func (c *UsergroupsUpdateCall) Channels(channels string) *UsergroupsUpdateCall
- func (c *UsergroupsUpdateCall) Description(description string) *UsergroupsUpdateCall
- func (c *UsergroupsUpdateCall) Do(ctx context.Context) (*objects.Usergroup, error)
- func (c *UsergroupsUpdateCall) FromValues(v url.Values) error
- func (c *UsergroupsUpdateCall) Handle(handle string) *UsergroupsUpdateCall
- func (c *UsergroupsUpdateCall) IncludeCount(includeCount bool) *UsergroupsUpdateCall
- func (c *UsergroupsUpdateCall) Name(name string) *UsergroupsUpdateCall
- func (c *UsergroupsUpdateCall) ValidateArgs() error
- func (c *UsergroupsUpdateCall) Values() (url.Values, error)
- type UsergroupsUsersListCall
- func (c *UsergroupsUsersListCall) Do(ctx context.Context) (objects.UsergroupUsersList, error)
- func (c *UsergroupsUsersListCall) FromValues(v url.Values) error
- func (c *UsergroupsUsersListCall) IncludeDisabled(includeDisabled bool) *UsergroupsUsersListCall
- func (c *UsergroupsUsersListCall) ValidateArgs() error
- func (c *UsergroupsUsersListCall) Values() (url.Values, error)
- type UsergroupsUsersService
- type UsergroupsUsersUpdateCall
- func (c *UsergroupsUsersUpdateCall) Do(ctx context.Context) (*objects.Usergroup, error)
- func (c *UsergroupsUsersUpdateCall) FromValues(v url.Values) error
- func (c *UsergroupsUsersUpdateCall) IncludeCount(includeCount bool) *UsergroupsUsersUpdateCall
- func (c *UsergroupsUsersUpdateCall) ValidateArgs() error
- func (c *UsergroupsUsersUpdateCall) Values() (url.Values, error)
- type UsersDeletePhotoCall
- type UsersGetPresenceCall
- type UsersIdentityCall
- type UsersInfoCall
- type UsersListCall
- func (c *UsersListCall) Do(ctx context.Context) (objects.UserList, error)
- func (c *UsersListCall) FromValues(v url.Values) error
- func (c *UsersListCall) IncludeLocale(includeLocale bool) *UsersListCall
- func (c *UsersListCall) Limit(limit int) *UsersListCall
- func (c *UsersListCall) Presence(presence bool) *UsersListCall
- func (c *UsersListCall) ValidateArgs() error
- func (c *UsersListCall) Values() (url.Values, error)
- type UsersProfileGetCall
- func (c *UsersProfileGetCall) Do(ctx context.Context) (*objects.UserProfile, error)
- func (c *UsersProfileGetCall) FromValues(v url.Values) error
- func (c *UsersProfileGetCall) IncludeLabels(includeLabels bool) *UsersProfileGetCall
- func (c *UsersProfileGetCall) User(user string) *UsersProfileGetCall
- func (c *UsersProfileGetCall) ValidateArgs() error
- func (c *UsersProfileGetCall) Values() (url.Values, error)
- type UsersProfileService
- type UsersProfileSetCall
- func (c *UsersProfileSetCall) Do(ctx context.Context) (*objects.UserProfile, error)
- func (c *UsersProfileSetCall) FromValues(v url.Values) error
- func (c *UsersProfileSetCall) Name(name string) *UsersProfileSetCall
- func (c *UsersProfileSetCall) Profile(profile *objects.UserProfile) *UsersProfileSetCall
- func (c *UsersProfileSetCall) User(user string) *UsersProfileSetCall
- func (c *UsersProfileSetCall) ValidateArgs() error
- func (c *UsersProfileSetCall) Value(value string) *UsersProfileSetCall
- func (c *UsersProfileSetCall) Values() (url.Values, error)
- type UsersService
- func (s *UsersService) DeletePhoto() *UsersDeletePhotoCall
- func (s *UsersService) GetPresence(user string) *UsersGetPresenceCall
- func (s *UsersService) Identity() *UsersIdentityCall
- func (s *UsersService) Info(user string) *UsersInfoCall
- func (s *UsersService) List() *UsersListCall
- func (s *UsersService) SetActive() *UsersSetActiveCall
- func (s *UsersService) SetPresence(presence string) *UsersSetPresenceCall
- type UsersSetActiveCall
- type UsersSetPresenceCall
Examples ¶
Constants ¶
const ( ParseFull = "full" ParseNone = "none" )
const ( DefaultAPIEndpoint = "https://slack.com/api/" DefaultOAuth2AuthEndpoint = "https://slack.com/oauth/authorize" DefaultOAuth2TokenEndpoint = "https://slack.com/api/oauth.access" )
DefaultSlackAPIEndpoint contains the prefix used for Slack REST API
const ( ChannelsHistoryScope = "channels:history" ChannelsReadScope = "channels:read" ChannelsWriteScope = "channels:write" ChatWriteBotScope = "chat:write:bot" ChatWriteUserScope = "chat:write:user" DndReadScope = "dnd:read" DndWriteScope = "dnd:write" EmojiReadScope = "emoji:read" FilesReadScope = "files:read" FilesWriteUserScope = "files:write:user" GroupsHistoryScope = "groups:history" GroupsReadScope = "groups:read" GroupsWriteScope = "groups:write" IdentityBasicScope = "identity.basic" ImHistoryScope = "im:history" ImReadScope = "im:read" ImWriteScope = "im:write" LinksWriteScope = "links:write" MpimHistoryScope = "mpim:history" MpimReadScope = "mpim:read" MpimWriteScope = "mpim:write" PinsReadScope = "pins:read" PinsWriteScope = "pins:write" ReactionsReadScope = "reactions:read" ReactionsWriteScope = "reactions:write" RemindersReadScope = "reminders:read" RemindersWriteScope = "reminders:write" SearchReadScope = "search:read" StarsReadScope = "stars:read" StarsWriteScope = "stars:write" TeamReadScope = "team:read" UsergroupsReadScope = "usergroups:read" UsergroupsWriteScope = "usergroups:write" UsersProfileReadScope = "users.profile:read" UsersProfileWriteScope = "users.profile:write" UsersReadScope = "users:read" UsersWriteScope = "users:write" )
These constants match the scopes provided by Slack API
Variables ¶
var OAuth2Endpoint = oauth2.Endpoint{ AuthURL: DefaultOAuth2AuthEndpoint, TokenURL: DefaultOAuth2TokenEndpoint, }
Oauth2Endpoint contains the Slack OAuth2 endpoint configuration
Functions ¶
This section is empty.
Types ¶
type AuthRevokeCall ¶
type AuthRevokeCall struct {
// contains filtered or unexported fields
}
AuthRevokeCall is created by AuthService.Revoke method call
func (*AuthRevokeCall) Do ¶
func (c *AuthRevokeCall) Do(ctx context.Context) error
Do executes the call to access auth.revoke endpoint
func (*AuthRevokeCall) FromValues ¶
func (c *AuthRevokeCall) FromValues(v url.Values) error
FromValues parses the data in v and populates `c`
func (*AuthRevokeCall) Test ¶
func (c *AuthRevokeCall) Test(test bool) *AuthRevokeCall
Test sets the value for optional test parameter
func (*AuthRevokeCall) ValidateArgs ¶
func (c *AuthRevokeCall) ValidateArgs() error
ValidateArgs checks that all required fields are set in the AuthRevokeCall object
type AuthService ¶
type AuthService struct {
// contains filtered or unexported fields
}
AuthService handles Auth related endpoints
func (*AuthService) Revoke ¶
func (s *AuthService) Revoke() *AuthRevokeCall
Revoke creates a AuthRevokeCall object in preparation for accessing the auth.revoke endpoint
func (*AuthService) Test ¶
func (s *AuthService) Test() *AuthTestCall
Test creates a AuthTestCall object in preparation for accessing the auth.test endpoint
type AuthTestCall ¶
type AuthTestCall struct {
// contains filtered or unexported fields
}
AuthTestCall is created by AuthService.Test method call
func (*AuthTestCall) Do ¶
func (c *AuthTestCall) Do(ctx context.Context) (*objects.AuthTestResponse, error)
Do executes the call to access auth.test endpoint
func (*AuthTestCall) FromValues ¶
func (c *AuthTestCall) FromValues(v url.Values) error
FromValues parses the data in v and populates `c`
func (*AuthTestCall) ValidateArgs ¶
func (c *AuthTestCall) ValidateArgs() error
ValidateArgs checks that all required fields are set in the AuthTestCall object
type BotsInfoCall ¶
type BotsInfoCall struct {
// contains filtered or unexported fields
}
BotsInfoCall is created by BotsService.Info method call
func (*BotsInfoCall) FromValues ¶
func (c *BotsInfoCall) FromValues(v url.Values) error
FromValues parses the data in v and populates `c`
func (*BotsInfoCall) ValidateArgs ¶
func (c *BotsInfoCall) ValidateArgs() error
ValidateArgs checks that all required fields are set in the BotsInfoCall object
type BotsService ¶
type BotsService struct {
// contains filtered or unexported fields
}
BotsService handles Bots related endpoints
func (*BotsService) Info ¶
func (s *BotsService) Info(bot string) *BotsInfoCall
Info creates a BotsInfoCall object in preparation for accessing the bots.info endpoint
type ChannelLink ¶
func (*ChannelLink) Data ¶
func (l *ChannelLink) Data() string
func (*ChannelLink) String ¶
func (l *ChannelLink) String() string
func (*ChannelLink) Surface ¶
func (l *ChannelLink) Surface() string
type ChannelsArchiveCall ¶
type ChannelsArchiveCall struct {
// contains filtered or unexported fields
}
ChannelsArchiveCall is created by ChannelsService.Archive method call
func (*ChannelsArchiveCall) Do ¶
func (c *ChannelsArchiveCall) Do(ctx context.Context) error
Do executes the call to access channels.archive endpoint
func (*ChannelsArchiveCall) FromValues ¶
func (c *ChannelsArchiveCall) FromValues(v url.Values) error
FromValues parses the data in v and populates `c`
func (*ChannelsArchiveCall) ValidateArgs ¶
func (c *ChannelsArchiveCall) ValidateArgs() error
ValidateArgs checks that all required fields are set in the ChannelsArchiveCall object
type ChannelsCreateCall ¶
type ChannelsCreateCall struct {
// contains filtered or unexported fields
}
ChannelsCreateCall is created by ChannelsService.Create method call
func (*ChannelsCreateCall) Do ¶
func (c *ChannelsCreateCall) Do(ctx context.Context) error
Do executes the call to access channels.create endpoint
func (*ChannelsCreateCall) FromValues ¶
func (c *ChannelsCreateCall) FromValues(v url.Values) error
FromValues parses the data in v and populates `c`
func (*ChannelsCreateCall) Validate ¶
func (c *ChannelsCreateCall) Validate(validate bool) *ChannelsCreateCall
Validate sets the value for optional validate parameter
func (*ChannelsCreateCall) ValidateArgs ¶
func (c *ChannelsCreateCall) ValidateArgs() error
ValidateArgs checks that all required fields are set in the ChannelsCreateCall object
type ChannelsHistoryCall ¶
type ChannelsHistoryCall struct {
// contains filtered or unexported fields
}
ChannelsHistoryCall is created by ChannelsService.History method call
func (*ChannelsHistoryCall) Count ¶
func (c *ChannelsHistoryCall) Count(count int) *ChannelsHistoryCall
Count sets the value for optional count parameter
func (*ChannelsHistoryCall) Do ¶
func (c *ChannelsHistoryCall) Do(ctx context.Context) (*objects.ChannelsHistoryResponse, error)
Do executes the call to access channels.history endpoint
func (*ChannelsHistoryCall) FromValues ¶
func (c *ChannelsHistoryCall) FromValues(v url.Values) error
FromValues parses the data in v and populates `c`
func (*ChannelsHistoryCall) Inclusive ¶
func (c *ChannelsHistoryCall) Inclusive(inclusive bool) *ChannelsHistoryCall
Inclusive sets the value for optional inclusive parameter
func (*ChannelsHistoryCall) Latest ¶
func (c *ChannelsHistoryCall) Latest(latest string) *ChannelsHistoryCall
Latest sets the value for optional latest parameter
func (*ChannelsHistoryCall) Oldest ¶
func (c *ChannelsHistoryCall) Oldest(oldest string) *ChannelsHistoryCall
Oldest sets the value for optional oldest parameter
func (*ChannelsHistoryCall) Timestamp ¶
func (c *ChannelsHistoryCall) Timestamp(timestamp string) *ChannelsHistoryCall
Timestamp sets the value for optional timestamp parameter
func (*ChannelsHistoryCall) Unreads ¶
func (c *ChannelsHistoryCall) Unreads(unreads bool) *ChannelsHistoryCall
Unreads sets the value for optional unreads parameter
func (*ChannelsHistoryCall) ValidateArgs ¶
func (c *ChannelsHistoryCall) ValidateArgs() error
ValidateArgs checks that all required fields are set in the ChannelsHistoryCall object
type ChannelsInfoCall ¶
type ChannelsInfoCall struct {
// contains filtered or unexported fields
}
ChannelsInfoCall is created by ChannelsService.Info method call
func (*ChannelsInfoCall) FromValues ¶
func (c *ChannelsInfoCall) FromValues(v url.Values) error
FromValues parses the data in v and populates `c`
func (*ChannelsInfoCall) IncludeLocale ¶
func (c *ChannelsInfoCall) IncludeLocale(includeLocale bool) *ChannelsInfoCall
IncludeLocale sets the value for optional includeLocale parameter
func (*ChannelsInfoCall) ValidateArgs ¶
func (c *ChannelsInfoCall) ValidateArgs() error
ValidateArgs checks that all required fields are set in the ChannelsInfoCall object
type ChannelsInviteCall ¶
type ChannelsInviteCall struct {
// contains filtered or unexported fields
}
ChannelsInviteCall is created by ChannelsService.Invite method call
func (*ChannelsInviteCall) FromValues ¶
func (c *ChannelsInviteCall) FromValues(v url.Values) error
FromValues parses the data in v and populates `c`
func (*ChannelsInviteCall) ValidateArgs ¶
func (c *ChannelsInviteCall) ValidateArgs() error
ValidateArgs checks that all required fields are set in the ChannelsInviteCall object
type ChannelsJoinCall ¶
type ChannelsJoinCall struct {
// contains filtered or unexported fields
}
ChannelsJoinCall is created by ChannelsService.Join method call
func (*ChannelsJoinCall) FromValues ¶
func (c *ChannelsJoinCall) FromValues(v url.Values) error
FromValues parses the data in v and populates `c`
func (*ChannelsJoinCall) Validate ¶
func (c *ChannelsJoinCall) Validate(validate bool) *ChannelsJoinCall
Validate sets the value for optional validate parameter
func (*ChannelsJoinCall) ValidateArgs ¶
func (c *ChannelsJoinCall) ValidateArgs() error
ValidateArgs checks that all required fields are set in the ChannelsJoinCall object
type ChannelsKickCall ¶
type ChannelsKickCall struct {
// contains filtered or unexported fields
}
ChannelsKickCall is created by ChannelsService.Kick method call
func (*ChannelsKickCall) Do ¶
func (c *ChannelsKickCall) Do(ctx context.Context) error
Do executes the call to access channels.kick endpoint
func (*ChannelsKickCall) FromValues ¶
func (c *ChannelsKickCall) FromValues(v url.Values) error
FromValues parses the data in v and populates `c`
func (*ChannelsKickCall) ValidateArgs ¶
func (c *ChannelsKickCall) ValidateArgs() error
ValidateArgs checks that all required fields are set in the ChannelsKickCall object
type ChannelsLeaveCall ¶
type ChannelsLeaveCall struct {
// contains filtered or unexported fields
}
ChannelsLeaveCall is created by ChannelsService.Leave method call
func (*ChannelsLeaveCall) Do ¶
func (c *ChannelsLeaveCall) Do(ctx context.Context) error
Do executes the call to access channels.leave endpoint
func (*ChannelsLeaveCall) FromValues ¶
func (c *ChannelsLeaveCall) FromValues(v url.Values) error
FromValues parses the data in v and populates `c`
func (*ChannelsLeaveCall) ValidateArgs ¶
func (c *ChannelsLeaveCall) ValidateArgs() error
ValidateArgs checks that all required fields are set in the ChannelsLeaveCall object
type ChannelsListCall ¶
type ChannelsListCall struct {
// contains filtered or unexported fields
}
ChannelsListCall is created by ChannelsService.List method call
func (*ChannelsListCall) Do ¶
func (c *ChannelsListCall) Do(ctx context.Context) (objects.ChannelList, error)
Do executes the call to access channels.list endpoint
func (*ChannelsListCall) ExcludeArchive ¶
func (c *ChannelsListCall) ExcludeArchive(excludeArchive bool) *ChannelsListCall
ExcludeArchive sets the value for optional excludeArchive parameter
func (*ChannelsListCall) ExcludeMembers ¶
func (c *ChannelsListCall) ExcludeMembers(excludeMembers bool) *ChannelsListCall
ExcludeMembers sets the value for optional excludeMembers parameter
func (*ChannelsListCall) FromValues ¶
func (c *ChannelsListCall) FromValues(v url.Values) error
FromValues parses the data in v and populates `c`
func (*ChannelsListCall) Limit ¶
func (c *ChannelsListCall) Limit(limit int) *ChannelsListCall
Limit sets the value for optional limit parameter
func (*ChannelsListCall) ValidateArgs ¶
func (c *ChannelsListCall) ValidateArgs() error
ValidateArgs checks that all required fields are set in the ChannelsListCall object
type ChannelsMarkCall ¶
type ChannelsMarkCall struct {
// contains filtered or unexported fields
}
ChannelsMarkCall is created by ChannelsService.Mark method call
func (*ChannelsMarkCall) Do ¶
func (c *ChannelsMarkCall) Do(ctx context.Context) error
Do executes the call to access channels.mark endpoint
func (*ChannelsMarkCall) FromValues ¶
func (c *ChannelsMarkCall) FromValues(v url.Values) error
FromValues parses the data in v and populates `c`
func (*ChannelsMarkCall) Timestamp ¶
func (c *ChannelsMarkCall) Timestamp(timestamp string) *ChannelsMarkCall
Timestamp sets the value for optional timestamp parameter
func (*ChannelsMarkCall) ValidateArgs ¶
func (c *ChannelsMarkCall) ValidateArgs() error
ValidateArgs checks that all required fields are set in the ChannelsMarkCall object
type ChannelsRenameCall ¶
type ChannelsRenameCall struct {
// contains filtered or unexported fields
}
ChannelsRenameCall is created by ChannelsService.Rename method call
func (*ChannelsRenameCall) FromValues ¶
func (c *ChannelsRenameCall) FromValues(v url.Values) error
FromValues parses the data in v and populates `c`
func (*ChannelsRenameCall) Validate ¶
func (c *ChannelsRenameCall) Validate(validate bool) *ChannelsRenameCall
Validate sets the value for optional validate parameter
func (*ChannelsRenameCall) ValidateArgs ¶
func (c *ChannelsRenameCall) ValidateArgs() error
ValidateArgs checks that all required fields are set in the ChannelsRenameCall object
type ChannelsRepliesCall ¶
type ChannelsRepliesCall struct {
// contains filtered or unexported fields
}
ChannelsRepliesCall is created by ChannelsService.Replies method call
func (*ChannelsRepliesCall) Do ¶
func (c *ChannelsRepliesCall) Do(ctx context.Context) (objects.MessageList, error)
Do executes the call to access channels.replies endpoint
func (*ChannelsRepliesCall) FromValues ¶
func (c *ChannelsRepliesCall) FromValues(v url.Values) error
FromValues parses the data in v and populates `c`
func (*ChannelsRepliesCall) ValidateArgs ¶
func (c *ChannelsRepliesCall) ValidateArgs() error
ValidateArgs checks that all required fields are set in the ChannelsRepliesCall object
type ChannelsService ¶
type ChannelsService struct {
// contains filtered or unexported fields
}
ChannelsService handles Channels related endpoints
func (*ChannelsService) Archive ¶
func (s *ChannelsService) Archive(channel string) *ChannelsArchiveCall
Archive creates a ChannelsArchiveCall object in preparation for accessing the channels.archive endpoint
func (*ChannelsService) Create ¶
func (s *ChannelsService) Create(name string) *ChannelsCreateCall
Create creates a ChannelsCreateCall object in preparation for accessing the channels.create endpoint
func (*ChannelsService) History ¶
func (s *ChannelsService) History(channel string) *ChannelsHistoryCall
History creates a ChannelsHistoryCall object in preparation for accessing the channels.history endpoint
func (*ChannelsService) Info ¶
func (s *ChannelsService) Info(channel string) *ChannelsInfoCall
Info creates a ChannelsInfoCall object in preparation for accessing the channels.info endpoint
func (*ChannelsService) Invite ¶
func (s *ChannelsService) Invite(channel string, user string) *ChannelsInviteCall
Invite creates a ChannelsInviteCall object in preparation for accessing the channels.invite endpoint
func (*ChannelsService) Join ¶
func (s *ChannelsService) Join(name string) *ChannelsJoinCall
Join creates a ChannelsJoinCall object in preparation for accessing the channels.join endpoint
func (*ChannelsService) Kick ¶
func (s *ChannelsService) Kick(channel string, user string) *ChannelsKickCall
Kick creates a ChannelsKickCall object in preparation for accessing the channels.kick endpoint
func (*ChannelsService) Leave ¶
func (s *ChannelsService) Leave(channel string) *ChannelsLeaveCall
Leave creates a ChannelsLeaveCall object in preparation for accessing the channels.leave endpoint
func (*ChannelsService) List ¶
func (s *ChannelsService) List() *ChannelsListCall
List creates a ChannelsListCall object in preparation for accessing the channels.list endpoint
func (*ChannelsService) Mark ¶
func (s *ChannelsService) Mark(channel string) *ChannelsMarkCall
Mark creates a ChannelsMarkCall object in preparation for accessing the channels.mark endpoint
func (*ChannelsService) Rename ¶
func (s *ChannelsService) Rename(channel string, name string) *ChannelsRenameCall
Rename creates a ChannelsRenameCall object in preparation for accessing the channels.rename endpoint
func (*ChannelsService) Replies ¶
func (s *ChannelsService) Replies(channel string, threadTimestamp string) *ChannelsRepliesCall
Replies creates a ChannelsRepliesCall object in preparation for accessing the channels.replies endpoint
func (*ChannelsService) SetPurpose ¶
func (s *ChannelsService) SetPurpose(channel string, purpose string) *ChannelsSetPurposeCall
SetPurpose creates a ChannelsSetPurposeCall object in preparation for accessing the channels.setPurpose endpoint
func (*ChannelsService) SetTopic ¶
func (s *ChannelsService) SetTopic(channel string, topic string) *ChannelsSetTopicCall
SetTopic creates a ChannelsSetTopicCall object in preparation for accessing the channels.setTopic endpoint
func (*ChannelsService) Unarchive ¶
func (s *ChannelsService) Unarchive(channel string) *ChannelsUnarchiveCall
Unarchive creates a ChannelsUnarchiveCall object in preparation for accessing the channels.unarchive endpoint
type ChannelsSetPurposeCall ¶
type ChannelsSetPurposeCall struct {
// contains filtered or unexported fields
}
ChannelsSetPurposeCall is created by ChannelsService.SetPurpose method call
func (*ChannelsSetPurposeCall) Do ¶
func (c *ChannelsSetPurposeCall) Do(ctx context.Context) (*string, error)
Do executes the call to access channels.setPurpose endpoint
func (*ChannelsSetPurposeCall) FromValues ¶
func (c *ChannelsSetPurposeCall) FromValues(v url.Values) error
FromValues parses the data in v and populates `c`
func (*ChannelsSetPurposeCall) ValidateArgs ¶
func (c *ChannelsSetPurposeCall) ValidateArgs() error
ValidateArgs checks that all required fields are set in the ChannelsSetPurposeCall object
type ChannelsSetTopicCall ¶
type ChannelsSetTopicCall struct {
// contains filtered or unexported fields
}
ChannelsSetTopicCall is created by ChannelsService.SetTopic method call
func (*ChannelsSetTopicCall) Do ¶
func (c *ChannelsSetTopicCall) Do(ctx context.Context) (*string, error)
Do executes the call to access channels.setTopic endpoint
func (*ChannelsSetTopicCall) FromValues ¶
func (c *ChannelsSetTopicCall) FromValues(v url.Values) error
FromValues parses the data in v and populates `c`
func (*ChannelsSetTopicCall) ValidateArgs ¶
func (c *ChannelsSetTopicCall) ValidateArgs() error
ValidateArgs checks that all required fields are set in the ChannelsSetTopicCall object
type ChannelsUnarchiveCall ¶
type ChannelsUnarchiveCall struct {
// contains filtered or unexported fields
}
ChannelsUnarchiveCall is created by ChannelsService.Unarchive method call
func (*ChannelsUnarchiveCall) Do ¶
func (c *ChannelsUnarchiveCall) Do(ctx context.Context) error
Do executes the call to access channels.unarchive endpoint
func (*ChannelsUnarchiveCall) FromValues ¶
func (c *ChannelsUnarchiveCall) FromValues(v url.Values) error
FromValues parses the data in v and populates `c`
func (*ChannelsUnarchiveCall) ValidateArgs ¶
func (c *ChannelsUnarchiveCall) ValidateArgs() error
ValidateArgs checks that all required fields are set in the ChannelsUnarchiveCall object
type ChatDeleteCall ¶
type ChatDeleteCall struct {
// contains filtered or unexported fields
}
ChatDeleteCall is created by ChatService.Delete method call
func (*ChatDeleteCall) AsUser ¶
func (c *ChatDeleteCall) AsUser(asUser bool) *ChatDeleteCall
AsUser sets the value for optional asUser parameter
func (*ChatDeleteCall) Do ¶
func (c *ChatDeleteCall) Do(ctx context.Context) (*objects.ChatResponse, error)
Do executes the call to access chat.delete endpoint
func (*ChatDeleteCall) FromValues ¶
func (c *ChatDeleteCall) FromValues(v url.Values) error
FromValues parses the data in v and populates `c`
func (*ChatDeleteCall) Timestamp ¶
func (c *ChatDeleteCall) Timestamp(timestamp string) *ChatDeleteCall
Timestamp sets the value for optional timestamp parameter
func (*ChatDeleteCall) ValidateArgs ¶
func (c *ChatDeleteCall) ValidateArgs() error
ValidateArgs checks that all required fields are set in the ChatDeleteCall object
type ChatMeMessageCall ¶
type ChatMeMessageCall struct {
// contains filtered or unexported fields
}
ChatMeMessageCall is created by ChatService.MeMessage method call
func (*ChatMeMessageCall) Do ¶
func (c *ChatMeMessageCall) Do(ctx context.Context) (*objects.ChatResponse, error)
Do executes the call to access chat.meMessage endpoint
func (*ChatMeMessageCall) FromValues ¶
func (c *ChatMeMessageCall) FromValues(v url.Values) error
FromValues parses the data in v and populates `c`
func (*ChatMeMessageCall) Text ¶
func (c *ChatMeMessageCall) Text(text string) *ChatMeMessageCall
Text sets the value for optional text parameter
func (*ChatMeMessageCall) ValidateArgs ¶
func (c *ChatMeMessageCall) ValidateArgs() error
ValidateArgs checks that all required fields are set in the ChatMeMessageCall object
type ChatPostMessageCall ¶
type ChatPostMessageCall struct {
// contains filtered or unexported fields
}
ChatPostMessageCall is created by ChatService.PostMessage method call
func (*ChatPostMessageCall) AsUser ¶
func (c *ChatPostMessageCall) AsUser(asUser bool) *ChatPostMessageCall
AsUser sets the value for optional asUser parameter
func (*ChatPostMessageCall) Attachment ¶
func (c *ChatPostMessageCall) Attachment(attachment *objects.Attachment) *ChatPostMessageCall
Attachment appends to the attachments list
func (*ChatPostMessageCall) Do ¶
func (c *ChatPostMessageCall) Do(ctx context.Context) (*objects.ChatResponse, error)
Do executes the call to access chat.postMessage endpoint
func (*ChatPostMessageCall) EscapeText ¶
func (c *ChatPostMessageCall) EscapeText(escapeText bool) *ChatPostMessageCall
EscapeText sets the value for optional escapeText parameter
func (*ChatPostMessageCall) FromValues ¶
func (c *ChatPostMessageCall) FromValues(v url.Values) error
FromValues parses the data in v and populates `c`
func (*ChatPostMessageCall) IconEmoji ¶
func (c *ChatPostMessageCall) IconEmoji(iconEmoji string) *ChatPostMessageCall
IconEmoji sets the value for optional iconEmoji parameter
func (*ChatPostMessageCall) IconURL ¶
func (c *ChatPostMessageCall) IconURL(iconURL string) *ChatPostMessageCall
IconURL sets the value for optional iconURL parameter
func (*ChatPostMessageCall) LinkNames ¶
func (c *ChatPostMessageCall) LinkNames(linkNames bool) *ChatPostMessageCall
LinkNames sets the value for optional linkNames parameter
func (*ChatPostMessageCall) Markdown ¶
func (c *ChatPostMessageCall) Markdown(markdown bool) *ChatPostMessageCall
Markdown sets the value for optional markdown parameter
func (*ChatPostMessageCall) Parse ¶
func (c *ChatPostMessageCall) Parse(parse string) *ChatPostMessageCall
Parse sets the value for optional parse parameter
func (*ChatPostMessageCall) SetAttachments ¶
func (c *ChatPostMessageCall) SetAttachments(attachments objects.AttachmentList) *ChatPostMessageCall
SetAttachments sets the attachments list
func (*ChatPostMessageCall) Text ¶
func (c *ChatPostMessageCall) Text(text string) *ChatPostMessageCall
Text sets the value for optional text parameter
func (*ChatPostMessageCall) UnfurlLinks ¶
func (c *ChatPostMessageCall) UnfurlLinks(unfurlLinks bool) *ChatPostMessageCall
UnfurlLinks sets the value for optional unfurlLinks parameter
func (*ChatPostMessageCall) UnfurlMedia ¶
func (c *ChatPostMessageCall) UnfurlMedia(unfurlMedia bool) *ChatPostMessageCall
UnfurlMedia sets the value for optional unfurlMedia parameter
func (*ChatPostMessageCall) Username ¶
func (c *ChatPostMessageCall) Username(username string) *ChatPostMessageCall
Username sets the value for optional username parameter
func (*ChatPostMessageCall) ValidateArgs ¶
func (c *ChatPostMessageCall) ValidateArgs() error
ValidateArgs checks that all required fields are set in the ChatPostMessageCall object
type ChatService ¶
type ChatService struct {
// contains filtered or unexported fields
}
ChatService handles Chat related endpoints
func (*ChatService) Delete ¶
func (s *ChatService) Delete(channel string) *ChatDeleteCall
Delete creates a ChatDeleteCall object in preparation for accessing the chat.delete endpoint
func (*ChatService) MeMessage ¶
func (s *ChatService) MeMessage(channel string) *ChatMeMessageCall
MeMessage creates a ChatMeMessageCall object in preparation for accessing the chat.meMessage endpoint
func (*ChatService) PostMessage ¶
func (s *ChatService) PostMessage(channel string) *ChatPostMessageCall
PostMessage creates a ChatPostMessageCall object in preparation for accessing the chat.postMessage endpoint
func (*ChatService) Unfurl ¶
func (s *ChatService) Unfurl(channel string, timestamp string, unfurls string) *ChatUnfurlCall
Unfurl creates a ChatUnfurlCall object in preparation for accessing the chat.unfurl endpoint
func (*ChatService) Update ¶
func (s *ChatService) Update(channel string) *ChatUpdateCall
Update creates a ChatUpdateCall object in preparation for accessing the chat.update endpoint
type ChatUnfurlCall ¶
type ChatUnfurlCall struct {
// contains filtered or unexported fields
}
ChatUnfurlCall is created by ChatService.Unfurl method call
func (*ChatUnfurlCall) Do ¶
func (c *ChatUnfurlCall) Do(ctx context.Context) error
Do executes the call to access chat.unfurl endpoint
func (*ChatUnfurlCall) FromValues ¶
func (c *ChatUnfurlCall) FromValues(v url.Values) error
FromValues parses the data in v and populates `c`
func (*ChatUnfurlCall) UserAuthRequired ¶
func (c *ChatUnfurlCall) UserAuthRequired(userAuthRequired bool) *ChatUnfurlCall
UserAuthRequired sets the value for optional userAuthRequired parameter
func (*ChatUnfurlCall) ValidateArgs ¶
func (c *ChatUnfurlCall) ValidateArgs() error
ValidateArgs checks that all required fields are set in the ChatUnfurlCall object
type ChatUpdateCall ¶
type ChatUpdateCall struct {
// contains filtered or unexported fields
}
ChatUpdateCall is created by ChatService.Update method call
func (*ChatUpdateCall) AsUser ¶
func (c *ChatUpdateCall) AsUser(asUser bool) *ChatUpdateCall
AsUser sets the value for optional asUser parameter
func (*ChatUpdateCall) Attachment ¶
func (c *ChatUpdateCall) Attachment(attachment *objects.Attachment) *ChatUpdateCall
Attachment appends to the attachments list
func (*ChatUpdateCall) Do ¶
func (c *ChatUpdateCall) Do(ctx context.Context) (*objects.ChatResponse, error)
Do executes the call to access chat.update endpoint
func (*ChatUpdateCall) FromValues ¶
func (c *ChatUpdateCall) FromValues(v url.Values) error
FromValues parses the data in v and populates `c`
func (*ChatUpdateCall) LinkNames ¶
func (c *ChatUpdateCall) LinkNames(linkNames bool) *ChatUpdateCall
LinkNames sets the value for optional linkNames parameter
func (*ChatUpdateCall) Parse ¶
func (c *ChatUpdateCall) Parse(parse string) *ChatUpdateCall
Parse sets the value for optional parse parameter
func (*ChatUpdateCall) SetAttachments ¶
func (c *ChatUpdateCall) SetAttachments(attachments objects.AttachmentList) *ChatUpdateCall
SetAttachments sets the attachments list
func (*ChatUpdateCall) Text ¶
func (c *ChatUpdateCall) Text(text string) *ChatUpdateCall
Text sets the value for optional text parameter
func (*ChatUpdateCall) Timestamp ¶
func (c *ChatUpdateCall) Timestamp(timestamp string) *ChatUpdateCall
Timestamp sets the value for optional timestamp parameter
func (*ChatUpdateCall) ValidateArgs ¶
func (c *ChatUpdateCall) ValidateArgs() error
ValidateArgs checks that all required fields are set in the ChatUpdateCall object
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Example ¶
package main import ( "context" "fmt" "os" slack "github.com/lestrrat/go-slack" ) func main() { ctx, cancel := context.WithCancel(context.Background()) defer cancel() token := os.Getenv("SLACK_TOKEN") cl := slack.New(token) // check if we are connected authres, err := cl.Auth().Test().Do(ctx) if err != nil { fmt.Printf("failed to test authentication: %s\n", err) return } fmt.Printf("%#v\n", authres) // simplest possible message chatres, err := cl.Chat().PostMessage("@username"). Text("Hello, World!"). Do(ctx) if err != nil { fmt.Printf("failed to post messsage: %s\n", err) return } fmt.Printf("%#v\n", chatres) }
Output:
func New ¶
New creates a new REST Slack API client. The `token` is required. Other optional parameters can be passed using the various `WithXXXX` functions
func (*Client) Auth ¶
func (c *Client) Auth() *AuthService
Auth returns the Service object for `auth.*` endpoints
func (*Client) Bots ¶
func (c *Client) Bots() *BotsService
Bots returns the Service object for `bots.*` endpoints
func (*Client) Channels ¶
func (c *Client) Channels() *ChannelsService
Channels returns the Service object for `channels.*` endpoints
func (*Client) Chat ¶
func (c *Client) Chat() *ChatService
Chat returns the Service object for `chat.*` endpoints
func (*Client) Emoji ¶
func (c *Client) Emoji() *EmojiService
Emoji returns the Service object for `emoji.*` endpoints
func (*Client) Groups ¶
func (c *Client) Groups() *GroupsService
Groups returns the Service object for `emoji.*` endpoints
func (*Client) OAuth ¶
func (c *Client) OAuth() *OAuthService
OAuth returns the Service object for `oauth.*` endpoints
func (*Client) RTM ¶
func (c *Client) RTM() *RTMService
RTM returns the Service object for `rtm.*` endpoints
func (*Client) Reactions ¶
func (c *Client) Reactions() *ReactionsService
Reactions returns the Service object for `reactions.*` endpoints
func (*Client) Reminders ¶
func (c *Client) Reminders() *RemindersService
Reminders returns the Service object for `reminders.*` endpoints
func (*Client) Usergroups ¶
func (c *Client) Usergroups() *UsergroupsService
Usergroups returns the Service object for `usergroups.*` endpoints
func (*Client) UsergroupsUsers ¶
func (c *Client) UsergroupsUsers() *UsergroupsUsersService
UsergroupsUsers returns the Service object for `usergroups.users.*` endpoints
func (*Client) Users ¶
func (c *Client) Users() *UsersService
Users returns the Service object for `users.*` endpoints
func (*Client) UsersProfile ¶
func (c *Client) UsersProfile() *UsersProfileService
UsersProfile returns the Service object for `users.profile.*` endpoints
type ControlSequence ¶
func ExtractControlSequences ¶
func ExtractControlSequences(s string) ([]ControlSequence, error)
https://api.slack.com/docs/message-formatting#control_sequences
func ParseControlSequence ¶
func ParseControlSequence(s string) (ControlSequence, error)
type EmojiListCall ¶
type EmojiListCall struct {
// contains filtered or unexported fields
}
EmojiListCall is created by EmojiService.List method call
func (*EmojiListCall) Do ¶
func (c *EmojiListCall) Do(ctx context.Context) (*objects.EmojiListResponse, error)
Do executes the call to access emoji.list endpoint
func (*EmojiListCall) FromValues ¶
func (c *EmojiListCall) FromValues(v url.Values) error
FromValues parses the data in v and populates `c`
func (*EmojiListCall) ValidateArgs ¶
func (c *EmojiListCall) ValidateArgs() error
ValidateArgs checks that all required fields are set in the EmojiListCall object
type EmojiService ¶
type EmojiService struct {
// contains filtered or unexported fields
}
EmojiService handles Emoji related endpoints
func (*EmojiService) List ¶
func (s *EmojiService) List() *EmojiListCall
List creates a EmojiListCall object in preparation for accessing the emoji.list endpoint
type ExternalLink ¶
func (*ExternalLink) Data ¶
func (l *ExternalLink) Data() string
func (*ExternalLink) String ¶
func (l *ExternalLink) String() string
func (*ExternalLink) Surface ¶
func (l *ExternalLink) Surface() string
type GroupsArchiveCall ¶
type GroupsArchiveCall struct {
// contains filtered or unexported fields
}
GroupsArchiveCall is created by GroupsService.Archive method call
func (*GroupsArchiveCall) Do ¶
func (c *GroupsArchiveCall) Do(ctx context.Context) error
Do executes the call to access groups.archive endpoint
func (*GroupsArchiveCall) FromValues ¶
func (c *GroupsArchiveCall) FromValues(v url.Values) error
FromValues parses the data in v and populates `c`
func (*GroupsArchiveCall) ValidateArgs ¶
func (c *GroupsArchiveCall) ValidateArgs() error
ValidateArgs checks that all required fields are set in the GroupsArchiveCall object
type GroupsCreateCall ¶
type GroupsCreateCall struct {
// contains filtered or unexported fields
}
GroupsCreateCall is created by GroupsService.Create method call
func (*GroupsCreateCall) FromValues ¶
func (c *GroupsCreateCall) FromValues(v url.Values) error
FromValues parses the data in v and populates `c`
func (*GroupsCreateCall) Validate ¶
func (c *GroupsCreateCall) Validate(validate bool) *GroupsCreateCall
Validate sets the value for optional validate parameter
func (*GroupsCreateCall) ValidateArgs ¶
func (c *GroupsCreateCall) ValidateArgs() error
ValidateArgs checks that all required fields are set in the GroupsCreateCall object
type GroupsCreateChildCall ¶
type GroupsCreateChildCall struct {
// contains filtered or unexported fields
}
GroupsCreateChildCall is created by GroupsService.CreateChild method call
func (*GroupsCreateChildCall) FromValues ¶
func (c *GroupsCreateChildCall) FromValues(v url.Values) error
FromValues parses the data in v and populates `c`
func (*GroupsCreateChildCall) ValidateArgs ¶
func (c *GroupsCreateChildCall) ValidateArgs() error
ValidateArgs checks that all required fields are set in the GroupsCreateChildCall object
type GroupsHistoryCall ¶
type GroupsHistoryCall struct {
// contains filtered or unexported fields
}
GroupsHistoryCall is created by GroupsService.History method call
func (*GroupsHistoryCall) Count ¶
func (c *GroupsHistoryCall) Count(count int) *GroupsHistoryCall
Count sets the value for optional count parameter
func (*GroupsHistoryCall) Do ¶
func (c *GroupsHistoryCall) Do(ctx context.Context) (*string, objects.MessageList, error)
Do executes the call to access groups.history endpoint
func (*GroupsHistoryCall) FromValues ¶
func (c *GroupsHistoryCall) FromValues(v url.Values) error
FromValues parses the data in v and populates `c`
func (*GroupsHistoryCall) Inclusive ¶
func (c *GroupsHistoryCall) Inclusive(inclusive bool) *GroupsHistoryCall
Inclusive sets the value for optional inclusive parameter
func (*GroupsHistoryCall) Latest ¶
func (c *GroupsHistoryCall) Latest(latest string) *GroupsHistoryCall
Latest sets the value for optional latest parameter
func (*GroupsHistoryCall) Oldest ¶
func (c *GroupsHistoryCall) Oldest(oldest string) *GroupsHistoryCall
Oldest sets the value for optional oldest parameter
func (*GroupsHistoryCall) Unreads ¶
func (c *GroupsHistoryCall) Unreads(unreads bool) *GroupsHistoryCall
Unreads sets the value for optional unreads parameter
func (*GroupsHistoryCall) ValidateArgs ¶
func (c *GroupsHistoryCall) ValidateArgs() error
ValidateArgs checks that all required fields are set in the GroupsHistoryCall object
type GroupsInfoCall ¶
type GroupsInfoCall struct {
// contains filtered or unexported fields
}
GroupsInfoCall is created by GroupsService.Info method call
func (*GroupsInfoCall) FromValues ¶
func (c *GroupsInfoCall) FromValues(v url.Values) error
FromValues parses the data in v and populates `c`
func (*GroupsInfoCall) IncludeLocale ¶
func (c *GroupsInfoCall) IncludeLocale(includeLocale bool) *GroupsInfoCall
IncludeLocale sets the value for optional includeLocale parameter
func (*GroupsInfoCall) ValidateArgs ¶
func (c *GroupsInfoCall) ValidateArgs() error
ValidateArgs checks that all required fields are set in the GroupsInfoCall object
type GroupsInviteCall ¶
type GroupsInviteCall struct {
// contains filtered or unexported fields
}
GroupsInviteCall is created by GroupsService.Invite method call
func (*GroupsInviteCall) FromValues ¶
func (c *GroupsInviteCall) FromValues(v url.Values) error
FromValues parses the data in v and populates `c`
func (*GroupsInviteCall) ValidateArgs ¶
func (c *GroupsInviteCall) ValidateArgs() error
ValidateArgs checks that all required fields are set in the GroupsInviteCall object
type GroupsKickCall ¶
type GroupsKickCall struct {
// contains filtered or unexported fields
}
GroupsKickCall is created by GroupsService.Kick method call
func (*GroupsKickCall) Do ¶
func (c *GroupsKickCall) Do(ctx context.Context) error
Do executes the call to access groups.kick endpoint
func (*GroupsKickCall) FromValues ¶
func (c *GroupsKickCall) FromValues(v url.Values) error
FromValues parses the data in v and populates `c`
func (*GroupsKickCall) ValidateArgs ¶
func (c *GroupsKickCall) ValidateArgs() error
ValidateArgs checks that all required fields are set in the GroupsKickCall object
type GroupsLeaveCall ¶
type GroupsLeaveCall struct {
// contains filtered or unexported fields
}
GroupsLeaveCall is created by GroupsService.Leave method call
func (*GroupsLeaveCall) Do ¶
func (c *GroupsLeaveCall) Do(ctx context.Context) error
Do executes the call to access groups.leave endpoint
func (*GroupsLeaveCall) FromValues ¶
func (c *GroupsLeaveCall) FromValues(v url.Values) error
FromValues parses the data in v and populates `c`
func (*GroupsLeaveCall) ValidateArgs ¶
func (c *GroupsLeaveCall) ValidateArgs() error
ValidateArgs checks that all required fields are set in the GroupsLeaveCall object
type GroupsListCall ¶
type GroupsListCall struct {
// contains filtered or unexported fields
}
GroupsListCall is created by GroupsService.List method call
func (*GroupsListCall) ExcludeArchived ¶
func (c *GroupsListCall) ExcludeArchived(excludeArchived bool) *GroupsListCall
ExcludeArchived sets the value for optional excludeArchived parameter
func (*GroupsListCall) ExcludeMembers ¶
func (c *GroupsListCall) ExcludeMembers(excludeMembers bool) *GroupsListCall
ExcludeMembers sets the value for optional excludeMembers parameter
func (*GroupsListCall) FromValues ¶
func (c *GroupsListCall) FromValues(v url.Values) error
FromValues parses the data in v and populates `c`
func (*GroupsListCall) ValidateArgs ¶
func (c *GroupsListCall) ValidateArgs() error
ValidateArgs checks that all required fields are set in the GroupsListCall object
type GroupsMarkCall ¶
type GroupsMarkCall struct {
// contains filtered or unexported fields
}
GroupsMarkCall is created by GroupsService.Mark method call
func (*GroupsMarkCall) Do ¶
func (c *GroupsMarkCall) Do(ctx context.Context) error
Do executes the call to access groups.mark endpoint
func (*GroupsMarkCall) FromValues ¶
func (c *GroupsMarkCall) FromValues(v url.Values) error
FromValues parses the data in v and populates `c`
func (*GroupsMarkCall) ValidateArgs ¶
func (c *GroupsMarkCall) ValidateArgs() error
ValidateArgs checks that all required fields are set in the GroupsMarkCall object
type GroupsOpenCall ¶
type GroupsOpenCall struct {
// contains filtered or unexported fields
}
GroupsOpenCall is created by GroupsService.Open method call
func (*GroupsOpenCall) Do ¶
func (c *GroupsOpenCall) Do(ctx context.Context) error
Do executes the call to access groups.open endpoint
func (*GroupsOpenCall) FromValues ¶
func (c *GroupsOpenCall) FromValues(v url.Values) error
FromValues parses the data in v and populates `c`
func (*GroupsOpenCall) ValidateArgs ¶
func (c *GroupsOpenCall) ValidateArgs() error
ValidateArgs checks that all required fields are set in the GroupsOpenCall object
type GroupsRenameCall ¶
type GroupsRenameCall struct {
// contains filtered or unexported fields
}
GroupsRenameCall is created by GroupsService.Rename method call
func (*GroupsRenameCall) FromValues ¶
func (c *GroupsRenameCall) FromValues(v url.Values) error
FromValues parses the data in v and populates `c`
func (*GroupsRenameCall) Validate ¶
func (c *GroupsRenameCall) Validate(validate bool) *GroupsRenameCall
Validate sets the value for optional validate parameter
func (*GroupsRenameCall) ValidateArgs ¶
func (c *GroupsRenameCall) ValidateArgs() error
ValidateArgs checks that all required fields are set in the GroupsRenameCall object
type GroupsRepliesCall ¶
type GroupsRepliesCall struct {
// contains filtered or unexported fields
}
GroupsRepliesCall is created by GroupsService.Replies method call
func (*GroupsRepliesCall) Do ¶
func (c *GroupsRepliesCall) Do(ctx context.Context) (objects.MessageList, *objects.ThreadInfo, error)
Do executes the call to access groups.replies endpoint
func (*GroupsRepliesCall) FromValues ¶
func (c *GroupsRepliesCall) FromValues(v url.Values) error
FromValues parses the data in v and populates `c`
func (*GroupsRepliesCall) ValidateArgs ¶
func (c *GroupsRepliesCall) ValidateArgs() error
ValidateArgs checks that all required fields are set in the GroupsRepliesCall object
type GroupsService ¶
type GroupsService struct {
// contains filtered or unexported fields
}
GroupsService handles Groups related endpoints
func (*GroupsService) Archive ¶
func (s *GroupsService) Archive(channel string) *GroupsArchiveCall
Archive creates a GroupsArchiveCall object in preparation for accessing the groups.archive endpoint
func (*GroupsService) Create ¶
func (s *GroupsService) Create(name string) *GroupsCreateCall
Create creates a GroupsCreateCall object in preparation for accessing the groups.create endpoint
func (*GroupsService) CreateChild ¶
func (s *GroupsService) CreateChild(channel string) *GroupsCreateChildCall
CreateChild creates a GroupsCreateChildCall object in preparation for accessing the groups.createChild endpoint
func (*GroupsService) History ¶
func (s *GroupsService) History(channel string) *GroupsHistoryCall
History creates a GroupsHistoryCall object in preparation for accessing the groups.history endpoint
func (*GroupsService) Info ¶
func (s *GroupsService) Info(channel string) *GroupsInfoCall
Info creates a GroupsInfoCall object in preparation for accessing the groups.info endpoint
func (*GroupsService) Invite ¶
func (s *GroupsService) Invite(channel string, user string) *GroupsInviteCall
Invite creates a GroupsInviteCall object in preparation for accessing the groups.invite endpoint
func (*GroupsService) Kick ¶
func (s *GroupsService) Kick(channel string, user string) *GroupsKickCall
Kick creates a GroupsKickCall object in preparation for accessing the groups.kick endpoint
func (*GroupsService) Leave ¶
func (s *GroupsService) Leave(channel string) *GroupsLeaveCall
Leave creates a GroupsLeaveCall object in preparation for accessing the groups.leave endpoint
func (*GroupsService) List ¶
func (s *GroupsService) List() *GroupsListCall
List creates a GroupsListCall object in preparation for accessing the groups.list endpoint
func (*GroupsService) Mark ¶
func (s *GroupsService) Mark(channel string, timestamp string) *GroupsMarkCall
Mark creates a GroupsMarkCall object in preparation for accessing the groups.mark endpoint
func (*GroupsService) Open ¶
func (s *GroupsService) Open(channel string) *GroupsOpenCall
Open creates a GroupsOpenCall object in preparation for accessing the groups.open endpoint
func (*GroupsService) Rename ¶
func (s *GroupsService) Rename(channel string, name string) *GroupsRenameCall
Rename creates a GroupsRenameCall object in preparation for accessing the groups.rename endpoint
func (*GroupsService) Replies ¶
func (s *GroupsService) Replies(channel string, threadTimestamp string) *GroupsRepliesCall
Replies creates a GroupsRepliesCall object in preparation for accessing the groups.replies endpoint
func (*GroupsService) SetPurpose ¶
func (s *GroupsService) SetPurpose(channel string, purpose string) *GroupsSetPurposeCall
SetPurpose creates a GroupsSetPurposeCall object in preparation for accessing the groups.setPurpose endpoint
func (*GroupsService) SetTopic ¶
func (s *GroupsService) SetTopic(channel string, topic string) *GroupsSetTopicCall
SetTopic creates a GroupsSetTopicCall object in preparation for accessing the groups.setTopic endpoint
func (*GroupsService) Unarchive ¶
func (s *GroupsService) Unarchive(channel string) *GroupsUnarchiveCall
Unarchive creates a GroupsUnarchiveCall object in preparation for accessing the groups.unarchive endpoint
type GroupsSetPurposeCall ¶
type GroupsSetPurposeCall struct {
// contains filtered or unexported fields
}
GroupsSetPurposeCall is created by GroupsService.SetPurpose method call
func (*GroupsSetPurposeCall) Do ¶
func (c *GroupsSetPurposeCall) Do(ctx context.Context) (*string, error)
Do executes the call to access groups.setPurpose endpoint
func (*GroupsSetPurposeCall) FromValues ¶
func (c *GroupsSetPurposeCall) FromValues(v url.Values) error
FromValues parses the data in v and populates `c`
func (*GroupsSetPurposeCall) ValidateArgs ¶
func (c *GroupsSetPurposeCall) ValidateArgs() error
ValidateArgs checks that all required fields are set in the GroupsSetPurposeCall object
type GroupsSetTopicCall ¶
type GroupsSetTopicCall struct {
// contains filtered or unexported fields
}
GroupsSetTopicCall is created by GroupsService.SetTopic method call
func (*GroupsSetTopicCall) Do ¶
func (c *GroupsSetTopicCall) Do(ctx context.Context) (*string, error)
Do executes the call to access groups.setTopic endpoint
func (*GroupsSetTopicCall) FromValues ¶
func (c *GroupsSetTopicCall) FromValues(v url.Values) error
FromValues parses the data in v and populates `c`
func (*GroupsSetTopicCall) ValidateArgs ¶
func (c *GroupsSetTopicCall) ValidateArgs() error
ValidateArgs checks that all required fields are set in the GroupsSetTopicCall object
type GroupsUnarchiveCall ¶
type GroupsUnarchiveCall struct {
// contains filtered or unexported fields
}
GroupsUnarchiveCall is created by GroupsService.Unarchive method call
func (*GroupsUnarchiveCall) Do ¶
func (c *GroupsUnarchiveCall) Do(ctx context.Context) error
Do executes the call to access groups.unarchive endpoint
func (*GroupsUnarchiveCall) FromValues ¶
func (c *GroupsUnarchiveCall) FromValues(v url.Values) error
FromValues parses the data in v and populates `c`
func (*GroupsUnarchiveCall) ValidateArgs ¶
func (c *GroupsUnarchiveCall) ValidateArgs() error
ValidateArgs checks that all required fields are set in the GroupsUnarchiveCall object
type Logger ¶
type Logger interface { Debugf(context.Context, string, ...interface{}) Infof(context.Context, string, ...interface{}) }
Logger is an interface for logging/tracing the client's execution.
In particular, `Debugf` will only be called if `WithDebug` is provided to the constructor.
type OAuthAccessCall ¶
type OAuthAccessCall struct {
// contains filtered or unexported fields
}
OAuthAccessCall is created by OAuthService.Access method call
func (*OAuthAccessCall) Do ¶
func (c *OAuthAccessCall) Do(ctx context.Context) (*objects.OAuthAccessResponse, error)
Do executes the call to access oauth.access endpoint
func (*OAuthAccessCall) FromValues ¶
func (c *OAuthAccessCall) FromValues(v url.Values) error
FromValues parses the data in v and populates `c`
func (*OAuthAccessCall) RedirectURI ¶
func (c *OAuthAccessCall) RedirectURI(redirectURI string) *OAuthAccessCall
RedirectURI sets the value for optional redirectURI parameter
func (*OAuthAccessCall) ValidateArgs ¶
func (c *OAuthAccessCall) ValidateArgs() error
ValidateArgs checks that all required fields are set in the OAuthAccessCall object
type OAuthService ¶
type OAuthService struct {
// contains filtered or unexported fields
}
OAuthService handles OAuth related endpoints
func (*OAuthService) Access ¶
func (s *OAuthService) Access(clientID string, clientSecret string, code string) *OAuthAccessCall
Access creates a OAuthAccessCall object in preparation for accessing the oauth.access endpoint
type Option ¶
type Option interface { Name() string Value() interface{} }
Option defines an interface of optional parameters to the `slack.New` constructor.
func WithAPIEndpoint ¶
WithAPIEndpoint allows you to specify an alternate API endpoint. The default is DefaultAPIEndpoint.
func WithClient ¶
WithClient allows you to specify an net/http.Client object to use to communicate with the Slack endpoints. For example, if you need to use this in Google App Engine, you can pass it the result of `urlfetch.Client`
func WithDebug ¶
WithDebug specifies that we want to run in debugging mode. You can set this value manually to override any existing global defaults.
If one is not specified, the default value is false, or the value specified in SLACK_DEBUG environment variable
func WithLogger ¶
WithLogger specifies the logger object to be used. If not specified and `WithDebug` is enabled, then a default logger which writes to os.Stderr
type RTMService ¶
type RTMService struct {
// contains filtered or unexported fields
}
RTMService handles RTM related endpoints
func (*RTMService) Start ¶
func (s *RTMService) Start() *RTMStartCall
Start creates a RTMStartCall object in preparation for accessing the rtm.start endpoint
type RTMStartCall ¶
type RTMStartCall struct {
// contains filtered or unexported fields
}
RTMStartCall is created by RTMService.Start method call
func (*RTMStartCall) Do ¶
func (c *RTMStartCall) Do(ctx context.Context) (*objects.RTMResponse, error)
Do executes the call to access rtm.start endpoint
func (*RTMStartCall) FromValues ¶
func (c *RTMStartCall) FromValues(v url.Values) error
FromValues parses the data in v and populates `c`
func (*RTMStartCall) ValidateArgs ¶
func (c *RTMStartCall) ValidateArgs() error
ValidateArgs checks that all required fields are set in the RTMStartCall object
type ReactionsAddCall ¶
type ReactionsAddCall struct {
// contains filtered or unexported fields
}
ReactionsAddCall is created by ReactionsService.Add method call
func (*ReactionsAddCall) Channel ¶
func (c *ReactionsAddCall) Channel(channel string) *ReactionsAddCall
Channel sets the value for optional channel parameter
func (*ReactionsAddCall) Do ¶
func (c *ReactionsAddCall) Do(ctx context.Context) error
Do executes the call to access reactions.add endpoint
func (*ReactionsAddCall) File ¶
func (c *ReactionsAddCall) File(file string) *ReactionsAddCall
File sets the value for optional file parameter
func (*ReactionsAddCall) FileComment ¶
func (c *ReactionsAddCall) FileComment(fileComment string) *ReactionsAddCall
FileComment sets the value for optional fileComment parameter
func (*ReactionsAddCall) FromValues ¶
func (c *ReactionsAddCall) FromValues(v url.Values) error
FromValues parses the data in v and populates `c`
func (*ReactionsAddCall) Timestamp ¶
func (c *ReactionsAddCall) Timestamp(timestamp string) *ReactionsAddCall
Timestamp sets the value for optional timestamp parameter
func (*ReactionsAddCall) ValidateArgs ¶
func (c *ReactionsAddCall) ValidateArgs() error
ValidateArgs checks that all required fields are set in the ReactionsAddCall object
type ReactionsGetCall ¶
type ReactionsGetCall struct {
// contains filtered or unexported fields
}
ReactionsGetCall is created by ReactionsService.Get method call
func (*ReactionsGetCall) Channel ¶
func (c *ReactionsGetCall) Channel(channel string) *ReactionsGetCall
Channel sets the value for optional channel parameter
func (*ReactionsGetCall) Do ¶
func (c *ReactionsGetCall) Do(ctx context.Context) (*objects.ReactionsGetResponse, error)
Do executes the call to access reactions.get endpoint
func (*ReactionsGetCall) File ¶
func (c *ReactionsGetCall) File(file string) *ReactionsGetCall
File sets the value for optional file parameter
func (*ReactionsGetCall) FileComment ¶
func (c *ReactionsGetCall) FileComment(fileComment string) *ReactionsGetCall
FileComment sets the value for optional fileComment parameter
func (*ReactionsGetCall) FromValues ¶
func (c *ReactionsGetCall) FromValues(v url.Values) error
FromValues parses the data in v and populates `c`
func (*ReactionsGetCall) Full ¶
func (c *ReactionsGetCall) Full(full bool) *ReactionsGetCall
Full sets the value for optional full parameter
func (*ReactionsGetCall) Timestamp ¶
func (c *ReactionsGetCall) Timestamp(timestamp string) *ReactionsGetCall
Timestamp sets the value for optional timestamp parameter
func (*ReactionsGetCall) ValidateArgs ¶
func (c *ReactionsGetCall) ValidateArgs() error
ValidateArgs checks that all required fields are set in the ReactionsGetCall object
type ReactionsListCall ¶
type ReactionsListCall struct {
// contains filtered or unexported fields
}
ReactionsListCall is created by ReactionsService.List method call
func (*ReactionsListCall) Count ¶
func (c *ReactionsListCall) Count(count int) *ReactionsListCall
Count sets the value for optional count parameter
func (*ReactionsListCall) Do ¶
func (c *ReactionsListCall) Do(ctx context.Context) (*objects.ReactionsListResponse, error)
Do executes the call to access reactions.list endpoint
func (*ReactionsListCall) FromValues ¶
func (c *ReactionsListCall) FromValues(v url.Values) error
FromValues parses the data in v and populates `c`
func (*ReactionsListCall) Full ¶
func (c *ReactionsListCall) Full(full bool) *ReactionsListCall
Full sets the value for optional full parameter
func (*ReactionsListCall) Page ¶
func (c *ReactionsListCall) Page(page int) *ReactionsListCall
Page sets the value for optional page parameter
func (*ReactionsListCall) User ¶
func (c *ReactionsListCall) User(user string) *ReactionsListCall
User sets the value for optional user parameter
func (*ReactionsListCall) ValidateArgs ¶
func (c *ReactionsListCall) ValidateArgs() error
ValidateArgs checks that all required fields are set in the ReactionsListCall object
type ReactionsRemoveCall ¶
type ReactionsRemoveCall struct {
// contains filtered or unexported fields
}
ReactionsRemoveCall is created by ReactionsService.Remove method call
func (*ReactionsRemoveCall) Channel ¶
func (c *ReactionsRemoveCall) Channel(channel string) *ReactionsRemoveCall
Channel sets the value for optional channel parameter
func (*ReactionsRemoveCall) Do ¶
func (c *ReactionsRemoveCall) Do(ctx context.Context) error
Do executes the call to access reactions.remove endpoint
func (*ReactionsRemoveCall) File ¶
func (c *ReactionsRemoveCall) File(file string) *ReactionsRemoveCall
File sets the value for optional file parameter
func (*ReactionsRemoveCall) FileComment ¶
func (c *ReactionsRemoveCall) FileComment(fileComment string) *ReactionsRemoveCall
FileComment sets the value for optional fileComment parameter
func (*ReactionsRemoveCall) FromValues ¶
func (c *ReactionsRemoveCall) FromValues(v url.Values) error
FromValues parses the data in v and populates `c`
func (*ReactionsRemoveCall) Timestamp ¶
func (c *ReactionsRemoveCall) Timestamp(timestamp string) *ReactionsRemoveCall
Timestamp sets the value for optional timestamp parameter
func (*ReactionsRemoveCall) ValidateArgs ¶
func (c *ReactionsRemoveCall) ValidateArgs() error
ValidateArgs checks that all required fields are set in the ReactionsRemoveCall object
type ReactionsService ¶
type ReactionsService struct {
// contains filtered or unexported fields
}
ReactionsService handles Reactions related endpoints
func (*ReactionsService) Add ¶
func (s *ReactionsService) Add(name string) *ReactionsAddCall
Add creates a ReactionsAddCall object in preparation for accessing the reactions.add endpoint
func (*ReactionsService) Get ¶
func (s *ReactionsService) Get() *ReactionsGetCall
Get creates a ReactionsGetCall object in preparation for accessing the reactions.get endpoint
func (*ReactionsService) List ¶
func (s *ReactionsService) List() *ReactionsListCall
List creates a ReactionsListCall object in preparation for accessing the reactions.list endpoint
func (*ReactionsService) Remove ¶
func (s *ReactionsService) Remove(name string) *ReactionsRemoveCall
Remove creates a ReactionsRemoveCall object in preparation for accessing the reactions.remove endpoint
type RemindersAddCall ¶
type RemindersAddCall struct {
// contains filtered or unexported fields
}
RemindersAddCall is created by RemindersService.Add method call
func (*RemindersAddCall) FromValues ¶
func (c *RemindersAddCall) FromValues(v url.Values) error
FromValues parses the data in v and populates `c`
func (*RemindersAddCall) User ¶
func (c *RemindersAddCall) User(user string) *RemindersAddCall
User sets the value for optional user parameter
func (*RemindersAddCall) ValidateArgs ¶
func (c *RemindersAddCall) ValidateArgs() error
ValidateArgs checks that all required fields are set in the RemindersAddCall object
type RemindersCompleteCall ¶
type RemindersCompleteCall struct {
// contains filtered or unexported fields
}
RemindersCompleteCall is created by RemindersService.Complete method call
func (*RemindersCompleteCall) Do ¶
func (c *RemindersCompleteCall) Do(ctx context.Context) error
Do executes the call to access reminders.complete endpoint
func (*RemindersCompleteCall) FromValues ¶
func (c *RemindersCompleteCall) FromValues(v url.Values) error
FromValues parses the data in v and populates `c`
func (*RemindersCompleteCall) ValidateArgs ¶
func (c *RemindersCompleteCall) ValidateArgs() error
ValidateArgs checks that all required fields are set in the RemindersCompleteCall object
type RemindersDeleteCall ¶
type RemindersDeleteCall struct {
// contains filtered or unexported fields
}
RemindersDeleteCall is created by RemindersService.Delete method call
func (*RemindersDeleteCall) Do ¶
func (c *RemindersDeleteCall) Do(ctx context.Context) error
Do executes the call to access reminders.delete endpoint
func (*RemindersDeleteCall) FromValues ¶
func (c *RemindersDeleteCall) FromValues(v url.Values) error
FromValues parses the data in v and populates `c`
func (*RemindersDeleteCall) ValidateArgs ¶
func (c *RemindersDeleteCall) ValidateArgs() error
ValidateArgs checks that all required fields are set in the RemindersDeleteCall object
type RemindersInfoCall ¶
type RemindersInfoCall struct {
// contains filtered or unexported fields
}
RemindersInfoCall is created by RemindersService.Info method call
func (*RemindersInfoCall) FromValues ¶
func (c *RemindersInfoCall) FromValues(v url.Values) error
FromValues parses the data in v and populates `c`
func (*RemindersInfoCall) ValidateArgs ¶
func (c *RemindersInfoCall) ValidateArgs() error
ValidateArgs checks that all required fields are set in the RemindersInfoCall object
type RemindersListCall ¶
type RemindersListCall struct {
// contains filtered or unexported fields
}
RemindersListCall is created by RemindersService.List method call
func (*RemindersListCall) Do ¶
func (c *RemindersListCall) Do(ctx context.Context) (objects.ReminderList, error)
Do executes the call to access reminders.list endpoint
func (*RemindersListCall) FromValues ¶
func (c *RemindersListCall) FromValues(v url.Values) error
FromValues parses the data in v and populates `c`
func (*RemindersListCall) ValidateArgs ¶
func (c *RemindersListCall) ValidateArgs() error
ValidateArgs checks that all required fields are set in the RemindersListCall object
type RemindersService ¶
type RemindersService struct {
// contains filtered or unexported fields
}
RemindersService handles Reminders related endpoints
func (*RemindersService) Add ¶
func (s *RemindersService) Add(text string, time int) *RemindersAddCall
Add creates a RemindersAddCall object in preparation for accessing the reminders.add endpoint
func (*RemindersService) Complete ¶
func (s *RemindersService) Complete(reminder string) *RemindersCompleteCall
Complete creates a RemindersCompleteCall object in preparation for accessing the reminders.complete endpoint
func (*RemindersService) Delete ¶
func (s *RemindersService) Delete(reminder string) *RemindersDeleteCall
Delete creates a RemindersDeleteCall object in preparation for accessing the reminders.delete endpoint
func (*RemindersService) Info ¶
func (s *RemindersService) Info(reminder string) *RemindersInfoCall
Info creates a RemindersInfoCall object in preparation for accessing the reminders.info endpoint
func (*RemindersService) List ¶
func (s *RemindersService) List() *RemindersListCall
List creates a RemindersListCall object in preparation for accessing the reminders.list endpoint
type UsergroupsCreateCall ¶
type UsergroupsCreateCall struct {
// contains filtered or unexported fields
}
UsergroupsCreateCall is created by UsergroupsService.Create method call
func (*UsergroupsCreateCall) Channels ¶
func (c *UsergroupsCreateCall) Channels(channels string) *UsergroupsCreateCall
Channels sets the value for optional channels parameter
func (*UsergroupsCreateCall) Description ¶
func (c *UsergroupsCreateCall) Description(description string) *UsergroupsCreateCall
Description sets the value for optional description parameter
func (*UsergroupsCreateCall) FromValues ¶
func (c *UsergroupsCreateCall) FromValues(v url.Values) error
FromValues parses the data in v and populates `c`
func (*UsergroupsCreateCall) Handle ¶
func (c *UsergroupsCreateCall) Handle(handle string) *UsergroupsCreateCall
Handle sets the value for optional handle parameter
func (*UsergroupsCreateCall) IncludeCount ¶
func (c *UsergroupsCreateCall) IncludeCount(includeCount bool) *UsergroupsCreateCall
IncludeCount sets the value for optional includeCount parameter
func (*UsergroupsCreateCall) ValidateArgs ¶
func (c *UsergroupsCreateCall) ValidateArgs() error
ValidateArgs checks that all required fields are set in the UsergroupsCreateCall object
type UsergroupsDisableCall ¶
type UsergroupsDisableCall struct {
// contains filtered or unexported fields
}
UsergroupsDisableCall is created by UsergroupsService.Disable method call
func (*UsergroupsDisableCall) FromValues ¶
func (c *UsergroupsDisableCall) FromValues(v url.Values) error
FromValues parses the data in v and populates `c`
func (*UsergroupsDisableCall) IncludeCount ¶
func (c *UsergroupsDisableCall) IncludeCount(includeCount bool) *UsergroupsDisableCall
IncludeCount sets the value for optional includeCount parameter
func (*UsergroupsDisableCall) ValidateArgs ¶
func (c *UsergroupsDisableCall) ValidateArgs() error
ValidateArgs checks that all required fields are set in the UsergroupsDisableCall object
type UsergroupsEnableCall ¶
type UsergroupsEnableCall struct {
// contains filtered or unexported fields
}
UsergroupsEnableCall is created by UsergroupsService.Enable method call
func (*UsergroupsEnableCall) FromValues ¶
func (c *UsergroupsEnableCall) FromValues(v url.Values) error
FromValues parses the data in v and populates `c`
func (*UsergroupsEnableCall) IncludeCount ¶
func (c *UsergroupsEnableCall) IncludeCount(includeCount bool) *UsergroupsEnableCall
IncludeCount sets the value for optional includeCount parameter
func (*UsergroupsEnableCall) ValidateArgs ¶
func (c *UsergroupsEnableCall) ValidateArgs() error
ValidateArgs checks that all required fields are set in the UsergroupsEnableCall object
type UsergroupsListCall ¶
type UsergroupsListCall struct {
// contains filtered or unexported fields
}
UsergroupsListCall is created by UsergroupsService.List method call
func (*UsergroupsListCall) Do ¶
func (c *UsergroupsListCall) Do(ctx context.Context) (objects.UsergroupList, error)
Do executes the call to access usergroups.list endpoint
func (*UsergroupsListCall) FromValues ¶
func (c *UsergroupsListCall) FromValues(v url.Values) error
FromValues parses the data in v and populates `c`
func (*UsergroupsListCall) IncludeCount ¶
func (c *UsergroupsListCall) IncludeCount(includeCount bool) *UsergroupsListCall
IncludeCount sets the value for optional includeCount parameter
func (*UsergroupsListCall) IncludeDisabled ¶
func (c *UsergroupsListCall) IncludeDisabled(includeDisabled bool) *UsergroupsListCall
IncludeDisabled sets the value for optional includeDisabled parameter
func (*UsergroupsListCall) IncludeUsers ¶
func (c *UsergroupsListCall) IncludeUsers(includeUsers bool) *UsergroupsListCall
IncludeUsers sets the value for optional includeUsers parameter
func (*UsergroupsListCall) ValidateArgs ¶
func (c *UsergroupsListCall) ValidateArgs() error
ValidateArgs checks that all required fields are set in the UsergroupsListCall object
type UsergroupsService ¶
type UsergroupsService struct {
// contains filtered or unexported fields
}
UsergroupsService handles Usergroups related endpoints
func (*UsergroupsService) Create ¶
func (s *UsergroupsService) Create(name string) *UsergroupsCreateCall
Create creates a UsergroupsCreateCall object in preparation for accessing the usergroups.create endpoint
func (*UsergroupsService) Disable ¶
func (s *UsergroupsService) Disable(usergroup string) *UsergroupsDisableCall
Disable creates a UsergroupsDisableCall object in preparation for accessing the usergroups.disable endpoint
func (*UsergroupsService) Enable ¶
func (s *UsergroupsService) Enable(usergroup string) *UsergroupsEnableCall
Enable creates a UsergroupsEnableCall object in preparation for accessing the usergroups.enable endpoint
func (*UsergroupsService) List ¶
func (s *UsergroupsService) List() *UsergroupsListCall
List creates a UsergroupsListCall object in preparation for accessing the usergroups.list endpoint
func (*UsergroupsService) Update ¶
func (s *UsergroupsService) Update(usergroup string) *UsergroupsUpdateCall
Update creates a UsergroupsUpdateCall object in preparation for accessing the usergroups.update endpoint
type UsergroupsUpdateCall ¶
type UsergroupsUpdateCall struct {
// contains filtered or unexported fields
}
UsergroupsUpdateCall is created by UsergroupsService.Update method call
func (*UsergroupsUpdateCall) Channels ¶
func (c *UsergroupsUpdateCall) Channels(channels string) *UsergroupsUpdateCall
Channels sets the value for optional channels parameter
func (*UsergroupsUpdateCall) Description ¶
func (c *UsergroupsUpdateCall) Description(description string) *UsergroupsUpdateCall
Description sets the value for optional description parameter
func (*UsergroupsUpdateCall) FromValues ¶
func (c *UsergroupsUpdateCall) FromValues(v url.Values) error
FromValues parses the data in v and populates `c`
func (*UsergroupsUpdateCall) Handle ¶
func (c *UsergroupsUpdateCall) Handle(handle string) *UsergroupsUpdateCall
Handle sets the value for optional handle parameter
func (*UsergroupsUpdateCall) IncludeCount ¶
func (c *UsergroupsUpdateCall) IncludeCount(includeCount bool) *UsergroupsUpdateCall
IncludeCount sets the value for optional includeCount parameter
func (*UsergroupsUpdateCall) Name ¶
func (c *UsergroupsUpdateCall) Name(name string) *UsergroupsUpdateCall
Name sets the value for optional name parameter
func (*UsergroupsUpdateCall) ValidateArgs ¶
func (c *UsergroupsUpdateCall) ValidateArgs() error
ValidateArgs checks that all required fields are set in the UsergroupsUpdateCall object
type UsergroupsUsersListCall ¶
type UsergroupsUsersListCall struct {
// contains filtered or unexported fields
}
UsergroupsUsersListCall is created by UsergroupsUsersService.List method call
func (*UsergroupsUsersListCall) Do ¶
func (c *UsergroupsUsersListCall) Do(ctx context.Context) (objects.UsergroupUsersList, error)
Do executes the call to access usergroups.users.list endpoint
func (*UsergroupsUsersListCall) FromValues ¶
func (c *UsergroupsUsersListCall) FromValues(v url.Values) error
FromValues parses the data in v and populates `c`
func (*UsergroupsUsersListCall) IncludeDisabled ¶
func (c *UsergroupsUsersListCall) IncludeDisabled(includeDisabled bool) *UsergroupsUsersListCall
IncludeDisabled sets the value for optional includeDisabled parameter
func (*UsergroupsUsersListCall) ValidateArgs ¶
func (c *UsergroupsUsersListCall) ValidateArgs() error
ValidateArgs checks that all required fields are set in the UsergroupsUsersListCall object
type UsergroupsUsersService ¶
type UsergroupsUsersService struct {
// contains filtered or unexported fields
}
UsergroupsUsersService handles UsergroupsUsers related endpoints
func (*UsergroupsUsersService) List ¶
func (s *UsergroupsUsersService) List(usergroup string) *UsergroupsUsersListCall
List creates a UsergroupsUsersListCall object in preparation for accessing the usergroups.users.list endpoint
func (*UsergroupsUsersService) Update ¶
func (s *UsergroupsUsersService) Update(usergroup string, users string) *UsergroupsUsersUpdateCall
Update creates a UsergroupsUsersUpdateCall object in preparation for accessing the usergroups.users.update endpoint
type UsergroupsUsersUpdateCall ¶
type UsergroupsUsersUpdateCall struct {
// contains filtered or unexported fields
}
UsergroupsUsersUpdateCall is created by UsergroupsUsersService.Update method call
func (*UsergroupsUsersUpdateCall) Do ¶
Do executes the call to access usergroups.users.update endpoint
func (*UsergroupsUsersUpdateCall) FromValues ¶
func (c *UsergroupsUsersUpdateCall) FromValues(v url.Values) error
FromValues parses the data in v and populates `c`
func (*UsergroupsUsersUpdateCall) IncludeCount ¶
func (c *UsergroupsUsersUpdateCall) IncludeCount(includeCount bool) *UsergroupsUsersUpdateCall
IncludeCount sets the value for optional includeCount parameter
func (*UsergroupsUsersUpdateCall) ValidateArgs ¶
func (c *UsergroupsUsersUpdateCall) ValidateArgs() error
ValidateArgs checks that all required fields are set in the UsergroupsUsersUpdateCall object
type UsersDeletePhotoCall ¶
type UsersDeletePhotoCall struct {
// contains filtered or unexported fields
}
UsersDeletePhotoCall is created by UsersService.DeletePhoto method call
func (*UsersDeletePhotoCall) Do ¶
func (c *UsersDeletePhotoCall) Do(ctx context.Context) error
Do executes the call to access users.deletePhoto endpoint
func (*UsersDeletePhotoCall) FromValues ¶
func (c *UsersDeletePhotoCall) FromValues(v url.Values) error
FromValues parses the data in v and populates `c`
func (*UsersDeletePhotoCall) ValidateArgs ¶
func (c *UsersDeletePhotoCall) ValidateArgs() error
ValidateArgs checks that all required fields are set in the UsersDeletePhotoCall object
type UsersGetPresenceCall ¶
type UsersGetPresenceCall struct {
// contains filtered or unexported fields
}
UsersGetPresenceCall is created by UsersService.GetPresence method call
func (*UsersGetPresenceCall) Do ¶
func (c *UsersGetPresenceCall) Do(ctx context.Context) (*objects.UserPresence, error)
Do executes the call to access users.getPresence endpoint
func (*UsersGetPresenceCall) FromValues ¶
func (c *UsersGetPresenceCall) FromValues(v url.Values) error
FromValues parses the data in v and populates `c`
func (*UsersGetPresenceCall) ValidateArgs ¶
func (c *UsersGetPresenceCall) ValidateArgs() error
ValidateArgs checks that all required fields are set in the UsersGetPresenceCall object
type UsersIdentityCall ¶
type UsersIdentityCall struct {
// contains filtered or unexported fields
}
UsersIdentityCall is created by UsersService.Identity method call
func (*UsersIdentityCall) Do ¶
func (c *UsersIdentityCall) Do(ctx context.Context) (*objects.UserProfile, *objects.Team, error)
Do executes the call to access users.identity endpoint
func (*UsersIdentityCall) FromValues ¶
func (c *UsersIdentityCall) FromValues(v url.Values) error
FromValues parses the data in v and populates `c`
func (*UsersIdentityCall) ValidateArgs ¶
func (c *UsersIdentityCall) ValidateArgs() error
ValidateArgs checks that all required fields are set in the UsersIdentityCall object
type UsersInfoCall ¶
type UsersInfoCall struct {
// contains filtered or unexported fields
}
UsersInfoCall is created by UsersService.Info method call
func (*UsersInfoCall) FromValues ¶
func (c *UsersInfoCall) FromValues(v url.Values) error
FromValues parses the data in v and populates `c`
func (*UsersInfoCall) IncludeLocale ¶
func (c *UsersInfoCall) IncludeLocale(includeLocale bool) *UsersInfoCall
IncludeLocale sets the value for optional includeLocale parameter
func (*UsersInfoCall) ValidateArgs ¶
func (c *UsersInfoCall) ValidateArgs() error
ValidateArgs checks that all required fields are set in the UsersInfoCall object
type UsersListCall ¶
type UsersListCall struct {
// contains filtered or unexported fields
}
UsersListCall is created by UsersService.List method call
func (*UsersListCall) FromValues ¶
func (c *UsersListCall) FromValues(v url.Values) error
FromValues parses the data in v and populates `c`
func (*UsersListCall) IncludeLocale ¶
func (c *UsersListCall) IncludeLocale(includeLocale bool) *UsersListCall
IncludeLocale sets the value for optional includeLocale parameter
func (*UsersListCall) Limit ¶
func (c *UsersListCall) Limit(limit int) *UsersListCall
Limit sets the value for optional limit parameter
func (*UsersListCall) Presence ¶
func (c *UsersListCall) Presence(presence bool) *UsersListCall
Presence sets the value for optional presence parameter
func (*UsersListCall) ValidateArgs ¶
func (c *UsersListCall) ValidateArgs() error
ValidateArgs checks that all required fields are set in the UsersListCall object
type UsersProfileGetCall ¶
type UsersProfileGetCall struct {
// contains filtered or unexported fields
}
UsersProfileGetCall is created by UsersProfileService.Get method call
func (*UsersProfileGetCall) Do ¶
func (c *UsersProfileGetCall) Do(ctx context.Context) (*objects.UserProfile, error)
Do executes the call to access users.profile.get endpoint
func (*UsersProfileGetCall) FromValues ¶
func (c *UsersProfileGetCall) FromValues(v url.Values) error
FromValues parses the data in v and populates `c`
func (*UsersProfileGetCall) IncludeLabels ¶
func (c *UsersProfileGetCall) IncludeLabels(includeLabels bool) *UsersProfileGetCall
IncludeLabels sets the value for optional includeLabels parameter
func (*UsersProfileGetCall) User ¶
func (c *UsersProfileGetCall) User(user string) *UsersProfileGetCall
User sets the value for optional user parameter
func (*UsersProfileGetCall) ValidateArgs ¶
func (c *UsersProfileGetCall) ValidateArgs() error
ValidateArgs checks that all required fields are set in the UsersProfileGetCall object
type UsersProfileService ¶
type UsersProfileService struct {
// contains filtered or unexported fields
}
UsersProfileService handles UsersProfile related endpoints
func (*UsersProfileService) Get ¶
func (s *UsersProfileService) Get() *UsersProfileGetCall
Get creates a UsersProfileGetCall object in preparation for accessing the users.profile.get endpoint
func (*UsersProfileService) Set ¶
func (s *UsersProfileService) Set() *UsersProfileSetCall
Set creates a UsersProfileSetCall object in preparation for accessing the users.profile.set endpoint
type UsersProfileSetCall ¶
type UsersProfileSetCall struct {
// contains filtered or unexported fields
}
UsersProfileSetCall is created by UsersProfileService.Set method call
func (*UsersProfileSetCall) Do ¶
func (c *UsersProfileSetCall) Do(ctx context.Context) (*objects.UserProfile, error)
Do executes the call to access users.profile.set endpoint
func (*UsersProfileSetCall) FromValues ¶
func (c *UsersProfileSetCall) FromValues(v url.Values) error
FromValues parses the data in v and populates `c`
func (*UsersProfileSetCall) Name ¶
func (c *UsersProfileSetCall) Name(name string) *UsersProfileSetCall
Name sets the value for optional name parameter
func (*UsersProfileSetCall) Profile ¶
func (c *UsersProfileSetCall) Profile(profile *objects.UserProfile) *UsersProfileSetCall
Profile sets the value for optional profile parameter
func (*UsersProfileSetCall) User ¶
func (c *UsersProfileSetCall) User(user string) *UsersProfileSetCall
User sets the value for optional user parameter
func (*UsersProfileSetCall) ValidateArgs ¶
func (c *UsersProfileSetCall) ValidateArgs() error
ValidateArgs checks that all required fields are set in the UsersProfileSetCall object
func (*UsersProfileSetCall) Value ¶
func (c *UsersProfileSetCall) Value(value string) *UsersProfileSetCall
Value sets the value for optional value parameter
type UsersService ¶
type UsersService struct {
// contains filtered or unexported fields
}
UsersService handles Users related endpoints
func (*UsersService) DeletePhoto ¶
func (s *UsersService) DeletePhoto() *UsersDeletePhotoCall
DeletePhoto creates a UsersDeletePhotoCall object in preparation for accessing the users.deletePhoto endpoint
func (*UsersService) GetPresence ¶
func (s *UsersService) GetPresence(user string) *UsersGetPresenceCall
GetPresence creates a UsersGetPresenceCall object in preparation for accessing the users.getPresence endpoint
func (*UsersService) Identity ¶
func (s *UsersService) Identity() *UsersIdentityCall
Identity creates a UsersIdentityCall object in preparation for accessing the users.identity endpoint
func (*UsersService) Info ¶
func (s *UsersService) Info(user string) *UsersInfoCall
Info creates a UsersInfoCall object in preparation for accessing the users.info endpoint
func (*UsersService) List ¶
func (s *UsersService) List() *UsersListCall
List creates a UsersListCall object in preparation for accessing the users.list endpoint
func (*UsersService) SetActive ¶
func (s *UsersService) SetActive() *UsersSetActiveCall
SetActive creates a UsersSetActiveCall object in preparation for accessing the users.setActive endpoint
func (*UsersService) SetPresence ¶
func (s *UsersService) SetPresence(presence string) *UsersSetPresenceCall
SetPresence creates a UsersSetPresenceCall object in preparation for accessing the users.setPresence endpoint
type UsersSetActiveCall ¶
type UsersSetActiveCall struct {
// contains filtered or unexported fields
}
UsersSetActiveCall is created by UsersService.SetActive method call
func (*UsersSetActiveCall) Do ¶
func (c *UsersSetActiveCall) Do(ctx context.Context) error
Do executes the call to access users.setActive endpoint
func (*UsersSetActiveCall) FromValues ¶
func (c *UsersSetActiveCall) FromValues(v url.Values) error
FromValues parses the data in v and populates `c`
func (*UsersSetActiveCall) ValidateArgs ¶
func (c *UsersSetActiveCall) ValidateArgs() error
ValidateArgs checks that all required fields are set in the UsersSetActiveCall object
type UsersSetPresenceCall ¶
type UsersSetPresenceCall struct {
// contains filtered or unexported fields
}
UsersSetPresenceCall is created by UsersService.SetPresence method call
func (*UsersSetPresenceCall) Do ¶
func (c *UsersSetPresenceCall) Do(ctx context.Context) error
Do executes the call to access users.setPresence endpoint
func (*UsersSetPresenceCall) FromValues ¶
func (c *UsersSetPresenceCall) FromValues(v url.Values) error
FromValues parses the data in v and populates `c`
func (*UsersSetPresenceCall) ValidateArgs ¶
func (c *UsersSetPresenceCall) ValidateArgs() error
ValidateArgs checks that all required fields are set in the UsersSetPresenceCall object
Source Files
¶
- auth_gen.go
- bots_gen.go
- channels_gen.go
- chat_gen.go
- client.go
- emoji_gen.go
- groups_gen.go
- interface.go
- logger.go
- oauth_gen.go
- options.go
- reactions_gen.go
- reminders_gen.go
- rtm_gen.go
- scopes_gen.go
- sequence.go
- services.go
- slack.go
- usergroups_gen.go
- usergroups_users_gen.go
- users_gen.go
- users_profile_gen.go