|
2 | 2 |
|
3 | 3 | from __future__ import annotations |
4 | 4 |
|
| 5 | +import typing_extensions |
5 | 6 | from typing import List, Type, Union, cast |
6 | 7 | from datetime import datetime |
7 | 8 | from typing_extensions import Literal |
@@ -47,6 +48,9 @@ def with_streaming_response(self) -> TopResourceWithStreamingResponse: |
47 | 48 | """ |
48 | 49 | return TopResourceWithStreamingResponse(self) |
49 | 50 |
|
| 51 | + @typing_extensions.deprecated( |
| 52 | + "Use [Radar Bots API](https://developers.cloudflare.com/api/resources/radar/subresources/bots/) instead." |
| 53 | + ) |
50 | 54 | def bots( |
51 | 55 | self, |
52 | 56 | *, |
@@ -131,6 +135,9 @@ def bots( |
131 | 135 | cast_to=cast(Type[TopBotsResponse], ResultWrapper[TopBotsResponse]), |
132 | 136 | ) |
133 | 137 |
|
| 138 | + @typing_extensions.deprecated( |
| 139 | + "Use [Radar Bots API](https://developers.cloudflare.com/api/resources/radar/subresources/bots/) instead." |
| 140 | + ) |
134 | 141 | def categories( |
135 | 142 | self, |
136 | 143 | *, |
@@ -237,6 +244,9 @@ def with_streaming_response(self) -> AsyncTopResourceWithStreamingResponse: |
237 | 244 | """ |
238 | 245 | return AsyncTopResourceWithStreamingResponse(self) |
239 | 246 |
|
| 247 | + @typing_extensions.deprecated( |
| 248 | + "Use [Radar Bots API](https://developers.cloudflare.com/api/resources/radar/subresources/bots/) instead." |
| 249 | + ) |
240 | 250 | async def bots( |
241 | 251 | self, |
242 | 252 | *, |
@@ -321,6 +331,9 @@ async def bots( |
321 | 331 | cast_to=cast(Type[TopBotsResponse], ResultWrapper[TopBotsResponse]), |
322 | 332 | ) |
323 | 333 |
|
| 334 | + @typing_extensions.deprecated( |
| 335 | + "Use [Radar Bots API](https://developers.cloudflare.com/api/resources/radar/subresources/bots/) instead." |
| 336 | + ) |
324 | 337 | async def categories( |
325 | 338 | self, |
326 | 339 | *, |
@@ -411,45 +424,61 @@ class TopResourceWithRawResponse: |
411 | 424 | def __init__(self, top: TopResource) -> None: |
412 | 425 | self._top = top |
413 | 426 |
|
414 | | - self.bots = to_raw_response_wrapper( |
415 | | - top.bots, |
| 427 | + self.bots = ( # pyright: ignore[reportDeprecated] |
| 428 | + to_raw_response_wrapper( |
| 429 | + top.bots # pyright: ignore[reportDeprecated], |
| 430 | + ) |
416 | 431 | ) |
417 | | - self.categories = to_raw_response_wrapper( |
418 | | - top.categories, |
| 432 | + self.categories = ( # pyright: ignore[reportDeprecated] |
| 433 | + to_raw_response_wrapper( |
| 434 | + top.categories # pyright: ignore[reportDeprecated], |
| 435 | + ) |
419 | 436 | ) |
420 | 437 |
|
421 | 438 |
|
422 | 439 | class AsyncTopResourceWithRawResponse: |
423 | 440 | def __init__(self, top: AsyncTopResource) -> None: |
424 | 441 | self._top = top |
425 | 442 |
|
426 | | - self.bots = async_to_raw_response_wrapper( |
427 | | - top.bots, |
| 443 | + self.bots = ( # pyright: ignore[reportDeprecated] |
| 444 | + async_to_raw_response_wrapper( |
| 445 | + top.bots # pyright: ignore[reportDeprecated], |
| 446 | + ) |
428 | 447 | ) |
429 | | - self.categories = async_to_raw_response_wrapper( |
430 | | - top.categories, |
| 448 | + self.categories = ( # pyright: ignore[reportDeprecated] |
| 449 | + async_to_raw_response_wrapper( |
| 450 | + top.categories # pyright: ignore[reportDeprecated], |
| 451 | + ) |
431 | 452 | ) |
432 | 453 |
|
433 | 454 |
|
434 | 455 | class TopResourceWithStreamingResponse: |
435 | 456 | def __init__(self, top: TopResource) -> None: |
436 | 457 | self._top = top |
437 | 458 |
|
438 | | - self.bots = to_streamed_response_wrapper( |
439 | | - top.bots, |
| 459 | + self.bots = ( # pyright: ignore[reportDeprecated] |
| 460 | + to_streamed_response_wrapper( |
| 461 | + top.bots # pyright: ignore[reportDeprecated], |
| 462 | + ) |
440 | 463 | ) |
441 | | - self.categories = to_streamed_response_wrapper( |
442 | | - top.categories, |
| 464 | + self.categories = ( # pyright: ignore[reportDeprecated] |
| 465 | + to_streamed_response_wrapper( |
| 466 | + top.categories # pyright: ignore[reportDeprecated], |
| 467 | + ) |
443 | 468 | ) |
444 | 469 |
|
445 | 470 |
|
446 | 471 | class AsyncTopResourceWithStreamingResponse: |
447 | 472 | def __init__(self, top: AsyncTopResource) -> None: |
448 | 473 | self._top = top |
449 | 474 |
|
450 | | - self.bots = async_to_streamed_response_wrapper( |
451 | | - top.bots, |
| 475 | + self.bots = ( # pyright: ignore[reportDeprecated] |
| 476 | + async_to_streamed_response_wrapper( |
| 477 | + top.bots # pyright: ignore[reportDeprecated], |
| 478 | + ) |
452 | 479 | ) |
453 | | - self.categories = async_to_streamed_response_wrapper( |
454 | | - top.categories, |
| 480 | + self.categories = ( # pyright: ignore[reportDeprecated] |
| 481 | + async_to_streamed_response_wrapper( |
| 482 | + top.categories # pyright: ignore[reportDeprecated], |
| 483 | + ) |
455 | 484 | ) |
0 commit comments