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
25 changed files
with
280 additions
and
13 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
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 |
---|---|---|
@@ -0,0 +1,25 @@ | ||
from typing import Optional | ||
|
||
from office365.directory.permissions.identity_set import IdentitySet | ||
from office365.entity import Entity | ||
|
||
|
||
class ItemRetentionLabel(Entity): | ||
""" | ||
Groups retention and compliance-related properties on an item into a single structure. | ||
Currently, supported only for driveItem. | ||
""" | ||
|
||
@property | ||
def is_label_applied_explicitly(self): | ||
# type: () -> Optional[bool] | ||
"""Specifies whether the label is applied explicitly on the item. | ||
True indicates that the label is applied explicitly; otherwise, the label is inherited from its parent. | ||
Read-only.""" | ||
return self.properties.get("isLabelAppliedExplicitly", None) | ||
|
||
@property | ||
def label_applied_by(self): | ||
# type: () -> Optional[IdentitySet] | ||
"""Identity of the user who applied the label. Read-only.""" | ||
return self.properties.get("labelAppliedBy", IdentitySet()) |
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 |
---|---|---|
@@ -0,0 +1,5 @@ | ||
from office365.runtime.client_value import ClientValue | ||
|
||
|
||
class WorkbookIcon(ClientValue): | ||
"""Represents a cell icon.""" |
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 |
---|---|---|
@@ -0,0 +1,5 @@ | ||
from office365.entity import Entity | ||
|
||
|
||
class WorkbookRangeFont(Entity): | ||
"""This object represents the font attributes (font name, font size, color, etc.) for an object.""" |
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 |
---|---|---|
@@ -0,0 +1,26 @@ | ||
from office365.onedrive.workbooks.icon import WorkbookIcon | ||
from office365.runtime.client_value import ClientValue | ||
|
||
|
||
class WorkbookSortField(ClientValue): | ||
"""Represents a condition in a sorting operation.""" | ||
|
||
def __init__( | ||
self, ascending=None, color=None, dataOption=None, icon=WorkbookIcon(), key=None | ||
): | ||
""" | ||
:param bool ascending: Represents whether the sorting is done in an ascending fashion. | ||
:param str color: Represents the color that is the target of the condition if the sorting is on font | ||
or cell color. | ||
:param str dataOption: Represents additional sorting options for this field. | ||
Possible values are: Normal, TextAsNumber. | ||
:param WorkbookIcon icon: Represents the icon that is the target of the condition if the sorting | ||
is on the cell's icon. | ||
:param str key: Represents the column (or row, depending on the sort orientation) that the condition is on. | ||
Represented as an offset from the first column (or row). | ||
""" | ||
self.ascending = ascending | ||
self.color = color | ||
self.dataOption = dataOption | ||
self.icon = icon | ||
self.key = key |
16 changes: 16 additions & 0 deletions
16
office365/onedrive/workbooks/tables/pivot_table_collection.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,16 @@ | ||
from office365.entity_collection import EntityCollection | ||
from office365.onedrive.workbooks.tables.pivot_table import WorkbookPivotTable | ||
from office365.runtime.queries.service_operation import ServiceOperationQuery | ||
|
||
|
||
class WorkbookPivotTableCollection(EntityCollection[WorkbookPivotTable]): | ||
def __init__(self, context, resource_path=None): | ||
super(WorkbookPivotTableCollection, self).__init__( | ||
context, WorkbookPivotTable, resource_path | ||
) | ||
|
||
def refresh_all(self): | ||
"""Refreshes the PivotTable.""" | ||
qry = ServiceOperationQuery(self, "refreshAll") | ||
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
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.