diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 3741b31..4ce109a 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "1.17.1" + ".": "1.18.0" } \ No newline at end of file diff --git a/.stats.yml b/.stats.yml index 8f07be2..b6baa96 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ -configured_endpoints: 8 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/brand-dev%2Fbrand.dev-64dee37a21a809941330b048765b0eff4805b5c6959bb17f141da70e61ecb88d.yml -openapi_spec_hash: d0fc0e51311de52c3aaa5c411db0f92b -config_hash: 4e76a07aea49753a61313dcd8c10fb0f +configured_endpoints: 10 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/brand-dev%2Fbrand.dev-a634e2867f22f7485bf8ef51d18a25c010274dcbd60a420c8b35e68d017c8c95.yml +openapi_spec_hash: 8990e4b274d4563c77525b15a2723f63 +config_hash: a1303564edd6276a63d584a02b2238b2 diff --git a/CHANGELOG.md b/CHANGELOG.md index e546bf5..277aeb9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,15 @@ # Changelog +## 1.18.0 (2025-10-30) + +Full Changelog: [v1.17.1...v1.18.0](https://github.com/brand-dot-dev/python-sdk/compare/v1.17.1...v1.18.0) + +### Features + +* **api:** api update ([5dcdf4e](https://github.com/brand-dot-dev/python-sdk/commit/5dcdf4ebf86287ba4ddeb2f1e7f522975f4201d5)) +* **api:** api update ([55d0b8f](https://github.com/brand-dot-dev/python-sdk/commit/55d0b8ff29b7264baef44d29c0e787da969fe258)) +* **api:** manual updates ([bfe7d93](https://github.com/brand-dot-dev/python-sdk/commit/bfe7d93dd9719704e9f18b8397c30127affcf218)) + ## 1.17.1 (2025-10-18) Full Changelog: [v1.17.0...v1.17.1](https://github.com/brand-dot-dev/python-sdk/compare/v1.17.0...v1.17.1) diff --git a/api.md b/api.md index 4c1102e..99766f8 100644 --- a/api.md +++ b/api.md @@ -8,6 +8,8 @@ from brand.dev.types import ( BrandAIQueryResponse, BrandIdentifyFromTransactionResponse, BrandPrefetchResponse, + BrandRetrieveByNameResponse, + BrandRetrieveByTickerResponse, BrandRetrieveNaicsResponse, BrandRetrieveSimplifiedResponse, BrandScreenshotResponse, @@ -21,6 +23,8 @@ Methods: - client.brand.ai_query(\*\*params) -> BrandAIQueryResponse - client.brand.identify_from_transaction(\*\*params) -> BrandIdentifyFromTransactionResponse - client.brand.prefetch(\*\*params) -> BrandPrefetchResponse +- client.brand.retrieve_by_name(\*\*params) -> BrandRetrieveByNameResponse +- client.brand.retrieve_by_ticker(\*\*params) -> BrandRetrieveByTickerResponse - client.brand.retrieve_naics(\*\*params) -> BrandRetrieveNaicsResponse - client.brand.retrieve_simplified(\*\*params) -> BrandRetrieveSimplifiedResponse - client.brand.screenshot(\*\*params) -> BrandScreenshotResponse diff --git a/pyproject.toml b/pyproject.toml index decdb75..9d6cdd2 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "brand.dev" -version = "1.17.1" +version = "1.18.0" description = "The official Python library for the brand.dev API" dynamic = ["readme"] license = "Apache-2.0" diff --git a/src/brand/dev/_version.py b/src/brand/dev/_version.py index c43840e..77f162f 100644 --- a/src/brand/dev/_version.py +++ b/src/brand/dev/_version.py @@ -1,4 +1,4 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. __title__ = "brand.dev" -__version__ = "1.17.1" # x-release-please-version +__version__ = "1.18.0" # x-release-please-version diff --git a/src/brand/dev/resources/brand.py b/src/brand/dev/resources/brand.py index f306d27..76f275e 100644 --- a/src/brand/dev/resources/brand.py +++ b/src/brand/dev/resources/brand.py @@ -14,6 +14,8 @@ brand_screenshot_params, brand_styleguide_params, brand_retrieve_naics_params, + brand_retrieve_by_name_params, + brand_retrieve_by_ticker_params, brand_retrieve_simplified_params, brand_identify_from_transaction_params, ) @@ -34,6 +36,8 @@ from ..types.brand_screenshot_response import BrandScreenshotResponse from ..types.brand_styleguide_response import BrandStyleguideResponse from ..types.brand_retrieve_naics_response import BrandRetrieveNaicsResponse +from ..types.brand_retrieve_by_name_response import BrandRetrieveByNameResponse +from ..types.brand_retrieve_by_ticker_response import BrandRetrieveByTickerResponse from ..types.brand_retrieve_simplified_response import BrandRetrieveSimplifiedResponse from ..types.brand_identify_from_transaction_response import BrandIdentifyFromTransactionResponse @@ -120,83 +124,6 @@ def retrieve( ] | Omit = omit, max_speed: bool | Omit = omit, - name: str | Omit = omit, - ticker: str | Omit = omit, - ticker_exchange: Literal[ - "AMEX", - "AMS", - "AQS", - "ASX", - "ATH", - "BER", - "BME", - "BRU", - "BSE", - "BUD", - "BUE", - "BVC", - "CBOE", - "CNQ", - "CPH", - "DFM", - "DOH", - "DUB", - "DUS", - "DXE", - "EGX", - "FSX", - "HAM", - "HEL", - "HKSE", - "HOSE", - "ICE", - "IOB", - "IST", - "JKT", - "JNB", - "JPX", - "KLS", - "KOE", - "KSC", - "KUW", - "LIS", - "LSE", - "MCX", - "MEX", - "MIL", - "MUN", - "NASDAQ", - "NEO", - "NSE", - "NYSE", - "NZE", - "OSL", - "OTC", - "PAR", - "PNK", - "PRA", - "RIS", - "SAO", - "SAU", - "SES", - "SET", - "SGO", - "SHH", - "SHZ", - "SIX", - "STO", - "STU", - "TAI", - "TAL", - "TLV", - "TSX", - "TSXV", - "TWO", - "VIE", - "WSE", - "XETRA", - ] - | Omit = omit, timeout_ms: int | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. @@ -206,8 +133,8 @@ def retrieve( timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> BrandRetrieveResponse: """ - Retrieve brand information using one of three methods: domain name, company - name, or stock ticker symbol. Exactly one of these parameters must be provided. + Retrieve logos, backdrops, colors, industry, description, and more from any + domain Args: domain: Domain name to retrieve brand data for (e.g., 'example.com', 'google.com'). @@ -220,17 +147,6 @@ def retrieve( the API will skip time-consuming operations for faster response at the cost of less comprehensive data. Works with all three lookup methods. - name: Company name to retrieve brand data for (e.g., 'Apple Inc', 'Microsoft - Corporation'). Must be 3-30 characters. Cannot be used with domain or ticker - parameters. - - ticker: Stock ticker symbol to retrieve brand data for (e.g., 'AAPL', 'GOOGL', 'BRK.A'). - Must be 1-15 characters, letters/numbers/dots only. Cannot be used with domain - or name parameters. - - ticker_exchange: Optional stock exchange for the ticker. Only used when ticker parameter is - provided. Defaults to assume ticker is American if not specified. - timeout_ms: Optional timeout in milliseconds for the request. If the request takes longer than this value, it will be aborted with a 408 status code. Maximum allowed value is 300000ms (5 minutes). @@ -255,9 +171,6 @@ def retrieve( "domain": domain, "force_language": force_language, "max_speed": max_speed, - "name": name, - "ticker": ticker, - "ticker_exchange": ticker_exchange, "timeout_ms": timeout_ms, }, brand_retrieve_params.BrandRetrieveParams, @@ -326,6 +239,62 @@ def identify_from_transaction( self, *, transaction_info: str, + force_language: Literal[ + "albanian", + "arabic", + "azeri", + "bengali", + "bulgarian", + "cebuano", + "croatian", + "czech", + "danish", + "dutch", + "english", + "estonian", + "farsi", + "finnish", + "french", + "german", + "hausa", + "hawaiian", + "hindi", + "hungarian", + "icelandic", + "indonesian", + "italian", + "kazakh", + "kyrgyz", + "latin", + "latvian", + "lithuanian", + "macedonian", + "mongolian", + "nepali", + "norwegian", + "pashto", + "pidgin", + "polish", + "portuguese", + "romanian", + "russian", + "serbian", + "slovak", + "slovene", + "somali", + "spanish", + "swahili", + "swedish", + "tagalog", + "turkish", + "ukrainian", + "urdu", + "uzbek", + "vietnamese", + "welsh", + ] + | Omit = omit, + max_speed: bool | Omit = omit, timeout_ms: int | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. @@ -341,6 +310,12 @@ def identify_from_transaction( Args: transaction_info: Transaction information to identify the brand + force_language: Optional parameter to force the language of the retrieved brand data. + + max_speed: Optional parameter to optimize the API call for maximum speed. When set to true, + the API will skip time-consuming operations for faster response at the cost of + less comprehensive data. + timeout_ms: Optional timeout in milliseconds for the request. If the request takes longer than this value, it will be aborted with a 408 status code. Maximum allowed value is 300000ms (5 minutes). @@ -363,6 +338,8 @@ def identify_from_transaction( query=maybe_transform( { "transaction_info": transaction_info, + "force_language": force_language, + "max_speed": max_speed, "timeout_ms": timeout_ms, }, brand_identify_from_transaction_params.BrandIdentifyFromTransactionParams, @@ -419,10 +396,66 @@ def prefetch( cast_to=BrandPrefetchResponse, ) - def retrieve_naics( + def retrieve_by_name( self, *, - input: str, + name: str, + force_language: Literal[ + "albanian", + "arabic", + "azeri", + "bengali", + "bulgarian", + "cebuano", + "croatian", + "czech", + "danish", + "dutch", + "english", + "estonian", + "farsi", + "finnish", + "french", + "german", + "hausa", + "hawaiian", + "hindi", + "hungarian", + "icelandic", + "indonesian", + "italian", + "kazakh", + "kyrgyz", + "latin", + "latvian", + "lithuanian", + "macedonian", + "mongolian", + "nepali", + "norwegian", + "pashto", + "pidgin", + "polish", + "portuguese", + "romanian", + "russian", + "serbian", + "slovak", + "slovene", + "somali", + "spanish", + "swahili", + "swedish", + "tagalog", + "turkish", + "ukrainian", + "urdu", + "uzbek", + "vietnamese", + "welsh", + ] + | Omit = omit, + max_speed: bool | Omit = omit, timeout_ms: int | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. @@ -430,14 +463,21 @@ def retrieve_naics( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = not_given, - ) -> BrandRetrieveNaicsResponse: - """ - Endpoint to classify any brand into a 2022 NAICS code. + ) -> BrandRetrieveByNameResponse: + """Retrieve brand information using a company name. + + This endpoint searches for the + company by name and returns its brand data. Args: - input: Brand domain or title to retrieve NAICS code for. If a valid domain is provided - in `input`, it will be used for classification, otherwise, we will search for - the brand using the provided title. + name: Company name to retrieve brand data for (e.g., 'Apple Inc', 'Microsoft + Corporation'). Must be 3-30 characters. + + force_language: Optional parameter to force the language of the retrieved brand data. + + max_speed: Optional parameter to optimize the API call for maximum speed. When set to true, + the API will skip time-consuming operations for faster response at the cost of + less comprehensive data. timeout_ms: Optional timeout in milliseconds for the request. If the request takes longer than this value, it will be aborted with a 408 status code. Maximum allowed @@ -452,7 +492,7 @@ def retrieve_naics( timeout: Override the client-level default timeout for this request, in seconds """ return self._get( - "/brand/naics", + "/brand/retrieve-by-name", options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, @@ -460,102 +500,600 @@ def retrieve_naics( timeout=timeout, query=maybe_transform( { - "input": input, + "name": name, + "force_language": force_language, + "max_speed": max_speed, "timeout_ms": timeout_ms, }, - brand_retrieve_naics_params.BrandRetrieveNaicsParams, + brand_retrieve_by_name_params.BrandRetrieveByNameParams, ), ), - cast_to=BrandRetrieveNaicsResponse, + cast_to=BrandRetrieveByNameResponse, ) - def retrieve_simplified( + def retrieve_by_ticker( self, *, - domain: str, - timeout_ms: int | Omit = omit, - # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. - # The extra values given here take precedence over values defined on the client or passed to this method. - extra_headers: Headers | None = None, - extra_query: Query | None = None, - extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = not_given, - ) -> BrandRetrieveSimplifiedResponse: - """ - Returns a simplified version of brand data containing only essential - information: domain, title, colors, logos, and backdrops. This endpoint is - optimized for faster responses and reduced data transfer. - - Args: - domain: Domain name to retrieve simplified brand data for - - timeout_ms: Optional timeout in milliseconds for the request. If the request takes longer - than this value, it will be aborted with a 408 status code. Maximum allowed - value is 300000ms (5 minutes). - - extra_headers: Send extra headers - - extra_query: Add additional query parameters to the request - - extra_body: Add additional JSON properties to the request - - timeout: Override the client-level default timeout for this request, in seconds - """ - return self._get( - "/brand/retrieve-simplified", - options=make_request_options( - extra_headers=extra_headers, + ticker: str, + force_language: Literal[ + "albanian", + "arabic", + "azeri", + "bengali", + "bulgarian", + "cebuano", + "croatian", + "czech", + "danish", + "dutch", + "english", + "estonian", + "farsi", + "finnish", + "french", + "german", + "hausa", + "hawaiian", + "hindi", + "hungarian", + "icelandic", + "indonesian", + "italian", + "kazakh", + "kyrgyz", + "latin", + "latvian", + "lithuanian", + "macedonian", + "mongolian", + "nepali", + "norwegian", + "pashto", + "pidgin", + "polish", + "portuguese", + "romanian", + "russian", + "serbian", + "slovak", + "slovene", + "somali", + "spanish", + "swahili", + "swedish", + "tagalog", + "turkish", + "ukrainian", + "urdu", + "uzbek", + "vietnamese", + "welsh", + ] + | Omit = omit, + max_speed: bool | Omit = omit, + ticker_exchange: Literal[ + "AMEX", + "AMS", + "AQS", + "ASX", + "ATH", + "BER", + "BME", + "BRU", + "BSE", + "BUD", + "BUE", + "BVC", + "CBOE", + "CNQ", + "CPH", + "DFM", + "DOH", + "DUB", + "DUS", + "DXE", + "EGX", + "FSX", + "HAM", + "HEL", + "HKSE", + "HOSE", + "ICE", + "IOB", + "IST", + "JKT", + "JNB", + "JPX", + "KLS", + "KOE", + "KSC", + "KUW", + "LIS", + "LSE", + "MCX", + "MEX", + "MIL", + "MUN", + "NASDAQ", + "NEO", + "NSE", + "NYSE", + "NZE", + "OSL", + "OTC", + "PAR", + "PNK", + "PRA", + "RIS", + "SAO", + "SAU", + "SES", + "SET", + "SGO", + "SHH", + "SHZ", + "SIX", + "STO", + "STU", + "TAI", + "TAL", + "TLV", + "TSX", + "TSXV", + "TWO", + "VIE", + "WSE", + "XETRA", + ] + | Omit = omit, + timeout_ms: int | Omit = omit, + # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. + # The extra values given here take precedence over values defined on the client or passed to this method. + extra_headers: Headers | None = None, + extra_query: Query | None = None, + extra_body: Body | None = None, + timeout: float | httpx.Timeout | None | NotGiven = not_given, + ) -> BrandRetrieveByTickerResponse: + """Retrieve brand information using a stock ticker symbol. + + This endpoint looks up + the company associated with the ticker and returns its brand data. + + Args: + ticker: Stock ticker symbol to retrieve brand data for (e.g., 'AAPL', 'GOOGL', 'BRK.A'). + Must be 1-15 characters, letters/numbers/dots only. + + force_language: Optional parameter to force the language of the retrieved brand data. + + max_speed: Optional parameter to optimize the API call for maximum speed. When set to true, + the API will skip time-consuming operations for faster response at the cost of + less comprehensive data. + + ticker_exchange: Optional stock exchange for the ticker. Defaults to NASDAQ if not specified. + + timeout_ms: Optional timeout in milliseconds for the request. If the request takes longer + than this value, it will be aborted with a 408 status code. Maximum allowed + value is 300000ms (5 minutes). + + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + """ + return self._get( + "/brand/retrieve-by-ticker", + options=make_request_options( + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + query=maybe_transform( + { + "ticker": ticker, + "force_language": force_language, + "max_speed": max_speed, + "ticker_exchange": ticker_exchange, + "timeout_ms": timeout_ms, + }, + brand_retrieve_by_ticker_params.BrandRetrieveByTickerParams, + ), + ), + cast_to=BrandRetrieveByTickerResponse, + ) + + def retrieve_naics( + self, + *, + input: str, + timeout_ms: int | Omit = omit, + # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. + # The extra values given here take precedence over values defined on the client or passed to this method. + extra_headers: Headers | None = None, + extra_query: Query | None = None, + extra_body: Body | None = None, + timeout: float | httpx.Timeout | None | NotGiven = not_given, + ) -> BrandRetrieveNaicsResponse: + """ + Endpoint to classify any brand into a 2022 NAICS code. + + Args: + input: Brand domain or title to retrieve NAICS code for. If a valid domain is provided + in `input`, it will be used for classification, otherwise, we will search for + the brand using the provided title. + + timeout_ms: Optional timeout in milliseconds for the request. If the request takes longer + than this value, it will be aborted with a 408 status code. Maximum allowed + value is 300000ms (5 minutes). + + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + """ + return self._get( + "/brand/naics", + options=make_request_options( + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + query=maybe_transform( + { + "input": input, + "timeout_ms": timeout_ms, + }, + brand_retrieve_naics_params.BrandRetrieveNaicsParams, + ), + ), + cast_to=BrandRetrieveNaicsResponse, + ) + + def retrieve_simplified( + self, + *, + domain: str, + timeout_ms: int | Omit = omit, + # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. + # The extra values given here take precedence over values defined on the client or passed to this method. + extra_headers: Headers | None = None, + extra_query: Query | None = None, + extra_body: Body | None = None, + timeout: float | httpx.Timeout | None | NotGiven = not_given, + ) -> BrandRetrieveSimplifiedResponse: + """ + Returns a simplified version of brand data containing only essential + information: domain, title, colors, logos, and backdrops. This endpoint is + optimized for faster responses and reduced data transfer. + + Args: + domain: Domain name to retrieve simplified brand data for + + timeout_ms: Optional timeout in milliseconds for the request. If the request takes longer + than this value, it will be aborted with a 408 status code. Maximum allowed + value is 300000ms (5 minutes). + + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + """ + return self._get( + "/brand/retrieve-simplified", + options=make_request_options( + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + query=maybe_transform( + { + "domain": domain, + "timeout_ms": timeout_ms, + }, + brand_retrieve_simplified_params.BrandRetrieveSimplifiedParams, + ), + ), + cast_to=BrandRetrieveSimplifiedResponse, + ) + + def screenshot( + self, + *, + domain: str, + full_screenshot: Literal["true", "false"] | Omit = omit, + page: Literal["login", "signup", "blog", "careers", "pricing", "terms", "privacy", "contact"] | Omit = omit, + prioritize: Literal["speed", "quality"] | Omit = omit, + # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. + # The extra values given here take precedence over values defined on the client or passed to this method. + extra_headers: Headers | None = None, + extra_query: Query | None = None, + extra_body: Body | None = None, + timeout: float | httpx.Timeout | None | NotGiven = not_given, + ) -> BrandScreenshotResponse: + """Beta feature: Capture a screenshot of a website. + + Supports both viewport + (standard browser view) and full-page screenshots. Can also screenshot specific + page types (login, pricing, etc.) by using heuristics to find the appropriate + URL. Returns a URL to the uploaded screenshot image hosted on our CDN. + + Args: + domain: Domain name to take screenshot of (e.g., 'example.com', 'google.com'). The + domain will be automatically normalized and validated. + + full_screenshot: Optional parameter to determine screenshot type. If 'true', takes a full page + screenshot capturing all content. If 'false' or not provided, takes a viewport + screenshot (standard browser view). + + page: Optional parameter to specify which page type to screenshot. If provided, the + system will scrape the domain's links and use heuristics to find the most + appropriate URL for the specified page type (30 supported languages). If not + provided, screenshots the main domain landing page. + + prioritize: Optional parameter to prioritize screenshot capture. If 'speed', optimizes for + faster capture with basic quality. If 'quality', optimizes for higher quality + with longer wait times. Defaults to 'quality' if not provided. + + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + """ + return self._get( + "/brand/screenshot", + options=make_request_options( + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + query=maybe_transform( + { + "domain": domain, + "full_screenshot": full_screenshot, + "page": page, + "prioritize": prioritize, + }, + brand_screenshot_params.BrandScreenshotParams, + ), + ), + cast_to=BrandScreenshotResponse, + ) + + def styleguide( + self, + *, + domain: str, + prioritize: Literal["speed", "quality"] | Omit = omit, + timeout_ms: int | Omit = omit, + # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. + # The extra values given here take precedence over values defined on the client or passed to this method. + extra_headers: Headers | None = None, + extra_query: Query | None = None, + extra_body: Body | None = None, + timeout: float | httpx.Timeout | None | NotGiven = not_given, + ) -> BrandStyleguideResponse: + """ + Beta feature: Automatically extract comprehensive design system information from + a brand's website including colors, typography, spacing, shadows, and UI + components. + + Args: + domain: Domain name to extract styleguide from (e.g., 'example.com', 'google.com'). The + domain will be automatically normalized and validated. + + prioritize: Optional parameter to prioritize screenshot capture for styleguide extraction. + If 'speed', optimizes for faster capture with basic quality. If 'quality', + optimizes for higher quality with longer wait times. Defaults to 'quality' if + not provided. + + timeout_ms: Optional timeout in milliseconds for the request. If the request takes longer + than this value, it will be aborted with a 408 status code. Maximum allowed + value is 300000ms (5 minutes). + + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + """ + return self._get( + "/brand/styleguide", + options=make_request_options( + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + query=maybe_transform( + { + "domain": domain, + "prioritize": prioritize, + "timeout_ms": timeout_ms, + }, + brand_styleguide_params.BrandStyleguideParams, + ), + ), + cast_to=BrandStyleguideResponse, + ) + + +class AsyncBrandResource(AsyncAPIResource): + @cached_property + def with_raw_response(self) -> AsyncBrandResourceWithRawResponse: + """ + This property can be used as a prefix for any HTTP method call to return + the raw response object instead of the parsed content. + + For more information, see https://www.github.com/brand-dot-dev/python-sdk#accessing-raw-response-data-eg-headers + """ + return AsyncBrandResourceWithRawResponse(self) + + @cached_property + def with_streaming_response(self) -> AsyncBrandResourceWithStreamingResponse: + """ + An alternative to `.with_raw_response` that doesn't eagerly read the response body. + + For more information, see https://www.github.com/brand-dot-dev/python-sdk#with_streaming_response + """ + return AsyncBrandResourceWithStreamingResponse(self) + + async def retrieve( + self, + *, + domain: str | Omit = omit, + force_language: Literal[ + "albanian", + "arabic", + "azeri", + "bengali", + "bulgarian", + "cebuano", + "croatian", + "czech", + "danish", + "dutch", + "english", + "estonian", + "farsi", + "finnish", + "french", + "german", + "hausa", + "hawaiian", + "hindi", + "hungarian", + "icelandic", + "indonesian", + "italian", + "kazakh", + "kyrgyz", + "latin", + "latvian", + "lithuanian", + "macedonian", + "mongolian", + "nepali", + "norwegian", + "pashto", + "pidgin", + "polish", + "portuguese", + "romanian", + "russian", + "serbian", + "slovak", + "slovene", + "somali", + "spanish", + "swahili", + "swedish", + "tagalog", + "turkish", + "ukrainian", + "urdu", + "uzbek", + "vietnamese", + "welsh", + ] + | Omit = omit, + max_speed: bool | Omit = omit, + timeout_ms: int | Omit = omit, + # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. + # The extra values given here take precedence over values defined on the client or passed to this method. + extra_headers: Headers | None = None, + extra_query: Query | None = None, + extra_body: Body | None = None, + timeout: float | httpx.Timeout | None | NotGiven = not_given, + ) -> BrandRetrieveResponse: + """ + Retrieve logos, backdrops, colors, industry, description, and more from any + domain + + Args: + domain: Domain name to retrieve brand data for (e.g., 'example.com', 'google.com'). + Cannot be used with name or ticker parameters. + + force_language: Optional parameter to force the language of the retrieved brand data. Works with + all three lookup methods. + + max_speed: Optional parameter to optimize the API call for maximum speed. When set to true, + the API will skip time-consuming operations for faster response at the cost of + less comprehensive data. Works with all three lookup methods. + + timeout_ms: Optional timeout in milliseconds for the request. If the request takes longer + than this value, it will be aborted with a 408 status code. Maximum allowed + value is 300000ms (5 minutes). + + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + """ + return await self._get( + "/brand/retrieve", + options=make_request_options( + extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout, - query=maybe_transform( + query=await async_maybe_transform( { "domain": domain, + "force_language": force_language, + "max_speed": max_speed, "timeout_ms": timeout_ms, }, - brand_retrieve_simplified_params.BrandRetrieveSimplifiedParams, + brand_retrieve_params.BrandRetrieveParams, ), ), - cast_to=BrandRetrieveSimplifiedResponse, + cast_to=BrandRetrieveResponse, ) - def screenshot( + async def ai_query( self, *, + data_to_extract: Iterable[brand_ai_query_params.DataToExtract], domain: str, - full_screenshot: Literal["true", "false"] | Omit = omit, - page: Literal["login", "signup", "blog", "careers", "pricing", "terms", "privacy", "contact"] | Omit = omit, - prioritize: Literal["speed", "quality"] | Omit = omit, + specific_pages: brand_ai_query_params.SpecificPages | Omit = omit, + timeout_ms: int | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = not_given, - ) -> BrandScreenshotResponse: - """Beta feature: Capture a screenshot of a website. + ) -> BrandAIQueryResponse: + """Beta feature: Use AI to extract specific data points from a brand's website. - Supports both viewport - (standard browser view) and full-page screenshots. Can also screenshot specific - page types (login, pricing, etc.) by using heuristics to find the appropriate - URL. Returns a URL to the uploaded screenshot image hosted on our CDN. + The + AI will crawl the website and extract the requested information based on the + provided data points. Args: - domain: Domain name to take screenshot of (e.g., 'example.com', 'google.com'). The - domain will be automatically normalized and validated. + data_to_extract: Array of data points to extract from the website - full_screenshot: Optional parameter to determine screenshot type. If 'true', takes a full page - screenshot capturing all content. If 'false' or not provided, takes a viewport - screenshot (standard browser view). + domain: The domain name to analyze - page: Optional parameter to specify which page type to screenshot. If provided, the - system will scrape the domain's links and use heuristics to find the most - appropriate URL for the specified page type (30 supported languages). If not - provided, screenshots the main domain landing page. + specific_pages: Optional object specifying which pages to analyze - prioritize: Optional parameter to prioritize screenshot capture. If 'speed', optimizes for - faster capture with basic quality. If 'quality', optimizes for higher quality - with longer wait times. Defaults to 'quality' if not provided. + timeout_ms: Optional timeout in milliseconds for the request. If the request takes longer + than this value, it will be aborted with a 408 status code. Maximum allowed + value is 300000ms (5 minutes). extra_headers: Send extra headers @@ -565,31 +1103,140 @@ def screenshot( timeout: Override the client-level default timeout for this request, in seconds """ - return self._get( - "/brand/screenshot", + return await self._post( + "/brand/ai/query", + body=await async_maybe_transform( + { + "data_to_extract": data_to_extract, + "domain": domain, + "specific_pages": specific_pages, + "timeout_ms": timeout_ms, + }, + brand_ai_query_params.BrandAIQueryParams, + ), + options=make_request_options( + extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout + ), + cast_to=BrandAIQueryResponse, + ) + + async def identify_from_transaction( + self, + *, + transaction_info: str, + force_language: Literal[ + "albanian", + "arabic", + "azeri", + "bengali", + "bulgarian", + "cebuano", + "croatian", + "czech", + "danish", + "dutch", + "english", + "estonian", + "farsi", + "finnish", + "french", + "german", + "hausa", + "hawaiian", + "hindi", + "hungarian", + "icelandic", + "indonesian", + "italian", + "kazakh", + "kyrgyz", + "latin", + "latvian", + "lithuanian", + "macedonian", + "mongolian", + "nepali", + "norwegian", + "pashto", + "pidgin", + "polish", + "portuguese", + "romanian", + "russian", + "serbian", + "slovak", + "slovene", + "somali", + "spanish", + "swahili", + "swedish", + "tagalog", + "turkish", + "ukrainian", + "urdu", + "uzbek", + "vietnamese", + "welsh", + ] + | Omit = omit, + max_speed: bool | Omit = omit, + timeout_ms: int | Omit = omit, + # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. + # The extra values given here take precedence over values defined on the client or passed to this method. + extra_headers: Headers | None = None, + extra_query: Query | None = None, + extra_body: Body | None = None, + timeout: float | httpx.Timeout | None | NotGiven = not_given, + ) -> BrandIdentifyFromTransactionResponse: + """ + Endpoint specially designed for platforms that want to identify transaction data + by the transaction title. + + Args: + transaction_info: Transaction information to identify the brand + + force_language: Optional parameter to force the language of the retrieved brand data. + + max_speed: Optional parameter to optimize the API call for maximum speed. When set to true, + the API will skip time-consuming operations for faster response at the cost of + less comprehensive data. + + timeout_ms: Optional timeout in milliseconds for the request. If the request takes longer + than this value, it will be aborted with a 408 status code. Maximum allowed + value is 300000ms (5 minutes). + + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + """ + return await self._get( + "/brand/transaction_identifier", options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout, - query=maybe_transform( + query=await async_maybe_transform( { - "domain": domain, - "full_screenshot": full_screenshot, - "page": page, - "prioritize": prioritize, + "transaction_info": transaction_info, + "force_language": force_language, + "max_speed": max_speed, + "timeout_ms": timeout_ms, }, - brand_screenshot_params.BrandScreenshotParams, + brand_identify_from_transaction_params.BrandIdentifyFromTransactionParams, ), ), - cast_to=BrandScreenshotResponse, + cast_to=BrandIdentifyFromTransactionResponse, ) - def styleguide( + async def prefetch( self, *, domain: str, - prioritize: Literal["speed", "quality"] | Omit = omit, timeout_ms: int | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. @@ -597,20 +1244,125 @@ def styleguide( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = not_given, - ) -> BrandStyleguideResponse: - """ - Beta feature: Automatically extract comprehensive design system information from - a brand's website including colors, typography, spacing, shadows, and UI - components. + ) -> BrandPrefetchResponse: + """ + Signal that you may fetch brand data for a particular domain soon to improve + latency. This endpoint does not charge credits and is available for paid + customers to optimize future requests. [You must be on a paid plan to use this + endpoint] + + Args: + domain: Domain name to prefetch brand data for + + timeout_ms: Optional timeout in milliseconds for the request. If the request takes longer + than this value, it will be aborted with a 408 status code. Maximum allowed + value is 300000ms (5 minutes). + + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + """ + return await self._post( + "/brand/prefetch", + body=await async_maybe_transform( + { + "domain": domain, + "timeout_ms": timeout_ms, + }, + brand_prefetch_params.BrandPrefetchParams, + ), + options=make_request_options( + extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout + ), + cast_to=BrandPrefetchResponse, + ) + + async def retrieve_by_name( + self, + *, + name: str, + force_language: Literal[ + "albanian", + "arabic", + "azeri", + "bengali", + "bulgarian", + "cebuano", + "croatian", + "czech", + "danish", + "dutch", + "english", + "estonian", + "farsi", + "finnish", + "french", + "german", + "hausa", + "hawaiian", + "hindi", + "hungarian", + "icelandic", + "indonesian", + "italian", + "kazakh", + "kyrgyz", + "latin", + "latvian", + "lithuanian", + "macedonian", + "mongolian", + "nepali", + "norwegian", + "pashto", + "pidgin", + "polish", + "portuguese", + "romanian", + "russian", + "serbian", + "slovak", + "slovene", + "somali", + "spanish", + "swahili", + "swedish", + "tagalog", + "turkish", + "ukrainian", + "urdu", + "uzbek", + "vietnamese", + "welsh", + ] + | Omit = omit, + max_speed: bool | Omit = omit, + timeout_ms: int | Omit = omit, + # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. + # The extra values given here take precedence over values defined on the client or passed to this method. + extra_headers: Headers | None = None, + extra_query: Query | None = None, + extra_body: Body | None = None, + timeout: float | httpx.Timeout | None | NotGiven = not_given, + ) -> BrandRetrieveByNameResponse: + """Retrieve brand information using a company name. + + This endpoint searches for the + company by name and returns its brand data. Args: - domain: Domain name to extract styleguide from (e.g., 'example.com', 'google.com'). The - domain will be automatically normalized and validated. + name: Company name to retrieve brand data for (e.g., 'Apple Inc', 'Microsoft + Corporation'). Must be 3-30 characters. - prioritize: Optional parameter to prioritize screenshot capture for styleguide extraction. - If 'speed', optimizes for faster capture with basic quality. If 'quality', - optimizes for higher quality with longer wait times. Defaults to 'quality' if - not provided. + force_language: Optional parameter to force the language of the retrieved brand data. + + max_speed: Optional parameter to optimize the API call for maximum speed. When set to true, + the API will skip time-consuming operations for faster response at the cost of + less comprehensive data. timeout_ms: Optional timeout in milliseconds for the request. If the request takes longer than this value, it will be aborted with a 408 status code. Maximum allowed @@ -624,50 +1376,30 @@ def styleguide( timeout: Override the client-level default timeout for this request, in seconds """ - return self._get( - "/brand/styleguide", + return await self._get( + "/brand/retrieve-by-name", options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout, - query=maybe_transform( + query=await async_maybe_transform( { - "domain": domain, - "prioritize": prioritize, + "name": name, + "force_language": force_language, + "max_speed": max_speed, "timeout_ms": timeout_ms, }, - brand_styleguide_params.BrandStyleguideParams, + brand_retrieve_by_name_params.BrandRetrieveByNameParams, ), ), - cast_to=BrandStyleguideResponse, + cast_to=BrandRetrieveByNameResponse, ) - -class AsyncBrandResource(AsyncAPIResource): - @cached_property - def with_raw_response(self) -> AsyncBrandResourceWithRawResponse: - """ - This property can be used as a prefix for any HTTP method call to return - the raw response object instead of the parsed content. - - For more information, see https://www.github.com/brand-dot-dev/python-sdk#accessing-raw-response-data-eg-headers - """ - return AsyncBrandResourceWithRawResponse(self) - - @cached_property - def with_streaming_response(self) -> AsyncBrandResourceWithStreamingResponse: - """ - An alternative to `.with_raw_response` that doesn't eagerly read the response body. - - For more information, see https://www.github.com/brand-dot-dev/python-sdk#with_streaming_response - """ - return AsyncBrandResourceWithStreamingResponse(self) - - async def retrieve( + async def retrieve_by_ticker( self, *, - domain: str | Omit = omit, + ticker: str, force_language: Literal[ "albanian", "arabic", @@ -724,8 +1456,6 @@ async def retrieve( ] | Omit = omit, max_speed: bool | Omit = omit, - name: str | Omit = omit, - ticker: str | Omit = omit, ticker_exchange: Literal[ "AMEX", "AMS", @@ -808,32 +1538,23 @@ async def retrieve( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = not_given, - ) -> BrandRetrieveResponse: - """ - Retrieve brand information using one of three methods: domain name, company - name, or stock ticker symbol. Exactly one of these parameters must be provided. + ) -> BrandRetrieveByTickerResponse: + """Retrieve brand information using a stock ticker symbol. + + This endpoint looks up + the company associated with the ticker and returns its brand data. Args: - domain: Domain name to retrieve brand data for (e.g., 'example.com', 'google.com'). - Cannot be used with name or ticker parameters. + ticker: Stock ticker symbol to retrieve brand data for (e.g., 'AAPL', 'GOOGL', 'BRK.A'). + Must be 1-15 characters, letters/numbers/dots only. - force_language: Optional parameter to force the language of the retrieved brand data. Works with - all three lookup methods. + force_language: Optional parameter to force the language of the retrieved brand data. max_speed: Optional parameter to optimize the API call for maximum speed. When set to true, the API will skip time-consuming operations for faster response at the cost of - less comprehensive data. Works with all three lookup methods. - - name: Company name to retrieve brand data for (e.g., 'Apple Inc', 'Microsoft - Corporation'). Must be 3-30 characters. Cannot be used with domain or ticker - parameters. - - ticker: Stock ticker symbol to retrieve brand data for (e.g., 'AAPL', 'GOOGL', 'BRK.A'). - Must be 1-15 characters, letters/numbers/dots only. Cannot be used with domain - or name parameters. + less comprehensive data. - ticker_exchange: Optional stock exchange for the ticker. Only used when ticker parameter is - provided. Defaults to assume ticker is American if not specified. + ticker_exchange: Optional stock exchange for the ticker. Defaults to NASDAQ if not specified. timeout_ms: Optional timeout in milliseconds for the request. If the request takes longer than this value, it will be aborted with a 408 status code. Maximum allowed @@ -848,7 +1569,7 @@ async def retrieve( timeout: Override the client-level default timeout for this request, in seconds """ return await self._get( - "/brand/retrieve", + "/brand/retrieve-by-ticker", options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, @@ -856,171 +1577,16 @@ async def retrieve( timeout=timeout, query=await async_maybe_transform( { - "domain": domain, + "ticker": ticker, "force_language": force_language, "max_speed": max_speed, - "name": name, - "ticker": ticker, "ticker_exchange": ticker_exchange, "timeout_ms": timeout_ms, }, - brand_retrieve_params.BrandRetrieveParams, - ), - ), - cast_to=BrandRetrieveResponse, - ) - - async def ai_query( - self, - *, - data_to_extract: Iterable[brand_ai_query_params.DataToExtract], - domain: str, - specific_pages: brand_ai_query_params.SpecificPages | Omit = omit, - timeout_ms: int | Omit = omit, - # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. - # The extra values given here take precedence over values defined on the client or passed to this method. - extra_headers: Headers | None = None, - extra_query: Query | None = None, - extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = not_given, - ) -> BrandAIQueryResponse: - """Beta feature: Use AI to extract specific data points from a brand's website. - - The - AI will crawl the website and extract the requested information based on the - provided data points. - - Args: - data_to_extract: Array of data points to extract from the website - - domain: The domain name to analyze - - specific_pages: Optional object specifying which pages to analyze - - timeout_ms: Optional timeout in milliseconds for the request. If the request takes longer - than this value, it will be aborted with a 408 status code. Maximum allowed - value is 300000ms (5 minutes). - - extra_headers: Send extra headers - - extra_query: Add additional query parameters to the request - - extra_body: Add additional JSON properties to the request - - timeout: Override the client-level default timeout for this request, in seconds - """ - return await self._post( - "/brand/ai/query", - body=await async_maybe_transform( - { - "data_to_extract": data_to_extract, - "domain": domain, - "specific_pages": specific_pages, - "timeout_ms": timeout_ms, - }, - brand_ai_query_params.BrandAIQueryParams, - ), - options=make_request_options( - extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout - ), - cast_to=BrandAIQueryResponse, - ) - - async def identify_from_transaction( - self, - *, - transaction_info: str, - timeout_ms: int | Omit = omit, - # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. - # The extra values given here take precedence over values defined on the client or passed to this method. - extra_headers: Headers | None = None, - extra_query: Query | None = None, - extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = not_given, - ) -> BrandIdentifyFromTransactionResponse: - """ - Endpoint specially designed for platforms that want to identify transaction data - by the transaction title. - - Args: - transaction_info: Transaction information to identify the brand - - timeout_ms: Optional timeout in milliseconds for the request. If the request takes longer - than this value, it will be aborted with a 408 status code. Maximum allowed - value is 300000ms (5 minutes). - - extra_headers: Send extra headers - - extra_query: Add additional query parameters to the request - - extra_body: Add additional JSON properties to the request - - timeout: Override the client-level default timeout for this request, in seconds - """ - return await self._get( - "/brand/transaction_identifier", - options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - query=await async_maybe_transform( - { - "transaction_info": transaction_info, - "timeout_ms": timeout_ms, - }, - brand_identify_from_transaction_params.BrandIdentifyFromTransactionParams, + brand_retrieve_by_ticker_params.BrandRetrieveByTickerParams, ), ), - cast_to=BrandIdentifyFromTransactionResponse, - ) - - async def prefetch( - self, - *, - domain: str, - timeout_ms: int | Omit = omit, - # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. - # The extra values given here take precedence over values defined on the client or passed to this method. - extra_headers: Headers | None = None, - extra_query: Query | None = None, - extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = not_given, - ) -> BrandPrefetchResponse: - """ - Signal that you may fetch brand data for a particular domain soon to improve - latency. This endpoint does not charge credits and is available for paid - customers to optimize future requests. [You must be on a paid plan to use this - endpoint] - - Args: - domain: Domain name to prefetch brand data for - - timeout_ms: Optional timeout in milliseconds for the request. If the request takes longer - than this value, it will be aborted with a 408 status code. Maximum allowed - value is 300000ms (5 minutes). - - extra_headers: Send extra headers - - extra_query: Add additional query parameters to the request - - extra_body: Add additional JSON properties to the request - - timeout: Override the client-level default timeout for this request, in seconds - """ - return await self._post( - "/brand/prefetch", - body=await async_maybe_transform( - { - "domain": domain, - "timeout_ms": timeout_ms, - }, - brand_prefetch_params.BrandPrefetchParams, - ), - options=make_request_options( - extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout - ), - cast_to=BrandPrefetchResponse, + cast_to=BrandRetrieveByTickerResponse, ) async def retrieve_naics( @@ -1264,6 +1830,12 @@ def __init__(self, brand: BrandResource) -> None: self.prefetch = to_raw_response_wrapper( brand.prefetch, ) + self.retrieve_by_name = to_raw_response_wrapper( + brand.retrieve_by_name, + ) + self.retrieve_by_ticker = to_raw_response_wrapper( + brand.retrieve_by_ticker, + ) self.retrieve_naics = to_raw_response_wrapper( brand.retrieve_naics, ) @@ -1294,6 +1866,12 @@ def __init__(self, brand: AsyncBrandResource) -> None: self.prefetch = async_to_raw_response_wrapper( brand.prefetch, ) + self.retrieve_by_name = async_to_raw_response_wrapper( + brand.retrieve_by_name, + ) + self.retrieve_by_ticker = async_to_raw_response_wrapper( + brand.retrieve_by_ticker, + ) self.retrieve_naics = async_to_raw_response_wrapper( brand.retrieve_naics, ) @@ -1324,6 +1902,12 @@ def __init__(self, brand: BrandResource) -> None: self.prefetch = to_streamed_response_wrapper( brand.prefetch, ) + self.retrieve_by_name = to_streamed_response_wrapper( + brand.retrieve_by_name, + ) + self.retrieve_by_ticker = to_streamed_response_wrapper( + brand.retrieve_by_ticker, + ) self.retrieve_naics = to_streamed_response_wrapper( brand.retrieve_naics, ) @@ -1354,6 +1938,12 @@ def __init__(self, brand: AsyncBrandResource) -> None: self.prefetch = async_to_streamed_response_wrapper( brand.prefetch, ) + self.retrieve_by_name = async_to_streamed_response_wrapper( + brand.retrieve_by_name, + ) + self.retrieve_by_ticker = async_to_streamed_response_wrapper( + brand.retrieve_by_ticker, + ) self.retrieve_naics = async_to_streamed_response_wrapper( brand.retrieve_naics, ) diff --git a/src/brand/dev/types/__init__.py b/src/brand/dev/types/__init__.py index a4dff66..e038cbb 100644 --- a/src/brand/dev/types/__init__.py +++ b/src/brand/dev/types/__init__.py @@ -13,8 +13,12 @@ from .brand_screenshot_response import BrandScreenshotResponse as BrandScreenshotResponse from .brand_styleguide_response import BrandStyleguideResponse as BrandStyleguideResponse from .brand_retrieve_naics_params import BrandRetrieveNaicsParams as BrandRetrieveNaicsParams +from .brand_retrieve_by_name_params import BrandRetrieveByNameParams as BrandRetrieveByNameParams from .brand_retrieve_naics_response import BrandRetrieveNaicsResponse as BrandRetrieveNaicsResponse +from .brand_retrieve_by_name_response import BrandRetrieveByNameResponse as BrandRetrieveByNameResponse +from .brand_retrieve_by_ticker_params import BrandRetrieveByTickerParams as BrandRetrieveByTickerParams from .brand_retrieve_simplified_params import BrandRetrieveSimplifiedParams as BrandRetrieveSimplifiedParams +from .brand_retrieve_by_ticker_response import BrandRetrieveByTickerResponse as BrandRetrieveByTickerResponse from .brand_retrieve_simplified_response import BrandRetrieveSimplifiedResponse as BrandRetrieveSimplifiedResponse from .brand_identify_from_transaction_params import ( BrandIdentifyFromTransactionParams as BrandIdentifyFromTransactionParams, diff --git a/src/brand/dev/types/brand_identify_from_transaction_params.py b/src/brand/dev/types/brand_identify_from_transaction_params.py index 186f08f..9878fd9 100644 --- a/src/brand/dev/types/brand_identify_from_transaction_params.py +++ b/src/brand/dev/types/brand_identify_from_transaction_params.py @@ -2,7 +2,7 @@ from __future__ import annotations -from typing_extensions import Required, Annotated, TypedDict +from typing_extensions import Literal, Required, Annotated, TypedDict from .._utils import PropertyInfo @@ -13,6 +13,69 @@ class BrandIdentifyFromTransactionParams(TypedDict, total=False): transaction_info: Required[str] """Transaction information to identify the brand""" + force_language: Literal[ + "albanian", + "arabic", + "azeri", + "bengali", + "bulgarian", + "cebuano", + "croatian", + "czech", + "danish", + "dutch", + "english", + "estonian", + "farsi", + "finnish", + "french", + "german", + "hausa", + "hawaiian", + "hindi", + "hungarian", + "icelandic", + "indonesian", + "italian", + "kazakh", + "kyrgyz", + "latin", + "latvian", + "lithuanian", + "macedonian", + "mongolian", + "nepali", + "norwegian", + "pashto", + "pidgin", + "polish", + "portuguese", + "romanian", + "russian", + "serbian", + "slovak", + "slovene", + "somali", + "spanish", + "swahili", + "swedish", + "tagalog", + "turkish", + "ukrainian", + "urdu", + "uzbek", + "vietnamese", + "welsh", + ] + """Optional parameter to force the language of the retrieved brand data.""" + + max_speed: Annotated[bool, PropertyInfo(alias="maxSpeed")] + """Optional parameter to optimize the API call for maximum speed. + + When set to true, the API will skip time-consuming operations for faster + response at the cost of less comprehensive data. + """ + timeout_ms: Annotated[int, PropertyInfo(alias="timeoutMS")] """Optional timeout in milliseconds for the request. diff --git a/src/brand/dev/types/brand_retrieve_by_name_params.py b/src/brand/dev/types/brand_retrieve_by_name_params.py new file mode 100644 index 0000000..f8a7f76 --- /dev/null +++ b/src/brand/dev/types/brand_retrieve_by_name_params.py @@ -0,0 +1,87 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from __future__ import annotations + +from typing_extensions import Literal, Required, Annotated, TypedDict + +from .._utils import PropertyInfo + +__all__ = ["BrandRetrieveByNameParams"] + + +class BrandRetrieveByNameParams(TypedDict, total=False): + name: Required[str] + """ + Company name to retrieve brand data for (e.g., 'Apple Inc', 'Microsoft + Corporation'). Must be 3-30 characters. + """ + + force_language: Literal[ + "albanian", + "arabic", + "azeri", + "bengali", + "bulgarian", + "cebuano", + "croatian", + "czech", + "danish", + "dutch", + "english", + "estonian", + "farsi", + "finnish", + "french", + "german", + "hausa", + "hawaiian", + "hindi", + "hungarian", + "icelandic", + "indonesian", + "italian", + "kazakh", + "kyrgyz", + "latin", + "latvian", + "lithuanian", + "macedonian", + "mongolian", + "nepali", + "norwegian", + "pashto", + "pidgin", + "polish", + "portuguese", + "romanian", + "russian", + "serbian", + "slovak", + "slovene", + "somali", + "spanish", + "swahili", + "swedish", + "tagalog", + "turkish", + "ukrainian", + "urdu", + "uzbek", + "vietnamese", + "welsh", + ] + """Optional parameter to force the language of the retrieved brand data.""" + + max_speed: Annotated[bool, PropertyInfo(alias="maxSpeed")] + """Optional parameter to optimize the API call for maximum speed. + + When set to true, the API will skip time-consuming operations for faster + response at the cost of less comprehensive data. + """ + + timeout_ms: Annotated[int, PropertyInfo(alias="timeoutMS")] + """Optional timeout in milliseconds for the request. + + If the request takes longer than this value, it will be aborted with a 408 + status code. Maximum allowed value is 300000ms (5 minutes). + """ diff --git a/src/brand/dev/types/brand_retrieve_by_name_response.py b/src/brand/dev/types/brand_retrieve_by_name_response.py new file mode 100644 index 0000000..db66fac --- /dev/null +++ b/src/brand/dev/types/brand_retrieve_by_name_response.py @@ -0,0 +1,481 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from typing import List, Optional +from typing_extensions import Literal + +from .._models import BaseModel + +__all__ = [ + "BrandRetrieveByNameResponse", + "Brand", + "BrandAddress", + "BrandBackdrop", + "BrandBackdropColor", + "BrandBackdropResolution", + "BrandColor", + "BrandIndustries", + "BrandIndustriesEic", + "BrandLinks", + "BrandLogo", + "BrandLogoColor", + "BrandLogoResolution", + "BrandSocial", + "BrandStock", +] + + +class BrandAddress(BaseModel): + city: Optional[str] = None + """City name""" + + country: Optional[str] = None + """Country name""" + + country_code: Optional[str] = None + """Country code""" + + postal_code: Optional[str] = None + """Postal or ZIP code""" + + state_code: Optional[str] = None + """State or province code""" + + state_province: Optional[str] = None + """State or province name""" + + street: Optional[str] = None + """Street address""" + + +class BrandBackdropColor(BaseModel): + hex: Optional[str] = None + """Color in hexadecimal format""" + + name: Optional[str] = None + """Name of the color""" + + +class BrandBackdropResolution(BaseModel): + aspect_ratio: Optional[float] = None + """Aspect ratio of the image (width/height)""" + + height: Optional[int] = None + """Height of the image in pixels""" + + width: Optional[int] = None + """Width of the image in pixels""" + + +class BrandBackdrop(BaseModel): + colors: Optional[List[BrandBackdropColor]] = None + """Array of colors in the backdrop image""" + + resolution: Optional[BrandBackdropResolution] = None + """Resolution of the backdrop image""" + + url: Optional[str] = None + """URL of the backdrop image""" + + +class BrandColor(BaseModel): + hex: Optional[str] = None + """Color in hexadecimal format""" + + name: Optional[str] = None + """Name of the color""" + + +class BrandIndustriesEic(BaseModel): + industry: Literal[ + "Aerospace & Defense", + "Technology", + "Finance", + "Healthcare", + "Retail & E-commerce", + "Entertainment", + "Education", + "Government & Nonprofit", + "Industrial & Energy", + "Automotive & Transportation", + "Lifestyle & Leisure", + "Luxury & Fashion", + "News & Media", + "Sports", + "Real Estate & PropTech", + "Legal & Compliance", + "Telecommunications", + "Agriculture & Food", + "Professional Services & Agencies", + "Chemicals & Materials", + "Logistics & Supply Chain", + "Hospitality & Tourism", + "Construction & Built Environment", + "Consumer Packaged Goods (CPG)", + ] + """Industry classification enum""" + + subindustry: Literal[ + "Defense Systems & Military Hardware", + "Aerospace Manufacturing", + "Avionics & Navigation Technology", + "Subsea & Naval Defense Systems", + "Space & Satellite Technology", + "Defense IT & Systems Integration", + "Software (B2B)", + "Software (B2C)", + "Cloud Infrastructure & DevOps", + "Cybersecurity", + "Artificial Intelligence & Machine Learning", + "Data Infrastructure & Analytics", + "Hardware & Semiconductors", + "Fintech Infrastructure", + "eCommerce & Marketplace Platforms", + "Developer Tools & APIs", + "Web3 & Blockchain", + "XR & Spatial Computing", + "Banking & Lending", + "Investment Management & WealthTech", + "Insurance & InsurTech", + "Payments & Money Movement", + "Accounting, Tax & Financial Planning Tools", + "Capital Markets & Trading Platforms", + "Financial Infrastructure & APIs", + "Credit Scoring & Risk Management", + "Cryptocurrency & Digital Assets", + "BNPL & Alternative Financing", + "Healthcare Providers & Services", + "Pharmaceuticals & Drug Development", + "Medical Devices & Diagnostics", + "Biotechnology & Genomics", + "Digital Health & Telemedicine", + "Health Insurance & Benefits Tech", + "Clinical Trials & Research Platforms", + "Mental Health & Wellness", + "Healthcare IT & EHR Systems", + "Consumer Health & Wellness Products", + "Online Marketplaces", + "Direct-to-Consumer (DTC) Brands", + "Retail Tech & Point-of-Sale Systems", + "Omnichannel & In-Store Retail", + "E-commerce Enablement & Infrastructure", + "Subscription & Membership Commerce", + "Social Commerce & Influencer Platforms", + "Fashion & Apparel Retail", + "Food, Beverage & Grocery E-commerce", + "Streaming Platforms (Video, Music, Audio)", + "Gaming & Interactive Entertainment", + "Creator Economy & Influencer Platforms", + "Advertising, Adtech & Media Buying", + "Film, TV & Production Studios", + "Events, Venues & Live Entertainment", + "Virtual Worlds & Metaverse Experiences", + "K-12 Education Platforms & Tools", + "Higher Education & University Tech", + "Online Learning & MOOCs", + "Test Prep & Certification", + "Corporate Training & Upskilling", + "Tutoring & Supplemental Learning", + "Education Management Systems (LMS/SIS)", + "Language Learning", + "Creator-Led & Cohort-Based Courses", + "Special Education & Accessibility Tools", + "Government Technology & Digital Services", + "Civic Engagement & Policy Platforms", + "International Development & Humanitarian Aid", + "Philanthropy & Grantmaking", + "Nonprofit Operations & Fundraising Tools", + "Public Health & Social Services", + "Education & Youth Development Programs", + "Environmental & Climate Action Organizations", + "Legal Aid & Social Justice Advocacy", + "Municipal & Infrastructure Services", + "Manufacturing & Industrial Automation", + "Energy Production (Oil, Gas, Nuclear)", + "Renewable Energy & Cleantech", + "Utilities & Grid Infrastructure", + "Industrial IoT & Monitoring Systems", + "Construction & Heavy Equipment", + "Mining & Natural Resources", + "Environmental Engineering & Sustainability", + "Energy Storage & Battery Technology", + "Automotive OEMs & Vehicle Manufacturing", + "Electric Vehicles (EVs) & Charging Infrastructure", + "Mobility-as-a-Service (MaaS)", + "Fleet Management", + "Public Transit & Urban Mobility", + "Autonomous Vehicles & ADAS", + "Aftermarket Parts & Services", + "Telematics & Vehicle Connectivity", + "Aviation & Aerospace Transport", + "Maritime Shipping", + "Fitness & Wellness", + "Beauty & Personal Care", + "Home & Living", + "Dating & Relationships", + "Hobbies, Crafts & DIY", + "Outdoor & Recreational Gear", + "Events, Experiences & Ticketing Platforms", + "Designer & Luxury Apparel", + "Accessories, Jewelry & Watches", + "Footwear & Leather Goods", + "Beauty, Fragrance & Skincare", + "Fashion Marketplaces & Retail Platforms", + "Sustainable & Ethical Fashion", + "Resale, Vintage & Circular Fashion", + "Fashion Tech & Virtual Try-Ons", + "Streetwear & Emerging Luxury", + "Couture & Made-to-Measure", + "News Publishing & Journalism", + "Digital Media & Content Platforms", + "Broadcasting (TV & Radio)", + "Podcasting & Audio Media", + "News Aggregators & Curation Tools", + "Independent & Creator-Led Media", + "Newsletters & Substack-Style Platforms", + "Political & Investigative Media", + "Trade & Niche Publications", + "Media Monitoring & Analytics", + "Professional Teams & Leagues", + "Sports Media & Broadcasting", + "Sports Betting & Fantasy Sports", + "Fitness & Athletic Training Platforms", + "Sportswear & Equipment", + "Esports & Competitive Gaming", + "Sports Venues & Event Management", + "Athlete Management & Talent Agencies", + "Sports Tech & Performance Analytics", + "Youth, Amateur & Collegiate Sports", + "Real Estate Marketplaces", + "Property Management Software", + "Rental Platforms", + "Mortgage & Lending Tech", + "Real Estate Investment Platforms", + "Law Firms & Legal Services", + "Legal Tech & Automation", + "Regulatory Compliance", + "E-Discovery & Litigation Tools", + "Contract Management", + "Governance, Risk & Compliance (GRC)", + "IP & Trademark Management", + "Legal Research & Intelligence", + "Compliance Training & Certification", + "Whistleblower & Ethics Reporting", + "Mobile & Wireless Networks (3G/4G/5G)", + "Broadband & Fiber Internet", + "Satellite & Space-Based Communications", + "Network Equipment & Infrastructure", + "Telecom Billing & OSS/BSS Systems", + "VoIP & Unified Communications", + "Internet Service Providers (ISPs)", + "Edge Computing & Network Virtualization", + "IoT Connectivity Platforms", + "Precision Agriculture & AgTech", + "Crop & Livestock Production", + "Food & Beverage Manufacturing & Processing", + "Food Distribution", + "Restaurants & Food Service", + "Agricultural Inputs & Equipment", + "Sustainable & Regenerative Agriculture", + "Seafood & Aquaculture", + "Management Consulting", + "Marketing & Advertising Agencies", + "Design, Branding & Creative Studios", + "IT Services & Managed Services", + "Staffing, Recruiting & Talent", + "Accounting & Tax Firms", + "Public Relations & Communications", + "Business Process Outsourcing (BPO)", + "Professional Training & Coaching", + "Specialty Chemicals", + "Commodity & Petrochemicals", + "Polymers, Plastics & Rubber", + "Coatings, Adhesives & Sealants", + "Industrial Gases", + "Advanced Materials & Composites", + "Battery Materials & Energy Storage", + "Electronic Materials & Semiconductor Chemicals", + "Agrochemicals & Fertilizers", + "Freight & Transportation Tech", + "Last-Mile Delivery", + "Warehouse Automation", + "Supply Chain Visibility Platforms", + "Logistics Marketplaces", + "Shipping & Freight Forwarding", + "Cold Chain Logistics", + "Reverse Logistics & Returns", + "Cross-Border Trade Tech", + "Transportation Management Systems (TMS)", + "Hotels & Accommodation", + "Vacation Rentals & Short-Term Stays", + "Restaurant Tech & Management", + "Travel Booking Platforms", + "Tourism Experiences & Activities", + "Cruise Lines & Marine Tourism", + "Hospitality Management Systems", + "Event & Venue Management", + "Corporate Travel Management", + "Travel Insurance & Protection", + "Construction Management Software", + "BIM/CAD & Design Tools", + "Construction Marketplaces", + "Equipment Rental & Management", + "Building Materials & Procurement", + "Construction Workforce Management", + "Project Estimation & Bidding", + "Modular & Prefab Construction", + "Construction Safety & Compliance", + "Smart Building Technology", + "Food & Beverage CPG", + "Home & Personal Care CPG", + "CPG Analytics & Insights", + "Direct-to-Consumer CPG Brands", + "CPG Supply Chain & Distribution", + "Private Label Manufacturing", + "CPG Retail Intelligence", + "Sustainable CPG & Packaging", + "Beauty & Cosmetics CPG", + "Health & Wellness CPG", + ] + """Subindustry classification enum""" + + +class BrandIndustries(BaseModel): + eic: Optional[List[BrandIndustriesEic]] = None + """Easy Industry Classification - array of industry and subindustry pairs""" + + +class BrandLinks(BaseModel): + blog: Optional[str] = None + """URL to the brand's blog or news page""" + + careers: Optional[str] = None + """URL to the brand's careers or job opportunities page""" + + contact: Optional[str] = None + """URL to the brand's contact or contact us page""" + + pricing: Optional[str] = None + """URL to the brand's pricing or plans page""" + + privacy: Optional[str] = None + """URL to the brand's privacy policy page""" + + terms: Optional[str] = None + """URL to the brand's terms of service or terms and conditions page""" + + +class BrandLogoColor(BaseModel): + hex: Optional[str] = None + """Color in hexadecimal format""" + + name: Optional[str] = None + """Name of the color""" + + +class BrandLogoResolution(BaseModel): + aspect_ratio: Optional[float] = None + """Aspect ratio of the image (width/height)""" + + height: Optional[int] = None + """Height of the image in pixels""" + + width: Optional[int] = None + """Width of the image in pixels""" + + +class BrandLogo(BaseModel): + colors: Optional[List[BrandLogoColor]] = None + """Array of colors in the logo""" + + mode: Optional[Literal["light", "dark", "has_opaque_background"]] = None + """ + Indicates when this logo is best used: 'light' = best for light mode, 'dark' = + best for dark mode, 'has_opaque_background' = can be used for either as image + has its own background + """ + + resolution: Optional[BrandLogoResolution] = None + """Resolution of the logo image""" + + type: Optional[Literal["icon", "logo"]] = None + """Type of the logo based on resolution (e.g., 'icon', 'logo')""" + + url: Optional[str] = None + """CDN hosted url of the logo (ready for display)""" + + +class BrandSocial(BaseModel): + type: Optional[str] = None + """Type of social media, e.g., 'facebook', 'twitter'""" + + url: Optional[str] = None + """URL of the social media page""" + + +class BrandStock(BaseModel): + exchange: Optional[str] = None + """Stock exchange name""" + + ticker: Optional[str] = None + """Stock ticker symbol""" + + +class Brand(BaseModel): + address: Optional[BrandAddress] = None + """Physical address of the brand""" + + backdrops: Optional[List[BrandBackdrop]] = None + """An array of backdrop images for the brand""" + + colors: Optional[List[BrandColor]] = None + """An array of brand colors""" + + description: Optional[str] = None + """A brief description of the brand""" + + domain: Optional[str] = None + """The domain name of the brand""" + + email: Optional[str] = None + """Company email address""" + + industries: Optional[BrandIndustries] = None + """Industry classification information for the brand""" + + is_nsfw: Optional[bool] = None + """Indicates whether the brand content is not safe for work (NSFW)""" + + links: Optional[BrandLinks] = None + """Important website links for the brand""" + + logos: Optional[List[BrandLogo]] = None + """An array of logos associated with the brand""" + + phone: Optional[str] = None + """Company phone number""" + + slogan: Optional[str] = None + """The brand's slogan""" + + socials: Optional[List[BrandSocial]] = None + """An array of social media links for the brand""" + + stock: Optional[BrandStock] = None + """ + Stock market information for this brand (will be null if not a publicly traded + company) + """ + + title: Optional[str] = None + """The title or name of the brand""" + + +class BrandRetrieveByNameResponse(BaseModel): + brand: Optional[Brand] = None + """Detailed brand information""" + + code: Optional[int] = None + """HTTP status code""" + + status: Optional[str] = None + """Status of the response, e.g., 'ok'""" diff --git a/src/brand/dev/types/brand_retrieve_by_ticker_params.py b/src/brand/dev/types/brand_retrieve_by_ticker_params.py new file mode 100644 index 0000000..4bbdb2f --- /dev/null +++ b/src/brand/dev/types/brand_retrieve_by_ticker_params.py @@ -0,0 +1,163 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from __future__ import annotations + +from typing_extensions import Literal, Required, Annotated, TypedDict + +from .._utils import PropertyInfo + +__all__ = ["BrandRetrieveByTickerParams"] + + +class BrandRetrieveByTickerParams(TypedDict, total=False): + ticker: Required[str] + """Stock ticker symbol to retrieve brand data for (e.g., 'AAPL', 'GOOGL', 'BRK.A'). + + Must be 1-15 characters, letters/numbers/dots only. + """ + + force_language: Literal[ + "albanian", + "arabic", + "azeri", + "bengali", + "bulgarian", + "cebuano", + "croatian", + "czech", + "danish", + "dutch", + "english", + "estonian", + "farsi", + "finnish", + "french", + "german", + "hausa", + "hawaiian", + "hindi", + "hungarian", + "icelandic", + "indonesian", + "italian", + "kazakh", + "kyrgyz", + "latin", + "latvian", + "lithuanian", + "macedonian", + "mongolian", + "nepali", + "norwegian", + "pashto", + "pidgin", + "polish", + "portuguese", + "romanian", + "russian", + "serbian", + "slovak", + "slovene", + "somali", + "spanish", + "swahili", + "swedish", + "tagalog", + "turkish", + "ukrainian", + "urdu", + "uzbek", + "vietnamese", + "welsh", + ] + """Optional parameter to force the language of the retrieved brand data.""" + + max_speed: Annotated[bool, PropertyInfo(alias="maxSpeed")] + """Optional parameter to optimize the API call for maximum speed. + + When set to true, the API will skip time-consuming operations for faster + response at the cost of less comprehensive data. + """ + + ticker_exchange: Literal[ + "AMEX", + "AMS", + "AQS", + "ASX", + "ATH", + "BER", + "BME", + "BRU", + "BSE", + "BUD", + "BUE", + "BVC", + "CBOE", + "CNQ", + "CPH", + "DFM", + "DOH", + "DUB", + "DUS", + "DXE", + "EGX", + "FSX", + "HAM", + "HEL", + "HKSE", + "HOSE", + "ICE", + "IOB", + "IST", + "JKT", + "JNB", + "JPX", + "KLS", + "KOE", + "KSC", + "KUW", + "LIS", + "LSE", + "MCX", + "MEX", + "MIL", + "MUN", + "NASDAQ", + "NEO", + "NSE", + "NYSE", + "NZE", + "OSL", + "OTC", + "PAR", + "PNK", + "PRA", + "RIS", + "SAO", + "SAU", + "SES", + "SET", + "SGO", + "SHH", + "SHZ", + "SIX", + "STO", + "STU", + "TAI", + "TAL", + "TLV", + "TSX", + "TSXV", + "TWO", + "VIE", + "WSE", + "XETRA", + ] + """Optional stock exchange for the ticker. Defaults to NASDAQ if not specified.""" + + timeout_ms: Annotated[int, PropertyInfo(alias="timeoutMS")] + """Optional timeout in milliseconds for the request. + + If the request takes longer than this value, it will be aborted with a 408 + status code. Maximum allowed value is 300000ms (5 minutes). + """ diff --git a/src/brand/dev/types/brand_retrieve_by_ticker_response.py b/src/brand/dev/types/brand_retrieve_by_ticker_response.py new file mode 100644 index 0000000..5a04a44 --- /dev/null +++ b/src/brand/dev/types/brand_retrieve_by_ticker_response.py @@ -0,0 +1,481 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from typing import List, Optional +from typing_extensions import Literal + +from .._models import BaseModel + +__all__ = [ + "BrandRetrieveByTickerResponse", + "Brand", + "BrandAddress", + "BrandBackdrop", + "BrandBackdropColor", + "BrandBackdropResolution", + "BrandColor", + "BrandIndustries", + "BrandIndustriesEic", + "BrandLinks", + "BrandLogo", + "BrandLogoColor", + "BrandLogoResolution", + "BrandSocial", + "BrandStock", +] + + +class BrandAddress(BaseModel): + city: Optional[str] = None + """City name""" + + country: Optional[str] = None + """Country name""" + + country_code: Optional[str] = None + """Country code""" + + postal_code: Optional[str] = None + """Postal or ZIP code""" + + state_code: Optional[str] = None + """State or province code""" + + state_province: Optional[str] = None + """State or province name""" + + street: Optional[str] = None + """Street address""" + + +class BrandBackdropColor(BaseModel): + hex: Optional[str] = None + """Color in hexadecimal format""" + + name: Optional[str] = None + """Name of the color""" + + +class BrandBackdropResolution(BaseModel): + aspect_ratio: Optional[float] = None + """Aspect ratio of the image (width/height)""" + + height: Optional[int] = None + """Height of the image in pixels""" + + width: Optional[int] = None + """Width of the image in pixels""" + + +class BrandBackdrop(BaseModel): + colors: Optional[List[BrandBackdropColor]] = None + """Array of colors in the backdrop image""" + + resolution: Optional[BrandBackdropResolution] = None + """Resolution of the backdrop image""" + + url: Optional[str] = None + """URL of the backdrop image""" + + +class BrandColor(BaseModel): + hex: Optional[str] = None + """Color in hexadecimal format""" + + name: Optional[str] = None + """Name of the color""" + + +class BrandIndustriesEic(BaseModel): + industry: Literal[ + "Aerospace & Defense", + "Technology", + "Finance", + "Healthcare", + "Retail & E-commerce", + "Entertainment", + "Education", + "Government & Nonprofit", + "Industrial & Energy", + "Automotive & Transportation", + "Lifestyle & Leisure", + "Luxury & Fashion", + "News & Media", + "Sports", + "Real Estate & PropTech", + "Legal & Compliance", + "Telecommunications", + "Agriculture & Food", + "Professional Services & Agencies", + "Chemicals & Materials", + "Logistics & Supply Chain", + "Hospitality & Tourism", + "Construction & Built Environment", + "Consumer Packaged Goods (CPG)", + ] + """Industry classification enum""" + + subindustry: Literal[ + "Defense Systems & Military Hardware", + "Aerospace Manufacturing", + "Avionics & Navigation Technology", + "Subsea & Naval Defense Systems", + "Space & Satellite Technology", + "Defense IT & Systems Integration", + "Software (B2B)", + "Software (B2C)", + "Cloud Infrastructure & DevOps", + "Cybersecurity", + "Artificial Intelligence & Machine Learning", + "Data Infrastructure & Analytics", + "Hardware & Semiconductors", + "Fintech Infrastructure", + "eCommerce & Marketplace Platforms", + "Developer Tools & APIs", + "Web3 & Blockchain", + "XR & Spatial Computing", + "Banking & Lending", + "Investment Management & WealthTech", + "Insurance & InsurTech", + "Payments & Money Movement", + "Accounting, Tax & Financial Planning Tools", + "Capital Markets & Trading Platforms", + "Financial Infrastructure & APIs", + "Credit Scoring & Risk Management", + "Cryptocurrency & Digital Assets", + "BNPL & Alternative Financing", + "Healthcare Providers & Services", + "Pharmaceuticals & Drug Development", + "Medical Devices & Diagnostics", + "Biotechnology & Genomics", + "Digital Health & Telemedicine", + "Health Insurance & Benefits Tech", + "Clinical Trials & Research Platforms", + "Mental Health & Wellness", + "Healthcare IT & EHR Systems", + "Consumer Health & Wellness Products", + "Online Marketplaces", + "Direct-to-Consumer (DTC) Brands", + "Retail Tech & Point-of-Sale Systems", + "Omnichannel & In-Store Retail", + "E-commerce Enablement & Infrastructure", + "Subscription & Membership Commerce", + "Social Commerce & Influencer Platforms", + "Fashion & Apparel Retail", + "Food, Beverage & Grocery E-commerce", + "Streaming Platforms (Video, Music, Audio)", + "Gaming & Interactive Entertainment", + "Creator Economy & Influencer Platforms", + "Advertising, Adtech & Media Buying", + "Film, TV & Production Studios", + "Events, Venues & Live Entertainment", + "Virtual Worlds & Metaverse Experiences", + "K-12 Education Platforms & Tools", + "Higher Education & University Tech", + "Online Learning & MOOCs", + "Test Prep & Certification", + "Corporate Training & Upskilling", + "Tutoring & Supplemental Learning", + "Education Management Systems (LMS/SIS)", + "Language Learning", + "Creator-Led & Cohort-Based Courses", + "Special Education & Accessibility Tools", + "Government Technology & Digital Services", + "Civic Engagement & Policy Platforms", + "International Development & Humanitarian Aid", + "Philanthropy & Grantmaking", + "Nonprofit Operations & Fundraising Tools", + "Public Health & Social Services", + "Education & Youth Development Programs", + "Environmental & Climate Action Organizations", + "Legal Aid & Social Justice Advocacy", + "Municipal & Infrastructure Services", + "Manufacturing & Industrial Automation", + "Energy Production (Oil, Gas, Nuclear)", + "Renewable Energy & Cleantech", + "Utilities & Grid Infrastructure", + "Industrial IoT & Monitoring Systems", + "Construction & Heavy Equipment", + "Mining & Natural Resources", + "Environmental Engineering & Sustainability", + "Energy Storage & Battery Technology", + "Automotive OEMs & Vehicle Manufacturing", + "Electric Vehicles (EVs) & Charging Infrastructure", + "Mobility-as-a-Service (MaaS)", + "Fleet Management", + "Public Transit & Urban Mobility", + "Autonomous Vehicles & ADAS", + "Aftermarket Parts & Services", + "Telematics & Vehicle Connectivity", + "Aviation & Aerospace Transport", + "Maritime Shipping", + "Fitness & Wellness", + "Beauty & Personal Care", + "Home & Living", + "Dating & Relationships", + "Hobbies, Crafts & DIY", + "Outdoor & Recreational Gear", + "Events, Experiences & Ticketing Platforms", + "Designer & Luxury Apparel", + "Accessories, Jewelry & Watches", + "Footwear & Leather Goods", + "Beauty, Fragrance & Skincare", + "Fashion Marketplaces & Retail Platforms", + "Sustainable & Ethical Fashion", + "Resale, Vintage & Circular Fashion", + "Fashion Tech & Virtual Try-Ons", + "Streetwear & Emerging Luxury", + "Couture & Made-to-Measure", + "News Publishing & Journalism", + "Digital Media & Content Platforms", + "Broadcasting (TV & Radio)", + "Podcasting & Audio Media", + "News Aggregators & Curation Tools", + "Independent & Creator-Led Media", + "Newsletters & Substack-Style Platforms", + "Political & Investigative Media", + "Trade & Niche Publications", + "Media Monitoring & Analytics", + "Professional Teams & Leagues", + "Sports Media & Broadcasting", + "Sports Betting & Fantasy Sports", + "Fitness & Athletic Training Platforms", + "Sportswear & Equipment", + "Esports & Competitive Gaming", + "Sports Venues & Event Management", + "Athlete Management & Talent Agencies", + "Sports Tech & Performance Analytics", + "Youth, Amateur & Collegiate Sports", + "Real Estate Marketplaces", + "Property Management Software", + "Rental Platforms", + "Mortgage & Lending Tech", + "Real Estate Investment Platforms", + "Law Firms & Legal Services", + "Legal Tech & Automation", + "Regulatory Compliance", + "E-Discovery & Litigation Tools", + "Contract Management", + "Governance, Risk & Compliance (GRC)", + "IP & Trademark Management", + "Legal Research & Intelligence", + "Compliance Training & Certification", + "Whistleblower & Ethics Reporting", + "Mobile & Wireless Networks (3G/4G/5G)", + "Broadband & Fiber Internet", + "Satellite & Space-Based Communications", + "Network Equipment & Infrastructure", + "Telecom Billing & OSS/BSS Systems", + "VoIP & Unified Communications", + "Internet Service Providers (ISPs)", + "Edge Computing & Network Virtualization", + "IoT Connectivity Platforms", + "Precision Agriculture & AgTech", + "Crop & Livestock Production", + "Food & Beverage Manufacturing & Processing", + "Food Distribution", + "Restaurants & Food Service", + "Agricultural Inputs & Equipment", + "Sustainable & Regenerative Agriculture", + "Seafood & Aquaculture", + "Management Consulting", + "Marketing & Advertising Agencies", + "Design, Branding & Creative Studios", + "IT Services & Managed Services", + "Staffing, Recruiting & Talent", + "Accounting & Tax Firms", + "Public Relations & Communications", + "Business Process Outsourcing (BPO)", + "Professional Training & Coaching", + "Specialty Chemicals", + "Commodity & Petrochemicals", + "Polymers, Plastics & Rubber", + "Coatings, Adhesives & Sealants", + "Industrial Gases", + "Advanced Materials & Composites", + "Battery Materials & Energy Storage", + "Electronic Materials & Semiconductor Chemicals", + "Agrochemicals & Fertilizers", + "Freight & Transportation Tech", + "Last-Mile Delivery", + "Warehouse Automation", + "Supply Chain Visibility Platforms", + "Logistics Marketplaces", + "Shipping & Freight Forwarding", + "Cold Chain Logistics", + "Reverse Logistics & Returns", + "Cross-Border Trade Tech", + "Transportation Management Systems (TMS)", + "Hotels & Accommodation", + "Vacation Rentals & Short-Term Stays", + "Restaurant Tech & Management", + "Travel Booking Platforms", + "Tourism Experiences & Activities", + "Cruise Lines & Marine Tourism", + "Hospitality Management Systems", + "Event & Venue Management", + "Corporate Travel Management", + "Travel Insurance & Protection", + "Construction Management Software", + "BIM/CAD & Design Tools", + "Construction Marketplaces", + "Equipment Rental & Management", + "Building Materials & Procurement", + "Construction Workforce Management", + "Project Estimation & Bidding", + "Modular & Prefab Construction", + "Construction Safety & Compliance", + "Smart Building Technology", + "Food & Beverage CPG", + "Home & Personal Care CPG", + "CPG Analytics & Insights", + "Direct-to-Consumer CPG Brands", + "CPG Supply Chain & Distribution", + "Private Label Manufacturing", + "CPG Retail Intelligence", + "Sustainable CPG & Packaging", + "Beauty & Cosmetics CPG", + "Health & Wellness CPG", + ] + """Subindustry classification enum""" + + +class BrandIndustries(BaseModel): + eic: Optional[List[BrandIndustriesEic]] = None + """Easy Industry Classification - array of industry and subindustry pairs""" + + +class BrandLinks(BaseModel): + blog: Optional[str] = None + """URL to the brand's blog or news page""" + + careers: Optional[str] = None + """URL to the brand's careers or job opportunities page""" + + contact: Optional[str] = None + """URL to the brand's contact or contact us page""" + + pricing: Optional[str] = None + """URL to the brand's pricing or plans page""" + + privacy: Optional[str] = None + """URL to the brand's privacy policy page""" + + terms: Optional[str] = None + """URL to the brand's terms of service or terms and conditions page""" + + +class BrandLogoColor(BaseModel): + hex: Optional[str] = None + """Color in hexadecimal format""" + + name: Optional[str] = None + """Name of the color""" + + +class BrandLogoResolution(BaseModel): + aspect_ratio: Optional[float] = None + """Aspect ratio of the image (width/height)""" + + height: Optional[int] = None + """Height of the image in pixels""" + + width: Optional[int] = None + """Width of the image in pixels""" + + +class BrandLogo(BaseModel): + colors: Optional[List[BrandLogoColor]] = None + """Array of colors in the logo""" + + mode: Optional[Literal["light", "dark", "has_opaque_background"]] = None + """ + Indicates when this logo is best used: 'light' = best for light mode, 'dark' = + best for dark mode, 'has_opaque_background' = can be used for either as image + has its own background + """ + + resolution: Optional[BrandLogoResolution] = None + """Resolution of the logo image""" + + type: Optional[Literal["icon", "logo"]] = None + """Type of the logo based on resolution (e.g., 'icon', 'logo')""" + + url: Optional[str] = None + """CDN hosted url of the logo (ready for display)""" + + +class BrandSocial(BaseModel): + type: Optional[str] = None + """Type of social media, e.g., 'facebook', 'twitter'""" + + url: Optional[str] = None + """URL of the social media page""" + + +class BrandStock(BaseModel): + exchange: Optional[str] = None + """Stock exchange name""" + + ticker: Optional[str] = None + """Stock ticker symbol""" + + +class Brand(BaseModel): + address: Optional[BrandAddress] = None + """Physical address of the brand""" + + backdrops: Optional[List[BrandBackdrop]] = None + """An array of backdrop images for the brand""" + + colors: Optional[List[BrandColor]] = None + """An array of brand colors""" + + description: Optional[str] = None + """A brief description of the brand""" + + domain: Optional[str] = None + """The domain name of the brand""" + + email: Optional[str] = None + """Company email address""" + + industries: Optional[BrandIndustries] = None + """Industry classification information for the brand""" + + is_nsfw: Optional[bool] = None + """Indicates whether the brand content is not safe for work (NSFW)""" + + links: Optional[BrandLinks] = None + """Important website links for the brand""" + + logos: Optional[List[BrandLogo]] = None + """An array of logos associated with the brand""" + + phone: Optional[str] = None + """Company phone number""" + + slogan: Optional[str] = None + """The brand's slogan""" + + socials: Optional[List[BrandSocial]] = None + """An array of social media links for the brand""" + + stock: Optional[BrandStock] = None + """ + Stock market information for this brand (will be null if not a publicly traded + company) + """ + + title: Optional[str] = None + """The title or name of the brand""" + + +class BrandRetrieveByTickerResponse(BaseModel): + brand: Optional[Brand] = None + """Detailed brand information""" + + code: Optional[int] = None + """HTTP status code""" + + status: Optional[str] = None + """Status of the response, e.g., 'ok'""" diff --git a/src/brand/dev/types/brand_retrieve_params.py b/src/brand/dev/types/brand_retrieve_params.py index 474c7b9..0d8a8e3 100644 --- a/src/brand/dev/types/brand_retrieve_params.py +++ b/src/brand/dev/types/brand_retrieve_params.py @@ -83,100 +83,6 @@ class BrandRetrieveParams(TypedDict, total=False): methods. """ - name: str - """ - Company name to retrieve brand data for (e.g., 'Apple Inc', 'Microsoft - Corporation'). Must be 3-30 characters. Cannot be used with domain or ticker - parameters. - """ - - ticker: str - """Stock ticker symbol to retrieve brand data for (e.g., 'AAPL', 'GOOGL', 'BRK.A'). - - Must be 1-15 characters, letters/numbers/dots only. Cannot be used with domain - or name parameters. - """ - - ticker_exchange: Literal[ - "AMEX", - "AMS", - "AQS", - "ASX", - "ATH", - "BER", - "BME", - "BRU", - "BSE", - "BUD", - "BUE", - "BVC", - "CBOE", - "CNQ", - "CPH", - "DFM", - "DOH", - "DUB", - "DUS", - "DXE", - "EGX", - "FSX", - "HAM", - "HEL", - "HKSE", - "HOSE", - "ICE", - "IOB", - "IST", - "JKT", - "JNB", - "JPX", - "KLS", - "KOE", - "KSC", - "KUW", - "LIS", - "LSE", - "MCX", - "MEX", - "MIL", - "MUN", - "NASDAQ", - "NEO", - "NSE", - "NYSE", - "NZE", - "OSL", - "OTC", - "PAR", - "PNK", - "PRA", - "RIS", - "SAO", - "SAU", - "SES", - "SET", - "SGO", - "SHH", - "SHZ", - "SIX", - "STO", - "STU", - "TAI", - "TAL", - "TLV", - "TSX", - "TSXV", - "TWO", - "VIE", - "WSE", - "XETRA", - ] - """Optional stock exchange for the ticker. - - Only used when ticker parameter is provided. Defaults to assume ticker is - American if not specified. - """ - timeout_ms: Annotated[int, PropertyInfo(alias="timeoutMS")] """Optional timeout in milliseconds for the request. diff --git a/tests/api_resources/test_brand.py b/tests/api_resources/test_brand.py index b1085aa..7467a0a 100644 --- a/tests/api_resources/test_brand.py +++ b/tests/api_resources/test_brand.py @@ -16,6 +16,8 @@ BrandScreenshotResponse, BrandStyleguideResponse, BrandRetrieveNaicsResponse, + BrandRetrieveByNameResponse, + BrandRetrieveByTickerResponse, BrandRetrieveSimplifiedResponse, BrandIdentifyFromTransactionResponse, ) @@ -39,9 +41,6 @@ def test_method_retrieve_with_all_params(self, client: BrandDev) -> None: domain="domain", force_language="albanian", max_speed=True, - name="xxx", - ticker="ticker", - ticker_exchange="AMEX", timeout_ms=1, ) assert_matches_type(BrandRetrieveResponse, brand, path=["response"]) @@ -166,6 +165,8 @@ def test_method_identify_from_transaction(self, client: BrandDev) -> None: def test_method_identify_from_transaction_with_all_params(self, client: BrandDev) -> None: brand = client.brand.identify_from_transaction( transaction_info="transaction_info", + force_language="albanian", + max_speed=True, timeout_ms=1, ) assert_matches_type(BrandIdentifyFromTransactionResponse, brand, path=["response"]) @@ -239,6 +240,97 @@ def test_streaming_response_prefetch(self, client: BrandDev) -> None: assert cast(Any, response.is_closed) is True + @pytest.mark.skip(reason="Prism tests are disabled") + @parametrize + def test_method_retrieve_by_name(self, client: BrandDev) -> None: + brand = client.brand.retrieve_by_name( + name="xxx", + ) + assert_matches_type(BrandRetrieveByNameResponse, brand, path=["response"]) + + @pytest.mark.skip(reason="Prism tests are disabled") + @parametrize + def test_method_retrieve_by_name_with_all_params(self, client: BrandDev) -> None: + brand = client.brand.retrieve_by_name( + name="xxx", + force_language="albanian", + max_speed=True, + timeout_ms=1, + ) + assert_matches_type(BrandRetrieveByNameResponse, brand, path=["response"]) + + @pytest.mark.skip(reason="Prism tests are disabled") + @parametrize + def test_raw_response_retrieve_by_name(self, client: BrandDev) -> None: + response = client.brand.with_raw_response.retrieve_by_name( + name="xxx", + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + brand = response.parse() + assert_matches_type(BrandRetrieveByNameResponse, brand, path=["response"]) + + @pytest.mark.skip(reason="Prism tests are disabled") + @parametrize + def test_streaming_response_retrieve_by_name(self, client: BrandDev) -> None: + with client.brand.with_streaming_response.retrieve_by_name( + name="xxx", + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + brand = response.parse() + assert_matches_type(BrandRetrieveByNameResponse, brand, path=["response"]) + + assert cast(Any, response.is_closed) is True + + @pytest.mark.skip(reason="Prism tests are disabled") + @parametrize + def test_method_retrieve_by_ticker(self, client: BrandDev) -> None: + brand = client.brand.retrieve_by_ticker( + ticker="ticker", + ) + assert_matches_type(BrandRetrieveByTickerResponse, brand, path=["response"]) + + @pytest.mark.skip(reason="Prism tests are disabled") + @parametrize + def test_method_retrieve_by_ticker_with_all_params(self, client: BrandDev) -> None: + brand = client.brand.retrieve_by_ticker( + ticker="ticker", + force_language="albanian", + max_speed=True, + ticker_exchange="AMEX", + timeout_ms=1, + ) + assert_matches_type(BrandRetrieveByTickerResponse, brand, path=["response"]) + + @pytest.mark.skip(reason="Prism tests are disabled") + @parametrize + def test_raw_response_retrieve_by_ticker(self, client: BrandDev) -> None: + response = client.brand.with_raw_response.retrieve_by_ticker( + ticker="ticker", + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + brand = response.parse() + assert_matches_type(BrandRetrieveByTickerResponse, brand, path=["response"]) + + @pytest.mark.skip(reason="Prism tests are disabled") + @parametrize + def test_streaming_response_retrieve_by_ticker(self, client: BrandDev) -> None: + with client.brand.with_streaming_response.retrieve_by_ticker( + ticker="ticker", + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + brand = response.parse() + assert_matches_type(BrandRetrieveByTickerResponse, brand, path=["response"]) + + assert cast(Any, response.is_closed) is True + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize def test_method_retrieve_naics(self, client: BrandDev) -> None: @@ -433,9 +525,6 @@ async def test_method_retrieve_with_all_params(self, async_client: AsyncBrandDev domain="domain", force_language="albanian", max_speed=True, - name="xxx", - ticker="ticker", - ticker_exchange="AMEX", timeout_ms=1, ) assert_matches_type(BrandRetrieveResponse, brand, path=["response"]) @@ -560,6 +649,8 @@ async def test_method_identify_from_transaction(self, async_client: AsyncBrandDe async def test_method_identify_from_transaction_with_all_params(self, async_client: AsyncBrandDev) -> None: brand = await async_client.brand.identify_from_transaction( transaction_info="transaction_info", + force_language="albanian", + max_speed=True, timeout_ms=1, ) assert_matches_type(BrandIdentifyFromTransactionResponse, brand, path=["response"]) @@ -633,6 +724,97 @@ async def test_streaming_response_prefetch(self, async_client: AsyncBrandDev) -> assert cast(Any, response.is_closed) is True + @pytest.mark.skip(reason="Prism tests are disabled") + @parametrize + async def test_method_retrieve_by_name(self, async_client: AsyncBrandDev) -> None: + brand = await async_client.brand.retrieve_by_name( + name="xxx", + ) + assert_matches_type(BrandRetrieveByNameResponse, brand, path=["response"]) + + @pytest.mark.skip(reason="Prism tests are disabled") + @parametrize + async def test_method_retrieve_by_name_with_all_params(self, async_client: AsyncBrandDev) -> None: + brand = await async_client.brand.retrieve_by_name( + name="xxx", + force_language="albanian", + max_speed=True, + timeout_ms=1, + ) + assert_matches_type(BrandRetrieveByNameResponse, brand, path=["response"]) + + @pytest.mark.skip(reason="Prism tests are disabled") + @parametrize + async def test_raw_response_retrieve_by_name(self, async_client: AsyncBrandDev) -> None: + response = await async_client.brand.with_raw_response.retrieve_by_name( + name="xxx", + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + brand = await response.parse() + assert_matches_type(BrandRetrieveByNameResponse, brand, path=["response"]) + + @pytest.mark.skip(reason="Prism tests are disabled") + @parametrize + async def test_streaming_response_retrieve_by_name(self, async_client: AsyncBrandDev) -> None: + async with async_client.brand.with_streaming_response.retrieve_by_name( + name="xxx", + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + brand = await response.parse() + assert_matches_type(BrandRetrieveByNameResponse, brand, path=["response"]) + + assert cast(Any, response.is_closed) is True + + @pytest.mark.skip(reason="Prism tests are disabled") + @parametrize + async def test_method_retrieve_by_ticker(self, async_client: AsyncBrandDev) -> None: + brand = await async_client.brand.retrieve_by_ticker( + ticker="ticker", + ) + assert_matches_type(BrandRetrieveByTickerResponse, brand, path=["response"]) + + @pytest.mark.skip(reason="Prism tests are disabled") + @parametrize + async def test_method_retrieve_by_ticker_with_all_params(self, async_client: AsyncBrandDev) -> None: + brand = await async_client.brand.retrieve_by_ticker( + ticker="ticker", + force_language="albanian", + max_speed=True, + ticker_exchange="AMEX", + timeout_ms=1, + ) + assert_matches_type(BrandRetrieveByTickerResponse, brand, path=["response"]) + + @pytest.mark.skip(reason="Prism tests are disabled") + @parametrize + async def test_raw_response_retrieve_by_ticker(self, async_client: AsyncBrandDev) -> None: + response = await async_client.brand.with_raw_response.retrieve_by_ticker( + ticker="ticker", + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + brand = await response.parse() + assert_matches_type(BrandRetrieveByTickerResponse, brand, path=["response"]) + + @pytest.mark.skip(reason="Prism tests are disabled") + @parametrize + async def test_streaming_response_retrieve_by_ticker(self, async_client: AsyncBrandDev) -> None: + async with async_client.brand.with_streaming_response.retrieve_by_ticker( + ticker="ticker", + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + brand = await response.parse() + assert_matches_type(BrandRetrieveByTickerResponse, brand, path=["response"]) + + assert cast(Any, response.is_closed) is True + @pytest.mark.skip(reason="Prism tests are disabled") @parametrize async def test_method_retrieve_naics(self, async_client: AsyncBrandDev) -> None: