context.dev 2.21.0 → 2.22.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 +24 -0
- data/README.md +1 -1
- data/lib/context_dev/client.rb +4 -9
- data/lib/context_dev/models/batch_cancel_params.rb +2 -2
- data/lib/context_dev/models/batch_cancel_response.rb +16 -21
- data/lib/context_dev/models/batch_delete_params.rb +2 -2
- data/lib/context_dev/models/batch_delete_response.rb +8 -8
- data/lib/context_dev/models/batch_get_results_params.rb +2 -2
- data/lib/context_dev/models/batch_get_results_response.rb +17 -22
- data/lib/context_dev/models/batch_list_response.rb +38 -47
- data/lib/context_dev/models/batch_retrieve_params.rb +2 -2
- data/lib/context_dev/models/batch_retrieve_response.rb +37 -46
- data/lib/context_dev/models/batch_submit_params.rb +80 -109
- data/lib/context_dev/models/batch_submit_response.rb +18 -28
- data/lib/context_dev/models/brand_retrieve_params.rb +90 -149
- data/lib/context_dev/models/brand_retrieve_response.rb +18 -22
- data/lib/context_dev/models/brand_search_params.rb +2 -3
- data/lib/context_dev/models/brand_search_response.rb +8 -8
- data/lib/context_dev/models/crawl_controls.rb +1 -2
- data/lib/context_dev/models/feedback_submit_params.rb +2 -2
- data/lib/context_dev/models/feedback_submit_response.rb +8 -8
- data/lib/context_dev/models/industry_retrieve_naics_params.rb +17 -32
- data/lib/context_dev/models/industry_retrieve_naics_response.rb +10 -10
- data/lib/context_dev/models/industry_retrieve_sic_params.rb +20 -39
- data/lib/context_dev/models/industry_retrieve_sic_response.rb +10 -10
- data/lib/context_dev/models/intake.rb +7 -13
- data/lib/context_dev/models/log_list_response.rb +14 -10
- data/lib/context_dev/models/log_retrieve_response.rb +15 -41
- data/lib/context_dev/models/monitor_create_params.rb +238 -72
- data/lib/context_dev/models/monitor_create_response.rb +364 -175
- data/lib/context_dev/models/monitor_delete_params.rb +3 -1
- data/lib/context_dev/models/monitor_delete_response.rb +44 -1
- data/lib/context_dev/models/monitor_get_credit_usage_response.rb +43 -1
- data/lib/context_dev/models/monitor_get_limits_response.rb +47 -7
- data/lib/context_dev/models/monitor_list_account_changes_response.rb +143 -20
- data/lib/context_dev/models/monitor_list_account_runs_response.rb +50 -8
- data/lib/context_dev/models/monitor_list_changes_params.rb +2 -1
- data/lib/context_dev/models/monitor_list_changes_response.rb +143 -20
- data/lib/context_dev/models/monitor_list_params.rb +3 -3
- data/lib/context_dev/models/monitor_list_response.rb +304 -106
- data/lib/context_dev/models/monitor_list_runs_params.rb +2 -1
- data/lib/context_dev/models/monitor_list_runs_response.rb +50 -8
- data/lib/context_dev/models/monitor_retrieve_change_params.rb +3 -1
- data/lib/context_dev/models/monitor_retrieve_change_response.rb +45 -15
- data/lib/context_dev/models/monitor_retrieve_params.rb +3 -1
- data/lib/context_dev/models/monitor_retrieve_response.rb +361 -171
- data/lib/context_dev/models/monitor_retrieve_run_params.rb +6 -2
- data/lib/context_dev/models/monitor_retrieve_run_response.rb +45 -8
- data/lib/context_dev/models/monitor_rotate_webhook_secret_params.rb +3 -1
- data/lib/context_dev/models/monitor_rotate_webhook_secret_response.rb +364 -172
- data/lib/context_dev/models/monitor_run_params.rb +3 -1
- data/lib/context_dev/models/monitor_run_response.rb +42 -4
- data/lib/context_dev/models/monitor_update_params.rb +239 -71
- data/lib/context_dev/models/monitor_update_response.rb +361 -171
- data/lib/context_dev/models/news_search_params.rb +10 -6
- data/lib/context_dev/models/news_search_response.rb +8 -8
- data/lib/context_dev/models/parse_handle_params.rb +9 -20
- data/lib/context_dev/models/parse_handle_response.rb +8 -8
- data/lib/context_dev/models/person_enrich_params.rb +76 -50
- data/lib/context_dev/models/person_enrich_response.rb +8 -8
- data/lib/context_dev/models/utility_prefetch_params.rb +15 -29
- data/lib/context_dev/models/utility_prefetch_response.rb +10 -10
- data/lib/context_dev/models/web_answers_params.rb +28 -47
- data/lib/context_dev/models/web_answers_response.rb +9 -8
- data/lib/context_dev/models/web_extract_competitors_params.rb +17 -32
- data/lib/context_dev/models/web_extract_competitors_response.rb +8 -8
- data/lib/context_dev/models/web_extract_styleguide_params.rb +22 -44
- data/lib/context_dev/models/web_extract_styleguide_response.rb +34 -44
- data/lib/context_dev/models/web_map_urls_params.rb +30 -51
- data/lib/context_dev/models/web_map_urls_response.rb +8 -8
- data/lib/context_dev/models/web_scrape_params.rb +193 -191
- data/lib/context_dev/models/web_scrape_response.rb +219 -95
- data/lib/context_dev/models/web_screenshot_params.rb +20 -39
- data/lib/context_dev/models/web_screenshot_response.rb +18 -28
- data/lib/context_dev/models/web_search_params.rb +76 -65
- data/lib/context_dev/models/web_search_response.rb +68 -27
- data/lib/context_dev/models/web_web_crawl_md_params.rb +41 -70
- data/lib/context_dev/models/web_web_crawl_md_response.rb +11 -15
- data/lib/context_dev/models/webhook_delivery.rb +3 -7
- data/lib/context_dev/models/webhooks/attempt.rb +3 -3
- data/lib/context_dev/models/webhooks/delivery.rb +16 -11
- data/lib/context_dev/models/webhooks/delivery_list_attempts_params.rb +2 -6
- data/lib/context_dev/models/webhooks/delivery_list_attempts_response.rb +8 -8
- data/lib/context_dev/models/webhooks/delivery_list_params.rb +4 -4
- data/lib/context_dev/models/webhooks/delivery_list_response.rb +8 -8
- data/lib/context_dev/models/webhooks/delivery_retrieve_params.rb +2 -6
- data/lib/context_dev/models/webhooks/delivery_retrieve_response.rb +8 -8
- data/lib/context_dev/models/webhooks/delivery_retry_params.rb +4 -4
- data/lib/context_dev/models/webhooks/delivery_retry_response.rb +8 -8
- data/lib/context_dev/models/webhooks/delivery_summary.rb +16 -11
- data/lib/context_dev/resources/batch.rb +17 -16
- data/lib/context_dev/resources/brand.rb +6 -8
- data/lib/context_dev/resources/feedback.rb +4 -5
- data/lib/context_dev/resources/industry.rb +9 -11
- data/lib/context_dev/resources/logs.rb +4 -5
- data/lib/context_dev/resources/monitors.rb +50 -53
- data/lib/context_dev/resources/news.rb +4 -8
- data/lib/context_dev/resources/parse.rb +4 -5
- data/lib/context_dev/resources/people.rb +11 -13
- data/lib/context_dev/resources/utility.rb +4 -11
- data/lib/context_dev/resources/web.rb +69 -94
- data/lib/context_dev/resources/webhooks/deliveries.rb +10 -18
- data/lib/context_dev/resources/webhooks.rb +1 -1
- data/lib/context_dev/version.rb +1 -1
- data/rbi/context_dev/client.rbi +4 -9
- data/rbi/context_dev/models/batch_cancel_params.rbi +2 -2
- data/rbi/context_dev/models/batch_cancel_response.rbi +17 -21
- data/rbi/context_dev/models/batch_delete_params.rbi +2 -2
- data/rbi/context_dev/models/batch_delete_response.rbi +9 -9
- data/rbi/context_dev/models/batch_get_results_params.rbi +2 -2
- data/rbi/context_dev/models/batch_get_results_response.rbi +18 -26
- data/rbi/context_dev/models/batch_list_response.rbi +41 -53
- data/rbi/context_dev/models/batch_retrieve_params.rbi +2 -2
- data/rbi/context_dev/models/batch_retrieve_response.rbi +40 -52
- data/rbi/context_dev/models/batch_submit_params.rbi +87 -147
- data/rbi/context_dev/models/batch_submit_response.rbi +19 -31
- data/rbi/context_dev/models/brand_retrieve_params.rbi +99 -190
- data/rbi/context_dev/models/brand_retrieve_response.rbi +19 -25
- data/rbi/context_dev/models/brand_search_params.rbi +2 -4
- data/rbi/context_dev/models/brand_search_response.rbi +9 -9
- data/rbi/context_dev/models/crawl_controls.rbi +1 -2
- data/rbi/context_dev/models/feedback_submit_params.rbi +2 -2
- data/rbi/context_dev/models/feedback_submit_response.rbi +9 -9
- data/rbi/context_dev/models/industry_retrieve_naics_params.rbi +19 -42
- data/rbi/context_dev/models/industry_retrieve_naics_response.rbi +11 -11
- data/rbi/context_dev/models/industry_retrieve_sic_params.rbi +22 -51
- data/rbi/context_dev/models/industry_retrieve_sic_response.rbi +11 -11
- data/rbi/context_dev/models/intake.rbi +7 -19
- data/rbi/context_dev/models/log_list_response.rbi +13 -11
- data/rbi/context_dev/models/log_retrieve_response.rbi +13 -76
- data/rbi/context_dev/models/monitor_create_params.rbi +418 -78
- data/rbi/context_dev/models/monitor_create_response.rbi +654 -287
- data/rbi/context_dev/models/monitor_delete_params.rbi +6 -1
- data/rbi/context_dev/models/monitor_delete_response.rbi +89 -3
- data/rbi/context_dev/models/monitor_get_credit_usage_response.rbi +77 -3
- data/rbi/context_dev/models/monitor_get_limits_response.rbi +83 -10
- data/rbi/context_dev/models/monitor_list_account_changes_response.rbi +236 -24
- data/rbi/context_dev/models/monitor_list_account_runs_response.rbi +86 -12
- data/rbi/context_dev/models/monitor_list_changes_params.rbi +2 -0
- data/rbi/context_dev/models/monitor_list_changes_response.rbi +234 -24
- data/rbi/context_dev/models/monitor_list_params.rbi +4 -4
- data/rbi/context_dev/models/monitor_list_response.rbi +502 -130
- data/rbi/context_dev/models/monitor_list_runs_params.rbi +2 -0
- data/rbi/context_dev/models/monitor_list_runs_response.rbi +84 -12
- data/rbi/context_dev/models/monitor_retrieve_change_params.rbi +6 -1
- data/rbi/context_dev/models/monitor_retrieve_change_response.rbi +79 -15
- data/rbi/context_dev/models/monitor_retrieve_params.rbi +6 -1
- data/rbi/context_dev/models/monitor_retrieve_response.rbi +654 -283
- data/rbi/context_dev/models/monitor_retrieve_run_params.rbi +9 -1
- data/rbi/context_dev/models/monitor_retrieve_run_response.rbi +77 -9
- data/rbi/context_dev/models/monitor_rotate_webhook_secret_params.rbi +6 -1
- data/rbi/context_dev/models/monitor_rotate_webhook_secret_response.rbi +659 -288
- data/rbi/context_dev/models/monitor_run_params.rbi +6 -1
- data/rbi/context_dev/models/monitor_run_response.rbi +82 -9
- data/rbi/context_dev/models/monitor_update_params.rbi +420 -75
- data/rbi/context_dev/models/monitor_update_response.rbi +650 -281
- data/rbi/context_dev/models/news_search_params.rbi +10 -2
- data/rbi/context_dev/models/news_search_response.rbi +9 -9
- data/rbi/context_dev/models/parse_handle_params.rbi +10 -29
- data/rbi/context_dev/models/parse_handle_response.rbi +9 -9
- data/rbi/context_dev/models/person_enrich_params.rbi +86 -44
- data/rbi/context_dev/models/person_enrich_response.rbi +9 -9
- data/rbi/context_dev/models/utility_prefetch_params.rbi +15 -27
- data/rbi/context_dev/models/utility_prefetch_response.rbi +11 -11
- data/rbi/context_dev/models/web_answers_params.rbi +33 -63
- data/rbi/context_dev/models/web_answers_response.rbi +11 -9
- data/rbi/context_dev/models/web_extract_competitors_params.rbi +19 -42
- data/rbi/context_dev/models/web_extract_competitors_response.rbi +9 -9
- data/rbi/context_dev/models/web_extract_styleguide_params.rbi +25 -61
- data/rbi/context_dev/models/web_extract_styleguide_response.rbi +36 -51
- data/rbi/context_dev/models/web_map_urls_params.rbi +33 -68
- data/rbi/context_dev/models/web_map_urls_response.rbi +9 -9
- data/rbi/context_dev/models/web_scrape_params.rbi +212 -206
- data/rbi/context_dev/models/web_scrape_response.rbi +296 -120
- data/rbi/context_dev/models/web_screenshot_params.rbi +22 -51
- data/rbi/context_dev/models/web_screenshot_response.rbi +20 -35
- data/rbi/context_dev/models/web_search_params.rbi +114 -82
- data/rbi/context_dev/models/web_search_response.rbi +145 -33
- data/rbi/context_dev/models/web_web_crawl_md_params.rbi +45 -95
- data/rbi/context_dev/models/web_web_crawl_md_response.rbi +12 -18
- data/rbi/context_dev/models/webhook_delivery.rbi +3 -9
- data/rbi/context_dev/models/webhooks/attempt.rbi +3 -3
- data/rbi/context_dev/models/webhooks/delivery.rbi +14 -11
- data/rbi/context_dev/models/webhooks/delivery_list_attempts_params.rbi +2 -4
- data/rbi/context_dev/models/webhooks/delivery_list_attempts_response.rbi +9 -9
- data/rbi/context_dev/models/webhooks/delivery_list_params.rbi +4 -4
- data/rbi/context_dev/models/webhooks/delivery_list_response.rbi +9 -9
- data/rbi/context_dev/models/webhooks/delivery_retrieve_params.rbi +2 -4
- data/rbi/context_dev/models/webhooks/delivery_retrieve_response.rbi +9 -9
- data/rbi/context_dev/models/webhooks/delivery_retry_params.rbi +4 -4
- data/rbi/context_dev/models/webhooks/delivery_retry_response.rbi +9 -9
- data/rbi/context_dev/models/webhooks/delivery_summary.rbi +14 -11
- data/rbi/context_dev/resources/batch.rbi +19 -18
- data/rbi/context_dev/resources/brand.rbi +6 -9
- data/rbi/context_dev/resources/feedback.rbi +4 -5
- data/rbi/context_dev/resources/industry.rbi +11 -27
- data/rbi/context_dev/resources/logs.rbi +4 -5
- data/rbi/context_dev/resources/monitors.rbi +71 -49
- data/rbi/context_dev/resources/news.rbi +4 -8
- data/rbi/context_dev/resources/parse.rbi +7 -14
- data/rbi/context_dev/resources/people.rbi +15 -13
- data/rbi/context_dev/resources/utility.rbi +4 -11
- data/rbi/context_dev/resources/web.rbi +89 -190
- data/rbi/context_dev/resources/webhooks/deliveries.rbi +10 -12
- data/rbi/context_dev/resources/webhooks.rbi +1 -1
- data/sig/context_dev/models/log_retrieve_response.rbs +0 -28
- data/sig/context_dev/models/monitor_create_params.rbs +113 -0
- data/sig/context_dev/models/monitor_create_response.rbs +203 -53
- data/sig/context_dev/models/monitor_delete_response.rbs +46 -3
- data/sig/context_dev/models/monitor_get_credit_usage_response.rbs +36 -3
- data/sig/context_dev/models/monitor_get_limits_response.rbs +36 -3
- data/sig/context_dev/models/monitor_list_account_changes_response.rbs +111 -8
- data/sig/context_dev/models/monitor_list_account_runs_response.rbs +36 -3
- data/sig/context_dev/models/monitor_list_changes_response.rbs +111 -8
- data/sig/context_dev/models/monitor_list_response.rbs +149 -3
- data/sig/context_dev/models/monitor_list_runs_response.rbs +36 -3
- data/sig/context_dev/models/monitor_retrieve_change_response.rbs +33 -0
- data/sig/context_dev/models/monitor_retrieve_response.rbs +203 -53
- data/sig/context_dev/models/monitor_retrieve_run_response.rbs +33 -0
- data/sig/context_dev/models/monitor_rotate_webhook_secret_response.rbs +203 -53
- data/sig/context_dev/models/monitor_run_response.rbs +48 -3
- data/sig/context_dev/models/monitor_update_params.rbs +113 -0
- data/sig/context_dev/models/monitor_update_response.rbs +203 -53
- data/sig/context_dev/models/web_scrape_response.rbs +204 -27
- data/sig/context_dev/models/web_search_params.rbs +25 -0
- data/sig/context_dev/models/web_search_response.rbs +48 -0
- data/sig/context_dev/resources/web.rbs +1 -0
- metadata +2 -2
|
@@ -20,8 +20,8 @@ module ContextDev
|
|
|
20
20
|
optional :tags, ContextDev::Internal::Type::ArrayOf[String]
|
|
21
21
|
|
|
22
22
|
# @!attribute webhook
|
|
23
|
-
#
|
|
24
|
-
#
|
|
23
|
+
# Where to send the batch's final-status event. Omit `retry` for one attempt; `{}`
|
|
24
|
+
# uses the default retry schedule.
|
|
25
25
|
#
|
|
26
26
|
# @return [ContextDev::Models::BatchSubmitParams::Webhook, nil]
|
|
27
27
|
optional :webhook, -> { ContextDev::BatchSubmitParams::Webhook }
|
|
@@ -34,8 +34,8 @@ module ContextDev
|
|
|
34
34
|
optional :webhook_url, String, api_name: :webhookUrl
|
|
35
35
|
|
|
36
36
|
# @!attribute idempotency_key
|
|
37
|
-
#
|
|
38
|
-
# original batch
|
|
37
|
+
# Unique key per submission. Retrying with the same key and body returns the
|
|
38
|
+
# original batch; a different body returns `409`.
|
|
39
39
|
#
|
|
40
40
|
# @return [String, nil]
|
|
41
41
|
optional :idempotency_key, String
|
|
@@ -48,11 +48,11 @@ module ContextDev
|
|
|
48
48
|
#
|
|
49
49
|
# @param tags [Array<String>] Tags stored on the batch. Filter the batch list by them later.
|
|
50
50
|
#
|
|
51
|
-
# @param webhook [ContextDev::Models::BatchSubmitParams::Webhook]
|
|
51
|
+
# @param webhook [ContextDev::Models::BatchSubmitParams::Webhook] Where to send the batch's final-status event. Omit `retry` for one attempt; `{}`
|
|
52
52
|
#
|
|
53
53
|
# @param webhook_url [String] Legacy URL notified when the batch finishes. Preserves one best-effort attempt.
|
|
54
54
|
#
|
|
55
|
-
# @param idempotency_key [String]
|
|
55
|
+
# @param idempotency_key [String] Unique key per submission. Retrying with the same key and body returns the origi
|
|
56
56
|
#
|
|
57
57
|
# @param request_options [ContextDev::RequestOptions, Hash{Symbol=>Object}]
|
|
58
58
|
|
|
@@ -62,7 +62,7 @@ module ContextDev
|
|
|
62
62
|
|
|
63
63
|
discriminator :mode
|
|
64
64
|
|
|
65
|
-
# Scrape up to
|
|
65
|
+
# Scrape a list of up to 25,000 URLs.
|
|
66
66
|
variant :scrape, -> { ContextDev::BatchSubmitParams::Input::Scrape }
|
|
67
67
|
|
|
68
68
|
# Crawl pages starting from a URL or from a domain's sitemap.
|
|
@@ -82,7 +82,7 @@ module ContextDev
|
|
|
82
82
|
required :mode, const: :scrape
|
|
83
83
|
|
|
84
84
|
# @!method initialize(data:, mode: :scrape)
|
|
85
|
-
# Scrape up to
|
|
85
|
+
# Scrape a list of up to 25,000 URLs.
|
|
86
86
|
#
|
|
87
87
|
# @param data [ContextDev::Models::BatchSubmitParams::Input::Scrape::Data::Markdown, ContextDev::Models::BatchSubmitParams::Input::Scrape::Data::HTML] Pages to scrape and their output format.
|
|
88
88
|
#
|
|
@@ -168,8 +168,7 @@ module ContextDev
|
|
|
168
168
|
# @see ContextDev::Models::BatchSubmitParams::Input::Scrape::Data::Markdown#options
|
|
169
169
|
class Options < ContextDev::Internal::Type::BaseModel
|
|
170
170
|
# @!attribute country
|
|
171
|
-
# Fetch
|
|
172
|
-
# alpha-2).
|
|
171
|
+
# Fetch from this country (ISO 3166-1 alpha-2).
|
|
173
172
|
#
|
|
174
173
|
# @return [Symbol, ContextDev::Models::BatchSubmitParams::Input::Scrape::Data::Markdown::Options::Country, nil]
|
|
175
174
|
optional :country,
|
|
@@ -186,8 +185,7 @@ module ContextDev
|
|
|
186
185
|
nil?: true
|
|
187
186
|
|
|
188
187
|
# @!attribute include_html
|
|
189
|
-
# Also
|
|
190
|
-
# the Markdown.
|
|
188
|
+
# Also return each page's HTML in `html`.
|
|
191
189
|
#
|
|
192
190
|
# @return [Boolean, nil]
|
|
193
191
|
optional :include_html, ContextDev::Internal::Type::Boolean, api_name: :includeHTML
|
|
@@ -205,8 +203,8 @@ module ContextDev
|
|
|
205
203
|
optional :include_links, ContextDev::Internal::Type::Boolean, api_name: :includeLinks
|
|
206
204
|
|
|
207
205
|
# @!attribute include_selectors
|
|
208
|
-
# Keep only
|
|
209
|
-
#
|
|
206
|
+
# Keep only elements matching these CSS selectors. Filtered pages ignore
|
|
207
|
+
# `maxAgeMs`.
|
|
210
208
|
#
|
|
211
209
|
# @return [Array<String>, nil]
|
|
212
210
|
optional :include_selectors,
|
|
@@ -215,9 +213,8 @@ module ContextDev
|
|
|
215
213
|
nil?: true
|
|
216
214
|
|
|
217
215
|
# @!attribute max_age_ms
|
|
218
|
-
#
|
|
219
|
-
#
|
|
220
|
-
# omitted. Max is 30 days (2592000000 ms). Set to 0 to always scrape fresh.
|
|
216
|
+
# Maximum cache age in milliseconds. Defaults to 3 days (259200000 ms). Maximum: 1
|
|
217
|
+
# year (31536000000 ms). `0` fetches fresh.
|
|
221
218
|
#
|
|
222
219
|
# @return [Integer, nil]
|
|
223
220
|
optional :max_age_ms, Integer, api_name: :maxAgeMs, nil?: true
|
|
@@ -230,8 +227,7 @@ module ContextDev
|
|
|
230
227
|
optional :pdf, -> { ContextDev::BatchSubmitParams::Input::Scrape::Data::Markdown::Options::Pdf }
|
|
231
228
|
|
|
232
229
|
# @!attribute settle_animations
|
|
233
|
-
# Wait
|
|
234
|
-
# pages that render in a browser.
|
|
230
|
+
# Wait for CSS animations to finish before extracting, on browser-rendered pages.
|
|
235
231
|
#
|
|
236
232
|
# @return [Boolean, nil]
|
|
237
233
|
optional :settle_animations, ContextDev::Internal::Type::Boolean, api_name: :settleAnimations
|
|
@@ -265,23 +261,23 @@ module ContextDev
|
|
|
265
261
|
#
|
|
266
262
|
# Options for Markdown output.
|
|
267
263
|
#
|
|
268
|
-
# @param country [Symbol, ContextDev::Models::BatchSubmitParams::Input::Scrape::Data::Markdown::Options::Country] Fetch
|
|
264
|
+
# @param country [Symbol, ContextDev::Models::BatchSubmitParams::Input::Scrape::Data::Markdown::Options::Country] Fetch from this country (ISO 3166-1 alpha-2).
|
|
269
265
|
#
|
|
270
266
|
# @param exclude_selectors [Array<String>, nil] Remove elements matching these CSS selectors. Applied after `includeSelectors`,
|
|
271
267
|
#
|
|
272
|
-
# @param include_html [Boolean] Also
|
|
268
|
+
# @param include_html [Boolean] Also return each page's HTML in `html`.
|
|
273
269
|
#
|
|
274
270
|
# @param include_images [Boolean] Include image references in the Markdown.
|
|
275
271
|
#
|
|
276
272
|
# @param include_links [Boolean] Include links in the Markdown.
|
|
277
273
|
#
|
|
278
|
-
# @param include_selectors [Array<String>, nil] Keep only
|
|
274
|
+
# @param include_selectors [Array<String>, nil] Keep only elements matching these CSS selectors. Filtered pages ignore `maxAgeMs
|
|
279
275
|
#
|
|
280
|
-
# @param max_age_ms [Integer, nil]
|
|
276
|
+
# @param max_age_ms [Integer, nil] Maximum cache age in milliseconds. Defaults to 3 days (259200000 ms). Maximum: 1
|
|
281
277
|
#
|
|
282
278
|
# @param pdf [ContextDev::Models::BatchSubmitParams::Input::Scrape::Data::Markdown::Options::Pdf] PDF parsing controls. Use start/end to limit text extraction and embedded-image
|
|
283
279
|
#
|
|
284
|
-
# @param settle_animations [Boolean] Wait
|
|
280
|
+
# @param settle_animations [Boolean] Wait for CSS animations to finish before extracting, on browser-rendered pages.
|
|
285
281
|
#
|
|
286
282
|
# @param shorten_base64_images [Boolean] Shorten inline base64 image data.
|
|
287
283
|
#
|
|
@@ -289,8 +285,7 @@ module ContextDev
|
|
|
289
285
|
#
|
|
290
286
|
# @param wait_for_ms [Integer] How long to wait after initial page load, in milliseconds. `0` waits 500 ms.
|
|
291
287
|
|
|
292
|
-
# Fetch
|
|
293
|
-
# alpha-2).
|
|
288
|
+
# Fetch from this country (ISO 3166-1 alpha-2).
|
|
294
289
|
#
|
|
295
290
|
# @see ContextDev::Models::BatchSubmitParams::Input::Scrape::Data::Markdown::Options#country
|
|
296
291
|
module Country
|
|
@@ -515,17 +510,13 @@ module ContextDev
|
|
|
515
510
|
optional :end_, Integer, api_name: :end
|
|
516
511
|
|
|
517
512
|
# @!attribute ocr
|
|
518
|
-
#
|
|
519
|
-
# replacing each recovered page's text with the OCR result while pages with a real
|
|
520
|
-
# text layer keep it. Billed at 1 credit per page OCR actually recovered, on top
|
|
521
|
-
# of the base request cost. When false, no OCR runs.
|
|
513
|
+
# Read scanned PDF pages with OCR; preserve pages that already have text.
|
|
522
514
|
#
|
|
523
515
|
# @return [Boolean, nil]
|
|
524
516
|
optional :ocr, ContextDev::Internal::Type::Boolean
|
|
525
517
|
|
|
526
518
|
# @!attribute should_parse
|
|
527
|
-
#
|
|
528
|
-
# a 400 PDF_SKIPPED is returned.
|
|
519
|
+
# Parse PDF URLs. When false, PDFs fail with `PDF_SKIPPED`.
|
|
529
520
|
#
|
|
530
521
|
# @return [Boolean, nil]
|
|
531
522
|
optional :should_parse, ContextDev::Internal::Type::Boolean, api_name: :shouldParse
|
|
@@ -546,9 +537,9 @@ module ContextDev
|
|
|
546
537
|
#
|
|
547
538
|
# @param end_ [Integer] Last 1-based PDF page to parse. When omitted, parsing ends at the last page. Mus
|
|
548
539
|
#
|
|
549
|
-
# @param ocr [Boolean]
|
|
540
|
+
# @param ocr [Boolean] Read scanned PDF pages with OCR; preserve pages that already have text.
|
|
550
541
|
#
|
|
551
|
-
# @param should_parse [Boolean]
|
|
542
|
+
# @param should_parse [Boolean] Parse PDF URLs. When false, PDFs fail with `PDF_SKIPPED`.
|
|
552
543
|
#
|
|
553
544
|
# @param start [Integer] First 1-based PDF page to parse. When omitted, parsing starts at the first page.
|
|
554
545
|
end
|
|
@@ -621,8 +612,7 @@ module ContextDev
|
|
|
621
612
|
# @see ContextDev::Models::BatchSubmitParams::Input::Scrape::Data::HTML#options
|
|
622
613
|
class Options < ContextDev::Internal::Type::BaseModel
|
|
623
614
|
# @!attribute country
|
|
624
|
-
# Fetch
|
|
625
|
-
# alpha-2).
|
|
615
|
+
# Fetch from this country (ISO 3166-1 alpha-2).
|
|
626
616
|
#
|
|
627
617
|
# @return [Symbol, ContextDev::Models::BatchSubmitParams::Input::Scrape::Data::HTML::Options::Country, nil]
|
|
628
618
|
optional :country, enum: -> { ContextDev::BatchSubmitParams::Input::Scrape::Data::HTML::Options::Country }
|
|
@@ -638,8 +628,8 @@ module ContextDev
|
|
|
638
628
|
nil?: true
|
|
639
629
|
|
|
640
630
|
# @!attribute include_selectors
|
|
641
|
-
# Keep only
|
|
642
|
-
#
|
|
631
|
+
# Keep only elements matching these CSS selectors. Filtered pages ignore
|
|
632
|
+
# `maxAgeMs`.
|
|
643
633
|
#
|
|
644
634
|
# @return [Array<String>, nil]
|
|
645
635
|
optional :include_selectors,
|
|
@@ -648,9 +638,8 @@ module ContextDev
|
|
|
648
638
|
nil?: true
|
|
649
639
|
|
|
650
640
|
# @!attribute max_age_ms
|
|
651
|
-
#
|
|
652
|
-
#
|
|
653
|
-
# omitted. Max is 30 days (2592000000 ms). Set to 0 to always scrape fresh.
|
|
641
|
+
# Maximum cache age in milliseconds. Defaults to 3 days (259200000 ms). Maximum: 1
|
|
642
|
+
# year (31536000000 ms). `0` fetches fresh.
|
|
654
643
|
#
|
|
655
644
|
# @return [Integer, nil]
|
|
656
645
|
optional :max_age_ms, Integer, api_name: :maxAgeMs, nil?: true
|
|
@@ -663,8 +652,7 @@ module ContextDev
|
|
|
663
652
|
optional :pdf, -> { ContextDev::BatchSubmitParams::Input::Scrape::Data::HTML::Options::Pdf }
|
|
664
653
|
|
|
665
654
|
# @!attribute settle_animations
|
|
666
|
-
# Wait
|
|
667
|
-
# pages that render in a browser.
|
|
655
|
+
# Wait for CSS animations to finish before extracting, on browser-rendered pages.
|
|
668
656
|
#
|
|
669
657
|
# @return [Boolean, nil]
|
|
670
658
|
optional :settle_animations, ContextDev::Internal::Type::Boolean, api_name: :settleAnimations
|
|
@@ -690,24 +678,23 @@ module ContextDev
|
|
|
690
678
|
#
|
|
691
679
|
# Options for HTML output.
|
|
692
680
|
#
|
|
693
|
-
# @param country [Symbol, ContextDev::Models::BatchSubmitParams::Input::Scrape::Data::HTML::Options::Country] Fetch
|
|
681
|
+
# @param country [Symbol, ContextDev::Models::BatchSubmitParams::Input::Scrape::Data::HTML::Options::Country] Fetch from this country (ISO 3166-1 alpha-2).
|
|
694
682
|
#
|
|
695
683
|
# @param exclude_selectors [Array<String>, nil] Remove elements matching these CSS selectors. Applied after `includeSelectors`,
|
|
696
684
|
#
|
|
697
|
-
# @param include_selectors [Array<String>, nil] Keep only
|
|
685
|
+
# @param include_selectors [Array<String>, nil] Keep only elements matching these CSS selectors. Filtered pages ignore `maxAgeMs
|
|
698
686
|
#
|
|
699
|
-
# @param max_age_ms [Integer, nil]
|
|
687
|
+
# @param max_age_ms [Integer, nil] Maximum cache age in milliseconds. Defaults to 3 days (259200000 ms). Maximum: 1
|
|
700
688
|
#
|
|
701
689
|
# @param pdf [ContextDev::Models::BatchSubmitParams::Input::Scrape::Data::HTML::Options::Pdf] PDF parsing controls. Use start/end to limit text extraction and embedded-image
|
|
702
690
|
#
|
|
703
|
-
# @param settle_animations [Boolean] Wait
|
|
691
|
+
# @param settle_animations [Boolean] Wait for CSS animations to finish before extracting, on browser-rendered pages.
|
|
704
692
|
#
|
|
705
693
|
# @param use_main_content_only [Boolean] Return the main content without navigation or footers.
|
|
706
694
|
#
|
|
707
695
|
# @param wait_for_ms [Integer] How long to wait after initial page load, in milliseconds. `0` waits 500 ms.
|
|
708
696
|
|
|
709
|
-
# Fetch
|
|
710
|
-
# alpha-2).
|
|
697
|
+
# Fetch from this country (ISO 3166-1 alpha-2).
|
|
711
698
|
#
|
|
712
699
|
# @see ContextDev::Models::BatchSubmitParams::Input::Scrape::Data::HTML::Options#country
|
|
713
700
|
module Country
|
|
@@ -932,17 +919,13 @@ module ContextDev
|
|
|
932
919
|
optional :end_, Integer, api_name: :end
|
|
933
920
|
|
|
934
921
|
# @!attribute ocr
|
|
935
|
-
#
|
|
936
|
-
# replacing each recovered page's text with the OCR result while pages with a real
|
|
937
|
-
# text layer keep it. Billed at 1 credit per page OCR actually recovered, on top
|
|
938
|
-
# of the base request cost. When false, no OCR runs.
|
|
922
|
+
# Read scanned PDF pages with OCR; preserve pages that already have text.
|
|
939
923
|
#
|
|
940
924
|
# @return [Boolean, nil]
|
|
941
925
|
optional :ocr, ContextDev::Internal::Type::Boolean
|
|
942
926
|
|
|
943
927
|
# @!attribute should_parse
|
|
944
|
-
#
|
|
945
|
-
# a 400 PDF_SKIPPED is returned.
|
|
928
|
+
# Parse PDF URLs. When false, PDFs fail with `PDF_SKIPPED`.
|
|
946
929
|
#
|
|
947
930
|
# @return [Boolean, nil]
|
|
948
931
|
optional :should_parse, ContextDev::Internal::Type::Boolean, api_name: :shouldParse
|
|
@@ -963,9 +946,9 @@ module ContextDev
|
|
|
963
946
|
#
|
|
964
947
|
# @param end_ [Integer] Last 1-based PDF page to parse. When omitted, parsing ends at the last page. Mus
|
|
965
948
|
#
|
|
966
|
-
# @param ocr [Boolean]
|
|
949
|
+
# @param ocr [Boolean] Read scanned PDF pages with OCR; preserve pages that already have text.
|
|
967
950
|
#
|
|
968
|
-
# @param should_parse [Boolean]
|
|
951
|
+
# @param should_parse [Boolean] Parse PDF URLs. When false, PDFs fail with `PDF_SKIPPED`.
|
|
969
952
|
#
|
|
970
953
|
# @param start [Integer] First 1-based PDF page to parse. When omitted, parsing starts at the first page.
|
|
971
954
|
end
|
|
@@ -1190,8 +1173,7 @@ module ContextDev
|
|
|
1190
1173
|
# @see ContextDev::Models::BatchSubmitParams::Input::Crawl::Data::Markdown#options
|
|
1191
1174
|
class Options < ContextDev::Internal::Type::BaseModel
|
|
1192
1175
|
# @!attribute country
|
|
1193
|
-
# Fetch
|
|
1194
|
-
# alpha-2).
|
|
1176
|
+
# Fetch from this country (ISO 3166-1 alpha-2).
|
|
1195
1177
|
#
|
|
1196
1178
|
# @return [Symbol, ContextDev::Models::BatchSubmitParams::Input::Crawl::Data::Markdown::Options::Country, nil]
|
|
1197
1179
|
optional :country,
|
|
@@ -1208,8 +1190,7 @@ module ContextDev
|
|
|
1208
1190
|
nil?: true
|
|
1209
1191
|
|
|
1210
1192
|
# @!attribute include_html
|
|
1211
|
-
# Also
|
|
1212
|
-
# the Markdown.
|
|
1193
|
+
# Also return each page's HTML in `html`.
|
|
1213
1194
|
#
|
|
1214
1195
|
# @return [Boolean, nil]
|
|
1215
1196
|
optional :include_html, ContextDev::Internal::Type::Boolean, api_name: :includeHTML
|
|
@@ -1227,8 +1208,8 @@ module ContextDev
|
|
|
1227
1208
|
optional :include_links, ContextDev::Internal::Type::Boolean, api_name: :includeLinks
|
|
1228
1209
|
|
|
1229
1210
|
# @!attribute include_selectors
|
|
1230
|
-
# Keep only
|
|
1231
|
-
#
|
|
1211
|
+
# Keep only elements matching these CSS selectors. Filtered pages ignore
|
|
1212
|
+
# `maxAgeMs`.
|
|
1232
1213
|
#
|
|
1233
1214
|
# @return [Array<String>, nil]
|
|
1234
1215
|
optional :include_selectors,
|
|
@@ -1237,9 +1218,8 @@ module ContextDev
|
|
|
1237
1218
|
nil?: true
|
|
1238
1219
|
|
|
1239
1220
|
# @!attribute max_age_ms
|
|
1240
|
-
#
|
|
1241
|
-
#
|
|
1242
|
-
# omitted. Max is 30 days (2592000000 ms). Set to 0 to always scrape fresh.
|
|
1221
|
+
# Maximum cache age in milliseconds. Defaults to 3 days (259200000 ms). Maximum: 1
|
|
1222
|
+
# year (31536000000 ms). `0` fetches fresh.
|
|
1243
1223
|
#
|
|
1244
1224
|
# @return [Integer, nil]
|
|
1245
1225
|
optional :max_age_ms, Integer, api_name: :maxAgeMs, nil?: true
|
|
@@ -1252,8 +1232,7 @@ module ContextDev
|
|
|
1252
1232
|
optional :pdf, -> { ContextDev::BatchSubmitParams::Input::Crawl::Data::Markdown::Options::Pdf }
|
|
1253
1233
|
|
|
1254
1234
|
# @!attribute settle_animations
|
|
1255
|
-
# Wait
|
|
1256
|
-
# pages that render in a browser.
|
|
1235
|
+
# Wait for CSS animations to finish before extracting, on browser-rendered pages.
|
|
1257
1236
|
#
|
|
1258
1237
|
# @return [Boolean, nil]
|
|
1259
1238
|
optional :settle_animations, ContextDev::Internal::Type::Boolean, api_name: :settleAnimations
|
|
@@ -1287,23 +1266,23 @@ module ContextDev
|
|
|
1287
1266
|
#
|
|
1288
1267
|
# Options for Markdown output.
|
|
1289
1268
|
#
|
|
1290
|
-
# @param country [Symbol, ContextDev::Models::BatchSubmitParams::Input::Crawl::Data::Markdown::Options::Country] Fetch
|
|
1269
|
+
# @param country [Symbol, ContextDev::Models::BatchSubmitParams::Input::Crawl::Data::Markdown::Options::Country] Fetch from this country (ISO 3166-1 alpha-2).
|
|
1291
1270
|
#
|
|
1292
1271
|
# @param exclude_selectors [Array<String>, nil] Remove elements matching these CSS selectors. Applied after `includeSelectors`,
|
|
1293
1272
|
#
|
|
1294
|
-
# @param include_html [Boolean] Also
|
|
1273
|
+
# @param include_html [Boolean] Also return each page's HTML in `html`.
|
|
1295
1274
|
#
|
|
1296
1275
|
# @param include_images [Boolean] Include image references in the Markdown.
|
|
1297
1276
|
#
|
|
1298
1277
|
# @param include_links [Boolean] Include links in the Markdown.
|
|
1299
1278
|
#
|
|
1300
|
-
# @param include_selectors [Array<String>, nil] Keep only
|
|
1279
|
+
# @param include_selectors [Array<String>, nil] Keep only elements matching these CSS selectors. Filtered pages ignore `maxAgeMs
|
|
1301
1280
|
#
|
|
1302
|
-
# @param max_age_ms [Integer, nil]
|
|
1281
|
+
# @param max_age_ms [Integer, nil] Maximum cache age in milliseconds. Defaults to 3 days (259200000 ms). Maximum: 1
|
|
1303
1282
|
#
|
|
1304
1283
|
# @param pdf [ContextDev::Models::BatchSubmitParams::Input::Crawl::Data::Markdown::Options::Pdf] PDF parsing controls. Use start/end to limit text extraction and embedded-image
|
|
1305
1284
|
#
|
|
1306
|
-
# @param settle_animations [Boolean] Wait
|
|
1285
|
+
# @param settle_animations [Boolean] Wait for CSS animations to finish before extracting, on browser-rendered pages.
|
|
1307
1286
|
#
|
|
1308
1287
|
# @param shorten_base64_images [Boolean] Shorten inline base64 image data.
|
|
1309
1288
|
#
|
|
@@ -1311,8 +1290,7 @@ module ContextDev
|
|
|
1311
1290
|
#
|
|
1312
1291
|
# @param wait_for_ms [Integer] How long to wait after initial page load, in milliseconds. `0` waits 500 ms.
|
|
1313
1292
|
|
|
1314
|
-
# Fetch
|
|
1315
|
-
# alpha-2).
|
|
1293
|
+
# Fetch from this country (ISO 3166-1 alpha-2).
|
|
1316
1294
|
#
|
|
1317
1295
|
# @see ContextDev::Models::BatchSubmitParams::Input::Crawl::Data::Markdown::Options#country
|
|
1318
1296
|
module Country
|
|
@@ -1537,17 +1515,13 @@ module ContextDev
|
|
|
1537
1515
|
optional :end_, Integer, api_name: :end
|
|
1538
1516
|
|
|
1539
1517
|
# @!attribute ocr
|
|
1540
|
-
#
|
|
1541
|
-
# replacing each recovered page's text with the OCR result while pages with a real
|
|
1542
|
-
# text layer keep it. Billed at 1 credit per page OCR actually recovered, on top
|
|
1543
|
-
# of the base request cost. When false, no OCR runs.
|
|
1518
|
+
# Read scanned PDF pages with OCR; preserve pages that already have text.
|
|
1544
1519
|
#
|
|
1545
1520
|
# @return [Boolean, nil]
|
|
1546
1521
|
optional :ocr, ContextDev::Internal::Type::Boolean
|
|
1547
1522
|
|
|
1548
1523
|
# @!attribute should_parse
|
|
1549
|
-
#
|
|
1550
|
-
# a 400 PDF_SKIPPED is returned.
|
|
1524
|
+
# Parse PDF URLs. When false, PDFs fail with `PDF_SKIPPED`.
|
|
1551
1525
|
#
|
|
1552
1526
|
# @return [Boolean, nil]
|
|
1553
1527
|
optional :should_parse, ContextDev::Internal::Type::Boolean, api_name: :shouldParse
|
|
@@ -1568,9 +1542,9 @@ module ContextDev
|
|
|
1568
1542
|
#
|
|
1569
1543
|
# @param end_ [Integer] Last 1-based PDF page to parse. When omitted, parsing ends at the last page. Mus
|
|
1570
1544
|
#
|
|
1571
|
-
# @param ocr [Boolean]
|
|
1545
|
+
# @param ocr [Boolean] Read scanned PDF pages with OCR; preserve pages that already have text.
|
|
1572
1546
|
#
|
|
1573
|
-
# @param should_parse [Boolean]
|
|
1547
|
+
# @param should_parse [Boolean] Parse PDF URLs. When false, PDFs fail with `PDF_SKIPPED`.
|
|
1574
1548
|
#
|
|
1575
1549
|
# @param start [Integer] First 1-based PDF page to parse. When omitted, parsing starts at the first page.
|
|
1576
1550
|
end
|
|
@@ -1756,8 +1730,7 @@ module ContextDev
|
|
|
1756
1730
|
# @see ContextDev::Models::BatchSubmitParams::Input::Crawl::Data::HTML#options
|
|
1757
1731
|
class Options < ContextDev::Internal::Type::BaseModel
|
|
1758
1732
|
# @!attribute country
|
|
1759
|
-
# Fetch
|
|
1760
|
-
# alpha-2).
|
|
1733
|
+
# Fetch from this country (ISO 3166-1 alpha-2).
|
|
1761
1734
|
#
|
|
1762
1735
|
# @return [Symbol, ContextDev::Models::BatchSubmitParams::Input::Crawl::Data::HTML::Options::Country, nil]
|
|
1763
1736
|
optional :country, enum: -> { ContextDev::BatchSubmitParams::Input::Crawl::Data::HTML::Options::Country }
|
|
@@ -1773,8 +1746,8 @@ module ContextDev
|
|
|
1773
1746
|
nil?: true
|
|
1774
1747
|
|
|
1775
1748
|
# @!attribute include_selectors
|
|
1776
|
-
# Keep only
|
|
1777
|
-
#
|
|
1749
|
+
# Keep only elements matching these CSS selectors. Filtered pages ignore
|
|
1750
|
+
# `maxAgeMs`.
|
|
1778
1751
|
#
|
|
1779
1752
|
# @return [Array<String>, nil]
|
|
1780
1753
|
optional :include_selectors,
|
|
@@ -1783,9 +1756,8 @@ module ContextDev
|
|
|
1783
1756
|
nil?: true
|
|
1784
1757
|
|
|
1785
1758
|
# @!attribute max_age_ms
|
|
1786
|
-
#
|
|
1787
|
-
#
|
|
1788
|
-
# omitted. Max is 30 days (2592000000 ms). Set to 0 to always scrape fresh.
|
|
1759
|
+
# Maximum cache age in milliseconds. Defaults to 3 days (259200000 ms). Maximum: 1
|
|
1760
|
+
# year (31536000000 ms). `0` fetches fresh.
|
|
1789
1761
|
#
|
|
1790
1762
|
# @return [Integer, nil]
|
|
1791
1763
|
optional :max_age_ms, Integer, api_name: :maxAgeMs, nil?: true
|
|
@@ -1798,8 +1770,7 @@ module ContextDev
|
|
|
1798
1770
|
optional :pdf, -> { ContextDev::BatchSubmitParams::Input::Crawl::Data::HTML::Options::Pdf }
|
|
1799
1771
|
|
|
1800
1772
|
# @!attribute settle_animations
|
|
1801
|
-
# Wait
|
|
1802
|
-
# pages that render in a browser.
|
|
1773
|
+
# Wait for CSS animations to finish before extracting, on browser-rendered pages.
|
|
1803
1774
|
#
|
|
1804
1775
|
# @return [Boolean, nil]
|
|
1805
1776
|
optional :settle_animations, ContextDev::Internal::Type::Boolean, api_name: :settleAnimations
|
|
@@ -1825,24 +1796,23 @@ module ContextDev
|
|
|
1825
1796
|
#
|
|
1826
1797
|
# Options for HTML output.
|
|
1827
1798
|
#
|
|
1828
|
-
# @param country [Symbol, ContextDev::Models::BatchSubmitParams::Input::Crawl::Data::HTML::Options::Country] Fetch
|
|
1799
|
+
# @param country [Symbol, ContextDev::Models::BatchSubmitParams::Input::Crawl::Data::HTML::Options::Country] Fetch from this country (ISO 3166-1 alpha-2).
|
|
1829
1800
|
#
|
|
1830
1801
|
# @param exclude_selectors [Array<String>, nil] Remove elements matching these CSS selectors. Applied after `includeSelectors`,
|
|
1831
1802
|
#
|
|
1832
|
-
# @param include_selectors [Array<String>, nil] Keep only
|
|
1803
|
+
# @param include_selectors [Array<String>, nil] Keep only elements matching these CSS selectors. Filtered pages ignore `maxAgeMs
|
|
1833
1804
|
#
|
|
1834
|
-
# @param max_age_ms [Integer, nil]
|
|
1805
|
+
# @param max_age_ms [Integer, nil] Maximum cache age in milliseconds. Defaults to 3 days (259200000 ms). Maximum: 1
|
|
1835
1806
|
#
|
|
1836
1807
|
# @param pdf [ContextDev::Models::BatchSubmitParams::Input::Crawl::Data::HTML::Options::Pdf] PDF parsing controls. Use start/end to limit text extraction and embedded-image
|
|
1837
1808
|
#
|
|
1838
|
-
# @param settle_animations [Boolean] Wait
|
|
1809
|
+
# @param settle_animations [Boolean] Wait for CSS animations to finish before extracting, on browser-rendered pages.
|
|
1839
1810
|
#
|
|
1840
1811
|
# @param use_main_content_only [Boolean] Return the main content without navigation or footers.
|
|
1841
1812
|
#
|
|
1842
1813
|
# @param wait_for_ms [Integer] How long to wait after initial page load, in milliseconds. `0` waits 500 ms.
|
|
1843
1814
|
|
|
1844
|
-
# Fetch
|
|
1845
|
-
# alpha-2).
|
|
1815
|
+
# Fetch from this country (ISO 3166-1 alpha-2).
|
|
1846
1816
|
#
|
|
1847
1817
|
# @see ContextDev::Models::BatchSubmitParams::Input::Crawl::Data::HTML::Options#country
|
|
1848
1818
|
module Country
|
|
@@ -2067,17 +2037,13 @@ module ContextDev
|
|
|
2067
2037
|
optional :end_, Integer, api_name: :end
|
|
2068
2038
|
|
|
2069
2039
|
# @!attribute ocr
|
|
2070
|
-
#
|
|
2071
|
-
# replacing each recovered page's text with the OCR result while pages with a real
|
|
2072
|
-
# text layer keep it. Billed at 1 credit per page OCR actually recovered, on top
|
|
2073
|
-
# of the base request cost. When false, no OCR runs.
|
|
2040
|
+
# Read scanned PDF pages with OCR; preserve pages that already have text.
|
|
2074
2041
|
#
|
|
2075
2042
|
# @return [Boolean, nil]
|
|
2076
2043
|
optional :ocr, ContextDev::Internal::Type::Boolean
|
|
2077
2044
|
|
|
2078
2045
|
# @!attribute should_parse
|
|
2079
|
-
#
|
|
2080
|
-
# a 400 PDF_SKIPPED is returned.
|
|
2046
|
+
# Parse PDF URLs. When false, PDFs fail with `PDF_SKIPPED`.
|
|
2081
2047
|
#
|
|
2082
2048
|
# @return [Boolean, nil]
|
|
2083
2049
|
optional :should_parse, ContextDev::Internal::Type::Boolean, api_name: :shouldParse
|
|
@@ -2098,9 +2064,9 @@ module ContextDev
|
|
|
2098
2064
|
#
|
|
2099
2065
|
# @param end_ [Integer] Last 1-based PDF page to parse. When omitted, parsing ends at the last page. Mus
|
|
2100
2066
|
#
|
|
2101
|
-
# @param ocr [Boolean]
|
|
2067
|
+
# @param ocr [Boolean] Read scanned PDF pages with OCR; preserve pages that already have text.
|
|
2102
2068
|
#
|
|
2103
|
-
# @param should_parse [Boolean]
|
|
2069
|
+
# @param should_parse [Boolean] Parse PDF URLs. When false, PDFs fail with `PDF_SKIPPED`.
|
|
2104
2070
|
#
|
|
2105
2071
|
# @param start [Integer] First 1-based PDF page to parse. When omitted, parsing starts at the first page.
|
|
2106
2072
|
end
|
|
@@ -2118,6 +2084,8 @@ module ContextDev
|
|
|
2118
2084
|
|
|
2119
2085
|
class Webhook < ContextDev::Internal::Type::BaseModel
|
|
2120
2086
|
# @!attribute url
|
|
2087
|
+
# Public HTTP(S) URL that receives batch completion, failure, or cancellation
|
|
2088
|
+
# events.
|
|
2121
2089
|
#
|
|
2122
2090
|
# @return [String]
|
|
2123
2091
|
required :url, String
|
|
@@ -2129,10 +2097,13 @@ module ContextDev
|
|
|
2129
2097
|
optional :retry_, -> { ContextDev::RetryConfig }, api_name: :retry
|
|
2130
2098
|
|
|
2131
2099
|
# @!method initialize(url:, retry_: nil)
|
|
2132
|
-
#
|
|
2133
|
-
#
|
|
2100
|
+
# Some parameter documentations has been truncated, see
|
|
2101
|
+
# {ContextDev::Models::BatchSubmitParams::Webhook} for more details.
|
|
2134
2102
|
#
|
|
2135
|
-
#
|
|
2103
|
+
# Where to send the batch's final-status event. Omit `retry` for one attempt; `{}`
|
|
2104
|
+
# uses the default retry schedule.
|
|
2105
|
+
#
|
|
2106
|
+
# @param url [String] Public HTTP(S) URL that receives batch completion, failure, or cancellation even
|
|
2136
2107
|
#
|
|
2137
2108
|
# @param retry_ [ContextDev::Models::RetryConfig] Webhook retry settings. Use {} for the default schedule.
|
|
2138
2109
|
end
|