Skip to content

Commit

Permalink
feat(api): update via SDK Studio (#372)
Browse files Browse the repository at this point in the history
  • Loading branch information
stainless-app[bot] authored and stainless-bot committed May 7, 2024
1 parent 62735a6 commit 8c8ac04
Show file tree
Hide file tree
Showing 11 changed files with 221 additions and 137 deletions.
2 changes: 1 addition & 1 deletion .stats.yml
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
configured_endpoints: 1266
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-ea285caeae39e684b320c55cf658a1ce9360e7737d2a13bbf9782459709ec55c.yml
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-1117455d139246587bb583bb4cb4c402c3757e6ab4ad31d325b6657ac6fa6a0b.yml
48 changes: 24 additions & 24 deletions tests/api_resources/hyperdrive/test_configs.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ def test_method_create(self, client: Cloudflare) -> None:
origin={
"database": "postgres",
"host": "database.example.com",
"port": 0,
"port": 5432,
"scheme": "postgres",
"user": "postgres",
},
Expand All @@ -46,7 +46,7 @@ def test_method_create_with_all_params(self, client: Cloudflare) -> None:
origin={
"database": "postgres",
"host": "database.example.com",
"port": 0,
"port": 5432,
"scheme": "postgres",
"user": "postgres",
},
Expand All @@ -67,7 +67,7 @@ def test_raw_response_create(self, client: Cloudflare) -> None:
origin={
"database": "postgres",
"host": "database.example.com",
"port": 0,
"port": 5432,
"scheme": "postgres",
"user": "postgres",
},
Expand All @@ -87,7 +87,7 @@ def test_streaming_response_create(self, client: Cloudflare) -> None:
origin={
"database": "postgres",
"host": "database.example.com",
"port": 0,
"port": 5432,
"scheme": "postgres",
"user": "postgres",
},
Expand All @@ -110,7 +110,7 @@ def test_path_params_create(self, client: Cloudflare) -> None:
origin={
"database": "postgres",
"host": "database.example.com",
"port": 0,
"port": 5432,
"scheme": "postgres",
"user": "postgres",
},
Expand All @@ -126,7 +126,7 @@ def test_method_update(self, client: Cloudflare) -> None:
origin={
"database": "postgres",
"host": "database.example.com",
"port": 0,
"port": 5432,
"scheme": "postgres",
"user": "postgres",
},
Expand All @@ -143,7 +143,7 @@ def test_method_update_with_all_params(self, client: Cloudflare) -> None:
origin={
"database": "postgres",
"host": "database.example.com",
"port": 0,
"port": 5432,
"scheme": "postgres",
"user": "postgres",
},
Expand All @@ -165,7 +165,7 @@ def test_raw_response_update(self, client: Cloudflare) -> None:
origin={
"database": "postgres",
"host": "database.example.com",
"port": 0,
"port": 5432,
"scheme": "postgres",
"user": "postgres",
},
Expand All @@ -186,7 +186,7 @@ def test_streaming_response_update(self, client: Cloudflare) -> None:
origin={
"database": "postgres",
"host": "database.example.com",
"port": 0,
"port": 5432,
"scheme": "postgres",
"user": "postgres",
},
Expand All @@ -210,7 +210,7 @@ def test_path_params_update(self, client: Cloudflare) -> None:
origin={
"database": "postgres",
"host": "database.example.com",
"port": 0,
"port": 5432,
"scheme": "postgres",
"user": "postgres",
},
Expand All @@ -224,7 +224,7 @@ def test_path_params_update(self, client: Cloudflare) -> None:
origin={
"database": "postgres",
"host": "database.example.com",
"port": 0,
"port": 5432,
"scheme": "postgres",
"user": "postgres",
},
Expand Down Expand Up @@ -348,7 +348,7 @@ def test_method_edit_with_all_params(self, client: Cloudflare) -> None:
origin={
"database": "postgres",
"host": "database.example.com",
"port": 0,
"port": 5432,
"scheme": "postgres",
"user": "postgres",
},
Expand Down Expand Up @@ -463,7 +463,7 @@ async def test_method_create(self, async_client: AsyncCloudflare) -> None:
origin={
"database": "postgres",
"host": "database.example.com",
"port": 0,
"port": 5432,
"scheme": "postgres",
"user": "postgres",
},
Expand All @@ -479,7 +479,7 @@ async def test_method_create_with_all_params(self, async_client: AsyncCloudflare
origin={
"database": "postgres",
"host": "database.example.com",
"port": 0,
"port": 5432,
"scheme": "postgres",
"user": "postgres",
},
Expand All @@ -500,7 +500,7 @@ async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None:
origin={
"database": "postgres",
"host": "database.example.com",
"port": 0,
"port": 5432,
"scheme": "postgres",
"user": "postgres",
},
Expand All @@ -520,7 +520,7 @@ async def test_streaming_response_create(self, async_client: AsyncCloudflare) ->
origin={
"database": "postgres",
"host": "database.example.com",
"port": 0,
"port": 5432,
"scheme": "postgres",
"user": "postgres",
},
Expand All @@ -543,7 +543,7 @@ async def test_path_params_create(self, async_client: AsyncCloudflare) -> None:
origin={
"database": "postgres",
"host": "database.example.com",
"port": 0,
"port": 5432,
"scheme": "postgres",
"user": "postgres",
},
Expand All @@ -559,7 +559,7 @@ async def test_method_update(self, async_client: AsyncCloudflare) -> None:
origin={
"database": "postgres",
"host": "database.example.com",
"port": 0,
"port": 5432,
"scheme": "postgres",
"user": "postgres",
},
Expand All @@ -576,7 +576,7 @@ async def test_method_update_with_all_params(self, async_client: AsyncCloudflare
origin={
"database": "postgres",
"host": "database.example.com",
"port": 0,
"port": 5432,
"scheme": "postgres",
"user": "postgres",
},
Expand All @@ -598,7 +598,7 @@ async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None:
origin={
"database": "postgres",
"host": "database.example.com",
"port": 0,
"port": 5432,
"scheme": "postgres",
"user": "postgres",
},
Expand All @@ -619,7 +619,7 @@ async def test_streaming_response_update(self, async_client: AsyncCloudflare) ->
origin={
"database": "postgres",
"host": "database.example.com",
"port": 0,
"port": 5432,
"scheme": "postgres",
"user": "postgres",
},
Expand All @@ -643,7 +643,7 @@ async def test_path_params_update(self, async_client: AsyncCloudflare) -> None:
origin={
"database": "postgres",
"host": "database.example.com",
"port": 0,
"port": 5432,
"scheme": "postgres",
"user": "postgres",
},
Expand All @@ -657,7 +657,7 @@ async def test_path_params_update(self, async_client: AsyncCloudflare) -> None:
origin={
"database": "postgres",
"host": "database.example.com",
"port": 0,
"port": 5432,
"scheme": "postgres",
"user": "postgres",
},
Expand Down Expand Up @@ -781,7 +781,7 @@ async def test_method_edit_with_all_params(self, async_client: AsyncCloudflare)
origin={
"database": "postgres",
"host": "database.example.com",
"port": 0,
"port": 5432,
"scheme": "postgres",
"user": "postgres",
},
Expand Down
16 changes: 8 additions & 8 deletions tests/api_resources/magic_transit/test_sites.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,8 @@ def test_method_create_with_all_params(self, client: Cloudflare) -> None:
description="string",
ha_mode=True,
location={
"lat": "string",
"lon": "string",
"lat": "37.6192",
"lon": "122.3816",
},
secondary_connector_id="8d67040d3835dbcf46ce29da440dc482",
)
Expand Down Expand Up @@ -99,8 +99,8 @@ def test_method_update_with_all_params(self, client: Cloudflare) -> None:
connector_id="ac60d3d0435248289d446cedd870bcf4",
description="string",
location={
"lat": "string",
"lon": "string",
"lat": "37.6192",
"lon": "122.3816",
},
name="site_1",
secondary_connector_id="8d67040d3835dbcf46ce29da440dc482",
Expand Down Expand Up @@ -328,8 +328,8 @@ async def test_method_create_with_all_params(self, async_client: AsyncCloudflare
description="string",
ha_mode=True,
location={
"lat": "string",
"lon": "string",
"lat": "37.6192",
"lon": "122.3816",
},
secondary_connector_id="8d67040d3835dbcf46ce29da440dc482",
)
Expand Down Expand Up @@ -390,8 +390,8 @@ async def test_method_update_with_all_params(self, async_client: AsyncCloudflare
connector_id="ac60d3d0435248289d446cedd870bcf4",
description="string",
location={
"lat": "string",
"lon": "string",
"lat": "37.6192",
"lon": "122.3816",
},
name="site_1",
secondary_connector_id="8d67040d3835dbcf46ce29da440dc482",
Expand Down
4 changes: 2 additions & 2 deletions tests/api_resources/page_shield/test_connections.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ def test_method_list_with_all_params(self, client: Cloudflare) -> None:
export="csv",
hosts="blog.cloudflare.com,www.example*,*cloudflare.com",
order_by="first_seen_at",
page="string",
page="2",
page_url="example.com/page,*/checkout,example.com/*,*checkout*",
per_page=100,
prioritize_malicious=True,
Expand Down Expand Up @@ -155,7 +155,7 @@ async def test_method_list_with_all_params(self, async_client: AsyncCloudflare)
export="csv",
hosts="blog.cloudflare.com,www.example*,*cloudflare.com",
order_by="first_seen_at",
page="string",
page="2",
page_url="example.com/page,*/checkout,example.com/*,*checkout*",
per_page=100,
prioritize_malicious=True,
Expand Down
4 changes: 2 additions & 2 deletions tests/api_resources/page_shield/test_scripts.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ def test_method_list_with_all_params(self, client: Cloudflare) -> None:
export="csv",
hosts="blog.cloudflare.com,www.example*,*cloudflare.com",
order_by="first_seen_at",
page="string",
page="2",
page_url="example.com/page,*/checkout,example.com/*,*checkout*",
per_page=100,
prioritize_malicious=True,
Expand Down Expand Up @@ -157,7 +157,7 @@ async def test_method_list_with_all_params(self, async_client: AsyncCloudflare)
export="csv",
hosts="blog.cloudflare.com,www.example*,*cloudflare.com",
order_by="first_seen_at",
page="string",
page="2",
page_url="example.com/page,*/checkout,example.com/*,*checkout*",
per_page=100,
prioritize_malicious=True,
Expand Down
4 changes: 2 additions & 2 deletions tests/api_resources/radar/annotations/test_outages.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ def test_method_get(self, client: Cloudflare) -> None:
@parametrize
def test_method_get_with_all_params(self, client: Cloudflare) -> None:
outage = client.radar.annotations.outages.get(
asn=0,
asn=174,
date_end=parse_datetime("2023-09-01T11:41:33.782Z"),
date_range="7d",
date_start=parse_datetime("2023-09-01T11:41:33.782Z"),
Expand Down Expand Up @@ -118,7 +118,7 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None:
@parametrize
async def test_method_get_with_all_params(self, async_client: AsyncCloudflare) -> None:
outage = await async_client.radar.annotations.outages.get(
asn=0,
asn=174,
date_end=parse_datetime("2023-09-01T11:41:33.782Z"),
date_range="7d",
date_start=parse_datetime("2023-09-01T11:41:33.782Z"),
Expand Down
8 changes: 4 additions & 4 deletions tests/api_resources/radar/bgp/test_routes.py
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ def test_method_stats(self, client: Cloudflare) -> None:
@parametrize
def test_method_stats_with_all_params(self, client: Cloudflare) -> None:
route = client.radar.bgp.routes.stats(
asn=0,
asn=174,
format="JSON",
location="US",
)
Expand Down Expand Up @@ -150,7 +150,7 @@ def test_method_timeseries(self, client: Cloudflare) -> None:
@parametrize
def test_method_timeseries_with_all_params(self, client: Cloudflare) -> None:
route = client.radar.bgp.routes.timeseries(
asn=0,
asn=174,
date_end=parse_datetime("2023-09-01T11:41:33.782Z"),
date_range="7d",
date_start=parse_datetime("2023-09-01T11:41:33.782Z"),
Expand Down Expand Up @@ -275,7 +275,7 @@ async def test_method_stats(self, async_client: AsyncCloudflare) -> None:
@parametrize
async def test_method_stats_with_all_params(self, async_client: AsyncCloudflare) -> None:
route = await async_client.radar.bgp.routes.stats(
asn=0,
asn=174,
format="JSON",
location="US",
)
Expand Down Expand Up @@ -313,7 +313,7 @@ async def test_method_timeseries(self, async_client: AsyncCloudflare) -> None:
@parametrize
async def test_method_timeseries_with_all_params(self, async_client: AsyncCloudflare) -> None:
route = await async_client.radar.bgp.routes.timeseries(
asn=0,
asn=174,
date_end=parse_datetime("2023-09-01T11:41:33.782Z"),
date_range="7d",
date_start=parse_datetime("2023-09-01T11:41:33.782Z"),
Expand Down
4 changes: 2 additions & 2 deletions tests/api_resources/radar/test_traffic_anomalies.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ def test_method_get(self, client: Cloudflare) -> None:
@parametrize
def test_method_get_with_all_params(self, client: Cloudflare) -> None:
traffic_anomaly = client.radar.traffic_anomalies.get(
asn=0,
asn=174,
date_end=parse_datetime("2023-09-01T11:41:33.782Z"),
date_range="7d",
date_start=parse_datetime("2023-09-01T11:41:33.782Z"),
Expand Down Expand Up @@ -76,7 +76,7 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None:
@parametrize
async def test_method_get_with_all_params(self, async_client: AsyncCloudflare) -> None:
traffic_anomaly = await async_client.radar.traffic_anomalies.get(
asn=0,
asn=174,
date_end=parse_datetime("2023-09-01T11:41:33.782Z"),
date_range="7d",
date_start=parse_datetime("2023-09-01T11:41:33.782Z"),
Expand Down
Loading

0 comments on commit 8c8ac04

Please sign in to comment.