-
-
Notifications
You must be signed in to change notification settings - Fork 335
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactorings and type hints for collection types
- Loading branch information
Showing
348 changed files
with
742 additions
and
746 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,12 @@ | ||
""" | ||
This example retrieves all of the fields in a SharePoint list. | ||
This example retrieves all fields in a SharePoint list. | ||
""" | ||
|
||
from office365.sharepoint.client_context import ClientContext | ||
from office365.sharepoint.fields.field import Field | ||
from tests import test_client_credentials, test_team_site_url | ||
|
||
client = ClientContext(test_team_site_url).with_credentials(test_client_credentials) | ||
target_list = client.web.lists.get_by_title("Site Pages") | ||
fields = target_list.fields.get().execute_query() | ||
for f in fields: # type: Field | ||
print(f"Field name {f.internal_name}") | ||
for field in fields: | ||
print("Field name {0}".format(field.internal_name)) |
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,12 +1,11 @@ | ||
""" | ||
This example retrieves all of the fields in a SharePoint site. | ||
This example retrieves all fields in a SharePoint site. | ||
""" | ||
from office365.sharepoint.client_context import ClientContext | ||
from office365.sharepoint.fields.field import Field | ||
from tests import test_client_credentials, test_team_site_url | ||
|
||
client = ClientContext(test_team_site_url).with_credentials(test_client_credentials) | ||
|
||
web_fields = client.web.fields.get().execute_query() | ||
for f in web_fields: # type: Field | ||
print(f"Field name {f.internal_name}") | ||
for f in web_fields: | ||
print("Field name {0}".format(f.internal_name)) |
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,12 +1,13 @@ | ||
""" | ||
Demonstrates how to retrieve site groups along with users | ||
""" | ||
from office365.sharepoint.client_context import ClientContext | ||
from office365.sharepoint.principal.groups.group import Group | ||
from office365.sharepoint.principal.users.user import User | ||
from tests import test_client_credentials, test_team_site_url | ||
|
||
ctx = ClientContext(test_team_site_url).with_credentials(test_client_credentials) | ||
|
||
site_groups = ctx.web.site_groups.expand(["Users"]).get().execute_query() | ||
for g in site_groups: # type: Group | ||
for g in site_groups: | ||
print("Group name: {0}".format(g.login_name)) | ||
for u in g.users: # type: User | ||
for u in g.users: | ||
print("User name: {0}".format(u.login_name)) |
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
4 changes: 2 additions & 2 deletions
4
office365/sharepoint/administration/analytics/usage_service.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
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
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,5 +1,5 @@ | ||
from office365.sharepoint.base_entity import BaseEntity | ||
from office365.sharepoint.entity import Entity | ||
|
||
|
||
class AppPrincipalManager(BaseEntity): | ||
class AppPrincipalManager(Entity): | ||
"""Represents a top level object used to manage app principals.""" |
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,5 @@ | ||
from office365.sharepoint.base_entity import BaseEntity | ||
from office365.sharepoint.entity import Entity | ||
|
||
|
||
class AppPrincipalName(BaseEntity): | ||
class AppPrincipalName(Entity): | ||
"""Represents the name of an app principal.""" |
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,7 @@ | ||
from office365.sharepoint.base_entity import BaseEntity | ||
from office365.sharepoint.entity import Entity | ||
|
||
|
||
class AppCollection(BaseEntity): | ||
class AppCollection(Entity): | ||
@property | ||
def entity_type_name(self): | ||
return "Microsoft.AppServices.AppCollection" |
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,5 @@ | ||
from office365.sharepoint.base_entity import BaseEntity | ||
from office365.sharepoint.entity import Entity | ||
|
||
|
||
class SolutionExporter(BaseEntity): | ||
class SolutionExporter(Entity): | ||
pass |
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,5 @@ | ||
from office365.sharepoint.base_entity import BaseEntity | ||
from office365.sharepoint.entity import Entity | ||
|
||
|
||
class UserSolution(BaseEntity): | ||
class UserSolution(Entity): | ||
pass |
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,7 @@ | ||
from office365.sharepoint.base_entity import BaseEntity | ||
from office365.sharepoint.entity import Entity | ||
|
||
|
||
class SPAuthEvent(BaseEntity): | ||
class SPAuthEvent(Entity): | ||
@property | ||
def entity_type_name(self): | ||
return "Microsoft.SharePoint.AuthPolicy.Events.SPAuthEvent" |
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
4 changes: 2 additions & 2 deletions
4
office365/sharepoint/businessdata/infrastructure/securestore/connection_settings.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
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
Oops, something went wrong.