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

Commit a19b633

Browse files
feat(api): api update
1 parent 1105634 commit a19b633

17 files changed

Lines changed: 955 additions & 5 deletions

‎.stats.yml‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
configured_endpoints: 14
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/unlayer/unlayer-8f62b635191810fa318afdeaabbbb0276b0e1f85f18b5ff2ddaad9a18241f047.yml
3-
openapi_spec_hash: e80a61e80827f2a822db46f4ba82c15d
4-
config_hash: 2949daec69cb6f5d34ae232544245952
1+
configured_endpoints: 16
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/unlayer/unlayer-bccf7c265777474ad23af36d8613e0c738575733ba2335e42129def19d09c021.yml
3+
openapi_spec_hash: 28687f1755511828bc8323d621eba251
4+
config_hash: de0fdd9f4e2afbb6886dfabb1e7306fa

‎api.md‎

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,29 @@
1+
# EditorSessions
2+
3+
Types:
4+
5+
```python
6+
from unlayer.types import EditorSessionCreateResponse
7+
```
8+
9+
Methods:
10+
11+
- <code title="post /v3/editor-sessions">client.editor_sessions.<a href="./src/unlayer/resources/editor_sessions.py">create</a>(\*\*<a href="src/unlayer/types/editor_session_create_params.py">params</a>) -> <a href="./src/unlayer/types/editor_session_create_response.py">EditorSessionCreateResponse</a></code>
12+
13+
# Me
14+
15+
## Subscription
16+
17+
Types:
18+
19+
```python
20+
from unlayer.types.me import SubscriptionRetrieveResponse
21+
```
22+
23+
Methods:
24+
25+
- <code title="get /v3/me/subscription">client.me.subscription.<a href="./src/unlayer/resources/me/subscription.py">retrieve</a>(\*\*<a href="src/unlayer/types/me/subscription_retrieve_params.py">params</a>) -> <a href="./src/unlayer/types/me/subscription_retrieve_response.py">SubscriptionRetrieveResponse</a></code>
26+
127
# Projects
228

329
Types:

‎src/unlayer/_client.py‎

Lines changed: 75 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,9 +36,11 @@
3636
)
3737

3838
if TYPE_CHECKING:
39-
from .resources import projects, templates, workspaces
39+
from .resources import me, projects, templates, workspaces, editor_sessions
40+
from .resources.me.me import MeResource, AsyncMeResource
4041
from .resources.projects import ProjectsResource, AsyncProjectsResource
4142
from .resources.workspaces import WorkspacesResource, AsyncWorkspacesResource
43+
from .resources.editor_sessions import EditorSessionsResource, AsyncEditorSessionsResource
4244
from .resources.templates.templates import TemplatesResource, AsyncTemplatesResource
4345

4446
__all__ = ["Timeout", "Transport", "ProxiesTypes", "RequestOptions", "Unlayer", "AsyncUnlayer", "Client", "AsyncClient"]
@@ -119,6 +121,18 @@ def __init__(
119121
_strict_response_validation=_strict_response_validation,
120122
)
121123

124+
@cached_property
125+
def editor_sessions(self) -> EditorSessionsResource:
126+
from .resources.editor_sessions import EditorSessionsResource
127+
128+
return EditorSessionsResource(self)
129+
130+
@cached_property
131+
def me(self) -> MeResource:
132+
from .resources.me import MeResource
133+
134+
return MeResource(self)
135+
122136
@cached_property
123137
def projects(self) -> ProjectsResource:
124138
"""Project details and configuration."""
@@ -357,6 +371,18 @@ def __init__(
357371
_strict_response_validation=_strict_response_validation,
358372
)
359373

374+
@cached_property
375+
def editor_sessions(self) -> AsyncEditorSessionsResource:
376+
from .resources.editor_sessions import AsyncEditorSessionsResource
377+
378+
return AsyncEditorSessionsResource(self)
379+
380+
@cached_property
381+
def me(self) -> AsyncMeResource:
382+
from .resources.me import AsyncMeResource
383+
384+
return AsyncMeResource(self)
385+
360386
@cached_property
361387
def projects(self) -> AsyncProjectsResource:
362388
"""Project details and configuration."""
@@ -526,6 +552,18 @@ class UnlayerWithRawResponse:
526552
def __init__(self, client: Unlayer) -> None:
527553
self._client = client
528554

555+
@cached_property
556+
def editor_sessions(self) -> editor_sessions.EditorSessionsResourceWithRawResponse:
557+
from .resources.editor_sessions import EditorSessionsResourceWithRawResponse
558+
559+
return EditorSessionsResourceWithRawResponse(self._client.editor_sessions)
560+
561+
@cached_property
562+
def me(self) -> me.MeResourceWithRawResponse:
563+
from .resources.me import MeResourceWithRawResponse
564+
565+
return MeResourceWithRawResponse(self._client.me)
566+
529567
@cached_property
530568
def projects(self) -> projects.ProjectsResourceWithRawResponse:
531569
"""Project details and configuration."""
@@ -556,6 +594,18 @@ class AsyncUnlayerWithRawResponse:
556594
def __init__(self, client: AsyncUnlayer) -> None:
557595
self._client = client
558596

597+
@cached_property
598+
def editor_sessions(self) -> editor_sessions.AsyncEditorSessionsResourceWithRawResponse:
599+
from .resources.editor_sessions import AsyncEditorSessionsResourceWithRawResponse
600+
601+
return AsyncEditorSessionsResourceWithRawResponse(self._client.editor_sessions)
602+
603+
@cached_property
604+
def me(self) -> me.AsyncMeResourceWithRawResponse:
605+
from .resources.me import AsyncMeResourceWithRawResponse
606+
607+
return AsyncMeResourceWithRawResponse(self._client.me)
608+
559609
@cached_property
560610
def projects(self) -> projects.AsyncProjectsResourceWithRawResponse:
561611
"""Project details and configuration."""
@@ -586,6 +636,18 @@ class UnlayerWithStreamedResponse:
586636
def __init__(self, client: Unlayer) -> None:
587637
self._client = client
588638

639+
@cached_property
640+
def editor_sessions(self) -> editor_sessions.EditorSessionsResourceWithStreamingResponse:
641+
from .resources.editor_sessions import EditorSessionsResourceWithStreamingResponse
642+
643+
return EditorSessionsResourceWithStreamingResponse(self._client.editor_sessions)
644+
645+
@cached_property
646+
def me(self) -> me.MeResourceWithStreamingResponse:
647+
from .resources.me import MeResourceWithStreamingResponse
648+
649+
return MeResourceWithStreamingResponse(self._client.me)
650+
589651
@cached_property
590652
def projects(self) -> projects.ProjectsResourceWithStreamingResponse:
591653
"""Project details and configuration."""
@@ -616,6 +678,18 @@ class AsyncUnlayerWithStreamedResponse:
616678
def __init__(self, client: AsyncUnlayer) -> None:
617679
self._client = client
618680

681+
@cached_property
682+
def editor_sessions(self) -> editor_sessions.AsyncEditorSessionsResourceWithStreamingResponse:
683+
from .resources.editor_sessions import AsyncEditorSessionsResourceWithStreamingResponse
684+
685+
return AsyncEditorSessionsResourceWithStreamingResponse(self._client.editor_sessions)
686+
687+
@cached_property
688+
def me(self) -> me.AsyncMeResourceWithStreamingResponse:
689+
from .resources.me import AsyncMeResourceWithStreamingResponse
690+
691+
return AsyncMeResourceWithStreamingResponse(self._client.me)
692+
619693
@cached_property
620694
def projects(self) -> projects.AsyncProjectsResourceWithStreamingResponse:
621695
"""Project details and configuration."""

‎src/unlayer/resources/__init__.py‎

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,13 @@
11
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
22

3+
from .me import (
4+
MeResource,
5+
AsyncMeResource,
6+
MeResourceWithRawResponse,
7+
AsyncMeResourceWithRawResponse,
8+
MeResourceWithStreamingResponse,
9+
AsyncMeResourceWithStreamingResponse,
10+
)
311
from .projects import (
412
ProjectsResource,
513
AsyncProjectsResource,
@@ -24,8 +32,28 @@
2432
WorkspacesResourceWithStreamingResponse,
2533
AsyncWorkspacesResourceWithStreamingResponse,
2634
)
35+
from .editor_sessions import (
36+
EditorSessionsResource,
37+
AsyncEditorSessionsResource,
38+
EditorSessionsResourceWithRawResponse,
39+
AsyncEditorSessionsResourceWithRawResponse,
40+
EditorSessionsResourceWithStreamingResponse,
41+
AsyncEditorSessionsResourceWithStreamingResponse,
42+
)
2743

2844
__all__ = [
45+
"EditorSessionsResource",
46+
"AsyncEditorSessionsResource",
47+
"EditorSessionsResourceWithRawResponse",
48+
"AsyncEditorSessionsResourceWithRawResponse",
49+
"EditorSessionsResourceWithStreamingResponse",
50+
"AsyncEditorSessionsResourceWithStreamingResponse",
51+
"MeResource",
52+
"AsyncMeResource",
53+
"MeResourceWithRawResponse",
54+
"AsyncMeResourceWithRawResponse",
55+
"MeResourceWithStreamingResponse",
56+
"AsyncMeResourceWithStreamingResponse",
2957
"ProjectsResource",
3058
"AsyncProjectsResource",
3159
"ProjectsResourceWithRawResponse",

0 commit comments

Comments
 (0)