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
Pins an item to a channel.
-
#pins_list(options = {}) ⇒ Object
Lists items pinned to a channel.
-
#pins_remove(options = {}) ⇒ Object
Un-pins an item from a channel.
Instance Method Details
#pins_add(options = {}) ⇒ Object
Pins an item to a channel.
18 19 20 21 22 |
# File 'lib/slack/web/api/endpoints/pins.rb', line 18 def pins_add( = {}) throw ArgumentError.new('Required arguments :channel missing') if [:channel].nil? = .merge(channel: conversations_id()['channel']['id']) if [:channel] post('pins.add', ) end |
#pins_list(options = {}) ⇒ Object
Lists items pinned to a channel.
31 32 33 34 35 |
# File 'lib/slack/web/api/endpoints/pins.rb', line 31 def pins_list( = {}) throw ArgumentError.new('Required arguments :channel missing') if [:channel].nil? = .merge(channel: conversations_id()['channel']['id']) if [:channel] post('pins.list', ) end |
#pins_remove(options = {}) ⇒ Object
Un-pins an item from a channel.
46 47 48 49 50 |
# File 'lib/slack/web/api/endpoints/pins.rb', line 46 def pins_remove( = {}) throw ArgumentError.new('Required arguments :channel missing') if [:channel].nil? = .merge(channel: conversations_id()['channel']['id']) if [:channel] post('pins.remove', ) end |