Class: Roistat::Resources::Widgets
- Defined in:
- lib/roistat/resources/widgets.rb,
sig/roistat.rbs
Instance Attribute Summary
Attributes inherited from Base
Instance Method Summary collapse
-
#data(widget_id:, method: :post, **body) ⇒ Object
GET|POST /project/widget/widgetId/data — help-en; curl usually POSTs.
Methods inherited from Base
Constructor Details
This class inherits a constructor from Roistat::Resources::Base
Instance Method Details
#data(widget_id:, method: :post, **body) ⇒ Object
GET|POST /project/widget/widgetId/data — help-en; curl usually POSTs.
5 6 7 8 9 10 11 12 13 14 15 16 |
# File 'lib/roistat/resources/widgets.rb', line 5 def data(widget_id:, method: :post, **body) path = "project/widget/#{}/data" case method.to_sym when :get client.get(path) when :post post_optional_body(path, body) else raise ArgumentError, "method must be :get or :post" end end |