Skip to content

Commit 0f390d2

Browse files
chore(api): update composite API spec
1 parent 6aa3d76 commit 0f390d2

6 files changed

Lines changed: 49 additions & 2 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: 2028
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-f8d2c9c7d48eda10698b995ed7b3437329e0a7a1bdf56a51dce5f2aefd939027.yml
3-
openapi_spec_hash: c8fd4e707d73fc672ddcc67ef1d699c6
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-a909b87c05e478194e997f18d24300cff7cf8cf978d8fbc45af8866c5575bf63.yml
3+
openapi_spec_hash: 4989f8168da4edbbb107a55e74690fe0
44
config_hash: 7a70007089f586cc7b1ebd1808030dd1

src/cloudflare/resources/radar/entities/locations.py

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,10 +49,13 @@ def with_streaming_response(self) -> LocationsResourceWithStreamingResponse:
4949
def list(
5050
self,
5151
*,
52+
continent: Literal["AF", "AS", "EU", "NA", "OC", "SA"] | Omit = omit,
5253
format: Literal["JSON", "CSV"] | Omit = omit,
5354
limit: int | Omit = omit,
5455
location: str | Omit = omit,
5556
offset: int | Omit = omit,
57+
region: str | Omit = omit,
58+
subregion: str | Omit = omit,
5659
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
5760
# The extra values given here take precedence over values defined on the client or passed to this method.
5861
extra_headers: Headers | None = None,
@@ -64,6 +67,8 @@ def list(
6467
Retrieves a list of locations.
6568
6669
Args:
70+
continent: Filters results by continent code.
71+
6772
format: Format in which results will be returned.
6873
6974
limit: Limits the number of objects returned in the response.
@@ -73,6 +78,10 @@ def list(
7378
7479
offset: Skips the specified number of objects before fetching the results.
7580
81+
region: Filters results by region.
82+
83+
subregion: Filters results by subregion.
84+
7685
extra_headers: Send extra headers
7786
7887
extra_query: Add additional query parameters to the request
@@ -90,10 +99,13 @@ def list(
9099
timeout=timeout,
91100
query=maybe_transform(
92101
{
102+
"continent": continent,
93103
"format": format,
94104
"limit": limit,
95105
"location": location,
96106
"offset": offset,
107+
"region": region,
108+
"subregion": subregion,
97109
},
98110
location_list_params.LocationListParams,
99111
),
@@ -172,10 +184,13 @@ def with_streaming_response(self) -> AsyncLocationsResourceWithStreamingResponse
172184
async def list(
173185
self,
174186
*,
187+
continent: Literal["AF", "AS", "EU", "NA", "OC", "SA"] | Omit = omit,
175188
format: Literal["JSON", "CSV"] | Omit = omit,
176189
limit: int | Omit = omit,
177190
location: str | Omit = omit,
178191
offset: int | Omit = omit,
192+
region: str | Omit = omit,
193+
subregion: str | Omit = omit,
179194
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
180195
# The extra values given here take precedence over values defined on the client or passed to this method.
181196
extra_headers: Headers | None = None,
@@ -187,6 +202,8 @@ async def list(
187202
Retrieves a list of locations.
188203
189204
Args:
205+
continent: Filters results by continent code.
206+
190207
format: Format in which results will be returned.
191208
192209
limit: Limits the number of objects returned in the response.
@@ -196,6 +213,10 @@ async def list(
196213
197214
offset: Skips the specified number of objects before fetching the results.
198215
216+
region: Filters results by region.
217+
218+
subregion: Filters results by subregion.
219+
199220
extra_headers: Send extra headers
200221
201222
extra_query: Add additional query parameters to the request
@@ -213,10 +234,13 @@ async def list(
213234
timeout=timeout,
214235
query=await async_maybe_transform(
215236
{
237+
"continent": continent,
216238
"format": format,
217239
"limit": limit,
218240
"location": location,
219241
"offset": offset,
242+
"region": region,
243+
"subregion": subregion,
220244
},
221245
location_list_params.LocationListParams,
222246
),

src/cloudflare/types/radar/entities/location_get_response.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@ class Location(BaseModel):
1212

1313
confidence_level: int = FieldInfo(alias="confidenceLevel")
1414

15+
continent: str
16+
1517
latitude: str
1618
"""A numeric string."""
1719

src/cloudflare/types/radar/entities/location_list_params.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,9 @@
88

99

1010
class LocationListParams(TypedDict, total=False):
11+
continent: Literal["AF", "AS", "EU", "NA", "OC", "SA"]
12+
"""Filters results by continent code."""
13+
1114
format: Literal["JSON", "CSV"]
1215
"""Format in which results will be returned."""
1316

@@ -22,3 +25,9 @@ class LocationListParams(TypedDict, total=False):
2225

2326
offset: int
2427
"""Skips the specified number of objects before fetching the results."""
28+
29+
region: str
30+
"""Filters results by region."""
31+
32+
subregion: str
33+
"""Filters results by subregion."""

src/cloudflare/types/radar/entities/location_list_response.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@
1010
class Location(BaseModel):
1111
alpha2: str
1212

13+
continent: str
14+
1315
latitude: str
1416
"""A numeric string."""
1517

@@ -18,6 +20,10 @@ class Location(BaseModel):
1820

1921
name: str
2022

23+
region: str
24+
25+
subregion: str
26+
2127

2228
class LocationListResponse(BaseModel):
2329
locations: List[Location]

tests/api_resources/radar/entities/test_locations.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,10 +28,13 @@ def test_method_list(self, client: Cloudflare) -> None:
2828
@parametrize
2929
def test_method_list_with_all_params(self, client: Cloudflare) -> None:
3030
location = client.radar.entities.locations.list(
31+
continent="EU",
3132
format="JSON",
3233
limit=1,
3334
location="US,CA",
3435
offset=0,
36+
region="Middle East",
37+
subregion="Southern Europe",
3538
)
3639
assert_matches_type(LocationListResponse, location, path=["response"])
3740

@@ -115,10 +118,13 @@ async def test_method_list(self, async_client: AsyncCloudflare) -> None:
115118
@parametrize
116119
async def test_method_list_with_all_params(self, async_client: AsyncCloudflare) -> None:
117120
location = await async_client.radar.entities.locations.list(
121+
continent="EU",
118122
format="JSON",
119123
limit=1,
120124
location="US,CA",
121125
offset=0,
126+
region="Middle East",
127+
subregion="Southern Europe",
122128
)
123129
assert_matches_type(LocationListResponse, location, path=["response"])
124130

0 commit comments

Comments
 (0)