context.dev 1.14.0 → 1.16.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 +16 -0
- data/README.md +1 -1
- data/lib/context_dev/models/brand_retrieve_by_email_params.rb +12 -1
- data/lib/context_dev/models/brand_retrieve_by_isin_params.rb +12 -1
- data/lib/context_dev/models/brand_retrieve_by_name_params.rb +12 -1
- data/lib/context_dev/models/brand_retrieve_by_ticker_params.rb +12 -1
- data/lib/context_dev/models/brand_retrieve_params.rb +12 -1
- data/lib/context_dev/models/brand_retrieve_simplified_params.rb +12 -1
- data/lib/context_dev/models/web_screenshot_params.rb +40 -1
- data/lib/context_dev/models/web_screenshot_response.rb +17 -1
- data/lib/context_dev/models/web_web_scrape_images_params.rb +2 -2
- data/lib/context_dev/resources/brand.rb +24 -12
- data/lib/context_dev/resources/web.rb +10 -2
- data/lib/context_dev/version.rb +1 -1
- data/rbi/context_dev/models/brand_retrieve_by_email_params.rbi +17 -0
- data/rbi/context_dev/models/brand_retrieve_by_isin_params.rbi +17 -0
- data/rbi/context_dev/models/brand_retrieve_by_name_params.rbi +17 -0
- data/rbi/context_dev/models/brand_retrieve_by_ticker_params.rbi +17 -0
- data/rbi/context_dev/models/brand_retrieve_params.rbi +17 -0
- data/rbi/context_dev/models/brand_retrieve_simplified_params.rbi +17 -0
- data/rbi/context_dev/models/web_screenshot_params.rbi +68 -0
- data/rbi/context_dev/models/web_screenshot_response.rbi +25 -3
- data/rbi/context_dev/models/web_web_scrape_images_params.rbi +2 -2
- data/rbi/context_dev/resources/brand.rbi +36 -0
- data/rbi/context_dev/resources/web.rbi +8 -0
- data/sig/context_dev/models/brand_retrieve_by_email_params.rbs +7 -0
- data/sig/context_dev/models/brand_retrieve_by_isin_params.rbs +7 -0
- data/sig/context_dev/models/brand_retrieve_by_name_params.rbs +7 -0
- data/sig/context_dev/models/brand_retrieve_by_ticker_params.rbs +7 -0
- data/sig/context_dev/models/brand_retrieve_params.rbs +7 -0
- data/sig/context_dev/models/brand_retrieve_simplified_params.rbs +7 -1
- data/sig/context_dev/models/web_screenshot_params.rbs +33 -1
- data/sig/context_dev/models/web_screenshot_response.rbs +17 -3
- data/sig/context_dev/resources/brand.rbs +6 -0
- data/sig/context_dev/resources/web.rbs +2 -0
- metadata +2 -2
|
@@ -38,6 +38,16 @@ module ContextDev
|
|
|
38
38
|
end
|
|
39
39
|
attr_writer :force_language
|
|
40
40
|
|
|
41
|
+
# Maximum age in milliseconds for cached brand data before the API performs a hard
|
|
42
|
+
# refresh. Defaults to 3 months (7776000000 ms). Values below 1 day (86400000 ms)
|
|
43
|
+
# are clamped to 1 day; values above 1 year (31536000000 ms) are clamped to 1
|
|
44
|
+
# year.
|
|
45
|
+
sig { returns(T.nilable(Integer)) }
|
|
46
|
+
attr_reader :max_age_ms
|
|
47
|
+
|
|
48
|
+
sig { params(max_age_ms: Integer).void }
|
|
49
|
+
attr_writer :max_age_ms
|
|
50
|
+
|
|
41
51
|
# Optional parameter to optimize the API call for maximum speed. When set to true,
|
|
42
52
|
# the API will skip time-consuming operations for faster response at the cost of
|
|
43
53
|
# less comprehensive data.
|
|
@@ -61,6 +71,7 @@ module ContextDev
|
|
|
61
71
|
isin: String,
|
|
62
72
|
force_language:
|
|
63
73
|
ContextDev::BrandRetrieveByIsinParams::ForceLanguage::OrSymbol,
|
|
74
|
+
max_age_ms: Integer,
|
|
64
75
|
max_speed: T::Boolean,
|
|
65
76
|
timeout_ms: Integer,
|
|
66
77
|
request_options: ContextDev::RequestOptions::OrHash
|
|
@@ -73,6 +84,11 @@ module ContextDev
|
|
|
73
84
|
isin:,
|
|
74
85
|
# Optional parameter to force the language of the retrieved brand data.
|
|
75
86
|
force_language: nil,
|
|
87
|
+
# Maximum age in milliseconds for cached brand data before the API performs a hard
|
|
88
|
+
# refresh. Defaults to 3 months (7776000000 ms). Values below 1 day (86400000 ms)
|
|
89
|
+
# are clamped to 1 day; values above 1 year (31536000000 ms) are clamped to 1
|
|
90
|
+
# year.
|
|
91
|
+
max_age_ms: nil,
|
|
76
92
|
# Optional parameter to optimize the API call for maximum speed. When set to true,
|
|
77
93
|
# the API will skip time-consuming operations for faster response at the cost of
|
|
78
94
|
# less comprehensive data.
|
|
@@ -91,6 +107,7 @@ module ContextDev
|
|
|
91
107
|
isin: String,
|
|
92
108
|
force_language:
|
|
93
109
|
ContextDev::BrandRetrieveByIsinParams::ForceLanguage::OrSymbol,
|
|
110
|
+
max_age_ms: Integer,
|
|
94
111
|
max_speed: T::Boolean,
|
|
95
112
|
timeout_ms: Integer,
|
|
96
113
|
request_options: ContextDev::RequestOptions
|
|
@@ -53,6 +53,16 @@ module ContextDev
|
|
|
53
53
|
end
|
|
54
54
|
attr_writer :force_language
|
|
55
55
|
|
|
56
|
+
# Maximum age in milliseconds for cached brand data before the API performs a hard
|
|
57
|
+
# refresh. Defaults to 3 months (7776000000 ms). Values below 1 day (86400000 ms)
|
|
58
|
+
# are clamped to 1 day; values above 1 year (31536000000 ms) are clamped to 1
|
|
59
|
+
# year.
|
|
60
|
+
sig { returns(T.nilable(Integer)) }
|
|
61
|
+
attr_reader :max_age_ms
|
|
62
|
+
|
|
63
|
+
sig { params(max_age_ms: Integer).void }
|
|
64
|
+
attr_writer :max_age_ms
|
|
65
|
+
|
|
56
66
|
# Optional parameter to optimize the API call for maximum speed. When set to true,
|
|
57
67
|
# the API will skip time-consuming operations for faster response at the cost of
|
|
58
68
|
# less comprehensive data.
|
|
@@ -78,6 +88,7 @@ module ContextDev
|
|
|
78
88
|
ContextDev::BrandRetrieveByNameParams::CountryGl::OrSymbol,
|
|
79
89
|
force_language:
|
|
80
90
|
ContextDev::BrandRetrieveByNameParams::ForceLanguage::OrSymbol,
|
|
91
|
+
max_age_ms: Integer,
|
|
81
92
|
max_speed: T::Boolean,
|
|
82
93
|
timeout_ms: Integer,
|
|
83
94
|
request_options: ContextDev::RequestOptions::OrHash
|
|
@@ -92,6 +103,11 @@ module ContextDev
|
|
|
92
103
|
country_gl: nil,
|
|
93
104
|
# Optional parameter to force the language of the retrieved brand data.
|
|
94
105
|
force_language: nil,
|
|
106
|
+
# Maximum age in milliseconds for cached brand data before the API performs a hard
|
|
107
|
+
# refresh. Defaults to 3 months (7776000000 ms). Values below 1 day (86400000 ms)
|
|
108
|
+
# are clamped to 1 day; values above 1 year (31536000000 ms) are clamped to 1
|
|
109
|
+
# year.
|
|
110
|
+
max_age_ms: nil,
|
|
95
111
|
# Optional parameter to optimize the API call for maximum speed. When set to true,
|
|
96
112
|
# the API will skip time-consuming operations for faster response at the cost of
|
|
97
113
|
# less comprehensive data.
|
|
@@ -112,6 +128,7 @@ module ContextDev
|
|
|
112
128
|
ContextDev::BrandRetrieveByNameParams::CountryGl::OrSymbol,
|
|
113
129
|
force_language:
|
|
114
130
|
ContextDev::BrandRetrieveByNameParams::ForceLanguage::OrSymbol,
|
|
131
|
+
max_age_ms: Integer,
|
|
115
132
|
max_speed: T::Boolean,
|
|
116
133
|
timeout_ms: Integer,
|
|
117
134
|
request_options: ContextDev::RequestOptions
|
|
@@ -37,6 +37,16 @@ module ContextDev
|
|
|
37
37
|
end
|
|
38
38
|
attr_writer :force_language
|
|
39
39
|
|
|
40
|
+
# Maximum age in milliseconds for cached brand data before the API performs a hard
|
|
41
|
+
# refresh. Defaults to 3 months (7776000000 ms). Values below 1 day (86400000 ms)
|
|
42
|
+
# are clamped to 1 day; values above 1 year (31536000000 ms) are clamped to 1
|
|
43
|
+
# year.
|
|
44
|
+
sig { returns(T.nilable(Integer)) }
|
|
45
|
+
attr_reader :max_age_ms
|
|
46
|
+
|
|
47
|
+
sig { params(max_age_ms: Integer).void }
|
|
48
|
+
attr_writer :max_age_ms
|
|
49
|
+
|
|
40
50
|
# Optional parameter to optimize the API call for maximum speed. When set to true,
|
|
41
51
|
# the API will skip time-consuming operations for faster response at the cost of
|
|
42
52
|
# less comprehensive data.
|
|
@@ -78,6 +88,7 @@ module ContextDev
|
|
|
78
88
|
ticker: String,
|
|
79
89
|
force_language:
|
|
80
90
|
ContextDev::BrandRetrieveByTickerParams::ForceLanguage::OrSymbol,
|
|
91
|
+
max_age_ms: Integer,
|
|
81
92
|
max_speed: T::Boolean,
|
|
82
93
|
ticker_exchange:
|
|
83
94
|
ContextDev::BrandRetrieveByTickerParams::TickerExchange::OrSymbol,
|
|
@@ -91,6 +102,11 @@ module ContextDev
|
|
|
91
102
|
ticker:,
|
|
92
103
|
# Optional parameter to force the language of the retrieved brand data.
|
|
93
104
|
force_language: nil,
|
|
105
|
+
# Maximum age in milliseconds for cached brand data before the API performs a hard
|
|
106
|
+
# refresh. Defaults to 3 months (7776000000 ms). Values below 1 day (86400000 ms)
|
|
107
|
+
# are clamped to 1 day; values above 1 year (31536000000 ms) are clamped to 1
|
|
108
|
+
# year.
|
|
109
|
+
max_age_ms: nil,
|
|
94
110
|
# Optional parameter to optimize the API call for maximum speed. When set to true,
|
|
95
111
|
# the API will skip time-consuming operations for faster response at the cost of
|
|
96
112
|
# less comprehensive data.
|
|
@@ -111,6 +127,7 @@ module ContextDev
|
|
|
111
127
|
ticker: String,
|
|
112
128
|
force_language:
|
|
113
129
|
ContextDev::BrandRetrieveByTickerParams::ForceLanguage::OrSymbol,
|
|
130
|
+
max_age_ms: Integer,
|
|
114
131
|
max_speed: T::Boolean,
|
|
115
132
|
ticker_exchange:
|
|
116
133
|
ContextDev::BrandRetrieveByTickerParams::TickerExchange::OrSymbol,
|
|
@@ -32,6 +32,16 @@ module ContextDev
|
|
|
32
32
|
end
|
|
33
33
|
attr_writer :force_language
|
|
34
34
|
|
|
35
|
+
# Maximum age in milliseconds for cached brand data before the API performs a hard
|
|
36
|
+
# refresh. Defaults to 3 months (7776000000 ms). Values below 1 day (86400000 ms)
|
|
37
|
+
# are clamped to 1 day; values above 1 year (31536000000 ms) are clamped to 1
|
|
38
|
+
# year.
|
|
39
|
+
sig { returns(T.nilable(Integer)) }
|
|
40
|
+
attr_reader :max_age_ms
|
|
41
|
+
|
|
42
|
+
sig { params(max_age_ms: Integer).void }
|
|
43
|
+
attr_writer :max_age_ms
|
|
44
|
+
|
|
35
45
|
# Optional parameter to optimize the API call for maximum speed. When set to true,
|
|
36
46
|
# the API will skip time-consuming operations for faster response at the cost of
|
|
37
47
|
# less comprehensive data. Works with all three lookup methods.
|
|
@@ -55,6 +65,7 @@ module ContextDev
|
|
|
55
65
|
domain: String,
|
|
56
66
|
force_language:
|
|
57
67
|
ContextDev::BrandRetrieveParams::ForceLanguage::OrSymbol,
|
|
68
|
+
max_age_ms: Integer,
|
|
58
69
|
max_speed: T::Boolean,
|
|
59
70
|
timeout_ms: Integer,
|
|
60
71
|
request_options: ContextDev::RequestOptions::OrHash
|
|
@@ -66,6 +77,11 @@ module ContextDev
|
|
|
66
77
|
domain:,
|
|
67
78
|
# Optional parameter to force the language of the retrieved brand data.
|
|
68
79
|
force_language: nil,
|
|
80
|
+
# Maximum age in milliseconds for cached brand data before the API performs a hard
|
|
81
|
+
# refresh. Defaults to 3 months (7776000000 ms). Values below 1 day (86400000 ms)
|
|
82
|
+
# are clamped to 1 day; values above 1 year (31536000000 ms) are clamped to 1
|
|
83
|
+
# year.
|
|
84
|
+
max_age_ms: nil,
|
|
69
85
|
# Optional parameter to optimize the API call for maximum speed. When set to true,
|
|
70
86
|
# the API will skip time-consuming operations for faster response at the cost of
|
|
71
87
|
# less comprehensive data. Works with all three lookup methods.
|
|
@@ -84,6 +100,7 @@ module ContextDev
|
|
|
84
100
|
domain: String,
|
|
85
101
|
force_language:
|
|
86
102
|
ContextDev::BrandRetrieveParams::ForceLanguage::OrSymbol,
|
|
103
|
+
max_age_ms: Integer,
|
|
87
104
|
max_speed: T::Boolean,
|
|
88
105
|
timeout_ms: Integer,
|
|
89
106
|
request_options: ContextDev::RequestOptions
|
|
@@ -18,6 +18,16 @@ module ContextDev
|
|
|
18
18
|
sig { returns(String) }
|
|
19
19
|
attr_accessor :domain
|
|
20
20
|
|
|
21
|
+
# Maximum age in milliseconds for cached brand data before the API performs a hard
|
|
22
|
+
# refresh. Defaults to 3 months (7776000000 ms). Values below 1 day (86400000 ms)
|
|
23
|
+
# are clamped to 1 day; values above 1 year (31536000000 ms) are clamped to 1
|
|
24
|
+
# year.
|
|
25
|
+
sig { returns(T.nilable(Integer)) }
|
|
26
|
+
attr_reader :max_age_ms
|
|
27
|
+
|
|
28
|
+
sig { params(max_age_ms: Integer).void }
|
|
29
|
+
attr_writer :max_age_ms
|
|
30
|
+
|
|
21
31
|
# Optional timeout in milliseconds for the request. If the request takes longer
|
|
22
32
|
# than this value, it will be aborted with a 408 status code. Maximum allowed
|
|
23
33
|
# value is 300000ms (5 minutes).
|
|
@@ -30,6 +40,7 @@ module ContextDev
|
|
|
30
40
|
sig do
|
|
31
41
|
params(
|
|
32
42
|
domain: String,
|
|
43
|
+
max_age_ms: Integer,
|
|
33
44
|
timeout_ms: Integer,
|
|
34
45
|
request_options: ContextDev::RequestOptions::OrHash
|
|
35
46
|
).returns(T.attached_class)
|
|
@@ -37,6 +48,11 @@ module ContextDev
|
|
|
37
48
|
def self.new(
|
|
38
49
|
# Domain name to retrieve simplified brand data for
|
|
39
50
|
domain:,
|
|
51
|
+
# Maximum age in milliseconds for cached brand data before the API performs a hard
|
|
52
|
+
# refresh. Defaults to 3 months (7776000000 ms). Values below 1 day (86400000 ms)
|
|
53
|
+
# are clamped to 1 day; values above 1 year (31536000000 ms) are clamped to 1
|
|
54
|
+
# year.
|
|
55
|
+
max_age_ms: nil,
|
|
40
56
|
# Optional timeout in milliseconds for the request. If the request takes longer
|
|
41
57
|
# than this value, it will be aborted with a 408 status code. Maximum allowed
|
|
42
58
|
# value is 300000ms (5 minutes).
|
|
@@ -49,6 +65,7 @@ module ContextDev
|
|
|
49
65
|
override.returns(
|
|
50
66
|
{
|
|
51
67
|
domain: String,
|
|
68
|
+
max_age_ms: Integer,
|
|
52
69
|
timeout_ms: Integer,
|
|
53
70
|
request_options: ContextDev::RequestOptions
|
|
54
71
|
}
|
|
@@ -47,6 +47,15 @@ module ContextDev
|
|
|
47
47
|
end
|
|
48
48
|
attr_writer :full_screenshot
|
|
49
49
|
|
|
50
|
+
# Return a cached screenshot if a prior screenshot for the same parameters exists
|
|
51
|
+
# and is younger than this many milliseconds. Defaults to 1 day (86400000 ms) when
|
|
52
|
+
# omitted. Max is 30 days (2592000000 ms). Set to 0 to always capture fresh.
|
|
53
|
+
sig { returns(T.nilable(Integer)) }
|
|
54
|
+
attr_reader :max_age_ms
|
|
55
|
+
|
|
56
|
+
sig { params(max_age_ms: Integer).void }
|
|
57
|
+
attr_writer :max_age_ms
|
|
58
|
+
|
|
50
59
|
# Optional parameter to specify which page type to screenshot. If provided, the
|
|
51
60
|
# system will scrape the domain's links and use heuristics to find the most
|
|
52
61
|
# appropriate URL for the specified page type (30 supported languages). If not
|
|
@@ -77,14 +86,25 @@ module ContextDev
|
|
|
77
86
|
end
|
|
78
87
|
attr_writer :prioritize
|
|
79
88
|
|
|
89
|
+
# Optional browser viewport dimensions for the screenshot. Defaults to 1920x1080.
|
|
90
|
+
sig { returns(T.nilable(ContextDev::WebScreenshotParams::Viewport)) }
|
|
91
|
+
attr_reader :viewport
|
|
92
|
+
|
|
93
|
+
sig do
|
|
94
|
+
params(viewport: ContextDev::WebScreenshotParams::Viewport::OrHash).void
|
|
95
|
+
end
|
|
96
|
+
attr_writer :viewport
|
|
97
|
+
|
|
80
98
|
sig do
|
|
81
99
|
params(
|
|
82
100
|
direct_url: String,
|
|
83
101
|
domain: String,
|
|
84
102
|
full_screenshot:
|
|
85
103
|
ContextDev::WebScreenshotParams::FullScreenshot::OrSymbol,
|
|
104
|
+
max_age_ms: Integer,
|
|
86
105
|
page: ContextDev::WebScreenshotParams::Page::OrSymbol,
|
|
87
106
|
prioritize: ContextDev::WebScreenshotParams::Prioritize::OrSymbol,
|
|
107
|
+
viewport: ContextDev::WebScreenshotParams::Viewport::OrHash,
|
|
88
108
|
request_options: ContextDev::RequestOptions::OrHash
|
|
89
109
|
).returns(T.attached_class)
|
|
90
110
|
end
|
|
@@ -101,6 +121,10 @@ module ContextDev
|
|
|
101
121
|
# screenshot capturing all content. If 'false' or not provided, takes a viewport
|
|
102
122
|
# screenshot (standard browser view).
|
|
103
123
|
full_screenshot: nil,
|
|
124
|
+
# Return a cached screenshot if a prior screenshot for the same parameters exists
|
|
125
|
+
# and is younger than this many milliseconds. Defaults to 1 day (86400000 ms) when
|
|
126
|
+
# omitted. Max is 30 days (2592000000 ms). Set to 0 to always capture fresh.
|
|
127
|
+
max_age_ms: nil,
|
|
104
128
|
# Optional parameter to specify which page type to screenshot. If provided, the
|
|
105
129
|
# system will scrape the domain's links and use heuristics to find the most
|
|
106
130
|
# appropriate URL for the specified page type (30 supported languages). If not
|
|
@@ -111,6 +135,8 @@ module ContextDev
|
|
|
111
135
|
# faster capture with basic quality. If 'quality', optimizes for higher quality
|
|
112
136
|
# with longer wait times. Defaults to 'quality' if not provided.
|
|
113
137
|
prioritize: nil,
|
|
138
|
+
# Optional browser viewport dimensions for the screenshot. Defaults to 1920x1080.
|
|
139
|
+
viewport: nil,
|
|
114
140
|
request_options: {}
|
|
115
141
|
)
|
|
116
142
|
end
|
|
@@ -122,8 +148,10 @@ module ContextDev
|
|
|
122
148
|
domain: String,
|
|
123
149
|
full_screenshot:
|
|
124
150
|
ContextDev::WebScreenshotParams::FullScreenshot::OrSymbol,
|
|
151
|
+
max_age_ms: Integer,
|
|
125
152
|
page: ContextDev::WebScreenshotParams::Page::OrSymbol,
|
|
126
153
|
prioritize: ContextDev::WebScreenshotParams::Prioritize::OrSymbol,
|
|
154
|
+
viewport: ContextDev::WebScreenshotParams::Viewport,
|
|
127
155
|
request_options: ContextDev::RequestOptions
|
|
128
156
|
}
|
|
129
157
|
)
|
|
@@ -233,6 +261,46 @@ module ContextDev
|
|
|
233
261
|
def self.values
|
|
234
262
|
end
|
|
235
263
|
end
|
|
264
|
+
|
|
265
|
+
class Viewport < ContextDev::Internal::Type::BaseModel
|
|
266
|
+
OrHash =
|
|
267
|
+
T.type_alias do
|
|
268
|
+
T.any(
|
|
269
|
+
ContextDev::WebScreenshotParams::Viewport,
|
|
270
|
+
ContextDev::Internal::AnyHash
|
|
271
|
+
)
|
|
272
|
+
end
|
|
273
|
+
|
|
274
|
+
# Viewport height in pixels.
|
|
275
|
+
sig { returns(T.nilable(Integer)) }
|
|
276
|
+
attr_reader :height
|
|
277
|
+
|
|
278
|
+
sig { params(height: Integer).void }
|
|
279
|
+
attr_writer :height
|
|
280
|
+
|
|
281
|
+
# Viewport width in pixels.
|
|
282
|
+
sig { returns(T.nilable(Integer)) }
|
|
283
|
+
attr_reader :width
|
|
284
|
+
|
|
285
|
+
sig { params(width: Integer).void }
|
|
286
|
+
attr_writer :width
|
|
287
|
+
|
|
288
|
+
# Optional browser viewport dimensions for the screenshot. Defaults to 1920x1080.
|
|
289
|
+
sig do
|
|
290
|
+
params(height: Integer, width: Integer).returns(T.attached_class)
|
|
291
|
+
end
|
|
292
|
+
def self.new(
|
|
293
|
+
# Viewport height in pixels.
|
|
294
|
+
height: nil,
|
|
295
|
+
# Viewport width in pixels.
|
|
296
|
+
width: nil
|
|
297
|
+
)
|
|
298
|
+
end
|
|
299
|
+
|
|
300
|
+
sig { override.returns({ height: Integer, width: Integer }) }
|
|
301
|
+
def to_hash
|
|
302
|
+
end
|
|
303
|
+
end
|
|
236
304
|
end
|
|
237
305
|
end
|
|
238
306
|
end
|
|
@@ -25,6 +25,13 @@ module ContextDev
|
|
|
25
25
|
sig { params(domain: String).void }
|
|
26
26
|
attr_writer :domain
|
|
27
27
|
|
|
28
|
+
# Height in pixels of the returned screenshot image
|
|
29
|
+
sig { returns(T.nilable(Integer)) }
|
|
30
|
+
attr_reader :height
|
|
31
|
+
|
|
32
|
+
sig { params(height: Integer).void }
|
|
33
|
+
attr_writer :height
|
|
34
|
+
|
|
28
35
|
# Public URL of the uploaded screenshot image
|
|
29
36
|
sig { returns(T.nilable(String)) }
|
|
30
37
|
attr_reader :screenshot
|
|
@@ -57,14 +64,23 @@ module ContextDev
|
|
|
57
64
|
sig { params(status: String).void }
|
|
58
65
|
attr_writer :status
|
|
59
66
|
|
|
67
|
+
# Width in pixels of the returned screenshot image
|
|
68
|
+
sig { returns(T.nilable(Integer)) }
|
|
69
|
+
attr_reader :width
|
|
70
|
+
|
|
71
|
+
sig { params(width: Integer).void }
|
|
72
|
+
attr_writer :width
|
|
73
|
+
|
|
60
74
|
sig do
|
|
61
75
|
params(
|
|
62
76
|
code: Integer,
|
|
63
77
|
domain: String,
|
|
78
|
+
height: Integer,
|
|
64
79
|
screenshot: String,
|
|
65
80
|
screenshot_type:
|
|
66
81
|
ContextDev::Models::WebScreenshotResponse::ScreenshotType::OrSymbol,
|
|
67
|
-
status: String
|
|
82
|
+
status: String,
|
|
83
|
+
width: Integer
|
|
68
84
|
).returns(T.attached_class)
|
|
69
85
|
end
|
|
70
86
|
def self.new(
|
|
@@ -72,12 +88,16 @@ module ContextDev
|
|
|
72
88
|
code: nil,
|
|
73
89
|
# The normalized domain that was processed
|
|
74
90
|
domain: nil,
|
|
91
|
+
# Height in pixels of the returned screenshot image
|
|
92
|
+
height: nil,
|
|
75
93
|
# Public URL of the uploaded screenshot image
|
|
76
94
|
screenshot: nil,
|
|
77
95
|
# Type of screenshot that was captured
|
|
78
96
|
screenshot_type: nil,
|
|
79
97
|
# Status of the response, e.g., 'ok'
|
|
80
|
-
status: nil
|
|
98
|
+
status: nil,
|
|
99
|
+
# Width in pixels of the returned screenshot image
|
|
100
|
+
width: nil
|
|
81
101
|
)
|
|
82
102
|
end
|
|
83
103
|
|
|
@@ -86,10 +106,12 @@ module ContextDev
|
|
|
86
106
|
{
|
|
87
107
|
code: Integer,
|
|
88
108
|
domain: String,
|
|
109
|
+
height: Integer,
|
|
89
110
|
screenshot: String,
|
|
90
111
|
screenshot_type:
|
|
91
112
|
ContextDev::Models::WebScreenshotResponse::ScreenshotType::TaggedSymbol,
|
|
92
|
-
status: String
|
|
113
|
+
status: String,
|
|
114
|
+
width: Integer
|
|
93
115
|
}
|
|
94
116
|
)
|
|
95
117
|
end
|
|
@@ -98,7 +98,7 @@ module ContextDev
|
|
|
98
98
|
sig { params(hosted_url: T::Boolean).void }
|
|
99
99
|
attr_writer :hosted_url
|
|
100
100
|
|
|
101
|
-
# Per-image enrichment timeout in milliseconds. Default:
|
|
101
|
+
# Per-image enrichment timeout in milliseconds. Default: 30000. Maximum: 60000.
|
|
102
102
|
sig { returns(T.nilable(Integer)) }
|
|
103
103
|
attr_reader :max_time_per_ms
|
|
104
104
|
|
|
@@ -128,7 +128,7 @@ module ContextDev
|
|
|
128
128
|
# Host materializable images on the Brand.dev CDN and return their URL and MIME
|
|
129
129
|
# type.
|
|
130
130
|
hosted_url: nil,
|
|
131
|
-
# Per-image enrichment timeout in milliseconds. Default:
|
|
131
|
+
# Per-image enrichment timeout in milliseconds. Default: 30000. Maximum: 60000.
|
|
132
132
|
max_time_per_ms: nil,
|
|
133
133
|
# Measure image width and height when possible.
|
|
134
134
|
resolution: nil
|
|
@@ -10,6 +10,7 @@ module ContextDev
|
|
|
10
10
|
domain: String,
|
|
11
11
|
force_language:
|
|
12
12
|
ContextDev::BrandRetrieveParams::ForceLanguage::OrSymbol,
|
|
13
|
+
max_age_ms: Integer,
|
|
13
14
|
max_speed: T::Boolean,
|
|
14
15
|
timeout_ms: Integer,
|
|
15
16
|
request_options: ContextDev::RequestOptions::OrHash
|
|
@@ -21,6 +22,11 @@ module ContextDev
|
|
|
21
22
|
domain:,
|
|
22
23
|
# Optional parameter to force the language of the retrieved brand data.
|
|
23
24
|
force_language: nil,
|
|
25
|
+
# Maximum age in milliseconds for cached brand data before the API performs a hard
|
|
26
|
+
# refresh. Defaults to 3 months (7776000000 ms). Values below 1 day (86400000 ms)
|
|
27
|
+
# are clamped to 1 day; values above 1 year (31536000000 ms) are clamped to 1
|
|
28
|
+
# year.
|
|
29
|
+
max_age_ms: nil,
|
|
24
30
|
# Optional parameter to optimize the API call for maximum speed. When set to true,
|
|
25
31
|
# the API will skip time-consuming operations for faster response at the cost of
|
|
26
32
|
# less comprehensive data. Works with all three lookup methods.
|
|
@@ -89,6 +95,7 @@ module ContextDev
|
|
|
89
95
|
email: String,
|
|
90
96
|
force_language:
|
|
91
97
|
ContextDev::BrandRetrieveByEmailParams::ForceLanguage::OrSymbol,
|
|
98
|
+
max_age_ms: Integer,
|
|
92
99
|
max_speed: T::Boolean,
|
|
93
100
|
timeout_ms: Integer,
|
|
94
101
|
request_options: ContextDev::RequestOptions::OrHash
|
|
@@ -101,6 +108,11 @@ module ContextDev
|
|
|
101
108
|
email:,
|
|
102
109
|
# Optional parameter to force the language of the retrieved brand data.
|
|
103
110
|
force_language: nil,
|
|
111
|
+
# Maximum age in milliseconds for cached brand data before the API performs a hard
|
|
112
|
+
# refresh. Defaults to 3 months (7776000000 ms). Values below 1 day (86400000 ms)
|
|
113
|
+
# are clamped to 1 day; values above 1 year (31536000000 ms) are clamped to 1
|
|
114
|
+
# year.
|
|
115
|
+
max_age_ms: nil,
|
|
104
116
|
# Optional parameter to optimize the API call for maximum speed. When set to true,
|
|
105
117
|
# the API will skip time-consuming operations for faster response at the cost of
|
|
106
118
|
# less comprehensive data.
|
|
@@ -120,6 +132,7 @@ module ContextDev
|
|
|
120
132
|
isin: String,
|
|
121
133
|
force_language:
|
|
122
134
|
ContextDev::BrandRetrieveByIsinParams::ForceLanguage::OrSymbol,
|
|
135
|
+
max_age_ms: Integer,
|
|
123
136
|
max_speed: T::Boolean,
|
|
124
137
|
timeout_ms: Integer,
|
|
125
138
|
request_options: ContextDev::RequestOptions::OrHash
|
|
@@ -132,6 +145,11 @@ module ContextDev
|
|
|
132
145
|
isin:,
|
|
133
146
|
# Optional parameter to force the language of the retrieved brand data.
|
|
134
147
|
force_language: nil,
|
|
148
|
+
# Maximum age in milliseconds for cached brand data before the API performs a hard
|
|
149
|
+
# refresh. Defaults to 3 months (7776000000 ms). Values below 1 day (86400000 ms)
|
|
150
|
+
# are clamped to 1 day; values above 1 year (31536000000 ms) are clamped to 1
|
|
151
|
+
# year.
|
|
152
|
+
max_age_ms: nil,
|
|
135
153
|
# Optional parameter to optimize the API call for maximum speed. When set to true,
|
|
136
154
|
# the API will skip time-consuming operations for faster response at the cost of
|
|
137
155
|
# less comprehensive data.
|
|
@@ -152,6 +170,7 @@ module ContextDev
|
|
|
152
170
|
ContextDev::BrandRetrieveByNameParams::CountryGl::OrSymbol,
|
|
153
171
|
force_language:
|
|
154
172
|
ContextDev::BrandRetrieveByNameParams::ForceLanguage::OrSymbol,
|
|
173
|
+
max_age_ms: Integer,
|
|
155
174
|
max_speed: T::Boolean,
|
|
156
175
|
timeout_ms: Integer,
|
|
157
176
|
request_options: ContextDev::RequestOptions::OrHash
|
|
@@ -166,6 +185,11 @@ module ContextDev
|
|
|
166
185
|
country_gl: nil,
|
|
167
186
|
# Optional parameter to force the language of the retrieved brand data.
|
|
168
187
|
force_language: nil,
|
|
188
|
+
# Maximum age in milliseconds for cached brand data before the API performs a hard
|
|
189
|
+
# refresh. Defaults to 3 months (7776000000 ms). Values below 1 day (86400000 ms)
|
|
190
|
+
# are clamped to 1 day; values above 1 year (31536000000 ms) are clamped to 1
|
|
191
|
+
# year.
|
|
192
|
+
max_age_ms: nil,
|
|
169
193
|
# Optional parameter to optimize the API call for maximum speed. When set to true,
|
|
170
194
|
# the API will skip time-consuming operations for faster response at the cost of
|
|
171
195
|
# less comprehensive data.
|
|
@@ -184,6 +208,7 @@ module ContextDev
|
|
|
184
208
|
ticker: String,
|
|
185
209
|
force_language:
|
|
186
210
|
ContextDev::BrandRetrieveByTickerParams::ForceLanguage::OrSymbol,
|
|
211
|
+
max_age_ms: Integer,
|
|
187
212
|
max_speed: T::Boolean,
|
|
188
213
|
ticker_exchange:
|
|
189
214
|
ContextDev::BrandRetrieveByTickerParams::TickerExchange::OrSymbol,
|
|
@@ -197,6 +222,11 @@ module ContextDev
|
|
|
197
222
|
ticker:,
|
|
198
223
|
# Optional parameter to force the language of the retrieved brand data.
|
|
199
224
|
force_language: nil,
|
|
225
|
+
# Maximum age in milliseconds for cached brand data before the API performs a hard
|
|
226
|
+
# refresh. Defaults to 3 months (7776000000 ms). Values below 1 day (86400000 ms)
|
|
227
|
+
# are clamped to 1 day; values above 1 year (31536000000 ms) are clamped to 1
|
|
228
|
+
# year.
|
|
229
|
+
max_age_ms: nil,
|
|
200
230
|
# Optional parameter to optimize the API call for maximum speed. When set to true,
|
|
201
231
|
# the API will skip time-consuming operations for faster response at the cost of
|
|
202
232
|
# less comprehensive data.
|
|
@@ -217,6 +247,7 @@ module ContextDev
|
|
|
217
247
|
sig do
|
|
218
248
|
params(
|
|
219
249
|
domain: String,
|
|
250
|
+
max_age_ms: Integer,
|
|
220
251
|
timeout_ms: Integer,
|
|
221
252
|
request_options: ContextDev::RequestOptions::OrHash
|
|
222
253
|
).returns(ContextDev::Models::BrandRetrieveSimplifiedResponse)
|
|
@@ -224,6 +255,11 @@ module ContextDev
|
|
|
224
255
|
def retrieve_simplified(
|
|
225
256
|
# Domain name to retrieve simplified brand data for
|
|
226
257
|
domain:,
|
|
258
|
+
# Maximum age in milliseconds for cached brand data before the API performs a hard
|
|
259
|
+
# refresh. Defaults to 3 months (7776000000 ms). Values below 1 day (86400000 ms)
|
|
260
|
+
# are clamped to 1 day; values above 1 year (31536000000 ms) are clamped to 1
|
|
261
|
+
# year.
|
|
262
|
+
max_age_ms: nil,
|
|
227
263
|
# Optional timeout in milliseconds for the request. If the request takes longer
|
|
228
264
|
# than this value, it will be aborted with a 408 status code. Maximum allowed
|
|
229
265
|
# value is 300000ms (5 minutes).
|
|
@@ -65,8 +65,10 @@ module ContextDev
|
|
|
65
65
|
domain: String,
|
|
66
66
|
full_screenshot:
|
|
67
67
|
ContextDev::WebScreenshotParams::FullScreenshot::OrSymbol,
|
|
68
|
+
max_age_ms: Integer,
|
|
68
69
|
page: ContextDev::WebScreenshotParams::Page::OrSymbol,
|
|
69
70
|
prioritize: ContextDev::WebScreenshotParams::Prioritize::OrSymbol,
|
|
71
|
+
viewport: ContextDev::WebScreenshotParams::Viewport::OrHash,
|
|
70
72
|
request_options: ContextDev::RequestOptions::OrHash
|
|
71
73
|
).returns(ContextDev::Models::WebScreenshotResponse)
|
|
72
74
|
end
|
|
@@ -83,6 +85,10 @@ module ContextDev
|
|
|
83
85
|
# screenshot capturing all content. If 'false' or not provided, takes a viewport
|
|
84
86
|
# screenshot (standard browser view).
|
|
85
87
|
full_screenshot: nil,
|
|
88
|
+
# Return a cached screenshot if a prior screenshot for the same parameters exists
|
|
89
|
+
# and is younger than this many milliseconds. Defaults to 1 day (86400000 ms) when
|
|
90
|
+
# omitted. Max is 30 days (2592000000 ms). Set to 0 to always capture fresh.
|
|
91
|
+
max_age_ms: nil,
|
|
86
92
|
# Optional parameter to specify which page type to screenshot. If provided, the
|
|
87
93
|
# system will scrape the domain's links and use heuristics to find the most
|
|
88
94
|
# appropriate URL for the specified page type (30 supported languages). If not
|
|
@@ -93,6 +99,8 @@ module ContextDev
|
|
|
93
99
|
# faster capture with basic quality. If 'quality', optimizes for higher quality
|
|
94
100
|
# with longer wait times. Defaults to 'quality' if not provided.
|
|
95
101
|
prioritize: nil,
|
|
102
|
+
# Optional browser viewport dimensions for the screenshot. Defaults to 1920x1080.
|
|
103
|
+
viewport: nil,
|
|
96
104
|
request_options: {}
|
|
97
105
|
)
|
|
98
106
|
end
|
|
@@ -4,6 +4,7 @@ module ContextDev
|
|
|
4
4
|
{
|
|
5
5
|
email: String,
|
|
6
6
|
force_language: ContextDev::Models::BrandRetrieveByEmailParams::force_language,
|
|
7
|
+
max_age_ms: Integer,
|
|
7
8
|
max_speed: bool,
|
|
8
9
|
timeout_ms: Integer
|
|
9
10
|
}
|
|
@@ -21,6 +22,10 @@ module ContextDev
|
|
|
21
22
|
ContextDev::Models::BrandRetrieveByEmailParams::force_language
|
|
22
23
|
) -> ContextDev::Models::BrandRetrieveByEmailParams::force_language
|
|
23
24
|
|
|
25
|
+
attr_reader max_age_ms: Integer?
|
|
26
|
+
|
|
27
|
+
def max_age_ms=: (Integer) -> Integer
|
|
28
|
+
|
|
24
29
|
attr_reader max_speed: bool?
|
|
25
30
|
|
|
26
31
|
def max_speed=: (bool) -> bool
|
|
@@ -32,6 +37,7 @@ module ContextDev
|
|
|
32
37
|
def initialize: (
|
|
33
38
|
email: String,
|
|
34
39
|
?force_language: ContextDev::Models::BrandRetrieveByEmailParams::force_language,
|
|
40
|
+
?max_age_ms: Integer,
|
|
35
41
|
?max_speed: bool,
|
|
36
42
|
?timeout_ms: Integer,
|
|
37
43
|
?request_options: ContextDev::request_opts
|
|
@@ -40,6 +46,7 @@ module ContextDev
|
|
|
40
46
|
def to_hash: -> {
|
|
41
47
|
email: String,
|
|
42
48
|
force_language: ContextDev::Models::BrandRetrieveByEmailParams::force_language,
|
|
49
|
+
max_age_ms: Integer,
|
|
43
50
|
max_speed: bool,
|
|
44
51
|
timeout_ms: Integer,
|
|
45
52
|
request_options: ContextDev::RequestOptions
|
|
@@ -4,6 +4,7 @@ module ContextDev
|
|
|
4
4
|
{
|
|
5
5
|
isin: String,
|
|
6
6
|
force_language: ContextDev::Models::BrandRetrieveByIsinParams::force_language,
|
|
7
|
+
max_age_ms: Integer,
|
|
7
8
|
max_speed: bool,
|
|
8
9
|
timeout_ms: Integer
|
|
9
10
|
}
|
|
@@ -21,6 +22,10 @@ module ContextDev
|
|
|
21
22
|
ContextDev::Models::BrandRetrieveByIsinParams::force_language
|
|
22
23
|
) -> ContextDev::Models::BrandRetrieveByIsinParams::force_language
|
|
23
24
|
|
|
25
|
+
attr_reader max_age_ms: Integer?
|
|
26
|
+
|
|
27
|
+
def max_age_ms=: (Integer) -> Integer
|
|
28
|
+
|
|
24
29
|
attr_reader max_speed: bool?
|
|
25
30
|
|
|
26
31
|
def max_speed=: (bool) -> bool
|
|
@@ -32,6 +37,7 @@ module ContextDev
|
|
|
32
37
|
def initialize: (
|
|
33
38
|
isin: String,
|
|
34
39
|
?force_language: ContextDev::Models::BrandRetrieveByIsinParams::force_language,
|
|
40
|
+
?max_age_ms: Integer,
|
|
35
41
|
?max_speed: bool,
|
|
36
42
|
?timeout_ms: Integer,
|
|
37
43
|
?request_options: ContextDev::request_opts
|
|
@@ -40,6 +46,7 @@ module ContextDev
|
|
|
40
46
|
def to_hash: -> {
|
|
41
47
|
isin: String,
|
|
42
48
|
force_language: ContextDev::Models::BrandRetrieveByIsinParams::force_language,
|
|
49
|
+
max_age_ms: Integer,
|
|
43
50
|
max_speed: bool,
|
|
44
51
|
timeout_ms: Integer,
|
|
45
52
|
request_options: ContextDev::RequestOptions
|
|
@@ -5,6 +5,7 @@ module ContextDev
|
|
|
5
5
|
name: String,
|
|
6
6
|
country_gl: ContextDev::Models::BrandRetrieveByNameParams::country_gl,
|
|
7
7
|
force_language: ContextDev::Models::BrandRetrieveByNameParams::force_language,
|
|
8
|
+
max_age_ms: Integer,
|
|
8
9
|
max_speed: bool,
|
|
9
10
|
timeout_ms: Integer
|
|
10
11
|
}
|
|
@@ -28,6 +29,10 @@ module ContextDev
|
|
|
28
29
|
ContextDev::Models::BrandRetrieveByNameParams::force_language
|
|
29
30
|
) -> ContextDev::Models::BrandRetrieveByNameParams::force_language
|
|
30
31
|
|
|
32
|
+
attr_reader max_age_ms: Integer?
|
|
33
|
+
|
|
34
|
+
def max_age_ms=: (Integer) -> Integer
|
|
35
|
+
|
|
31
36
|
attr_reader max_speed: bool?
|
|
32
37
|
|
|
33
38
|
def max_speed=: (bool) -> bool
|
|
@@ -40,6 +45,7 @@ module ContextDev
|
|
|
40
45
|
name: String,
|
|
41
46
|
?country_gl: ContextDev::Models::BrandRetrieveByNameParams::country_gl,
|
|
42
47
|
?force_language: ContextDev::Models::BrandRetrieveByNameParams::force_language,
|
|
48
|
+
?max_age_ms: Integer,
|
|
43
49
|
?max_speed: bool,
|
|
44
50
|
?timeout_ms: Integer,
|
|
45
51
|
?request_options: ContextDev::request_opts
|
|
@@ -49,6 +55,7 @@ module ContextDev
|
|
|
49
55
|
name: String,
|
|
50
56
|
country_gl: ContextDev::Models::BrandRetrieveByNameParams::country_gl,
|
|
51
57
|
force_language: ContextDev::Models::BrandRetrieveByNameParams::force_language,
|
|
58
|
+
max_age_ms: Integer,
|
|
52
59
|
max_speed: bool,
|
|
53
60
|
timeout_ms: Integer,
|
|
54
61
|
request_options: ContextDev::RequestOptions
|