Skip to content

Commit 4058dbb

Browse files
stainless-app[bot]stainless-bot
authored andcommitted
feat(api): OpenAPI spec update via Stainless API (#189)
1 parent 71da3ed commit 4058dbb

File tree

3 files changed

+13
-0
lines changed

3 files changed

+13
-0
lines changed

src/cloudflare/resources/radar/bgp/routes.py

+8
Original file line numberDiff line numberDiff line change
@@ -239,6 +239,7 @@ def timeseries(
239239
| NotGiven = NOT_GIVEN,
240240
date_start: Union[str, datetime] | NotGiven = NOT_GIVEN,
241241
format: Literal["JSON", "CSV"] | NotGiven = NOT_GIVEN,
242+
location: str | NotGiven = NOT_GIVEN,
242243
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
243244
# The extra values given here take precedence over values defined on the client or passed to this method.
244245
extra_headers: Headers | None = None,
@@ -262,6 +263,8 @@ def timeseries(
262263
263264
format: Format results are returned in.
264265
266+
location: Location Alpha2 code.
267+
265268
extra_headers: Send extra headers
266269
267270
extra_query: Add additional query parameters to the request
@@ -284,6 +287,7 @@ def timeseries(
284287
"date_range": date_range,
285288
"date_start": date_start,
286289
"format": format,
290+
"location": location,
287291
},
288292
route_timeseries_params.RouteTimeseriesParams,
289293
),
@@ -493,6 +497,7 @@ async def timeseries(
493497
| NotGiven = NOT_GIVEN,
494498
date_start: Union[str, datetime] | NotGiven = NOT_GIVEN,
495499
format: Literal["JSON", "CSV"] | NotGiven = NOT_GIVEN,
500+
location: str | NotGiven = NOT_GIVEN,
496501
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
497502
# The extra values given here take precedence over values defined on the client or passed to this method.
498503
extra_headers: Headers | None = None,
@@ -516,6 +521,8 @@ async def timeseries(
516521
517522
format: Format results are returned in.
518523
524+
location: Location Alpha2 code.
525+
519526
extra_headers: Send extra headers
520527
521528
extra_query: Add additional query parameters to the request
@@ -538,6 +545,7 @@ async def timeseries(
538545
"date_range": date_range,
539546
"date_start": date_start,
540547
"format": format,
548+
"location": location,
541549
},
542550
route_timeseries_params.RouteTimeseriesParams,
543551
),

src/cloudflare/types/radar/bgp/route_timeseries_params.py

+3
Original file line numberDiff line numberDiff line change
@@ -48,3 +48,6 @@ class RouteTimeseriesParams(TypedDict, total=False):
4848

4949
format: Literal["JSON", "CSV"]
5050
"""Format results are returned in."""
51+
52+
location: str
53+
"""Location Alpha2 code."""

tests/api_resources/radar/bgp/test_routes.py

+2
Original file line numberDiff line numberDiff line change
@@ -155,6 +155,7 @@ def test_method_timeseries_with_all_params(self, client: Cloudflare) -> None:
155155
date_range="7d",
156156
date_start=parse_datetime("2023-09-01T11:41:33.782Z"),
157157
format="JSON",
158+
location="US",
158159
)
159160
assert_matches_type(RouteTimeseriesResponse, route, path=["response"])
160161

@@ -316,6 +317,7 @@ async def test_method_timeseries_with_all_params(self, async_client: AsyncCloudf
316317
date_range="7d",
317318
date_start=parse_datetime("2023-09-01T11:41:33.782Z"),
318319
format="JSON",
320+
location="US",
319321
)
320322
assert_matches_type(RouteTimeseriesResponse, route, path=["response"])
321323

0 commit comments

Comments
 (0)