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 26 27 28 29 | # File 'lib/slack/web/api/endpoints/views.rb', line 20 def views_open( = {}) raise ArgumentError, 'Required arguments :view missing' if [:view].nil? raise ArgumentError, 'One of :trigger_id, :interactivity_pointer is required' unless [:trigger_id].nil? ^ [:interactivity_pointer].nil? if .key?(:view) view = [:view] view = JSON.dump(view) unless view.is_a?(String) = .merge(view: view) end post('views.open', ) end | 
#views_publish(options = {}) ⇒ Object
Publish a static view for a User.
| 42 43 44 45 46 47 48 49 50 51 | # File 'lib/slack/web/api/endpoints/views.rb', line 42 def views_publish( = {}) raise ArgumentError, 'Required arguments :user_id missing' if [:user_id].nil? raise ArgumentError, 'Required arguments :view missing' if [:view].nil? if .key?(:view) view = [:view] view = JSON.dump(view) unless view.is_a?(String) = .merge(view: view) end post('views.publish', ) end | 
#views_push(options = {}) ⇒ Object
Push a view onto the stack of a root view.
| 64 65 66 67 68 69 70 71 72 73 | # File 'lib/slack/web/api/endpoints/views.rb', line 64 def views_push( = {}) raise ArgumentError, 'Required arguments :view missing' if [:view].nil? raise ArgumentError, 'One of :trigger_id, :interactivity_pointer is required' unless [:trigger_id].nil? ^ [:interactivity_pointer].nil? if .key?(:view) view = [:view] view = JSON.dump(view) unless view.is_a?(String) = .merge(view: view) end post('views.push', ) end | 
#views_update(options = {}) ⇒ Object
Update an existing view.
| 88 89 90 91 92 93 94 95 96 97 | # File 'lib/slack/web/api/endpoints/views.rb', line 88 def views_update( = {}) raise ArgumentError, 'Required arguments :view missing' if [:view].nil? raise ArgumentError, 'One of :external_id, :view_id is required' unless [:external_id].nil? ^ [:view_id].nil? if .key?(:view) view = [:view] view = JSON.dump(view) unless view.is_a?(String) = .merge(view: view) end post('views.update', ) end |