Skip to content

Commit 9ddc161

Browse files
feat(api): api update
1 parent 639075e commit 9ddc161

11 files changed

Lines changed: 16 additions & 845 deletions

File tree

‎.stats.yml‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
configured_endpoints: 20
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/context-dev%2Fcontext.dev-142c1d289d90b82edca3269964fc4fd6595f0e97c36b42a88b6f774fa5e65c10.yml
3-
openapi_spec_hash: 1dc3e05add427f444e7714173c2fe8a9
1+
configured_endpoints: 19
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/context-dev%2Fcontext.dev-3c753cf7c4d04fe467710a51b1a2f6f024b0b6a670704be7340b92e064bcf1a9.yml
3+
openapi_spec_hash: f9b02e6756001e2be87d541d5cc609e5
44
config_hash: 859455bbffc8a009cd9b5eed9b3ba2d7

‎api.md‎

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -36,18 +36,6 @@ Methods:
3636
- <code title="post /brand/ai/product">client.ai.<a href="./src/context/dev/resources/ai.py">extract_product</a>(\*\*<a href="src/context/dev/types/ai_extract_product_params.py">params</a>) -> <a href="./src/context/dev/types/ai_extract_product_response.py">AIExtractProductResponse</a></code>
3737
- <code title="post /brand/ai/products">client.ai.<a href="./src/context/dev/resources/ai.py">extract_products</a>(\*\*<a href="src/context/dev/types/ai_extract_products_params.py">params</a>) -> <a href="./src/context/dev/types/ai_extract_products_response.py">AIExtractProductsResponse</a></code>
3838

39-
# Style
40-
41-
Types:
42-
43-
```python
44-
from context.dev.types import StyleExtractStyleguideResponse
45-
```
46-
47-
Methods:
48-
49-
- <code title="get /brand/styleguide">client.style.<a href="./src/context/dev/resources/style.py">extract_styleguide</a>(\*\*<a href="src/context/dev/types/style_extract_styleguide_params.py">params</a>) -> <a href="./src/context/dev/types/style_extract_styleguide_response.py">StyleExtractStyleguideResponse</a></code>
50-
5139
# Brand
5240

5341
Types:

‎src/context/dev/_client.py‎

Lines changed: 1 addition & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -31,11 +31,10 @@
3131
)
3232

3333
if TYPE_CHECKING:
34-
from .resources import ai, web, brand, style, utility, industry
34+
from .resources import ai, web, brand, utility, industry
3535
from .resources.ai import AIResource, AsyncAIResource
3636
from .resources.web import WebResource, AsyncWebResource
3737
from .resources.brand import BrandResource, AsyncBrandResource
38-
from .resources.style import StyleResource, AsyncStyleResource
3938
from .resources.utility import UtilityResource, AsyncUtilityResource
4039
from .resources.industry import IndustryResource, AsyncIndustryResource
4140

@@ -118,12 +117,6 @@ def ai(self) -> AIResource:
118117

119118
return AIResource(self)
120119

121-
@cached_property
122-
def style(self) -> StyleResource:
123-
from .resources.style import StyleResource
124-
125-
return StyleResource(self)
126-
127120
@cached_property
128121
def brand(self) -> BrandResource:
129122
from .resources.brand import BrandResource
@@ -322,12 +315,6 @@ def ai(self) -> AsyncAIResource:
322315

323316
return AsyncAIResource(self)
324317

325-
@cached_property
326-
def style(self) -> AsyncStyleResource:
327-
from .resources.style import AsyncStyleResource
328-
329-
return AsyncStyleResource(self)
330-
331318
@cached_property
332319
def brand(self) -> AsyncBrandResource:
333320
from .resources.brand import AsyncBrandResource
@@ -477,12 +464,6 @@ def ai(self) -> ai.AIResourceWithRawResponse:
477464

478465
return AIResourceWithRawResponse(self._client.ai)
479466

480-
@cached_property
481-
def style(self) -> style.StyleResourceWithRawResponse:
482-
from .resources.style import StyleResourceWithRawResponse
483-
484-
return StyleResourceWithRawResponse(self._client.style)
485-
486467
@cached_property
487468
def brand(self) -> brand.BrandResourceWithRawResponse:
488469
from .resources.brand import BrandResourceWithRawResponse
@@ -520,12 +501,6 @@ def ai(self) -> ai.AsyncAIResourceWithRawResponse:
520501

521502
return AsyncAIResourceWithRawResponse(self._client.ai)
522503

523-
@cached_property
524-
def style(self) -> style.AsyncStyleResourceWithRawResponse:
525-
from .resources.style import AsyncStyleResourceWithRawResponse
526-
527-
return AsyncStyleResourceWithRawResponse(self._client.style)
528-
529504
@cached_property
530505
def brand(self) -> brand.AsyncBrandResourceWithRawResponse:
531506
from .resources.brand import AsyncBrandResourceWithRawResponse
@@ -563,12 +538,6 @@ def ai(self) -> ai.AIResourceWithStreamingResponse:
563538

564539
return AIResourceWithStreamingResponse(self._client.ai)
565540

566-
@cached_property
567-
def style(self) -> style.StyleResourceWithStreamingResponse:
568-
from .resources.style import StyleResourceWithStreamingResponse
569-
570-
return StyleResourceWithStreamingResponse(self._client.style)
571-
572541
@cached_property
573542
def brand(self) -> brand.BrandResourceWithStreamingResponse:
574543
from .resources.brand import BrandResourceWithStreamingResponse
@@ -606,12 +575,6 @@ def ai(self) -> ai.AsyncAIResourceWithStreamingResponse:
606575

607576
return AsyncAIResourceWithStreamingResponse(self._client.ai)
608577

609-
@cached_property
610-
def style(self) -> style.AsyncStyleResourceWithStreamingResponse:
611-
from .resources.style import AsyncStyleResourceWithStreamingResponse
612-
613-
return AsyncStyleResourceWithStreamingResponse(self._client.style)
614-
615578
@cached_property
616579
def brand(self) -> brand.AsyncBrandResourceWithStreamingResponse:
617580
from .resources.brand import AsyncBrandResourceWithStreamingResponse

‎src/context/dev/resources/__init__.py‎

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -24,14 +24,6 @@
2424
BrandResourceWithStreamingResponse,
2525
AsyncBrandResourceWithStreamingResponse,
2626
)
27-
from .style import (
28-
StyleResource,
29-
AsyncStyleResource,
30-
StyleResourceWithRawResponse,
31-
AsyncStyleResourceWithRawResponse,
32-
StyleResourceWithStreamingResponse,
33-
AsyncStyleResourceWithStreamingResponse,
34-
)
3527
from .utility import (
3628
UtilityResource,
3729
AsyncUtilityResource,
@@ -62,12 +54,6 @@
6254
"AsyncAIResourceWithRawResponse",
6355
"AIResourceWithStreamingResponse",
6456
"AsyncAIResourceWithStreamingResponse",
65-
"StyleResource",
66-
"AsyncStyleResource",
67-
"StyleResourceWithRawResponse",
68-
"AsyncStyleResourceWithRawResponse",
69-
"StyleResourceWithStreamingResponse",
70-
"AsyncStyleResourceWithStreamingResponse",
7157
"BrandResource",
7258
"AsyncBrandResource",
7359
"BrandResourceWithRawResponse",

‎src/context/dev/resources/style.py‎

Lines changed: 0 additions & 213 deletions
This file was deleted.

‎src/context/dev/resources/web.py‎

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -72,10 +72,12 @@ def extract_fonts(
7272
7373
Args:
7474
direct_url: A specific URL to fetch fonts from directly, bypassing domain resolution (e.g.,
75-
'https://example.com/design-system').
75+
'https://example.com/design-system'). When provided, fonts are extracted from
76+
this exact URL. You must provide either 'domain' or 'directUrl', but not both.
7677
7778
domain: Domain name to extract fonts from (e.g., 'example.com', 'google.com'). The
78-
domain will be automatically normalized and validated.
79+
domain will be automatically normalized and validated. You must provide either
80+
'domain' or 'directUrl', but not both.
7981
8082
timeout_ms: Optional timeout in milliseconds for the request. If the request takes longer
8183
than this value, it will be aborted with a 408 status code. Maximum allowed
@@ -424,10 +426,12 @@ async def extract_fonts(
424426
425427
Args:
426428
direct_url: A specific URL to fetch fonts from directly, bypassing domain resolution (e.g.,
427-
'https://example.com/design-system').
429+
'https://example.com/design-system'). When provided, fonts are extracted from
430+
this exact URL. You must provide either 'domain' or 'directUrl', but not both.
428431
429432
domain: Domain name to extract fonts from (e.g., 'example.com', 'google.com'). The
430-
domain will be automatically normalized and validated.
433+
domain will be automatically normalized and validated. You must provide either
434+
'domain' or 'directUrl', but not both.
431435
432436
timeout_ms: Optional timeout in milliseconds for the request. If the request takes longer
433437
than this value, it will be aborted with a 408 status code. Maximum allowed

0 commit comments

Comments
 (0)