-
-
Notifications
You must be signed in to change notification settings - Fork 344
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
SharePoint model updates, improvements for addressing sharepoint reso…
…urces
- Loading branch information
Showing
21 changed files
with
153 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,6 @@ | ||
""" | ||
""" | ||
import json | ||
|
||
from office365.sharepoint.client_context import ClientContext | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
""" | ||
Exports user profile data. | ||
""" | ||
from office365.sharepoint.client_context import ClientContext | ||
from tests import test_client_credentials, test_site_url | ||
|
||
client = ClientContext(test_site_url).with_credentials(test_client_credentials) | ||
users = ( | ||
client.site.root_web.site_users.filter("IsHiddenInUI eq false") | ||
.get() | ||
.top(10) | ||
.execute_query() | ||
) | ||
|
||
exported_data = {} | ||
for user in users: | ||
exported_data[user.login_name] = client.people_manager.get_properties_for( | ||
user.login_name | ||
) | ||
client.execute_batch() | ||
print(exported_data) |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,11 @@ | ||
from office365.runtime.client_value import ClientValue | ||
from office365.sharepoint.activities.facets.revision_set import RevisionSetFacet | ||
|
||
|
||
class ActivityClientRequest(ClientValue): | ||
def __init__(self, revisionSet=RevisionSetFacet()): | ||
self.revisionSet = revisionSet | ||
|
||
@property | ||
def entity_type_name(self): | ||
return "Microsoft.SharePoint.Activities.ActivityClientRequest" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
9 changes: 9 additions & 0 deletions
9
office365/sharepoint/activities/facets/point_in_time_restore.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
from office365.runtime.client_value import ClientValue | ||
|
||
|
||
class PointInTimeRestoreFacet(ClientValue): | ||
"""""" | ||
|
||
@property | ||
def entity_type_name(self): | ||
return "Microsoft.SharePoint.Activities.PointInTimeRestoreFacet" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
from office365.runtime.client_value import ClientValue | ||
|
||
|
||
class RevisionSetFacet(ClientValue): | ||
""" """ | ||
|
||
@property | ||
def entity_type_name(self): | ||
return "Microsoft.SharePoint.Activities.RevisionSetFacet" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
from office365.runtime.client_value import ClientValue | ||
|
||
|
||
class TaskCompletedFacet(ClientValue): | ||
""" """ | ||
|
||
@property | ||
def entity_type_name(self): | ||
return "Microsoft.SharePoint.Activities.TaskCompletedFacet" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
from office365.runtime.client_value import ClientValue | ||
|
||
|
||
class VersionFacet(ClientValue): | ||
"""""" | ||
|
||
def __init__(self, fromVersion=None): | ||
self.fromVersion = fromVersion | ||
|
||
@property | ||
def entity_type_name(self): | ||
return "Microsoft.SharePoint.Activities.VersionFacet" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,12 @@ | ||
from office365.runtime.queries.service_operation import ServiceOperationQuery | ||
from office365.sharepoint.entity import Entity | ||
|
||
|
||
class SiteVersionPolicyManager(Entity): | ||
"""""" | ||
|
||
def set_auto_expiration(self): | ||
"""""" | ||
qry = ServiceOperationQuery(self, "SetAutoExpiration") | ||
self.context.add_query(qry) | ||
return self |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters