Category
- class O365.category.Categories(*, parent=None, con=None, **kwargs)[source]
Bases:
ApiComponent
- __init__(*, parent=None, con=None, **kwargs)[source]
Object to retrive categories
- Parameters:
parent (Account) – parent object
con (Connection) – connection to use if no parent specified
protocol (Protocol) – protocol to use if no parent specified (kwargs)
main_resource (str) – use this resource instead of parent resource (kwargs)
- create_category(name, color='auto')[source]
Creates a category. If the color is not provided it will be choosed from the pool of unused colors.
- Parameters:
name (str) – The name of this outlook category. Must be unique.
color (str or CategoryColor) – optional color. If not provided will be assigned automatically.
- Returns:
bool
- class O365.category.Category(*, parent=None, con=None, **kwargs)[source]
Bases:
ApiComponent
- __init__(*, parent=None, con=None, **kwargs)[source]
Represents a category by which a user can group Outlook items such as messages and events. It can be used in conjunction with Event, Message, Contact and Post.
- Parameters:
parent (Account) – parent object
con (Connection) – connection to use if no parent specified
protocol (Protocol) – protocol to use if no parent specified (kwargs)
main_resource (str) – use this resource instead of parent resource (kwargs)
- update_color(color)[source]
Updates this Category color :param None or str or CategoryColor color: the category color
- color
A pre-set color constant that characterizes a category, and that is mapped to one of 25 predefined colors.
Type: categoryColor
- name
A unique name that identifies a category in the user’s mailbox.
Type: str
- object_id
The unique id of the category.
Type: str
- class O365.category.CategoryColor(*values)[source]
Bases:
Enum
- classmethod get(color)[source]
Gets a color by name or value. Raises ValueError if not found whithin the collection of colors.
- BLACK = 'preset14'
- BLUE = 'preset7'
- BROWN = 'preset2'
- CRANBERRY = 'preset9'
- DARKBLUE = 'preset22'
- DARKBROWN = 'preset17'
- DARKCRANBERRY = 'preset24'
- DARKGREEN = 'preset19'
- DARKGREY = 'preset13'
- DARKOLIVE = 'preset21'
- DARKORANGE = 'preset16'
- DARKPURPLE = 'preset23'
- DARKRED = 'preset15'
- DARKSTEEL = 'preset11'
- DARKTEAL = 'preset20'
- DARKYELLOW = 'preset18'
- GRAY = 'preset12'
- GREEN = 'preset4'
- OLIVE = 'preset6'
- ORANGE = 'preset1'
- PURPLE = 'preset8'
- RED = 'preset0'
- STEEL = 'preset10'
- TEAL = 'preset5'
- YELLOW = 'preset3'