22
33from __future__ import annotations
44
5+ from typing import List
6+ from typing_extensions import Literal
7+
58import httpx
69
710from ..types import queue_list_params , queue_count_params
8- from .._types import Body , Query , Headers , NotGiven , not_given
11+ from .._types import Body , Omit , Query , Headers , NotGiven , omit , not_given
912from .._utils import path_template , maybe_transform , async_maybe_transform
1013from .._compat import cached_property
1114from .._resource import SyncAPIResource , AsyncAPIResource
@@ -47,29 +50,36 @@ def list(
4750 self ,
4851 account : str ,
4952 * ,
50- limit : int ,
5153 publish_date_end : str ,
5254 publish_date_start : str ,
5355 timezone : str ,
56+ limit : int | Omit = omit ,
57+ type : List [Literal ["chat" , "post" ]] | Omit = omit ,
5458 # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
5559 # The extra values given here take precedence over values defined on the client or passed to this method.
5660 extra_headers : Headers | None = None ,
5761 extra_query : Query | None = None ,
5862 extra_body : Body | None = None ,
5963 timeout : float | httpx .Timeout | None | NotGiven = not_given ,
6064 ) -> QueueListResponse :
61- """
62- List posts and messages in the queue.
65+ """List scheduled posts and mass messages for a date range.
66+
67+ Use the type filter to
68+ return only posts, messages, or both.
6369
6470 Args:
65- limit: Maximum number of queue items to return (default = 20)
71+ publish_date_end: Latest publish date to return. Must be a valid date. Must be a valid date. Must
72+ be a date after or equal to <code>publishDateStart</code>.
6673
67- publish_date_end: Latest publish date to return
74+ publish_date_start: Earliest publish date to return (must be at least today). Must be a valid date.
75+ Must be a valid date. Must be a date after or equal to <code>today</code>.
6876
69- publish_date_start: Earliest publish date to return (must be at least today)
77+ timezone: Timezone of the provided dates.
78+ [View available timezone values](https://www.php.net/manual/en/timezones.php).
79+ Must be a valid time zone, such as <code>Africa/Accra</code>.
7080
71- timezone: Time timezone of the provided dates.
72- [View available timezone values](https://www.php.net/manual/en/timezones.php)
81+ limit: Maximum number of queue items to return (default 20). Must be at least 1. Must
82+ not be greater than 100.
7383
7484 extra_headers: Send extra headers
7585
@@ -90,10 +100,11 @@ def list(
90100 timeout = timeout ,
91101 query = maybe_transform (
92102 {
93- "limit" : limit ,
94103 "publish_date_end" : publish_date_end ,
95104 "publish_date_start" : publish_date_start ,
96105 "timezone" : timezone ,
106+ "limit" : limit ,
107+ "type" : type ,
97108 },
98109 queue_list_params .QueueListParams ,
99110 ),
@@ -218,29 +229,36 @@ async def list(
218229 self ,
219230 account : str ,
220231 * ,
221- limit : int ,
222232 publish_date_end : str ,
223233 publish_date_start : str ,
224234 timezone : str ,
235+ limit : int | Omit = omit ,
236+ type : List [Literal ["chat" , "post" ]] | Omit = omit ,
225237 # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
226238 # The extra values given here take precedence over values defined on the client or passed to this method.
227239 extra_headers : Headers | None = None ,
228240 extra_query : Query | None = None ,
229241 extra_body : Body | None = None ,
230242 timeout : float | httpx .Timeout | None | NotGiven = not_given ,
231243 ) -> QueueListResponse :
232- """
233- List posts and messages in the queue.
244+ """List scheduled posts and mass messages for a date range.
245+
246+ Use the type filter to
247+ return only posts, messages, or both.
234248
235249 Args:
236- limit: Maximum number of queue items to return (default = 20)
250+ publish_date_end: Latest publish date to return. Must be a valid date. Must be a valid date. Must
251+ be a date after or equal to <code>publishDateStart</code>.
237252
238- publish_date_end: Latest publish date to return
253+ publish_date_start: Earliest publish date to return (must be at least today). Must be a valid date.
254+ Must be a valid date. Must be a date after or equal to <code>today</code>.
239255
240- publish_date_start: Earliest publish date to return (must be at least today)
256+ timezone: Timezone of the provided dates.
257+ [View available timezone values](https://www.php.net/manual/en/timezones.php).
258+ Must be a valid time zone, such as <code>Africa/Accra</code>.
241259
242- timezone: Time timezone of the provided dates.
243- [View available timezone values](https://www.php.net/manual/en/timezones.php)
260+ limit: Maximum number of queue items to return (default 20). Must be at least 1. Must
261+ not be greater than 100.
244262
245263 extra_headers: Send extra headers
246264
@@ -261,10 +279,11 @@ async def list(
261279 timeout = timeout ,
262280 query = await async_maybe_transform (
263281 {
264- "limit" : limit ,
265282 "publish_date_end" : publish_date_end ,
266283 "publish_date_start" : publish_date_start ,
267284 "timezone" : timezone ,
285+ "limit" : limit ,
286+ "type" : type ,
268287 },
269288 queue_list_params .QueueListParams ,
270289 ),
0 commit comments