Skip to content

Commit 1d4d0f6

Browse files
committed
introduced fontpackage namespace, updates for directory namespace in SharePoint API
1 parent 7243f97 commit 1d4d0f6

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

55 files changed

+632
-49
lines changed

office365/intune/servicecommunications/health/health.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@
22

33

44
class ServiceHealth(Entity):
5-
"""Represents the health information of a service subscribed by a tenant."""
5+
"""Represents the sitehealth information of a service subscribed by a tenant."""

office365/intune/servicecommunications/issues/issue.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,9 @@
77

88
class ServiceHealthIssue(ServiceAnnouncementBase):
99
"""
10-
Represents a service health issue in a service.
10+
Represents a service sitehealth issue in a service.
1111
12-
The service health issue can be a service incident or service advisory. For example:
12+
The service sitehealth issue can be a service incident or service advisory. For example:
1313
1414
- Service incident: "Exchange mailbox service is down".
1515
- Service advisory: "Users may experience delays in emails reception".

office365/sharepoint/administration/sitemove/__init__.py

Whitespace-only changes.
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
from typing import TYPE_CHECKING
2+
3+
from office365.runtime.paths.service_operation import ServiceOperationPath
4+
from office365.sharepoint.entity import Entity
5+
6+
if TYPE_CHECKING:
7+
from office365.sharepoint.client_context import ClientContext
8+
9+
10+
class SiteMoveService(Entity):
11+
""" """
12+
13+
def __init__(
14+
self,
15+
context,
16+
site_id,
17+
site_subscription_id=None,
18+
source_database_id=None,
19+
target_database_id=None,
20+
):
21+
# type: (ClientContext, str, str, str, str) -> None
22+
""""""
23+
static_path = ServiceOperationPath(
24+
"Microsoft.SharePoint.Administration.SiteMove.Service.SiteMoveService",
25+
{
26+
"siteId": site_id,
27+
"siteSubscriptionId": site_subscription_id,
28+
"sourceDatabaseId": source_database_id,
29+
"targetDatabaseId": target_database_id,
30+
},
31+
)
32+
super(SiteMoveService, self).__init__(context, static_path)
33+
34+
@property
35+
def entity_type_name(self):
36+
return "Microsoft.SharePoint.Administration.SiteMove.Service.SiteMoveService"
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
from office365.runtime.client_value import ClientValue
2+
3+
4+
class SiteMoveServiceInfo(ClientValue):
5+
""" """
6+
7+
@property
8+
def entity_type_name(self):
9+
return (
10+
"Microsoft.SharePoint.Administration.SiteMove.Service.SiteMoveServiceInfo"
11+
)

office365/sharepoint/client_context.py

Lines changed: 27 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -498,6 +498,22 @@ def folder_coloring(self):
498498

499499
return FolderColoring(self, ResourcePath("foldercoloring"))
500500

501+
@property
502+
def font_packages(self):
503+
"""Alias to FontPackageCollection"""
504+
505+
from office365.sharepoint.fontpackages.collection import FontPackageCollection
506+
507+
return FontPackageCollection(self, ResourcePath("fontpackages"))
508+
509+
@property
510+
def site_font_packages(self):
511+
"""Alias to FontPackageCollection"""
512+
513+
from office365.sharepoint.fontpackages.collection import FontPackageCollection
514+
515+
return FontPackageCollection(self, ResourcePath("sitefontpackages"))
516+
501517
@property
502518
def group_site_manager(self):
503519
"""Alias to GroupSiteManager"""
@@ -542,6 +558,16 @@ def profile_loader(self):
542558

543559
return ProfileLoader(self)
544560

561+
@property
562+
def document_crawl_log(self):
563+
"""Alias to DocumentCrawlLog"""
564+
565+
from office365.sharepoint.search.administration.document_crawl_log import (
566+
DocumentCrawlLog,
567+
)
568+
569+
return DocumentCrawlLog(self)
570+
545571
@property
546572
def lists(self):
547573
"""Alias to ListCollection. Gets information about all lists that the current user can access."""
@@ -636,7 +662,7 @@ def home_service(self):
636662
@property
637663
def home_site(self):
638664
"""Alias to SPHSite."""
639-
from office365.sharepoint.sites.sph_site import SPHSite
665+
from office365.sharepoint.sites.home.site import SPHSite
640666

641667
return SPHSite(self, ResourcePath("SPHSite"))
642668

office365/sharepoint/directory/group.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@
55

66

77
class Group(Entity):
8+
""" """
9+
810
def get_members_info(self, row_limit):
911
""""""
1012
return_type = MembersInfo(self.context)

office365/sharepoint/directory/helper.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,8 @@ def get_members_info(context, group_id, row_limit, return_type=None):
8888
@staticmethod
8989
def get_my_groups(context, logon_name, offset, length, return_type=None):
9090
"""
91+
Retrieves information about groups that a user belongs to.
92+
9193
:param office365.sharepoint.client_context.ClientContext context: SharePoint context
9294
:param str logon_name: User's login
9395
:param int offset: Result offset

office365/sharepoint/directory/provider/provider.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,12 @@ def __init__(self, context, resource_path=None):
1313
)
1414
super(SharePointDirectoryProvider, self).__init__(context, resource_path)
1515

16+
def check_site_availability(self, site_url):
17+
""""""
18+
from office365.sharepoint.directory.helper import SPHelper
19+
20+
return SPHelper.check_site_availability(self.context, site_url)
21+
1622
def read_directory_object(self, data):
1723
# type: (DirectoryObjectData) -> ClientResult[DirectoryObjectData]
1824
""""""

office365/sharepoint/directory/user.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@
44

55

66
class User(Entity):
7+
"""Represents a user in the SharePoint Directory"""
8+
79
def is_member_of(self, group_id):
810
return_type = ClientResult(self.context)
911

@@ -18,6 +20,9 @@ def _user_loaded():
1820
return return_type
1921

2022
def get_my_groups(self):
23+
"""
24+
Retrieves information about groups that a user belongs to.
25+
"""
2126
return_type = MyGroupsResult(self.context)
2227

2328
def _user_loaded():

0 commit comments

Comments
 (0)