smartsheet-python-sdk 3.0.3__py2.py3-none-any.whl → 3.0.4__py2.py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
smartsheet/events.py CHANGED
@@ -30,13 +30,19 @@ class Events:
30
30
  self._log = logging.getLogger(__name__)
31
31
 
32
32
  def list_events(
33
- self, since=None, stream_position=None, max_count=None, numeric_dates=None
33
+ self, since=None, to=None, stream_position=None, max_count=None, numeric_dates=None # pylint: disable=invalid-name
34
34
  ):
35
35
  """Get the list of all Events.
36
36
 
37
37
  Args:
38
38
  since (str or long): Starting time for events to return.
39
39
  You must pass in a value for either since or streamPosition and never both.
40
+ to (str or long): Ending time for events to return.
41
+ This parameter specifies the endpoint in time for the events to be fetched.
42
+ Similar to the `since` parameter, `to` can be passed in either as a datetime string in
43
+ ISO 8601 format or as a UNIX epoch time in milliseconds. This allows for defining a
44
+ precise time range for the events query. Note that `to` is optional and can be used in
45
+ conjunction with `since` to specify both the start and end times for the event retrieval window.
40
46
  stream_position (str): Indicates next set of events to return.
41
47
  Use value of nextStreamPosition returned from the previous call.
42
48
  You must pass in a value for either since or streamPosition and never both.
@@ -53,9 +59,14 @@ class Events:
53
59
  _op["method"] = "GET"
54
60
  _op["path"] = "/events"
55
61
  if isinstance(since, datetime):
56
- _op["query_params"]["since"] = since # .isoformat()
62
+ _op["query_params"]["since"] = since.isoformat()
57
63
  else:
58
64
  _op["query_params"]["since"] = since
65
+
66
+ if isinstance(to, datetime):
67
+ _op["query_params"]["to"] = to.isoformat()
68
+ else:
69
+ _op["query_params"]["to"] = to
59
70
  _op["query_params"]["streamPosition"] = stream_position
60
71
  _op["query_params"]["maxCount"] = max_count
61
72
  _op["query_params"]["numericDates"] = numeric_dates
smartsheet/util.py CHANGED
@@ -112,6 +112,14 @@ def serialize(obj):
112
112
  serialized = serialize(item)
113
113
  if not hasattr(serialized, "is_explicit_null"):
114
114
  retval.append(serialized)
115
+
116
+ elif isinstance(obj, dict):
117
+ retval = {}
118
+ for key, value in obj.items():
119
+ serialized_value = serialize(value)
120
+ if not hasattr(serialized_value, "is_explicit_null"):
121
+ retval[key] = serialized_value
122
+
115
123
  else:
116
124
  retval = {}
117
125
  prop_list = get_child_properties(obj)
smartsheet/version.py CHANGED
@@ -12,5 +12,5 @@ __version__: str
12
12
  __version_tuple__: VERSION_TUPLE
13
13
  version_tuple: VERSION_TUPLE
14
14
 
15
- __version__ = version = '3.0.3'
16
- __version_tuple__ = version_tuple = (3, 0, 3)
15
+ __version__ = version = '3.0.4'
16
+ __version_tuple__ = version_tuple = (3, 0, 4)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: smartsheet-python-sdk
3
- Version: 3.0.3
3
+ Version: 3.0.4
4
4
  Summary: Library that uses Python to connect to Smartsheet services (using API 2.0).
5
5
  Home-page: http://smartsheet-platform.github.io/api-docs/
6
6
  Author: Smartsheet
@@ -3,7 +3,7 @@ smartsheet/attachments.py,sha256=eZ1y5jS_TJSyZzzapc68ol1qhrLxCXc2sY8l8oY1Gvo,178
3
3
  smartsheet/cells.py,sha256=juLA85Zdyt5KfvDLdFkvEJ6S635JMTJs8Xhb2CchCPw,4800
4
4
  smartsheet/contacts.py,sha256=IBV3ncoP7R7GmzQI0H1CIwq4scGk9iBC1ayyQ927YrQ,2383
5
5
  smartsheet/discussions.py,sha256=n0mbARczzdBkw83ZPKcNABp5j6AQLZPUHkKAZOK5q1Y,13110
6
- smartsheet/events.py,sha256=XVYcH568gQDMLmcHnQKTsiMVL2EnuRZmayNrhaWNoYs,2656
6
+ smartsheet/events.py,sha256=MKASwB9BF5AeEMC7Qx-YPKpd9yjs6UCWwilBC8RZDgA,3417
7
7
  smartsheet/exceptions.py,sha256=ISCV4fIAkYgcYMsZL62zDr48qIPPok6N4myifej2M4c,3894
8
8
  smartsheet/favorites.py,sha256=8D1o1YCmzie43cNvSVwuDKdUnRaEV8-1PiIimNcQkp0,3921
9
9
  smartsheet/folders.py,sha256=GLFtMe7IXQmaf7jhrWWwnSrDn60sueG-oISspsY5e_A,12011
@@ -23,8 +23,8 @@ smartsheet/templates.py,sha256=z_Tj-4jZsu3RkLNbCAZWM2W05Zbio9T_uyU33rUPxzE,2898
23
23
  smartsheet/token.py,sha256=5uz-IG5adx_zr2-uepH-W8ATv0dq9aZNjYLeZNwldqI,4703
24
24
  smartsheet/types.py,sha256=aIdRJ89jwclmiZ4RH3hnZHJTFWFxgNKW3d8fghm21eM,9126
25
25
  smartsheet/users.py,sha256=3LyC7BsPLa3dAg5EXaGswgXq0O8s77nsE0sSkjLfRe8,12775
26
- smartsheet/util.py,sha256=mpGYgQ6cQMzXFTEwILf5tG18VrhGY1annrs_wUuw1Fo,5379
27
- smartsheet/version.py,sha256=tmsJrqMJ6jmtNKTruxlJdd_-BtOyY3AALPeqEhjqKi0,411
26
+ smartsheet/util.py,sha256=12Y6eluecB8k4Ns-at81AEM18ND2TCKa9bF4BlNRrKM,5633
27
+ smartsheet/version.py,sha256=yyqcyuVbO5Bq7rMS_oAT4a92vlOM2Jk4fCNagNkWYJk,411
28
28
  smartsheet/webhooks.py,sha256=7F7g4Ks0GyS3QxsNWm1SFtrOr00jBisCjj7-hcToHM8,4637
29
29
  smartsheet/workspaces.py,sha256=u67WtvWFEgXRBNVFPXeNHnim2BymFaBz3v6q6wDHYOg,17550
30
30
  smartsheet/models/__init__.py,sha256=gdk_4O22uy8m4yStECUiGzNnxqMqFonPskJGbB5AIwo,4602
@@ -179,9 +179,9 @@ smartsheet/models/enums/system_column_type.py,sha256=UfhNUBGD_0K1Pas7fujGEuax55O
179
179
  smartsheet/models/enums/update_request_status.py,sha256=xYF84x1dTFhJMYVi1q3G1T9u1IGN3szlR1jj5HHC0hE,777
180
180
  smartsheet/models/enums/user_status.py,sha256=SB7qRcA0dhdRimsOKHCGF3CB6fL0XuifxQEWZGNNS8Q,766
181
181
  smartsheet/models/enums/widget_type.py,sha256=VfVq59fLZsT4ks_ZBrtv52u2Cl60iAdlA6mGD_elz-k,1072
182
- smartsheet_python_sdk-3.0.3.dist-info/LICENSE.md,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
183
- smartsheet_python_sdk-3.0.3.dist-info/METADATA,sha256=96yDrAYoq2eDDsFYBq1nsYYunSmkeQQ9_nlts71pTMk,4701
184
- smartsheet_python_sdk-3.0.3.dist-info/NOTICE,sha256=mXr2ryVjnCjykeW0J79kFfVXQG_Z9SV4BV_QPNENW1U,420
185
- smartsheet_python_sdk-3.0.3.dist-info/WHEEL,sha256=DZajD4pwLWue70CAfc7YaxT1wLUciNBvN_TTcvXpltE,110
186
- smartsheet_python_sdk-3.0.3.dist-info/top_level.txt,sha256=kozWEYiKjyJmSXzd6p5ugkQ5bhoHS9V3NnvLagUfcNw,11
187
- smartsheet_python_sdk-3.0.3.dist-info/RECORD,,
182
+ smartsheet_python_sdk-3.0.4.dist-info/LICENSE.md,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
183
+ smartsheet_python_sdk-3.0.4.dist-info/METADATA,sha256=EtQ9wKIN5l365kGm1R0Nc5upU_n7cdrUsj3X12ELJzg,4701
184
+ smartsheet_python_sdk-3.0.4.dist-info/NOTICE,sha256=mXr2ryVjnCjykeW0J79kFfVXQG_Z9SV4BV_QPNENW1U,420
185
+ smartsheet_python_sdk-3.0.4.dist-info/WHEEL,sha256=DZajD4pwLWue70CAfc7YaxT1wLUciNBvN_TTcvXpltE,110
186
+ smartsheet_python_sdk-3.0.4.dist-info/top_level.txt,sha256=kozWEYiKjyJmSXzd6p5ugkQ5bhoHS9V3NnvLagUfcNw,11
187
+ smartsheet_python_sdk-3.0.4.dist-info/RECORD,,