context.dev 1.36.0 → 2.1.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 +35 -0
- data/README.md +16 -9
- data/lib/context_dev/client.rb +7 -0
- data/lib/context_dev/models/brand_retrieve_params.rb +1079 -174
- data/lib/context_dev/models/monitor_create_params.rb +364 -0
- data/lib/context_dev/models/monitor_create_response.rb +608 -0
- data/lib/context_dev/models/monitor_delete_params.rb +20 -0
- data/lib/context_dev/models/monitor_delete_response.rb +22 -0
- data/lib/context_dev/models/monitor_list_account_changes_params.rb +93 -0
- data/lib/context_dev/models/monitor_list_account_changes_response.rb +199 -0
- data/lib/context_dev/models/monitor_list_account_runs_params.rb +55 -0
- data/lib/context_dev/models/monitor_list_account_runs_response.rb +227 -0
- data/lib/context_dev/models/monitor_list_changes_params.rb +57 -0
- data/lib/context_dev/models/monitor_list_changes_response.rb +198 -0
- data/lib/context_dev/models/monitor_list_params.rb +161 -0
- data/lib/context_dev/models/monitor_list_response.rb +631 -0
- data/lib/context_dev/models/monitor_list_runs_params.rb +62 -0
- data/lib/context_dev/models/monitor_list_runs_response.rb +227 -0
- data/lib/context_dev/models/monitor_retrieve_change_params.rb +20 -0
- data/lib/context_dev/models/monitor_retrieve_change_response.rb +264 -0
- data/lib/context_dev/models/monitor_retrieve_params.rb +20 -0
- data/lib/context_dev/models/monitor_retrieve_response.rb +608 -0
- data/lib/context_dev/models/monitor_run_params.rb +20 -0
- data/lib/context_dev/models/monitor_run_response.rb +35 -0
- data/lib/context_dev/models/monitor_update_params.rb +371 -0
- data/lib/context_dev/models/monitor_update_response.rb +608 -0
- data/lib/context_dev/models/utility_prefetch_params.rb +70 -6
- data/lib/context_dev/models/utility_prefetch_response.rb +23 -1
- data/lib/context_dev/models/web_extract_response.rb +17 -1
- data/lib/context_dev/models/web_web_crawl_md_params.rb +11 -1
- data/lib/context_dev/models/web_web_scrape_html_params.rb +11 -1
- data/lib/context_dev/models/web_web_scrape_html_response.rb +10 -2
- data/lib/context_dev/models/web_web_scrape_images_params.rb +12 -1
- data/lib/context_dev/models/web_web_scrape_md_params.rb +11 -1
- data/lib/context_dev/models.rb +20 -12
- data/lib/context_dev/resources/ai.rb +0 -33
- data/lib/context_dev/resources/brand.rb +9 -204
- data/lib/context_dev/resources/monitors.rb +352 -0
- data/lib/context_dev/resources/utility.rb +9 -35
- data/lib/context_dev/resources/web.rb +14 -4
- data/lib/context_dev/version.rb +1 -1
- data/lib/context_dev.rb +23 -14
- data/rbi/context_dev/client.rbi +6 -0
- data/rbi/context_dev/models/brand_retrieve_params.rbi +3858 -678
- data/rbi/context_dev/models/monitor_create_params.rbi +641 -0
- data/rbi/context_dev/models/monitor_create_response.rbi +1020 -0
- data/rbi/context_dev/models/monitor_delete_params.rbi +35 -0
- data/rbi/context_dev/models/monitor_delete_response.rbi +29 -0
- data/rbi/context_dev/models/monitor_list_account_changes_params.rbi +211 -0
- data/rbi/context_dev/models/monitor_list_account_changes_response.rbi +376 -0
- data/rbi/context_dev/models/monitor_list_account_runs_params.rbi +125 -0
- data/rbi/context_dev/models/monitor_list_account_runs_response.rbi +464 -0
- data/rbi/context_dev/models/monitor_list_changes_params.rbi +91 -0
- data/rbi/context_dev/models/monitor_list_changes_response.rbi +372 -0
- data/rbi/context_dev/models/monitor_list_params.rbi +335 -0
- data/rbi/context_dev/models/monitor_list_response.rbi +1089 -0
- data/rbi/context_dev/models/monitor_list_runs_params.rbi +125 -0
- data/rbi/context_dev/models/monitor_list_runs_response.rbi +455 -0
- data/rbi/context_dev/models/monitor_retrieve_change_params.rbi +38 -0
- data/rbi/context_dev/models/monitor_retrieve_change_response.rbi +469 -0
- data/rbi/context_dev/models/monitor_retrieve_params.rbi +38 -0
- data/rbi/context_dev/models/monitor_retrieve_response.rbi +1028 -0
- data/rbi/context_dev/models/monitor_run_params.rbi +35 -0
- data/rbi/context_dev/models/monitor_run_response.rbi +48 -0
- data/rbi/context_dev/models/monitor_update_params.rbi +681 -0
- data/rbi/context_dev/models/monitor_update_response.rbi +1020 -0
- data/rbi/context_dev/models/utility_prefetch_params.rbi +129 -7
- data/rbi/context_dev/models/utility_prefetch_response.rbi +55 -3
- data/rbi/context_dev/models/web_extract_response.rbi +10 -0
- data/rbi/context_dev/models/web_web_crawl_md_params.rbi +15 -0
- data/rbi/context_dev/models/web_web_scrape_html_params.rbi +15 -0
- data/rbi/context_dev/models/web_web_scrape_html_response.rbi +29 -3
- data/rbi/context_dev/models/web_web_scrape_images_params.rbi +17 -0
- data/rbi/context_dev/models/web_web_scrape_md_params.rbi +15 -0
- data/rbi/context_dev/models.rbi +23 -15
- data/rbi/context_dev/resources/ai.rbi +0 -28
- data/rbi/context_dev/resources/brand.rbi +16 -228
- data/rbi/context_dev/resources/monitors.rbi +286 -0
- data/rbi/context_dev/resources/utility.rbi +14 -29
- data/rbi/context_dev/resources/web.rbi +21 -0
- data/sig/context_dev/client.rbs +2 -0
- data/sig/context_dev/models/brand_retrieve_params.rbs +1586 -281
- data/sig/context_dev/models/monitor_create_params.rbs +301 -0
- data/sig/context_dev/models/monitor_create_response.rbs +433 -0
- data/sig/context_dev/models/monitor_delete_params.rbs +23 -0
- data/sig/context_dev/models/monitor_delete_response.rbs +15 -0
- data/sig/context_dev/models/monitor_list_account_changes_params.rbs +104 -0
- data/sig/context_dev/models/monitor_list_account_changes_response.rbs +176 -0
- data/sig/context_dev/models/monitor_list_account_runs_params.rbs +58 -0
- data/sig/context_dev/models/monitor_list_account_runs_response.rbs +184 -0
- data/sig/context_dev/models/monitor_list_changes_params.rbs +61 -0
- data/sig/context_dev/models/monitor_list_changes_response.rbs +176 -0
- data/sig/context_dev/models/monitor_list_params.rbs +160 -0
- data/sig/context_dev/models/monitor_list_response.rbs +460 -0
- data/sig/context_dev/models/monitor_list_runs_params.rbs +63 -0
- data/sig/context_dev/models/monitor_list_runs_response.rbs +184 -0
- data/sig/context_dev/models/monitor_retrieve_change_params.rbs +23 -0
- data/sig/context_dev/models/monitor_retrieve_change_response.rbs +221 -0
- data/sig/context_dev/models/monitor_retrieve_params.rbs +23 -0
- data/sig/context_dev/models/monitor_retrieve_response.rbs +433 -0
- data/sig/context_dev/models/monitor_run_params.rbs +23 -0
- data/sig/context_dev/models/monitor_run_response.rbs +18 -0
- data/sig/context_dev/models/monitor_update_params.rbs +321 -0
- data/sig/context_dev/models/monitor_update_response.rbs +433 -0
- data/sig/context_dev/models/utility_prefetch_params.rbs +52 -4
- data/sig/context_dev/models/utility_prefetch_response.rbs +22 -3
- data/sig/context_dev/models/web_extract_response.rbs +5 -0
- data/sig/context_dev/models/web_web_crawl_md_params.rbs +7 -0
- data/sig/context_dev/models/web_web_scrape_html_params.rbs +7 -0
- data/sig/context_dev/models/web_web_scrape_html_response.rbs +8 -0
- data/sig/context_dev/models/web_web_scrape_images_params.rbs +7 -0
- data/sig/context_dev/models/web_web_scrape_md_params.rbs +7 -0
- data/sig/context_dev/models.rbs +20 -12
- data/sig/context_dev/resources/ai.rbs +0 -8
- data/sig/context_dev/resources/brand.rbs +1 -56
- data/sig/context_dev/resources/monitors.rbs +101 -0
- data/sig/context_dev/resources/utility.rbs +2 -7
- data/sig/context_dev/resources/web.rbs +4 -0
- metadata +71 -44
- data/lib/context_dev/models/ai_ai_query_params.rb +0 -235
- data/lib/context_dev/models/ai_ai_query_response.rb +0 -133
- data/lib/context_dev/models/brand_identify_from_transaction_params.rb +0 -474
- data/lib/context_dev/models/brand_identify_from_transaction_response.rb +0 -1074
- data/lib/context_dev/models/brand_retrieve_by_email_params.rb +0 -195
- data/lib/context_dev/models/brand_retrieve_by_email_response.rb +0 -1071
- data/lib/context_dev/models/brand_retrieve_by_isin_params.rb +0 -195
- data/lib/context_dev/models/brand_retrieve_by_isin_response.rb +0 -1070
- data/lib/context_dev/models/brand_retrieve_by_name_params.rb +0 -452
- data/lib/context_dev/models/brand_retrieve_by_name_response.rb +0 -1070
- data/lib/context_dev/models/brand_retrieve_by_ticker_params.rb +0 -283
- data/lib/context_dev/models/brand_retrieve_by_ticker_response.rb +0 -1072
- data/lib/context_dev/models/utility_prefetch_by_email_params.rb +0 -37
- data/lib/context_dev/models/utility_prefetch_by_email_response.rb +0 -68
- data/rbi/context_dev/models/ai_ai_query_params.rbi +0 -504
- data/rbi/context_dev/models/ai_ai_query_response.rbi +0 -267
- data/rbi/context_dev/models/brand_identify_from_transaction_params.rbi +0 -2020
- data/rbi/context_dev/models/brand_identify_from_transaction_response.rbi +0 -3515
- data/rbi/context_dev/models/brand_retrieve_by_email_params.rbi +0 -743
- data/rbi/context_dev/models/brand_retrieve_by_email_response.rbi +0 -3511
- data/rbi/context_dev/models/brand_retrieve_by_isin_params.rbi +0 -743
- data/rbi/context_dev/models/brand_retrieve_by_isin_response.rbi +0 -3510
- data/rbi/context_dev/models/brand_retrieve_by_name_params.rbi +0 -1982
- data/rbi/context_dev/models/brand_retrieve_by_name_response.rbi +0 -3510
- data/rbi/context_dev/models/brand_retrieve_by_ticker_params.rbi +0 -1153
- data/rbi/context_dev/models/brand_retrieve_by_ticker_response.rbi +0 -3512
- data/rbi/context_dev/models/utility_prefetch_by_email_params.rbi +0 -65
- data/rbi/context_dev/models/utility_prefetch_by_email_response.rbi +0 -132
- data/sig/context_dev/models/ai_ai_query_params.rbs +0 -218
- data/sig/context_dev/models/ai_ai_query_response.rbs +0 -121
- data/sig/context_dev/models/brand_identify_from_transaction_params.rbs +0 -822
- data/sig/context_dev/models/brand_identify_from_transaction_response.rbs +0 -1441
- data/sig/context_dev/models/brand_retrieve_by_email_params.rbs +0 -305
- data/sig/context_dev/models/brand_retrieve_by_email_response.rbs +0 -1441
- data/sig/context_dev/models/brand_retrieve_by_isin_params.rbs +0 -305
- data/sig/context_dev/models/brand_retrieve_by_isin_response.rbs +0 -1441
- data/sig/context_dev/models/brand_retrieve_by_name_params.rbs +0 -801
- data/sig/context_dev/models/brand_retrieve_by_name_response.rbs +0 -1441
- data/sig/context_dev/models/brand_retrieve_by_ticker_params.rbs +0 -467
- data/sig/context_dev/models/brand_retrieve_by_ticker_response.rbs +0 -1441
- data/sig/context_dev/models/utility_prefetch_by_email_params.rbs +0 -30
- data/sig/context_dev/models/utility_prefetch_by_email_response.rbs +0 -64
|
@@ -3,23 +3,15 @@
|
|
|
3
3
|
module ContextDev
|
|
4
4
|
module Resources
|
|
5
5
|
class Brand
|
|
6
|
-
#
|
|
7
|
-
#
|
|
8
|
-
#
|
|
9
|
-
#
|
|
10
|
-
#
|
|
11
|
-
#
|
|
12
|
-
# @overload retrieve(domain:, force_language: nil, max_age_ms: nil, max_speed: nil, timeout_ms: nil, request_options: {})
|
|
13
|
-
#
|
|
14
|
-
# @param domain [String] Domain name to retrieve brand data for (e.g., 'example.com', 'google.com'). Cann
|
|
6
|
+
# Retrieve logos, backdrops, colors, industry, description, and more. Provide
|
|
7
|
+
# exactly one lookup identifier in the request body: a domain, company name, email
|
|
8
|
+
# address, stock ticker, transaction descriptor, or direct URL. Note:
|
|
9
|
+
# `by_direct_url` fetches brand data only from the provided URL — not from the
|
|
10
|
+
# entire internet.
|
|
15
11
|
#
|
|
16
|
-
# @
|
|
12
|
+
# @overload retrieve(body:, request_options: {})
|
|
17
13
|
#
|
|
18
|
-
# @param
|
|
19
|
-
#
|
|
20
|
-
# @param max_speed [Boolean] Optional parameter to optimize the API call for maximum speed. When set to true,
|
|
21
|
-
#
|
|
22
|
-
# @param timeout_ms [Integer] Optional timeout in milliseconds for the request. If the request takes longer th
|
|
14
|
+
# @param body [ContextDev::Models::BrandRetrieveParams::Body::ByDomain, ContextDev::Models::BrandRetrieveParams::Body::ByName, ContextDev::Models::BrandRetrieveParams::Body::ByEmail, ContextDev::Models::BrandRetrieveParams::Body::ByTicker, ContextDev::Models::BrandRetrieveParams::Body::ByDirectURL, ContextDev::Models::BrandRetrieveParams::Body::ByTransaction] Exactly one lookup type must be provided.
|
|
23
15
|
#
|
|
24
16
|
# @param request_options [ContextDev::RequestOptions, Hash{Symbol=>Object}, nil]
|
|
25
17
|
#
|
|
@@ -28,202 +20,15 @@ module ContextDev
|
|
|
28
20
|
# @see ContextDev::Models::BrandRetrieveParams
|
|
29
21
|
def retrieve(params)
|
|
30
22
|
parsed, options = ContextDev::BrandRetrieveParams.dump_request(params)
|
|
31
|
-
query = ContextDev::Internal::Util.encode_query_params(parsed)
|
|
32
23
|
@client.request(
|
|
33
|
-
method: :
|
|
24
|
+
method: :post,
|
|
34
25
|
path: "brand/retrieve",
|
|
35
|
-
|
|
26
|
+
body: parsed[:body],
|
|
36
27
|
model: ContextDev::Models::BrandRetrieveResponse,
|
|
37
28
|
options: options
|
|
38
29
|
)
|
|
39
30
|
end
|
|
40
31
|
|
|
41
|
-
# Some parameter documentations has been truncated, see
|
|
42
|
-
# {ContextDev::Models::BrandIdentifyFromTransactionParams} for more details.
|
|
43
|
-
#
|
|
44
|
-
# Endpoint specially designed for platforms that want to identify transaction data
|
|
45
|
-
# by the transaction title.
|
|
46
|
-
#
|
|
47
|
-
# @overload identify_from_transaction(transaction_info:, city: nil, country_gl: nil, force_language: nil, high_confidence_only: nil, max_speed: nil, mcc: nil, phone: nil, timeout_ms: nil, request_options: {})
|
|
48
|
-
#
|
|
49
|
-
# @param transaction_info [String] Transaction information to identify the brand
|
|
50
|
-
#
|
|
51
|
-
# @param city [String] Optional city name to prioritize when searching for the brand.
|
|
52
|
-
#
|
|
53
|
-
# @param country_gl [Symbol, ContextDev::Models::BrandIdentifyFromTransactionParams::CountryGl] Optional country code (GL parameter) to specify the country. This affects the ge
|
|
54
|
-
#
|
|
55
|
-
# @param force_language [Symbol, ContextDev::Models::BrandIdentifyFromTransactionParams::ForceLanguage] Optional parameter to force the language of the retrieved brand data.
|
|
56
|
-
#
|
|
57
|
-
# @param high_confidence_only [Boolean] When set to true, the API will perform an additional verification steps to ensur
|
|
58
|
-
#
|
|
59
|
-
# @param max_speed [Boolean] Optional parameter to optimize the API call for maximum speed. When set to true,
|
|
60
|
-
#
|
|
61
|
-
# @param mcc [String] Optional Merchant Category Code (MCC) to help identify the business category/ind
|
|
62
|
-
#
|
|
63
|
-
# @param phone [Float] Optional phone number from the transaction to help verify brand match.
|
|
64
|
-
#
|
|
65
|
-
# @param timeout_ms [Integer] Optional timeout in milliseconds for the request. If the request takes longer th
|
|
66
|
-
#
|
|
67
|
-
# @param request_options [ContextDev::RequestOptions, Hash{Symbol=>Object}, nil]
|
|
68
|
-
#
|
|
69
|
-
# @return [ContextDev::Models::BrandIdentifyFromTransactionResponse]
|
|
70
|
-
#
|
|
71
|
-
# @see ContextDev::Models::BrandIdentifyFromTransactionParams
|
|
72
|
-
def identify_from_transaction(params)
|
|
73
|
-
parsed, options = ContextDev::BrandIdentifyFromTransactionParams.dump_request(params)
|
|
74
|
-
query = ContextDev::Internal::Util.encode_query_params(parsed)
|
|
75
|
-
@client.request(
|
|
76
|
-
method: :get,
|
|
77
|
-
path: "brand/transaction_identifier",
|
|
78
|
-
query: query.transform_keys(max_speed: "maxSpeed", timeout_ms: "timeoutMS"),
|
|
79
|
-
model: ContextDev::Models::BrandIdentifyFromTransactionResponse,
|
|
80
|
-
options: options
|
|
81
|
-
)
|
|
82
|
-
end
|
|
83
|
-
|
|
84
|
-
# Some parameter documentations has been truncated, see
|
|
85
|
-
# {ContextDev::Models::BrandRetrieveByEmailParams} for more details.
|
|
86
|
-
#
|
|
87
|
-
# Retrieve brand information using an email address while detecting disposable and
|
|
88
|
-
# free email addresses. Disposable and free email addresses (like gmail.com,
|
|
89
|
-
# yahoo.com) will throw a 422 error.
|
|
90
|
-
#
|
|
91
|
-
# @overload retrieve_by_email(email:, force_language: nil, max_age_ms: nil, max_speed: nil, timeout_ms: nil, request_options: {})
|
|
92
|
-
#
|
|
93
|
-
# @param email [String] Email address to retrieve brand data for (e.g., 'contact@example.com'). The doma
|
|
94
|
-
#
|
|
95
|
-
# @param force_language [Symbol, ContextDev::Models::BrandRetrieveByEmailParams::ForceLanguage] Optional parameter to force the language of the retrieved brand data.
|
|
96
|
-
#
|
|
97
|
-
# @param max_age_ms [Integer] Maximum age in milliseconds for cached brand data before the API performs a hard
|
|
98
|
-
#
|
|
99
|
-
# @param max_speed [Boolean] Optional parameter to optimize the API call for maximum speed. When set to true,
|
|
100
|
-
#
|
|
101
|
-
# @param timeout_ms [Integer] Optional timeout in milliseconds for the request. If the request takes longer th
|
|
102
|
-
#
|
|
103
|
-
# @param request_options [ContextDev::RequestOptions, Hash{Symbol=>Object}, nil]
|
|
104
|
-
#
|
|
105
|
-
# @return [ContextDev::Models::BrandRetrieveByEmailResponse]
|
|
106
|
-
#
|
|
107
|
-
# @see ContextDev::Models::BrandRetrieveByEmailParams
|
|
108
|
-
def retrieve_by_email(params)
|
|
109
|
-
parsed, options = ContextDev::BrandRetrieveByEmailParams.dump_request(params)
|
|
110
|
-
query = ContextDev::Internal::Util.encode_query_params(parsed)
|
|
111
|
-
@client.request(
|
|
112
|
-
method: :get,
|
|
113
|
-
path: "brand/retrieve-by-email",
|
|
114
|
-
query: query.transform_keys(max_age_ms: "maxAgeMs", max_speed: "maxSpeed", timeout_ms: "timeoutMS"),
|
|
115
|
-
model: ContextDev::Models::BrandRetrieveByEmailResponse,
|
|
116
|
-
options: options
|
|
117
|
-
)
|
|
118
|
-
end
|
|
119
|
-
|
|
120
|
-
# Some parameter documentations has been truncated, see
|
|
121
|
-
# {ContextDev::Models::BrandRetrieveByIsinParams} for more details.
|
|
122
|
-
#
|
|
123
|
-
# Retrieve brand information using an ISIN (International Securities
|
|
124
|
-
# Identification Number).
|
|
125
|
-
#
|
|
126
|
-
# @overload retrieve_by_isin(isin:, force_language: nil, max_age_ms: nil, max_speed: nil, timeout_ms: nil, request_options: {})
|
|
127
|
-
#
|
|
128
|
-
# @param isin [String] ISIN (International Securities Identification Number) to retrieve brand data for
|
|
129
|
-
#
|
|
130
|
-
# @param force_language [Symbol, ContextDev::Models::BrandRetrieveByIsinParams::ForceLanguage] Optional parameter to force the language of the retrieved brand data.
|
|
131
|
-
#
|
|
132
|
-
# @param max_age_ms [Integer] Maximum age in milliseconds for cached brand data before the API performs a hard
|
|
133
|
-
#
|
|
134
|
-
# @param max_speed [Boolean] Optional parameter to optimize the API call for maximum speed. When set to true,
|
|
135
|
-
#
|
|
136
|
-
# @param timeout_ms [Integer] Optional timeout in milliseconds for the request. If the request takes longer th
|
|
137
|
-
#
|
|
138
|
-
# @param request_options [ContextDev::RequestOptions, Hash{Symbol=>Object}, nil]
|
|
139
|
-
#
|
|
140
|
-
# @return [ContextDev::Models::BrandRetrieveByIsinResponse]
|
|
141
|
-
#
|
|
142
|
-
# @see ContextDev::Models::BrandRetrieveByIsinParams
|
|
143
|
-
def retrieve_by_isin(params)
|
|
144
|
-
parsed, options = ContextDev::BrandRetrieveByIsinParams.dump_request(params)
|
|
145
|
-
query = ContextDev::Internal::Util.encode_query_params(parsed)
|
|
146
|
-
@client.request(
|
|
147
|
-
method: :get,
|
|
148
|
-
path: "brand/retrieve-by-isin",
|
|
149
|
-
query: query.transform_keys(max_age_ms: "maxAgeMs", max_speed: "maxSpeed", timeout_ms: "timeoutMS"),
|
|
150
|
-
model: ContextDev::Models::BrandRetrieveByIsinResponse,
|
|
151
|
-
options: options
|
|
152
|
-
)
|
|
153
|
-
end
|
|
154
|
-
|
|
155
|
-
# Some parameter documentations has been truncated, see
|
|
156
|
-
# {ContextDev::Models::BrandRetrieveByNameParams} for more details.
|
|
157
|
-
#
|
|
158
|
-
# Retrieve brand information using a company name.
|
|
159
|
-
#
|
|
160
|
-
# @overload retrieve_by_name(name:, country_gl: nil, force_language: nil, max_age_ms: nil, max_speed: nil, timeout_ms: nil, request_options: {})
|
|
161
|
-
#
|
|
162
|
-
# @param name [String] Company name to retrieve brand data for (e.g., 'Apple Inc', 'Microsoft Corporati
|
|
163
|
-
#
|
|
164
|
-
# @param country_gl [Symbol, ContextDev::Models::BrandRetrieveByNameParams::CountryGl] Optional country code hint (GL parameter) to specify the country for the company
|
|
165
|
-
#
|
|
166
|
-
# @param force_language [Symbol, ContextDev::Models::BrandRetrieveByNameParams::ForceLanguage] Optional parameter to force the language of the retrieved brand data.
|
|
167
|
-
#
|
|
168
|
-
# @param max_age_ms [Integer] Maximum age in milliseconds for cached brand data before the API performs a hard
|
|
169
|
-
#
|
|
170
|
-
# @param max_speed [Boolean] Optional parameter to optimize the API call for maximum speed. When set to true,
|
|
171
|
-
#
|
|
172
|
-
# @param timeout_ms [Integer] Optional timeout in milliseconds for the request. If the request takes longer th
|
|
173
|
-
#
|
|
174
|
-
# @param request_options [ContextDev::RequestOptions, Hash{Symbol=>Object}, nil]
|
|
175
|
-
#
|
|
176
|
-
# @return [ContextDev::Models::BrandRetrieveByNameResponse]
|
|
177
|
-
#
|
|
178
|
-
# @see ContextDev::Models::BrandRetrieveByNameParams
|
|
179
|
-
def retrieve_by_name(params)
|
|
180
|
-
parsed, options = ContextDev::BrandRetrieveByNameParams.dump_request(params)
|
|
181
|
-
query = ContextDev::Internal::Util.encode_query_params(parsed)
|
|
182
|
-
@client.request(
|
|
183
|
-
method: :get,
|
|
184
|
-
path: "brand/retrieve-by-name",
|
|
185
|
-
query: query.transform_keys(max_age_ms: "maxAgeMs", max_speed: "maxSpeed", timeout_ms: "timeoutMS"),
|
|
186
|
-
model: ContextDev::Models::BrandRetrieveByNameResponse,
|
|
187
|
-
options: options
|
|
188
|
-
)
|
|
189
|
-
end
|
|
190
|
-
|
|
191
|
-
# Some parameter documentations has been truncated, see
|
|
192
|
-
# {ContextDev::Models::BrandRetrieveByTickerParams} for more details.
|
|
193
|
-
#
|
|
194
|
-
# Retrieve brand information using a stock ticker symbol.
|
|
195
|
-
#
|
|
196
|
-
# @overload retrieve_by_ticker(ticker:, force_language: nil, max_age_ms: nil, max_speed: nil, ticker_exchange: nil, timeout_ms: nil, request_options: {})
|
|
197
|
-
#
|
|
198
|
-
# @param ticker [String] Stock ticker symbol to retrieve brand data for (e.g., 'AAPL', 'GOOGL', 'BRK.A').
|
|
199
|
-
#
|
|
200
|
-
# @param force_language [Symbol, ContextDev::Models::BrandRetrieveByTickerParams::ForceLanguage] Optional parameter to force the language of the retrieved brand data.
|
|
201
|
-
#
|
|
202
|
-
# @param max_age_ms [Integer] Maximum age in milliseconds for cached brand data before the API performs a hard
|
|
203
|
-
#
|
|
204
|
-
# @param max_speed [Boolean] Optional parameter to optimize the API call for maximum speed. When set to true,
|
|
205
|
-
#
|
|
206
|
-
# @param ticker_exchange [Symbol, ContextDev::Models::BrandRetrieveByTickerParams::TickerExchange] Optional stock exchange for the ticker. Defaults to NASDAQ if not specified.
|
|
207
|
-
#
|
|
208
|
-
# @param timeout_ms [Integer] Optional timeout in milliseconds for the request. If the request takes longer th
|
|
209
|
-
#
|
|
210
|
-
# @param request_options [ContextDev::RequestOptions, Hash{Symbol=>Object}, nil]
|
|
211
|
-
#
|
|
212
|
-
# @return [ContextDev::Models::BrandRetrieveByTickerResponse]
|
|
213
|
-
#
|
|
214
|
-
# @see ContextDev::Models::BrandRetrieveByTickerParams
|
|
215
|
-
def retrieve_by_ticker(params)
|
|
216
|
-
parsed, options = ContextDev::BrandRetrieveByTickerParams.dump_request(params)
|
|
217
|
-
query = ContextDev::Internal::Util.encode_query_params(parsed)
|
|
218
|
-
@client.request(
|
|
219
|
-
method: :get,
|
|
220
|
-
path: "brand/retrieve-by-ticker",
|
|
221
|
-
query: query.transform_keys(max_age_ms: "maxAgeMs", max_speed: "maxSpeed", timeout_ms: "timeoutMS"),
|
|
222
|
-
model: ContextDev::Models::BrandRetrieveByTickerResponse,
|
|
223
|
-
options: options
|
|
224
|
-
)
|
|
225
|
-
end
|
|
226
|
-
|
|
227
32
|
# Some parameter documentations has been truncated, see
|
|
228
33
|
# {ContextDev::Models::BrandRetrieveSimplifiedParams} for more details.
|
|
229
34
|
#
|
|
@@ -0,0 +1,352 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module ContextDev
|
|
4
|
+
module Resources
|
|
5
|
+
# Monitor pages, sitemaps, and extracted website data for exact or semantic
|
|
6
|
+
# changes. The change.detected webhook payload is documented by the
|
|
7
|
+
# MonitorsChangeDetectedWebhookPayload schema.
|
|
8
|
+
class Monitors
|
|
9
|
+
# Some parameter documentations has been truncated, see
|
|
10
|
+
# {ContextDev::Models::MonitorCreateParams} for more details.
|
|
11
|
+
#
|
|
12
|
+
# Creates a monitor. The request body is a union of the supported target/change
|
|
13
|
+
# detection combinations. The monitor runs immediately after creation to create
|
|
14
|
+
# its initial baseline.
|
|
15
|
+
#
|
|
16
|
+
# @overload create(change_detection:, name:, schedule:, target:, mode: nil, tags: nil, webhook: nil, request_options: {})
|
|
17
|
+
#
|
|
18
|
+
# @param change_detection [ContextDev::Models::MonitorCreateParams::ChangeDetection::Exact, ContextDev::Models::MonitorCreateParams::ChangeDetection::Semantic] Discriminated union describing how changes are detected.
|
|
19
|
+
#
|
|
20
|
+
# @param name [String]
|
|
21
|
+
#
|
|
22
|
+
# @param schedule [ContextDev::Models::MonitorCreateParams::Schedule] Run the monitor on a fixed interval defined by a frequency and a unit, e.g. ever
|
|
23
|
+
#
|
|
24
|
+
# @param target [ContextDev::Models::MonitorCreateParams::Target::Page, ContextDev::Models::MonitorCreateParams::Target::Sitemap, ContextDev::Models::MonitorCreateParams::Target::Extract] Discriminated union describing what the monitor watches.
|
|
25
|
+
#
|
|
26
|
+
# @param mode [Symbol, ContextDev::Models::MonitorCreateParams::Mode] Top-level monitor category. Always `web` today; the concrete behavior is describ
|
|
27
|
+
#
|
|
28
|
+
# @param tags [Array<String>] User-defined tags for grouping and filtering monitors and their changes.
|
|
29
|
+
#
|
|
30
|
+
# @param webhook [ContextDev::Models::MonitorCreateParams::Webhook, nil]
|
|
31
|
+
#
|
|
32
|
+
# @param request_options [ContextDev::RequestOptions, Hash{Symbol=>Object}, nil]
|
|
33
|
+
#
|
|
34
|
+
# @return [ContextDev::Models::MonitorCreateResponse]
|
|
35
|
+
#
|
|
36
|
+
# @see ContextDev::Models::MonitorCreateParams
|
|
37
|
+
def create(params)
|
|
38
|
+
parsed, options = ContextDev::MonitorCreateParams.dump_request(params)
|
|
39
|
+
@client.request(
|
|
40
|
+
method: :post,
|
|
41
|
+
path: "monitors",
|
|
42
|
+
body: parsed,
|
|
43
|
+
model: ContextDev::Models::MonitorCreateResponse,
|
|
44
|
+
options: options
|
|
45
|
+
)
|
|
46
|
+
end
|
|
47
|
+
|
|
48
|
+
# Get a monitor
|
|
49
|
+
#
|
|
50
|
+
# @overload retrieve(monitor_id, request_options: {})
|
|
51
|
+
#
|
|
52
|
+
# @param monitor_id [String]
|
|
53
|
+
# @param request_options [ContextDev::RequestOptions, Hash{Symbol=>Object}, nil]
|
|
54
|
+
#
|
|
55
|
+
# @return [ContextDev::Models::MonitorRetrieveResponse]
|
|
56
|
+
#
|
|
57
|
+
# @see ContextDev::Models::MonitorRetrieveParams
|
|
58
|
+
def retrieve(monitor_id, params = {})
|
|
59
|
+
@client.request(
|
|
60
|
+
method: :get,
|
|
61
|
+
path: ["monitors/%1$s", monitor_id],
|
|
62
|
+
model: ContextDev::Models::MonitorRetrieveResponse,
|
|
63
|
+
options: params[:request_options]
|
|
64
|
+
)
|
|
65
|
+
end
|
|
66
|
+
|
|
67
|
+
# Some parameter documentations has been truncated, see
|
|
68
|
+
# {ContextDev::Models::MonitorUpdateParams} for more details.
|
|
69
|
+
#
|
|
70
|
+
# Updates a monitor. If `target` or `change_detection` changes, the monitor
|
|
71
|
+
# creates a new baseline. Unsupported target/change detection combinations are
|
|
72
|
+
# rejected.
|
|
73
|
+
#
|
|
74
|
+
# @overload update(monitor_id, change_detection: nil, name: nil, schedule: nil, status: nil, tags: nil, target: nil, webhook: nil, request_options: {})
|
|
75
|
+
#
|
|
76
|
+
# @param monitor_id [String]
|
|
77
|
+
#
|
|
78
|
+
# @param change_detection [ContextDev::Models::MonitorUpdateParams::ChangeDetection::Exact, ContextDev::Models::MonitorUpdateParams::ChangeDetection::Semantic] Discriminated union describing how changes are detected.
|
|
79
|
+
#
|
|
80
|
+
# @param name [String]
|
|
81
|
+
#
|
|
82
|
+
# @param schedule [ContextDev::Models::MonitorUpdateParams::Schedule] Run the monitor on a fixed interval defined by a frequency and a unit, e.g. ever
|
|
83
|
+
#
|
|
84
|
+
# @param status [Symbol, ContextDev::Models::MonitorUpdateParams::Status]
|
|
85
|
+
#
|
|
86
|
+
# @param tags [Array<String>] User-defined tags for grouping and filtering monitors and their changes.
|
|
87
|
+
#
|
|
88
|
+
# @param target [ContextDev::Models::MonitorUpdateParams::Target::Page, ContextDev::Models::MonitorUpdateParams::Target::Sitemap, ContextDev::Models::MonitorUpdateParams::Target::Extract] Discriminated union describing what the monitor watches.
|
|
89
|
+
#
|
|
90
|
+
# @param webhook [ContextDev::Models::MonitorUpdateParams::Webhook, nil] Set to null to remove the webhook.
|
|
91
|
+
#
|
|
92
|
+
# @param request_options [ContextDev::RequestOptions, Hash{Symbol=>Object}, nil]
|
|
93
|
+
#
|
|
94
|
+
# @return [ContextDev::Models::MonitorUpdateResponse]
|
|
95
|
+
#
|
|
96
|
+
# @see ContextDev::Models::MonitorUpdateParams
|
|
97
|
+
def update(monitor_id, params = {})
|
|
98
|
+
parsed, options = ContextDev::MonitorUpdateParams.dump_request(params)
|
|
99
|
+
@client.request(
|
|
100
|
+
method: :patch,
|
|
101
|
+
path: ["monitors/%1$s", monitor_id],
|
|
102
|
+
body: parsed,
|
|
103
|
+
model: ContextDev::Models::MonitorUpdateResponse,
|
|
104
|
+
options: options
|
|
105
|
+
)
|
|
106
|
+
end
|
|
107
|
+
|
|
108
|
+
# Some parameter documentations has been truncated, see
|
|
109
|
+
# {ContextDev::Models::MonitorListParams} for more details.
|
|
110
|
+
#
|
|
111
|
+
# Lists monitors for the authenticated organization. Supports free-text search
|
|
112
|
+
# (`q` over `search_by` fields, `prefix` or `exact` via `search_type`) plus
|
|
113
|
+
# status/type/tag filters. Results are paginated via the opaque `cursor`.
|
|
114
|
+
#
|
|
115
|
+
# @overload list(change_detection_type: nil, cursor: nil, limit: nil, q: nil, search_by: nil, search_type: nil, status: nil, tag: nil, tags: nil, target_type: nil, request_options: {})
|
|
116
|
+
#
|
|
117
|
+
# @param change_detection_type [Symbol, ContextDev::Models::MonitorListParams::ChangeDetectionType]
|
|
118
|
+
#
|
|
119
|
+
# @param cursor [String]
|
|
120
|
+
#
|
|
121
|
+
# @param limit [Integer]
|
|
122
|
+
#
|
|
123
|
+
# @param q [String] Free-text search term, matched against the fields named in `search_by`.
|
|
124
|
+
#
|
|
125
|
+
# @param search_by [Array<Symbol, ContextDev::Models::MonitorListParams::SearchBy>] Comma-separated fields to search with `q`. Defaults to all of them. Note `instru
|
|
126
|
+
#
|
|
127
|
+
# @param search_type [Symbol, ContextDev::Models::MonitorListParams::SearchType] `prefix` for as-you-type prefix matching (default), `exact` for full-token match
|
|
128
|
+
#
|
|
129
|
+
# @param status [Symbol, ContextDev::Models::MonitorListParams::Status] Monitor lifecycle status. `failed` means the most recent run failed (see the mon
|
|
130
|
+
#
|
|
131
|
+
# @param tag [String] Filter to items that have this tag.
|
|
132
|
+
#
|
|
133
|
+
# @param tags [Array<String>] Comma-separated list of tags to filter by (matches monitors having any of them).
|
|
134
|
+
#
|
|
135
|
+
# @param target_type [Symbol, ContextDev::Models::MonitorListParams::TargetType]
|
|
136
|
+
#
|
|
137
|
+
# @param request_options [ContextDev::RequestOptions, Hash{Symbol=>Object}, nil]
|
|
138
|
+
#
|
|
139
|
+
# @return [ContextDev::Models::MonitorListResponse]
|
|
140
|
+
#
|
|
141
|
+
# @see ContextDev::Models::MonitorListParams
|
|
142
|
+
def list(params = {})
|
|
143
|
+
parsed, options = ContextDev::MonitorListParams.dump_request(params)
|
|
144
|
+
query = ContextDev::Internal::Util.encode_query_params(parsed)
|
|
145
|
+
@client.request(
|
|
146
|
+
method: :get,
|
|
147
|
+
path: "monitors",
|
|
148
|
+
query: query,
|
|
149
|
+
model: ContextDev::Models::MonitorListResponse,
|
|
150
|
+
options: options
|
|
151
|
+
)
|
|
152
|
+
end
|
|
153
|
+
|
|
154
|
+
# Delete a monitor
|
|
155
|
+
#
|
|
156
|
+
# @overload delete(monitor_id, request_options: {})
|
|
157
|
+
#
|
|
158
|
+
# @param monitor_id [String]
|
|
159
|
+
# @param request_options [ContextDev::RequestOptions, Hash{Symbol=>Object}, nil]
|
|
160
|
+
#
|
|
161
|
+
# @return [ContextDev::Models::MonitorDeleteResponse]
|
|
162
|
+
#
|
|
163
|
+
# @see ContextDev::Models::MonitorDeleteParams
|
|
164
|
+
def delete(monitor_id, params = {})
|
|
165
|
+
@client.request(
|
|
166
|
+
method: :delete,
|
|
167
|
+
path: ["monitors/%1$s", monitor_id],
|
|
168
|
+
model: ContextDev::Models::MonitorDeleteResponse,
|
|
169
|
+
options: params[:request_options]
|
|
170
|
+
)
|
|
171
|
+
end
|
|
172
|
+
|
|
173
|
+
# Returns an account-wide feed of detected changes across monitors.
|
|
174
|
+
#
|
|
175
|
+
# @overload list_account_changes(change_detection_type: nil, cursor: nil, limit: nil, monitor_id: nil, since: nil, tag: nil, target_type: nil, until_: nil, request_options: {})
|
|
176
|
+
#
|
|
177
|
+
# @param change_detection_type [Symbol, ContextDev::Models::MonitorListAccountChangesParams::ChangeDetectionType]
|
|
178
|
+
#
|
|
179
|
+
# @param cursor [String]
|
|
180
|
+
#
|
|
181
|
+
# @param limit [Integer]
|
|
182
|
+
#
|
|
183
|
+
# @param monitor_id [String]
|
|
184
|
+
#
|
|
185
|
+
# @param since [Time]
|
|
186
|
+
#
|
|
187
|
+
# @param tag [String] Filter to items that have this tag.
|
|
188
|
+
#
|
|
189
|
+
# @param target_type [Symbol, ContextDev::Models::MonitorListAccountChangesParams::TargetType]
|
|
190
|
+
#
|
|
191
|
+
# @param until_ [Time]
|
|
192
|
+
#
|
|
193
|
+
# @param request_options [ContextDev::RequestOptions, Hash{Symbol=>Object}, nil]
|
|
194
|
+
#
|
|
195
|
+
# @return [ContextDev::Models::MonitorListAccountChangesResponse]
|
|
196
|
+
#
|
|
197
|
+
# @see ContextDev::Models::MonitorListAccountChangesParams
|
|
198
|
+
def list_account_changes(params = {})
|
|
199
|
+
parsed, options = ContextDev::MonitorListAccountChangesParams.dump_request(params)
|
|
200
|
+
query = ContextDev::Internal::Util.encode_query_params(parsed)
|
|
201
|
+
@client.request(
|
|
202
|
+
method: :get,
|
|
203
|
+
path: "monitors/changes",
|
|
204
|
+
query: query.transform_keys(until_: "until"),
|
|
205
|
+
model: ContextDev::Models::MonitorListAccountChangesResponse,
|
|
206
|
+
options: options
|
|
207
|
+
)
|
|
208
|
+
end
|
|
209
|
+
|
|
210
|
+
# Some parameter documentations has been truncated, see
|
|
211
|
+
# {ContextDev::Models::MonitorListAccountRunsParams} for more details.
|
|
212
|
+
#
|
|
213
|
+
# Returns an account-wide feed of monitor runs across all monitors.
|
|
214
|
+
#
|
|
215
|
+
# @overload list_account_runs(cursor: nil, limit: nil, status: nil, request_options: {})
|
|
216
|
+
#
|
|
217
|
+
# @param cursor [String]
|
|
218
|
+
#
|
|
219
|
+
# @param limit [Integer]
|
|
220
|
+
#
|
|
221
|
+
# @param status [Symbol, ContextDev::Models::MonitorListAccountRunsParams::Status] Lifecycle status of a run. `skipped` runs never executed — see `skip_reason` (in
|
|
222
|
+
#
|
|
223
|
+
# @param request_options [ContextDev::RequestOptions, Hash{Symbol=>Object}, nil]
|
|
224
|
+
#
|
|
225
|
+
# @return [ContextDev::Models::MonitorListAccountRunsResponse]
|
|
226
|
+
#
|
|
227
|
+
# @see ContextDev::Models::MonitorListAccountRunsParams
|
|
228
|
+
def list_account_runs(params = {})
|
|
229
|
+
parsed, options = ContextDev::MonitorListAccountRunsParams.dump_request(params)
|
|
230
|
+
query = ContextDev::Internal::Util.encode_query_params(parsed)
|
|
231
|
+
@client.request(
|
|
232
|
+
method: :get,
|
|
233
|
+
path: "monitors/runs",
|
|
234
|
+
query: query,
|
|
235
|
+
model: ContextDev::Models::MonitorListAccountRunsResponse,
|
|
236
|
+
options: options
|
|
237
|
+
)
|
|
238
|
+
end
|
|
239
|
+
|
|
240
|
+
# List changes for a monitor
|
|
241
|
+
#
|
|
242
|
+
# @overload list_changes(monitor_id, cursor: nil, limit: nil, since: nil, tag: nil, until_: nil, request_options: {})
|
|
243
|
+
#
|
|
244
|
+
# @param monitor_id [String]
|
|
245
|
+
#
|
|
246
|
+
# @param cursor [String]
|
|
247
|
+
#
|
|
248
|
+
# @param limit [Integer]
|
|
249
|
+
#
|
|
250
|
+
# @param since [Time]
|
|
251
|
+
#
|
|
252
|
+
# @param tag [String] Filter to items that have this tag.
|
|
253
|
+
#
|
|
254
|
+
# @param until_ [Time]
|
|
255
|
+
#
|
|
256
|
+
# @param request_options [ContextDev::RequestOptions, Hash{Symbol=>Object}, nil]
|
|
257
|
+
#
|
|
258
|
+
# @return [ContextDev::Models::MonitorListChangesResponse]
|
|
259
|
+
#
|
|
260
|
+
# @see ContextDev::Models::MonitorListChangesParams
|
|
261
|
+
def list_changes(monitor_id, params = {})
|
|
262
|
+
parsed, options = ContextDev::MonitorListChangesParams.dump_request(params)
|
|
263
|
+
query = ContextDev::Internal::Util.encode_query_params(parsed)
|
|
264
|
+
@client.request(
|
|
265
|
+
method: :get,
|
|
266
|
+
path: ["monitors/%1$s/changes", monitor_id],
|
|
267
|
+
query: query.transform_keys(until_: "until"),
|
|
268
|
+
model: ContextDev::Models::MonitorListChangesResponse,
|
|
269
|
+
options: options
|
|
270
|
+
)
|
|
271
|
+
end
|
|
272
|
+
|
|
273
|
+
# Some parameter documentations has been truncated, see
|
|
274
|
+
# {ContextDev::Models::MonitorListRunsParams} for more details.
|
|
275
|
+
#
|
|
276
|
+
# List monitor runs
|
|
277
|
+
#
|
|
278
|
+
# @overload list_runs(monitor_id, cursor: nil, limit: nil, status: nil, request_options: {})
|
|
279
|
+
#
|
|
280
|
+
# @param monitor_id [String]
|
|
281
|
+
#
|
|
282
|
+
# @param cursor [String]
|
|
283
|
+
#
|
|
284
|
+
# @param limit [Integer]
|
|
285
|
+
#
|
|
286
|
+
# @param status [Symbol, ContextDev::Models::MonitorListRunsParams::Status] Lifecycle status of a run. `skipped` runs never executed — see `skip_reason` (in
|
|
287
|
+
#
|
|
288
|
+
# @param request_options [ContextDev::RequestOptions, Hash{Symbol=>Object}, nil]
|
|
289
|
+
#
|
|
290
|
+
# @return [ContextDev::Models::MonitorListRunsResponse]
|
|
291
|
+
#
|
|
292
|
+
# @see ContextDev::Models::MonitorListRunsParams
|
|
293
|
+
def list_runs(monitor_id, params = {})
|
|
294
|
+
parsed, options = ContextDev::MonitorListRunsParams.dump_request(params)
|
|
295
|
+
query = ContextDev::Internal::Util.encode_query_params(parsed)
|
|
296
|
+
@client.request(
|
|
297
|
+
method: :get,
|
|
298
|
+
path: ["monitors/%1$s/runs", monitor_id],
|
|
299
|
+
query: query,
|
|
300
|
+
model: ContextDev::Models::MonitorListRunsResponse,
|
|
301
|
+
options: options
|
|
302
|
+
)
|
|
303
|
+
end
|
|
304
|
+
|
|
305
|
+
# Get a change
|
|
306
|
+
#
|
|
307
|
+
# @overload retrieve_change(change_id, request_options: {})
|
|
308
|
+
#
|
|
309
|
+
# @param change_id [String]
|
|
310
|
+
# @param request_options [ContextDev::RequestOptions, Hash{Symbol=>Object}, nil]
|
|
311
|
+
#
|
|
312
|
+
# @return [ContextDev::Models::MonitorRetrieveChangeResponse]
|
|
313
|
+
#
|
|
314
|
+
# @see ContextDev::Models::MonitorRetrieveChangeParams
|
|
315
|
+
def retrieve_change(change_id, params = {})
|
|
316
|
+
@client.request(
|
|
317
|
+
method: :get,
|
|
318
|
+
path: ["monitors/changes/%1$s", change_id],
|
|
319
|
+
model: ContextDev::Models::MonitorRetrieveChangeResponse,
|
|
320
|
+
options: params[:request_options]
|
|
321
|
+
)
|
|
322
|
+
end
|
|
323
|
+
|
|
324
|
+
# Triggers an immediate run of the monitor outside its normal schedule. The run is
|
|
325
|
+
# queued and processed asynchronously.
|
|
326
|
+
#
|
|
327
|
+
# @overload run(monitor_id, request_options: {})
|
|
328
|
+
#
|
|
329
|
+
# @param monitor_id [String]
|
|
330
|
+
# @param request_options [ContextDev::RequestOptions, Hash{Symbol=>Object}, nil]
|
|
331
|
+
#
|
|
332
|
+
# @return [ContextDev::Models::MonitorRunResponse]
|
|
333
|
+
#
|
|
334
|
+
# @see ContextDev::Models::MonitorRunParams
|
|
335
|
+
def run(monitor_id, params = {})
|
|
336
|
+
@client.request(
|
|
337
|
+
method: :post,
|
|
338
|
+
path: ["monitors/%1$s/run", monitor_id],
|
|
339
|
+
model: ContextDev::Models::MonitorRunResponse,
|
|
340
|
+
options: params[:request_options]
|
|
341
|
+
)
|
|
342
|
+
end
|
|
343
|
+
|
|
344
|
+
# @api private
|
|
345
|
+
#
|
|
346
|
+
# @param client [ContextDev::Client]
|
|
347
|
+
def initialize(client:)
|
|
348
|
+
@client = client
|
|
349
|
+
end
|
|
350
|
+
end
|
|
351
|
+
end
|
|
352
|
+
end
|
|
@@ -6,12 +6,16 @@ module ContextDev
|
|
|
6
6
|
# Some parameter documentations has been truncated, see
|
|
7
7
|
# {ContextDev::Models::UtilityPrefetchParams} for more details.
|
|
8
8
|
#
|
|
9
|
-
# Signal that you may fetch brand data
|
|
10
|
-
#
|
|
9
|
+
# Signal that you may fetch brand data soon to improve latency. The type field
|
|
10
|
+
# selects what to prefetch (currently only 'brand') and identifier carries exactly
|
|
11
|
+
# one lookup key: a domain, or an email whose domain is extracted and validated
|
|
12
|
+
# (free email providers and disposable email addresses are not allowed).
|
|
11
13
|
#
|
|
12
|
-
# @overload prefetch(
|
|
14
|
+
# @overload prefetch(identifier:, type:, timeout_ms: nil, request_options: {})
|
|
13
15
|
#
|
|
14
|
-
# @param
|
|
16
|
+
# @param identifier [ContextDev::Models::UtilityPrefetchParams::Identifier::UtilityPrefetchDomainIdentifier, ContextDev::Models::UtilityPrefetchParams::Identifier::UtilityPrefetchEmailIdentifier] Identifier of the brand to prefetch. Provide exactly one of domain or email.
|
|
17
|
+
#
|
|
18
|
+
# @param type [Symbol, ContextDev::Models::UtilityPrefetchParams::Type] What to prefetch. Currently only 'brand' is supported.
|
|
15
19
|
#
|
|
16
20
|
# @param timeout_ms [Integer] Optional timeout in milliseconds for the request. If the request takes longer th
|
|
17
21
|
#
|
|
@@ -24,43 +28,13 @@ module ContextDev
|
|
|
24
28
|
parsed, options = ContextDev::UtilityPrefetchParams.dump_request(params)
|
|
25
29
|
@client.request(
|
|
26
30
|
method: :post,
|
|
27
|
-
path: "
|
|
31
|
+
path: "utility/prefetch",
|
|
28
32
|
body: parsed,
|
|
29
33
|
model: ContextDev::Models::UtilityPrefetchResponse,
|
|
30
34
|
options: options
|
|
31
35
|
)
|
|
32
36
|
end
|
|
33
37
|
|
|
34
|
-
# Some parameter documentations has been truncated, see
|
|
35
|
-
# {ContextDev::Models::UtilityPrefetchByEmailParams} for more details.
|
|
36
|
-
#
|
|
37
|
-
# Signal that you may fetch brand data for a particular domain soon to improve
|
|
38
|
-
# latency. This endpoint accepts an email address, extracts the domain from it,
|
|
39
|
-
# validates that it's not a disposable or free email provider, and queues the
|
|
40
|
-
# domain for prefetching.
|
|
41
|
-
#
|
|
42
|
-
# @overload prefetch_by_email(email:, timeout_ms: nil, request_options: {})
|
|
43
|
-
#
|
|
44
|
-
# @param email [String] Email address to prefetch brand data for. The domain will be extracted from the
|
|
45
|
-
#
|
|
46
|
-
# @param timeout_ms [Integer] Optional timeout in milliseconds for the request. If the request takes longer th
|
|
47
|
-
#
|
|
48
|
-
# @param request_options [ContextDev::RequestOptions, Hash{Symbol=>Object}, nil]
|
|
49
|
-
#
|
|
50
|
-
# @return [ContextDev::Models::UtilityPrefetchByEmailResponse]
|
|
51
|
-
#
|
|
52
|
-
# @see ContextDev::Models::UtilityPrefetchByEmailParams
|
|
53
|
-
def prefetch_by_email(params)
|
|
54
|
-
parsed, options = ContextDev::UtilityPrefetchByEmailParams.dump_request(params)
|
|
55
|
-
@client.request(
|
|
56
|
-
method: :post,
|
|
57
|
-
path: "brand/prefetch-by-email",
|
|
58
|
-
body: parsed,
|
|
59
|
-
model: ContextDev::Models::UtilityPrefetchByEmailResponse,
|
|
60
|
-
options: options
|
|
61
|
-
)
|
|
62
|
-
end
|
|
63
|
-
|
|
64
38
|
# @api private
|
|
65
39
|
#
|
|
66
40
|
# @param client [ContextDev::Client]
|