Class: ContextDev::Resources::Utility
- Inherits:
-
Object
- Object
- ContextDev::Resources::Utility
- Defined in:
- lib/context_dev/resources/utility.rb,
sig/context_dev/resources/utility.rbs
Instance Method Summary collapse
-
#initialize(client:) ⇒ Utility
constructor
private
A new instance of Utility.
-
#prefetch(identifier:, type:, timeout_ms: nil, request_options: {}) ⇒ ContextDev::Models::UtilityPrefetchResponse
Some parameter documentations has been truncated, see Models::UtilityPrefetchParams 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.
41 42 43 |
# File 'lib/context_dev/resources/utility.rb', line 41 def initialize(client:) @client = client end |
Instance Method Details
#prefetch(identifier:, type:, 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 soon to improve latency. The type field selects what to prefetch (currently only 'brand') and identifier carries exactly one lookup key: a domain, or an email whose domain is extracted and validated (free email providers and disposable email addresses are not allowed).
27 28 29 30 31 32 33 34 35 36 |
# File 'lib/context_dev/resources/utility.rb', line 27 def prefetch(params) parsed, = ContextDev::UtilityPrefetchParams.dump_request(params) @client.request( method: :post, path: "utility/prefetch", body: parsed, model: ContextDev::Models::UtilityPrefetchResponse, options: ) end |