Class: ContextDev::Resources::Utility
- Inherits:
-
Object
- Object
- ContextDev::Resources::Utility
- Defined in:
- lib/context_dev/resources/utility.rb
Instance Method Summary collapse
-
#initialize(client:) ⇒ Utility
constructor
private
A new instance of Utility.
-
#prefetch(domain:, timeout_ms: nil, request_options: {}) ⇒ ContextDev::Models::UtilityPrefetchResponse
Some parameter documentations has been truncated, see Models::UtilityPrefetchParams for more details.
-
#prefetch_by_email(email:, timeout_ms: nil, request_options: {}) ⇒ ContextDev::Models::UtilityPrefetchByEmailResponse
Some parameter documentations has been truncated, see Models::UtilityPrefetchByEmailParams for more details.
Constructor Details
#initialize(client:) ⇒ Utility
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Returns a new instance of Utility.
67 68 69 |
# File 'lib/context_dev/resources/utility.rb', line 67 def initialize(client:) @client = client end |
Instance Method Details
#prefetch(domain:, timeout_ms: nil, request_options: {}) ⇒ ContextDev::Models::UtilityPrefetchResponse
Some parameter documentations has been truncated, see Models::UtilityPrefetchParams for more details.
Signal that you may fetch brand data for a particular domain soon to improve latency.
23 24 25 26 27 28 29 30 31 32 |
# File 'lib/context_dev/resources/utility.rb', line 23 def prefetch(params) parsed, = ContextDev::UtilityPrefetchParams.dump_request(params) @client.request( method: :post, path: "brand/prefetch", body: parsed, model: ContextDev::Models::UtilityPrefetchResponse, options: ) end |
#prefetch_by_email(email:, timeout_ms: nil, request_options: {}) ⇒ ContextDev::Models::UtilityPrefetchByEmailResponse
Some parameter documentations has been truncated, see Models::UtilityPrefetchByEmailParams for more details.
Signal that you may fetch brand data for a particular domain soon to improve latency. This endpoint accepts an email address, extracts the domain from it, validates that it’s not a disposable or free email provider, and queues the domain for prefetching.
53 54 55 56 57 58 59 60 61 62 |
# File 'lib/context_dev/resources/utility.rb', line 53 def prefetch_by_email(params) parsed, = ContextDev::UtilityPrefetchByEmailParams.dump_request(params) @client.request( method: :post, path: "brand/prefetch-by-email", body: parsed, model: ContextDev::Models::UtilityPrefetchByEmailResponse, options: ) end |