Method: Slack::Web::Api::Endpoints::Views#views_publish
- Defined in:
- lib/slack/web/api/endpoints/views.rb
#views_publish(options = {}) ⇒ Object
Publish a static view for a User.
40 41 42 43 44 45 46 47 48 49 |
# File 'lib/slack/web/api/endpoints/views.rb', line 40 def views_publish( = {}) throw ArgumentError.new('Required arguments :user_id missing') if [:user_id].nil? throw ArgumentError.new('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 |