Skip to content
This repository was archived by the owner on Nov 2, 2025. It is now read-only.

Commit ad8dfdd

Browse files
release: 0.16.0 (#17)
Automated Release PR --- ## 0.16.0 (2025-10-06) Full Changelog: [v0.15.0...v0.16.0](v0.15.0...v0.16.0) ### Features * **api:** manual updates ([03513e9](03513e9)) --- This pull request is managed by Stainless's [GitHub App](https://github.com/apps/stainless-app). The [semver version number](https://semver.org/#semantic-versioning-specification-semver) is based on included [commit messages](https://www.conventionalcommits.org/en/v1.0.0/). Alternatively, you can manually set the version number in the title of this pull request. For a better experience, it is recommended to use either rebase-merge or squash-merge when merging this pull request. 🔗 Stainless [website](https://www.stainlessapi.com) 📚 Read the [docs](https://app.stainlessapi.com/docs) 🙋 [Reach out](mailto:[email protected]) for help or questions --------- Co-authored-by: stainless-app[bot] <142633134+stainless-app[bot]@users.noreply.github.com>
1 parent 43fbcbb commit ad8dfdd

File tree

10 files changed

+153
-9
lines changed

10 files changed

+153
-9
lines changed

.release-please-manifest.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
{
2-
".": "0.15.0"
2+
".": "0.16.0"
33
}

.stats.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
configured_endpoints: 43
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/inty%2Finty-bd9470194fe169e6dc79216a8f03c401fd3b160d551d1a102ad6586f151c3b61.yml
3-
openapi_spec_hash: 766cd330850dd373f4115b98a8da27c3
4-
config_hash: 432e018b959089e4736f74b52bafad54
1+
configured_endpoints: 44
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/inty%2Finty-8c144d825fdfa369cf16995bf00706fb8bef562ade8cf6948b28b737ecb6a6cb.yml
3+
openapi_spec_hash: 0131ffad8903eedaf491699b0e28351b
4+
config_hash: c0a34dbff811a8b614d969c58e58846e

CHANGELOG.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,13 @@
11
# Changelog
22

3+
## 0.16.0 (2025-10-06)
4+
5+
Full Changelog: [v0.15.0...v0.16.0](https://github.com/NascentCore/inty-python/compare/v0.15.0...v0.16.0)
6+
7+
### Features
8+
9+
* **api:** manual updates ([03513e9](https://github.com/NascentCore/inty-python/commit/03513e98a8e180aee6b2d3113952c3472d903b96))
10+
311
## 0.15.0 (2025-09-29)
412

513
Full Changelog: [v0.14.0...v0.15.0](https://github.com/NascentCore/inty-python/compare/v0.14.0...v0.15.0)

api.md

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,13 +54,20 @@ Methods:
5454
Types:
5555

5656
```python
57-
from inty.types.api.v1.users import Gender, User, ProfileRetrieveResponse, ProfileUpdateResponse
57+
from inty.types.api.v1.users import (
58+
Gender,
59+
User,
60+
ProfileRetrieveResponse,
61+
ProfileUpdateResponse,
62+
ProfileMeResponse,
63+
)
5864
```
5965

6066
Methods:
6167

6268
- <code title="get /api/v1/users/profile">client.api.v1.users.profile.<a href="./src/inty/resources/api/v1/users/profile.py">retrieve</a>() -> <a href="./src/inty/types/api/v1/users/profile_retrieve_response.py">ProfileRetrieveResponse</a></code>
6369
- <code title="put /api/v1/users/profile">client.api.v1.users.profile.<a href="./src/inty/resources/api/v1/users/profile.py">update</a>(\*\*<a href="src/inty/types/api/v1/users/profile_update_params.py">params</a>) -> <a href="./src/inty/types/api/v1/users/profile_update_response.py">ProfileUpdateResponse</a></code>
70+
- <code title="get /api/v1/users/me">client.api.v1.users.profile.<a href="./src/inty/resources/api/v1/users/profile.py">me</a>() -> <a href="./src/inty/types/api/v1/users/profile_me_response.py">ProfileMeResponse</a></code>
6471

6572
#### Device
6673

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[project]
22
name = "inty"
3-
version = "0.15.0"
3+
version = "0.16.0"
44
description = "The official Python library for the inty API"
55
dynamic = ["readme"]
66
license = "Apache-2.0"

src/inty/_version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
22

33
__title__ = "inty"
4-
__version__ = "0.15.0" # x-release-please-version
4+
__version__ = "0.16.0" # x-release-please-version

src/inty/resources/api/v1/users/profile.py

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
from ....._base_client import make_request_options
2020
from .....types.api.v1.users import Gender, profile_update_params
2121
from .....types.api.v1.users.gender import Gender
22+
from .....types.api.v1.users.profile_me_response import ProfileMeResponse
2223
from .....types.api.v1.users.profile_update_response import ProfileUpdateResponse
2324
from .....types.api.v1.users.profile_retrieve_response import ProfileRetrieveResponse
2425

@@ -119,6 +120,25 @@ def update(
119120
cast_to=ProfileUpdateResponse,
120121
)
121122

123+
def me(
124+
self,
125+
*,
126+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
127+
# The extra values given here take precedence over values defined on the client or passed to this method.
128+
extra_headers: Headers | None = None,
129+
extra_query: Query | None = None,
130+
extra_body: Body | None = None,
131+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
132+
) -> ProfileMeResponse:
133+
"""Get current user profile."""
134+
return self._get(
135+
"/api/v1/users/me",
136+
options=make_request_options(
137+
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
138+
),
139+
cast_to=ProfileMeResponse,
140+
)
141+
122142

123143
class AsyncProfileResource(AsyncAPIResource):
124144
@cached_property
@@ -214,6 +234,25 @@ async def update(
214234
cast_to=ProfileUpdateResponse,
215235
)
216236

237+
async def me(
238+
self,
239+
*,
240+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
241+
# The extra values given here take precedence over values defined on the client or passed to this method.
242+
extra_headers: Headers | None = None,
243+
extra_query: Query | None = None,
244+
extra_body: Body | None = None,
245+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
246+
) -> ProfileMeResponse:
247+
"""Get current user profile."""
248+
return await self._get(
249+
"/api/v1/users/me",
250+
options=make_request_options(
251+
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
252+
),
253+
cast_to=ProfileMeResponse,
254+
)
255+
217256

218257
class ProfileResourceWithRawResponse:
219258
def __init__(self, profile: ProfileResource) -> None:
@@ -225,6 +264,9 @@ def __init__(self, profile: ProfileResource) -> None:
225264
self.update = to_raw_response_wrapper(
226265
profile.update,
227266
)
267+
self.me = to_raw_response_wrapper(
268+
profile.me,
269+
)
228270

229271

230272
class AsyncProfileResourceWithRawResponse:
@@ -237,6 +279,9 @@ def __init__(self, profile: AsyncProfileResource) -> None:
237279
self.update = async_to_raw_response_wrapper(
238280
profile.update,
239281
)
282+
self.me = async_to_raw_response_wrapper(
283+
profile.me,
284+
)
240285

241286

242287
class ProfileResourceWithStreamingResponse:
@@ -249,6 +294,9 @@ def __init__(self, profile: ProfileResource) -> None:
249294
self.update = to_streamed_response_wrapper(
250295
profile.update,
251296
)
297+
self.me = to_streamed_response_wrapper(
298+
profile.me,
299+
)
252300

253301

254302
class AsyncProfileResourceWithStreamingResponse:
@@ -261,3 +309,6 @@ def __init__(self, profile: AsyncProfileResource) -> None:
261309
self.update = async_to_streamed_response_wrapper(
262310
profile.update,
263311
)
312+
self.me = async_to_streamed_response_wrapper(
313+
profile.me,
314+
)

src/inty/types/api/v1/users/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
from .user import User as User
66
from .gender import Gender as Gender
77
from .api_response import APIResponse as APIResponse
8+
from .profile_me_response import ProfileMeResponse as ProfileMeResponse
89
from .profile_update_params import ProfileUpdateParams as ProfileUpdateParams
910
from .device_register_params import DeviceRegisterParams as DeviceRegisterParams
1011
from .profile_update_response import ProfileUpdateResponse as ProfileUpdateResponse
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2+
3+
from typing import Optional
4+
5+
from .user import User
6+
from ....._models import BaseModel
7+
8+
__all__ = ["ProfileMeResponse"]
9+
10+
11+
class ProfileMeResponse(BaseModel):
12+
code: Optional[int] = None
13+
14+
data: Optional[User] = None
15+
"""返回给客户端的用户信息"""
16+
17+
message: Optional[str] = None

tests/api_resources/api/v1/users/test_profile.py

Lines changed: 61 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,11 @@
99

1010
from inty import Inty, AsyncInty
1111
from tests.utils import assert_matches_type
12-
from inty.types.api.v1.users import ProfileUpdateResponse, ProfileRetrieveResponse
12+
from inty.types.api.v1.users import (
13+
ProfileMeResponse,
14+
ProfileUpdateResponse,
15+
ProfileRetrieveResponse,
16+
)
1317

1418
base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010")
1519

@@ -89,6 +93,34 @@ def test_streaming_response_update(self, client: Inty) -> None:
8993

9094
assert cast(Any, response.is_closed) is True
9195

96+
@pytest.mark.skip(reason="Prism tests are disabled")
97+
@parametrize
98+
def test_method_me(self, client: Inty) -> None:
99+
profile = client.api.v1.users.profile.me()
100+
assert_matches_type(ProfileMeResponse, profile, path=["response"])
101+
102+
@pytest.mark.skip(reason="Prism tests are disabled")
103+
@parametrize
104+
def test_raw_response_me(self, client: Inty) -> None:
105+
response = client.api.v1.users.profile.with_raw_response.me()
106+
107+
assert response.is_closed is True
108+
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
109+
profile = response.parse()
110+
assert_matches_type(ProfileMeResponse, profile, path=["response"])
111+
112+
@pytest.mark.skip(reason="Prism tests are disabled")
113+
@parametrize
114+
def test_streaming_response_me(self, client: Inty) -> None:
115+
with client.api.v1.users.profile.with_streaming_response.me() as response:
116+
assert not response.is_closed
117+
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
118+
119+
profile = response.parse()
120+
assert_matches_type(ProfileMeResponse, profile, path=["response"])
121+
122+
assert cast(Any, response.is_closed) is True
123+
92124

93125
class TestAsyncProfile:
94126
parametrize = pytest.mark.parametrize(
@@ -166,3 +198,31 @@ async def test_streaming_response_update(self, async_client: AsyncInty) -> None:
166198
assert_matches_type(ProfileUpdateResponse, profile, path=["response"])
167199

168200
assert cast(Any, response.is_closed) is True
201+
202+
@pytest.mark.skip(reason="Prism tests are disabled")
203+
@parametrize
204+
async def test_method_me(self, async_client: AsyncInty) -> None:
205+
profile = await async_client.api.v1.users.profile.me()
206+
assert_matches_type(ProfileMeResponse, profile, path=["response"])
207+
208+
@pytest.mark.skip(reason="Prism tests are disabled")
209+
@parametrize
210+
async def test_raw_response_me(self, async_client: AsyncInty) -> None:
211+
response = await async_client.api.v1.users.profile.with_raw_response.me()
212+
213+
assert response.is_closed is True
214+
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
215+
profile = await response.parse()
216+
assert_matches_type(ProfileMeResponse, profile, path=["response"])
217+
218+
@pytest.mark.skip(reason="Prism tests are disabled")
219+
@parametrize
220+
async def test_streaming_response_me(self, async_client: AsyncInty) -> None:
221+
async with async_client.api.v1.users.profile.with_streaming_response.me() as response:
222+
assert not response.is_closed
223+
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
224+
225+
profile = await response.parse()
226+
assert_matches_type(ProfileMeResponse, profile, path=["response"])
227+
228+
assert cast(Any, response.is_closed) is True

0 commit comments

Comments
 (0)