From 4058dbb8f270873b49bb12bd5c56186c9a74b380 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 28 Mar 2024 10:02:08 +0000 Subject: [PATCH] feat(api): OpenAPI spec update via Stainless API (#189) --- src/cloudflare/resources/radar/bgp/routes.py | 8 ++++++++ src/cloudflare/types/radar/bgp/route_timeseries_params.py | 3 +++ tests/api_resources/radar/bgp/test_routes.py | 2 ++ 3 files changed, 13 insertions(+) diff --git a/src/cloudflare/resources/radar/bgp/routes.py b/src/cloudflare/resources/radar/bgp/routes.py index e295ba6d9f6..c98a3fb7886 100644 --- a/src/cloudflare/resources/radar/bgp/routes.py +++ b/src/cloudflare/resources/radar/bgp/routes.py @@ -239,6 +239,7 @@ def timeseries( | NotGiven = NOT_GIVEN, date_start: Union[str, datetime] | NotGiven = NOT_GIVEN, format: Literal["JSON", "CSV"] | NotGiven = NOT_GIVEN, + location: str | NotGiven = NOT_GIVEN, # 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, @@ -262,6 +263,8 @@ def timeseries( format: Format results are returned in. + location: Location Alpha2 code. + extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -284,6 +287,7 @@ def timeseries( "date_range": date_range, "date_start": date_start, "format": format, + "location": location, }, route_timeseries_params.RouteTimeseriesParams, ), @@ -493,6 +497,7 @@ async def timeseries( | NotGiven = NOT_GIVEN, date_start: Union[str, datetime] | NotGiven = NOT_GIVEN, format: Literal["JSON", "CSV"] | NotGiven = NOT_GIVEN, + location: str | NotGiven = NOT_GIVEN, # 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, @@ -516,6 +521,8 @@ async def timeseries( format: Format results are returned in. + location: Location Alpha2 code. + extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -538,6 +545,7 @@ async def timeseries( "date_range": date_range, "date_start": date_start, "format": format, + "location": location, }, route_timeseries_params.RouteTimeseriesParams, ), diff --git a/src/cloudflare/types/radar/bgp/route_timeseries_params.py b/src/cloudflare/types/radar/bgp/route_timeseries_params.py index b17fded926d..6bdf01690de 100644 --- a/src/cloudflare/types/radar/bgp/route_timeseries_params.py +++ b/src/cloudflare/types/radar/bgp/route_timeseries_params.py @@ -48,3 +48,6 @@ class RouteTimeseriesParams(TypedDict, total=False): format: Literal["JSON", "CSV"] """Format results are returned in.""" + + location: str + """Location Alpha2 code.""" diff --git a/tests/api_resources/radar/bgp/test_routes.py b/tests/api_resources/radar/bgp/test_routes.py index d64e0ba0886..c0a2b5b6a1f 100644 --- a/tests/api_resources/radar/bgp/test_routes.py +++ b/tests/api_resources/radar/bgp/test_routes.py @@ -155,6 +155,7 @@ def test_method_timeseries_with_all_params(self, client: Cloudflare) -> None: date_range="7d", date_start=parse_datetime("2023-09-01T11:41:33.782Z"), format="JSON", + location="US", ) assert_matches_type(RouteTimeseriesResponse, route, path=["response"]) @@ -316,6 +317,7 @@ async def test_method_timeseries_with_all_params(self, async_client: AsyncCloudf date_range="7d", date_start=parse_datetime("2023-09-01T11:41:33.782Z"), format="JSON", + location="US", ) assert_matches_type(RouteTimeseriesResponse, route, path=["response"])