Skip to content

Commit bda7226

Browse files
feat: feat(radar): add BGP RPKI ROAs timeseries and BGP IPs top ASes endpoints
* feat(radar): add BGP RPKI ROAs timeseries and BGP IPs top ASes endpoints - Add /radar/bgp/rpki/roas/timeseries - Add /radar/bgp/ips/top/ases RADAR-7051
1 parent 1fc2411 commit bda7226

18 files changed

Lines changed: 995 additions & 20 deletions

File tree

.stats.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
configured_endpoints: 2209
1+
configured_endpoints: 2211
22
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-a6c352830d1270d0abb5bb983058ea21815e1bb7d2e163965335dcb0e706f057.yml
33
openapi_spec_hash: 43b3282cc17b94e7729c724d6a3c67ae
4-
config_hash: 738e0c7378ea7821d530b044c332db9e
4+
config_hash: 82bd9683d33d942855962bb7dc595067

src/cloudflare/resources/radar/api.md

Lines changed: 25 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -305,7 +305,19 @@ from cloudflare.types.radar.bgp import IPTimeseriesResponse
305305

306306
Methods:
307307

308-
- <code title="get /radar/bgp/ips/timeseries">client.radar.bgp.ips.<a href="./src/cloudflare/resources/radar/bgp/ips.py">timeseries</a>(\*\*<a href="src/cloudflare/types/radar/bgp/ip_timeseries_params.py">params</a>) -> <a href="./src/cloudflare/types/radar/bgp/ip_timeseries_response.py">IPTimeseriesResponse</a></code>
308+
- <code title="get /radar/bgp/ips/timeseries">client.radar.bgp.ips.<a href="./src/cloudflare/resources/radar/bgp/ips/ips.py">timeseries</a>(\*\*<a href="src/cloudflare/types/radar/bgp/ip_timeseries_params.py">params</a>) -> <a href="./src/cloudflare/types/radar/bgp/ip_timeseries_response.py">IPTimeseriesResponse</a></code>
309+
310+
#### Top
311+
312+
Types:
313+
314+
```python
315+
from cloudflare.types.radar.bgp.ips import TopAsesResponse
316+
```
317+
318+
Methods:
319+
320+
- <code title="get /radar/bgp/ips/top/ases">client.radar.bgp.ips.top.<a href="./src/cloudflare/resources/radar/bgp/ips/top.py">ases</a>(\*\*<a href="src/cloudflare/types/radar/bgp/ips/top_ases_params.py">params</a>) -> <a href="./src/cloudflare/types/radar/bgp/ips/top_ases_response.py">TopAsesResponse</a></code>
309321

310322
### RPKI
311323

@@ -327,6 +339,18 @@ Methods:
327339
- <code title="get /radar/bgp/rpki/aspa/snapshot">client.radar.bgp.rpki.aspa.<a href="./src/cloudflare/resources/radar/bgp/rpki/aspa.py">snapshot</a>(\*\*<a href="src/cloudflare/types/radar/bgp/rpki/aspa_snapshot_params.py">params</a>) -> <a href="./src/cloudflare/types/radar/bgp/rpki/aspa_snapshot_response.py">ASPASnapshotResponse</a></code>
328340
- <code title="get /radar/bgp/rpki/aspa/timeseries">client.radar.bgp.rpki.aspa.<a href="./src/cloudflare/resources/radar/bgp/rpki/aspa.py">timeseries</a>(\*\*<a href="src/cloudflare/types/radar/bgp/rpki/aspa_timeseries_params.py">params</a>) -> <a href="./src/cloudflare/types/radar/bgp/rpki/aspa_timeseries_response.py">ASPATimeseriesResponse</a></code>
329341

342+
#### Roas
343+
344+
Types:
345+
346+
```python
347+
from cloudflare.types.radar.bgp.rpki import RoaTimeseriesResponse
348+
```
349+
350+
Methods:
351+
352+
- <code title="get /radar/bgp/rpki/roas/timeseries">client.radar.bgp.rpki.roas.<a href="./src/cloudflare/resources/radar/bgp/rpki/roas.py">timeseries</a>(\*\*<a href="src/cloudflare/types/radar/bgp/rpki/roa_timeseries_params.py">params</a>) -> <a href="./src/cloudflare/types/radar/bgp/rpki/roa_timeseries_response.py">RoaTimeseriesResponse</a></code>
353+
330354
## Bots
331355

332356
Types:

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

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

99
import httpx
1010

11-
from .ips import (
12-
IPsResource,
13-
AsyncIPsResource,
14-
IPsResourceWithRawResponse,
15-
AsyncIPsResourceWithRawResponse,
16-
IPsResourceWithStreamingResponse,
17-
AsyncIPsResourceWithStreamingResponse,
18-
)
1911
from .routes import (
2012
RoutesResource,
2113
AsyncRoutesResource,
@@ -24,6 +16,14 @@
2416
RoutesResourceWithStreamingResponse,
2517
AsyncRoutesResourceWithStreamingResponse,
2618
)
19+
from .ips.ips import (
20+
IPsResource,
21+
AsyncIPsResource,
22+
IPsResourceWithRawResponse,
23+
AsyncIPsResourceWithRawResponse,
24+
IPsResourceWithStreamingResponse,
25+
AsyncIPsResourceWithStreamingResponse,
26+
)
2727
from .top.top import (
2828
TopResource,
2929
AsyncTopResource,
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2+
3+
from .ips import (
4+
IPsResource,
5+
AsyncIPsResource,
6+
IPsResourceWithRawResponse,
7+
AsyncIPsResourceWithRawResponse,
8+
IPsResourceWithStreamingResponse,
9+
AsyncIPsResourceWithStreamingResponse,
10+
)
11+
from .top import (
12+
TopResource,
13+
AsyncTopResource,
14+
TopResourceWithRawResponse,
15+
AsyncTopResourceWithRawResponse,
16+
TopResourceWithStreamingResponse,
17+
AsyncTopResourceWithStreamingResponse,
18+
)
19+
20+
__all__ = [
21+
"TopResource",
22+
"AsyncTopResource",
23+
"TopResourceWithRawResponse",
24+
"AsyncTopResourceWithRawResponse",
25+
"TopResourceWithStreamingResponse",
26+
"AsyncTopResourceWithStreamingResponse",
27+
"IPsResource",
28+
"AsyncIPsResource",
29+
"IPsResourceWithRawResponse",
30+
"AsyncIPsResourceWithRawResponse",
31+
"IPsResourceWithStreamingResponse",
32+
"AsyncIPsResourceWithStreamingResponse",
33+
]

src/cloudflare/resources/radar/bgp/ips.py renamed to src/cloudflare/resources/radar/bgp/ips/ips.py

Lines changed: 41 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -8,25 +8,37 @@
88

99
import httpx
1010

11-
from ...._types import Body, Omit, Query, Headers, NotGiven, SequenceNotStr, omit, not_given
12-
from ...._utils import maybe_transform, async_maybe_transform
13-
from ...._compat import cached_property
14-
from ...._resource import SyncAPIResource, AsyncAPIResource
15-
from ...._response import (
11+
from .top import (
12+
TopResource,
13+
AsyncTopResource,
14+
TopResourceWithRawResponse,
15+
AsyncTopResourceWithRawResponse,
16+
TopResourceWithStreamingResponse,
17+
AsyncTopResourceWithStreamingResponse,
18+
)
19+
from ....._types import Body, Omit, Query, Headers, NotGiven, SequenceNotStr, omit, not_given
20+
from ....._utils import maybe_transform, async_maybe_transform
21+
from ....._compat import cached_property
22+
from ....._resource import SyncAPIResource, AsyncAPIResource
23+
from ....._response import (
1624
to_raw_response_wrapper,
1725
to_streamed_response_wrapper,
1826
async_to_raw_response_wrapper,
1927
async_to_streamed_response_wrapper,
2028
)
21-
from ...._wrappers import ResultWrapper
22-
from ...._base_client import make_request_options
23-
from ....types.radar.bgp import ip_timeseries_params
24-
from ....types.radar.bgp.ip_timeseries_response import IPTimeseriesResponse
29+
from ....._wrappers import ResultWrapper
30+
from ....._base_client import make_request_options
31+
from .....types.radar.bgp import ip_timeseries_params
32+
from .....types.radar.bgp.ip_timeseries_response import IPTimeseriesResponse
2533

2634
__all__ = ["IPsResource", "AsyncIPsResource"]
2735

2836

2937
class IPsResource(SyncAPIResource):
38+
@cached_property
39+
def top(self) -> TopResource:
40+
return TopResource(self._client)
41+
3042
@cached_property
3143
def with_raw_response(self) -> IPsResourceWithRawResponse:
3244
"""
@@ -130,6 +142,10 @@ def timeseries(
130142

131143

132144
class AsyncIPsResource(AsyncAPIResource):
145+
@cached_property
146+
def top(self) -> AsyncTopResource:
147+
return AsyncTopResource(self._client)
148+
133149
@cached_property
134150
def with_raw_response(self) -> AsyncIPsResourceWithRawResponse:
135151
"""
@@ -240,6 +256,10 @@ def __init__(self, ips: IPsResource) -> None:
240256
ips.timeseries,
241257
)
242258

259+
@cached_property
260+
def top(self) -> TopResourceWithRawResponse:
261+
return TopResourceWithRawResponse(self._ips.top)
262+
243263

244264
class AsyncIPsResourceWithRawResponse:
245265
def __init__(self, ips: AsyncIPsResource) -> None:
@@ -249,6 +269,10 @@ def __init__(self, ips: AsyncIPsResource) -> None:
249269
ips.timeseries,
250270
)
251271

272+
@cached_property
273+
def top(self) -> AsyncTopResourceWithRawResponse:
274+
return AsyncTopResourceWithRawResponse(self._ips.top)
275+
252276

253277
class IPsResourceWithStreamingResponse:
254278
def __init__(self, ips: IPsResource) -> None:
@@ -258,6 +282,10 @@ def __init__(self, ips: IPsResource) -> None:
258282
ips.timeseries,
259283
)
260284

285+
@cached_property
286+
def top(self) -> TopResourceWithStreamingResponse:
287+
return TopResourceWithStreamingResponse(self._ips.top)
288+
261289

262290
class AsyncIPsResourceWithStreamingResponse:
263291
def __init__(self, ips: AsyncIPsResource) -> None:
@@ -266,3 +294,7 @@ def __init__(self, ips: AsyncIPsResource) -> None:
266294
self.timeseries = async_to_streamed_response_wrapper(
267295
ips.timeseries,
268296
)
297+
298+
@cached_property
299+
def top(self) -> AsyncTopResourceWithStreamingResponse:
300+
return AsyncTopResourceWithStreamingResponse(self._ips.top)

0 commit comments

Comments
 (0)