1
1
from 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
2
5
from office365 .onedrive .drive import Drive
6
+ from office365 .onedrive .driveCollection import DriveCollection
3
7
from office365 .onedrive .listCollection import ListCollection
4
- from office365 .runtime .resource_path_entity import ResourcePathEntity
5
8
6
9
7
10
class Site (BaseItem ):
8
11
"""The site resource provides metadata and relationships for a SharePoint site. """
9
12
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
+
10
31
@property
11
32
def lists (self ):
12
33
"""The collection of lists under this site."""
@@ -23,9 +44,27 @@ def drive(self):
23
44
else :
24
45
return Drive (self .context , ResourcePathEntity (self .context , self .resourcePath , "drive" ))
25
46
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
+
26
55
@property
27
56
def sharepointids (self ):
28
57
"""Returns identifiers useful for SharePoint REST compatibility."""
29
58
if self .is_property_available ("sharepointIds" ):
30
59
return self .properties ['sharepointIds' ]
31
60
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