|
35 | 35 | ) |
36 | 36 |
|
37 | 37 | if TYPE_CHECKING: |
38 | | - from .resources import ai, web, news, batch, brand, parse, people, utility, industry, monitors, webhooks |
| 38 | + from .resources import ai, web, logs, news, batch, brand, parse, people, utility, industry, monitors, webhooks |
39 | 39 | from .resources.ai import AIResource, AsyncAIResource |
40 | 40 | from .resources.web import WebResource, AsyncWebResource |
| 41 | + from .resources.logs import LogsResource, AsyncLogsResource |
41 | 42 | from .resources.news import NewsResource, AsyncNewsResource |
42 | 43 | from .resources.batch import BatchResource, AsyncBatchResource |
43 | 44 | from .resources.brand import BrandResource, AsyncBrandResource |
@@ -195,6 +196,16 @@ def news(self) -> NewsResource: |
195 | 196 |
|
196 | 197 | return NewsResource(self) |
197 | 198 |
|
| 199 | + @cached_property |
| 200 | + def logs(self) -> LogsResource: |
| 201 | + """Read your organization's API request logs to debug failed calls. |
| 202 | +
|
| 203 | + These endpoints cost no credits and use a separate rate limit. |
| 204 | + """ |
| 205 | + from .resources.logs import LogsResource |
| 206 | + |
| 207 | + return LogsResource(self) |
| 208 | + |
198 | 209 | @cached_property |
199 | 210 | def with_raw_response(self) -> ContextDevWithRawResponse: |
200 | 211 | return ContextDevWithRawResponse(self) |
@@ -443,6 +454,16 @@ def news(self) -> AsyncNewsResource: |
443 | 454 |
|
444 | 455 | return AsyncNewsResource(self) |
445 | 456 |
|
| 457 | + @cached_property |
| 458 | + def logs(self) -> AsyncLogsResource: |
| 459 | + """Read your organization's API request logs to debug failed calls. |
| 460 | +
|
| 461 | + These endpoints cost no credits and use a separate rate limit. |
| 462 | + """ |
| 463 | + from .resources.logs import AsyncLogsResource |
| 464 | + |
| 465 | + return AsyncLogsResource(self) |
| 466 | + |
446 | 467 | @cached_property |
447 | 468 | def with_raw_response(self) -> AsyncContextDevWithRawResponse: |
448 | 469 | return AsyncContextDevWithRawResponse(self) |
@@ -633,6 +654,16 @@ def news(self) -> news.NewsResourceWithRawResponse: |
633 | 654 |
|
634 | 655 | return NewsResourceWithRawResponse(self._client.news) |
635 | 656 |
|
| 657 | + @cached_property |
| 658 | + def logs(self) -> logs.LogsResourceWithRawResponse: |
| 659 | + """Read your organization's API request logs to debug failed calls. |
| 660 | +
|
| 661 | + These endpoints cost no credits and use a separate rate limit. |
| 662 | + """ |
| 663 | + from .resources.logs import LogsResourceWithRawResponse |
| 664 | + |
| 665 | + return LogsResourceWithRawResponse(self._client.logs) |
| 666 | + |
636 | 667 |
|
637 | 668 | class AsyncContextDevWithRawResponse: |
638 | 669 | _client: AsyncContextDev |
@@ -711,6 +742,16 @@ def news(self) -> news.AsyncNewsResourceWithRawResponse: |
711 | 742 |
|
712 | 743 | return AsyncNewsResourceWithRawResponse(self._client.news) |
713 | 744 |
|
| 745 | + @cached_property |
| 746 | + def logs(self) -> logs.AsyncLogsResourceWithRawResponse: |
| 747 | + """Read your organization's API request logs to debug failed calls. |
| 748 | +
|
| 749 | + These endpoints cost no credits and use a separate rate limit. |
| 750 | + """ |
| 751 | + from .resources.logs import AsyncLogsResourceWithRawResponse |
| 752 | + |
| 753 | + return AsyncLogsResourceWithRawResponse(self._client.logs) |
| 754 | + |
714 | 755 |
|
715 | 756 | class ContextDevWithStreamedResponse: |
716 | 757 | _client: ContextDev |
@@ -789,6 +830,16 @@ def news(self) -> news.NewsResourceWithStreamingResponse: |
789 | 830 |
|
790 | 831 | return NewsResourceWithStreamingResponse(self._client.news) |
791 | 832 |
|
| 833 | + @cached_property |
| 834 | + def logs(self) -> logs.LogsResourceWithStreamingResponse: |
| 835 | + """Read your organization's API request logs to debug failed calls. |
| 836 | +
|
| 837 | + These endpoints cost no credits and use a separate rate limit. |
| 838 | + """ |
| 839 | + from .resources.logs import LogsResourceWithStreamingResponse |
| 840 | + |
| 841 | + return LogsResourceWithStreamingResponse(self._client.logs) |
| 842 | + |
792 | 843 |
|
793 | 844 | class AsyncContextDevWithStreamedResponse: |
794 | 845 | _client: AsyncContextDev |
@@ -867,6 +918,16 @@ def news(self) -> news.AsyncNewsResourceWithStreamingResponse: |
867 | 918 |
|
868 | 919 | return AsyncNewsResourceWithStreamingResponse(self._client.news) |
869 | 920 |
|
| 921 | + @cached_property |
| 922 | + def logs(self) -> logs.AsyncLogsResourceWithStreamingResponse: |
| 923 | + """Read your organization's API request logs to debug failed calls. |
| 924 | +
|
| 925 | + These endpoints cost no credits and use a separate rate limit. |
| 926 | + """ |
| 927 | + from .resources.logs import AsyncLogsResourceWithStreamingResponse |
| 928 | + |
| 929 | + return AsyncLogsResourceWithStreamingResponse(self._client.logs) |
| 930 | + |
870 | 931 |
|
871 | 932 | Client = ContextDev |
872 | 933 |
|
|
0 commit comments