Module: Slack::Web::Pins
- Defined in:
- lib/slack/web/pins.rb
Overview
Module for the pins methods.
Constant Summary collapse
- SCOPE =
Endpoint scope
'pins'
Instance Method Summary collapse
-
#pins_add(params = {}) ⇒ Object
This method pins an item (file, file comment, channel message, or group message) to a particular channel.
-
#pins_list(params = {}) ⇒ Object
This method lists the items pinned to a channel.
-
#pins_remove(params = {}) ⇒ Object
This method un-pins an item (file, file comment, channel message, or group message) from a channel.
Instance Method Details
#pins_add(params = {}) ⇒ Object
This method pins an item (file, file comment, channel message, or group message) to a particular channel.
23 24 25 26 27 |
# File 'lib/slack/web/pins.rb', line 23 def pins_add(params = {}) fail ArgumentError, "Required arguments 'channel' missing" if params['channel'].nil? response = @session.do_post "#{SCOPE}.add", params Slack.parse_response(response) end |
#pins_list(params = {}) ⇒ Object
This method lists the items pinned to a channel.
37 38 39 40 41 |
# File 'lib/slack/web/pins.rb', line 37 def pins_list(params = {}) fail ArgumentError, "Required arguments 'channel' missing" if params['channel'].nil? response = @session.do_post "#{SCOPE}.list", params Slack.parse_response(response) end |
#pins_remove(params = {}) ⇒ Object
This method un-pins an item (file, file comment, channel message, or group message) from a channel.
58 59 60 61 62 |
# File 'lib/slack/web/pins.rb', line 58 def pins_remove(params = {}) fail ArgumentError, "Required arguments 'channel' missing" if params['channel'].nil? response = @session.do_post "#{SCOPE}.remove", params Slack.parse_response(response) end |