Office365-REST-Python-Client 2.5.13__py3-none-any.whl → 2.6.0__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.5.13.dist-info → Office365_REST_Python_Client-2.6.0.dist-info}/METADATA +2 -2
- {Office365_REST_Python_Client-2.5.13.dist-info → Office365_REST_Python_Client-2.6.0.dist-info}/RECORD +324 -169
- office365/admin/admin.py +69 -0
- office365/admin/microsoft365_apps.py +5 -0
- office365/admin/people_settings.py +5 -0
- office365/admin/report_settings.py +5 -0
- office365/{onedrive → admin}/sharepoint.py +1 -1
- office365/azure_env.py +60 -0
- office365/booking/business/business.py +13 -0
- office365/booking/business/collection.py +8 -4
- office365/communications/callrecords/collection.py +42 -0
- office365/communications/callrecords/direct_routing_log_row.py +5 -0
- office365/communications/cloud_communications.py +2 -3
- office365/directory/applications/app_ids.py +6 -0
- office365/directory/applications/application.py +16 -2
- office365/directory/applications/required_resource_access.py +23 -0
- office365/directory/applications/resource_access.py +26 -0
- office365/directory/authentication/authentication.py +16 -0
- office365/directory/authentication/method_target.py +2 -1
- office365/directory/authentication/methods/details.py +29 -0
- office365/directory/authentication/methods/microsoft_authenticator.py +6 -0
- office365/directory/authentication/methods/root.py +19 -0
- office365/directory/authentication/methods/sms.py +9 -0
- office365/directory/certificates/self_signed.py +31 -2
- office365/directory/identities/conditional_access_root.py +14 -0
- office365/directory/identitygovernance/privilegedaccess/approval.py +8 -0
- office365/directory/identitygovernance/privilegedaccess/group.py +30 -0
- office365/directory/identitygovernance/privilegedaccess/group_assignment_schedule_instance.py +7 -0
- office365/directory/identitygovernance/privilegedaccess/unified_role_assignment_schedule_request.py +7 -0
- office365/directory/identitygovernance/userconsent/request_collection.py +10 -0
- office365/directory/identitygovernance/workflow/__init__.py +0 -0
- office365/directory/identitygovernance/workflow/base.py +5 -0
- office365/directory/permissions/scope.py +15 -3
- office365/directory/policies/authentication_strength.py +21 -0
- office365/directory/policies/cross_tenant_access.py +13 -0
- office365/directory/policies/feature_rollout.py +16 -0
- office365/directory/policies/root.py +39 -23
- office365/directory/policies/template.py +5 -0
- office365/directory/policies/update_allowed_combinations_result.py +5 -0
- office365/directory/protection/threatassessment/email_file_request.py +20 -0
- office365/directory/protection/threatassessment/request.py +25 -0
- office365/directory/rolemanagement/application.py +15 -0
- office365/directory/rolemanagement/resource_action.py +8 -4
- office365/directory/rolemanagement/role_permission.py +3 -3
- office365/directory/security/alerts/collection.py +49 -0
- office365/directory/security/alerts/evidence.py +2 -1
- office365/directory/security/alerts/malware_evidence.py +5 -0
- office365/directory/security/alerts/process_evidence.py +5 -0
- office365/directory/security/attacksimulations/user.py +5 -0
- office365/directory/security/attacksimulations/user_coverage.py +3 -0
- office365/directory/security/attacksimulations/users/details.py +6 -1
- office365/directory/security/scorecontrol/__init__.py +0 -0
- office365/directory/security/scorecontrol/profile.py +6 -0
- office365/directory/security/security.py +17 -4
- office365/directory/serviceprincipals/service_principal.py +112 -55
- office365/directory/tenantinformation/__init__.py +0 -0
- office365/directory/tenantinformation/multi_organization.py +11 -0
- office365/directory/tenantinformation/relationship.py +61 -0
- office365/directory/users/insights_settings.py +5 -0
- office365/graph_client.py +52 -132
- office365/graph_request.py +78 -19
- office365/intune/servicecommunications/health/health.py +1 -1
- office365/intune/servicecommunications/issues/issue.py +2 -2
- office365/onedrive/columns/definition.py +1 -1
- office365/onedrive/contenttypes/content_type.py +1 -1
- office365/onedrive/driveitems/driveItem.py +14 -2
- office365/onedrive/driveitems/retention_label.py +33 -0
- office365/onedrive/driveitems/retention_label_settings.py +7 -0
- office365/onedrive/drives/drive.py +1 -1
- office365/onedrive/filestorage/__init__.py +0 -0
- office365/onedrive/filestorage/container.py +7 -0
- office365/onedrive/filestorage/file_storage.py +20 -0
- office365/onedrive/listitems/field_value_set.py +1 -1
- office365/onedrive/listitems/list_item.py +1 -1
- office365/onedrive/lists/list.py +1 -1
- office365/onedrive/recyclebin/__init__.py +0 -0
- office365/onedrive/recyclebin/item.py +6 -0
- office365/onedrive/recyclebin/recyclebin.py +29 -0
- office365/onedrive/recyclebin/settings.py +13 -0
- office365/onedrive/shares/drive_item.py +1 -1
- office365/onedrive/sitepages/base.py +4 -1
- office365/onedrive/sitepages/canvas_layout.py +2 -2
- office365/onedrive/sitepages/collection.py +12 -0
- office365/onedrive/sitepages/sections/__init__.py +0 -0
- office365/onedrive/sitepages/{horizontal_section.py → sections/horizontal.py} +1 -1
- office365/onedrive/sitepages/site_page.py +9 -9
- office365/onedrive/sitepages/webparts/data.py +5 -0
- office365/onedrive/sitepages/webparts/position.py +5 -0
- office365/onedrive/sitepages/webparts/standard.py +9 -0
- office365/onedrive/sitepages/webparts/web_part.py +12 -0
- office365/onedrive/sites/archival_details.py +5 -0
- office365/onedrive/sites/site.py +1 -1
- office365/onedrive/sites/site_collection.py +10 -1
- office365/onedrive/storage/storage.py +10 -0
- office365/onedrive/workbooks/charts/axes.py +41 -1
- office365/onedrive/workbooks/charts/axis.py +5 -0
- office365/onedrive/workbooks/charts/chart.py +64 -5
- office365/onedrive/workbooks/charts/fill.py +5 -0
- office365/onedrive/workbooks/charts/font.py +5 -0
- office365/onedrive/workbooks/charts/legend/__init__.py +0 -0
- office365/onedrive/workbooks/charts/legend/format.py +5 -0
- office365/onedrive/workbooks/charts/legend/legend.py +26 -0
- office365/onedrive/workbooks/charts/point.py +5 -0
- office365/onedrive/workbooks/charts/series/__init__.py +0 -0
- office365/onedrive/workbooks/charts/series/format.py +5 -0
- office365/onedrive/workbooks/charts/series/series.py +31 -0
- office365/onedrive/workbooks/charts/title.py +5 -0
- office365/onedrive/workbooks/filter.py +10 -0
- office365/onedrive/workbooks/filter_criteria.py +3 -3
- office365/onedrive/workbooks/functions/functions.py +23 -0
- office365/onedrive/workbooks/ranges/fill.py +11 -1
- office365/onedrive/workbooks/ranges/range.py +26 -0
- office365/onedrive/workbooks/ranges/view.py +14 -0
- office365/onedrive/workbooks/sort_field.py +8 -3
- office365/onedrive/workbooks/tables/sort.py +20 -0
- office365/onedrive/workbooks/worksheets/worksheet.py +11 -0
- office365/partners/__init__.py +0 -0
- office365/partners/billing/__init__.py +0 -0
- office365/partners/billing/azure_usage.py +17 -0
- office365/partners/billing/billed_usage.py +21 -0
- office365/partners/billing/billing.py +17 -0
- office365/partners/billing/operation.py +5 -0
- office365/partners/partners.py +17 -0
- office365/planner/tasks/check_list_item.py +5 -1
- office365/reports/root.py +9 -0
- office365/reports/userregistration/feature_summary.py +5 -0
- office365/runtime/auth/auth_cookies.py +48 -0
- office365/runtime/auth/authentication_context.py +36 -19
- office365/runtime/auth/entra/__init__.py +0 -0
- office365/runtime/auth/entra/authentication_context.py +165 -0
- office365/runtime/auth/providers/acs_token_provider.py +12 -27
- office365/runtime/auth/providers/saml_token_provider.py +41 -54
- office365/runtime/auth/sts_profile.py +8 -8
- office365/runtime/auth/token_response.py +4 -0
- office365/runtime/client_object.py +15 -7
- office365/runtime/client_object_collection.py +2 -2
- office365/runtime/client_result.py +2 -0
- office365/runtime/client_value.py +1 -1
- office365/runtime/csom/request.py +11 -0
- office365/runtime/types/exceptions.py +18 -0
- office365/search/acronym.py +10 -0
- office365/search/aggregation_option.py +6 -0
- office365/search/answer.py +9 -0
- office365/search/entity.py +67 -14
- office365/search/entity_type.py +28 -0
- office365/search/request.py +32 -3
- office365/sharepoint/administration/custom_fonts_resource.py +5 -0
- office365/sharepoint/administration/sitemove/__init__.py +0 -0
- office365/sharepoint/administration/sitemove/service.py +68 -0
- office365/sharepoint/administration/sitemove/service_info.py +11 -0
- office365/sharepoint/apps/access_requests.py +5 -0
- office365/sharepoint/apps/management/__init__.py +0 -0
- office365/sharepoint/apps/management/principal_info.py +9 -0
- office365/sharepoint/authpolicy/events/collection.py +28 -0
- office365/sharepoint/authpolicy/events/role_assignment_resource_payload.py +4 -0
- office365/sharepoint/changes/item.py +15 -0
- office365/sharepoint/client_context.py +61 -37
- office365/sharepoint/directory/group.py +2 -0
- office365/sharepoint/directory/helper.py +2 -0
- office365/sharepoint/directory/provider/provider.py +6 -0
- office365/sharepoint/directory/user.py +20 -0
- office365/sharepoint/documentmanagement/document_id.py +28 -3
- office365/sharepoint/files/file.py +11 -4
- office365/sharepoint/files/publish/__init__.py +0 -0
- office365/sharepoint/files/publish/status.py +9 -0
- office365/sharepoint/files/versions/event.py +9 -0
- office365/sharepoint/flows/connector_result.py +17 -0
- office365/sharepoint/flows/permissions.py +34 -0
- office365/sharepoint/fontpackages/__init__.py +0 -0
- office365/sharepoint/fontpackages/collection.py +26 -0
- office365/sharepoint/fontpackages/creation_parameters.py +5 -0
- office365/sharepoint/fontpackages/font_package.py +5 -0
- office365/sharepoint/fontpackages/oob_settings.py +5 -0
- office365/sharepoint/forms/customization.py +26 -0
- office365/sharepoint/ir/__init__.py +0 -0
- office365/sharepoint/ir/migration.py +5 -0
- office365/sharepoint/listhome/favorite_item.py +9 -0
- office365/sharepoint/listitems/listitem.py +79 -4
- office365/sharepoint/listitems/update_parameters.py +4 -1
- office365/sharepoint/lists/data_parameters.py +5 -0
- office365/sharepoint/lists/exporter.py +73 -0
- office365/sharepoint/lists/list.py +177 -60
- office365/sharepoint/lists/render_data_parameters.py +31 -0
- office365/sharepoint/lists/version_policy_manager.py +5 -0
- office365/sharepoint/marketplace/app_metadata.py +12 -1
- office365/sharepoint/marketplace/app_metadata_collection.py +8 -0
- office365/sharepoint/marketplace/corporatecuratedgallery/addins/instance_info.py +22 -0
- office365/sharepoint/marketplace/corporatecuratedgallery/addins/permission_failed_info.py +5 -0
- office365/sharepoint/marketplace/corporatecuratedgallery/addins/permission_info.py +12 -0
- office365/sharepoint/marketplace/corporatecuratedgallery/addins/permission_response.py +15 -0
- office365/sharepoint/marketplace/corporatecuratedgallery/addins/principals_response.py +5 -0
- office365/sharepoint/marketplace/corporatecuratedgallery/app_request_information.py +9 -0
- office365/sharepoint/marketplace/corporatecuratedgallery/app_response_information.py +9 -0
- office365/sharepoint/marketplace/corporatecuratedgallery/available_addins_response.py +4 -0
- office365/sharepoint/marketplace/corporatecuratedgallery/card_design.py +9 -0
- office365/sharepoint/marketplace/corporatecuratedgallery/card_designs.py +9 -0
- office365/sharepoint/marketplace/corporatecuratedgallery/teams_package_download.py +14 -0
- office365/sharepoint/marketplace/tenant/appcatalog/accessor.py +62 -3
- office365/sharepoint/migration/copy_migration_options.py +5 -0
- office365/sharepoint/multigeo/services.py +14 -0
- office365/sharepoint/multigeo/storage_quota.py +9 -0
- office365/sharepoint/policy/license_utilities.py +27 -0
- office365/sharepoint/portal/groups/site_manager.py +32 -0
- office365/sharepoint/portal/project/__init__.py +9 -0
- office365/sharepoint/portal/userprofiles/documentsshared/__init__.py +0 -0
- office365/sharepoint/portal/userprofiles/documentsshared/with_group.py +38 -0
- office365/sharepoint/portal/userprofiles/documentsshared/with_person.py +9 -0
- office365/sharepoint/portal/userprofiles/sharedwithme/__init__.py +0 -0
- office365/sharepoint/{userprofiles → portal/userprofiles}/sharedwithme/document.py +1 -1
- office365/sharepoint/{userprofiles → portal/userprofiles}/sharedwithme/items.py +3 -1
- office365/sharepoint/principal/principal.py +6 -0
- office365/sharepoint/publishing/pages/coauth_state.py +8 -0
- office365/sharepoint/publishing/pages/page.py +11 -0
- office365/sharepoint/publishing/pages/stream_content.py +9 -0
- office365/sharepoint/publishing/pages/stream_data.py +8 -0
- office365/sharepoint/quotamanagement/consumer/non_quota_backfill_api.py +8 -0
- office365/sharepoint/request.py +98 -10
- office365/sharepoint/search/administration/document_crawl_log.py +16 -2
- office365/sharepoint/search/administration/site_content_processing_info_provider.py +11 -0
- office365/sharepoint/search/administration/tenant_crawl_versions_info_provider.py +1 -1
- office365/sharepoint/search/ranking_labeling.py +1 -0
- office365/sharepoint/search/reports/abandoned_queries.py +11 -1
- office365/sharepoint/search/reports/abandonedqueries/__init__.py +0 -0
- office365/sharepoint/search/reports/abandonedqueries/data.py +0 -0
- office365/sharepoint/search/reports/abandonedqueries/item.py +11 -0
- office365/sharepoint/search/reports/noresult/__init__.py +0 -0
- office365/sharepoint/search/reports/numberofqueries/__init__.py +0 -0
- office365/sharepoint/search/reports/top_queries.py +7 -0
- office365/sharepoint/search/reports/topqueries/__init__.py +0 -0
- office365/sharepoint/search/reports/topqueries/data.py +9 -0
- office365/sharepoint/search/reports/topqueries/item.py +15 -0
- office365/sharepoint/search/scs_endpoint.py +9 -0
- office365/sharepoint/securestore/target_application.py +8 -0
- office365/sharepoint/sharing/document_manager.py +3 -3
- office365/sharepoint/sharing/domain_restriction_settings.py +5 -0
- office365/sharepoint/sharing/information.py +12 -0
- office365/sharepoint/sharing/result.py +21 -0
- office365/sharepoint/sitehealth/result.py +4 -4
- office365/sharepoint/sitehealth/summary.py +5 -5
- office365/sharepoint/sites/copy_job_progress.py +5 -0
- office365/sharepoint/sites/copy_migration_iInfo.py +5 -0
- office365/sharepoint/sites/home/__init__.py +0 -0
- office365/sharepoint/sites/{sph_site.py → home/site.py} +1 -1
- office365/sharepoint/sites/html_field_security_setting.py +5 -0
- office365/sharepoint/sites/site.py +56 -2
- office365/sharepoint/sites/version_policy_manager.py +25 -0
- office365/sharepoint/sitescripts/metadata.py +28 -3
- office365/sharepoint/sitescripts/utility.py +17 -0
- office365/sharepoint/smartcache/__init__.py +0 -0
- office365/sharepoint/smartcache/item.py +9 -0
- office365/sharepoint/tenant/administration/app_service_principal_public.py +17 -0
- office365/sharepoint/tenant/administration/audit/data.py +12 -0
- office365/sharepoint/tenant/administration/audit/unified_record.py +18 -0
- office365/sharepoint/tenant/administration/coms/__init__.py +0 -0
- office365/sharepoint/tenant/administration/coms/messages_fields_data.py +5 -0
- office365/sharepoint/tenant/administration/coms/messages_service_proxy.py +16 -0
- office365/sharepoint/tenant/administration/copilot/__init__.py +0 -0
- office365/sharepoint/tenant/administration/copilot/adaptive_card_config.py +11 -0
- office365/sharepoint/tenant/administration/datagovernance/__init__.py +0 -0
- office365/sharepoint/tenant/administration/{internal/permission_grant.py → datagovernance/client_base.py} +4 -2
- office365/sharepoint/tenant/administration/datagovernance/insight_client.py +82 -0
- office365/sharepoint/tenant/administration/datagovernance/insight_metadata.py +5 -0
- office365/sharepoint/tenant/administration/default_time_zone_id.py +11 -0
- office365/sharepoint/tenant/administration/endpoints.py +53 -2
- office365/sharepoint/tenant/administration/insights/onedrive_site_sharing.py +4 -0
- office365/sharepoint/tenant/administration/insights/summary_response.py +8 -0
- office365/sharepoint/tenant/administration/internal/aad/__init__.py +0 -0
- office365/sharepoint/tenant/administration/internal/aad/permission_grant.py +32 -0
- office365/sharepoint/tenant/administration/internal/appservice/__init__.py +0 -0
- office365/sharepoint/tenant/administration/internal/appservice/permission_grant.py +5 -0
- office365/sharepoint/tenant/administration/internal/appservice/permission_request.py +13 -0
- office365/sharepoint/tenant/administration/internal/appservice/principal.py +104 -0
- office365/sharepoint/tenant/administration/malware/__init__.py +0 -0
- office365/sharepoint/tenant/administration/malware/file.py +18 -0
- office365/sharepoint/tenant/administration/modified_property.py +5 -0
- office365/sharepoint/tenant/administration/policies/app_billing_properties.py +21 -0
- office365/sharepoint/tenant/administration/policies/content_security_configuration.py +9 -0
- office365/sharepoint/tenant/administration/recent_action.py +9 -0
- office365/sharepoint/tenant/administration/reports/__init__.py +0 -0
- office365/sharepoint/tenant/administration/settings_service.py +42 -6
- office365/sharepoint/tenant/administration/sites/creation_source.py +8 -8
- office365/sharepoint/tenant/administration/sites/properties.py +78 -0
- office365/sharepoint/tenant/administration/sites/properties_collection.py +19 -0
- office365/sharepoint/tenant/administration/tenant.py +241 -8
- office365/sharepoint/tenant/administration/types.py +89 -2
- office365/sharepoint/tenant/cdn_api.py +3 -1
- office365/sharepoint/tenant/insights/report_manager.py +29 -0
- office365/sharepoint/tenant/management/office365_tenant.py +9 -4
- office365/sharepoint/tenant/settings.py +10 -0
- office365/sharepoint/translation/job_status.py +22 -0
- office365/sharepoint/userprofiles/user_profile.py +6 -0
- office365/sharepoint/utilities/utility.py +6 -0
- office365/sharepoint/viva/connections_page.py +8 -0
- office365/sharepoint/viva/dashboard_configuration.py +8 -0
- office365/sharepoint/viva/employee_engagement.py +39 -1
- office365/sharepoint/viva/resource_get_endpoint.py +8 -0
- office365/sharepoint/viva/resource_link.py +8 -0
- office365/sharepoint/webparts/tile_data.py +21 -0
- office365/sharepoint/webs/dataleakage_prevention_status_info.py +5 -0
- office365/sharepoint/webs/information.py +66 -1
- office365/sharepoint/webs/regional_settings.py +32 -0
- office365/sharepoint/webs/templates/__init__.py +0 -0
- office365/sharepoint/webs/time_zone.py +1 -1
- office365/sharepoint/webs/web.py +137 -0
- office365/sharepoint/workflow/task.py +5 -0
- office365/subscriptions/collection.py +16 -0
- office365/teams/chats/event_message_detail.py +8 -0
- office365/teams/deleted.py +24 -0
- office365/teams/work.py +35 -0
- office365/directory/tenant_relationship.py +0 -23
- office365/onedrive/admin.py +0 -32
- office365/onedrive/workbooks/charts/legend.py +0 -7
- office365/onedrive/workbooks/charts/series.py +0 -5
- office365/sharepoint/portal/userprofiles/documents_shared_with_group.py +0 -11
- office365/sharepoint/tenant/administration/internal/web_appservice_principal.py +0 -23
- {Office365_REST_Python_Client-2.5.13.dist-info → Office365_REST_Python_Client-2.6.0.dist-info}/LICENSE +0 -0
- {Office365_REST_Python_Client-2.5.13.dist-info → Office365_REST_Python_Client-2.6.0.dist-info}/WHEEL +0 -0
- {Office365_REST_Python_Client-2.5.13.dist-info → Office365_REST_Python_Client-2.6.0.dist-info}/top_level.txt +0 -0
- /office365/{sharepoint/userprofiles/sharedwithme → admin}/__init__.py +0 -0
- /office365/{onedrive → admin}/sharepoint_settings.py +0 -0
- /office365/directory/{tenant_information.py → tenantinformation/information.py} +0 -0
- /office365/{base_item.py → onedrive/base_item.py} +0 -0
- /office365/onedrive/sitepages/{horizontal_section_column.py → sections/horizontal_column.py} +0 -0
- /office365/onedrive/sitepages/{vertical_section.py → sections/vertical.py} +0 -0
- /office365/sharepoint/portal/userprofiles/{documents_shared_with_me.py → documentsshared/with_me.py} +0 -0
- /office365/sharepoint/{userprofiles → portal/userprofiles}/sharedwithme/document_user.py +0 -0
- /office365/sharepoint/{userprofiles → portal/userprofiles}/sharedwithme/item_collection.py +0 -0
- /office365/sharepoint/{userprofiles → portal/userprofiles}/sharedwithme/view_item_removal_result.py +0 -0
- /office365/sharepoint/sites/{home_sites_details.py → home/details.py} +0 -0
- /office365/sharepoint/sites/{home_site_reference.py → home/reference.py} +0 -0
|
@@ -1,21 +1,50 @@
|
|
|
1
1
|
from office365.entity import Entity
|
|
2
|
+
from office365.entity_collection import EntityCollection
|
|
2
3
|
from office365.onedrive.workbooks.charts.axes import WorkbookChartAxes
|
|
3
4
|
from office365.onedrive.workbooks.charts.data_labels import WorkbookChartDataLabels
|
|
5
|
+
from office365.onedrive.workbooks.charts.legend.legend import WorkbookChartLegend
|
|
6
|
+
from office365.onedrive.workbooks.charts.series.series import WorkbookChartSeries
|
|
7
|
+
from office365.onedrive.workbooks.charts.title import WorkbookChartTitle
|
|
8
|
+
from office365.runtime.client_result import ClientResult
|
|
4
9
|
from office365.runtime.paths.resource_path import ResourcePath
|
|
10
|
+
from office365.runtime.queries.function import FunctionQuery
|
|
5
11
|
from office365.runtime.queries.service_operation import ServiceOperationQuery
|
|
6
12
|
|
|
7
13
|
|
|
8
14
|
class WorkbookChart(Entity):
|
|
9
15
|
"""Represents a chart object in a workbook."""
|
|
10
16
|
|
|
11
|
-
def
|
|
17
|
+
def image(self, width=None, height=None):
|
|
18
|
+
"""Renders the chart as a base64-encoded image by scaling the chart to fit the specified dimensions.
|
|
19
|
+
|
|
20
|
+
:param int width: Specifies the width of the rendered image in pixels.
|
|
21
|
+
:param int height: Specifies the height of the rendered image in pixels.
|
|
22
|
+
"""
|
|
23
|
+
return_type = ClientResult(self.context)
|
|
24
|
+
params = {"width": width, "height": height}
|
|
25
|
+
qry = FunctionQuery(self, "image", params, return_type)
|
|
26
|
+
self.context.add_query(qry)
|
|
27
|
+
return return_type
|
|
28
|
+
|
|
29
|
+
def set_data(self, source_data, series_by):
|
|
30
|
+
"""
|
|
31
|
+
Updates the data source of a chart
|
|
32
|
+
:param dict source_data:
|
|
33
|
+
:param str series_by:
|
|
34
|
+
"""
|
|
35
|
+
payload = {"sourceData": source_data, "seriesBy": series_by}
|
|
36
|
+
qry = ServiceOperationQuery(self, "setData", None, payload)
|
|
37
|
+
self.context.add_query(qry)
|
|
38
|
+
return self
|
|
39
|
+
|
|
40
|
+
def set_position(self, start_cell, end_cell):
|
|
12
41
|
"""Positions the chart relative to cells on the worksheet.
|
|
13
|
-
:param str
|
|
42
|
+
:param str start_cell: The start cell. It is where the chart is moved to. The start cell is the top-left or
|
|
14
43
|
top-right cell, depending on the user's right-to-left display settings.
|
|
15
|
-
:param str
|
|
44
|
+
:param str end_cell: The end cell. If specified, the chart's width and height is set to fully cover up
|
|
16
45
|
this cell/range.
|
|
17
46
|
"""
|
|
18
|
-
payload = {"startCell":
|
|
47
|
+
payload = {"startCell": start_cell, "endCell": end_cell}
|
|
19
48
|
qry = ServiceOperationQuery(self, "setPosition", None, payload)
|
|
20
49
|
self.context.add_query(qry)
|
|
21
50
|
return self
|
|
@@ -30,7 +59,7 @@ class WorkbookChart(Entity):
|
|
|
30
59
|
|
|
31
60
|
@property
|
|
32
61
|
def data_labels(self):
|
|
33
|
-
"""Represents the
|
|
62
|
+
"""Represents the data labels on the chart."""
|
|
34
63
|
return self.properties.get(
|
|
35
64
|
"dataLabels",
|
|
36
65
|
WorkbookChartDataLabels(
|
|
@@ -38,6 +67,36 @@ class WorkbookChart(Entity):
|
|
|
38
67
|
),
|
|
39
68
|
)
|
|
40
69
|
|
|
70
|
+
@property
|
|
71
|
+
def legend(self):
|
|
72
|
+
"""Represents the legend on the chart."""
|
|
73
|
+
return self.properties.get(
|
|
74
|
+
"legend",
|
|
75
|
+
WorkbookChartLegend(
|
|
76
|
+
self.context, ResourcePath("legend", self.resource_path)
|
|
77
|
+
),
|
|
78
|
+
)
|
|
79
|
+
|
|
80
|
+
@property
|
|
81
|
+
def series(self):
|
|
82
|
+
"""Represents chart series."""
|
|
83
|
+
return self.properties.get(
|
|
84
|
+
"series",
|
|
85
|
+
EntityCollection(
|
|
86
|
+
self.context,
|
|
87
|
+
WorkbookChartSeries,
|
|
88
|
+
ResourcePath("series", self.resource_path),
|
|
89
|
+
),
|
|
90
|
+
)
|
|
91
|
+
|
|
92
|
+
@property
|
|
93
|
+
def title(self):
|
|
94
|
+
"""Represents the title on the chart."""
|
|
95
|
+
return self.properties.get(
|
|
96
|
+
"title",
|
|
97
|
+
WorkbookChartTitle(self.context, ResourcePath("title", self.resource_path)),
|
|
98
|
+
)
|
|
99
|
+
|
|
41
100
|
@property
|
|
42
101
|
def worksheet(self):
|
|
43
102
|
"""The worksheet containing the current chart."""
|
|
File without changes
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
from typing import Optional
|
|
2
|
+
|
|
3
|
+
from office365.entity import Entity
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
class WorkbookChartLegend(Entity):
|
|
7
|
+
"""Represents the legend in a chart."""
|
|
8
|
+
|
|
9
|
+
@property
|
|
10
|
+
def overlay(self):
|
|
11
|
+
# type: () -> Optional[bool]
|
|
12
|
+
"""Indicates whether the chart legend should overlap with the main body of the chart."""
|
|
13
|
+
return self.properties.get("overlay", None)
|
|
14
|
+
|
|
15
|
+
@property
|
|
16
|
+
def position(self):
|
|
17
|
+
# type: () -> Optional[str]
|
|
18
|
+
"""Represents the position of the legend on the chart.
|
|
19
|
+
The possible values are: Top, Bottom, Left, Right, Corner, Custom."""
|
|
20
|
+
return self.properties.get("position", None)
|
|
21
|
+
|
|
22
|
+
@property
|
|
23
|
+
def visible(self):
|
|
24
|
+
# type: () -> Optional[bool]
|
|
25
|
+
"""Indicates whether the chart legend is visible."""
|
|
26
|
+
return self.properties.get("visible", None)
|
|
File without changes
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
from office365.entity import Entity
|
|
2
|
+
from office365.entity_collection import EntityCollection
|
|
3
|
+
from office365.onedrive.workbooks.charts.point import WorkbookChartPoint
|
|
4
|
+
from office365.onedrive.workbooks.charts.series.format import WorkbookChartSeriesFormat
|
|
5
|
+
from office365.runtime.paths.resource_path import ResourcePath
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
class WorkbookChartSeries(Entity):
|
|
9
|
+
"""Represents a series in a chart."""
|
|
10
|
+
|
|
11
|
+
@property
|
|
12
|
+
def format(self):
|
|
13
|
+
"""The formatting of a chart series, which includes fill and line formatting."""
|
|
14
|
+
return self.properties.get(
|
|
15
|
+
"format",
|
|
16
|
+
WorkbookChartSeriesFormat(
|
|
17
|
+
self.context, ResourcePath("format", self.resource_path)
|
|
18
|
+
),
|
|
19
|
+
)
|
|
20
|
+
|
|
21
|
+
@property
|
|
22
|
+
def points(self):
|
|
23
|
+
"""A collection of all points in the series."""
|
|
24
|
+
return self.properties.get(
|
|
25
|
+
"points",
|
|
26
|
+
EntityCollection(
|
|
27
|
+
self.context,
|
|
28
|
+
WorkbookChartPoint,
|
|
29
|
+
ResourcePath("points", self.resource_path),
|
|
30
|
+
),
|
|
31
|
+
)
|
|
@@ -8,6 +8,16 @@ from office365.runtime.queries.service_operation import ServiceOperationQuery
|
|
|
8
8
|
class WorkbookFilter(Entity):
|
|
9
9
|
"""Manages the filtering of a table's column."""
|
|
10
10
|
|
|
11
|
+
def apply_bottom_items_filter(self, count=None):
|
|
12
|
+
"""Perform a sort operation.
|
|
13
|
+
|
|
14
|
+
:param str count: The number of items to apply the filter to.
|
|
15
|
+
"""
|
|
16
|
+
payload = {"count": count}
|
|
17
|
+
qry = ServiceOperationQuery(self, "applyBottomItemsFilter", None, payload)
|
|
18
|
+
self.context.add_query(qry)
|
|
19
|
+
return self
|
|
20
|
+
|
|
11
21
|
def clear(self):
|
|
12
22
|
"""Clear the filter on the given column."""
|
|
13
23
|
qry = ServiceOperationQuery(self, "clear")
|
|
@@ -4,14 +4,14 @@ from office365.runtime.client_value import ClientValue
|
|
|
4
4
|
class WorkbookFilterCriteria(ClientValue):
|
|
5
5
|
"""Represents the filtering criteria applied to a column."""
|
|
6
6
|
|
|
7
|
-
def __init__(self, color=None,
|
|
7
|
+
def __init__(self, color=None, dynamic_criteria=None, operator=None, values=None):
|
|
8
8
|
"""
|
|
9
9
|
:param str color: The color applied to the cell.
|
|
10
|
-
:param str
|
|
10
|
+
:param str dynamic_criteria: A dynamic formula specified in a custom filter.
|
|
11
11
|
:param str operator: An operator in a cell; for example, =, >, <, <=, or <>.
|
|
12
12
|
:param list values: The values that appear in the cell.
|
|
13
13
|
"""
|
|
14
14
|
self.color = color
|
|
15
|
-
self.dynamicCriteria =
|
|
15
|
+
self.dynamicCriteria = dynamic_criteria
|
|
16
16
|
self.operator = operator
|
|
17
17
|
self.values = values
|
|
@@ -45,6 +45,29 @@ class WorkbookFunctions(Entity):
|
|
|
45
45
|
self.context.add_query(qry)
|
|
46
46
|
return return_type
|
|
47
47
|
|
|
48
|
+
def accr_int_m(self, issue, settlement, rate, par, basis):
|
|
49
|
+
"""
|
|
50
|
+
Returns the accrued interest for a security that pays periodic interest.
|
|
51
|
+
|
|
52
|
+
:param any issue: The real number of which you want the absolute value.
|
|
53
|
+
:param any settlement: The security's settlement date. The security settlement date is the date after
|
|
54
|
+
the issue date when the security is traded to the buyer.
|
|
55
|
+
:param any rate: The security's annual coupon rate.
|
|
56
|
+
:param any par: The security's par value. If you omit par, ACCRINT uses $1,000.
|
|
57
|
+
:param any basis:
|
|
58
|
+
"""
|
|
59
|
+
return_type = WorkbookFunctionResult(self.context)
|
|
60
|
+
payload = {
|
|
61
|
+
"issue": issue,
|
|
62
|
+
"settlement": settlement,
|
|
63
|
+
"rate": rate,
|
|
64
|
+
"par": par,
|
|
65
|
+
"basis": basis,
|
|
66
|
+
}
|
|
67
|
+
qry = ServiceOperationQuery(self, "accrIntM", None, payload, None, return_type)
|
|
68
|
+
self.context.add_query(qry)
|
|
69
|
+
return return_type
|
|
70
|
+
|
|
48
71
|
def days(self, start_date, end_date):
|
|
49
72
|
"""Returns the number of days between two dates.
|
|
50
73
|
|
|
@@ -1,5 +1,15 @@
|
|
|
1
|
+
from typing import Optional
|
|
2
|
+
|
|
1
3
|
from office365.entity import Entity
|
|
2
4
|
|
|
3
5
|
|
|
4
6
|
class WorkbookRangeFill(Entity):
|
|
5
|
-
"""
|
|
7
|
+
"""HTML color code representing the color of the border line. Can either be of the form #RRGGBB,
|
|
8
|
+
for example "FFA500", or be a named HTML color, for example "orange"."""
|
|
9
|
+
|
|
10
|
+
@property
|
|
11
|
+
def color(self):
|
|
12
|
+
# type: () -> Optional[str]
|
|
13
|
+
"""Gets or sets the width of all columns within the range. If the column widths aren't uniform,
|
|
14
|
+
null will be returned."""
|
|
15
|
+
return self.properties.get("color", None)
|
|
@@ -12,6 +12,12 @@ from office365.runtime.queries.service_operation import ServiceOperationQuery
|
|
|
12
12
|
class WorkbookRange(Entity):
|
|
13
13
|
"""Range represents a set of one or more contiguous cells such as a cell, a row, a column, block of cells, etc."""
|
|
14
14
|
|
|
15
|
+
def __repr__(self):
|
|
16
|
+
return self.address or self.entity_type_name
|
|
17
|
+
|
|
18
|
+
def __str__(self):
|
|
19
|
+
return self.address or self.entity_type_name
|
|
20
|
+
|
|
15
21
|
def cell(self, row, column):
|
|
16
22
|
"""
|
|
17
23
|
Gets the range object containing the single cell based on row and column numbers. The cell can be outside
|
|
@@ -48,6 +54,15 @@ class WorkbookRange(Entity):
|
|
|
48
54
|
self.context.add_query(qry)
|
|
49
55
|
return return_type
|
|
50
56
|
|
|
57
|
+
def last_row(self):
|
|
58
|
+
"""
|
|
59
|
+
Get the last row within the range. For example, the last row of B2:D5 is B5:D5.
|
|
60
|
+
"""
|
|
61
|
+
return_type = WorkbookRange(self.context)
|
|
62
|
+
qry = FunctionQuery(self, "lastRow", return_type=return_type)
|
|
63
|
+
self.context.add_query(qry)
|
|
64
|
+
return return_type
|
|
65
|
+
|
|
51
66
|
def visible_view(self):
|
|
52
67
|
"""Get the range visible from a filtered range."""
|
|
53
68
|
return_type = WorkbookRangeView(self.context)
|
|
@@ -55,6 +70,17 @@ class WorkbookRange(Entity):
|
|
|
55
70
|
self.context.add_query(qry)
|
|
56
71
|
return return_type
|
|
57
72
|
|
|
73
|
+
def used_range(self, values_only=False):
|
|
74
|
+
"""Return the used range of the given range object.
|
|
75
|
+
|
|
76
|
+
:param bool values_only: Optional. Considers only cells with values as used cells.
|
|
77
|
+
"""
|
|
78
|
+
return_type = WorkbookRange(self.context)
|
|
79
|
+
params = {"valuesOnly": values_only}
|
|
80
|
+
qry = FunctionQuery(self, "usedRange", params, return_type)
|
|
81
|
+
self.context.add_query(qry)
|
|
82
|
+
return return_type
|
|
83
|
+
|
|
58
84
|
@property
|
|
59
85
|
def address(self):
|
|
60
86
|
# type: () -> Optional[str]
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
from typing import Optional
|
|
2
|
+
|
|
1
3
|
from office365.entity import Entity
|
|
2
4
|
from office365.entity_collection import EntityCollection
|
|
3
5
|
from office365.runtime.paths.resource_path import ResourcePath
|
|
@@ -6,6 +8,18 @@ from office365.runtime.paths.resource_path import ResourcePath
|
|
|
6
8
|
class WorkbookRangeView(Entity):
|
|
7
9
|
"""Represents a set of visible cells of the parent range."""
|
|
8
10
|
|
|
11
|
+
@property
|
|
12
|
+
def cell_addresses(self):
|
|
13
|
+
# type: () -> Optional[dict]
|
|
14
|
+
"""The cell addresses."""
|
|
15
|
+
return self.properties.get("cellAddresses", None)
|
|
16
|
+
|
|
17
|
+
@property
|
|
18
|
+
def column_count(self):
|
|
19
|
+
# type: () -> Optional[int]
|
|
20
|
+
"""The number of visible columns."""
|
|
21
|
+
return self.properties.get("columnCount", None)
|
|
22
|
+
|
|
9
23
|
@property
|
|
10
24
|
def rows(self):
|
|
11
25
|
# type: () -> EntityCollection[WorkbookRangeView]
|
|
@@ -6,13 +6,18 @@ class WorkbookSortField(ClientValue):
|
|
|
6
6
|
"""Represents a condition in a sorting operation."""
|
|
7
7
|
|
|
8
8
|
def __init__(
|
|
9
|
-
self,
|
|
9
|
+
self,
|
|
10
|
+
ascending=None,
|
|
11
|
+
color=None,
|
|
12
|
+
data_option=None,
|
|
13
|
+
icon=WorkbookIcon(),
|
|
14
|
+
key=None,
|
|
10
15
|
):
|
|
11
16
|
"""
|
|
12
17
|
:param bool ascending: Represents whether the sorting is done in an ascending fashion.
|
|
13
18
|
:param str color: Represents the color that is the target of the condition if the sorting is on font
|
|
14
19
|
or cell color.
|
|
15
|
-
:param str
|
|
20
|
+
:param str data_option: Represents additional sorting options for this field.
|
|
16
21
|
Possible values are: Normal, TextAsNumber.
|
|
17
22
|
:param WorkbookIcon icon: Represents the icon that is the target of the condition if the sorting
|
|
18
23
|
is on the cell's icon.
|
|
@@ -21,6 +26,6 @@ class WorkbookSortField(ClientValue):
|
|
|
21
26
|
"""
|
|
22
27
|
self.ascending = ascending
|
|
23
28
|
self.color = color
|
|
24
|
-
self.dataOption =
|
|
29
|
+
self.dataOption = data_option
|
|
25
30
|
self.icon = icon
|
|
26
31
|
self.key = key
|
|
@@ -1,5 +1,25 @@
|
|
|
1
1
|
from office365.entity import Entity
|
|
2
|
+
from office365.onedrive.workbooks.sort_field import WorkbookSortField
|
|
3
|
+
from office365.runtime.client_value_collection import ClientValueCollection
|
|
4
|
+
from office365.runtime.queries.service_operation import ServiceOperationQuery
|
|
2
5
|
|
|
3
6
|
|
|
4
7
|
class WorkbookTableSort(Entity):
|
|
5
8
|
"""Manages sorting operations on Table objects."""
|
|
9
|
+
|
|
10
|
+
def apply(self, fields, match_case=None, method=None):
|
|
11
|
+
"""Perform a sort operation.
|
|
12
|
+
|
|
13
|
+
:param list[WorkbookSortField] fields: The list of conditions to sort on.
|
|
14
|
+
:param bool match_case: Indicates whether to match the case of the items being sorted.
|
|
15
|
+
:param str method: The ordering method used for Chinese characters.
|
|
16
|
+
The possible values are: PinYin, StrokeCount.
|
|
17
|
+
"""
|
|
18
|
+
payload = {
|
|
19
|
+
"fields": ClientValueCollection(WorkbookSortField, fields),
|
|
20
|
+
"matchCase": match_case,
|
|
21
|
+
"method": method,
|
|
22
|
+
}
|
|
23
|
+
qry = ServiceOperationQuery(self, "apply", None, payload)
|
|
24
|
+
self.context.add_query(qry)
|
|
25
|
+
return self
|
|
@@ -53,6 +53,17 @@ class WorkbookWorksheet(Entity):
|
|
|
53
53
|
self.context.add_query(qry)
|
|
54
54
|
return return_type
|
|
55
55
|
|
|
56
|
+
def used_range(self, values_only=False):
|
|
57
|
+
"""Return the used range of the given range object.
|
|
58
|
+
|
|
59
|
+
:param bool values_only: Optional. Considers only cells with values as used cells.
|
|
60
|
+
"""
|
|
61
|
+
return_type = WorkbookRange(self.context)
|
|
62
|
+
params = {"valuesOnly": values_only}
|
|
63
|
+
qry = FunctionQuery(self, "usedRange", params, return_type)
|
|
64
|
+
self.context.add_query(qry)
|
|
65
|
+
return return_type
|
|
66
|
+
|
|
56
67
|
@property
|
|
57
68
|
def charts(self):
|
|
58
69
|
# type: () -> EntityCollection[WorkbookChart]
|
|
File without changes
|
|
File without changes
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
from office365.entity import Entity
|
|
2
|
+
from office365.partners.billing.billed_usage import BilledUsage
|
|
3
|
+
from office365.runtime.paths.resource_path import ResourcePath
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
class AzureUsage(Entity):
|
|
7
|
+
"""Represents details for billed and unbilled Azure usage data."""
|
|
8
|
+
|
|
9
|
+
@property
|
|
10
|
+
def billed(self):
|
|
11
|
+
"""
|
|
12
|
+
Represents details for billed Azure usage data.
|
|
13
|
+
"""
|
|
14
|
+
return self.properties.get(
|
|
15
|
+
"billed",
|
|
16
|
+
BilledUsage(self.context, ResourcePath("billed", self.resource_path)),
|
|
17
|
+
)
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
from office365.entity import Entity
|
|
2
|
+
from office365.partners.billing.operation import Operation
|
|
3
|
+
from office365.runtime.queries.service_operation import ServiceOperationQuery
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
class BilledUsage(Entity):
|
|
7
|
+
"""Represents details for billed Azure usage data."""
|
|
8
|
+
|
|
9
|
+
def export(self, invoice_id, attribute_set=None):
|
|
10
|
+
# type: (str, str) -> Operation
|
|
11
|
+
"""Export the billed Azure usage data.
|
|
12
|
+
|
|
13
|
+
:param invoice_id: The invoice ID for which the partner requested to export data. Required.
|
|
14
|
+
:param attribute_set: Attributes that should be exported. Possible values are: full, basic, unknownFutureValue.
|
|
15
|
+
The default value is full. Choose full for a complete response or basic for a subset of attributes.
|
|
16
|
+
"""
|
|
17
|
+
payload = {"invoiceId": invoice_id, "attributeSet": attribute_set}
|
|
18
|
+
return_type = Operation(self.context)
|
|
19
|
+
qry = ServiceOperationQuery(self, "export", None, payload, None, return_type)
|
|
20
|
+
self.context.add_query(qry)
|
|
21
|
+
return return_type
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
from office365.entity import Entity
|
|
2
|
+
from office365.partners.billing.azure_usage import AzureUsage
|
|
3
|
+
from office365.runtime.paths.resource_path import ResourcePath
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
class Billing(Entity):
|
|
7
|
+
"""Represents billing details for billed and unbilled data."""
|
|
8
|
+
|
|
9
|
+
@property
|
|
10
|
+
def usage(self):
|
|
11
|
+
"""
|
|
12
|
+
Represents details for billed and unbilled Azure usage data.
|
|
13
|
+
"""
|
|
14
|
+
return self.properties.get(
|
|
15
|
+
"usage",
|
|
16
|
+
AzureUsage(self.context, ResourcePath("usage", self.resource_path)),
|
|
17
|
+
)
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
from office365.entity import Entity
|
|
2
|
+
from office365.partners.billing.billing import Billing
|
|
3
|
+
from office365.runtime.paths.resource_path import ResourcePath
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
class Partners(Entity):
|
|
7
|
+
"""Represents billing details for a Microsoft direct partner."""
|
|
8
|
+
|
|
9
|
+
@property
|
|
10
|
+
def billing(self):
|
|
11
|
+
"""
|
|
12
|
+
Represents billing details for billed and unbilled data.
|
|
13
|
+
"""
|
|
14
|
+
return self.properties.get(
|
|
15
|
+
"billing",
|
|
16
|
+
Billing(self.context, ResourcePath("billing", self.resource_path)),
|
|
17
|
+
)
|
office365/reports/root.py
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
from office365.directory.authentication.methods.root import AuthenticationMethodsRoot
|
|
2
2
|
from office365.entity import Entity
|
|
3
|
+
from office365.partners.partners import Partners
|
|
3
4
|
from office365.reports.internal.queries.create_report_query import create_report_query
|
|
4
5
|
from office365.reports.report import Report
|
|
5
6
|
from office365.reports.security.root import SecurityReportsRoot
|
|
@@ -292,6 +293,14 @@ class ReportRoot(Entity):
|
|
|
292
293
|
),
|
|
293
294
|
)
|
|
294
295
|
|
|
296
|
+
@property
|
|
297
|
+
def partners(self):
|
|
298
|
+
"""Represents billing details for a Microsoft direct partner."""
|
|
299
|
+
return self.properties.get(
|
|
300
|
+
"partners",
|
|
301
|
+
Partners(self.context, ResourcePath("partners", self.resource_path)),
|
|
302
|
+
)
|
|
303
|
+
|
|
295
304
|
@property
|
|
296
305
|
def security(self):
|
|
297
306
|
"""Container for navigation properties for Azure AD authentication methods resources."""
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import json
|
|
2
|
+
from typing import Dict, Optional
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
class AuthCookies:
|
|
6
|
+
def __init__(self, cookies):
|
|
7
|
+
# type: (Dict) -> None
|
|
8
|
+
self._cookies = cookies
|
|
9
|
+
|
|
10
|
+
@property
|
|
11
|
+
def is_valid(self) -> bool:
|
|
12
|
+
"""Validates authorization cookies."""
|
|
13
|
+
return bool(self._cookies) and (
|
|
14
|
+
self.fed_auth is not None or self.spo_idcrl is not None
|
|
15
|
+
)
|
|
16
|
+
|
|
17
|
+
@property
|
|
18
|
+
def cookie_header(self):
|
|
19
|
+
"""Converts stored cookies into an HTTP Cookie header string."""
|
|
20
|
+
return "; ".join(f"{key}={val}" for key, val in self._cookies.items())
|
|
21
|
+
|
|
22
|
+
@property
|
|
23
|
+
def fed_auth(self):
|
|
24
|
+
# type: () -> Optional[str]
|
|
25
|
+
"""Returns the Primary authentication token."""
|
|
26
|
+
return self._cookies.get("FedAuth", None)
|
|
27
|
+
|
|
28
|
+
@property
|
|
29
|
+
def spo_idcrl(self):
|
|
30
|
+
# type: () -> Optional[str]
|
|
31
|
+
"""Returns the secondary authentication token. (SharePoint Online Identity CRL)"""
|
|
32
|
+
return self._cookies.get("SPOIDCRL", None)
|
|
33
|
+
|
|
34
|
+
@property
|
|
35
|
+
def rt_fa(self):
|
|
36
|
+
# type: () -> Optional[str]
|
|
37
|
+
"""Returns the refresh token for Federated Authentication."""
|
|
38
|
+
return self._cookies.get("rtFa", None)
|
|
39
|
+
|
|
40
|
+
def to_json(self):
|
|
41
|
+
"""Serializes cookies to JSON format."""
|
|
42
|
+
return json.dumps(self._cookies, indent=2)
|
|
43
|
+
|
|
44
|
+
@classmethod
|
|
45
|
+
def from_json(cls, json_data):
|
|
46
|
+
"""Deserializes cookies from JSON format."""
|
|
47
|
+
cookies_dict = json.loads(json_data)
|
|
48
|
+
return cls(cookies_dict)
|