Skip to content

Commit 7656563

Browse files
feat(api): aggregated API specs update
1 parent a6e8476 commit 7656563

4 files changed

Lines changed: 114 additions & 70 deletions

File tree

.stats.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
configured_endpoints: 632
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/gcore%2Fgcore-af877f4bcacb08ddb1febe8cf82da30454f95a010d02d30720d4f6e79a42883f.yml
3-
openapi_spec_hash: 27676e14bc9581a1a395bb0f9514f883
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/gcore%2Fgcore-771d5912d13cfded02247290691560b16c332adb8b1283d6ba814b8e118d3694.yml
3+
openapi_spec_hash: 8ca4e1564be0ee0057edcbb283c7680c
44
config_hash: b538b5efdff6ec96ee120407e226c19e

src/gcore/resources/cloud/projects.py

Lines changed: 43 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
from __future__ import annotations
44

5+
import typing_extensions
56
from typing import Optional
67
from typing_extensions import Literal
78

@@ -91,6 +92,7 @@ def create(
9192
cast_to=Project,
9293
)
9394

95+
@typing_extensions.deprecated("deprecated")
9496
def update(
9597
self,
9698
*,
@@ -104,10 +106,14 @@ def update(
104106
extra_body: Body | None = None,
105107
timeout: float | httpx.Timeout | None | NotGiven = not_given,
106108
) -> Project:
107-
"""
108-
Update project name and description.
109+
"""Update project.
110+
111+
Depricated: Use PATCH /v1/projects/{project_id} instead Update
112+
project name and description.
109113
110114
Args:
115+
project_id: Project ID
116+
111117
name: Name of the entity, following a specific format.
112118
113119
description: Description of the project.
@@ -220,6 +226,8 @@ def delete(
220226
deleted.
221227
222228
Args:
229+
project_id: Project ID
230+
223231
extra_headers: Send extra headers
224232
225233
extra_query: Add additional query parameters to the request
@@ -249,10 +257,13 @@ def get(
249257
extra_body: Body | None = None,
250258
timeout: float | httpx.Timeout | None | NotGiven = not_given,
251259
) -> Project:
252-
"""
260+
"""Get project.
261+
253262
Retrieve detailed information about a specific project.
254263
255264
Args:
265+
project_id: Project ID
266+
256267
extra_headers: Send extra headers
257268
258269
extra_query: Add additional query parameters to the request
@@ -337,6 +348,7 @@ async def create(
337348
cast_to=Project,
338349
)
339350

351+
@typing_extensions.deprecated("deprecated")
340352
async def update(
341353
self,
342354
*,
@@ -350,10 +362,14 @@ async def update(
350362
extra_body: Body | None = None,
351363
timeout: float | httpx.Timeout | None | NotGiven = not_given,
352364
) -> Project:
353-
"""
354-
Update project name and description.
365+
"""Update project.
366+
367+
Depricated: Use PATCH /v1/projects/{project_id} instead Update
368+
project name and description.
355369
356370
Args:
371+
project_id: Project ID
372+
357373
name: Name of the entity, following a specific format.
358374
359375
description: Description of the project.
@@ -466,6 +482,8 @@ async def delete(
466482
deleted.
467483
468484
Args:
485+
project_id: Project ID
486+
469487
extra_headers: Send extra headers
470488
471489
extra_query: Add additional query parameters to the request
@@ -495,10 +513,13 @@ async def get(
495513
extra_body: Body | None = None,
496514
timeout: float | httpx.Timeout | None | NotGiven = not_given,
497515
) -> Project:
498-
"""
516+
"""Get project.
517+
499518
Retrieve detailed information about a specific project.
500519
501520
Args:
521+
project_id: Project ID
522+
502523
extra_headers: Send extra headers
503524
504525
extra_query: Add additional query parameters to the request
@@ -525,8 +546,10 @@ def __init__(self, projects: ProjectsResource) -> None:
525546
self.create = to_raw_response_wrapper(
526547
projects.create,
527548
)
528-
self.update = to_raw_response_wrapper(
529-
projects.update,
549+
self.update = ( # pyright: ignore[reportDeprecated]
550+
to_raw_response_wrapper(
551+
projects.update, # pyright: ignore[reportDeprecated],
552+
)
530553
)
531554
self.list = to_raw_response_wrapper(
532555
projects.list,
@@ -546,8 +569,10 @@ def __init__(self, projects: AsyncProjectsResource) -> None:
546569
self.create = async_to_raw_response_wrapper(
547570
projects.create,
548571
)
549-
self.update = async_to_raw_response_wrapper(
550-
projects.update,
572+
self.update = ( # pyright: ignore[reportDeprecated]
573+
async_to_raw_response_wrapper(
574+
projects.update, # pyright: ignore[reportDeprecated],
575+
)
551576
)
552577
self.list = async_to_raw_response_wrapper(
553578
projects.list,
@@ -567,8 +592,10 @@ def __init__(self, projects: ProjectsResource) -> None:
567592
self.create = to_streamed_response_wrapper(
568593
projects.create,
569594
)
570-
self.update = to_streamed_response_wrapper(
571-
projects.update,
595+
self.update = ( # pyright: ignore[reportDeprecated]
596+
to_streamed_response_wrapper(
597+
projects.update, # pyright: ignore[reportDeprecated],
598+
)
572599
)
573600
self.list = to_streamed_response_wrapper(
574601
projects.list,
@@ -588,8 +615,10 @@ def __init__(self, projects: AsyncProjectsResource) -> None:
588615
self.create = async_to_streamed_response_wrapper(
589616
projects.create,
590617
)
591-
self.update = async_to_streamed_response_wrapper(
592-
projects.update,
618+
self.update = ( # pyright: ignore[reportDeprecated]
619+
async_to_streamed_response_wrapper(
620+
projects.update, # pyright: ignore[reportDeprecated],
621+
)
593622
)
594623
self.list = async_to_streamed_response_wrapper(
595624
projects.list,

src/gcore/types/cloud/project_update_params.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010

1111
class ProjectUpdateParams(TypedDict, total=False):
1212
project_id: int
13+
"""Project ID"""
1314

1415
name: Required[str]
1516
"""Name of the entity, following a specific format."""

0 commit comments

Comments
 (0)