-
-
Notifications
You must be signed in to change notification settings - Fork 342
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Intune API support & typings updates
- Loading branch information
Showing
21 changed files
with
397 additions
and
158 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
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,15 @@ | ||
""" | ||
Retrieve the metadata for a driveItem in a drive by file system path | ||
https://learn.microsoft.com/en-us/graph/api/driveitem-get?view=graph-rest-1.0&tabs=http | ||
https://learn.microsoft.com/en-us/graph/api/driveitem-get?view=graph-rest-1.0 | ||
""" | ||
|
||
from office365.graph_client import GraphClient | ||
from tests.graph_case import acquire_token_by_username_password | ||
from tests import test_client_id, test_password, test_tenant, test_username | ||
|
||
client = GraphClient(acquire_token_by_username_password) | ||
client = GraphClient.with_username_and_password( | ||
test_tenant, test_client_id, test_username, test_password | ||
) | ||
file_path = "Financial Sample.xlsx" | ||
file_item = client.me.drive.root.get_by_path(file_path).get().execute_query() | ||
print(file_item.web_url) |
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
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
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,10 @@ | ||
from office365.runtime.client_value import ClientValue | ||
from office365.runtime.types.collections import StringCollection | ||
|
||
|
||
class ResourceAction(ClientValue): | ||
""" """ | ||
|
||
def __init__(self): | ||
self.allowedResourceActions = StringCollection() | ||
self.notAllowedResourceActions = StringCollection() |
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,10 @@ | ||
from office365.directory.rolemanagement.resource_action import ResourceAction | ||
from office365.runtime.client_value import ClientValue | ||
from office365.runtime.client_value_collection import ClientValueCollection | ||
|
||
|
||
class RolePermission(ClientValue): | ||
""" """ | ||
|
||
def __init__(self, resourceActions=None): | ||
self.resourceActions = ClientValueCollection(ResourceAction, resourceActions) |
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,12 +1,15 @@ | ||
from typing import Optional | ||
|
||
from office365.sharepoint.entity import Entity | ||
|
||
|
||
class FeatureDefinition(Entity): | ||
"""Contains the base definition of a feature, including its name, ID, scope, and version.""" | ||
|
||
def __str__(self): | ||
return self.display_name or self.entity_type_name | ||
|
||
@property | ||
def display_name(self): | ||
""" | ||
:rtype: str or None | ||
""" | ||
# type: () -> Optional[str] | ||
return self.properties.get("DisplayName", None) |
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.