Class: ContextDev::Resources::Brand
- Inherits:
-
Object
- Object
- ContextDev::Resources::Brand
- Defined in:
- lib/context_dev/resources/brand.rb,
sig/context_dev/resources/brand.rbs
Instance Method Summary collapse
-
#initialize(client:) ⇒ Brand
constructor
private
A new instance of Brand.
-
#retrieve(body:, request_options: {}) ⇒ ContextDev::Models::BrandRetrieveResponse
Retrieve logos, backdrops, colors, industry, description, and more.
-
#retrieve_simplified(domain:, max_age_ms: nil, timeout_ms: nil, request_options: {}) ⇒ ContextDev::Models::BrandRetrieveSimplifiedResponse
Some parameter documentations has been truncated, see Models::BrandRetrieveSimplifiedParams for more details.
Constructor Details
#initialize(client:) ⇒ Brand
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 Brand.
65 66 67 |
# File 'lib/context_dev/resources/brand.rb', line 65 def initialize(client:) @client = client end |
Instance Method Details
#retrieve(body:, request_options: {}) ⇒ ContextDev::Models::BrandRetrieveResponse
Retrieve logos, backdrops, colors, industry, description, and more. Provide exactly one lookup identifier in the request body: a domain, company name, email address, stock ticker, or transaction descriptor.
19 20 21 22 23 24 25 26 27 28 |
# File 'lib/context_dev/resources/brand.rb', line 19 def retrieve(params) parsed, = ContextDev::BrandRetrieveParams.dump_request(params) @client.request( method: :post, path: "brand/retrieve", body: parsed[:body], model: ContextDev::Models::BrandRetrieveResponse, options: ) end |
#retrieve_simplified(domain:, max_age_ms: nil, timeout_ms: nil, request_options: {}) ⇒ ContextDev::Models::BrandRetrieveSimplifiedResponse
Some parameter documentations has been truncated, see Models::BrandRetrieveSimplifiedParams for more details.
Returns a simplified version of brand data containing only essential information: domain, title, colors, logos, and backdrops. Optimized for faster responses and reduced data transfer.
50 51 52 53 54 55 56 57 58 59 60 |
# File 'lib/context_dev/resources/brand.rb', line 50 def retrieve_simplified(params) parsed, = ContextDev::BrandRetrieveSimplifiedParams.dump_request(params) query = ContextDev::Internal::Util.encode_query_params(parsed) @client.request( method: :get, path: "brand/retrieve-simplified", query: query.transform_keys(max_age_ms: "maxAgeMs", timeout_ms: "timeoutMS"), model: ContextDev::Models::BrandRetrieveSimplifiedResponse, options: ) end |