Class: Exa::Resources::Websets
- Inherits:
-
Base
- Object
- Base
- Exa::Resources::Websets
show all
- 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
Attributes inherited from Base
#client
Instance Method Summary
collapse
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
Returns the value of attribute enrichments.
12
13
14
|
# File 'lib/exa/resources/websets.rb', line 12
def enrichments
@enrichments
end
|
#items ⇒ Object
Returns the value of attribute items.
12
13
14
|
# File 'lib/exa/resources/websets.rb', line 12
def items
@items
end
|
#monitors ⇒ Object
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
|
#retrieve(webset_id) ⇒ Object
39
40
41
42
43
44
45
|
# File 'lib/exa/resources/websets.rb', line 39
def retrieve(webset_id)
client.request(
method: :get,
path: websets_path(webset_id),
response_model: Exa::Responses::Webset
)
end
|
#update(webset_id, params) ⇒ Object
47
48
49
50
51
52
53
54
|
# File 'lib/exa/resources/websets.rb', line 47
def update(webset_id, params)
client.request(
method: :patch,
path: websets_path(webset_id),
body: params,
response_model: Exa::Responses::Webset
)
end
|