Skip to content

Commit

Permalink
feat(api): OpenAPI spec update via Stainless API (#272)
Browse files Browse the repository at this point in the history
  • Loading branch information
stainless-app[bot] authored and stainless-bot committed Apr 10, 2024
1 parent 6887c56 commit cecf793
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/cloudflare/resources/radar/bgp/routes.py
Original file line number Diff line number Diff line change
Expand Up @@ -239,6 +239,7 @@ def timeseries(
| NotGiven = NOT_GIVEN,
date_start: Union[str, datetime] | NotGiven = NOT_GIVEN,
format: Literal["JSON", "CSV"] | NotGiven = NOT_GIVEN,
include_delay: bool | 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.
Expand All @@ -263,6 +264,8 @@ def timeseries(
format: Format results are returned in.
include_delay: Include data delay meta information
location: Location Alpha2 code.
extra_headers: Send extra headers
Expand All @@ -287,6 +290,7 @@ def timeseries(
"date_range": date_range,
"date_start": date_start,
"format": format,
"include_delay": include_delay,
"location": location,
},
route_timeseries_params.RouteTimeseriesParams,
Expand Down Expand Up @@ -497,6 +501,7 @@ async def timeseries(
| NotGiven = NOT_GIVEN,
date_start: Union[str, datetime] | NotGiven = NOT_GIVEN,
format: Literal["JSON", "CSV"] | NotGiven = NOT_GIVEN,
include_delay: bool | 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.
Expand All @@ -521,6 +526,8 @@ async def timeseries(
format: Format results are returned in.
include_delay: Include data delay meta information
location: Location Alpha2 code.
extra_headers: Send extra headers
Expand All @@ -545,6 +552,7 @@ async def timeseries(
"date_range": date_range,
"date_start": date_start,
"format": format,
"include_delay": include_delay,
"location": location,
},
route_timeseries_params.RouteTimeseriesParams,
Expand Down
3 changes: 3 additions & 0 deletions src/cloudflare/types/radar/bgp/route_timeseries_params.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,5 +49,8 @@ class RouteTimeseriesParams(TypedDict, total=False):
format: Literal["JSON", "CSV"]
"""Format results are returned in."""

include_delay: Annotated[bool, PropertyInfo(alias="includeDelay")]
"""Include data delay meta information"""

location: str
"""Location Alpha2 code."""
2 changes: 2 additions & 0 deletions tests/api_resources/radar/bgp/test_routes.py
Original file line number Diff line number Diff line change
Expand Up @@ -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",
include_delay=True,
location="US",
)
assert_matches_type(RouteTimeseriesResponse, route, path=["response"])
Expand Down Expand Up @@ -317,6 +318,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",
include_delay=True,
location="US",
)
assert_matches_type(RouteTimeseriesResponse, route, path=["response"])
Expand Down

0 comments on commit cecf793

Please sign in to comment.