context.dev 2.17.1 → 2.19.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +33 -0
- data/README.md +1 -1
- data/lib/context_dev/client.rb +0 -4
- data/lib/context_dev/models/industry_retrieve_naics_params.rb +28 -1
- data/lib/context_dev/models/industry_retrieve_sic_params.rb +28 -1
- data/lib/context_dev/models/monitor_retrieve_run_params.rb +26 -0
- data/lib/context_dev/models/monitor_retrieve_run_response.rb +232 -0
- data/lib/context_dev/models/monitor_rotate_webhook_secret_params.rb +20 -0
- data/lib/context_dev/models/monitor_rotate_webhook_secret_response.rb +765 -0
- data/lib/context_dev/models/parse_handle_params.rb +8 -6
- data/lib/context_dev/models/person_enrich_params.rb +28 -1
- data/lib/context_dev/models/web_answers_params.rb +28 -1
- data/lib/context_dev/models/web_extract_competitors_params.rb +28 -1
- data/lib/context_dev/models/web_extract_styleguide_params.rb +30 -3
- data/lib/context_dev/models/{web_web_scrape_sitemap_params.rb → web_map_urls_params.rb} +22 -20
- data/lib/context_dev/models/web_map_urls_response.rb +123 -0
- data/lib/context_dev/models/web_scrape_params.rb +906 -0
- data/lib/context_dev/models/web_scrape_response.rb +659 -0
- data/lib/context_dev/models/web_screenshot_params.rb +25 -9
- data/lib/context_dev/models/web_screenshot_response.rb +3 -3
- data/lib/context_dev/models/web_search_params.rb +30 -3
- data/lib/context_dev/models.rb +8 -20
- data/lib/context_dev/resources/brand.rb +0 -36
- data/lib/context_dev/resources/industry.rb +6 -2
- data/lib/context_dev/resources/monitors.rb +47 -0
- data/lib/context_dev/resources/people.rb +3 -1
- data/lib/context_dev/resources/web.rb +116 -413
- data/lib/context_dev/version.rb +1 -1
- data/lib/context_dev.rb +8 -21
- data/rbi/context_dev/client.rbi +0 -3
- data/rbi/context_dev/models/industry_retrieve_naics_params.rbi +59 -0
- data/rbi/context_dev/models/industry_retrieve_sic_params.rbi +57 -0
- data/rbi/context_dev/models/monitor_retrieve_run_params.rbi +46 -0
- data/rbi/context_dev/models/monitor_retrieve_run_response.rbi +452 -0
- data/rbi/context_dev/models/monitor_rotate_webhook_secret_params.rbi +38 -0
- data/rbi/context_dev/models/monitor_rotate_webhook_secret_response.rbi +1367 -0
- data/rbi/context_dev/models/parse_handle_params.rbi +12 -9
- data/rbi/context_dev/models/person_enrich_params.rbi +45 -0
- data/rbi/context_dev/models/web_answers_params.rbi +45 -0
- data/rbi/context_dev/models/web_extract_competitors_params.rbi +59 -0
- data/rbi/context_dev/models/web_extract_styleguide_params.rbi +62 -3
- data/rbi/context_dev/models/{web_web_scrape_sitemap_params.rbi → web_map_urls_params.rbi} +35 -54
- data/rbi/context_dev/models/web_map_urls_response.rbi +226 -0
- data/rbi/context_dev/models/web_scrape_params.rbi +2000 -0
- data/rbi/context_dev/models/{web_web_scrape_html_response.rbi → web_scrape_response.rbi} +550 -418
- data/rbi/context_dev/models/web_screenshot_params.rbi +38 -12
- data/rbi/context_dev/models/web_screenshot_response.rbi +4 -4
- data/rbi/context_dev/models/web_search_params.rbi +48 -3
- data/rbi/context_dev/models.rbi +9 -21
- data/rbi/context_dev/resources/brand.rbi +0 -35
- data/rbi/context_dev/resources/industry.rbi +14 -0
- data/rbi/context_dev/resources/monitors.rbi +24 -0
- data/rbi/context_dev/resources/parse.rbi +4 -4
- data/rbi/context_dev/resources/people.rbi +7 -0
- data/rbi/context_dev/resources/web.rbi +166 -533
- data/sig/context_dev/client.rbs +0 -2
- data/sig/context_dev/models/industry_retrieve_naics_params.rbs +21 -1
- data/sig/context_dev/models/industry_retrieve_sic_params.rbs +21 -1
- data/sig/context_dev/models/monitor_retrieve_run_params.rbs +28 -0
- data/sig/context_dev/models/monitor_retrieve_run_response.rbs +182 -0
- data/sig/context_dev/models/monitor_rotate_webhook_secret_params.rbs +23 -0
- data/sig/context_dev/models/monitor_rotate_webhook_secret_response.rbs +545 -0
- data/sig/context_dev/models/person_enrich_params.rbs +21 -1
- data/sig/context_dev/models/web_answers_params.rbs +21 -1
- data/sig/context_dev/models/web_extract_competitors_params.rbs +21 -1
- data/sig/context_dev/models/web_extract_styleguide_params.rbs +21 -1
- data/sig/context_dev/models/{web_web_scrape_sitemap_params.rbs → web_map_urls_params.rbs} +22 -22
- data/sig/context_dev/models/web_map_urls_response.rbs +125 -0
- data/sig/context_dev/models/web_scrape_params.rbs +834 -0
- data/sig/context_dev/models/web_scrape_response.rbs +552 -0
- data/sig/context_dev/models/web_screenshot_params.rbs +7 -0
- data/sig/context_dev/models/web_search_params.rbs +21 -1
- data/sig/context_dev/models.rbs +8 -20
- data/sig/context_dev/resources/brand.rbs +0 -9
- data/sig/context_dev/resources/industry.rbs +2 -0
- data/sig/context_dev/resources/monitors.rbs +11 -0
- data/sig/context_dev/resources/people.rbs +1 -0
- data/sig/context_dev/resources/web.rbs +34 -108
- metadata +26 -65
- data/lib/context_dev/models/ai_extract_product_params.rb +0 -98
- data/lib/context_dev/models/ai_extract_product_response.rb +0 -352
- data/lib/context_dev/models/ai_extract_products_params.rb +0 -233
- data/lib/context_dev/models/ai_extract_products_response.rb +0 -320
- data/lib/context_dev/models/brand_retrieve_simplified_params.rb +0 -120
- data/lib/context_dev/models/brand_retrieve_simplified_response.rb +0 -441
- data/lib/context_dev/models/web_extract_fonts_params.rb +0 -114
- data/lib/context_dev/models/web_extract_fonts_response.rb +0 -291
- data/lib/context_dev/models/web_extract_params.rb +0 -392
- data/lib/context_dev/models/web_extract_response.rb +0 -287
- data/lib/context_dev/models/web_web_scrape_bytes_params.rb +0 -344
- data/lib/context_dev/models/web_web_scrape_bytes_response.rb +0 -135
- data/lib/context_dev/models/web_web_scrape_html_params.rb +0 -633
- data/lib/context_dev/models/web_web_scrape_html_response.rb +0 -588
- data/lib/context_dev/models/web_web_scrape_images_params.rb +0 -346
- data/lib/context_dev/models/web_web_scrape_images_response.rb +0 -409
- data/lib/context_dev/models/web_web_scrape_md_params.rb +0 -668
- data/lib/context_dev/models/web_web_scrape_md_response.rb +0 -567
- data/lib/context_dev/models/web_web_scrape_sitemap_response.rb +0 -144
- data/lib/context_dev/resources/ai.rb +0 -69
- data/rbi/context_dev/models/ai_extract_product_params.rbi +0 -199
- data/rbi/context_dev/models/ai_extract_product_response.rbi +0 -696
- data/rbi/context_dev/models/ai_extract_products_params.rbi +0 -490
- data/rbi/context_dev/models/ai_extract_products_response.rbi +0 -623
- data/rbi/context_dev/models/brand_retrieve_simplified_params.rbi +0 -256
- data/rbi/context_dev/models/brand_retrieve_simplified_response.rbi +0 -1040
- data/rbi/context_dev/models/web_extract_fonts_params.rbi +0 -223
- data/rbi/context_dev/models/web_extract_fonts_response.rbi +0 -563
- data/rbi/context_dev/models/web_extract_params.rbi +0 -736
- data/rbi/context_dev/models/web_extract_response.rbi +0 -512
- data/rbi/context_dev/models/web_web_scrape_bytes_params.rbi +0 -699
- data/rbi/context_dev/models/web_web_scrape_bytes_response.rbi +0 -238
- data/rbi/context_dev/models/web_web_scrape_html_params.rbi +0 -1217
- data/rbi/context_dev/models/web_web_scrape_images_params.rbi +0 -671
- data/rbi/context_dev/models/web_web_scrape_images_response.rbi +0 -910
- data/rbi/context_dev/models/web_web_scrape_md_params.rbi +0 -1049
- data/rbi/context_dev/models/web_web_scrape_md_response.rbi +0 -1088
- data/rbi/context_dev/models/web_web_scrape_sitemap_response.rbi +0 -258
- data/rbi/context_dev/resources/ai.rbi +0 -56
- data/sig/context_dev/models/ai_extract_product_params.rbs +0 -86
- data/sig/context_dev/models/ai_extract_product_response.rbs +0 -273
- data/sig/context_dev/models/ai_extract_products_params.rbs +0 -202
- data/sig/context_dev/models/ai_extract_products_response.rbs +0 -252
- data/sig/context_dev/models/brand_retrieve_simplified_params.rbs +0 -104
- data/sig/context_dev/models/brand_retrieve_simplified_response.rbs +0 -413
- data/sig/context_dev/models/web_extract_fonts_params.rbs +0 -93
- data/sig/context_dev/models/web_extract_fonts_response.rbs +0 -230
- data/sig/context_dev/models/web_extract_params.rbs +0 -304
- data/sig/context_dev/models/web_extract_response.rbs +0 -239
- data/sig/context_dev/models/web_web_scrape_bytes_params.rbs +0 -531
- data/sig/context_dev/models/web_web_scrape_bytes_response.rbs +0 -108
- data/sig/context_dev/models/web_web_scrape_html_params.rbs +0 -730
- data/sig/context_dev/models/web_web_scrape_html_response.rbs +0 -495
- data/sig/context_dev/models/web_web_scrape_images_params.rbs +0 -261
- data/sig/context_dev/models/web_web_scrape_images_response.rbs +0 -371
- data/sig/context_dev/models/web_web_scrape_md_params.rbs +0 -758
- data/sig/context_dev/models/web_web_scrape_md_response.rbs +0 -465
- data/sig/context_dev/models/web_web_scrape_sitemap_response.rbs +0 -117
- data/sig/context_dev/resources/ai.rbs +0 -20
|
@@ -1,287 +0,0 @@
|
|
|
1
|
-
# frozen_string_literal: true
|
|
2
|
-
|
|
3
|
-
module ContextDev
|
|
4
|
-
module Models
|
|
5
|
-
# @see ContextDev::Resources::Web#extract
|
|
6
|
-
class WebExtractResponse < ContextDev::Internal::Type::BaseModel
|
|
7
|
-
# @!attribute cache_metadata
|
|
8
|
-
# Cache outcome for this response. Composite responses are hits only when every
|
|
9
|
-
# cache-controlled fetch contributing to the output was a hit; age_ms is the
|
|
10
|
-
# oldest contributing hit.
|
|
11
|
-
#
|
|
12
|
-
# @return [ContextDev::Models::WebExtractResponse::CacheMetadata]
|
|
13
|
-
required :cache_metadata, -> { ContextDev::Models::WebExtractResponse::CacheMetadata }
|
|
14
|
-
|
|
15
|
-
# @!attribute data
|
|
16
|
-
# Extracted data matching the request schema
|
|
17
|
-
#
|
|
18
|
-
# @return [Hash{Symbol=>Object}]
|
|
19
|
-
required :data, ContextDev::Internal::Type::HashOf[ContextDev::Internal::Type::Unknown]
|
|
20
|
-
|
|
21
|
-
# @!attribute metadata
|
|
22
|
-
#
|
|
23
|
-
# @return [ContextDev::Models::WebExtractResponse::Metadata]
|
|
24
|
-
required :metadata, -> { ContextDev::Models::WebExtractResponse::Metadata }
|
|
25
|
-
|
|
26
|
-
# @!attribute request_id
|
|
27
|
-
# Unique id of this API call, also sent in the X-Request-Id response header. Quote
|
|
28
|
-
# it when contacting support about a failed request.
|
|
29
|
-
#
|
|
30
|
-
# @return [String]
|
|
31
|
-
required :request_id, String
|
|
32
|
-
|
|
33
|
-
# @!attribute status
|
|
34
|
-
# Status of the response, e.g., 'ok'
|
|
35
|
-
#
|
|
36
|
-
# @return [String]
|
|
37
|
-
required :status, String
|
|
38
|
-
|
|
39
|
-
# @!attribute url
|
|
40
|
-
# The starting URL that was analyzed
|
|
41
|
-
#
|
|
42
|
-
# @return [String]
|
|
43
|
-
required :url, String
|
|
44
|
-
|
|
45
|
-
# @!attribute urls_analyzed
|
|
46
|
-
# List of URLs whose Markdown was used for extraction
|
|
47
|
-
#
|
|
48
|
-
# @return [Array<String>]
|
|
49
|
-
required :urls_analyzed, ContextDev::Internal::Type::ArrayOf[String]
|
|
50
|
-
|
|
51
|
-
# @!attribute key_metadata
|
|
52
|
-
# Credit usage, included whenever a valid API key is provided.
|
|
53
|
-
#
|
|
54
|
-
# @return [ContextDev::Models::WebExtractResponse::KeyMetadata, nil]
|
|
55
|
-
optional :key_metadata, -> { ContextDev::Models::WebExtractResponse::KeyMetadata }
|
|
56
|
-
|
|
57
|
-
# @!attribute partial
|
|
58
|
-
# True when the timeout ended processing and this response contains only usable
|
|
59
|
-
# results completed so far. Unfinished results are omitted.
|
|
60
|
-
#
|
|
61
|
-
# @return [Boolean, nil]
|
|
62
|
-
optional :partial, ContextDev::Internal::Type::Boolean
|
|
63
|
-
|
|
64
|
-
# @!method initialize(cache_metadata:, data:, metadata:, request_id:, status:, url:, urls_analyzed:, key_metadata: nil, partial: nil)
|
|
65
|
-
# Some parameter documentations has been truncated, see
|
|
66
|
-
# {ContextDev::Models::WebExtractResponse} for more details.
|
|
67
|
-
#
|
|
68
|
-
# @param cache_metadata [ContextDev::Models::WebExtractResponse::CacheMetadata] Cache outcome for this response. Composite responses are hits only when every ca
|
|
69
|
-
#
|
|
70
|
-
# @param data [Hash{Symbol=>Object}] Extracted data matching the request schema
|
|
71
|
-
#
|
|
72
|
-
# @param metadata [ContextDev::Models::WebExtractResponse::Metadata]
|
|
73
|
-
#
|
|
74
|
-
# @param request_id [String] Unique id of this API call, also sent in the X-Request-Id response header. Quote
|
|
75
|
-
#
|
|
76
|
-
# @param status [String] Status of the response, e.g., 'ok'
|
|
77
|
-
#
|
|
78
|
-
# @param url [String] The starting URL that was analyzed
|
|
79
|
-
#
|
|
80
|
-
# @param urls_analyzed [Array<String>] List of URLs whose Markdown was used for extraction
|
|
81
|
-
#
|
|
82
|
-
# @param key_metadata [ContextDev::Models::WebExtractResponse::KeyMetadata] Credit usage, included whenever a valid API key is provided.
|
|
83
|
-
#
|
|
84
|
-
# @param partial [Boolean] True when the timeout ended processing and this response contains only usable re
|
|
85
|
-
|
|
86
|
-
# @see ContextDev::Models::WebExtractResponse#cache_metadata
|
|
87
|
-
class CacheMetadata < ContextDev::Internal::Type::BaseModel
|
|
88
|
-
# @!attribute age_ms
|
|
89
|
-
# Age of the cached data in milliseconds. Zero for miss and zdr responses.
|
|
90
|
-
#
|
|
91
|
-
# @return [Integer]
|
|
92
|
-
required :age_ms, Integer
|
|
93
|
-
|
|
94
|
-
# @!attribute status
|
|
95
|
-
# Whether the response was served from cache, required fresh work, or honored
|
|
96
|
-
# zero-data-retention cache bypass.
|
|
97
|
-
#
|
|
98
|
-
# @return [Symbol, ContextDev::Models::WebExtractResponse::CacheMetadata::Status]
|
|
99
|
-
required :status, enum: -> { ContextDev::Models::WebExtractResponse::CacheMetadata::Status }
|
|
100
|
-
|
|
101
|
-
# @!method initialize(age_ms:, status:)
|
|
102
|
-
# Some parameter documentations has been truncated, see
|
|
103
|
-
# {ContextDev::Models::WebExtractResponse::CacheMetadata} for more details.
|
|
104
|
-
#
|
|
105
|
-
# Cache outcome for this response. Composite responses are hits only when every
|
|
106
|
-
# cache-controlled fetch contributing to the output was a hit; age_ms is the
|
|
107
|
-
# oldest contributing hit.
|
|
108
|
-
#
|
|
109
|
-
# @param age_ms [Integer] Age of the cached data in milliseconds. Zero for miss and zdr responses.
|
|
110
|
-
#
|
|
111
|
-
# @param status [Symbol, ContextDev::Models::WebExtractResponse::CacheMetadata::Status] Whether the response was served from cache, required fresh work, or honored zero
|
|
112
|
-
|
|
113
|
-
# Whether the response was served from cache, required fresh work, or honored
|
|
114
|
-
# zero-data-retention cache bypass.
|
|
115
|
-
#
|
|
116
|
-
# @see ContextDev::Models::WebExtractResponse::CacheMetadata#status
|
|
117
|
-
module Status
|
|
118
|
-
extend ContextDev::Internal::Type::Enum
|
|
119
|
-
|
|
120
|
-
HIT = :hit
|
|
121
|
-
MISS = :miss
|
|
122
|
-
ZDR = :zdr
|
|
123
|
-
|
|
124
|
-
# @!method self.values
|
|
125
|
-
# @return [Array<Symbol>]
|
|
126
|
-
end
|
|
127
|
-
end
|
|
128
|
-
|
|
129
|
-
# @see ContextDev::Models::WebExtractResponse#metadata
|
|
130
|
-
class Metadata < ContextDev::Internal::Type::BaseModel
|
|
131
|
-
# @!attribute max_crawl_depth
|
|
132
|
-
#
|
|
133
|
-
# @return [Integer]
|
|
134
|
-
required :max_crawl_depth, Integer, api_name: :maxCrawlDepth
|
|
135
|
-
|
|
136
|
-
# @!attribute num_blocked
|
|
137
|
-
# Number of crawled pages excluded because they were anti-bot challenges, error
|
|
138
|
-
# pages, or parked-domain placeholders.
|
|
139
|
-
#
|
|
140
|
-
# @return [Integer]
|
|
141
|
-
required :num_blocked, Integer, api_name: :numBlocked
|
|
142
|
-
|
|
143
|
-
# @!attribute num_failed
|
|
144
|
-
#
|
|
145
|
-
# @return [Integer]
|
|
146
|
-
required :num_failed, Integer, api_name: :numFailed
|
|
147
|
-
|
|
148
|
-
# @!attribute num_skipped
|
|
149
|
-
#
|
|
150
|
-
# @return [Integer]
|
|
151
|
-
required :num_skipped, Integer, api_name: :numSkipped
|
|
152
|
-
|
|
153
|
-
# @!attribute num_succeeded
|
|
154
|
-
#
|
|
155
|
-
# @return [Integer]
|
|
156
|
-
required :num_succeeded, Integer, api_name: :numSucceeded
|
|
157
|
-
|
|
158
|
-
# @!attribute num_urls
|
|
159
|
-
#
|
|
160
|
-
# @return [Integer]
|
|
161
|
-
required :num_urls, Integer, api_name: :numUrls
|
|
162
|
-
|
|
163
|
-
# @!attribute actions_applied
|
|
164
|
-
# One verified outcome per requested browser action, in request order.
|
|
165
|
-
#
|
|
166
|
-
# @return [Array<ContextDev::Models::WebExtractResponse::Metadata::ActionsApplied>, nil]
|
|
167
|
-
optional :actions_applied,
|
|
168
|
-
-> { ContextDev::Internal::Type::ArrayOf[ContextDev::Models::WebExtractResponse::Metadata::ActionsApplied] },
|
|
169
|
-
api_name: :actionsApplied
|
|
170
|
-
|
|
171
|
-
# @!method initialize(max_crawl_depth:, num_blocked:, num_failed:, num_skipped:, num_succeeded:, num_urls:, actions_applied: nil)
|
|
172
|
-
# Some parameter documentations has been truncated, see
|
|
173
|
-
# {ContextDev::Models::WebExtractResponse::Metadata} for more details.
|
|
174
|
-
#
|
|
175
|
-
# @param max_crawl_depth [Integer]
|
|
176
|
-
#
|
|
177
|
-
# @param num_blocked [Integer] Number of crawled pages excluded because they were anti-bot challenges, error pa
|
|
178
|
-
#
|
|
179
|
-
# @param num_failed [Integer]
|
|
180
|
-
#
|
|
181
|
-
# @param num_skipped [Integer]
|
|
182
|
-
#
|
|
183
|
-
# @param num_succeeded [Integer]
|
|
184
|
-
#
|
|
185
|
-
# @param num_urls [Integer]
|
|
186
|
-
#
|
|
187
|
-
# @param actions_applied [Array<ContextDev::Models::WebExtractResponse::Metadata::ActionsApplied>] One verified outcome per requested browser action, in request order.
|
|
188
|
-
|
|
189
|
-
class ActionsApplied < ContextDev::Internal::Type::BaseModel
|
|
190
|
-
# @!attribute instruction
|
|
191
|
-
#
|
|
192
|
-
# @return [String]
|
|
193
|
-
required :instruction, String
|
|
194
|
-
|
|
195
|
-
# @!attribute status
|
|
196
|
-
# Applied means the requested page state was visibly verified. Failed means it was
|
|
197
|
-
# not verified. Skipped means it was not attempted.
|
|
198
|
-
#
|
|
199
|
-
# @return [Symbol, ContextDev::Models::WebExtractResponse::Metadata::ActionsApplied::Status]
|
|
200
|
-
required :status, enum: -> { ContextDev::Models::WebExtractResponse::Metadata::ActionsApplied::Status }
|
|
201
|
-
|
|
202
|
-
# @!attribute completion_evidence
|
|
203
|
-
# Visible page evidence used to verify an applied action.
|
|
204
|
-
#
|
|
205
|
-
# @return [String, nil]
|
|
206
|
-
optional :completion_evidence, String, api_name: :completionEvidence
|
|
207
|
-
|
|
208
|
-
# @!attribute duration_ms
|
|
209
|
-
#
|
|
210
|
-
# @return [Float, nil]
|
|
211
|
-
optional :duration_ms, Float, api_name: :durationMs
|
|
212
|
-
|
|
213
|
-
# @!attribute error
|
|
214
|
-
#
|
|
215
|
-
# @return [String, nil]
|
|
216
|
-
optional :error, String
|
|
217
|
-
|
|
218
|
-
# @!attribute method_
|
|
219
|
-
#
|
|
220
|
-
# @return [String, nil]
|
|
221
|
-
optional :method_, String, api_name: :method
|
|
222
|
-
|
|
223
|
-
# @!attribute target_description
|
|
224
|
-
#
|
|
225
|
-
# @return [String, nil]
|
|
226
|
-
optional :target_description, String, api_name: :targetDescription
|
|
227
|
-
|
|
228
|
-
# @!method initialize(instruction:, status:, completion_evidence: nil, duration_ms: nil, error: nil, method_: nil, target_description: nil)
|
|
229
|
-
# Some parameter documentations has been truncated, see
|
|
230
|
-
# {ContextDev::Models::WebExtractResponse::Metadata::ActionsApplied} for more
|
|
231
|
-
# details.
|
|
232
|
-
#
|
|
233
|
-
# @param instruction [String]
|
|
234
|
-
#
|
|
235
|
-
# @param status [Symbol, ContextDev::Models::WebExtractResponse::Metadata::ActionsApplied::Status] Applied means the requested page state was visibly verified. Failed means it was
|
|
236
|
-
#
|
|
237
|
-
# @param completion_evidence [String] Visible page evidence used to verify an applied action.
|
|
238
|
-
#
|
|
239
|
-
# @param duration_ms [Float]
|
|
240
|
-
#
|
|
241
|
-
# @param error [String]
|
|
242
|
-
#
|
|
243
|
-
# @param method_ [String]
|
|
244
|
-
#
|
|
245
|
-
# @param target_description [String]
|
|
246
|
-
|
|
247
|
-
# Applied means the requested page state was visibly verified. Failed means it was
|
|
248
|
-
# not verified. Skipped means it was not attempted.
|
|
249
|
-
#
|
|
250
|
-
# @see ContextDev::Models::WebExtractResponse::Metadata::ActionsApplied#status
|
|
251
|
-
module Status
|
|
252
|
-
extend ContextDev::Internal::Type::Enum
|
|
253
|
-
|
|
254
|
-
APPLIED = :applied
|
|
255
|
-
FAILED = :failed
|
|
256
|
-
SKIPPED = :skipped
|
|
257
|
-
|
|
258
|
-
# @!method self.values
|
|
259
|
-
# @return [Array<Symbol>]
|
|
260
|
-
end
|
|
261
|
-
end
|
|
262
|
-
end
|
|
263
|
-
|
|
264
|
-
# @see ContextDev::Models::WebExtractResponse#key_metadata
|
|
265
|
-
class KeyMetadata < ContextDev::Internal::Type::BaseModel
|
|
266
|
-
# @!attribute credits_consumed
|
|
267
|
-
# Credits used by this request.
|
|
268
|
-
#
|
|
269
|
-
# @return [Integer]
|
|
270
|
-
required :credits_consumed, Integer
|
|
271
|
-
|
|
272
|
-
# @!attribute credits_remaining
|
|
273
|
-
# Credits remaining for your organization.
|
|
274
|
-
#
|
|
275
|
-
# @return [Integer]
|
|
276
|
-
required :credits_remaining, Integer
|
|
277
|
-
|
|
278
|
-
# @!method initialize(credits_consumed:, credits_remaining:)
|
|
279
|
-
# Credit usage, included whenever a valid API key is provided.
|
|
280
|
-
#
|
|
281
|
-
# @param credits_consumed [Integer] Credits used by this request.
|
|
282
|
-
#
|
|
283
|
-
# @param credits_remaining [Integer] Credits remaining for your organization.
|
|
284
|
-
end
|
|
285
|
-
end
|
|
286
|
-
end
|
|
287
|
-
end
|
|
@@ -1,344 +0,0 @@
|
|
|
1
|
-
# frozen_string_literal: true
|
|
2
|
-
|
|
3
|
-
module ContextDev
|
|
4
|
-
module Models
|
|
5
|
-
# @see ContextDev::Resources::Web#web_scrape_bytes
|
|
6
|
-
class WebWebScrapeBytesParams < ContextDev::Internal::Type::BaseModel
|
|
7
|
-
extend ContextDev::Internal::Type::RequestParameters::Converter
|
|
8
|
-
include ContextDev::Internal::Type::RequestParameters
|
|
9
|
-
|
|
10
|
-
# @!attribute url
|
|
11
|
-
# Full HTTP(S) URL of the resource to download, such as an image, PDF, or page.
|
|
12
|
-
#
|
|
13
|
-
# @return [String]
|
|
14
|
-
required :url, String
|
|
15
|
-
|
|
16
|
-
# @!attribute country
|
|
17
|
-
# Fetch the target page through a residential proxy in this country (ISO 3166-1
|
|
18
|
-
# alpha-2).
|
|
19
|
-
#
|
|
20
|
-
# @return [Symbol, ContextDev::Models::WebWebScrapeBytesParams::Country, nil]
|
|
21
|
-
optional :country, enum: -> { ContextDev::WebWebScrapeBytesParams::Country }
|
|
22
|
-
|
|
23
|
-
# @!attribute headers
|
|
24
|
-
# Optional outbound HTTP headers, such as Referer, Cookie, or Authorization. Send
|
|
25
|
-
# as a JSON object or deep-object query params such as
|
|
26
|
-
# headers[Referer]=https://example.com/. Host, Content-Length, and hop-by-hop
|
|
27
|
-
# transport headers are rejected. Authorization and cookies are removed when a
|
|
28
|
-
# redirect changes origin.
|
|
29
|
-
#
|
|
30
|
-
# @return [Hash{Symbol=>String}, nil]
|
|
31
|
-
optional :headers, ContextDev::Internal::Type::HashOf[String]
|
|
32
|
-
|
|
33
|
-
# @!attribute tags
|
|
34
|
-
# Comma-separated tags for tracking request usage. Up to 20 tags, each 1-50
|
|
35
|
-
# characters.
|
|
36
|
-
#
|
|
37
|
-
# @return [Array<String>, nil]
|
|
38
|
-
optional :tags, ContextDev::Internal::Type::ArrayOf[String]
|
|
39
|
-
|
|
40
|
-
# @!attribute timeout_opts
|
|
41
|
-
# Optional request deadline and behavior on timeout. For GET requests, use
|
|
42
|
-
# timeoutOpts[milliseconds]=30000&timeoutOpts[behavior]=fail or a JSON-encoded
|
|
43
|
-
# timeoutOpts object.
|
|
44
|
-
#
|
|
45
|
-
# @return [ContextDev::Models::WebWebScrapeBytesParams::TimeoutOpts, nil]
|
|
46
|
-
optional :timeout_opts, -> { ContextDev::WebWebScrapeBytesParams::TimeoutOpts }
|
|
47
|
-
|
|
48
|
-
# @!attribute zdr
|
|
49
|
-
# Set to enabled to bypass shared caches and omit request and response content
|
|
50
|
-
# from retained usage logs. Requires zero data retention to be enabled for your
|
|
51
|
-
# organization (contact support@context.dev), otherwise the request fails with
|
|
52
|
-
# ZDR_NOT_ENABLED. Successful ZDR responses include X-Context-ZDR: true.
|
|
53
|
-
#
|
|
54
|
-
# @return [Symbol, ContextDev::Models::WebWebScrapeBytesParams::Zdr, nil]
|
|
55
|
-
optional :zdr, enum: -> { ContextDev::WebWebScrapeBytesParams::Zdr }
|
|
56
|
-
|
|
57
|
-
# @!method initialize(url:, country: nil, headers: nil, tags: nil, timeout_opts: nil, zdr: nil, request_options: {})
|
|
58
|
-
# Some parameter documentations has been truncated, see
|
|
59
|
-
# {ContextDev::Models::WebWebScrapeBytesParams} for more details.
|
|
60
|
-
#
|
|
61
|
-
# @param url [String] Full HTTP(S) URL of the resource to download, such as an image, PDF, or page.
|
|
62
|
-
#
|
|
63
|
-
# @param country [Symbol, ContextDev::Models::WebWebScrapeBytesParams::Country] Fetch the target page through a residential proxy in this country (ISO 3166-1 al
|
|
64
|
-
#
|
|
65
|
-
# @param headers [Hash{Symbol=>String}] Optional outbound HTTP headers, such as Referer, Cookie, or Authorization. Send
|
|
66
|
-
#
|
|
67
|
-
# @param tags [Array<String>] Comma-separated tags for tracking request usage. Up to 20 tags, each 1-50 charac
|
|
68
|
-
#
|
|
69
|
-
# @param timeout_opts [ContextDev::Models::WebWebScrapeBytesParams::TimeoutOpts] Optional request deadline and behavior on timeout. For GET requests, use timeout
|
|
70
|
-
#
|
|
71
|
-
# @param zdr [Symbol, ContextDev::Models::WebWebScrapeBytesParams::Zdr] Set to enabled to bypass shared caches and omit request and response content fro
|
|
72
|
-
#
|
|
73
|
-
# @param request_options [ContextDev::RequestOptions, Hash{Symbol=>Object}]
|
|
74
|
-
|
|
75
|
-
# Fetch the target page through a residential proxy in this country (ISO 3166-1
|
|
76
|
-
# alpha-2).
|
|
77
|
-
module Country
|
|
78
|
-
extend ContextDev::Internal::Type::Enum
|
|
79
|
-
|
|
80
|
-
AD = :ad
|
|
81
|
-
AE = :ae
|
|
82
|
-
AF = :af
|
|
83
|
-
AG = :ag
|
|
84
|
-
AI = :ai
|
|
85
|
-
AL = :al
|
|
86
|
-
AM = :am
|
|
87
|
-
AO = :ao
|
|
88
|
-
AR = :ar
|
|
89
|
-
AT = :at
|
|
90
|
-
AU = :au
|
|
91
|
-
AW = :aw
|
|
92
|
-
AZ = :az
|
|
93
|
-
BA = :ba
|
|
94
|
-
BB = :bb
|
|
95
|
-
BD = :bd
|
|
96
|
-
BE = :be
|
|
97
|
-
BF = :bf
|
|
98
|
-
BG = :bg
|
|
99
|
-
BH = :bh
|
|
100
|
-
BI = :bi
|
|
101
|
-
BJ = :bj
|
|
102
|
-
BM = :bm
|
|
103
|
-
BN = :bn
|
|
104
|
-
BO = :bo
|
|
105
|
-
BQ = :bq
|
|
106
|
-
BR = :br
|
|
107
|
-
BS = :bs
|
|
108
|
-
BW = :bw
|
|
109
|
-
BY = :by
|
|
110
|
-
BZ = :bz
|
|
111
|
-
CA = :ca
|
|
112
|
-
CD = :cd
|
|
113
|
-
CF = :cf
|
|
114
|
-
CG = :cg
|
|
115
|
-
CH = :ch
|
|
116
|
-
CI = :ci
|
|
117
|
-
CL = :cl
|
|
118
|
-
CM = :cm
|
|
119
|
-
CN = :cn
|
|
120
|
-
CO = :co
|
|
121
|
-
CR = :cr
|
|
122
|
-
CV = :cv
|
|
123
|
-
CW = :cw
|
|
124
|
-
CY = :cy
|
|
125
|
-
CZ = :cz
|
|
126
|
-
DE = :de
|
|
127
|
-
DJ = :dj
|
|
128
|
-
DK = :dk
|
|
129
|
-
DM = :dm
|
|
130
|
-
DO = :do
|
|
131
|
-
DZ = :dz
|
|
132
|
-
EC = :ec
|
|
133
|
-
EE = :ee
|
|
134
|
-
EG = :eg
|
|
135
|
-
ES = :es
|
|
136
|
-
ET = :et
|
|
137
|
-
FI = :fi
|
|
138
|
-
FJ = :fj
|
|
139
|
-
FR = :fr
|
|
140
|
-
GA = :ga
|
|
141
|
-
GB = :gb
|
|
142
|
-
GD = :gd
|
|
143
|
-
GE = :ge
|
|
144
|
-
GF = :gf
|
|
145
|
-
GG = :gg
|
|
146
|
-
GH = :gh
|
|
147
|
-
GM = :gm
|
|
148
|
-
GN = :gn
|
|
149
|
-
GP = :gp
|
|
150
|
-
GQ = :gq
|
|
151
|
-
GR = :gr
|
|
152
|
-
GT = :gt
|
|
153
|
-
GU = :gu
|
|
154
|
-
GW = :gw
|
|
155
|
-
GY = :gy
|
|
156
|
-
HK = :hk
|
|
157
|
-
HN = :hn
|
|
158
|
-
HR = :hr
|
|
159
|
-
HT = :ht
|
|
160
|
-
HU = :hu
|
|
161
|
-
ID = :id
|
|
162
|
-
IE = :ie
|
|
163
|
-
IL = :il
|
|
164
|
-
IM = :im
|
|
165
|
-
IN = :in
|
|
166
|
-
IQ = :iq
|
|
167
|
-
IR = :ir
|
|
168
|
-
IS = :is
|
|
169
|
-
IT = :it
|
|
170
|
-
JE = :je
|
|
171
|
-
JM = :jm
|
|
172
|
-
JO = :jo
|
|
173
|
-
JP = :jp
|
|
174
|
-
KE = :ke
|
|
175
|
-
KG = :kg
|
|
176
|
-
KH = :kh
|
|
177
|
-
KN = :kn
|
|
178
|
-
KR = :kr
|
|
179
|
-
KW = :kw
|
|
180
|
-
KY = :ky
|
|
181
|
-
KZ = :kz
|
|
182
|
-
LA = :la
|
|
183
|
-
LB = :lb
|
|
184
|
-
LC = :lc
|
|
185
|
-
LK = :lk
|
|
186
|
-
LR = :lr
|
|
187
|
-
LS = :ls
|
|
188
|
-
LT = :lt
|
|
189
|
-
LU = :lu
|
|
190
|
-
LV = :lv
|
|
191
|
-
LY = :ly
|
|
192
|
-
MA = :ma
|
|
193
|
-
MC = :mc
|
|
194
|
-
MD = :md
|
|
195
|
-
ME = :me
|
|
196
|
-
MF = :mf
|
|
197
|
-
MG = :mg
|
|
198
|
-
MK = :mk
|
|
199
|
-
ML = :ml
|
|
200
|
-
MM = :mm
|
|
201
|
-
MN = :mn
|
|
202
|
-
MO = :mo
|
|
203
|
-
MQ = :mq
|
|
204
|
-
MR = :mr
|
|
205
|
-
MT = :mt
|
|
206
|
-
MU = :mu
|
|
207
|
-
MV = :mv
|
|
208
|
-
MW = :mw
|
|
209
|
-
MX = :mx
|
|
210
|
-
MY = :my
|
|
211
|
-
MZ = :mz
|
|
212
|
-
NA = :na
|
|
213
|
-
NC = :nc
|
|
214
|
-
NE = :ne
|
|
215
|
-
NG = :ng
|
|
216
|
-
NI = :ni
|
|
217
|
-
NL = :nl
|
|
218
|
-
NO = :no
|
|
219
|
-
NP = :np
|
|
220
|
-
NZ = :nz
|
|
221
|
-
OM = :om
|
|
222
|
-
PA = :pa
|
|
223
|
-
PE = :pe
|
|
224
|
-
PF = :pf
|
|
225
|
-
PG = :pg
|
|
226
|
-
PH = :ph
|
|
227
|
-
PK = :pk
|
|
228
|
-
PL = :pl
|
|
229
|
-
PR = :pr
|
|
230
|
-
PS = :ps
|
|
231
|
-
PT = :pt
|
|
232
|
-
PY = :py
|
|
233
|
-
QA = :qa
|
|
234
|
-
RE = :re
|
|
235
|
-
RO = :ro
|
|
236
|
-
RS = :rs
|
|
237
|
-
RU = :ru
|
|
238
|
-
RW = :rw
|
|
239
|
-
SA = :sa
|
|
240
|
-
SC = :sc
|
|
241
|
-
SD = :sd
|
|
242
|
-
SE = :se
|
|
243
|
-
SG = :sg
|
|
244
|
-
SI = :si
|
|
245
|
-
SK = :sk
|
|
246
|
-
SL = :sl
|
|
247
|
-
SM = :sm
|
|
248
|
-
SN = :sn
|
|
249
|
-
SO = :so
|
|
250
|
-
SR = :sr
|
|
251
|
-
SS = :ss
|
|
252
|
-
ST = :st
|
|
253
|
-
SV = :sv
|
|
254
|
-
SX = :sx
|
|
255
|
-
SY = :sy
|
|
256
|
-
SZ = :sz
|
|
257
|
-
TC = :tc
|
|
258
|
-
TD = :td
|
|
259
|
-
TG = :tg
|
|
260
|
-
TH = :th
|
|
261
|
-
TJ = :tj
|
|
262
|
-
TL = :tl
|
|
263
|
-
TM = :tm
|
|
264
|
-
TN = :tn
|
|
265
|
-
TR = :tr
|
|
266
|
-
TT = :tt
|
|
267
|
-
TW = :tw
|
|
268
|
-
TZ = :tz
|
|
269
|
-
UA = :ua
|
|
270
|
-
UG = :ug
|
|
271
|
-
US = :us
|
|
272
|
-
UY = :uy
|
|
273
|
-
UZ = :uz
|
|
274
|
-
VC = :vc
|
|
275
|
-
VE = :ve
|
|
276
|
-
VG = :vg
|
|
277
|
-
VI = :vi
|
|
278
|
-
VN = :vn
|
|
279
|
-
YE = :ye
|
|
280
|
-
YT = :yt
|
|
281
|
-
ZA = :za
|
|
282
|
-
ZM = :zm
|
|
283
|
-
ZW = :zw
|
|
284
|
-
|
|
285
|
-
# @!method self.values
|
|
286
|
-
# @return [Array<Symbol>]
|
|
287
|
-
end
|
|
288
|
-
|
|
289
|
-
class TimeoutOpts < ContextDev::Internal::Type::BaseModel
|
|
290
|
-
# @!attribute milliseconds
|
|
291
|
-
# Request deadline in milliseconds. Maximum: 300000 (5 minutes).
|
|
292
|
-
#
|
|
293
|
-
# @return [Integer]
|
|
294
|
-
required :milliseconds, Integer
|
|
295
|
-
|
|
296
|
-
# @!attribute behavior
|
|
297
|
-
# What to do at the deadline. This endpoint supports "fail": return 408
|
|
298
|
-
# REQUEST_TIMEOUT without charging credits.
|
|
299
|
-
#
|
|
300
|
-
# @return [Symbol, ContextDev::Models::WebWebScrapeBytesParams::TimeoutOpts::Behavior, nil]
|
|
301
|
-
optional :behavior, enum: -> { ContextDev::WebWebScrapeBytesParams::TimeoutOpts::Behavior }
|
|
302
|
-
|
|
303
|
-
# @!method initialize(milliseconds:, behavior: nil)
|
|
304
|
-
# Some parameter documentations has been truncated, see
|
|
305
|
-
# {ContextDev::Models::WebWebScrapeBytesParams::TimeoutOpts} for more details.
|
|
306
|
-
#
|
|
307
|
-
# Optional request deadline and behavior on timeout. For GET requests, use
|
|
308
|
-
# timeoutOpts[milliseconds]=30000&timeoutOpts[behavior]=fail or a JSON-encoded
|
|
309
|
-
# timeoutOpts object.
|
|
310
|
-
#
|
|
311
|
-
# @param milliseconds [Integer] Request deadline in milliseconds. Maximum: 300000 (5 minutes).
|
|
312
|
-
#
|
|
313
|
-
# @param behavior [Symbol, ContextDev::Models::WebWebScrapeBytesParams::TimeoutOpts::Behavior] What to do at the deadline. This endpoint supports "fail": return 408 REQUEST_TI
|
|
314
|
-
|
|
315
|
-
# What to do at the deadline. This endpoint supports "fail": return 408
|
|
316
|
-
# REQUEST_TIMEOUT without charging credits.
|
|
317
|
-
#
|
|
318
|
-
# @see ContextDev::Models::WebWebScrapeBytesParams::TimeoutOpts#behavior
|
|
319
|
-
module Behavior
|
|
320
|
-
extend ContextDev::Internal::Type::Enum
|
|
321
|
-
|
|
322
|
-
FAIL = :fail
|
|
323
|
-
|
|
324
|
-
# @!method self.values
|
|
325
|
-
# @return [Array<Symbol>]
|
|
326
|
-
end
|
|
327
|
-
end
|
|
328
|
-
|
|
329
|
-
# Set to enabled to bypass shared caches and omit request and response content
|
|
330
|
-
# from retained usage logs. Requires zero data retention to be enabled for your
|
|
331
|
-
# organization (contact support@context.dev), otherwise the request fails with
|
|
332
|
-
# ZDR_NOT_ENABLED. Successful ZDR responses include X-Context-ZDR: true.
|
|
333
|
-
module Zdr
|
|
334
|
-
extend ContextDev::Internal::Type::Enum
|
|
335
|
-
|
|
336
|
-
ENABLED = :enabled
|
|
337
|
-
DISABLED = :disabled
|
|
338
|
-
|
|
339
|
-
# @!method self.values
|
|
340
|
-
# @return [Array<Symbol>]
|
|
341
|
-
end
|
|
342
|
-
end
|
|
343
|
-
end
|
|
344
|
-
end
|