Class: Exa::Resources::Websets::Items

Inherits:
Base
  • Object
show all
Defined in:
lib/exa/resources/websets/items.rb

Instance Attribute Summary

Attributes inherited from Base

#client

Instance Method Summary collapse

Methods inherited from Base

#initialize

Constructor Details

This class inherits a constructor from Exa::Resources::Base

Instance Method Details

#delete(webset_id, item_id) ⇒ Object



24
25
26
27
28
29
30
# File 'lib/exa/resources/websets/items.rb', line 24

def delete(webset_id, item_id)
  client.request(
    method: :delete,
    path: items_path(webset_id, item_id),
    response_model: Exa::Responses::WebsetItem
  )
end

#list(webset_id, params = nil) ⇒ Object



7
8
9
10
11
12
13
14
# File 'lib/exa/resources/websets/items.rb', line 7

def list(webset_id, params = nil)
  client.request(
    method: :get,
    path: items_path(webset_id),
    query: params,
    response_model: Exa::Responses::WebsetItemListResponse
  )
end

#retrieve(webset_id, item_id) ⇒ Object



16
17
18
19
20
21
22
# File 'lib/exa/resources/websets/items.rb', line 16

def retrieve(webset_id, item_id)
  client.request(
    method: :get,
    path: items_path(webset_id, item_id),
    response_model: Exa::Responses::WebsetItem
  )
end