Work with Pins

The following are Apex classes for the Slack pins API methods.

Sends a request to pin an item to a channel.

Usage

See Slack’s pins.add method.

The following are methods for PinsAddRequest.

Builds a request object that's used when executing the API call.

Signature

Return Value

Type: Slack.PinsAddRequest.Builder


Contains methods to build an instance of the Slack.PinsAddRequest class.

A Builder object is obtained by invoking one of the PinsAddRequest.builder methods defined by the PinsAddRequest class.

The following are methods for PinsAddRequest.Builder. These methods are optional unless specified otherwise.

Required. Returns an instance of Slack.PinsAddRequest.

Signature

Return Value

Type: Slack.PinsAddRequest

Required. The channel to pin the message to.

Signature

Parameters

channel

Type: String

Return Value

Type: Slack.PinsAddRequest.Builder

Signature

Parameters

file

Type: String

Return Value

Type: Slack.PinsAddRequest.Builder

Signature

Parameters

fileComment

Type: String

Return Value

Type: Slack.PinsAddRequest.Builder

Required. The timestamp for the message pinned within the conversation.

Signature

Parameters

timestamp

Type: String

Return Value

Type: Slack.PinsAddRequest.Builder


Pins an item to a channel.

Usage

See Slack’s pins.add method.

This class contains standard response methods.

The following are methods for PinsAddResponse.

Signature

Return Value

Type: Slack.ErrorResponseMetadata

Signature

Parameters

responseMetadata

Type: Slack.ErrorResponseMetadata

Return Value

Type: void


Sends a request to list items that are pinned to a channel.

Usage

See Slack’s pins.list method.

The following are methods for PinsListRequest.

Builds a request object that's used when executing the API call.

Signature

Return Value

Type: Slack.PinsListRequest.Builder


Contains methods to build an instance of the Slack.PinsListRequest class.

A Builder object is obtained by invoking one of the PinsListRequest.builder methods defined by the PinsListRequest class.

The following are methods for PinsListRequest.Builder.

Required. Returns an instance of Slack.PinsListRequest.

Signature

Return Value

Type: Slack.PinsListRequest

Required. The channel to get pinned items for.

Signature

Parameters

channel

Type: String

Return Value

Type: Slack.PinsListRequest.Builder


Lists items that are pinned to a channel.

Usage

See Slack’s pins.list method.

This class contains standard response methods.

The following are methods for PinsListResponse.

Signature

Return Value

Type: List<Slack.PinsListResponse.MessageItem>

Signature

Parameters

items

Type: List<Slack.PinsListResponse.MessageItem>

Return Value

Type: void


Contains methods to build an instance of the Slack.PinsListResponse class.

The following are methods for PinsListResponse.MessageItem.

Signature

Return Value

Type: String

Signature

Return Value

Type: String

Signature

Return Value

Type: Slack.FileComment

Signature

Return Value

Type: Slack.File

Signature

Return Value

Type: Slack.Message

Signature

Return Value

Type: String

Signature

Parameters

channel

Type: String

Return Value

Type: void

Signature

Parameters

comment

Type: Slack.FileComment

Return Value

Type: void

Signature

Parameters

created

Type: Integer

Return Value

Type: void

Signature

Parameters

createdBy

Type: String

Return Value

Type: void

Signature

Parameters

file

Type: Slack.File

Return Value

Type: void

Signature

Parameters

message

Type: Slack.Message

Return Value

Type: void

Signature

Parameters

type

Type: String

Return Value

Type: void


Sends a request to unpin an item from a channel.

Usage

See Slack’s pins.remove method.

The following are methods for PinsRemoveRequest.

Builds a request object that's used when executing the API call.

Signature

Return Value

Type: Slack.PinsRemoveRequest.Builder


Contains methods to build an instance of the Slack.PinsRemoveRequest class.

A Builder object is obtained by invoking one of the PinsRemoveRequest.builder methods defined by the PinsRemoveRequest class.

The following are methods for PinsRemoveRequest.Builder.

Required. Returns an instance of Slack.PinsRemoveRequest.

Signature

Return Value

Type: Slack.PinsRemoveRequest

Required. The channel where the item is pinned to.

Signature

Parameters

channel

Type: String

Return Value

Type: Slack.PinsRemoveRequest.Builder

Required if fileComment(fileComment) or timestamp(timestamp) is not used.

Signature

Parameters

file

Type: String

Return Value

Type: Slack.PinsRemoveRequest.Builder

Required if file(file) or timestamp(timestamp) is not used.

Signature

Parameters

fileComment

Type: String

Return Value

Type: Slack.PinsRemoveRequest.Builder

Required if file(file) or fileComment(fileComment) is not used. Timestamp of the message to unpin.

Signature

Parameters

timestamp

Type: String

Return Value

Type: Slack.PinsRemoveRequest.Builder


Unpins an item to a channel.

Usage

See Slack’s pins.remove method.

This class contains standard response methods.