Documentation ¶
Overview ¶
Package bookmarks is a lightweight wrapper over the "bookmarks" methods in Slack's Web API: https://api.slack.com/methods?filter=bookmarks.
Index ¶
- type API
- func (a API) Add(ctx context.Context, args []sdktypes.Value, kwargs map[string]sdktypes.Value) (sdktypes.Value, error)
- func (a API) Edit(ctx context.Context, args []sdktypes.Value, kwargs map[string]sdktypes.Value) (sdktypes.Value, error)
- func (a API) List(ctx context.Context, args []sdktypes.Value, kwargs map[string]sdktypes.Value) (sdktypes.Value, error)
- func (a API) Remove(ctx context.Context, args []sdktypes.Value, kwargs map[string]sdktypes.Value) (sdktypes.Value, error)
- type AddRequest
- type AddResponse
- type Bookmark
- type EditRequest
- type EditResponse
- type ListRequest
- type ListResponse
- type RemoveRequest
- type RemoveResponse
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type API ¶
type API struct {
Vars sdkservices.Vars
}
func (API) Add ¶
func (a API) Add(ctx context.Context, args []sdktypes.Value, kwargs map[string]sdktypes.Value) (sdktypes.Value, error)
Add a bookmark to a channel.
Based on: https://api.slack.com/methods/bookmarks.add
Required Slack app scopes:
func (API) Edit ¶
func (a API) Edit(ctx context.Context, args []sdktypes.Value, kwargs map[string]sdktypes.Value) (sdktypes.Value, error)
Edit a bookmark in a channel.
Based on: https://api.slack.com/methods/bookmarks.edit
Required Slack app scopes:
func (API) List ¶
func (a API) List(ctx context.Context, args []sdktypes.Value, kwargs map[string]sdktypes.Value) (sdktypes.Value, error)
List bookmarks for a channel.
Based on: https://api.slack.com/methods/bookmarks.list
Required Slack app scopes:
type AddRequest ¶
type AddRequest struct { // Channel to add bookmarks in. Required. ChannelID string `json:"channel_id"` // Title of the bookmark. Required. Title string `json:"title"` // Type of the bookmark, i.e. "link". Required. Type string `json:"type"` // Emoji tag to apply to the link. Emoji string `json:"emoji,omitempty"` // ID of the entity being bookmarked. // Only applies to message and file types. EntityID string `json:"entity_id,omitempty"` // Link to bookmark. Link string `json:"link,omitempty"` // ID of this bookmark's parent. ParentID string `json:"parent_id,omitempty"` }
type AddResponse ¶
type AddResponse struct { api.SlackResponse Bookmark *Bookmark `json:"bookmark,omitempty"` }
type Bookmark ¶
type Bookmark struct { ID string `json:"id,omitempty"` ChannelID string `json:"channel_id,omitempty"` Title string `json:"title,omitempty"` Link string `json:"link,omitempty"` Emoji string `json:"emoji,omitempty"` IconURL string `json:"icon_url,omitempty"` Type string `json:"type,omitempty"` EntityID string `json:"entity_id,omitempty"` Created int `json:"date_created,omitempty"` Updated int `json:"date_updated,omitempty"` Rank string `json:"rank,omitempty"` LastUpdatedByUserID string `json:"last_updated_by_user_id,omitempty"` LastUpdatedByTeamID string `json:"last_updated_by_team_id,omitempty"` ShortcutID string `json:"shortcut_id,omitempty"` AppID string `json:"app_id,omitempty"` AppActionID string `json:"app_action_id,omitempty"` }
type EditRequest ¶
type EditRequest struct { // Bookmark to update. Required. BookmarkID string `json:"bookmark_id"` // Channel to update bookmark in. Required. ChannelID string `json:"channel_id"` // Emoji tag to apply to the link. Emoji string `json:"emoji,omitempty"` // Link to bookmark. Link string `json:"link,omitempty"` // Title for the bookmark. Title string `json:"title,omitempty"` }
type EditResponse ¶
type EditResponse struct { api.SlackResponse Bookmark *Bookmark `json:"bookmark,omitempty"` }
type ListRequest ¶
type ListRequest struct { // Channel to list bookmarks in. Required. ChannelID string `json:"channel_id"` }
type ListResponse ¶
type ListResponse struct { api.SlackResponse Bookmarks []Bookmark `json:"bookmarks,omitempty"` }
type RemoveRequest ¶
type RemoveResponse ¶
type RemoveResponse struct {
api.SlackResponse
}
Click to show internal directories.
Click to hide internal directories.