Documentation
¶
Index ¶
- Constants
- type ChatService
- func (c *ChatService) DeleteMessage(ctx context.Context, channelID, messageID string) (*response, error)
- func (c *ChatService) GetPermalink(ctx context.Context, channelID, messageID string) (*permalinkResponse, error)
- func (c *ChatService) PostMessage(ctx context.Context, data url.Values) (*response, error)
- type Client
- func (c *Client) CreateResource(ctx context.Context, pathPart string, data url.Values, v interface{}) error
- func (c *Client) ListResource(ctx context.Context, pathPart string, data url.Values, v interface{}) error
- func (c *Client) MakeRequest(ctx context.Context, method string, pathPart string, data url.Values, ...) error
- func (c *Client) SendMessage(channel string, text string) error
- type SlackTime
- type User
- type UserProfile
- type UserResponse
- type UserService
- type UsersListResponse
Constants ¶
View Source
const Version = "0.1.1"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ChatService ¶
type ChatService struct {
// contains filtered or unexported fields
}
func (*ChatService) DeleteMessage ¶
func (c *ChatService) DeleteMessage(ctx context.Context, channelID, messageID string) (*response, error)
func (*ChatService) GetPermalink ¶
func (c *ChatService) GetPermalink(ctx context.Context, channelID, messageID string) (*permalinkResponse, error)
https://api.slack.com/methods/chat.getPermalink
`channelID` has to be the ID of the channel (C*), this endpoint does not support the encoded channel names (#foo).
func (*ChatService) PostMessage ¶
type Client ¶
type Client struct {
*restclient.Client
Chat *ChatService
Users *UserService
// contains filtered or unexported fields
}
func (*Client) CreateResource ¶
func (c *Client) CreateResource(ctx context.Context, pathPart string, data url.Values, v interface{}) error
CreateResource makes a POST request to the given resource.
func (*Client) ListResource ¶
type User ¶
type User struct {
ID string `json:"id"`
Name string `json:"name"`
Updated SlackTime `json:"updated"`
Profile *UserProfile `json:"profile"`
}
type UserProfile ¶
type UserResponse ¶
type UserResponse struct {
User *User `json:"user"`
}
type UserService ¶
type UserService struct {
// contains filtered or unexported fields
}
func (*UserService) Get ¶
Get information about a particular user. https://api.slack.com/methods/users.info
func (*UserService) List ¶
func (u *UserService) List(ctx context.Context, data url.Values) (*UsersListResponse, error)
type UsersListResponse ¶
type UsersListResponse struct {
Members []*User `json:"members"`
}
Click to show internal directories.
Click to hide internal directories.