Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: update via SDK Studio #88

Merged
merged 1 commit into from
Mar 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .stats.yml
Original file line number Diff line number Diff line change
@@ -1 +1 @@
configured_endpoints: 1257
configured_endpoints: 1256
2 changes: 0 additions & 2 deletions api.md
Original file line number Diff line number Diff line change
Expand Up @@ -7511,7 +7511,6 @@ from cloudflare.types.cloudforce_one.requests import (
PriorityCreateResponse,
PriorityUpdateResponse,
PriorityDeleteResponse,
PriorityDoSomethingUnknownResponse,
PriorityGetResponse,
PriorityQuotaResponse,
)
Expand All @@ -7522,6 +7521,5 @@ Methods:
- <code title="post /accounts/{account_identifier}/cloudforce-one/requests/priority/new">client.cloudforce_one.requests.priority.<a href="./src/cloudflare/resources/cloudforce_one/requests/priority.py">create</a>(account_identifier, \*\*<a href="src/cloudflare/types/cloudforce_one/requests/priority_create_params.py">params</a>) -> <a href="./src/cloudflare/types/cloudforce_one/requests/priority_create_response.py">PriorityCreateResponse</a></code>
- <code title="put /accounts/{account_identifier}/cloudforce-one/requests/priority/{priority_identifer}">client.cloudforce_one.requests.priority.<a href="./src/cloudflare/resources/cloudforce_one/requests/priority.py">update</a>(priority_identifer, \*, account_identifier, \*\*<a href="src/cloudflare/types/cloudforce_one/requests/priority_update_params.py">params</a>) -> <a href="./src/cloudflare/types/cloudforce_one/requests/priority_update_response.py">PriorityUpdateResponse</a></code>
- <code title="delete /accounts/{account_identifier}/cloudforce-one/requests/priority/{priority_identifer}">client.cloudforce_one.requests.priority.<a href="./src/cloudflare/resources/cloudforce_one/requests/priority.py">delete</a>(priority_identifer, \*, account_identifier) -> <a href="./src/cloudflare/types/cloudforce_one/requests/priority_delete_response.py">PriorityDeleteResponse</a></code>
- <code title="post /accounts/{account_identifier}/cloudforce-one/requests/priority">client.cloudforce_one.requests.priority.<a href="./src/cloudflare/resources/cloudforce_one/requests/priority.py">do_something_unknown</a>(account_identifier, \*\*<a href="src/cloudflare/types/cloudforce_one/requests/priority_do_something_unknown_params.py">params</a>) -> <a href="./src/cloudflare/types/cloudforce_one/requests/priority_do_something_unknown_response.py">PriorityDoSomethingUnknownResponse</a></code>
- <code title="get /accounts/{account_identifier}/cloudforce-one/requests/priority/{priority_identifer}">client.cloudforce_one.requests.priority.<a href="./src/cloudflare/resources/cloudforce_one/requests/priority.py">get</a>(priority_identifer, \*, account_identifier) -> <a href="./src/cloudflare/types/cloudforce_one/requests/priority_get_response.py">PriorityGetResponse</a></code>
- <code title="get /accounts/{account_identifier}/cloudforce-one/requests/priority/quota">client.cloudforce_one.requests.priority.<a href="./src/cloudflare/resources/cloudforce_one/requests/priority.py">quota</a>(account_identifier) -> <a href="./src/cloudflare/types/cloudforce_one/requests/priority_quota_response.py">PriorityQuotaResponse</a></code>
118 changes: 0 additions & 118 deletions src/cloudflare/resources/cloudforce_one/requests/priority.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,8 @@
PriorityCreateResponse,
PriorityDeleteResponse,
PriorityUpdateResponse,
PriorityDoSomethingUnknownResponse,
priority_create_params,
priority_update_params,
priority_do_something_unknown_params,
)

__all__ = ["Priority", "AsyncPriority"]
Expand Down Expand Up @@ -222,58 +220,6 @@ def delete(
),
)

def do_something_unknown(
self,
account_identifier: str,
*,
page: int,
per_page: int,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
# The extra values given here take precedence over values defined on the client or passed to this method.
extra_headers: Headers | None = None,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
) -> PriorityDoSomethingUnknownResponse:
"""
List Priority Intelligence Requirements

Args:
account_identifier: Identifier

page: Page number of results

per_page: Number of results per page

extra_headers: Send extra headers

extra_query: Add additional query parameters to the request

extra_body: Add additional JSON properties to the request

timeout: Override the client-level default timeout for this request, in seconds
"""
if not account_identifier:
raise ValueError(f"Expected a non-empty value for `account_identifier` but received {account_identifier!r}")
return self._post(
f"/accounts/{account_identifier}/cloudforce-one/requests/priority",
body=maybe_transform(
{
"page": page,
"per_page": per_page,
},
priority_do_something_unknown_params.PriorityDoSomethingUnknownParams,
),
options=make_request_options(
extra_headers=extra_headers,
extra_query=extra_query,
extra_body=extra_body,
timeout=timeout,
post_parser=ResultWrapper._unwrapper,
),
cast_to=cast(Type[PriorityDoSomethingUnknownResponse], ResultWrapper[PriorityDoSomethingUnknownResponse]),
)

def get(
self,
priority_identifer: str,
Expand Down Expand Up @@ -541,58 +487,6 @@ async def delete(
),
)

async def do_something_unknown(
self,
account_identifier: str,
*,
page: int,
per_page: int,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
# The extra values given here take precedence over values defined on the client or passed to this method.
extra_headers: Headers | None = None,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
) -> PriorityDoSomethingUnknownResponse:
"""
List Priority Intelligence Requirements

Args:
account_identifier: Identifier

page: Page number of results

per_page: Number of results per page

extra_headers: Send extra headers

extra_query: Add additional query parameters to the request

extra_body: Add additional JSON properties to the request

timeout: Override the client-level default timeout for this request, in seconds
"""
if not account_identifier:
raise ValueError(f"Expected a non-empty value for `account_identifier` but received {account_identifier!r}")
return await self._post(
f"/accounts/{account_identifier}/cloudforce-one/requests/priority",
body=await async_maybe_transform(
{
"page": page,
"per_page": per_page,
},
priority_do_something_unknown_params.PriorityDoSomethingUnknownParams,
),
options=make_request_options(
extra_headers=extra_headers,
extra_query=extra_query,
extra_body=extra_body,
timeout=timeout,
post_parser=ResultWrapper._unwrapper,
),
cast_to=cast(Type[PriorityDoSomethingUnknownResponse], ResultWrapper[PriorityDoSomethingUnknownResponse]),
)

async def get(
self,
priority_identifer: str,
Expand Down Expand Up @@ -690,9 +584,6 @@ def __init__(self, priority: Priority) -> None:
self.delete = to_raw_response_wrapper(
priority.delete,
)
self.do_something_unknown = to_raw_response_wrapper(
priority.do_something_unknown,
)
self.get = to_raw_response_wrapper(
priority.get,
)
Expand All @@ -714,9 +605,6 @@ def __init__(self, priority: AsyncPriority) -> None:
self.delete = async_to_raw_response_wrapper(
priority.delete,
)
self.do_something_unknown = async_to_raw_response_wrapper(
priority.do_something_unknown,
)
self.get = async_to_raw_response_wrapper(
priority.get,
)
Expand All @@ -738,9 +626,6 @@ def __init__(self, priority: Priority) -> None:
self.delete = to_streamed_response_wrapper(
priority.delete,
)
self.do_something_unknown = to_streamed_response_wrapper(
priority.do_something_unknown,
)
self.get = to_streamed_response_wrapper(
priority.get,
)
Expand All @@ -762,9 +647,6 @@ def __init__(self, priority: AsyncPriority) -> None:
self.delete = async_to_streamed_response_wrapper(
priority.delete,
)
self.do_something_unknown = async_to_streamed_response_wrapper(
priority.do_something_unknown,
)
self.get = async_to_streamed_response_wrapper(
priority.get,
)
Expand Down
4 changes: 0 additions & 4 deletions src/cloudflare/types/cloudforce_one/requests/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,3 @@
from .priority_create_response import PriorityCreateResponse as PriorityCreateResponse
from .priority_delete_response import PriorityDeleteResponse as PriorityDeleteResponse
from .priority_update_response import PriorityUpdateResponse as PriorityUpdateResponse
from .priority_do_something_unknown_params import PriorityDoSomethingUnknownParams as PriorityDoSomethingUnknownParams
from .priority_do_something_unknown_response import (
PriorityDoSomethingUnknownResponse as PriorityDoSomethingUnknownResponse,
)

This file was deleted.

This file was deleted.

101 changes: 0 additions & 101 deletions tests/api_resources/cloudforce_one/requests/test_priority.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
PriorityCreateResponse,
PriorityDeleteResponse,
PriorityUpdateResponse,
PriorityDoSomethingUnknownResponse,
)

base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010")
Expand Down Expand Up @@ -206,56 +205,6 @@ def test_path_params_delete(self, client: Cloudflare) -> None:
account_identifier="023e105f4ecef8ad9ca31a8372d0c353",
)

@pytest.mark.skip()
@parametrize
def test_method_do_something_unknown(self, client: Cloudflare) -> None:
priority = client.cloudforce_one.requests.priority.do_something_unknown(
"023e105f4ecef8ad9ca31a8372d0c353",
page=0,
per_page=10,
)
assert_matches_type(PriorityDoSomethingUnknownResponse, priority, path=["response"])

@pytest.mark.skip()
@parametrize
def test_raw_response_do_something_unknown(self, client: Cloudflare) -> None:
response = client.cloudforce_one.requests.priority.with_raw_response.do_something_unknown(
"023e105f4ecef8ad9ca31a8372d0c353",
page=0,
per_page=10,
)

assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
priority = response.parse()
assert_matches_type(PriorityDoSomethingUnknownResponse, priority, path=["response"])

@pytest.mark.skip()
@parametrize
def test_streaming_response_do_something_unknown(self, client: Cloudflare) -> None:
with client.cloudforce_one.requests.priority.with_streaming_response.do_something_unknown(
"023e105f4ecef8ad9ca31a8372d0c353",
page=0,
per_page=10,
) as response:
assert not response.is_closed
assert response.http_request.headers.get("X-Stainless-Lang") == "python"

priority = response.parse()
assert_matches_type(PriorityDoSomethingUnknownResponse, priority, path=["response"])

assert cast(Any, response.is_closed) is True

@pytest.mark.skip()
@parametrize
def test_path_params_do_something_unknown(self, client: Cloudflare) -> None:
with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_identifier` but received ''"):
client.cloudforce_one.requests.priority.with_raw_response.do_something_unknown(
"",
page=0,
per_page=10,
)

@pytest.mark.skip()
@parametrize
def test_method_get(self, client: Cloudflare) -> None:
Expand Down Expand Up @@ -536,56 +485,6 @@ async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None:
account_identifier="023e105f4ecef8ad9ca31a8372d0c353",
)

@pytest.mark.skip()
@parametrize
async def test_method_do_something_unknown(self, async_client: AsyncCloudflare) -> None:
priority = await async_client.cloudforce_one.requests.priority.do_something_unknown(
"023e105f4ecef8ad9ca31a8372d0c353",
page=0,
per_page=10,
)
assert_matches_type(PriorityDoSomethingUnknownResponse, priority, path=["response"])

@pytest.mark.skip()
@parametrize
async def test_raw_response_do_something_unknown(self, async_client: AsyncCloudflare) -> None:
response = await async_client.cloudforce_one.requests.priority.with_raw_response.do_something_unknown(
"023e105f4ecef8ad9ca31a8372d0c353",
page=0,
per_page=10,
)

assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
priority = await response.parse()
assert_matches_type(PriorityDoSomethingUnknownResponse, priority, path=["response"])

@pytest.mark.skip()
@parametrize
async def test_streaming_response_do_something_unknown(self, async_client: AsyncCloudflare) -> None:
async with async_client.cloudforce_one.requests.priority.with_streaming_response.do_something_unknown(
"023e105f4ecef8ad9ca31a8372d0c353",
page=0,
per_page=10,
) as response:
assert not response.is_closed
assert response.http_request.headers.get("X-Stainless-Lang") == "python"

priority = await response.parse()
assert_matches_type(PriorityDoSomethingUnknownResponse, priority, path=["response"])

assert cast(Any, response.is_closed) is True

@pytest.mark.skip()
@parametrize
async def test_path_params_do_something_unknown(self, async_client: AsyncCloudflare) -> None:
with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_identifier` but received ''"):
await async_client.cloudforce_one.requests.priority.with_raw_response.do_something_unknown(
"",
page=0,
per_page=10,
)

@pytest.mark.skip()
@parametrize
async def test_method_get(self, async_client: AsyncCloudflare) -> None:
Expand Down