|
15 | 15 | SqlResourceWithStreamingResponse, |
16 | 16 | AsyncSqlResourceWithStreamingResponse, |
17 | 17 | ) |
18 | | -from ...types import axon_create_params, axon_publish_params |
| 18 | +from ...types import axon_list_params, axon_create_params, axon_publish_params |
19 | 19 | from ..._types import Body, Omit, Query, Headers, NotGiven, omit, not_given |
20 | 20 | from ..._utils import path_template, maybe_transform, async_maybe_transform |
21 | 21 | from ..._compat import cached_property |
@@ -137,18 +137,50 @@ def retrieve( |
137 | 137 | def list( |
138 | 138 | self, |
139 | 139 | *, |
| 140 | + include_total_count: bool | Omit = omit, |
| 141 | + limit: int | Omit = omit, |
| 142 | + starting_after: str | Omit = omit, |
140 | 143 | # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. |
141 | 144 | # The extra values given here take precedence over values defined on the client or passed to this method. |
142 | 145 | extra_headers: Headers | None = None, |
143 | 146 | extra_query: Query | None = None, |
144 | 147 | extra_body: Body | None = None, |
145 | 148 | timeout: float | httpx.Timeout | None | NotGiven = not_given, |
146 | 149 | ) -> AxonListView: |
147 | | - """[Beta] List all active axons.""" |
| 150 | + """ |
| 151 | + [Beta] List all active axons. |
| 152 | +
|
| 153 | + Args: |
| 154 | + include_total_count: If true (default), includes total_count in the response. Set to false to skip |
| 155 | + the count query for better performance on large datasets. |
| 156 | +
|
| 157 | + limit: The limit of items to return. Default is 20. Max is 5000. |
| 158 | +
|
| 159 | + starting_after: Load the next page of data starting after the item with the given ID. |
| 160 | +
|
| 161 | + extra_headers: Send extra headers |
| 162 | +
|
| 163 | + extra_query: Add additional query parameters to the request |
| 164 | +
|
| 165 | + extra_body: Add additional JSON properties to the request |
| 166 | +
|
| 167 | + timeout: Override the client-level default timeout for this request, in seconds |
| 168 | + """ |
148 | 169 | return self._get( |
149 | 170 | "/v1/axons", |
150 | 171 | options=make_request_options( |
151 | | - extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout |
| 172 | + extra_headers=extra_headers, |
| 173 | + extra_query=extra_query, |
| 174 | + extra_body=extra_body, |
| 175 | + timeout=timeout, |
| 176 | + query=maybe_transform( |
| 177 | + { |
| 178 | + "include_total_count": include_total_count, |
| 179 | + "limit": limit, |
| 180 | + "starting_after": starting_after, |
| 181 | + }, |
| 182 | + axon_list_params.AxonListParams, |
| 183 | + ), |
152 | 184 | ), |
153 | 185 | cast_to=AxonListView, |
154 | 186 | ) |
@@ -353,18 +385,50 @@ async def retrieve( |
353 | 385 | async def list( |
354 | 386 | self, |
355 | 387 | *, |
| 388 | + include_total_count: bool | Omit = omit, |
| 389 | + limit: int | Omit = omit, |
| 390 | + starting_after: str | Omit = omit, |
356 | 391 | # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. |
357 | 392 | # The extra values given here take precedence over values defined on the client or passed to this method. |
358 | 393 | extra_headers: Headers | None = None, |
359 | 394 | extra_query: Query | None = None, |
360 | 395 | extra_body: Body | None = None, |
361 | 396 | timeout: float | httpx.Timeout | None | NotGiven = not_given, |
362 | 397 | ) -> AxonListView: |
363 | | - """[Beta] List all active axons.""" |
| 398 | + """ |
| 399 | + [Beta] List all active axons. |
| 400 | +
|
| 401 | + Args: |
| 402 | + include_total_count: If true (default), includes total_count in the response. Set to false to skip |
| 403 | + the count query for better performance on large datasets. |
| 404 | +
|
| 405 | + limit: The limit of items to return. Default is 20. Max is 5000. |
| 406 | +
|
| 407 | + starting_after: Load the next page of data starting after the item with the given ID. |
| 408 | +
|
| 409 | + extra_headers: Send extra headers |
| 410 | +
|
| 411 | + extra_query: Add additional query parameters to the request |
| 412 | +
|
| 413 | + extra_body: Add additional JSON properties to the request |
| 414 | +
|
| 415 | + timeout: Override the client-level default timeout for this request, in seconds |
| 416 | + """ |
364 | 417 | return await self._get( |
365 | 418 | "/v1/axons", |
366 | 419 | options=make_request_options( |
367 | | - extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout |
| 420 | + extra_headers=extra_headers, |
| 421 | + extra_query=extra_query, |
| 422 | + extra_body=extra_body, |
| 423 | + timeout=timeout, |
| 424 | + query=await async_maybe_transform( |
| 425 | + { |
| 426 | + "include_total_count": include_total_count, |
| 427 | + "limit": limit, |
| 428 | + "starting_after": starting_after, |
| 429 | + }, |
| 430 | + axon_list_params.AxonListParams, |
| 431 | + ), |
368 | 432 | ), |
369 | 433 | cast_to=AxonListView, |
370 | 434 | ) |
|
0 commit comments