Class: Exa::Resources::Websets
- Defined in:
- lib/exa/resources/websets.rb,
lib/exa/resources/websets/items.rb,
lib/exa/resources/websets/monitors.rb,
lib/exa/resources/websets/enrichments.rb
Defined Under Namespace
Classes: Enrichments, Items, Monitors
Instance Attribute Summary collapse
-
#enrichments ⇒ Object
readonly
Returns the value of attribute enrichments.
-
#items ⇒ Object
readonly
Returns the value of attribute items.
-
#monitors ⇒ Object
readonly
Returns the value of attribute monitors.
Attributes inherited from Base
Instance Method Summary collapse
- #cancel(webset_id) ⇒ Object
- #create(params) ⇒ Object
- #delete(webset_id) ⇒ Object
-
#initialize(client:) ⇒ Websets
constructor
A new instance of Websets.
- #list(params = nil) ⇒ Object
- #preview(params) ⇒ Object
- #retrieve(webset_id) ⇒ Object
- #update(webset_id, params) ⇒ Object
Constructor Details
#initialize(client:) ⇒ Websets
Returns a new instance of Websets.
14 15 16 17 18 19 |
# File 'lib/exa/resources/websets.rb', line 14 def initialize(client:) super @monitors = Exa::Resources::Websets::Monitors.new(client: client) @items = Exa::Resources::Websets::Items.new(client: client) @enrichments = Exa::Resources::Websets::Enrichments.new(client: client) end |
Instance Attribute Details
#enrichments ⇒ Object (readonly)
Returns the value of attribute enrichments.
12 13 14 |
# File 'lib/exa/resources/websets.rb', line 12 def enrichments @enrichments end |
#items ⇒ Object (readonly)
Returns the value of attribute items.
12 13 14 |
# File 'lib/exa/resources/websets.rb', line 12 def items @items end |
#monitors ⇒ Object (readonly)
Returns the value of attribute monitors.
12 13 14 |
# File 'lib/exa/resources/websets.rb', line 12 def monitors @monitors end |
Instance Method Details
#cancel(webset_id) ⇒ Object
64 65 66 67 68 69 70 |
# File 'lib/exa/resources/websets.rb', line 64 def cancel(webset_id) client.request( method: :post, path: websets_path(webset_id, "cancel"), response_model: Exa::Responses::Webset ) end |
#create(params) ⇒ Object
21 22 23 24 25 26 27 28 |
# File 'lib/exa/resources/websets.rb', line 21 def create(params) client.request( method: :post, path: websets_path, body: params, response_model: Exa::Responses::Webset ) end |
#delete(webset_id) ⇒ Object
56 57 58 59 60 61 62 |
# File 'lib/exa/resources/websets.rb', line 56 def delete(webset_id) client.request( method: :delete, path: websets_path(webset_id), response_model: Exa::Responses::Webset ) end |
#list(params = nil) ⇒ Object
30 31 32 33 34 35 36 37 |
# File 'lib/exa/resources/websets.rb', line 30 def list(params = nil) client.request( method: :get, path: websets_path, query: params, response_model: Exa::Responses::WebsetListResponse ) end |
#preview(params) ⇒ Object
72 73 74 75 76 77 78 79 |
# File 'lib/exa/resources/websets.rb', line 72 def preview(params) client.request( method: :post, path: ["v0", "websets", "preview"], body: params, response_model: Exa::Responses::Webset ) end |