-
-
Notifications
You must be signed in to change notification settings - Fork 318
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
14 changed files
with
27 additions
and
3 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
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
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.sharepoint.client_context import ClientContext | ||
from office365.sharepoint.listitems.listitem import ListItem | ||
from tests import test_client_credentials, test_team_site_url | ||
|
||
ctx = ClientContext(test_team_site_url).with_credentials(test_client_credentials) | ||
tasks_list = ctx.web.lists.get_by_title("Company Tasks") | ||
items = tasks_list.items.get().execute_query() | ||
for item in items: # type:ListItem | ||
print("{0}".format(item.properties.get("Title"))) |
File renamed without changes.
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,11 @@ | ||
from office365.sharepoint.client_context import ClientContext | ||
from office365.sharepoint.listitems.listitem import ListItem | ||
from tests import test_client_credentials, test_team_site_url | ||
|
||
ctx = ClientContext(test_team_site_url).with_credentials(test_client_credentials) | ||
lib = ctx.web.lists.get_by_title("Documents") | ||
items = lib.items | ||
ctx.load(items, ["EncodedAbsUrl"]) | ||
ctx.execute_query() | ||
for item in items: # type:ListItem | ||
print("{0}".format(item.properties.get('EncodedAbsUrl'))) |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
6 changes: 5 additions & 1 deletion
6
examples/sharepoint/teams/list_my_teams.py → examples/sharepoint/teams/list_my.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 |
---|---|---|
@@ -1,7 +1,11 @@ | ||
import json | ||
|
||
from office365.sharepoint.client_context import ClientContext | ||
from tests import test_team_site_url, test_user_credentials | ||
|
||
ctx = ClientContext(test_team_site_url).with_credentials(test_user_credentials) | ||
result = ctx.group_site_manager.get_current_user_joined_teams().execute_query() | ||
print(result.value) | ||
data = json.loads(result.value) | ||
for item in data["value"]: | ||
print(item['displayName']) | ||
|