smartsheet-python-sdk 3.5.5__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/__init__.py +37 -0
- smartsheet/attachments.py +565 -0
- smartsheet/cells.py +164 -0
- smartsheet/contacts.py +78 -0
- smartsheet/discussions.py +411 -0
- smartsheet/events.py +79 -0
- smartsheet/exceptions.py +130 -0
- smartsheet/favorites.py +116 -0
- smartsheet/folders.py +438 -0
- smartsheet/groups.py +186 -0
- smartsheet/home.py +180 -0
- smartsheet/images.py +61 -0
- smartsheet/models/__init__.py +126 -0
- smartsheet/models/access_token.py +95 -0
- smartsheet/models/account.py +77 -0
- smartsheet/models/alternate_email.py +88 -0
- smartsheet/models/asset_share.py +165 -0
- smartsheet/models/asset_shares_paginated_result.py +84 -0
- smartsheet/models/attachment.py +181 -0
- smartsheet/models/auto_number_format.py +81 -0
- smartsheet/models/automation_action.py +162 -0
- smartsheet/models/automation_rule.py +164 -0
- smartsheet/models/boolean_object_value.py +38 -0
- smartsheet/models/bulk_item_failure.py +77 -0
- smartsheet/models/bulk_item_result.py +111 -0
- smartsheet/models/cell.py +193 -0
- smartsheet/models/cell_data_item.py +152 -0
- smartsheet/models/cell_history.py +67 -0
- smartsheet/models/cell_link.py +91 -0
- smartsheet/models/cell_link_widget_content.py +101 -0
- smartsheet/models/chart_widget_content.py +124 -0
- smartsheet/models/column.py +253 -0
- smartsheet/models/comment.py +126 -0
- smartsheet/models/contact.py +88 -0
- smartsheet/models/contact_object_value.py +59 -0
- smartsheet/models/container_destination.py +74 -0
- smartsheet/models/copy_or_move_row_destination.py +54 -0
- smartsheet/models/copy_or_move_row_directive.py +64 -0
- smartsheet/models/copy_or_move_row_result.py +67 -0
- smartsheet/models/criteria.py +82 -0
- smartsheet/models/cross_sheet_reference.py +134 -0
- smartsheet/models/currency.py +64 -0
- smartsheet/models/date_object_value.py +56 -0
- smartsheet/models/datetime_object_value.py +56 -0
- smartsheet/models/discussion.py +183 -0
- smartsheet/models/downloaded_file.py +106 -0
- smartsheet/models/duration.py +112 -0
- smartsheet/models/email.py +82 -0
- smartsheet/models/enums/__init__.py +56 -0
- smartsheet/models/enums/access_level.py +26 -0
- smartsheet/models/enums/asset_type.py +10 -0
- smartsheet/models/enums/attachment_parent_type.py +23 -0
- smartsheet/models/enums/attachment_sub_type.py +26 -0
- smartsheet/models/enums/attachment_type.py +29 -0
- smartsheet/models/enums/automation_action_frequency.py +24 -0
- smartsheet/models/enums/automation_action_type.py +23 -0
- smartsheet/models/enums/automation_rule_disabled_reason.py +27 -0
- smartsheet/models/enums/cell_link_status.py +28 -0
- smartsheet/models/enums/column_type.py +31 -0
- smartsheet/models/enums/criteria_target.py +21 -0
- smartsheet/models/enums/cross_sheet_reference_status.py +28 -0
- smartsheet/models/enums/currency_code.py +43 -0
- smartsheet/models/enums/day_descriptors.py +30 -0
- smartsheet/models/enums/day_ordinal.py +25 -0
- smartsheet/models/enums/event_action.py +76 -0
- smartsheet/models/enums/event_obejct_type.py +34 -0
- smartsheet/models/enums/event_source.py +27 -0
- smartsheet/models/enums/global_template.py +23 -0
- smartsheet/models/enums/operator.py +62 -0
- smartsheet/models/enums/paper_type.py +29 -0
- smartsheet/models/enums/predecessor_type.py +24 -0
- smartsheet/models/enums/publish_accessible_by.py +22 -0
- smartsheet/models/enums/schedule_type.py +25 -0
- smartsheet/models/enums/seat_type.py +17 -0
- smartsheet/models/enums/share_scope.py +22 -0
- smartsheet/models/enums/share_type.py +22 -0
- smartsheet/models/enums/sheet_email_format.py +23 -0
- smartsheet/models/enums/sheet_filter_operator.py +22 -0
- smartsheet/models/enums/sheet_filter_type.py +23 -0
- smartsheet/models/enums/sort_direction.py +22 -0
- smartsheet/models/enums/symbol.py +45 -0
- smartsheet/models/enums/system_column_type.py +25 -0
- smartsheet/models/enums/update_request_status.py +23 -0
- smartsheet/models/enums/user_status.py +23 -0
- smartsheet/models/enums/widget_type.py +32 -0
- smartsheet/models/error.py +74 -0
- smartsheet/models/error_result.py +117 -0
- smartsheet/models/event.py +153 -0
- smartsheet/models/event_result.py +86 -0
- smartsheet/models/explicit_null.py +24 -0
- smartsheet/models/favorite.py +81 -0
- smartsheet/models/folder.py +177 -0
- smartsheet/models/font_family.py +63 -0
- smartsheet/models/format_details.py +55 -0
- smartsheet/models/format_tables.py +191 -0
- smartsheet/models/group.py +134 -0
- smartsheet/models/group_member.py +104 -0
- smartsheet/models/home.py +110 -0
- smartsheet/models/hyperlink.py +81 -0
- smartsheet/models/image.py +101 -0
- smartsheet/models/image_url.py +91 -0
- smartsheet/models/image_url_map.py +68 -0
- smartsheet/models/image_widget_content.py +117 -0
- smartsheet/models/index_result.py +118 -0
- smartsheet/models/json_object.py +59 -0
- smartsheet/models/multi_contact_object_value.py +49 -0
- smartsheet/models/multi_picklist_object_value.py +48 -0
- smartsheet/models/multi_row_email.py +60 -0
- smartsheet/models/number_object_value.py +38 -0
- smartsheet/models/o_auth_error.py +86 -0
- smartsheet/models/object_value.py +130 -0
- smartsheet/models/paginated_children_result.py +80 -0
- smartsheet/models/predecessor.py +102 -0
- smartsheet/models/predecessor_list.py +49 -0
- smartsheet/models/primitive_object_value.py +59 -0
- smartsheet/models/profile_image.py +72 -0
- smartsheet/models/project_settings.py +89 -0
- smartsheet/models/recipient.py +63 -0
- smartsheet/models/report.py +90 -0
- smartsheet/models/report_cell.py +59 -0
- smartsheet/models/report_column.py +67 -0
- smartsheet/models/report_publish.py +95 -0
- smartsheet/models/report_row.py +68 -0
- smartsheet/models/report_widget_content.py +78 -0
- smartsheet/models/result.py +105 -0
- smartsheet/models/row.py +336 -0
- smartsheet/models/row_email.py +83 -0
- smartsheet/models/row_mapping.py +77 -0
- smartsheet/models/schedule.py +140 -0
- smartsheet/models/scope.py +70 -0
- smartsheet/models/search_result.py +67 -0
- smartsheet/models/search_result_item.py +150 -0
- smartsheet/models/selection_range.py +86 -0
- smartsheet/models/sent_update_request.py +172 -0
- smartsheet/models/server_info.py +67 -0
- smartsheet/models/share.py +183 -0
- smartsheet/models/sheet.py +462 -0
- smartsheet/models/sheet_email.py +81 -0
- smartsheet/models/sheet_filter.py +106 -0
- smartsheet/models/sheet_filter_details.py +76 -0
- smartsheet/models/sheet_publish.py +184 -0
- smartsheet/models/sheet_summary.py +59 -0
- smartsheet/models/sheet_user_permissions.py +58 -0
- smartsheet/models/sheet_user_settings.py +72 -0
- smartsheet/models/shortcut_data_item.py +102 -0
- smartsheet/models/shortcut_widget_content.py +61 -0
- smartsheet/models/sight.py +175 -0
- smartsheet/models/sight_publish.py +77 -0
- smartsheet/models/sort_criterion.py +64 -0
- smartsheet/models/sort_specifier.py +55 -0
- smartsheet/models/source.py +83 -0
- smartsheet/models/string_object_value.py +38 -0
- smartsheet/models/summary_field.py +256 -0
- smartsheet/models/template.py +171 -0
- smartsheet/models/title_rich_text_widget_content.py +68 -0
- smartsheet/models/token_paginated_result.py +79 -0
- smartsheet/models/update_request.py +110 -0
- smartsheet/models/user.py +58 -0
- smartsheet/models/user_model.py +280 -0
- smartsheet/models/user_plan.py +77 -0
- smartsheet/models/user_profile.py +89 -0
- smartsheet/models/version.py +57 -0
- smartsheet/models/web_content_widget_content.py +60 -0
- smartsheet/models/webhook.py +219 -0
- smartsheet/models/webhook_secret.py +58 -0
- smartsheet/models/webhook_stats.py +76 -0
- smartsheet/models/webhook_subscope.py +50 -0
- smartsheet/models/widget.py +211 -0
- smartsheet/models/widget_content.py +52 -0
- smartsheet/models/widget_hyperlink.py +74 -0
- smartsheet/models/workspace.py +185 -0
- smartsheet/object_value.py +72 -0
- smartsheet/passthrough.py +127 -0
- smartsheet/reports.py +382 -0
- smartsheet/search.py +100 -0
- smartsheet/server.py +48 -0
- smartsheet/session.py +70 -0
- smartsheet/sharing.py +163 -0
- smartsheet/sheets.py +2062 -0
- smartsheet/sights.py +370 -0
- smartsheet/smartsheet.py +684 -0
- smartsheet/templates.py +87 -0
- smartsheet/token.py +128 -0
- smartsheet/types.py +323 -0
- smartsheet/users.py +490 -0
- smartsheet/util.py +199 -0
- smartsheet/version.py +34 -0
- smartsheet/webhooks.py +161 -0
- smartsheet/workspaces.py +647 -0
- smartsheet_python_sdk-3.5.5.dist-info/METADATA +120 -0
- smartsheet_python_sdk-3.5.5.dist-info/RECORD +195 -0
- smartsheet_python_sdk-3.5.5.dist-info/WHEEL +5 -0
- smartsheet_python_sdk-3.5.5.dist-info/licenses/LICENSE.md +201 -0
- smartsheet_python_sdk-3.5.5.dist-info/licenses/NOTICE +10 -0
- smartsheet_python_sdk-3.5.5.dist-info/top_level.txt +1 -0
smartsheet/home.py
ADDED
|
@@ -0,0 +1,180 @@
|
|
|
1
|
+
# pylint: disable=C0111,R0902,R0913
|
|
2
|
+
# Smartsheet Python SDK.
|
|
3
|
+
#
|
|
4
|
+
# Copyright 2018 Smartsheet.com, Inc.
|
|
5
|
+
#
|
|
6
|
+
# Licensed under the Apache License, Version 2.0 (the "License"): you may
|
|
7
|
+
# not use this file except in compliance with the License. You may obtain
|
|
8
|
+
# a copy of the License at
|
|
9
|
+
#
|
|
10
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
|
11
|
+
#
|
|
12
|
+
# Unless required by applicable law or agreed to in writing, software
|
|
13
|
+
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
|
14
|
+
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
|
15
|
+
# License for the specific language governing permissions and limitations
|
|
16
|
+
# under the License.
|
|
17
|
+
|
|
18
|
+
from __future__ import absolute_import
|
|
19
|
+
|
|
20
|
+
import logging
|
|
21
|
+
|
|
22
|
+
from . import fresh_operation
|
|
23
|
+
from .models.folder import Folder
|
|
24
|
+
from .models.sheet import Sheet
|
|
25
|
+
from .util import deprecated
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
class Home:
|
|
29
|
+
|
|
30
|
+
"""Class for handling Home operations."""
|
|
31
|
+
|
|
32
|
+
def __init__(self, smartsheet_obj):
|
|
33
|
+
"""Init Home with base Smartsheet object."""
|
|
34
|
+
self._base = smartsheet_obj
|
|
35
|
+
self._log = logging.getLogger(__name__)
|
|
36
|
+
|
|
37
|
+
@deprecated
|
|
38
|
+
def create_folder(self, folder_obj):
|
|
39
|
+
"""Creates a Folder in the user's Sheets folder (Home).
|
|
40
|
+
|
|
41
|
+
Args:
|
|
42
|
+
folder_obj (Folder): Folder object.
|
|
43
|
+
|
|
44
|
+
Returns:
|
|
45
|
+
Result
|
|
46
|
+
"""
|
|
47
|
+
if isinstance(folder_obj, str):
|
|
48
|
+
folder_obj = Folder({"name": folder_obj})
|
|
49
|
+
|
|
50
|
+
_op = fresh_operation("create_folder")
|
|
51
|
+
_op["method"] = "POST"
|
|
52
|
+
_op["path"] = "/home/folders"
|
|
53
|
+
_op["json"] = folder_obj
|
|
54
|
+
|
|
55
|
+
expected = ["Result", "Folder"]
|
|
56
|
+
|
|
57
|
+
prepped_request = self._base.prepare_request(_op)
|
|
58
|
+
response = self._base.request(prepped_request, expected, _op)
|
|
59
|
+
|
|
60
|
+
return response
|
|
61
|
+
|
|
62
|
+
@deprecated
|
|
63
|
+
def create_sheet(self, sheet_obj):
|
|
64
|
+
"""Create a Sheet from scratch in the user's Sheets folder within
|
|
65
|
+
Home.
|
|
66
|
+
|
|
67
|
+
Args:
|
|
68
|
+
sheet_obj (Sheet): Sheet object.
|
|
69
|
+
|
|
70
|
+
Returns:
|
|
71
|
+
Result
|
|
72
|
+
"""
|
|
73
|
+
if isinstance(sheet_obj, dict):
|
|
74
|
+
sheet_obj = Sheet(sheet_obj)
|
|
75
|
+
|
|
76
|
+
_op = fresh_operation("create_sheet")
|
|
77
|
+
_op["method"] = "POST"
|
|
78
|
+
_op["path"] = "/sheets"
|
|
79
|
+
_op["json"] = sheet_obj
|
|
80
|
+
|
|
81
|
+
expected = ["Result", "Sheet"]
|
|
82
|
+
|
|
83
|
+
prepped_request = self._base.prepare_request(_op)
|
|
84
|
+
response = self._base.request(prepped_request, expected, _op)
|
|
85
|
+
|
|
86
|
+
return response
|
|
87
|
+
|
|
88
|
+
@deprecated
|
|
89
|
+
def create_sheet_from_template(self, sheet_obj, include=None):
|
|
90
|
+
"""Create a Sheet in the Sheets folder from the specified Template.
|
|
91
|
+
|
|
92
|
+
The Sheet object should be limited to the following
|
|
93
|
+
attributes:
|
|
94
|
+
|
|
95
|
+
name (required): need not be unique.
|
|
96
|
+
fromId (required): the ID of the Template to use in creating the
|
|
97
|
+
Sheet.
|
|
98
|
+
|
|
99
|
+
The optional Include parameter is a list of elements to copy from
|
|
100
|
+
the Template. It may include: data, attachments, discussions,
|
|
101
|
+
cellLinks, forms
|
|
102
|
+
|
|
103
|
+
Args:
|
|
104
|
+
sheet_obj (Sheet): Sheet object.
|
|
105
|
+
include (list[str]): A list of optional elements
|
|
106
|
+
to include from the source Template. Valid list values:
|
|
107
|
+
attachments, cellLinks, data, discussions, forms, rules and ruleRecipients.
|
|
108
|
+
|
|
109
|
+
Returns:
|
|
110
|
+
Result
|
|
111
|
+
"""
|
|
112
|
+
_op = fresh_operation("create_sheet_from_template")
|
|
113
|
+
_op["method"] = "POST"
|
|
114
|
+
_op["path"] = "/sheets"
|
|
115
|
+
_op["query_params"]["include"] = include
|
|
116
|
+
_op["json"] = sheet_obj
|
|
117
|
+
|
|
118
|
+
expected = ["Result", "Sheet"]
|
|
119
|
+
|
|
120
|
+
prepped_request = self._base.prepare_request(_op)
|
|
121
|
+
response = self._base.request(prepped_request, expected, _op)
|
|
122
|
+
|
|
123
|
+
return response
|
|
124
|
+
|
|
125
|
+
@deprecated
|
|
126
|
+
def list_all_contents(self, include=None, exclude=None):
|
|
127
|
+
"""Get a nested list of all Home objects, including Sheets,
|
|
128
|
+
Workspaces, Folders, Reports and Templates.
|
|
129
|
+
|
|
130
|
+
Args:
|
|
131
|
+
include (list[str]): A comma-separated list of
|
|
132
|
+
optional elements to include in the response. Valid list
|
|
133
|
+
values: ownerInfo, sheetVersion, source.
|
|
134
|
+
include (list[str]): A comma-separated list of
|
|
135
|
+
optional elements to exclude from the response. Valid list
|
|
136
|
+
values: permalinks.
|
|
137
|
+
|
|
138
|
+
Returns:
|
|
139
|
+
Home
|
|
140
|
+
"""
|
|
141
|
+
_op = fresh_operation("list_all_contents")
|
|
142
|
+
_op["method"] = "GET"
|
|
143
|
+
_op["path"] = "/home"
|
|
144
|
+
_op["query_params"]["include"] = include
|
|
145
|
+
_op["query_params"]["exclude"] = exclude
|
|
146
|
+
|
|
147
|
+
expected = "Home"
|
|
148
|
+
prepped_request = self._base.prepare_request(_op)
|
|
149
|
+
response = self._base.request(prepped_request, expected, _op)
|
|
150
|
+
|
|
151
|
+
return response
|
|
152
|
+
|
|
153
|
+
@deprecated
|
|
154
|
+
def list_folders(self, page_size=None, page=None, include_all=None):
|
|
155
|
+
"""Gets a list of top-level child Folders within the user's Sheets
|
|
156
|
+
folder.
|
|
157
|
+
|
|
158
|
+
Args:
|
|
159
|
+
page_size (int): The maximum number of items to
|
|
160
|
+
return per page.
|
|
161
|
+
page (int): Which page to return.
|
|
162
|
+
include_all (bool): If true, include all results
|
|
163
|
+
(i.e. do not paginate).
|
|
164
|
+
|
|
165
|
+
Returns:
|
|
166
|
+
IndexResult
|
|
167
|
+
"""
|
|
168
|
+
_op = fresh_operation("list_folders")
|
|
169
|
+
_op["method"] = "GET"
|
|
170
|
+
_op["path"] = "/home/folders"
|
|
171
|
+
_op["query_params"]["pageSize"] = page_size
|
|
172
|
+
_op["query_params"]["page"] = page
|
|
173
|
+
_op["query_params"]["includeAll"] = include_all
|
|
174
|
+
|
|
175
|
+
expected = ["IndexResult", "Folder"]
|
|
176
|
+
|
|
177
|
+
prepped_request = self._base.prepare_request(_op)
|
|
178
|
+
response = self._base.request(prepped_request, expected, _op)
|
|
179
|
+
|
|
180
|
+
return response
|
smartsheet/images.py
ADDED
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
# pylint: disable=C0111,R0902,R0913
|
|
2
|
+
# Smartsheet Python SDK.
|
|
3
|
+
#
|
|
4
|
+
# Copyright 2016 Smartsheet.com, Inc.
|
|
5
|
+
#
|
|
6
|
+
# Licensed under the Apache License, Version 2.0 (the "License"): you may
|
|
7
|
+
# not use this file except in compliance with the License. You may obtain
|
|
8
|
+
# a copy of the License at
|
|
9
|
+
#
|
|
10
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
|
11
|
+
#
|
|
12
|
+
# Unless required by applicable law or agreed to in writing, software
|
|
13
|
+
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
|
14
|
+
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
|
15
|
+
# License for the specific language governing permissions and limitations
|
|
16
|
+
# under the License.
|
|
17
|
+
|
|
18
|
+
from __future__ import absolute_import
|
|
19
|
+
|
|
20
|
+
import logging
|
|
21
|
+
|
|
22
|
+
from . import fresh_operation
|
|
23
|
+
from .models.image_url import ImageUrl
|
|
24
|
+
from .types import TypedList
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
class Images:
|
|
28
|
+
|
|
29
|
+
"""Class for handling Images operations."""
|
|
30
|
+
|
|
31
|
+
def __init__(self, smartsheet_obj):
|
|
32
|
+
"""Init Images with base Smartsheet object."""
|
|
33
|
+
self._base = smartsheet_obj
|
|
34
|
+
self._log = logging.getLogger(__name__)
|
|
35
|
+
|
|
36
|
+
def get_image_urls(self, list_of_images):
|
|
37
|
+
"""Get URLs that can be used to retrieve specified cell images.
|
|
38
|
+
|
|
39
|
+
Args:
|
|
40
|
+
list_of_images (list[ImageURL]): Array containing one
|
|
41
|
+
or more ImageURL objects.
|
|
42
|
+
|
|
43
|
+
Returns:
|
|
44
|
+
ImageURLMap
|
|
45
|
+
"""
|
|
46
|
+
if isinstance(list_of_images, (dict, ImageUrl)):
|
|
47
|
+
arg_value = list_of_images
|
|
48
|
+
list_of_images = TypedList(ImageUrl)
|
|
49
|
+
list_of_images.append(arg_value)
|
|
50
|
+
|
|
51
|
+
_op = fresh_operation("get_image_urls")
|
|
52
|
+
_op["method"] = "POST"
|
|
53
|
+
_op["path"] = "/imageurls"
|
|
54
|
+
_op["json"] = list_of_images
|
|
55
|
+
|
|
56
|
+
expected = "ImageUrlMap"
|
|
57
|
+
|
|
58
|
+
prepped_request = self._base.prepare_request(_op)
|
|
59
|
+
response = self._base.request(prepped_request, expected, _op)
|
|
60
|
+
|
|
61
|
+
return response
|
|
@@ -0,0 +1,126 @@
|
|
|
1
|
+
# pylint: disable=C0111,C0413
|
|
2
|
+
# Smartsheet Python SDK.
|
|
3
|
+
#
|
|
4
|
+
# Copyright 2016 Smartsheet.com, Inc.
|
|
5
|
+
#
|
|
6
|
+
# Licensed under the Apache License, Version 2.0 (the "License"): you may
|
|
7
|
+
# not use this file except in compliance with the License. You may obtain
|
|
8
|
+
# a copy of the License at
|
|
9
|
+
#
|
|
10
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
|
11
|
+
#
|
|
12
|
+
# Unless required by applicable law or agreed to in writing, software
|
|
13
|
+
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
|
14
|
+
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
|
15
|
+
# License for the specific language governing permissions and limitations
|
|
16
|
+
# under the License.
|
|
17
|
+
|
|
18
|
+
from __future__ import absolute_import
|
|
19
|
+
|
|
20
|
+
# import models into model package
|
|
21
|
+
from .access_token import AccessToken
|
|
22
|
+
from .account import Account
|
|
23
|
+
from .alternate_email import AlternateEmail
|
|
24
|
+
from .attachment import Attachment
|
|
25
|
+
from .auto_number_format import AutoNumberFormat
|
|
26
|
+
from .automation_action import AutomationAction
|
|
27
|
+
from .automation_rule import AutomationRule
|
|
28
|
+
from .boolean_object_value import BooleanObjectValue
|
|
29
|
+
from .bulk_item_failure import BulkItemFailure
|
|
30
|
+
from .bulk_item_result import BulkItemResult
|
|
31
|
+
from .cell import Cell
|
|
32
|
+
from .cell_data_item import CellDataItem
|
|
33
|
+
from .cell_history import CellHistory
|
|
34
|
+
from .cell_link import CellLink
|
|
35
|
+
from .column import Column
|
|
36
|
+
from .comment import Comment
|
|
37
|
+
from .contact import Contact
|
|
38
|
+
from .contact_object_value import ContactObjectValue
|
|
39
|
+
from .container_destination import ContainerDestination
|
|
40
|
+
from .copy_or_move_row_destination import CopyOrMoveRowDestination
|
|
41
|
+
from .copy_or_move_row_directive import CopyOrMoveRowDirective
|
|
42
|
+
from .copy_or_move_row_result import CopyOrMoveRowResult
|
|
43
|
+
from .criteria import Criteria
|
|
44
|
+
from .cross_sheet_reference import CrossSheetReference
|
|
45
|
+
from .currency import Currency
|
|
46
|
+
from .date_object_value import DateObjectValue
|
|
47
|
+
from .discussion import Discussion
|
|
48
|
+
from .downloaded_file import DownloadedFile
|
|
49
|
+
from .duration import Duration
|
|
50
|
+
from .email import Email
|
|
51
|
+
from .error import Error
|
|
52
|
+
from .error_result import ErrorResult
|
|
53
|
+
from .event import Event
|
|
54
|
+
from .event_result import EventResult
|
|
55
|
+
from .explicit_null import ExplicitNull
|
|
56
|
+
from .favorite import Favorite
|
|
57
|
+
from .folder import Folder
|
|
58
|
+
from .font_family import FontFamily
|
|
59
|
+
from .format_details import FormatDetails
|
|
60
|
+
from .format_tables import FormatTables
|
|
61
|
+
from .group import Group
|
|
62
|
+
from .group_member import GroupMember
|
|
63
|
+
from .home import Home
|
|
64
|
+
from .hyperlink import Hyperlink
|
|
65
|
+
from .image import Image
|
|
66
|
+
from .image_url import ImageUrl
|
|
67
|
+
from .image_url_map import ImageUrlMap
|
|
68
|
+
from .index_result import IndexResult
|
|
69
|
+
from .json_object import JSONObject
|
|
70
|
+
from .multi_contact_object_value import MultiContactObjectValue
|
|
71
|
+
from .multi_picklist_object_value import MultiPicklistObjectValue
|
|
72
|
+
from .multi_row_email import MultiRowEmail
|
|
73
|
+
from .number_object_value import NumberObjectValue
|
|
74
|
+
from .o_auth_error import OAuthError
|
|
75
|
+
from .object_value import ObjectValue
|
|
76
|
+
from .paginated_children_result import PaginatedChildrenResult
|
|
77
|
+
from .token_paginated_result import TokenPaginatedResult
|
|
78
|
+
from .predecessor import Predecessor
|
|
79
|
+
from .predecessor_list import PredecessorList
|
|
80
|
+
from .project_settings import ProjectSettings
|
|
81
|
+
from .recipient import Recipient
|
|
82
|
+
from .report import Report
|
|
83
|
+
from .report_cell import ReportCell
|
|
84
|
+
from .report_column import ReportColumn
|
|
85
|
+
from .report_publish import ReportPublish
|
|
86
|
+
from .report_row import ReportRow
|
|
87
|
+
from .result import Result
|
|
88
|
+
from .row import Row
|
|
89
|
+
from .row_email import RowEmail
|
|
90
|
+
from .row_mapping import RowMapping
|
|
91
|
+
from .schedule import Schedule
|
|
92
|
+
from .search_result import SearchResult
|
|
93
|
+
from .search_result_item import SearchResultItem
|
|
94
|
+
from .sent_update_request import SentUpdateRequest
|
|
95
|
+
from .server_info import ServerInfo
|
|
96
|
+
from .share import Share
|
|
97
|
+
from .sheet import Sheet
|
|
98
|
+
from .sheet_email import SheetEmail
|
|
99
|
+
from .sheet_filter import SheetFilter
|
|
100
|
+
from .sheet_filter_details import SheetFilterDetails
|
|
101
|
+
from .sheet_publish import SheetPublish
|
|
102
|
+
from .sheet_summary import SheetSummary
|
|
103
|
+
from .sheet_user_settings import SheetUserSettings
|
|
104
|
+
from .shortcut_data_item import ShortcutDataItem
|
|
105
|
+
from .sight import Sight
|
|
106
|
+
from .sight_publish import SightPublish
|
|
107
|
+
from .sort_criterion import SortCriterion
|
|
108
|
+
from .sort_specifier import SortSpecifier
|
|
109
|
+
from .source import Source
|
|
110
|
+
from .string_object_value import StringObjectValue
|
|
111
|
+
from .summary_field import SummaryField
|
|
112
|
+
from .template import Template
|
|
113
|
+
from .update_request import UpdateRequest
|
|
114
|
+
from .user import User
|
|
115
|
+
from .user_profile import UserProfile
|
|
116
|
+
from .version import Version
|
|
117
|
+
from .webhook import Webhook
|
|
118
|
+
from .webhook_secret import WebhookSecret
|
|
119
|
+
from .webhook_stats import WebhookStats
|
|
120
|
+
from .webhook_subscope import WebhookSubscope
|
|
121
|
+
from .widget import Widget
|
|
122
|
+
from .widget_content import WidgetContent
|
|
123
|
+
from .workspace import Workspace
|
|
124
|
+
from .user_plan import UserPlan
|
|
125
|
+
from .asset_shares_paginated_result import AssetSharesPaginatedResult
|
|
126
|
+
from .asset_share import AssetShare
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
# pylint: disable=C0111,R0902,R0904,R0912,R0913,R0915,E1101
|
|
2
|
+
# Smartsheet Python SDK.
|
|
3
|
+
#
|
|
4
|
+
# Copyright 2018 Smartsheet.com, Inc.
|
|
5
|
+
#
|
|
6
|
+
# Licensed under the Apache License, Version 2.0 (the "License"): you may
|
|
7
|
+
# not use this file except in compliance with the License. You may obtain
|
|
8
|
+
# a copy of the License at
|
|
9
|
+
#
|
|
10
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
|
11
|
+
#
|
|
12
|
+
# Unless required by applicable law or agreed to in writing, software
|
|
13
|
+
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
|
14
|
+
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
|
15
|
+
# License for the specific language governing permissions and limitations
|
|
16
|
+
# under the License.
|
|
17
|
+
|
|
18
|
+
from __future__ import absolute_import
|
|
19
|
+
|
|
20
|
+
from ..types import Number, String, Timestamp, json
|
|
21
|
+
from ..util import deserialize, serialize
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
class AccessToken:
|
|
25
|
+
|
|
26
|
+
"""Smartsheet AccessToken data model."""
|
|
27
|
+
|
|
28
|
+
def __init__(self, props=None, base_obj=None):
|
|
29
|
+
"""Initialize the AccessToken model."""
|
|
30
|
+
self._base = None
|
|
31
|
+
if base_obj is not None:
|
|
32
|
+
self._base = base_obj
|
|
33
|
+
|
|
34
|
+
self.allowed_values = {"token_type": ["bearer"]}
|
|
35
|
+
|
|
36
|
+
self._access_token = String()
|
|
37
|
+
self._expires_at = Timestamp()
|
|
38
|
+
self._expires_in = Number()
|
|
39
|
+
self._refresh_token = String()
|
|
40
|
+
self._token_type = String(accept=self.allowed_values["token_type"])
|
|
41
|
+
|
|
42
|
+
if props:
|
|
43
|
+
deserialize(self, props)
|
|
44
|
+
|
|
45
|
+
# requests package Response object
|
|
46
|
+
self.request_response = None
|
|
47
|
+
|
|
48
|
+
@property
|
|
49
|
+
def access_token(self):
|
|
50
|
+
return self._access_token.value
|
|
51
|
+
|
|
52
|
+
@access_token.setter
|
|
53
|
+
def access_token(self, value):
|
|
54
|
+
self._access_token.value = value
|
|
55
|
+
|
|
56
|
+
@property
|
|
57
|
+
def expires_at(self):
|
|
58
|
+
return self._expires_at.value
|
|
59
|
+
|
|
60
|
+
@expires_at.setter
|
|
61
|
+
def expires_at(self, value):
|
|
62
|
+
self._expires_at.value = value
|
|
63
|
+
|
|
64
|
+
@property
|
|
65
|
+
def expires_in(self):
|
|
66
|
+
return self._expires_in.value
|
|
67
|
+
|
|
68
|
+
@expires_in.setter
|
|
69
|
+
def expires_in(self, value):
|
|
70
|
+
self._expires_in.value = value
|
|
71
|
+
|
|
72
|
+
@property
|
|
73
|
+
def refresh_token(self):
|
|
74
|
+
return self._refresh_token.value
|
|
75
|
+
|
|
76
|
+
@refresh_token.setter
|
|
77
|
+
def refresh_token(self, value):
|
|
78
|
+
self._refresh_token.value = value
|
|
79
|
+
|
|
80
|
+
@property
|
|
81
|
+
def token_type(self):
|
|
82
|
+
return self._token_type.value
|
|
83
|
+
|
|
84
|
+
@token_type.setter
|
|
85
|
+
def token_type(self, value):
|
|
86
|
+
self._token_type.value = value
|
|
87
|
+
|
|
88
|
+
def to_dict(self):
|
|
89
|
+
return serialize(self)
|
|
90
|
+
|
|
91
|
+
def to_json(self):
|
|
92
|
+
return json.dumps(self.to_dict())
|
|
93
|
+
|
|
94
|
+
def __str__(self):
|
|
95
|
+
return self.to_json()
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
# pylint: disable=C0111,R0902,R0904,R0912,R0913,R0915,E1101
|
|
2
|
+
# Smartsheet Python SDK.
|
|
3
|
+
#
|
|
4
|
+
# Copyright 2018 Smartsheet.com, Inc.
|
|
5
|
+
#
|
|
6
|
+
# Licensed under the Apache License, Version 2.0 (the "License"): you may
|
|
7
|
+
# not use this file except in compliance with the License. You may obtain
|
|
8
|
+
# a copy of the License at
|
|
9
|
+
#
|
|
10
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
|
11
|
+
#
|
|
12
|
+
# Unless required by applicable law or agreed to in writing, software
|
|
13
|
+
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
|
14
|
+
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
|
15
|
+
# License for the specific language governing permissions and limitations
|
|
16
|
+
# under the License.
|
|
17
|
+
|
|
18
|
+
from __future__ import absolute_import
|
|
19
|
+
|
|
20
|
+
from ..types import Number, String, json
|
|
21
|
+
from ..util import deserialize, serialize
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
class Account:
|
|
25
|
+
|
|
26
|
+
"""Smartsheet Account data model."""
|
|
27
|
+
|
|
28
|
+
def __init__(self, props=None, base_obj=None):
|
|
29
|
+
"""Initialize the Account model."""
|
|
30
|
+
self._base = None
|
|
31
|
+
if base_obj is not None:
|
|
32
|
+
self._base = base_obj
|
|
33
|
+
|
|
34
|
+
self._id_ = Number()
|
|
35
|
+
self._name = String()
|
|
36
|
+
|
|
37
|
+
if props:
|
|
38
|
+
deserialize(self, props)
|
|
39
|
+
|
|
40
|
+
self.__initialized = True
|
|
41
|
+
|
|
42
|
+
def __getattr__(self, key):
|
|
43
|
+
if key == "id":
|
|
44
|
+
return self.id_
|
|
45
|
+
else:
|
|
46
|
+
raise AttributeError(key)
|
|
47
|
+
|
|
48
|
+
def __setattr__(self, key, value):
|
|
49
|
+
if key == "id":
|
|
50
|
+
self.id_ = value
|
|
51
|
+
else:
|
|
52
|
+
super().__setattr__(key, value)
|
|
53
|
+
|
|
54
|
+
@property
|
|
55
|
+
def id_(self):
|
|
56
|
+
return self._id_.value
|
|
57
|
+
|
|
58
|
+
@id_.setter
|
|
59
|
+
def id_(self, value):
|
|
60
|
+
self._id_.value = value
|
|
61
|
+
|
|
62
|
+
@property
|
|
63
|
+
def name(self):
|
|
64
|
+
return self._name.value
|
|
65
|
+
|
|
66
|
+
@name.setter
|
|
67
|
+
def name(self, value):
|
|
68
|
+
self._name.value = value
|
|
69
|
+
|
|
70
|
+
def to_dict(self):
|
|
71
|
+
return serialize(self)
|
|
72
|
+
|
|
73
|
+
def to_json(self):
|
|
74
|
+
return json.dumps(self.to_dict())
|
|
75
|
+
|
|
76
|
+
def __str__(self):
|
|
77
|
+
return self.to_json()
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
# pylint: disable=C0111,R0902,R0904,R0912,R0913,R0915,E1101
|
|
2
|
+
# Smartsheet Python SDK.
|
|
3
|
+
#
|
|
4
|
+
# Copyright 2018 Smartsheet.com, Inc.
|
|
5
|
+
#
|
|
6
|
+
# Licensed under the Apache License, Version 2.0 (the "License"): you may
|
|
7
|
+
# not use this file except in compliance with the License. You may obtain
|
|
8
|
+
# a copy of the License at
|
|
9
|
+
#
|
|
10
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
|
11
|
+
#
|
|
12
|
+
# Unless required by applicable law or agreed to in writing, software
|
|
13
|
+
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
|
14
|
+
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
|
15
|
+
# License for the specific language governing permissions and limitations
|
|
16
|
+
# under the License.
|
|
17
|
+
|
|
18
|
+
from __future__ import absolute_import
|
|
19
|
+
|
|
20
|
+
from ..types import Boolean, Number, String, json
|
|
21
|
+
from ..util import deserialize, serialize
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
class AlternateEmail:
|
|
25
|
+
|
|
26
|
+
"""Smartsheet AlternateEmail data model."""
|
|
27
|
+
|
|
28
|
+
def __init__(self, props=None, base_obj=None):
|
|
29
|
+
"""Initialize the AlternateEmail model."""
|
|
30
|
+
self._base = None
|
|
31
|
+
if base_obj is not None:
|
|
32
|
+
self._base = base_obj
|
|
33
|
+
|
|
34
|
+
self._confirmed = Boolean()
|
|
35
|
+
self._email = String()
|
|
36
|
+
self._id_ = Number()
|
|
37
|
+
|
|
38
|
+
if props:
|
|
39
|
+
deserialize(self, props)
|
|
40
|
+
|
|
41
|
+
# requests package Response object
|
|
42
|
+
self.request_response = None
|
|
43
|
+
self.__initialized = True
|
|
44
|
+
|
|
45
|
+
def __getattr__(self, key):
|
|
46
|
+
if key == "id":
|
|
47
|
+
return self.id_
|
|
48
|
+
else:
|
|
49
|
+
raise AttributeError(key)
|
|
50
|
+
|
|
51
|
+
def __setattr__(self, key, value):
|
|
52
|
+
if key == "id":
|
|
53
|
+
self.id_ = value
|
|
54
|
+
else:
|
|
55
|
+
super().__setattr__(key, value)
|
|
56
|
+
|
|
57
|
+
@property
|
|
58
|
+
def confirmed(self):
|
|
59
|
+
return self._confirmed.value
|
|
60
|
+
|
|
61
|
+
@confirmed.setter
|
|
62
|
+
def confirmed(self, value):
|
|
63
|
+
self._confirmed.value = value
|
|
64
|
+
|
|
65
|
+
@property
|
|
66
|
+
def email(self):
|
|
67
|
+
return self._email.value
|
|
68
|
+
|
|
69
|
+
@email.setter
|
|
70
|
+
def email(self, value):
|
|
71
|
+
self._email.value = value
|
|
72
|
+
|
|
73
|
+
@property
|
|
74
|
+
def id_(self):
|
|
75
|
+
return self._id_.value
|
|
76
|
+
|
|
77
|
+
@id_.setter
|
|
78
|
+
def id_(self, value):
|
|
79
|
+
self._id_.value = value
|
|
80
|
+
|
|
81
|
+
def to_dict(self):
|
|
82
|
+
return serialize(self)
|
|
83
|
+
|
|
84
|
+
def to_json(self):
|
|
85
|
+
return json.dumps(self.to_dict())
|
|
86
|
+
|
|
87
|
+
def __str__(self):
|
|
88
|
+
return self.to_json()
|