Class: Sink::Resources::Widgets

Inherits:
Object
  • Object
show all
Defined in:
lib/sink/resources/widgets.rb

Overview

Widget is love Widget is life

Instance Method Summary collapse

Constructor Details

#initialize(client:) ⇒ Widgets

Returns a new instance of Widgets.

Parameters:



9
10
11
# File 'lib/sink/resources/widgets.rb', line 9

def initialize(client:)
  @client = client
end

Instance Method Details

#retrieve_with_filter(widget_id, filter_type, opts = {}) ⇒ Sink::Models::Widget

Endpoint that tests using an integer and enum in the pathParams

Parameters:

  • widget_id (Integer)

    The widget ID you want to retrieve

  • filter_type (Symbol, FilterType)

    The widget ID you want to retrieve, with a filter type.

  • opts (Hash, Sink::RequestOptions) (defaults to: {})

    Options to specify HTTP behaviour for this request.

Returns:



20
21
22
23
24
25
26
27
# File 'lib/sink/resources/widgets.rb', line 20

def retrieve_with_filter(widget_id, filter_type, opts = {})
  req = {
    method: :get,
    path: "/widgets/#{widget_id}/filter/#{filter_type}",
    model: Sink::Models::Widget
  }
  @client.request(req, opts)
end