Documentation
¶
Overview ¶
Package client provides an authenticated Slack client wrapper.
Index ¶
- Variables
- type Client
- func (c *Client) Cookie() string
- func (c *Client) Enterprise() bool
- func (c *Client) GetConversationHistory(params *slackapi.GetConversationHistoryParameters) (*slackapi.GetConversationHistoryResponse, error)
- func (c *Client) GetConversationInfo(input *slackapi.GetConversationInfoInput) (*slackapi.Channel, error)
- func (c *Client) GetConversationsForUser(params *slackapi.GetConversationsForUserParameters) ([]slackapi.Channel, string, error)
- func (c *Client) HTTPDo(req *http.Request) (*http.Response, error)
- func (c *Client) SetEnterprise(v bool)
- func (c *Client) Token() string
Constants ¶
This section is empty.
Variables ¶
var ErrEnterprise = fmt.Errorf("enterprise grid workspace restricts this API (token would be invalidated)")
ErrEnterprise is returned when a Slack API method is restricted on enterprise grid.
Functions ¶
This section is empty.
Types ¶
type Client ¶
Client wraps *slack.Client with token metadata for raw API calls.
func New ¶
New creates an authenticated Slack client with optional cookie support. Extra slack.Option values (e.g. slackapi.OptionAPIURL for testing) are appended after the cookie transport option.
func (*Client) Enterprise ¶
Enterprise returns true for enterprise grid workspaces.
func (*Client) GetConversationHistory ¶
func (c *Client) GetConversationHistory(params *slackapi.GetConversationHistoryParameters) (*slackapi.GetConversationHistoryResponse, error)
GetConversationHistory overrides the embedded method to block on enterprise grid with session tokens.
func (*Client) GetConversationInfo ¶
func (c *Client) GetConversationInfo(input *slackapi.GetConversationInfoInput) (*slackapi.Channel, error)
GetConversationInfo overrides the embedded method to block on enterprise grid with session tokens.
func (*Client) GetConversationsForUser ¶
func (c *Client) GetConversationsForUser(params *slackapi.GetConversationsForUserParameters) ([]slackapi.Channel, string, error)
GetConversationsForUser overrides the embedded method to block on enterprise grid with session tokens.
func (*Client) SetEnterprise ¶
SetEnterprise marks this client as enterprise grid.