context.dev 2.16.0 → 2.17.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 +17 -0
- data/README.md +1 -1
- data/lib/context_dev/models/ai_extract_product_params.rb +53 -8
- data/lib/context_dev/models/ai_extract_product_response.rb +10 -1
- data/lib/context_dev/models/ai_extract_products_params.rb +116 -16
- data/lib/context_dev/models/ai_extract_products_response.rb +11 -1
- data/lib/context_dev/models/brand_retrieve_params.rb +355 -60
- data/lib/context_dev/models/brand_retrieve_response.rb +10 -1
- data/lib/context_dev/models/brand_retrieve_simplified_params.rb +57 -11
- data/lib/context_dev/models/brand_retrieve_simplified_response.rb +10 -1
- data/lib/context_dev/models/industry_retrieve_naics_params.rb +53 -8
- data/lib/context_dev/models/industry_retrieve_naics_response.rb +10 -1
- data/lib/context_dev/models/industry_retrieve_sic_params.rb +53 -8
- data/lib/context_dev/models/industry_retrieve_sic_response.rb +10 -1
- data/lib/context_dev/models/monitor_create_params.rb +27 -3
- data/lib/context_dev/models/monitor_create_response.rb +30 -5
- data/lib/context_dev/models/monitor_list_response.rb +30 -5
- data/lib/context_dev/models/monitor_retrieve_response.rb +30 -5
- data/lib/context_dev/models/monitor_update_params.rb +27 -3
- data/lib/context_dev/models/monitor_update_response.rb +30 -5
- data/lib/context_dev/models/person_enrich_params.rb +53 -8
- data/lib/context_dev/models/person_enrich_response.rb +10 -1
- data/lib/context_dev/models/utility_prefetch_params.rb +48 -8
- data/lib/context_dev/models/web_answers_params.rb +124 -0
- data/lib/context_dev/models/web_answers_response.rb +68 -0
- data/lib/context_dev/models/web_extract_competitors_params.rb +53 -8
- data/lib/context_dev/models/web_extract_competitors_response.rb +10 -1
- data/lib/context_dev/models/web_extract_fonts_params.rb +58 -11
- data/lib/context_dev/models/web_extract_fonts_response.rb +32 -1
- data/lib/context_dev/models/web_extract_params.rb +53 -8
- data/lib/context_dev/models/web_extract_response.rb +10 -1
- data/lib/context_dev/models/web_extract_styleguide_params.rb +58 -11
- data/lib/context_dev/models/web_extract_styleguide_response.rb +32 -1
- data/lib/context_dev/models/web_screenshot_params.rb +58 -10
- data/lib/context_dev/models/web_screenshot_response.rb +32 -1
- data/lib/context_dev/models/web_search_params.rb +112 -16
- data/lib/context_dev/models/web_search_response.rb +43 -2
- data/lib/context_dev/models/web_web_crawl_md_params.rb +53 -8
- data/lib/context_dev/models/web_web_crawl_md_response.rb +11 -1
- data/lib/context_dev/models/web_web_scrape_bytes_params.rb +344 -0
- data/lib/context_dev/models/web_web_scrape_bytes_response.rb +135 -0
- data/lib/context_dev/models/web_web_scrape_html_params.rb +57 -10
- data/lib/context_dev/models/web_web_scrape_html_response.rb +32 -1
- data/lib/context_dev/models/web_web_scrape_images_params.rb +57 -10
- data/lib/context_dev/models/web_web_scrape_images_response.rb +42 -1
- data/lib/context_dev/models/web_web_scrape_md_params.rb +57 -10
- data/lib/context_dev/models/web_web_scrape_md_response.rb +32 -1
- data/lib/context_dev/models/web_web_scrape_sitemap_params.rb +53 -8
- data/lib/context_dev/models/web_web_scrape_sitemap_response.rb +11 -1
- data/lib/context_dev/models.rb +4 -0
- data/lib/context_dev/resources/ai.rb +2 -2
- data/lib/context_dev/resources/brand.rb +3 -3
- data/lib/context_dev/resources/industry.rb +6 -6
- data/lib/context_dev/resources/people.rb +2 -2
- data/lib/context_dev/resources/utility.rb +2 -2
- data/lib/context_dev/resources/web.rb +119 -33
- data/lib/context_dev/version.rb +1 -1
- data/lib/context_dev.rb +4 -0
- data/rbi/context_dev/models/ai_extract_product_params.rbi +125 -13
- data/rbi/context_dev/models/ai_extract_product_response.rbi +13 -0
- data/rbi/context_dev/models/ai_extract_products_params.rbi +264 -26
- data/rbi/context_dev/models/ai_extract_products_response.rbi +15 -0
- data/rbi/context_dev/models/brand_retrieve_params.rbi +816 -102
- data/rbi/context_dev/models/brand_retrieve_response.rbi +13 -0
- data/rbi/context_dev/models/brand_retrieve_simplified_params.rbi +136 -19
- data/rbi/context_dev/models/brand_retrieve_simplified_response.rbi +13 -0
- data/rbi/context_dev/models/industry_retrieve_naics_params.rbi +127 -13
- data/rbi/context_dev/models/industry_retrieve_naics_response.rbi +13 -0
- data/rbi/context_dev/models/industry_retrieve_sic_params.rbi +127 -13
- data/rbi/context_dev/models/industry_retrieve_sic_response.rbi +13 -0
- data/rbi/context_dev/models/monitor_create_params.rbi +40 -2
- data/rbi/context_dev/models/monitor_create_response.rbi +44 -4
- data/rbi/context_dev/models/monitor_list_response.rbi +44 -4
- data/rbi/context_dev/models/monitor_retrieve_response.rbi +44 -4
- data/rbi/context_dev/models/monitor_update_params.rbi +40 -2
- data/rbi/context_dev/models/monitor_update_response.rbi +44 -4
- data/rbi/context_dev/models/person_enrich_params.rbi +123 -13
- data/rbi/context_dev/models/person_enrich_response.rbi +16 -3
- data/rbi/context_dev/models/utility_prefetch_params.rbi +112 -13
- data/rbi/context_dev/models/web_answers_params.rbi +234 -0
- data/rbi/context_dev/models/web_answers_response.rbi +122 -0
- data/rbi/context_dev/models/web_extract_competitors_params.rbi +127 -13
- data/rbi/context_dev/models/web_extract_competitors_response.rbi +16 -3
- data/rbi/context_dev/models/web_extract_fonts_params.rbi +132 -19
- data/rbi/context_dev/models/web_extract_fonts_response.rbi +71 -0
- data/rbi/context_dev/models/web_extract_params.rbi +120 -13
- data/rbi/context_dev/models/web_extract_response.rbi +16 -3
- data/rbi/context_dev/models/web_extract_styleguide_params.rbi +136 -19
- data/rbi/context_dev/models/web_extract_styleguide_response.rbi +71 -0
- data/rbi/context_dev/models/web_screenshot_params.rbi +132 -17
- data/rbi/context_dev/models/web_screenshot_response.rbi +71 -0
- data/rbi/context_dev/models/web_search_params.rbi +253 -26
- data/rbi/context_dev/models/web_search_response.rbi +92 -6
- data/rbi/context_dev/models/web_web_crawl_md_params.rbi +123 -13
- data/rbi/context_dev/models/web_web_crawl_md_response.rbi +19 -3
- data/rbi/context_dev/models/web_web_scrape_bytes_params.rbi +699 -0
- data/rbi/context_dev/models/web_web_scrape_bytes_response.rbi +238 -0
- data/rbi/context_dev/models/web_web_scrape_html_params.rbi +132 -17
- data/rbi/context_dev/models/web_web_scrape_html_response.rbi +61 -0
- data/rbi/context_dev/models/web_web_scrape_images_params.rbi +134 -17
- data/rbi/context_dev/models/web_web_scrape_images_response.rbi +89 -3
- data/rbi/context_dev/models/web_web_scrape_md_params.rbi +130 -17
- data/rbi/context_dev/models/web_web_scrape_md_response.rbi +61 -0
- data/rbi/context_dev/models/web_web_scrape_sitemap_params.rbi +127 -13
- data/rbi/context_dev/models/web_web_scrape_sitemap_response.rbi +18 -3
- data/rbi/context_dev/models.rbi +4 -0
- data/rbi/context_dev/resources/ai.rbi +5 -5
- data/rbi/context_dev/resources/brand.rbi +9 -8
- data/rbi/context_dev/resources/industry.rbi +12 -10
- data/rbi/context_dev/resources/people.rbi +5 -5
- data/rbi/context_dev/resources/utility.rbi +5 -5
- data/rbi/context_dev/resources/web.rbi +170 -72
- data/sig/context_dev/models/ai_extract_product_params.rbs +44 -5
- data/sig/context_dev/models/ai_extract_product_response.rbs +7 -0
- data/sig/context_dev/models/ai_extract_products_params.rbs +88 -10
- data/sig/context_dev/models/ai_extract_products_response.rbs +7 -0
- data/sig/context_dev/models/brand_retrieve_params.rbs +264 -30
- data/sig/context_dev/models/brand_retrieve_response.rbs +7 -0
- data/sig/context_dev/models/brand_retrieve_simplified_params.rbs +44 -5
- data/sig/context_dev/models/brand_retrieve_simplified_response.rbs +7 -0
- data/sig/context_dev/models/industry_retrieve_naics_params.rbs +44 -5
- data/sig/context_dev/models/industry_retrieve_naics_response.rbs +7 -0
- data/sig/context_dev/models/industry_retrieve_sic_params.rbs +44 -5
- data/sig/context_dev/models/industry_retrieve_sic_response.rbs +7 -0
- data/sig/context_dev/models/monitor_create_params.rbs +14 -0
- data/sig/context_dev/models/monitor_create_response.rbs +14 -0
- data/sig/context_dev/models/monitor_list_response.rbs +14 -0
- data/sig/context_dev/models/monitor_retrieve_response.rbs +14 -0
- data/sig/context_dev/models/monitor_update_params.rbs +14 -0
- data/sig/context_dev/models/monitor_update_response.rbs +14 -0
- data/sig/context_dev/models/person_enrich_params.rbs +44 -5
- data/sig/context_dev/models/person_enrich_response.rbs +10 -3
- data/sig/context_dev/models/utility_prefetch_params.rbs +43 -5
- data/sig/context_dev/models/web_answers_params.rbs +106 -0
- data/sig/context_dev/models/web_answers_response.rbs +60 -0
- data/sig/context_dev/models/web_extract_competitors_params.rbs +44 -5
- data/sig/context_dev/models/web_extract_competitors_response.rbs +10 -3
- data/sig/context_dev/models/web_extract_fonts_params.rbs +44 -5
- data/sig/context_dev/models/web_extract_fonts_response.rbs +20 -0
- data/sig/context_dev/models/web_extract_params.rbs +44 -5
- data/sig/context_dev/models/web_extract_response.rbs +10 -3
- data/sig/context_dev/models/web_extract_styleguide_params.rbs +44 -5
- data/sig/context_dev/models/web_extract_styleguide_response.rbs +20 -0
- data/sig/context_dev/models/web_screenshot_params.rbs +44 -5
- data/sig/context_dev/models/web_screenshot_response.rbs +20 -0
- data/sig/context_dev/models/web_search_params.rbs +88 -10
- data/sig/context_dev/models/web_search_response.rbs +33 -6
- data/sig/context_dev/models/web_web_crawl_md_params.rbs +44 -5
- data/sig/context_dev/models/web_web_crawl_md_response.rbs +10 -3
- data/sig/context_dev/models/web_web_scrape_bytes_params.rbs +531 -0
- data/sig/context_dev/models/web_web_scrape_bytes_response.rbs +108 -0
- data/sig/context_dev/models/web_web_scrape_html_params.rbs +44 -5
- data/sig/context_dev/models/web_web_scrape_html_response.rbs +16 -0
- data/sig/context_dev/models/web_web_scrape_images_params.rbs +44 -5
- data/sig/context_dev/models/web_web_scrape_images_response.rbs +30 -3
- data/sig/context_dev/models/web_web_scrape_md_params.rbs +44 -5
- data/sig/context_dev/models/web_web_scrape_md_response.rbs +16 -0
- data/sig/context_dev/models/web_web_scrape_sitemap_params.rbs +44 -5
- data/sig/context_dev/models/web_web_scrape_sitemap_response.rbs +10 -3
- data/sig/context_dev/models.rbs +4 -0
- data/sig/context_dev/resources/ai.rbs +1 -1
- data/sig/context_dev/resources/brand.rbs +1 -1
- data/sig/context_dev/resources/industry.rbs +2 -2
- data/sig/context_dev/resources/people.rbs +1 -1
- data/sig/context_dev/resources/utility.rbs +1 -1
- data/sig/context_dev/resources/web.rbs +30 -11
- metadata +14 -2
|
@@ -27,15 +27,15 @@ module ContextDev
|
|
|
27
27
|
# @return [Array<String>, nil]
|
|
28
28
|
optional :tags, ContextDev::Internal::Type::ArrayOf[String]
|
|
29
29
|
|
|
30
|
-
# @!attribute
|
|
31
|
-
# Optional
|
|
32
|
-
#
|
|
33
|
-
#
|
|
30
|
+
# @!attribute timeout_opts
|
|
31
|
+
# Optional request deadline and behavior on timeout. For GET requests, use
|
|
32
|
+
# timeoutOpts[milliseconds]=30000&timeoutOpts[behavior]=fail or a JSON-encoded
|
|
33
|
+
# timeoutOpts object.
|
|
34
34
|
#
|
|
35
|
-
# @return [
|
|
36
|
-
optional :
|
|
35
|
+
# @return [ContextDev::Models::WebExtractCompetitorsParams::TimeoutOpts, nil]
|
|
36
|
+
optional :timeout_opts, -> { ContextDev::WebExtractCompetitorsParams::TimeoutOpts }
|
|
37
37
|
|
|
38
|
-
# @!method initialize(domain:, num_competitors: nil, tags: nil,
|
|
38
|
+
# @!method initialize(domain:, num_competitors: nil, tags: nil, timeout_opts: nil, request_options: {})
|
|
39
39
|
# Some parameter documentations has been truncated, see
|
|
40
40
|
# {ContextDev::Models::WebExtractCompetitorsParams} for more details.
|
|
41
41
|
#
|
|
@@ -45,9 +45,54 @@ module ContextDev
|
|
|
45
45
|
#
|
|
46
46
|
# @param tags [Array<String>] Comma-separated tags for tracking request usage. Up to 20 tags, each 1-50 charac
|
|
47
47
|
#
|
|
48
|
-
# @param
|
|
48
|
+
# @param timeout_opts [ContextDev::Models::WebExtractCompetitorsParams::TimeoutOpts] Optional request deadline and behavior on timeout. For GET requests, use timeout
|
|
49
49
|
#
|
|
50
50
|
# @param request_options [ContextDev::RequestOptions, Hash{Symbol=>Object}]
|
|
51
|
+
|
|
52
|
+
class TimeoutOpts < ContextDev::Internal::Type::BaseModel
|
|
53
|
+
# @!attribute milliseconds
|
|
54
|
+
# Request deadline in milliseconds. Maximum: 300000 (5 minutes).
|
|
55
|
+
#
|
|
56
|
+
# @return [Integer]
|
|
57
|
+
required :milliseconds, Integer
|
|
58
|
+
|
|
59
|
+
# @!attribute behavior
|
|
60
|
+
# What to do at the deadline. "fail" returns 408 REQUEST_TIMEOUT without charging
|
|
61
|
+
# credits. "return-partial" returns usable results collected so far; if none are
|
|
62
|
+
# available, the request still fails without charging credits. Partial results are
|
|
63
|
+
# not cached as complete results.
|
|
64
|
+
#
|
|
65
|
+
# @return [Symbol, ContextDev::Models::WebExtractCompetitorsParams::TimeoutOpts::Behavior, nil]
|
|
66
|
+
optional :behavior, enum: -> { ContextDev::WebExtractCompetitorsParams::TimeoutOpts::Behavior }
|
|
67
|
+
|
|
68
|
+
# @!method initialize(milliseconds:, behavior: nil)
|
|
69
|
+
# Some parameter documentations has been truncated, see
|
|
70
|
+
# {ContextDev::Models::WebExtractCompetitorsParams::TimeoutOpts} for more details.
|
|
71
|
+
#
|
|
72
|
+
# Optional request deadline and behavior on timeout. For GET requests, use
|
|
73
|
+
# timeoutOpts[milliseconds]=30000&timeoutOpts[behavior]=fail or a JSON-encoded
|
|
74
|
+
# timeoutOpts object.
|
|
75
|
+
#
|
|
76
|
+
# @param milliseconds [Integer] Request deadline in milliseconds. Maximum: 300000 (5 minutes).
|
|
77
|
+
#
|
|
78
|
+
# @param behavior [Symbol, ContextDev::Models::WebExtractCompetitorsParams::TimeoutOpts::Behavior] What to do at the deadline. "fail" returns 408 REQUEST_TIMEOUT without charging
|
|
79
|
+
|
|
80
|
+
# What to do at the deadline. "fail" returns 408 REQUEST_TIMEOUT without charging
|
|
81
|
+
# credits. "return-partial" returns usable results collected so far; if none are
|
|
82
|
+
# available, the request still fails without charging credits. Partial results are
|
|
83
|
+
# not cached as complete results.
|
|
84
|
+
#
|
|
85
|
+
# @see ContextDev::Models::WebExtractCompetitorsParams::TimeoutOpts#behavior
|
|
86
|
+
module Behavior
|
|
87
|
+
extend ContextDev::Internal::Type::Enum
|
|
88
|
+
|
|
89
|
+
FAIL = :fail
|
|
90
|
+
RETURN_PARTIAL = :"return-partial"
|
|
91
|
+
|
|
92
|
+
# @!method self.values
|
|
93
|
+
# @return [Array<Symbol>]
|
|
94
|
+
end
|
|
95
|
+
end
|
|
51
96
|
end
|
|
52
97
|
end
|
|
53
98
|
end
|
|
@@ -42,7 +42,14 @@ module ContextDev
|
|
|
42
42
|
# @return [ContextDev::Models::WebExtractCompetitorsResponse::KeyMetadata, nil]
|
|
43
43
|
optional :key_metadata, -> { ContextDev::Models::WebExtractCompetitorsResponse::KeyMetadata }
|
|
44
44
|
|
|
45
|
-
# @!
|
|
45
|
+
# @!attribute partial
|
|
46
|
+
# True when the timeout ended processing and this response contains only usable
|
|
47
|
+
# results completed so far. Unfinished results are omitted.
|
|
48
|
+
#
|
|
49
|
+
# @return [Boolean, nil]
|
|
50
|
+
optional :partial, ContextDev::Internal::Type::Boolean
|
|
51
|
+
|
|
52
|
+
# @!method initialize(competitors:, domain:, request_id:, status:, target:, key_metadata: nil, partial: nil)
|
|
46
53
|
# Some parameter documentations has been truncated, see
|
|
47
54
|
# {ContextDev::Models::WebExtractCompetitorsResponse} for more details.
|
|
48
55
|
#
|
|
@@ -57,6 +64,8 @@ module ContextDev
|
|
|
57
64
|
# @param target [ContextDev::Models::WebExtractCompetitorsResponse::Target] Target company profile inferred from the landing page.
|
|
58
65
|
#
|
|
59
66
|
# @param key_metadata [ContextDev::Models::WebExtractCompetitorsResponse::KeyMetadata] Credit usage, included whenever a valid API key is provided.
|
|
67
|
+
#
|
|
68
|
+
# @param partial [Boolean] True when the timeout ended processing and this response contains only usable re
|
|
60
69
|
|
|
61
70
|
class Competitor < ContextDev::Internal::Type::BaseModel
|
|
62
71
|
# @!attribute confidence
|
|
@@ -25,9 +25,9 @@ module ContextDev
|
|
|
25
25
|
|
|
26
26
|
# @!attribute max_age_ms
|
|
27
27
|
# Maximum age in milliseconds for cached brand data before the API performs a hard
|
|
28
|
-
# refresh. Defaults to 3 months (7776000000 ms).
|
|
29
|
-
# are clamped to
|
|
30
|
-
# year.
|
|
28
|
+
# refresh. Defaults to 3 months (7776000000 ms). Set to 0 to always perform a hard
|
|
29
|
+
# refresh. Negative values are clamped to 0; values above 1 year (31536000000 ms)
|
|
30
|
+
# are clamped to 1 year.
|
|
31
31
|
#
|
|
32
32
|
# @return [Integer, nil]
|
|
33
33
|
optional :max_age_ms, Integer, nil?: true
|
|
@@ -39,15 +39,15 @@ module ContextDev
|
|
|
39
39
|
# @return [Array<String>, nil]
|
|
40
40
|
optional :tags, ContextDev::Internal::Type::ArrayOf[String]
|
|
41
41
|
|
|
42
|
-
# @!attribute
|
|
43
|
-
# Optional
|
|
44
|
-
#
|
|
45
|
-
#
|
|
42
|
+
# @!attribute timeout_opts
|
|
43
|
+
# Optional request deadline and behavior on timeout. For GET requests, use
|
|
44
|
+
# timeoutOpts[milliseconds]=30000&timeoutOpts[behavior]=fail or a JSON-encoded
|
|
45
|
+
# timeoutOpts object.
|
|
46
46
|
#
|
|
47
|
-
# @return [
|
|
48
|
-
optional :
|
|
47
|
+
# @return [ContextDev::Models::WebExtractFontsParams::TimeoutOpts, nil]
|
|
48
|
+
optional :timeout_opts, -> { ContextDev::WebExtractFontsParams::TimeoutOpts }
|
|
49
49
|
|
|
50
|
-
# @!method initialize(direct_url: nil, domain: nil, max_age_ms: nil, tags: nil,
|
|
50
|
+
# @!method initialize(direct_url: nil, domain: nil, max_age_ms: nil, tags: nil, timeout_opts: nil, request_options: {})
|
|
51
51
|
# Some parameter documentations has been truncated, see
|
|
52
52
|
# {ContextDev::Models::WebExtractFontsParams} for more details.
|
|
53
53
|
#
|
|
@@ -59,9 +59,56 @@ module ContextDev
|
|
|
59
59
|
#
|
|
60
60
|
# @param tags [Array<String>] Comma-separated tags for tracking request usage. Up to 20 tags, each 1-50 charac
|
|
61
61
|
#
|
|
62
|
-
# @param
|
|
62
|
+
# @param timeout_opts [ContextDev::Models::WebExtractFontsParams::TimeoutOpts] Optional request deadline and behavior on timeout. For GET requests, use timeout
|
|
63
63
|
#
|
|
64
64
|
# @param request_options [ContextDev::RequestOptions, Hash{Symbol=>Object}]
|
|
65
|
+
|
|
66
|
+
class TimeoutOpts < ContextDev::Internal::Type::BaseModel
|
|
67
|
+
# @!attribute milliseconds
|
|
68
|
+
# Request deadline in milliseconds. Maximum: 300000 (5 minutes).
|
|
69
|
+
#
|
|
70
|
+
# @return [Integer]
|
|
71
|
+
required :milliseconds, Integer
|
|
72
|
+
|
|
73
|
+
# @!attribute behavior
|
|
74
|
+
# What to do at the deadline. "fail" returns 408 REQUEST_TIMEOUT without charging
|
|
75
|
+
# credits. "return-partial" returns usable results collected so far; if none are
|
|
76
|
+
# available, the request still fails without charging credits. Partial results are
|
|
77
|
+
# not cached as complete results. "return-partial" requires milliseconds of at
|
|
78
|
+
# least 15000.
|
|
79
|
+
#
|
|
80
|
+
# @return [Symbol, ContextDev::Models::WebExtractFontsParams::TimeoutOpts::Behavior, nil]
|
|
81
|
+
optional :behavior, enum: -> { ContextDev::WebExtractFontsParams::TimeoutOpts::Behavior }
|
|
82
|
+
|
|
83
|
+
# @!method initialize(milliseconds:, behavior: nil)
|
|
84
|
+
# Some parameter documentations has been truncated, see
|
|
85
|
+
# {ContextDev::Models::WebExtractFontsParams::TimeoutOpts} for more details.
|
|
86
|
+
#
|
|
87
|
+
# Optional request deadline and behavior on timeout. For GET requests, use
|
|
88
|
+
# timeoutOpts[milliseconds]=30000&timeoutOpts[behavior]=fail or a JSON-encoded
|
|
89
|
+
# timeoutOpts object.
|
|
90
|
+
#
|
|
91
|
+
# @param milliseconds [Integer] Request deadline in milliseconds. Maximum: 300000 (5 minutes).
|
|
92
|
+
#
|
|
93
|
+
# @param behavior [Symbol, ContextDev::Models::WebExtractFontsParams::TimeoutOpts::Behavior] What to do at the deadline. "fail" returns 408 REQUEST_TIMEOUT without charging
|
|
94
|
+
|
|
95
|
+
# What to do at the deadline. "fail" returns 408 REQUEST_TIMEOUT without charging
|
|
96
|
+
# credits. "return-partial" returns usable results collected so far; if none are
|
|
97
|
+
# available, the request still fails without charging credits. Partial results are
|
|
98
|
+
# not cached as complete results. "return-partial" requires milliseconds of at
|
|
99
|
+
# least 15000.
|
|
100
|
+
#
|
|
101
|
+
# @see ContextDev::Models::WebExtractFontsParams::TimeoutOpts#behavior
|
|
102
|
+
module Behavior
|
|
103
|
+
extend ContextDev::Internal::Type::Enum
|
|
104
|
+
|
|
105
|
+
FAIL = :fail
|
|
106
|
+
RETURN_PARTIAL = :"return-partial"
|
|
107
|
+
|
|
108
|
+
# @!method self.values
|
|
109
|
+
# @return [Array<Symbol>]
|
|
110
|
+
end
|
|
111
|
+
end
|
|
65
112
|
end
|
|
66
113
|
end
|
|
67
114
|
end
|
|
@@ -44,6 +44,18 @@ module ContextDev
|
|
|
44
44
|
# @return [String]
|
|
45
45
|
required :status, String
|
|
46
46
|
|
|
47
|
+
# @!attribute final_dom_state
|
|
48
|
+
# How complete the returned content is. `loaded` means the page finished the waits
|
|
49
|
+
# the request asked for. `still-loading` only occurs with
|
|
50
|
+
# timeoutOpts.behavior=return-partial: the timeoutOpts.milliseconds deadline was
|
|
51
|
+
# reached first, so the content reflects the DOM at that moment and late-rendering
|
|
52
|
+
# parts may be missing. Partial results are billed at the base request cost.
|
|
53
|
+
#
|
|
54
|
+
# @return [Symbol, ContextDev::Models::WebExtractFontsResponse::FinalDomState, nil]
|
|
55
|
+
optional :final_dom_state,
|
|
56
|
+
enum: -> { ContextDev::Models::WebExtractFontsResponse::FinalDomState },
|
|
57
|
+
api_name: :finalDOMState
|
|
58
|
+
|
|
47
59
|
# @!attribute font_links
|
|
48
60
|
# Font assets keyed by family name as it appears in the fonts array (non-generic
|
|
49
61
|
# names only). Clients match entries in fonts to pick a file URL from files.
|
|
@@ -60,7 +72,7 @@ module ContextDev
|
|
|
60
72
|
# @return [ContextDev::Models::WebExtractFontsResponse::KeyMetadata, nil]
|
|
61
73
|
optional :key_metadata, -> { ContextDev::Models::WebExtractFontsResponse::KeyMetadata }
|
|
62
74
|
|
|
63
|
-
# @!method initialize(cache_metadata:, code:, domain:, fonts:, request_id:, status:, font_links: nil, key_metadata: nil)
|
|
75
|
+
# @!method initialize(cache_metadata:, code:, domain:, fonts:, request_id:, status:, final_dom_state: nil, font_links: nil, key_metadata: nil)
|
|
64
76
|
# Some parameter documentations has been truncated, see
|
|
65
77
|
# {ContextDev::Models::WebExtractFontsResponse} for more details.
|
|
66
78
|
#
|
|
@@ -76,6 +88,8 @@ module ContextDev
|
|
|
76
88
|
#
|
|
77
89
|
# @param status [String] Status of the response, e.g., 'ok'
|
|
78
90
|
#
|
|
91
|
+
# @param final_dom_state [Symbol, ContextDev::Models::WebExtractFontsResponse::FinalDomState] How complete the returned content is. `loaded` means the page finished the waits
|
|
92
|
+
#
|
|
79
93
|
# @param font_links [Hash{Symbol=>ContextDev::Models::WebExtractFontsResponse::FontLink}] Font assets keyed by family name as it appears in the fonts array (non-generic n
|
|
80
94
|
#
|
|
81
95
|
# @param key_metadata [ContextDev::Models::WebExtractFontsResponse::KeyMetadata] Credit usage, included whenever a valid API key is provided.
|
|
@@ -182,6 +196,23 @@ module ContextDev
|
|
|
182
196
|
# @param uses [Array<String>] Array of CSS selectors or element types where this font is used
|
|
183
197
|
end
|
|
184
198
|
|
|
199
|
+
# How complete the returned content is. `loaded` means the page finished the waits
|
|
200
|
+
# the request asked for. `still-loading` only occurs with
|
|
201
|
+
# timeoutOpts.behavior=return-partial: the timeoutOpts.milliseconds deadline was
|
|
202
|
+
# reached first, so the content reflects the DOM at that moment and late-rendering
|
|
203
|
+
# parts may be missing. Partial results are billed at the base request cost.
|
|
204
|
+
#
|
|
205
|
+
# @see ContextDev::Models::WebExtractFontsResponse#final_dom_state
|
|
206
|
+
module FinalDomState
|
|
207
|
+
extend ContextDev::Internal::Type::Enum
|
|
208
|
+
|
|
209
|
+
LOADED = :loaded
|
|
210
|
+
STILL_LOADING = :"still-loading"
|
|
211
|
+
|
|
212
|
+
# @!method self.values
|
|
213
|
+
# @return [Array<Symbol>]
|
|
214
|
+
end
|
|
215
|
+
|
|
185
216
|
class FontLink < ContextDev::Internal::Type::BaseModel
|
|
186
217
|
# @!attribute files
|
|
187
218
|
# Upright font files keyed by weight string (e.g. "400" for regular, "500",
|
|
@@ -110,13 +110,13 @@ module ContextDev
|
|
|
110
110
|
# @return [Array<String>, nil]
|
|
111
111
|
optional :tags, ContextDev::Internal::Type::ArrayOf[String]
|
|
112
112
|
|
|
113
|
-
# @!attribute
|
|
114
|
-
# Optional
|
|
115
|
-
#
|
|
116
|
-
#
|
|
113
|
+
# @!attribute timeout_opts
|
|
114
|
+
# Optional request deadline and behavior on timeout. For GET requests, use
|
|
115
|
+
# timeoutOpts[milliseconds]=30000&timeoutOpts[behavior]=fail or a JSON-encoded
|
|
116
|
+
# timeoutOpts object.
|
|
117
117
|
#
|
|
118
|
-
# @return [
|
|
119
|
-
optional :
|
|
118
|
+
# @return [ContextDev::Models::WebExtractParams::TimeoutOpts, nil]
|
|
119
|
+
optional :timeout_opts, -> { ContextDev::WebExtractParams::TimeoutOpts }, api_name: :timeoutOpts
|
|
120
120
|
|
|
121
121
|
# @!attribute wait_for_ms
|
|
122
122
|
# Optional browser wait time in milliseconds after initial page load for each
|
|
@@ -125,7 +125,7 @@ module ContextDev
|
|
|
125
125
|
# @return [Integer, nil]
|
|
126
126
|
optional :wait_for_ms, Integer, api_name: :waitForMs
|
|
127
127
|
|
|
128
|
-
# @!method initialize(schema:, url:, actions: nil, fact_check: nil, follow_subdomains: nil, include_frames: nil, instructions: nil, max_age_ms: nil, max_depth: nil, max_pages: nil, pdf: nil, settle_animations: nil, stop_after_ms: nil, tags: nil,
|
|
128
|
+
# @!method initialize(schema:, url:, actions: nil, fact_check: nil, follow_subdomains: nil, include_frames: nil, instructions: nil, max_age_ms: nil, max_depth: nil, max_pages: nil, pdf: nil, settle_animations: nil, stop_after_ms: nil, tags: nil, timeout_opts: nil, wait_for_ms: nil, request_options: {})
|
|
129
129
|
# Some parameter documentations has been truncated, see
|
|
130
130
|
# {ContextDev::Models::WebExtractParams} for more details.
|
|
131
131
|
#
|
|
@@ -157,7 +157,7 @@ module ContextDev
|
|
|
157
157
|
#
|
|
158
158
|
# @param tags [Array<String>] Optional tags for tracking usage. Up to 20 tags, each 1 to 50 characters.
|
|
159
159
|
#
|
|
160
|
-
# @param
|
|
160
|
+
# @param timeout_opts [ContextDev::Models::WebExtractParams::TimeoutOpts] Optional request deadline and behavior on timeout. For GET requests, use timeout
|
|
161
161
|
#
|
|
162
162
|
# @param wait_for_ms [Integer] Optional browser wait time in milliseconds after initial page load for each craw
|
|
163
163
|
#
|
|
@@ -342,6 +342,51 @@ module ContextDev
|
|
|
342
342
|
#
|
|
343
343
|
# @param start [Integer] First 1-based PDF page to parse.
|
|
344
344
|
end
|
|
345
|
+
|
|
346
|
+
class TimeoutOpts < ContextDev::Internal::Type::BaseModel
|
|
347
|
+
# @!attribute milliseconds
|
|
348
|
+
# Request deadline in milliseconds. Maximum: 300000 (5 minutes).
|
|
349
|
+
#
|
|
350
|
+
# @return [Integer]
|
|
351
|
+
required :milliseconds, Integer
|
|
352
|
+
|
|
353
|
+
# @!attribute behavior
|
|
354
|
+
# What to do at the deadline. "fail" returns 408 REQUEST_TIMEOUT without charging
|
|
355
|
+
# credits. "return-partial" returns usable results collected so far; if none are
|
|
356
|
+
# available, the request still fails without charging credits. Partial results are
|
|
357
|
+
# not cached as complete results.
|
|
358
|
+
#
|
|
359
|
+
# @return [Symbol, ContextDev::Models::WebExtractParams::TimeoutOpts::Behavior, nil]
|
|
360
|
+
optional :behavior, enum: -> { ContextDev::WebExtractParams::TimeoutOpts::Behavior }
|
|
361
|
+
|
|
362
|
+
# @!method initialize(milliseconds:, behavior: nil)
|
|
363
|
+
# Some parameter documentations has been truncated, see
|
|
364
|
+
# {ContextDev::Models::WebExtractParams::TimeoutOpts} for more details.
|
|
365
|
+
#
|
|
366
|
+
# Optional request deadline and behavior on timeout. For GET requests, use
|
|
367
|
+
# timeoutOpts[milliseconds]=30000&timeoutOpts[behavior]=fail or a JSON-encoded
|
|
368
|
+
# timeoutOpts object.
|
|
369
|
+
#
|
|
370
|
+
# @param milliseconds [Integer] Request deadline in milliseconds. Maximum: 300000 (5 minutes).
|
|
371
|
+
#
|
|
372
|
+
# @param behavior [Symbol, ContextDev::Models::WebExtractParams::TimeoutOpts::Behavior] What to do at the deadline. "fail" returns 408 REQUEST_TIMEOUT without charging
|
|
373
|
+
|
|
374
|
+
# What to do at the deadline. "fail" returns 408 REQUEST_TIMEOUT without charging
|
|
375
|
+
# credits. "return-partial" returns usable results collected so far; if none are
|
|
376
|
+
# available, the request still fails without charging credits. Partial results are
|
|
377
|
+
# not cached as complete results.
|
|
378
|
+
#
|
|
379
|
+
# @see ContextDev::Models::WebExtractParams::TimeoutOpts#behavior
|
|
380
|
+
module Behavior
|
|
381
|
+
extend ContextDev::Internal::Type::Enum
|
|
382
|
+
|
|
383
|
+
FAIL = :fail
|
|
384
|
+
RETURN_PARTIAL = :"return-partial"
|
|
385
|
+
|
|
386
|
+
# @!method self.values
|
|
387
|
+
# @return [Array<Symbol>]
|
|
388
|
+
end
|
|
389
|
+
end
|
|
345
390
|
end
|
|
346
391
|
end
|
|
347
392
|
end
|
|
@@ -54,7 +54,14 @@ module ContextDev
|
|
|
54
54
|
# @return [ContextDev::Models::WebExtractResponse::KeyMetadata, nil]
|
|
55
55
|
optional :key_metadata, -> { ContextDev::Models::WebExtractResponse::KeyMetadata }
|
|
56
56
|
|
|
57
|
-
# @!
|
|
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)
|
|
58
65
|
# Some parameter documentations has been truncated, see
|
|
59
66
|
# {ContextDev::Models::WebExtractResponse} for more details.
|
|
60
67
|
#
|
|
@@ -73,6 +80,8 @@ module ContextDev
|
|
|
73
80
|
# @param urls_analyzed [Array<String>] List of URLs whose Markdown was used for extraction
|
|
74
81
|
#
|
|
75
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
|
|
76
85
|
|
|
77
86
|
# @see ContextDev::Models::WebExtractResponse#cache_metadata
|
|
78
87
|
class CacheMetadata < ContextDev::Internal::Type::BaseModel
|
|
@@ -33,9 +33,9 @@ module ContextDev
|
|
|
33
33
|
|
|
34
34
|
# @!attribute max_age_ms
|
|
35
35
|
# Maximum age in milliseconds for cached brand data before the API performs a hard
|
|
36
|
-
# refresh. Defaults to 3 months (7776000000 ms).
|
|
37
|
-
# are clamped to
|
|
38
|
-
# year.
|
|
36
|
+
# refresh. Defaults to 3 months (7776000000 ms). Set to 0 to always perform a hard
|
|
37
|
+
# refresh. Negative values are clamped to 0; values above 1 year (31536000000 ms)
|
|
38
|
+
# are clamped to 1 year.
|
|
39
39
|
#
|
|
40
40
|
# @return [Integer, nil]
|
|
41
41
|
optional :max_age_ms, Integer, nil?: true
|
|
@@ -47,15 +47,15 @@ module ContextDev
|
|
|
47
47
|
# @return [Array<String>, nil]
|
|
48
48
|
optional :tags, ContextDev::Internal::Type::ArrayOf[String]
|
|
49
49
|
|
|
50
|
-
# @!attribute
|
|
51
|
-
# Optional
|
|
52
|
-
#
|
|
53
|
-
#
|
|
50
|
+
# @!attribute timeout_opts
|
|
51
|
+
# Optional request deadline and behavior on timeout. For GET requests, use
|
|
52
|
+
# timeoutOpts[milliseconds]=30000&timeoutOpts[behavior]=fail or a JSON-encoded
|
|
53
|
+
# timeoutOpts object.
|
|
54
54
|
#
|
|
55
|
-
# @return [
|
|
56
|
-
optional :
|
|
55
|
+
# @return [ContextDev::Models::WebExtractStyleguideParams::TimeoutOpts, nil]
|
|
56
|
+
optional :timeout_opts, -> { ContextDev::WebExtractStyleguideParams::TimeoutOpts }
|
|
57
57
|
|
|
58
|
-
# @!method initialize(color_scheme: nil, direct_url: nil, domain: nil, max_age_ms: nil, tags: nil,
|
|
58
|
+
# @!method initialize(color_scheme: nil, direct_url: nil, domain: nil, max_age_ms: nil, tags: nil, timeout_opts: nil, request_options: {})
|
|
59
59
|
# Some parameter documentations has been truncated, see
|
|
60
60
|
# {ContextDev::Models::WebExtractStyleguideParams} for more details.
|
|
61
61
|
#
|
|
@@ -69,7 +69,7 @@ module ContextDev
|
|
|
69
69
|
#
|
|
70
70
|
# @param tags [Array<String>] Comma-separated tags for tracking request usage. Up to 20 tags, each 1-50 charac
|
|
71
71
|
#
|
|
72
|
-
# @param
|
|
72
|
+
# @param timeout_opts [ContextDev::Models::WebExtractStyleguideParams::TimeoutOpts] Optional request deadline and behavior on timeout. For GET requests, use timeout
|
|
73
73
|
#
|
|
74
74
|
# @param request_options [ContextDev::RequestOptions, Hash{Symbol=>Object}]
|
|
75
75
|
|
|
@@ -84,6 +84,53 @@ module ContextDev
|
|
|
84
84
|
# @!method self.values
|
|
85
85
|
# @return [Array<Symbol>]
|
|
86
86
|
end
|
|
87
|
+
|
|
88
|
+
class TimeoutOpts < ContextDev::Internal::Type::BaseModel
|
|
89
|
+
# @!attribute milliseconds
|
|
90
|
+
# Request deadline in milliseconds. Maximum: 300000 (5 minutes).
|
|
91
|
+
#
|
|
92
|
+
# @return [Integer]
|
|
93
|
+
required :milliseconds, Integer
|
|
94
|
+
|
|
95
|
+
# @!attribute behavior
|
|
96
|
+
# What to do at the deadline. "fail" returns 408 REQUEST_TIMEOUT without charging
|
|
97
|
+
# credits. "return-partial" returns usable results collected so far; if none are
|
|
98
|
+
# available, the request still fails without charging credits. Partial results are
|
|
99
|
+
# not cached as complete results. "return-partial" requires milliseconds of at
|
|
100
|
+
# least 15000.
|
|
101
|
+
#
|
|
102
|
+
# @return [Symbol, ContextDev::Models::WebExtractStyleguideParams::TimeoutOpts::Behavior, nil]
|
|
103
|
+
optional :behavior, enum: -> { ContextDev::WebExtractStyleguideParams::TimeoutOpts::Behavior }
|
|
104
|
+
|
|
105
|
+
# @!method initialize(milliseconds:, behavior: nil)
|
|
106
|
+
# Some parameter documentations has been truncated, see
|
|
107
|
+
# {ContextDev::Models::WebExtractStyleguideParams::TimeoutOpts} for more details.
|
|
108
|
+
#
|
|
109
|
+
# Optional request deadline and behavior on timeout. For GET requests, use
|
|
110
|
+
# timeoutOpts[milliseconds]=30000&timeoutOpts[behavior]=fail or a JSON-encoded
|
|
111
|
+
# timeoutOpts object.
|
|
112
|
+
#
|
|
113
|
+
# @param milliseconds [Integer] Request deadline in milliseconds. Maximum: 300000 (5 minutes).
|
|
114
|
+
#
|
|
115
|
+
# @param behavior [Symbol, ContextDev::Models::WebExtractStyleguideParams::TimeoutOpts::Behavior] What to do at the deadline. "fail" returns 408 REQUEST_TIMEOUT without charging
|
|
116
|
+
|
|
117
|
+
# What to do at the deadline. "fail" returns 408 REQUEST_TIMEOUT without charging
|
|
118
|
+
# credits. "return-partial" returns usable results collected so far; if none are
|
|
119
|
+
# available, the request still fails without charging credits. Partial results are
|
|
120
|
+
# not cached as complete results. "return-partial" requires milliseconds of at
|
|
121
|
+
# least 15000.
|
|
122
|
+
#
|
|
123
|
+
# @see ContextDev::Models::WebExtractStyleguideParams::TimeoutOpts#behavior
|
|
124
|
+
module Behavior
|
|
125
|
+
extend ContextDev::Internal::Type::Enum
|
|
126
|
+
|
|
127
|
+
FAIL = :fail
|
|
128
|
+
RETURN_PARTIAL = :"return-partial"
|
|
129
|
+
|
|
130
|
+
# @!method self.values
|
|
131
|
+
# @return [Array<Symbol>]
|
|
132
|
+
end
|
|
133
|
+
end
|
|
87
134
|
end
|
|
88
135
|
end
|
|
89
136
|
end
|
|
@@ -31,6 +31,18 @@ module ContextDev
|
|
|
31
31
|
# @return [String, nil]
|
|
32
32
|
optional :domain, String
|
|
33
33
|
|
|
34
|
+
# @!attribute final_dom_state
|
|
35
|
+
# How complete the returned content is. `loaded` means the page finished the waits
|
|
36
|
+
# the request asked for. `still-loading` only occurs with
|
|
37
|
+
# timeoutOpts.behavior=return-partial: the timeoutOpts.milliseconds deadline was
|
|
38
|
+
# reached first, so the content reflects the DOM at that moment and late-rendering
|
|
39
|
+
# parts may be missing. Partial results are billed at the base request cost.
|
|
40
|
+
#
|
|
41
|
+
# @return [Symbol, ContextDev::Models::WebExtractStyleguideResponse::FinalDomState, nil]
|
|
42
|
+
optional :final_dom_state,
|
|
43
|
+
enum: -> { ContextDev::Models::WebExtractStyleguideResponse::FinalDomState },
|
|
44
|
+
api_name: :finalDOMState
|
|
45
|
+
|
|
34
46
|
# @!attribute key_metadata
|
|
35
47
|
# Credit usage, included whenever a valid API key is provided.
|
|
36
48
|
#
|
|
@@ -49,7 +61,7 @@ module ContextDev
|
|
|
49
61
|
# @return [ContextDev::Models::WebExtractStyleguideResponse::Styleguide, nil]
|
|
50
62
|
optional :styleguide, -> { ContextDev::Models::WebExtractStyleguideResponse::Styleguide }
|
|
51
63
|
|
|
52
|
-
# @!method initialize(cache_metadata:, request_id:, code: nil, domain: nil, key_metadata: nil, status: nil, styleguide: nil)
|
|
64
|
+
# @!method initialize(cache_metadata:, request_id:, code: nil, domain: nil, final_dom_state: nil, key_metadata: nil, status: nil, styleguide: nil)
|
|
53
65
|
# Some parameter documentations has been truncated, see
|
|
54
66
|
# {ContextDev::Models::WebExtractStyleguideResponse} for more details.
|
|
55
67
|
#
|
|
@@ -61,6 +73,8 @@ module ContextDev
|
|
|
61
73
|
#
|
|
62
74
|
# @param domain [String] The normalized domain that was processed
|
|
63
75
|
#
|
|
76
|
+
# @param final_dom_state [Symbol, ContextDev::Models::WebExtractStyleguideResponse::FinalDomState] How complete the returned content is. `loaded` means the page finished the waits
|
|
77
|
+
#
|
|
64
78
|
# @param key_metadata [ContextDev::Models::WebExtractStyleguideResponse::KeyMetadata] Credit usage, included whenever a valid API key is provided.
|
|
65
79
|
#
|
|
66
80
|
# @param status [String] Status of the response, e.g., 'ok'
|
|
@@ -111,6 +125,23 @@ module ContextDev
|
|
|
111
125
|
end
|
|
112
126
|
end
|
|
113
127
|
|
|
128
|
+
# How complete the returned content is. `loaded` means the page finished the waits
|
|
129
|
+
# the request asked for. `still-loading` only occurs with
|
|
130
|
+
# timeoutOpts.behavior=return-partial: the timeoutOpts.milliseconds deadline was
|
|
131
|
+
# reached first, so the content reflects the DOM at that moment and late-rendering
|
|
132
|
+
# parts may be missing. Partial results are billed at the base request cost.
|
|
133
|
+
#
|
|
134
|
+
# @see ContextDev::Models::WebExtractStyleguideResponse#final_dom_state
|
|
135
|
+
module FinalDomState
|
|
136
|
+
extend ContextDev::Internal::Type::Enum
|
|
137
|
+
|
|
138
|
+
LOADED = :loaded
|
|
139
|
+
STILL_LOADING = :"still-loading"
|
|
140
|
+
|
|
141
|
+
# @!method self.values
|
|
142
|
+
# @return [Array<Symbol>]
|
|
143
|
+
end
|
|
144
|
+
|
|
114
145
|
# @see ContextDev::Models::WebExtractStyleguideResponse#key_metadata
|
|
115
146
|
class KeyMetadata < ContextDev::Internal::Type::BaseModel
|
|
116
147
|
# @!attribute credits_consumed
|
|
@@ -99,13 +99,13 @@ module ContextDev
|
|
|
99
99
|
# @return [Array<String>, nil]
|
|
100
100
|
optional :tags, ContextDev::Internal::Type::ArrayOf[String]
|
|
101
101
|
|
|
102
|
-
# @!attribute
|
|
103
|
-
# Optional
|
|
104
|
-
#
|
|
105
|
-
#
|
|
102
|
+
# @!attribute timeout_opts
|
|
103
|
+
# Optional request deadline and behavior on timeout. For GET requests, use
|
|
104
|
+
# timeoutOpts[milliseconds]=30000&timeoutOpts[behavior]=fail or a JSON-encoded
|
|
105
|
+
# timeoutOpts object.
|
|
106
106
|
#
|
|
107
|
-
# @return [
|
|
108
|
-
optional :
|
|
107
|
+
# @return [ContextDev::Models::WebScreenshotParams::TimeoutOpts, nil]
|
|
108
|
+
optional :timeout_opts, -> { ContextDev::WebScreenshotParams::TimeoutOpts }
|
|
109
109
|
|
|
110
110
|
# @!attribute viewport
|
|
111
111
|
# Optional browser viewport dimensions for the screenshot. Defaults to 1920x1080.
|
|
@@ -116,8 +116,9 @@ module ContextDev
|
|
|
116
116
|
# @!attribute wait_for_ms
|
|
117
117
|
# Optional browser wait time in milliseconds after initial page load before taking
|
|
118
118
|
# the screenshot. Min: 0. Max: 30000 (30 seconds). Defaults to 3000 ms when
|
|
119
|
-
# omitted. When combined with
|
|
120
|
-
# 10000 ms; a shorter deadline is rejected with 400
|
|
119
|
+
# omitted. When combined with timeoutOpts, timeoutOpts.milliseconds must be at
|
|
120
|
+
# least waitForMs + 10000 ms; a shorter deadline is rejected with 400
|
|
121
|
+
# TIMEOUT_TOO_SHORT_FOR_WAIT.
|
|
121
122
|
#
|
|
122
123
|
# @return [Integer, nil]
|
|
123
124
|
optional :wait_for_ms, Integer, nil?: true
|
|
@@ -131,7 +132,7 @@ module ContextDev
|
|
|
131
132
|
# @return [Symbol, ContextDev::Models::WebScreenshotParams::Zdr, nil]
|
|
132
133
|
optional :zdr, enum: -> { ContextDev::WebScreenshotParams::Zdr }
|
|
133
134
|
|
|
134
|
-
# @!method initialize(clear_popups: nil, color_scheme: nil, country: nil, direct_url: nil, domain: nil, full_screenshot: nil, handle_cookie_popup: nil, max_age_ms: nil, page: nil, scroll_offset: nil, tags: nil,
|
|
135
|
+
# @!method initialize(clear_popups: nil, color_scheme: nil, country: nil, direct_url: nil, domain: nil, full_screenshot: nil, handle_cookie_popup: nil, max_age_ms: nil, page: nil, scroll_offset: nil, tags: nil, timeout_opts: nil, viewport: nil, wait_for_ms: nil, zdr: nil, request_options: {})
|
|
135
136
|
# Some parameter documentations has been truncated, see
|
|
136
137
|
# {ContextDev::Models::WebScreenshotParams} for more details.
|
|
137
138
|
#
|
|
@@ -157,7 +158,7 @@ module ContextDev
|
|
|
157
158
|
#
|
|
158
159
|
# @param tags [Array<String>] Comma-separated tags for tracking request usage. Up to 20 tags, each 1-50 charac
|
|
159
160
|
#
|
|
160
|
-
# @param
|
|
161
|
+
# @param timeout_opts [ContextDev::Models::WebScreenshotParams::TimeoutOpts] Optional request deadline and behavior on timeout. For GET requests, use timeout
|
|
161
162
|
#
|
|
162
163
|
# @param viewport [ContextDev::Models::WebScreenshotParams::Viewport] Optional browser viewport dimensions for the screenshot. Defaults to 1920x1080.
|
|
163
164
|
#
|
|
@@ -427,6 +428,53 @@ module ContextDev
|
|
|
427
428
|
# @return [Array<Symbol>]
|
|
428
429
|
end
|
|
429
430
|
|
|
431
|
+
class TimeoutOpts < ContextDev::Internal::Type::BaseModel
|
|
432
|
+
# @!attribute milliseconds
|
|
433
|
+
# Request deadline in milliseconds. Maximum: 300000 (5 minutes).
|
|
434
|
+
#
|
|
435
|
+
# @return [Integer]
|
|
436
|
+
required :milliseconds, Integer
|
|
437
|
+
|
|
438
|
+
# @!attribute behavior
|
|
439
|
+
# What to do at the deadline. "fail" returns 408 REQUEST_TIMEOUT without charging
|
|
440
|
+
# credits. "return-partial" returns usable results collected so far; if none are
|
|
441
|
+
# available, the request still fails without charging credits. Partial results are
|
|
442
|
+
# not cached as complete results. "return-partial" requires milliseconds of at
|
|
443
|
+
# least 15000.
|
|
444
|
+
#
|
|
445
|
+
# @return [Symbol, ContextDev::Models::WebScreenshotParams::TimeoutOpts::Behavior, nil]
|
|
446
|
+
optional :behavior, enum: -> { ContextDev::WebScreenshotParams::TimeoutOpts::Behavior }
|
|
447
|
+
|
|
448
|
+
# @!method initialize(milliseconds:, behavior: nil)
|
|
449
|
+
# Some parameter documentations has been truncated, see
|
|
450
|
+
# {ContextDev::Models::WebScreenshotParams::TimeoutOpts} for more details.
|
|
451
|
+
#
|
|
452
|
+
# Optional request deadline and behavior on timeout. For GET requests, use
|
|
453
|
+
# timeoutOpts[milliseconds]=30000&timeoutOpts[behavior]=fail or a JSON-encoded
|
|
454
|
+
# timeoutOpts object.
|
|
455
|
+
#
|
|
456
|
+
# @param milliseconds [Integer] Request deadline in milliseconds. Maximum: 300000 (5 minutes).
|
|
457
|
+
#
|
|
458
|
+
# @param behavior [Symbol, ContextDev::Models::WebScreenshotParams::TimeoutOpts::Behavior] What to do at the deadline. "fail" returns 408 REQUEST_TIMEOUT without charging
|
|
459
|
+
|
|
460
|
+
# What to do at the deadline. "fail" returns 408 REQUEST_TIMEOUT without charging
|
|
461
|
+
# credits. "return-partial" returns usable results collected so far; if none are
|
|
462
|
+
# available, the request still fails without charging credits. Partial results are
|
|
463
|
+
# not cached as complete results. "return-partial" requires milliseconds of at
|
|
464
|
+
# least 15000.
|
|
465
|
+
#
|
|
466
|
+
# @see ContextDev::Models::WebScreenshotParams::TimeoutOpts#behavior
|
|
467
|
+
module Behavior
|
|
468
|
+
extend ContextDev::Internal::Type::Enum
|
|
469
|
+
|
|
470
|
+
FAIL = :fail
|
|
471
|
+
RETURN_PARTIAL = :"return-partial"
|
|
472
|
+
|
|
473
|
+
# @!method self.values
|
|
474
|
+
# @return [Array<Symbol>]
|
|
475
|
+
end
|
|
476
|
+
end
|
|
477
|
+
|
|
430
478
|
class Viewport < ContextDev::Internal::Type::BaseModel
|
|
431
479
|
# @!attribute height
|
|
432
480
|
# Viewport height in pixels.
|