11from office365 .onedrive .baseItem import BaseItem
2+ from office365 .runtime .resource_path_entity import ResourcePathEntity
3+ from office365 .onedrive .columnDefinitionCollection import ColumnDefinitionCollection
4+ from office365 .onedrive .contentTypeCollection import ContentTypeCollection
25from office365 .onedrive .drive import Drive
6+ from office365 .onedrive .driveCollection import DriveCollection
37from office365 .onedrive .listCollection import ListCollection
4- from office365 .runtime .resource_path_entity import ResourcePathEntity
58
69
710class Site (BaseItem ):
811 """The site resource provides metadata and relationships for a SharePoint site. """
912
13+ @property
14+ def columns (self ):
15+ """The collection of columns under this site."""
16+ if self .is_property_available ('columns' ):
17+ return self .properties ['columns' ]
18+ else :
19+ return ColumnDefinitionCollection (self .context ,
20+ ResourcePathEntity (self .context , self .resourcePath , "columns" ))
21+
22+ @property
23+ def contentTypes (self ):
24+ """The collection of content types under this site."""
25+ if self .is_property_available ('contentTypes' ):
26+ return self .properties ['contentTypes' ]
27+ else :
28+ return ContentTypeCollection (self .context ,
29+ ResourcePathEntity (self .context , self .resourcePath , "contentTypes" ))
30+
1031 @property
1132 def lists (self ):
1233 """The collection of lists under this site."""
@@ -23,9 +44,27 @@ def drive(self):
2344 else :
2445 return Drive (self .context , ResourcePathEntity (self .context , self .resourcePath , "drive" ))
2546
47+ @property
48+ def drives (self ):
49+ """The collection of drives under this site."""
50+ if self .is_property_available ('drives' ):
51+ return self .properties ['drives' ]
52+ else :
53+ return DriveCollection (self .context , ResourcePathEntity (self .context , self .resourcePath , "drives" ))
54+
2655 @property
2756 def sharepointids (self ):
2857 """Returns identifiers useful for SharePoint REST compatibility."""
2958 if self .is_property_available ("sharepointIds" ):
3059 return self .properties ['sharepointIds' ]
3160 return None
61+
62+ @property
63+ def sites (self ):
64+ """The collection of sites under this site."""
65+ if self .is_property_available ('sites' ):
66+ return self .properties ['sites' ]
67+ else :
68+ from office365 .onedrive .siteCollection import SiteCollection
69+ return SiteCollection (self .context ,
70+ ResourcePathEntity (self .context , self .resourcePath , "sites" ))
0 commit comments