Office365-REST-Python-Client 2.6.0__py3-none-any.whl → 2.6.2__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.
- {Office365_REST_Python_Client-2.6.0.dist-info → Office365_REST_Python_Client-2.6.2.dist-info}/METADATA +20 -29
- {Office365_REST_Python_Client-2.6.0.dist-info → Office365_REST_Python_Client-2.6.2.dist-info}/RECORD +233 -156
- office365/admin/people_settings.py +16 -0
- office365/admin/sharepoint_settings.py +50 -1
- office365/admin/sharing_capabilities.py +2 -0
- office365/communications/calls/participant.py +6 -0
- office365/communications/onlinemeetings/broadcast_settings.py +5 -0
- office365/communications/onlinemeetings/collection.py +29 -0
- office365/communications/onlinemeetings/online_meeting.py +1 -1
- office365/communications/onlinemeetings/recordings/call.py +5 -0
- office365/communications/onlinemeetings/restricted.py +5 -0
- office365/directory/applications/collection.py +11 -0
- office365/directory/audit/directory.py +31 -0
- office365/directory/audit/signins/signin.py +14 -0
- office365/directory/audit/target_resource.py +5 -0
- office365/directory/authentication/conditions/conditions.py +5 -1
- office365/directory/datapolicy/operation.py +39 -0
- office365/directory/directory.py +13 -0
- office365/directory/identitygovernance/accessreview/instance.py +29 -0
- office365/directory/identitygovernance/accessreview/stage.py +13 -0
- office365/directory/identitygovernance/accessreview/stages.py +11 -0
- office365/directory/identitygovernance/appconsent/request.py +9 -0
- office365/directory/identitygovernance/privilegedaccess/group.py +1 -1
- office365/directory/identitygovernance/privilegedaccess/schedule/__init__.py +0 -0
- office365/directory/identitygovernance/privilegedaccess/{group_assignment_schedule_instance.py → schedule/group_assignment_instance.py} +1 -1
- office365/directory/identitygovernance/privilegedaccess/schedule/schedule.py +6 -0
- office365/directory/insights/trending.py +25 -0
- office365/directory/licenses/assignment_state.py +5 -5
- office365/directory/licenses/details.py +6 -0
- office365/directory/permissions/scoped_role_membership.py +8 -0
- office365/directory/policies/applied_conditional_access.py +31 -0
- office365/directory/policies/feature_rollout.py +24 -0
- office365/directory/protection/information.py +73 -2
- office365/directory/protection/riskyusers/collection.py +1 -1
- office365/directory/protection/threatassessment/requests/__init__.py +0 -0
- office365/directory/protection/threatassessment/{email_file_request.py → requests/email_file.py} +9 -1
- office365/directory/protection/threatassessment/requests/file.py +10 -0
- office365/directory/protection/threatassessment/{mail_request.py → requests/mail.py} +1 -1
- office365/directory/protection/threatassessment/requests/url.py +9 -0
- office365/directory/rolemanagement/app_scope.py +14 -0
- office365/directory/rolemanagement/application.py +3 -2
- office365/directory/rolemanagement/role.py +15 -0
- office365/directory/rolemanagement/unifiedrole/__init__.py +0 -0
- office365/directory/rolemanagement/{unified_role_assignment.py → unifiedrole/assignment.py} +37 -1
- office365/directory/rolemanagement/{unified_role_definition.py → unifiedrole/definition.py} +6 -1
- office365/directory/security/alerts/file_security_state.py +5 -0
- office365/directory/security/attacksimulations/automation.py +8 -0
- office365/directory/security/attacksimulations/automation_run.py +8 -0
- office365/directory/security/attacksimulations/repeat_offender.py +7 -0
- office365/directory/security/attacksimulations/report.py +2 -2
- office365/directory/security/attacksimulations/user.py +5 -0
- office365/directory/security/incidents/incident.py +6 -1
- office365/directory/security/security.py +5 -0
- office365/directory/subscriptions/__init__.py +0 -0
- office365/directory/subscriptions/company.py +7 -0
- office365/directory/synchronization/progress.py +12 -0
- office365/directory/users/activities/activity.py +10 -1
- office365/directory/users/settings.py +51 -1
- office365/directory/users/storage.py +5 -0
- office365/directory/users/user.py +114 -3
- office365/entity_collection.py +21 -0
- office365/onedrive/contenttypes/collection.py +2 -0
- office365/onedrive/driveitems/driveItem.py +3 -2
- office365/onedrive/driveitems/publication_facet.py +6 -1
- office365/onedrive/filestorage/container.py +22 -0
- office365/onedrive/filestorage/container_collection.py +37 -0
- office365/onedrive/filestorage/file_storage.py +4 -4
- office365/onedrive/listitems/collection.py +38 -0
- office365/onedrive/lists/list.py +3 -5
- office365/onedrive/sitepages/base.py +8 -0
- office365/onedrive/sitepages/collection.py +8 -2
- office365/onedrive/sitepages/site_page.py +13 -2
- office365/onedrive/sites/site.py +1 -1
- office365/onedrive/workbooks/charts/title.py +12 -0
- office365/onedrive/workbooks/charts/title_format.py +5 -0
- office365/onedrive/workbooks/functions/functions.py +16 -0
- office365/onedrive/workbooks/ranges/border.py +30 -0
- office365/onedrive/workbooks/ranges/font.py +39 -0
- office365/onedrive/workbooks/ranges/range.py +6 -0
- office365/onedrive/workbooks/worksheets/protection_options.py +34 -5
- office365/outlook/calendar/events/event.py +57 -0
- office365/outlook/mail/automatic_replies_mailtips.py +20 -0
- office365/outlook/mail/folders/folder.py +3 -4
- office365/outlook/mail/messages/message.py +21 -4
- office365/outlook/mail/messages/rules/collection.py +26 -0
- office365/outlook/mail/tips/__init__.py +0 -0
- office365/outlook/mail/tips/error.py +5 -0
- office365/outlook/mail/tips/tips.py +41 -0
- office365/outlook/people/__init__.py +0 -0
- office365/outlook/people/profile_card_property.py +15 -0
- office365/outlook/person.py +7 -0
- office365/planner/category_descriptions.py +6 -0
- office365/planner/external_references.py +7 -0
- office365/planner/planner.py +4 -4
- office365/planner/plans/container.py +12 -0
- office365/planner/plans/details.py +31 -0
- office365/planner/tasks/collection.py +37 -0
- office365/planner/tasks/task.py +24 -0
- office365/planner/tasks/task_details.py +34 -1
- office365/planner/user_ids.py +8 -0
- office365/reports/internal/queries/create_report_query.py +12 -3
- office365/reports/root.py +61 -2
- office365/runtime/auth/authentication_context.py +10 -1
- office365/runtime/auth/providers/saml_token_provider.py +5 -13
- office365/runtime/auth/sts_profile.py +35 -18
- office365/runtime/client_object.py +1 -1
- office365/runtime/client_object_collection.py +3 -5
- office365/runtime/client_result.py +3 -3
- office365/runtime/client_runtime_context.py +2 -2
- office365/runtime/odata/json_format.py +14 -3
- office365/runtime/odata/request.py +1 -3
- office365/runtime/odata/v3/json_light_format.py +18 -0
- office365/runtime/odata/v4/json_format.py +19 -0
- office365/runtime/queries/client_query.py +13 -8
- office365/runtime/queries/create_entity.py +7 -5
- office365/runtime/queries/delete_entity.py +6 -2
- office365/runtime/queries/function.py +3 -4
- office365/runtime/queries/read_entity.py +3 -5
- office365/runtime/queries/service_operation.py +2 -7
- office365/search/acronyms/__init__.py +0 -0
- office365/search/answer.py +35 -0
- office365/search/bookmarks/__init__.py +0 -0
- office365/search/bookmarks/bookmark.py +7 -0
- office365/search/entity.py +81 -2
- office365/search/entity_type.py +6 -1
- office365/search/external/item.py +5 -0
- office365/search/identity_set.py +11 -0
- office365/search/qnas/__init__.py +0 -0
- office365/search/qnas/qna.py +9 -0
- office365/sharepoint/activities/client_response.py +2 -2
- office365/sharepoint/apps/launcher.py +9 -0
- office365/sharepoint/brandcenter/brand_center.py +26 -0
- office365/sharepoint/client_context.py +19 -1
- office365/sharepoint/compliance/preserve_document_submitter.py +5 -0
- office365/sharepoint/compliance/store_proxy.py +75 -0
- office365/sharepoint/convergence/migration_complete_state_api.py +9 -0
- office365/sharepoint/copilot/file_metadata.py +5 -0
- office365/sharepoint/fields/builtin_field_id.py +8 -0
- office365/sharepoint/files/collection.py +10 -0
- office365/sharepoint/files/file.py +24 -3
- office365/sharepoint/listitems/listitem.py +61 -3
- office365/sharepoint/lists/exporter.py +1 -0
- office365/sharepoint/lists/list.py +37 -3
- office365/sharepoint/migrationcenter/common/results/batch_creation.py +24 -0
- office365/sharepoint/migrationcenter/common/task.py +8 -0
- office365/sharepoint/migrationcenter/common/task_definition.py +7 -1
- office365/sharepoint/migrationcenter/common/teams/__init__.py +0 -0
- office365/sharepoint/migrationcenter/common/teams/channel_resource.py +5 -0
- office365/sharepoint/migrationcenter/common/teams/team_resource.py +5 -0
- office365/sharepoint/migrationcenter/common/url_parser.py +39 -0
- office365/sharepoint/migrationcenter/service/services.py +13 -1
- office365/sharepoint/migrationcenter/service/teams.py +11 -0
- office365/sharepoint/navigation/node.py +7 -16
- office365/sharepoint/policy/license_utilities.py +1 -0
- office365/sharepoint/portal/groups/creation_context.py +11 -0
- office365/sharepoint/portal/groups/service.py +1 -1
- office365/sharepoint/portal/groups/site_manager.py +1 -1
- office365/sharepoint/publishing/pages/3d/__init__.py +0 -0
- office365/sharepoint/publishing/pages/3d/types.py +5 -0
- office365/sharepoint/publishing/pages/campaign/__init__.py +0 -0
- office365/sharepoint/publishing/pages/{campaign_publication.py → campaign/publication.py} +2 -0
- office365/sharepoint/publishing/pages/campaign/types.py +18 -0
- office365/sharepoint/publishing/pages/coauth_state.py +20 -0
- office365/sharepoint/publishing/pages/dependency_metadata.py +9 -0
- office365/sharepoint/publishing/pages/metadata.py +0 -10
- office365/sharepoint/publishing/pages/page.py +29 -0
- office365/sharepoint/publishing/pages/service.py +27 -6
- office365/sharepoint/publishing/pages/topics/collection.py +1 -1
- office365/sharepoint/request.py +6 -2
- office365/sharepoint/search/administration/tenant_crawl_versions_info_provider.py +16 -0
- office365/sharepoint/sharing/access_request_settings.py +18 -0
- office365/sharepoint/sharing/address_bar_link_settings.py +5 -0
- office365/sharepoint/sharing/information.py +2 -0
- office365/sharepoint/sharing/links/partial_success_response.py +4 -0
- office365/sharepoint/sites/azure_container_Info.py +4 -1
- office365/sharepoint/sites/brand_center_configuration.py +5 -0
- office365/sharepoint/sites/manager/__init__.py +0 -0
- office365/sharepoint/sites/manager/service.py +34 -0
- office365/sharepoint/sites/manager/types.py +5 -0
- office365/sharepoint/sites/site.py +54 -0
- office365/sharepoint/sites/themes.py +5 -0
- office365/sharepoint/storagemetrics/storage_metrics.py +18 -0
- office365/sharepoint/tenant/administration/copilot/agentinsights/__init__.py +0 -0
- office365/sharepoint/tenant/administration/copilot/agentinsights/client.py +42 -0
- office365/sharepoint/tenant/administration/copilot/agentinsights/report_metadata.py +5 -0
- office365/sharepoint/tenant/administration/group.py +34 -0
- office365/sharepoint/tenant/administration/policies/file_version_types.py +17 -0
- office365/sharepoint/tenant/administration/policies/list_parameters.py +9 -0
- office365/sharepoint/tenant/administration/policies/resource_storage.py +9 -0
- office365/sharepoint/tenant/administration/sites/properties_enumerable_filter.py +6 -0
- office365/sharepoint/tenant/administration/tenant.py +182 -5
- office365/sharepoint/userprofiles/people_manager.py +3 -1
- office365/sharepoint/utilities/utility.py +16 -0
- office365/sharepoint/webparts/definition.py +26 -0
- office365/sharepoint/webparts/limited_manager.py +53 -0
- office365/sharepoint/webparts/webpart.py +47 -0
- office365/sharepoint/webs/regional_settings.py +27 -0
- office365/sharepoint/webs/web.py +20 -1
- office365/teams/apps/app.py +17 -0
- office365/teams/apps/authorization.py +16 -0
- office365/teams/apps/permission_set.py +14 -0
- office365/teams/apps/resource_specific_permission.py +5 -0
- office365/teams/chats/chat.py +60 -0
- office365/teams/chats/messages/message.py +17 -0
- office365/teams/chats/type.py +13 -0
- office365/teams/chats/viewpoint.py +5 -0
- office365/teams/fun_settings.py +14 -2
- office365/teams/info.py +1 -1
- office365/teams/schedule/entity.py +3 -0
- office365/teams/schedule/shifts/item.py +1 -0
- office365/teams/schedule/shifts/offer/request.py +41 -1
- office365/teams/teamwork/activity_topic.py +5 -0
- office365/teams/teamwork/online_meeting_info.py +21 -0
- office365/teams/teamwork/shiftmanagement/__init__.py +0 -0
- office365/teams/teamwork/shiftmanagement/user_solution_root.py +5 -0
- office365/teams/teamwork/user.py +48 -1
- office365/teams/teamwork/user_identity.py +5 -0
- office365/teams/viva/community.py +13 -0
- office365/teams/viva/employee_experience.py +27 -0
- office365/teams/viva/employee_experience_user.py +16 -0
- office365/teams/viva/learning/courses/self_initiated.py +5 -0
- office365/todo/attachments/task_file.py +3 -0
- office365/todo/checklist_item.py +11 -0
- office365/todo/tasks/list.py +11 -0
- office365/todo/tasks/task.py +31 -0
- office365/outlook/mail/tips.py +0 -17
- {Office365_REST_Python_Client-2.6.0.dist-info → Office365_REST_Python_Client-2.6.2.dist-info}/LICENSE +0 -0
- {Office365_REST_Python_Client-2.6.0.dist-info → Office365_REST_Python_Client-2.6.2.dist-info}/WHEEL +0 -0
- {Office365_REST_Python_Client-2.6.0.dist-info → Office365_REST_Python_Client-2.6.2.dist-info}/top_level.txt +0 -0
- /office365/directory/identitygovernance/privilegedaccess/{schedule_instance.py → schedule/instance.py} +0 -0
- /office365/directory/protection/threatassessment/{request.py → requests/request.py} +0 -0
- /office365/directory/rolemanagement/{unified_role_permission.py → unifiedrole/permission.py} +0 -0
- /office365/search/{acronym.py → acronyms/acronym.py} +0 -0
- /office365/sharepoint/publishing/pages/{page_3d.py → 3d/page.py} +0 -0
|
@@ -2,6 +2,8 @@ import json
|
|
|
2
2
|
from datetime import datetime
|
|
3
3
|
from typing import List, Optional
|
|
4
4
|
|
|
5
|
+
from typing_extensions import Self
|
|
6
|
+
|
|
5
7
|
from office365.communications.onlinemeetings.collection import OnlineMeetingCollection
|
|
6
8
|
from office365.communications.presences.presence import Presence
|
|
7
9
|
from office365.delta_collection import DeltaCollection
|
|
@@ -12,6 +14,9 @@ from office365.directory.audit.signins.activity import SignInActivity
|
|
|
12
14
|
from office365.directory.authentication.authentication import Authentication
|
|
13
15
|
from office365.directory.extensions.extension import Extension
|
|
14
16
|
from office365.directory.identities.object_identity import ObjectIdentity
|
|
17
|
+
from office365.directory.identitygovernance.termsofuse.agreement_acceptance import (
|
|
18
|
+
AgreementAcceptance,
|
|
19
|
+
)
|
|
15
20
|
from office365.directory.insights.office_graph import OfficeGraphInsights
|
|
16
21
|
from office365.directory.licenses.assigned_license import AssignedLicense
|
|
17
22
|
from office365.directory.licenses.assigned_plan import AssignedPlan
|
|
@@ -36,6 +41,7 @@ from office365.onedrive.sites.site import Site
|
|
|
36
41
|
from office365.onenote.onenote import Onenote
|
|
37
42
|
from office365.outlook.calendar.attendees.base import AttendeeBase
|
|
38
43
|
from office365.outlook.calendar.calendar import Calendar
|
|
44
|
+
from office365.outlook.calendar.dateTimeTimeZone import DateTimeTimeZone
|
|
39
45
|
from office365.outlook.calendar.events.event import Event
|
|
40
46
|
from office365.outlook.calendar.events.reminder import Reminder
|
|
41
47
|
from office365.outlook.calendar.group import CalendarGroup
|
|
@@ -51,7 +57,8 @@ from office365.outlook.mail.mailbox_settings import MailboxSettings
|
|
|
51
57
|
from office365.outlook.mail.messages.collection import MessageCollection
|
|
52
58
|
from office365.outlook.mail.messages.message import Message
|
|
53
59
|
from office365.outlook.mail.recipient import Recipient
|
|
54
|
-
from office365.outlook.mail.tips import MailTips
|
|
60
|
+
from office365.outlook.mail.tips.tips import MailTips
|
|
61
|
+
from office365.outlook.person import Person
|
|
55
62
|
from office365.outlook.user import OutlookUser
|
|
56
63
|
from office365.planner.user import PlannerUser
|
|
57
64
|
from office365.runtime.client_result import ClientResult
|
|
@@ -66,6 +73,7 @@ from office365.runtime.queries.service_operation import ServiceOperationQuery
|
|
|
66
73
|
from office365.runtime.types.collections import StringCollection
|
|
67
74
|
from office365.teams.chats.collection import ChatCollection
|
|
68
75
|
from office365.teams.collection import TeamCollection
|
|
76
|
+
from office365.teams.teamwork.shiftmanagement.user_solution_root import UserSolutionRoot
|
|
69
77
|
from office365.teams.teamwork.user import UserTeamwork
|
|
70
78
|
from office365.teams.viva.employee_experience_user import EmployeeExperienceUser
|
|
71
79
|
from office365.todo.todo import Todo
|
|
@@ -77,6 +85,60 @@ class User(DirectoryObject):
|
|
|
77
85
|
def __repr__(self):
|
|
78
86
|
return self.user_principal_name or self.id or self.entity_type_name
|
|
79
87
|
|
|
88
|
+
def enable_automatic_replies_setting(
|
|
89
|
+
self,
|
|
90
|
+
status,
|
|
91
|
+
scheduled_start_datetime,
|
|
92
|
+
scheduled_end_datetime,
|
|
93
|
+
internal_reply_message=None,
|
|
94
|
+
external_reply_message=None,
|
|
95
|
+
):
|
|
96
|
+
# type: (str, datetime, datetime, str, str) -> Self
|
|
97
|
+
"""
|
|
98
|
+
Enable, configure, automatic replies (notify people automatically upon receipt of their email)
|
|
99
|
+
|
|
100
|
+
"""
|
|
101
|
+
from office365.outlook.mail.automatic_replies_setting import (
|
|
102
|
+
AutomaticRepliesSetting,
|
|
103
|
+
)
|
|
104
|
+
|
|
105
|
+
setting = AutomaticRepliesSetting(
|
|
106
|
+
status=status,
|
|
107
|
+
scheduled_start_datetime=DateTimeTimeZone.parse(scheduled_start_datetime),
|
|
108
|
+
scheduled_end_datetime=DateTimeTimeZone.parse(scheduled_end_datetime),
|
|
109
|
+
internal_reply_message=internal_reply_message,
|
|
110
|
+
external_reply_message=external_reply_message,
|
|
111
|
+
)
|
|
112
|
+
|
|
113
|
+
def _construct_request(request):
|
|
114
|
+
payload = {"automaticRepliesSetting": setting.to_json()}
|
|
115
|
+
request.data = payload
|
|
116
|
+
request.url += "/mailboxSettings"
|
|
117
|
+
|
|
118
|
+
self.update().before_execute(_construct_request)
|
|
119
|
+
return self
|
|
120
|
+
|
|
121
|
+
def disable_automatic_replies_setting(self, clear_all=False):
|
|
122
|
+
"""
|
|
123
|
+
Disable automatic replies (notify people automatically upon receipt of their email)
|
|
124
|
+
:param bool clear_all: If true, clear all automatic replies settings
|
|
125
|
+
"""
|
|
126
|
+
from office365.outlook.mail.automatic_replies_setting import (
|
|
127
|
+
AutomaticRepliesSetting,
|
|
128
|
+
)
|
|
129
|
+
|
|
130
|
+
setting = AutomaticRepliesSetting(
|
|
131
|
+
status="disabled",
|
|
132
|
+
)
|
|
133
|
+
|
|
134
|
+
def _construct_request(request):
|
|
135
|
+
payload = {"automaticRepliesSetting": setting.to_json()}
|
|
136
|
+
request.data = payload
|
|
137
|
+
request.url += "/mailboxSettings"
|
|
138
|
+
|
|
139
|
+
self.update().before_execute(_construct_request)
|
|
140
|
+
return self
|
|
141
|
+
|
|
80
142
|
def add_extension(self, name):
|
|
81
143
|
"""
|
|
82
144
|
Creates an open extension (openTypeExtension object) and add custom properties in a new or existing instance
|
|
@@ -210,9 +272,11 @@ class User(DirectoryObject):
|
|
|
210
272
|
to_recipients,
|
|
211
273
|
cc_recipients=None,
|
|
212
274
|
bcc_recipients=None,
|
|
275
|
+
reply_to=None,
|
|
213
276
|
save_to_sent_items=False,
|
|
277
|
+
body_type="Text",
|
|
214
278
|
):
|
|
215
|
-
# type: (str, str|ItemBody, List[str], List[str], List[str], bool) -> Message
|
|
279
|
+
# type: (str, str|ItemBody, List[str], List[str]|None, List[str]|None, List[str]|None, bool, str) -> Message
|
|
216
280
|
"""Send a new message on the fly
|
|
217
281
|
|
|
218
282
|
:param str subject: The subject of the message.
|
|
@@ -220,12 +284,14 @@ class User(DirectoryObject):
|
|
|
220
284
|
:param list[str] to_recipients: The To: recipients for the message.
|
|
221
285
|
:param list[str] cc_recipients: The CC: recipients for the message.
|
|
222
286
|
:param list[str] bcc_recipients: The BCC: recipients for the message.
|
|
287
|
+
:param list[str] reply_to: The Reply-To: : recipients for the reply to the message.
|
|
223
288
|
:param bool save_to_sent_items: Indicates whether to save the message in Sent Items. Specify it only if
|
|
224
289
|
the parameter is false; default is true
|
|
290
|
+
:param str body_type: The type of the message body. It can be "HTML" or "Text". Default is "Text".
|
|
225
291
|
"""
|
|
226
292
|
return_type = Message(self.context)
|
|
227
293
|
return_type.subject = subject
|
|
228
|
-
return_type.body = body
|
|
294
|
+
return_type.body = (body, body_type)
|
|
229
295
|
[
|
|
230
296
|
return_type.to_recipients.add(Recipient.from_email(email))
|
|
231
297
|
for email in to_recipients
|
|
@@ -240,6 +306,11 @@ class User(DirectoryObject):
|
|
|
240
306
|
return_type.cc_recipients.add(Recipient.from_email(email))
|
|
241
307
|
for email in cc_recipients
|
|
242
308
|
]
|
|
309
|
+
if reply_to is not None:
|
|
310
|
+
[
|
|
311
|
+
return_type.reply_to.add(Recipient.from_email(email))
|
|
312
|
+
for email in reply_to
|
|
313
|
+
]
|
|
243
314
|
|
|
244
315
|
payload = {"message": return_type, "saveToSentItems": save_to_sent_items}
|
|
245
316
|
qry = ServiceOperationQuery(self, "sendmail", None, payload)
|
|
@@ -727,6 +798,10 @@ class User(DirectoryObject):
|
|
|
727
798
|
"""Get the user's mailboxSettings."""
|
|
728
799
|
return self.properties.get("mailboxSettings", MailboxSettings())
|
|
729
800
|
|
|
801
|
+
@mailbox_settings.setter
|
|
802
|
+
def mailbox_settings(self, value):
|
|
803
|
+
self.set_property("mailboxSettings", value)
|
|
804
|
+
|
|
730
805
|
@property
|
|
731
806
|
def calendar(self):
|
|
732
807
|
# type: () -> Calendar
|
|
@@ -964,6 +1039,17 @@ class User(DirectoryObject):
|
|
|
964
1039
|
OutlookUser(self.context, ResourcePath("outlook", self.resource_path)),
|
|
965
1040
|
)
|
|
966
1041
|
|
|
1042
|
+
@property
|
|
1043
|
+
def people(self):
|
|
1044
|
+
# type: () -> EntityCollection[Person]
|
|
1045
|
+
"""People that are relevant to the user. Read-only. Nullable."""
|
|
1046
|
+
return self.properties.get(
|
|
1047
|
+
"people",
|
|
1048
|
+
EntityCollection(
|
|
1049
|
+
self.context, Person, ResourcePath("people", self.resource_path)
|
|
1050
|
+
),
|
|
1051
|
+
)
|
|
1052
|
+
|
|
967
1053
|
@property
|
|
968
1054
|
def onenote(self):
|
|
969
1055
|
# type: () -> Onenote
|
|
@@ -989,6 +1075,20 @@ class User(DirectoryObject):
|
|
|
989
1075
|
PlannerUser(self.context, ResourcePath("planner", self.resource_path)),
|
|
990
1076
|
)
|
|
991
1077
|
|
|
1078
|
+
@property
|
|
1079
|
+
def agreement_acceptances(self):
|
|
1080
|
+
"""
|
|
1081
|
+
The user's terms of use acceptance statuses
|
|
1082
|
+
"""
|
|
1083
|
+
return self.properties.get(
|
|
1084
|
+
"agreementAcceptances",
|
|
1085
|
+
EntityCollection(
|
|
1086
|
+
self.context,
|
|
1087
|
+
AgreementAcceptance,
|
|
1088
|
+
ResourcePath("agreementAcceptances", self.resource_path),
|
|
1089
|
+
),
|
|
1090
|
+
)
|
|
1091
|
+
|
|
992
1092
|
@property
|
|
993
1093
|
def extensions(self):
|
|
994
1094
|
# type: () -> EntityCollection[Extension]
|
|
@@ -1079,6 +1179,17 @@ class User(DirectoryObject):
|
|
|
1079
1179
|
UserTeamwork(self.context, ResourcePath("teamwork", self.resource_path)),
|
|
1080
1180
|
)
|
|
1081
1181
|
|
|
1182
|
+
@property
|
|
1183
|
+
def solutions(self):
|
|
1184
|
+
# type: () -> UserSolutionRoot
|
|
1185
|
+
"""The identifier that relates the user to the working time schedule triggers. Read-Only. Nullable."""
|
|
1186
|
+
return self.properties.get(
|
|
1187
|
+
"solutions",
|
|
1188
|
+
UserSolutionRoot(
|
|
1189
|
+
self.context, ResourcePath("solutions", self.resource_path)
|
|
1190
|
+
),
|
|
1191
|
+
)
|
|
1192
|
+
|
|
1082
1193
|
@property
|
|
1083
1194
|
def todo(self):
|
|
1084
1195
|
# type: () -> Todo
|
office365/entity_collection.py
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
from typing import TYPE_CHECKING, Any, Optional, Type, TypeVar
|
|
2
2
|
|
|
3
|
+
from typing_extensions import Self
|
|
4
|
+
|
|
3
5
|
from office365.entity import Entity
|
|
4
6
|
from office365.runtime.client_object_collection import ClientObjectCollection
|
|
5
7
|
from office365.runtime.compat import is_string_type
|
|
@@ -21,6 +23,17 @@ class EntityCollection(ClientObjectCollection[T]):
|
|
|
21
23
|
super(EntityCollection, self).__init__(
|
|
22
24
|
context, item_type, resource_path, parent
|
|
23
25
|
)
|
|
26
|
+
self._delta_request_url = None
|
|
27
|
+
|
|
28
|
+
def token(self, value):
|
|
29
|
+
"""
|
|
30
|
+
Apply delta query
|
|
31
|
+
|
|
32
|
+
:param str value: If unspecified, enumerates the hierarchy's current state. If latest, returns empty
|
|
33
|
+
response with latest delta token. If a previous delta token, returns new state since that token.
|
|
34
|
+
"""
|
|
35
|
+
self.query_options.custom["token"] = value
|
|
36
|
+
return self
|
|
24
37
|
|
|
25
38
|
def __getitem__(self, key):
|
|
26
39
|
# type: (int | str) -> T
|
|
@@ -58,6 +71,14 @@ class EntityCollection(ClientObjectCollection[T]):
|
|
|
58
71
|
initial_properties, resource_path
|
|
59
72
|
)
|
|
60
73
|
|
|
74
|
+
def set_property(self, key, value, persist_changes=False):
|
|
75
|
+
# type: (str | int, dict, bool) -> Self
|
|
76
|
+
if key == self.context.pending_request().json_format.collection_delta:
|
|
77
|
+
self._delta_request_url = value
|
|
78
|
+
else:
|
|
79
|
+
super(EntityCollection, self).set_property(key, value, persist_changes)
|
|
80
|
+
return self
|
|
81
|
+
|
|
61
82
|
@property
|
|
62
83
|
def context(self):
|
|
63
84
|
# type: () -> GraphClient
|
|
@@ -6,6 +6,8 @@ from office365.runtime.queries.service_operation import ServiceOperationQuery
|
|
|
6
6
|
|
|
7
7
|
|
|
8
8
|
class ContentTypeCollection(EntityCollection[ContentType]):
|
|
9
|
+
"""Content type collection"""
|
|
10
|
+
|
|
9
11
|
def __init__(self, context, resource_path):
|
|
10
12
|
super(ContentTypeCollection, self).__init__(context, ContentType, resource_path)
|
|
11
13
|
|
|
@@ -449,8 +449,9 @@ class DriveItem(BaseItem):
|
|
|
449
449
|
chunk_downloaded(bytes_read)
|
|
450
450
|
file_object.write(chunk)
|
|
451
451
|
|
|
452
|
-
self.get_content().before_execute(_construct_request)
|
|
453
|
-
|
|
452
|
+
self.get_content().before_execute(_construct_request).after_execute(
|
|
453
|
+
_process_response, include_response=True
|
|
454
|
+
)
|
|
454
455
|
return self
|
|
455
456
|
|
|
456
457
|
def create_folder(self, name, conflict_behavior=ConflictBehavior.Rename):
|
|
@@ -1,8 +1,12 @@
|
|
|
1
|
+
from office365.directory.permissions.identity_set import IdentitySet
|
|
1
2
|
from office365.runtime.client_value import ClientValue
|
|
2
3
|
|
|
3
4
|
|
|
4
5
|
class PublicationFacet(ClientValue):
|
|
5
|
-
|
|
6
|
+
"""The publicationFacet resource provides details on the published status of a driveItemVersion or driveItem
|
|
7
|
+
resource."""
|
|
8
|
+
|
|
9
|
+
def __init__(self, checked_out_by=IdentitySet(), level=None, version_id=None):
|
|
6
10
|
"""
|
|
7
11
|
The publicationFacet resource provides details on the published status of a driveItemVersion
|
|
8
12
|
or driveItem resource.
|
|
@@ -11,5 +15,6 @@ class PublicationFacet(ClientValue):
|
|
|
11
15
|
:param str version_id: The unique identifier for the version that is visible to the current caller. Read-only.
|
|
12
16
|
"""
|
|
13
17
|
super(PublicationFacet, self).__init__()
|
|
18
|
+
self.checkedOutBy = checked_out_by
|
|
14
19
|
self.level = level
|
|
15
20
|
self.versionId = version_id
|
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
from datetime import datetime
|
|
2
|
+
from typing import Optional
|
|
3
|
+
|
|
1
4
|
from office365.entity import Entity
|
|
2
5
|
|
|
3
6
|
|
|
@@ -5,3 +8,22 @@ class FileStorageContainer(Entity):
|
|
|
5
8
|
"""Represents a location where multiple users or a group of users can store files and access them
|
|
6
9
|
via an application. All file system objects in a fileStorageContainer are returned as driveItem resources.
|
|
7
10
|
"""
|
|
11
|
+
|
|
12
|
+
@property
|
|
13
|
+
def created_datetime(self):
|
|
14
|
+
# type: () -> Optional[datetime]
|
|
15
|
+
"""Date and time of the fileStorageContainer creation. Read-only."""
|
|
16
|
+
return self.properties.get("createdDateTime", datetime.min)
|
|
17
|
+
|
|
18
|
+
@property
|
|
19
|
+
def entity_type_name(self):
|
|
20
|
+
# type: () -> str
|
|
21
|
+
return "graph.fileStorageContainer"
|
|
22
|
+
|
|
23
|
+
def get_property(self, name, default_value=None):
|
|
24
|
+
if default_value is None:
|
|
25
|
+
property_mapping = {
|
|
26
|
+
"createdDateTime": self.created_datetime,
|
|
27
|
+
}
|
|
28
|
+
default_value = property_mapping.get(name, None)
|
|
29
|
+
return super(FileStorageContainer, self).get_property(name, default_value)
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import uuid
|
|
2
|
+
|
|
3
|
+
from office365.entity_collection import EntityCollection
|
|
4
|
+
from office365.onedrive.filestorage.container import FileStorageContainer
|
|
5
|
+
from office365.runtime.queries.create_entity import CreateEntityQuery
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
class FileStorageContainerCollection(EntityCollection[FileStorageContainer]):
|
|
9
|
+
"""FileStorageContainer collection"""
|
|
10
|
+
|
|
11
|
+
def __init__(self, context, resource_path=None):
|
|
12
|
+
super(FileStorageContainerCollection, self).__init__(
|
|
13
|
+
context, FileStorageContainer, resource_path
|
|
14
|
+
)
|
|
15
|
+
|
|
16
|
+
def add(self, display_name, container_type_id=uuid.uuid4()):
|
|
17
|
+
"""
|
|
18
|
+
Create a new fileStorageContainer object.
|
|
19
|
+
|
|
20
|
+
The container type identified by containerTypeId must be registered in the tenant.
|
|
21
|
+
|
|
22
|
+
For delegated calls, the calling user is set as the owner of the fileStorageContainer.
|
|
23
|
+
|
|
24
|
+
This API is available in the following national cloud deployments.
|
|
25
|
+
|
|
26
|
+
:param str display_name: The display name of the container.
|
|
27
|
+
:param str container_type_id: The identifier of the container type.
|
|
28
|
+
"""
|
|
29
|
+
return_type = FileStorageContainer(self.context)
|
|
30
|
+
self.add_child(return_type)
|
|
31
|
+
payload = {
|
|
32
|
+
"displayName": display_name,
|
|
33
|
+
"containerTypeId": str(container_type_id),
|
|
34
|
+
}
|
|
35
|
+
qry = CreateEntityQuery(self, payload, return_type)
|
|
36
|
+
self.context.add_query(qry)
|
|
37
|
+
return return_type
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
from office365.entity import Entity
|
|
2
|
-
from office365.
|
|
3
|
-
|
|
2
|
+
from office365.onedrive.filestorage.container_collection import (
|
|
3
|
+
FileStorageContainerCollection,
|
|
4
|
+
)
|
|
4
5
|
from office365.runtime.paths.resource_path import ResourcePath
|
|
5
6
|
|
|
6
7
|
|
|
@@ -12,9 +13,8 @@ class FileStorage(Entity):
|
|
|
12
13
|
"""The collection of active fileStorageContainers"""
|
|
13
14
|
return self.properties.get(
|
|
14
15
|
"containers",
|
|
15
|
-
|
|
16
|
+
FileStorageContainerCollection(
|
|
16
17
|
self.context,
|
|
17
|
-
FileStorageContainer,
|
|
18
18
|
ResourcePath("containers", self.resource_path),
|
|
19
19
|
),
|
|
20
20
|
)
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
from office365.entity_collection import EntityCollection
|
|
2
|
+
from office365.onedrive.listitems.list_item import ListItem
|
|
3
|
+
from office365.runtime.http.request_options import RequestOptions
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
class ListItemCollection(EntityCollection[ListItem]):
|
|
7
|
+
"""List Item's collection"""
|
|
8
|
+
|
|
9
|
+
def __init__(self, context, resource_path):
|
|
10
|
+
super(ListItemCollection, self).__init__(context, ListItem, resource_path)
|
|
11
|
+
self._honor_nonindexed = True
|
|
12
|
+
|
|
13
|
+
def honor_nonindexed(self, value):
|
|
14
|
+
# type: (bool) -> "ListItemCollection"
|
|
15
|
+
"""Sets if true HonorNonIndexedQueriesWarningMayFailRandomly header
|
|
16
|
+
to allow non-indexed properties to be queried."""
|
|
17
|
+
self._honor_nonindexed = value
|
|
18
|
+
return self
|
|
19
|
+
|
|
20
|
+
def get(self):
|
|
21
|
+
"""Retrieve a list item"""
|
|
22
|
+
|
|
23
|
+
def _construct_request(request):
|
|
24
|
+
# type: (RequestOptions) -> None
|
|
25
|
+
if self._honor_nonindexed:
|
|
26
|
+
request.headers["Prefer"] = (
|
|
27
|
+
"HonorNonIndexedQueriesWarningMayFailRandomly"
|
|
28
|
+
)
|
|
29
|
+
|
|
30
|
+
return super(ListItemCollection, self).get().before_execute(_construct_request)
|
|
31
|
+
|
|
32
|
+
def get_by_name(self, name):
|
|
33
|
+
"""Retrieve a list item by name"""
|
|
34
|
+
return self.single("fields/FileLeafRef eq '{0}'".format(name))
|
|
35
|
+
|
|
36
|
+
def get_by_path(self, path):
|
|
37
|
+
"""Retrieve a list item by path"""
|
|
38
|
+
return self.single("fields/FileRef eq '{0}'".format(path))
|
office365/onedrive/lists/list.py
CHANGED
|
@@ -4,7 +4,7 @@ from office365.entity_collection import EntityCollection
|
|
|
4
4
|
from office365.onedrive.base_item import BaseItem
|
|
5
5
|
from office365.onedrive.columns.definition_collection import ColumnDefinitionCollection
|
|
6
6
|
from office365.onedrive.contenttypes.collection import ContentTypeCollection
|
|
7
|
-
from office365.onedrive.listitems.
|
|
7
|
+
from office365.onedrive.listitems.collection import ListItemCollection
|
|
8
8
|
from office365.onedrive.lists.info import ListInfo
|
|
9
9
|
from office365.onedrive.operations.rich_long_running import RichLongRunningOperation
|
|
10
10
|
from office365.onedrive.sharepoint_ids import SharePointIds
|
|
@@ -68,13 +68,11 @@ class List(BaseItem):
|
|
|
68
68
|
|
|
69
69
|
@property
|
|
70
70
|
def items(self):
|
|
71
|
-
# type: () ->
|
|
71
|
+
# type: () -> ListItemCollection
|
|
72
72
|
"""All items contained in the list."""
|
|
73
73
|
return self.properties.get(
|
|
74
74
|
"items",
|
|
75
|
-
|
|
76
|
-
self.context, ListItem, ResourcePath("items", self.resource_path)
|
|
77
|
-
),
|
|
75
|
+
ListItemCollection(self.context, ResourcePath("items", self.resource_path)),
|
|
78
76
|
)
|
|
79
77
|
|
|
80
78
|
@property
|
|
@@ -30,3 +30,11 @@ class BaseSitePage(BaseItem):
|
|
|
30
30
|
# type: () -> Optional[str]
|
|
31
31
|
"""Title of the sitePage."""
|
|
32
32
|
return self.properties.get("title", None)
|
|
33
|
+
|
|
34
|
+
def get_property(self, name, default_value=None):
|
|
35
|
+
if default_value is None:
|
|
36
|
+
property_mapping = {
|
|
37
|
+
"publishingState": self.publishing_state,
|
|
38
|
+
}
|
|
39
|
+
default_value = property_mapping.get(name, None)
|
|
40
|
+
return super(BaseSitePage, self).get_property(name, default_value)
|
|
@@ -19,13 +19,19 @@ class SitePageCollection(EntityCollection[SitePage]):
|
|
|
19
19
|
return super(SitePageCollection, self).get().before_execute(_construct_request)
|
|
20
20
|
|
|
21
21
|
def get_by_name(self, name):
|
|
22
|
+
"""Get a sitePage by name."""
|
|
22
23
|
return self.single("name eq '{0}'".format(name))
|
|
23
24
|
|
|
24
|
-
def
|
|
25
|
+
def get_by_title(self, title):
|
|
26
|
+
"""Get a sitePage by title."""
|
|
27
|
+
return self.single("title eq '{0}'".format(title))
|
|
28
|
+
|
|
29
|
+
def add(self, title, page_layout="article"):
|
|
25
30
|
"""
|
|
26
31
|
Create a new sitePage in the site pages list in a site.
|
|
27
32
|
|
|
28
33
|
:param str title:
|
|
34
|
+
:param str page_layout:
|
|
29
35
|
"""
|
|
30
36
|
|
|
31
37
|
def _construct_request(request):
|
|
@@ -37,7 +43,7 @@ class SitePageCollection(EntityCollection[SitePage]):
|
|
|
37
43
|
.add(
|
|
38
44
|
title=title,
|
|
39
45
|
name="{0}.aspx".format(title),
|
|
40
|
-
pageLayout=
|
|
46
|
+
pageLayout=page_layout,
|
|
41
47
|
titleArea=TitleArea(),
|
|
42
48
|
)
|
|
43
49
|
.before_execute(_construct_request)
|
|
@@ -15,7 +15,11 @@ class SitePage(BaseSitePage):
|
|
|
15
15
|
webParts."""
|
|
16
16
|
|
|
17
17
|
def get_web_parts_by_position(
|
|
18
|
-
self,
|
|
18
|
+
self,
|
|
19
|
+
web_part_index=None,
|
|
20
|
+
horizontal_section_id=None,
|
|
21
|
+
is_in_vertical_section=None,
|
|
22
|
+
column_id=None,
|
|
19
23
|
):
|
|
20
24
|
"""
|
|
21
25
|
Get a collection of webPart by providing webPartPosition information.
|
|
@@ -40,6 +44,13 @@ class SitePage(BaseSitePage):
|
|
|
40
44
|
self.context.add_query(qry)
|
|
41
45
|
return return_type
|
|
42
46
|
|
|
47
|
+
def checkin(self):
|
|
48
|
+
"""
|
|
49
|
+
Check in the latest version of a sitePage resource, which makes the version of the page available to all users.
|
|
50
|
+
If the page is checked out, check in the page and publish it. If the page is checked out to the caller
|
|
51
|
+
of this API, the page is automatically checked in and then published."""
|
|
52
|
+
return self
|
|
53
|
+
|
|
43
54
|
def publish(self):
|
|
44
55
|
"""
|
|
45
56
|
Publish the latest version of a sitePage resource, which makes the version of the page available to all users.
|
|
@@ -49,7 +60,7 @@ class SitePage(BaseSitePage):
|
|
|
49
60
|
If a page approval flow has been activated in the page library, the page is not published until the approval
|
|
50
61
|
flow is completed.
|
|
51
62
|
"""
|
|
52
|
-
qry = ServiceOperationQuery(self, "publish")
|
|
63
|
+
qry = ServiceOperationQuery(self, "microsoft.graph.sitePage/publish")
|
|
53
64
|
self.context.add_query(qry)
|
|
54
65
|
return self
|
|
55
66
|
|
office365/onedrive/sites/site.py
CHANGED
|
@@ -26,7 +26,7 @@ class Site(BaseItem):
|
|
|
26
26
|
"""The site resource provides metadata and relationships for a SharePoint site."""
|
|
27
27
|
|
|
28
28
|
def __str__(self):
|
|
29
|
-
return self.name
|
|
29
|
+
return self.name or self.entity_type_name
|
|
30
30
|
|
|
31
31
|
def __repr__(self):
|
|
32
32
|
return self.name or self.web_url or self.id or self.entity_type_name
|
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
from office365.entity import Entity
|
|
2
|
+
from office365.onedrive.workbooks.charts.title_format import WorkbookChartTitleFormat
|
|
3
|
+
from office365.runtime.paths.resource_path import ResourcePath
|
|
2
4
|
|
|
3
5
|
|
|
4
6
|
class WorkbookChartTitle(Entity):
|
|
5
7
|
"""Represents a chart title object of a chart."""
|
|
8
|
+
|
|
9
|
+
@property
|
|
10
|
+
def format(self):
|
|
11
|
+
"""The formatting of a chart title, which includes fill and font formatting."""
|
|
12
|
+
return self.properties.get(
|
|
13
|
+
"format",
|
|
14
|
+
WorkbookChartTitleFormat(
|
|
15
|
+
self.context, ResourcePath("format", self.resource_path)
|
|
16
|
+
),
|
|
17
|
+
)
|
|
@@ -82,3 +82,19 @@ class WorkbookFunctions(Entity):
|
|
|
82
82
|
qry = ServiceOperationQuery(self, "days", None, payload, None, return_type)
|
|
83
83
|
self.context.add_query(qry)
|
|
84
84
|
return return_type
|
|
85
|
+
|
|
86
|
+
def power(self, number, power):
|
|
87
|
+
"""
|
|
88
|
+
Returns the result of a number raised to a power.
|
|
89
|
+
|
|
90
|
+
:param int number: The base number.
|
|
91
|
+
:param int power: The exponent to which the base number is raised.
|
|
92
|
+
"""
|
|
93
|
+
return_type = WorkbookFunctionResult(self.context)
|
|
94
|
+
payload = {
|
|
95
|
+
"number": number,
|
|
96
|
+
"power": power,
|
|
97
|
+
}
|
|
98
|
+
qry = ServiceOperationQuery(self, "power", None, payload, None, return_type)
|
|
99
|
+
self.context.add_query(qry)
|
|
100
|
+
return return_type
|
|
@@ -1,5 +1,35 @@
|
|
|
1
|
+
from typing import Optional
|
|
2
|
+
|
|
1
3
|
from office365.entity import Entity
|
|
2
4
|
|
|
3
5
|
|
|
4
6
|
class WorkbookRangeBorder(Entity):
|
|
5
7
|
"""Represents the border of an object."""
|
|
8
|
+
|
|
9
|
+
@property
|
|
10
|
+
def color(self):
|
|
11
|
+
# type: () -> Optional[str]
|
|
12
|
+
"""The HTML color code that represents the color of the border line. Can either be of the form #RRGGBB,
|
|
13
|
+
for example "FFA500", or a named HTML color, for example orange."""
|
|
14
|
+
return self.properties.get("color", None)
|
|
15
|
+
|
|
16
|
+
@property
|
|
17
|
+
def side_index(self):
|
|
18
|
+
# type: () -> Optional[str]
|
|
19
|
+
"""Indicates the specific side of the border.
|
|
20
|
+
The possible values are: EdgeTop, EdgeBottom, EdgeLeft, EdgeRight, InsideVertical, InsideHorizontal,
|
|
21
|
+
DiagonalDown, DiagonalUp. Read-only."""
|
|
22
|
+
return self.properties.get("sideIndex", None)
|
|
23
|
+
|
|
24
|
+
@property
|
|
25
|
+
def style(self):
|
|
26
|
+
# type: () -> Optional[str]
|
|
27
|
+
"""Indicates the line style for the border. The possible values are: None, Continuous, Dash, DashDot,
|
|
28
|
+
DashDotDot, Dot, Double, SlantDashDot."""
|
|
29
|
+
return self.properties.get("style", None)
|
|
30
|
+
|
|
31
|
+
@property
|
|
32
|
+
def weight(self):
|
|
33
|
+
# type: () -> Optional[str]
|
|
34
|
+
"""The weight of the border around a range. The possible values are: Hairline, Thin, Medium, Thick."""
|
|
35
|
+
return self.properties.get("weight", None)
|
|
@@ -1,5 +1,44 @@
|
|
|
1
|
+
from typing import Optional
|
|
2
|
+
|
|
1
3
|
from office365.entity import Entity
|
|
2
4
|
|
|
3
5
|
|
|
4
6
|
class WorkbookRangeFont(Entity):
|
|
5
7
|
"""This object represents the font attributes (font name, font size, color, etc.) for an object."""
|
|
8
|
+
|
|
9
|
+
@property
|
|
10
|
+
def bold(self):
|
|
11
|
+
# type: () -> Optional[bool]
|
|
12
|
+
"""Inidicates whether the font is bold."""
|
|
13
|
+
return self.properties.get("bold", None)
|
|
14
|
+
|
|
15
|
+
@property
|
|
16
|
+
def color(self):
|
|
17
|
+
# type: () -> Optional[str]
|
|
18
|
+
"""The HTML color code representation of the text color. For example, #FF0000 represents the color red."""
|
|
19
|
+
return self.properties.get("color", None)
|
|
20
|
+
|
|
21
|
+
@property
|
|
22
|
+
def italic(self):
|
|
23
|
+
# type: () -> Optional[bool]
|
|
24
|
+
"""Inidicates whether the font is italic."""
|
|
25
|
+
return self.properties.get("italic", None)
|
|
26
|
+
|
|
27
|
+
@property
|
|
28
|
+
def name(self):
|
|
29
|
+
# type: () -> Optional[str]
|
|
30
|
+
"""The font name. For example, "Calibri"."""
|
|
31
|
+
return self.properties.get("name", None)
|
|
32
|
+
|
|
33
|
+
@property
|
|
34
|
+
def size(self):
|
|
35
|
+
# type: () -> Optional[float]
|
|
36
|
+
"""The font size."""
|
|
37
|
+
return self.properties.get("size", None)
|
|
38
|
+
|
|
39
|
+
@property
|
|
40
|
+
def underline(self):
|
|
41
|
+
# type: () -> Optional[bool]
|
|
42
|
+
"""The type of underlining applied to the font. The possible values are:
|
|
43
|
+
None, Single, Double, SingleAccountant, DoubleAccountant."""
|
|
44
|
+
return self.properties.get("underline", None)
|