-
-
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.
introduced CoC, sitepages namespace types updates
- Loading branch information
Showing
9 changed files
with
38 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
# Treat each other well | ||
|
||
Everyone participating in the _Office365-REST-Python-Client_ project, and in particular in the issue tracker, | ||
pull requests, and social media activity, is expected to treat other people with respect | ||
and more generally to follow the guidelines articulated in the | ||
[Python Community Code of Conduct](https://www.python.org/psf/codeofconduct/). |
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
Empty file.
2 changes: 1 addition & 1 deletion
2
.../onedrive/sitepages/horizontal_section.py → ...onedrive/sitepages/sections/horizontal.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
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,5 @@ | ||
from office365.runtime.client_value import ClientValue | ||
|
||
|
||
class WebPartPosition(ClientValue): | ||
"""Represents the position information of the given web part to the current page""" |
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,17 @@ | ||
from office365.entity import Entity | ||
from office365.onedrive.sitepages.webparts.position import WebPartPosition | ||
from office365.runtime.client_result import ClientResult | ||
from office365.runtime.queries.service_operation import ServiceOperationQuery | ||
|
||
|
||
class WebPart(Entity): | ||
"""Represents a specific web part instance on a SharePoint page.""" | ||
|
||
def get_position_of_web_part(self): | ||
"""Returns the position of the specified web part in the page.""" | ||
return_type = ClientResult(self.context, WebPartPosition()) | ||
qry = ServiceOperationQuery( | ||
self, "getPositionOfWebPart", return_type=return_type | ||
) | ||
self.context.add_query(qry) | ||
return self |