Module: Slack::Web::Api::Endpoints::Views
- Included in:
- Slack::Web::Api::Endpoints
- Defined in:
- lib/slack/web/api/endpoints/views.rb
Instance Method Summary collapse
-
#views_open(options = {}) ⇒ Object
Open a view for a user.
-
#views_publish(options = {}) ⇒ Object
Publish a static view for a User.
-
#views_push(options = {}) ⇒ Object
Push a view onto the stack of a root view.
-
#views_update(options = {}) ⇒ Object
Update an existing view.
Instance Method Details
#views_open(options = {}) ⇒ Object
Open a view for a user.
20 21 22 23 24 25 |
# File 'lib/slack/web/api/endpoints/views.rb', line 20 def views_open( = {}) raise ArgumentError, 'Required arguments :view missing' if [:view].nil? raise ArgumentError, 'Exactly one of :trigger_id, :interactivity_pointer is required' unless [:trigger_id].nil? ^ [:interactivity_pointer].nil? = (, %i[view]) post('views.open', ) end |
#views_publish(options = {}) ⇒ Object
Publish a static view for a User.
38 39 40 41 42 43 |
# File 'lib/slack/web/api/endpoints/views.rb', line 38 def views_publish( = {}) raise ArgumentError, 'Required arguments :user_id missing' if [:user_id].nil? raise ArgumentError, 'Required arguments :view missing' if [:view].nil? = (, %i[view]) post('views.publish', ) end |
#views_push(options = {}) ⇒ Object
Push a view onto the stack of a root view.
56 57 58 59 60 61 |
# File 'lib/slack/web/api/endpoints/views.rb', line 56 def views_push( = {}) raise ArgumentError, 'Required arguments :view missing' if [:view].nil? raise ArgumentError, 'Exactly one of :trigger_id, :interactivity_pointer is required' unless [:trigger_id].nil? ^ [:interactivity_pointer].nil? = (, %i[view]) post('views.push', ) end |
#views_update(options = {}) ⇒ Object
Update an existing view.
76 77 78 79 80 81 |
# File 'lib/slack/web/api/endpoints/views.rb', line 76 def views_update( = {}) raise ArgumentError, 'Required arguments :view missing' if [:view].nil? raise ArgumentError, 'Exactly one of :external_id, :view_id is required' unless [:external_id].nil? ^ [:view_id].nil? = (, %i[view]) post('views.update', ) end |