Module: Slack::Web::Api::Endpoints::Pins
- Included in:
- Slack::Web::Api::Endpoints
- Defined in:
- lib/slack/web/api/endpoints/pins.rb
Instance Method Summary collapse
-
#pins_add(options = {}) ⇒ Object
This method pins an item (file, file comment, channel message, or group message) to a particular channel.
-
#pins_list(options = {}) ⇒ Object
This method lists the items pinned to a channel.
-
#pins_remove(options = {}) ⇒ Object
This method un-pins an item (file, file comment, channel message, or group message) from a channel.
Instance Method Details
#pins_add(options = {}) ⇒ Object
This method pins an item (file, file comment, channel message, or group message) to a particular channel. The channel argument is required and one of file, file_comment, or timestamp must also be specified.
22 23 24 25 26 |
# File 'lib/slack/web/api/endpoints/pins.rb', line 22 def pins_add( = {}) throw ArgumentError.new('Required arguments :channel missing') if [:channel].nil? = .merge(channel: channels_id()['channel']['id']) if [:channel] post('pins.add', ) end |
#pins_list(options = {}) ⇒ Object
This method lists the items pinned to a channel.
35 36 37 38 39 |
# File 'lib/slack/web/api/endpoints/pins.rb', line 35 def pins_list( = {}) throw ArgumentError.new('Required arguments :channel missing') if [:channel].nil? = .merge(channel: channels_id()['channel']['id']) if [:channel] post('pins.list', ) end |
#pins_remove(options = {}) ⇒ Object
This method un-pins an item (file, file comment, channel message, or group message) from a channel. The channel argument is required and one of file, file_comment, or timestamp must also be specified.
55 56 57 58 59 |
# File 'lib/slack/web/api/endpoints/pins.rb', line 55 def pins_remove( = {}) throw ArgumentError.new('Required arguments :channel missing') if [:channel].nil? = .merge(channel: channels_id()['channel']['id']) if [:channel] post('pins.remove', ) end |