Visitar URL original
feat(api): api update · unlayer/unlayer-python@1a2f183 · GitHub
Skip to content

Commit 1a2f183

Browse files
feat(api): api update
1 parent d4e8db7 commit 1a2f183

4 files changed

Lines changed: 117 additions & 117 deletions

File tree

‎.stats.yml‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
configured_endpoints: 24
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/unlayer%2Funlayer-8e523084a4299d49f71a9dd36232b00a4f3f4c5a94d2b95f118d54a49184595f.yml
3-
openapi_spec_hash: 16e58acb9377ae565449741fce8857ea
4-
config_hash: 6e7ac0b0bf24c892c17a4773cfdfbadc
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/unlayer%2Funlayer-7b157ae796e7fc651848e8626a9adb4b00614a203c5140530edb0c52f5c82f79.yml
3+
openapi_spec_hash: 00ccd8fc07a13e525a6fc1af6445230e
4+
config_hash: 4700894a8daff98f13b4480d5d3e2bed

‎api.md‎

Lines changed: 30 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,3 @@
1-
# Pages
2-
3-
Types:
4-
5-
```python
6-
from unlayer.types import PageRenderCreateResponse
7-
```
8-
9-
Methods:
10-
11-
- <code title="post /pages/v1/render">client.pages.<a href="./src/unlayer/resources/pages.py">render_create</a>(\*\*<a href="src/unlayer/types/page_render_create_params.py">params</a>) -> <a href="./src/unlayer/types/page_render_create_response.py">PageRenderCreateResponse</a></code>
12-
13-
# Documents
14-
15-
Types:
16-
17-
```python
18-
from unlayer.types import (
19-
DocumentDocumentsRetrieveResponse,
20-
DocumentGenerateCreateResponse,
21-
DocumentGenerateTemplateTemplateResponse,
22-
)
23-
```
24-
25-
Methods:
26-
27-
- <code title="get /documents/v1/documents/{id}">client.documents.<a href="./src/unlayer/resources/documents.py">documents_retrieve</a>(id) -> <a href="./src/unlayer/types/document_documents_retrieve_response.py">DocumentDocumentsRetrieveResponse</a></code>
28-
- <code title="post /documents/v1/generate">client.documents.<a href="./src/unlayer/resources/documents.py">generate_create</a>(\*\*<a href="src/unlayer/types/document_generate_create_params.py">params</a>) -> <a href="./src/unlayer/types/document_generate_create_response.py">DocumentGenerateCreateResponse</a></code>
29-
- <code title="post /documents/v1/generate/template">client.documents.<a href="./src/unlayer/resources/documents.py">generate_template_template</a>(\*\*<a href="src/unlayer/types/document_generate_template_template_params.py">params</a>) -> <a href="./src/unlayer/types/document_generate_template_template_response.py">DocumentGenerateTemplateTemplateResponse</a></code>
30-
311
# Emails
322

333
Types:
@@ -88,3 +58,33 @@ Methods:
8858
- <code title="get /project/v1/templates">client.project.<a href="./src/unlayer/resources/project.py">templates_list</a>() -> <a href="./src/unlayer/types/project_templates_list_response.py">ProjectTemplatesListResponse</a></code>
8959
- <code title="get /project/v1/templates/{id}">client.project.<a href="./src/unlayer/resources/project.py">templates_retrieve</a>(id) -> <a href="./src/unlayer/types/project_templates_retrieve_response.py">ProjectTemplatesRetrieveResponse</a></code>
9060
- <code title="put /project/v1/templates/{id}">client.project.<a href="./src/unlayer/resources/project.py">templates_update</a>(id, \*\*<a href="src/unlayer/types/project_templates_update_params.py">params</a>) -> <a href="./src/unlayer/types/project_templates_update_response.py">ProjectTemplatesUpdateResponse</a></code>
61+
62+
# Documents
63+
64+
Types:
65+
66+
```python
67+
from unlayer.types import (
68+
DocumentDocumentsRetrieveResponse,
69+
DocumentGenerateCreateResponse,
70+
DocumentGenerateTemplateTemplateResponse,
71+
)
72+
```
73+
74+
Methods:
75+
76+
- <code title="get /documents/v1/documents/{id}">client.documents.<a href="./src/unlayer/resources/documents.py">documents_retrieve</a>(id) -> <a href="./src/unlayer/types/document_documents_retrieve_response.py">DocumentDocumentsRetrieveResponse</a></code>
77+
- <code title="post /documents/v1/generate">client.documents.<a href="./src/unlayer/resources/documents.py">generate_create</a>(\*\*<a href="src/unlayer/types/document_generate_create_params.py">params</a>) -> <a href="./src/unlayer/types/document_generate_create_response.py">DocumentGenerateCreateResponse</a></code>
78+
- <code title="post /documents/v1/generate/template">client.documents.<a href="./src/unlayer/resources/documents.py">generate_template_template</a>(\*\*<a href="src/unlayer/types/document_generate_template_template_params.py">params</a>) -> <a href="./src/unlayer/types/document_generate_template_template_response.py">DocumentGenerateTemplateTemplateResponse</a></code>
79+
80+
# Pages
81+
82+
Types:
83+
84+
```python
85+
from unlayer.types import PageRenderCreateResponse
86+
```
87+
88+
Methods:
89+
90+
- <code title="post /pages/v1/render">client.pages.<a href="./src/unlayer/resources/pages.py">render_create</a>(\*\*<a href="src/unlayer/types/page_render_create_params.py">params</a>) -> <a href="./src/unlayer/types/page_render_create_response.py">PageRenderCreateResponse</a></code>

‎src/unlayer/_client.py‎

Lines changed: 72 additions & 72 deletions
Original file line numberDiff line numberDiff line change
@@ -135,18 +135,6 @@ def __init__(
135135
_strict_response_validation=_strict_response_validation,
136136
)
137137

138-
@cached_property
139-
def pages(self) -> PagesResource:
140-
from .resources.pages import PagesResource
141-
142-
return PagesResource(self)
143-
144-
@cached_property
145-
def documents(self) -> DocumentsResource:
146-
from .resources.documents import DocumentsResource
147-
148-
return DocumentsResource(self)
149-
150138
@cached_property
151139
def emails(self) -> EmailsResource:
152140
from .resources.emails import EmailsResource
@@ -159,6 +147,18 @@ def project(self) -> ProjectResource:
159147

160148
return ProjectResource(self)
161149

150+
@cached_property
151+
def documents(self) -> DocumentsResource:
152+
from .resources.documents import DocumentsResource
153+
154+
return DocumentsResource(self)
155+
156+
@cached_property
157+
def pages(self) -> PagesResource:
158+
from .resources.pages import PagesResource
159+
160+
return PagesResource(self)
161+
162162
@cached_property
163163
def with_raw_response(self) -> UnlayerWithRawResponse:
164164
return UnlayerWithRawResponse(self)
@@ -353,18 +353,6 @@ def __init__(
353353
_strict_response_validation=_strict_response_validation,
354354
)
355355

356-
@cached_property
357-
def pages(self) -> AsyncPagesResource:
358-
from .resources.pages import AsyncPagesResource
359-
360-
return AsyncPagesResource(self)
361-
362-
@cached_property
363-
def documents(self) -> AsyncDocumentsResource:
364-
from .resources.documents import AsyncDocumentsResource
365-
366-
return AsyncDocumentsResource(self)
367-
368356
@cached_property
369357
def emails(self) -> AsyncEmailsResource:
370358
from .resources.emails import AsyncEmailsResource
@@ -377,6 +365,18 @@ def project(self) -> AsyncProjectResource:
377365

378366
return AsyncProjectResource(self)
379367

368+
@cached_property
369+
def documents(self) -> AsyncDocumentsResource:
370+
from .resources.documents import AsyncDocumentsResource
371+
372+
return AsyncDocumentsResource(self)
373+
374+
@cached_property
375+
def pages(self) -> AsyncPagesResource:
376+
from .resources.pages import AsyncPagesResource
377+
378+
return AsyncPagesResource(self)
379+
380380
@cached_property
381381
def with_raw_response(self) -> AsyncUnlayerWithRawResponse:
382382
return AsyncUnlayerWithRawResponse(self)
@@ -498,18 +498,6 @@ class UnlayerWithRawResponse:
498498
def __init__(self, client: Unlayer) -> None:
499499
self._client = client
500500

501-
@cached_property
502-
def pages(self) -> pages.PagesResourceWithRawResponse:
503-
from .resources.pages import PagesResourceWithRawResponse
504-
505-
return PagesResourceWithRawResponse(self._client.pages)
506-
507-
@cached_property
508-
def documents(self) -> documents.DocumentsResourceWithRawResponse:
509-
from .resources.documents import DocumentsResourceWithRawResponse
510-
511-
return DocumentsResourceWithRawResponse(self._client.documents)
512-
513501
@cached_property
514502
def emails(self) -> emails.EmailsResourceWithRawResponse:
515503
from .resources.emails import EmailsResourceWithRawResponse
@@ -522,24 +510,24 @@ def project(self) -> project.ProjectResourceWithRawResponse:
522510

523511
return ProjectResourceWithRawResponse(self._client.project)
524512

513+
@cached_property
514+
def documents(self) -> documents.DocumentsResourceWithRawResponse:
515+
from .resources.documents import DocumentsResourceWithRawResponse
525516

526-
class AsyncUnlayerWithRawResponse:
527-
_client: AsyncUnlayer
528-
529-
def __init__(self, client: AsyncUnlayer) -> None:
530-
self._client = client
517+
return DocumentsResourceWithRawResponse(self._client.documents)
531518

532519
@cached_property
533-
def pages(self) -> pages.AsyncPagesResourceWithRawResponse:
534-
from .resources.pages import AsyncPagesResourceWithRawResponse
520+
def pages(self) -> pages.PagesResourceWithRawResponse:
521+
from .resources.pages import PagesResourceWithRawResponse
535522

536-
return AsyncPagesResourceWithRawResponse(self._client.pages)
523+
return PagesResourceWithRawResponse(self._client.pages)
537524

538-
@cached_property
539-
def documents(self) -> documents.AsyncDocumentsResourceWithRawResponse:
540-
from .resources.documents import AsyncDocumentsResourceWithRawResponse
541525

542-
return AsyncDocumentsResourceWithRawResponse(self._client.documents)
526+
class AsyncUnlayerWithRawResponse:
527+
_client: AsyncUnlayer
528+
529+
def __init__(self, client: AsyncUnlayer) -> None:
530+
self._client = client
543531

544532
@cached_property
545533
def emails(self) -> emails.AsyncEmailsResourceWithRawResponse:
@@ -553,24 +541,24 @@ def project(self) -> project.AsyncProjectResourceWithRawResponse:
553541

554542
return AsyncProjectResourceWithRawResponse(self._client.project)
555543

544+
@cached_property
545+
def documents(self) -> documents.AsyncDocumentsResourceWithRawResponse:
546+
from .resources.documents import AsyncDocumentsResourceWithRawResponse
556547

557-
class UnlayerWithStreamedResponse:
558-
_client: Unlayer
559-
560-
def __init__(self, client: Unlayer) -> None:
561-
self._client = client
548+
return AsyncDocumentsResourceWithRawResponse(self._client.documents)
562549

563550
@cached_property
564-
def pages(self) -> pages.PagesResourceWithStreamingResponse:
565-
from .resources.pages import PagesResourceWithStreamingResponse
551+
def pages(self) -> pages.AsyncPagesResourceWithRawResponse:
552+
from .resources.pages import AsyncPagesResourceWithRawResponse
566553

567-
return PagesResourceWithStreamingResponse(self._client.pages)
554+
return AsyncPagesResourceWithRawResponse(self._client.pages)
568555

569-
@cached_property
570-
def documents(self) -> documents.DocumentsResourceWithStreamingResponse:
571-
from .resources.documents import DocumentsResourceWithStreamingResponse
572556

573-
return DocumentsResourceWithStreamingResponse(self._client.documents)
557+
class UnlayerWithStreamedResponse:
558+
_client: Unlayer
559+
560+
def __init__(self, client: Unlayer) -> None:
561+
self._client = client
574562

575563
@cached_property
576564
def emails(self) -> emails.EmailsResourceWithStreamingResponse:
@@ -584,24 +572,24 @@ def project(self) -> project.ProjectResourceWithStreamingResponse:
584572

585573
return ProjectResourceWithStreamingResponse(self._client.project)
586574

575+
@cached_property
576+
def documents(self) -> documents.DocumentsResourceWithStreamingResponse:
577+
from .resources.documents import DocumentsResourceWithStreamingResponse
587578

588-
class AsyncUnlayerWithStreamedResponse:
589-
_client: AsyncUnlayer
590-
591-
def __init__(self, client: AsyncUnlayer) -> None:
592-
self._client = client
579+
return DocumentsResourceWithStreamingResponse(self._client.documents)
593580

594581
@cached_property
595-
def pages(self) -> pages.AsyncPagesResourceWithStreamingResponse:
596-
from .resources.pages import AsyncPagesResourceWithStreamingResponse
582+
def pages(self) -> pages.PagesResourceWithStreamingResponse:
583+
from .resources.pages import PagesResourceWithStreamingResponse
597584

598-
return AsyncPagesResourceWithStreamingResponse(self._client.pages)
585+
return PagesResourceWithStreamingResponse(self._client.pages)
599586

600-
@cached_property
601-
def documents(self) -> documents.AsyncDocumentsResourceWithStreamingResponse:
602-
from .resources.documents import AsyncDocumentsResourceWithStreamingResponse
603587

604-
return AsyncDocumentsResourceWithStreamingResponse(self._client.documents)
588+
class AsyncUnlayerWithStreamedResponse:
589+
_client: AsyncUnlayer
590+
591+
def __init__(self, client: AsyncUnlayer) -> None:
592+
self._client = client
605593

606594
@cached_property
607595
def emails(self) -> emails.AsyncEmailsResourceWithStreamingResponse:
@@ -615,6 +603,18 @@ def project(self) -> project.AsyncProjectResourceWithStreamingResponse:
615603

616604
return AsyncProjectResourceWithStreamingResponse(self._client.project)
617605

606+
@cached_property
607+
def documents(self) -> documents.AsyncDocumentsResourceWithStreamingResponse:
608+
from .resources.documents import AsyncDocumentsResourceWithStreamingResponse
609+
610+
return AsyncDocumentsResourceWithStreamingResponse(self._client.documents)
611+
612+
@cached_property
613+
def pages(self) -> pages.AsyncPagesResourceWithStreamingResponse:
614+
from .resources.pages import AsyncPagesResourceWithStreamingResponse
615+
616+
return AsyncPagesResourceWithStreamingResponse(self._client.pages)
617+
618618

619619
Client = Unlayer
620620

‎src/unlayer/resources/__init__.py‎

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -34,18 +34,6 @@
3434
)
3535

3636
__all__ = [
37-
"PagesResource",
38-
"AsyncPagesResource",
39-
"PagesResourceWithRawResponse",
40-
"AsyncPagesResourceWithRawResponse",
41-
"PagesResourceWithStreamingResponse",
42-
"AsyncPagesResourceWithStreamingResponse",
43-
"DocumentsResource",
44-
"AsyncDocumentsResource",
45-
"DocumentsResourceWithRawResponse",
46-
"AsyncDocumentsResourceWithRawResponse",
47-
"DocumentsResourceWithStreamingResponse",
48-
"AsyncDocumentsResourceWithStreamingResponse",
4937
"EmailsResource",
5038
"AsyncEmailsResource",
5139
"EmailsResourceWithRawResponse",
@@ -58,4 +46,16 @@
5846
"AsyncProjectResourceWithRawResponse",
5947
"ProjectResourceWithStreamingResponse",
6048
"AsyncProjectResourceWithStreamingResponse",
49+
"DocumentsResource",
50+
"AsyncDocumentsResource",
51+
"DocumentsResourceWithRawResponse",
52+
"AsyncDocumentsResourceWithRawResponse",
53+
"DocumentsResourceWithStreamingResponse",
54+
"AsyncDocumentsResourceWithStreamingResponse",
55+
"PagesResource",
56+
"AsyncPagesResource",
57+
"PagesResourceWithRawResponse",
58+
"AsyncPagesResourceWithRawResponse",
59+
"PagesResourceWithStreamingResponse",
60+
"AsyncPagesResourceWithStreamingResponse",
6161
]

0 commit comments

Comments
 (0)