partition
stringclasses
3 values
func_name
stringlengths
1
134
docstring
stringlengths
1
46.9k
path
stringlengths
4
223
original_string
stringlengths
75
104k
code
stringlengths
75
104k
docstring_tokens
listlengths
1
1.97k
repo
stringlengths
7
55
language
stringclasses
1 value
url
stringlengths
87
315
code_tokens
listlengths
19
28.4k
sha
stringlengths
40
40
train
Range.get_offset_range
Gets an object which represents a range that's offset from the specified range. The dimension of the returned range will match this range. If the resulting range is forced outside the bounds of the worksheet grid, an exception will be thrown. :param int row_offset: The number of rows...
O365/excel.py
def get_offset_range(self, row_offset, column_offset): """ Gets an object which represents a range that's offset from the specified range. The dimension of the returned range will match this range. If the resulting range is forced outside the bounds of the worksheet grid, an ...
def get_offset_range(self, row_offset, column_offset): """ Gets an object which represents a range that's offset from the specified range. The dimension of the returned range will match this range. If the resulting range is forced outside the bounds of the worksheet grid, an ...
[ "Gets", "an", "object", "which", "represents", "a", "range", "that", "s", "offset", "from", "the", "specified", "range", ".", "The", "dimension", "of", "the", "returned", "range", "will", "match", "this", "range", ".", "If", "the", "resulting", "range", "i...
O365/python-o365
python
https://github.com/O365/python-o365/blob/02a71cf3775cc6a3c042e003365d6a07c8c75a73/O365/excel.py#L717-L729
[ "def", "get_offset_range", "(", "self", ",", "row_offset", ",", "column_offset", ")", ":", "return", "self", ".", "_get_range", "(", "'offset_range'", ",", "rowOffset", "=", "row_offset", ",", "columnOffset", "=", "column_offset", ")" ]
02a71cf3775cc6a3c042e003365d6a07c8c75a73
train
Range.clear
Clear range values, format, fill, border, etc. :param str apply_to: Optional. Determines the type of clear action. The possible values are: all, formats, contents.
O365/excel.py
def clear(self, apply_to='all'): """ Clear range values, format, fill, border, etc. :param str apply_to: Optional. Determines the type of clear action. The possible values are: all, formats, contents. """ url = self.build_url(self._endpoints.get('clear_range')) r...
def clear(self, apply_to='all'): """ Clear range values, format, fill, border, etc. :param str apply_to: Optional. Determines the type of clear action. The possible values are: all, formats, contents. """ url = self.build_url(self._endpoints.get('clear_range')) r...
[ "Clear", "range", "values", "format", "fill", "border", "etc", ".", ":", "param", "str", "apply_to", ":", "Optional", ".", "Determines", "the", "type", "of", "clear", "action", ".", "The", "possible", "values", "are", ":", "all", "formats", "contents", "."...
O365/python-o365
python
https://github.com/O365/python-o365/blob/02a71cf3775cc6a3c042e003365d6a07c8c75a73/O365/excel.py#L764-L771
[ "def", "clear", "(", "self", ",", "apply_to", "=", "'all'", ")", ":", "url", "=", "self", ".", "build_url", "(", "self", ".", "_endpoints", ".", "get", "(", "'clear_range'", ")", ")", "return", "bool", "(", "self", ".", "session", ".", "post", "(", ...
02a71cf3775cc6a3c042e003365d6a07c8c75a73
train
Range.delete
Deletes the cells associated with the range. :param str shift: Optional. Specifies which way to shift the cells. The possible values are: up, left.
O365/excel.py
def delete(self, shift='up'): """ Deletes the cells associated with the range. :param str shift: Optional. Specifies which way to shift the cells. The possible values are: up, left. """ url = self.build_url(self._endpoints.get('delete_range')) return bool(self.se...
def delete(self, shift='up'): """ Deletes the cells associated with the range. :param str shift: Optional. Specifies which way to shift the cells. The possible values are: up, left. """ url = self.build_url(self._endpoints.get('delete_range')) return bool(self.se...
[ "Deletes", "the", "cells", "associated", "with", "the", "range", ".", ":", "param", "str", "shift", ":", "Optional", ".", "Specifies", "which", "way", "to", "shift", "the", "cells", ".", "The", "possible", "values", "are", ":", "up", "left", "." ]
O365/python-o365
python
https://github.com/O365/python-o365/blob/02a71cf3775cc6a3c042e003365d6a07c8c75a73/O365/excel.py#L773-L780
[ "def", "delete", "(", "self", ",", "shift", "=", "'up'", ")", ":", "url", "=", "self", ".", "build_url", "(", "self", ".", "_endpoints", ".", "get", "(", "'delete_range'", ")", ")", "return", "bool", "(", "self", ".", "session", ".", "post", "(", "...
02a71cf3775cc6a3c042e003365d6a07c8c75a73
train
Range.merge
Merge the range cells into one region in the worksheet. :param bool across: Optional. Set True to merge cells in each row of the specified range as separate merged cells.
O365/excel.py
def merge(self, across=False): """ Merge the range cells into one region in the worksheet. :param bool across: Optional. Set True to merge cells in each row of the specified range as separate merged cells. """ url = self.build_url(self._endpoints.get('merge_range')) ...
def merge(self, across=False): """ Merge the range cells into one region in the worksheet. :param bool across: Optional. Set True to merge cells in each row of the specified range as separate merged cells. """ url = self.build_url(self._endpoints.get('merge_range')) ...
[ "Merge", "the", "range", "cells", "into", "one", "region", "in", "the", "worksheet", ".", ":", "param", "bool", "across", ":", "Optional", ".", "Set", "True", "to", "merge", "cells", "in", "each", "row", "of", "the", "specified", "range", "as", "separate...
O365/python-o365
python
https://github.com/O365/python-o365/blob/02a71cf3775cc6a3c042e003365d6a07c8c75a73/O365/excel.py#L791-L798
[ "def", "merge", "(", "self", ",", "across", "=", "False", ")", ":", "url", "=", "self", ".", "build_url", "(", "self", ".", "_endpoints", ".", "get", "(", "'merge_range'", ")", ")", "return", "bool", "(", "self", ".", "session", ".", "post", "(", "...
02a71cf3775cc6a3c042e003365d6a07c8c75a73
train
Range.update
Update this range
O365/excel.py
def update(self): """ Update this range """ if not self._track_changes: return True # there's nothing to update data = self.to_api_data(restrict_keys=self._track_changes) response = self.session.patch(self.build_url(''), data=data) if not response: retu...
def update(self): """ Update this range """ if not self._track_changes: return True # there's nothing to update data = self.to_api_data(restrict_keys=self._track_changes) response = self.session.patch(self.build_url(''), data=data) if not response: retu...
[ "Update", "this", "range" ]
O365/python-o365
python
https://github.com/O365/python-o365/blob/02a71cf3775cc6a3c042e003365d6a07c8c75a73/O365/excel.py#L818-L835
[ "def", "update", "(", "self", ")", ":", "if", "not", "self", ".", "_track_changes", ":", "return", "True", "# there's nothing to update", "data", "=", "self", ".", "to_api_data", "(", "restrict_keys", "=", "self", ".", "_track_changes", ")", "response", "=", ...
02a71cf3775cc6a3c042e003365d6a07c8c75a73
train
Range.get_format
Returns a RangeFormat instance with the format of this range
O365/excel.py
def get_format(self): """ Returns a RangeFormat instance with the format of this range """ url = self.build_url(self._endpoints.get('get_format')) response = self.session.get(url) if not response: return None return self.range_format_constructor(parent=self, **{self._...
def get_format(self): """ Returns a RangeFormat instance with the format of this range """ url = self.build_url(self._endpoints.get('get_format')) response = self.session.get(url) if not response: return None return self.range_format_constructor(parent=self, **{self._...
[ "Returns", "a", "RangeFormat", "instance", "with", "the", "format", "of", "this", "range" ]
O365/python-o365
python
https://github.com/O365/python-o365/blob/02a71cf3775cc6a3c042e003365d6a07c8c75a73/O365/excel.py#L851-L857
[ "def", "get_format", "(", "self", ")", ":", "url", "=", "self", ".", "build_url", "(", "self", ".", "_endpoints", ".", "get", "(", "'get_format'", ")", ")", "response", "=", "self", ".", "session", ".", "get", "(", "url", ")", "if", "not", "response"...
02a71cf3775cc6a3c042e003365d6a07c8c75a73
train
NamedRange.update
Updates this named range :param bool visible: Specifies whether the object is visible or not :param str comment: Represents the comment associated with this name :return: Success or Failure
O365/excel.py
def update(self, *, visible=None, comment=None): """ Updates this named range :param bool visible: Specifies whether the object is visible or not :param str comment: Represents the comment associated with this name :return: Success or Failure """ if visible is Non...
def update(self, *, visible=None, comment=None): """ Updates this named range :param bool visible: Specifies whether the object is visible or not :param str comment: Represents the comment associated with this name :return: Success or Failure """ if visible is Non...
[ "Updates", "this", "named", "range", ":", "param", "bool", "visible", ":", "Specifies", "whether", "the", "object", "is", "visible", "or", "not", ":", "param", "str", "comment", ":", "Represents", "the", "comment", "associated", "with", "this", "name", ":", ...
O365/python-o365
python
https://github.com/O365/python-o365/blob/02a71cf3775cc6a3c042e003365d6a07c8c75a73/O365/excel.py#L910-L932
[ "def", "update", "(", "self", ",", "*", ",", "visible", "=", "None", ",", "comment", "=", "None", ")", ":", "if", "visible", "is", "None", "and", "comment", "is", "None", ":", "raise", "ValueError", "(", "'Provide \"visible\" or \"comment\" to update.'", ")"...
02a71cf3775cc6a3c042e003365d6a07c8c75a73
train
TableRow.update
Updates this row
O365/excel.py
def update(self, values): """ Updates this row """ response = self.session.patch(self.build_url(''), data={'values': values}) if not response: return False data = response.json() self.values = data.get('values', self.values) return True
def update(self, values): """ Updates this row """ response = self.session.patch(self.build_url(''), data={'values': values}) if not response: return False data = response.json() self.values = data.get('values', self.values) return True
[ "Updates", "this", "row" ]
O365/python-o365
python
https://github.com/O365/python-o365/blob/02a71cf3775cc6a3c042e003365d6a07c8c75a73/O365/excel.py#L983-L990
[ "def", "update", "(", "self", ",", "values", ")", ":", "response", "=", "self", ".", "session", ".", "patch", "(", "self", ".", "build_url", "(", "''", ")", ",", "data", "=", "{", "'values'", ":", "values", "}", ")", "if", "not", "response", ":", ...
02a71cf3775cc6a3c042e003365d6a07c8c75a73
train
TableColumn.apply_filter
Apply the given filter criteria on the given column. :param str criteria: the criteria to apply criteria example: { "color": "string", "criterion1": "string", "criterion2": "string", "dynamicCriteria": "string", "filterOn": "string", "i...
O365/excel.py
def apply_filter(self, criteria): """ Apply the given filter criteria on the given column. :param str criteria: the criteria to apply criteria example: { "color": "string", "criterion1": "string", "criterion2": "string", "dynamicCriteria": ...
def apply_filter(self, criteria): """ Apply the given filter criteria on the given column. :param str criteria: the criteria to apply criteria example: { "color": "string", "criterion1": "string", "criterion2": "string", "dynamicCriteria": ...
[ "Apply", "the", "given", "filter", "criteria", "on", "the", "given", "column", ".", ":", "param", "str", "criteria", ":", "the", "criteria", "to", "apply", "criteria", "example", ":", "{", "color", ":", "string", "criterion1", ":", "string", "criterion2", ...
O365/python-o365
python
https://github.com/O365/python-o365/blob/02a71cf3775cc6a3c042e003365d6a07c8c75a73/O365/excel.py#L1092-L1108
[ "def", "apply_filter", "(", "self", ",", "criteria", ")", ":", "url", "=", "self", ".", "build_url", "(", "self", ".", "_endpoints", ".", "get", "(", "'apply_filter'", ")", ")", "return", "bool", "(", "self", ".", "session", ".", "post", "(", "url", ...
02a71cf3775cc6a3c042e003365d6a07c8c75a73
train
TableColumn.get_filter
Returns the filter applie to this column
O365/excel.py
def get_filter(self): """ Returns the filter applie to this column """ q = self.q().select('name').expand('filter') response = self.session.get(self.build_url(''), params=q.as_params()) if not response: return None data = response.json() return data.get('crite...
def get_filter(self): """ Returns the filter applie to this column """ q = self.q().select('name').expand('filter') response = self.session.get(self.build_url(''), params=q.as_params()) if not response: return None data = response.json() return data.get('crite...
[ "Returns", "the", "filter", "applie", "to", "this", "column" ]
O365/python-o365
python
https://github.com/O365/python-o365/blob/02a71cf3775cc6a3c042e003365d6a07c8c75a73/O365/excel.py#L1110-L1117
[ "def", "get_filter", "(", "self", ")", ":", "q", "=", "self", ".", "q", "(", ")", ".", "select", "(", "'name'", ")", ".", "expand", "(", "'filter'", ")", "response", "=", "self", ".", "session", ".", "get", "(", "self", ".", "build_url", "(", "''...
02a71cf3775cc6a3c042e003365d6a07c8c75a73
train
Table.get_columns
Return the columns of this table :param int top: specify n columns to retrieve :param int skip: specify n columns to skip
O365/excel.py
def get_columns(self, *, top=None, skip=None): """ Return the columns of this table :param int top: specify n columns to retrieve :param int skip: specify n columns to skip """ url = self.build_url(self._endpoints.get('get_columns')) params = {} if top is...
def get_columns(self, *, top=None, skip=None): """ Return the columns of this table :param int top: specify n columns to retrieve :param int skip: specify n columns to skip """ url = self.build_url(self._endpoints.get('get_columns')) params = {} if top is...
[ "Return", "the", "columns", "of", "this", "table", ":", "param", "int", "top", ":", "specify", "n", "columns", "to", "retrieve", ":", "param", "int", "skip", ":", "specify", "n", "columns", "to", "skip" ]
O365/python-o365
python
https://github.com/O365/python-o365/blob/02a71cf3775cc6a3c042e003365d6a07c8c75a73/O365/excel.py#L1186-L1208
[ "def", "get_columns", "(", "self", ",", "*", ",", "top", "=", "None", ",", "skip", "=", "None", ")", ":", "url", "=", "self", ".", "build_url", "(", "self", ".", "_endpoints", ".", "get", "(", "'get_columns'", ")", ")", "params", "=", "{", "}", "...
02a71cf3775cc6a3c042e003365d6a07c8c75a73
train
Table.get_column
Gets a column from this table by id or name :param id_or_name: the id or name of the column :return: WorkBookTableColumn
O365/excel.py
def get_column(self, id_or_name): """ Gets a column from this table by id or name :param id_or_name: the id or name of the column :return: WorkBookTableColumn """ url = self.build_url(self._endpoints.get('get_column').format(quote(id_or_name))) response = self.ses...
def get_column(self, id_or_name): """ Gets a column from this table by id or name :param id_or_name: the id or name of the column :return: WorkBookTableColumn """ url = self.build_url(self._endpoints.get('get_column').format(quote(id_or_name))) response = self.ses...
[ "Gets", "a", "column", "from", "this", "table", "by", "id", "or", "name", ":", "param", "id_or_name", ":", "the", "id", "or", "name", "of", "the", "column", ":", "return", ":", "WorkBookTableColumn" ]
O365/python-o365
python
https://github.com/O365/python-o365/blob/02a71cf3775cc6a3c042e003365d6a07c8c75a73/O365/excel.py#L1210-L1224
[ "def", "get_column", "(", "self", ",", "id_or_name", ")", ":", "url", "=", "self", ".", "build_url", "(", "self", ".", "_endpoints", ".", "get", "(", "'get_column'", ")", ".", "format", "(", "quote", "(", "id_or_name", ")", ")", ")", "response", "=", ...
02a71cf3775cc6a3c042e003365d6a07c8c75a73
train
Table.get_column_at_index
Returns a table column by it's index :param int index: the zero-indexed position of the column in the table
O365/excel.py
def get_column_at_index(self, index): """ Returns a table column by it's index :param int index: the zero-indexed position of the column in the table """ if index is None: return None url = self.build_url(self._endpoints.get('get_column_index')) respo...
def get_column_at_index(self, index): """ Returns a table column by it's index :param int index: the zero-indexed position of the column in the table """ if index is None: return None url = self.build_url(self._endpoints.get('get_column_index')) respo...
[ "Returns", "a", "table", "column", "by", "it", "s", "index", ":", "param", "int", "index", ":", "the", "zero", "-", "indexed", "position", "of", "the", "column", "in", "the", "table" ]
O365/python-o365
python
https://github.com/O365/python-o365/blob/02a71cf3775cc6a3c042e003365d6a07c8c75a73/O365/excel.py#L1226-L1240
[ "def", "get_column_at_index", "(", "self", ",", "index", ")", ":", "if", "index", "is", "None", ":", "return", "None", "url", "=", "self", ".", "build_url", "(", "self", ".", "_endpoints", ".", "get", "(", "'get_column_index'", ")", ")", "response", "=",...
02a71cf3775cc6a3c042e003365d6a07c8c75a73
train
Table.delete_column
Deletes a Column by its id or name :param id_or_name: the id or name of the column :return bool: Success or Failure
O365/excel.py
def delete_column(self, id_or_name): """ Deletes a Column by its id or name :param id_or_name: the id or name of the column :return bool: Success or Failure """ url = self.build_url(self._endpoints.get('delete_column').format(id=quote(id_or_name))) return bool(sel...
def delete_column(self, id_or_name): """ Deletes a Column by its id or name :param id_or_name: the id or name of the column :return bool: Success or Failure """ url = self.build_url(self._endpoints.get('delete_column').format(id=quote(id_or_name))) return bool(sel...
[ "Deletes", "a", "Column", "by", "its", "id", "or", "name", ":", "param", "id_or_name", ":", "the", "id", "or", "name", "of", "the", "column", ":", "return", "bool", ":", "Success", "or", "Failure" ]
O365/python-o365
python
https://github.com/O365/python-o365/blob/02a71cf3775cc6a3c042e003365d6a07c8c75a73/O365/excel.py#L1242-L1249
[ "def", "delete_column", "(", "self", ",", "id_or_name", ")", ":", "url", "=", "self", ".", "build_url", "(", "self", ".", "_endpoints", ".", "get", "(", "'delete_column'", ")", ".", "format", "(", "id", "=", "quote", "(", "id_or_name", ")", ")", ")", ...
02a71cf3775cc6a3c042e003365d6a07c8c75a73
train
Table.add_column
Adds a column to the table :param str name: the name of the column :param int index: the index at which the column should be added. Defaults to 0. :param list values: a two dimension array of values to add to the column
O365/excel.py
def add_column(self, name, *, index=0, values=None): """ Adds a column to the table :param str name: the name of the column :param int index: the index at which the column should be added. Defaults to 0. :param list values: a two dimension array of values to add to the column ...
def add_column(self, name, *, index=0, values=None): """ Adds a column to the table :param str name: the name of the column :param int index: the index at which the column should be added. Defaults to 0. :param list values: a two dimension array of values to add to the column ...
[ "Adds", "a", "column", "to", "the", "table", ":", "param", "str", "name", ":", "the", "name", "of", "the", "column", ":", "param", "int", "index", ":", "the", "index", "at", "which", "the", "column", "should", "be", "added", ".", "Defaults", "to", "0...
O365/python-o365
python
https://github.com/O365/python-o365/blob/02a71cf3775cc6a3c042e003365d6a07c8c75a73/O365/excel.py#L1251-L1275
[ "def", "add_column", "(", "self", ",", "name", ",", "*", ",", "index", "=", "0", ",", "values", "=", "None", ")", ":", "if", "name", "is", "None", ":", "return", "None", "params", "=", "{", "'name'", ":", "name", ",", "'index'", ":", "index", "}"...
02a71cf3775cc6a3c042e003365d6a07c8c75a73
train
Table.get_rows
Return the rows of this table :param int top: specify n rows to retrieve :param int skip: specify n rows to skip :rtype: TableRow
O365/excel.py
def get_rows(self, *, top=None, skip=None): """ Return the rows of this table :param int top: specify n rows to retrieve :param int skip: specify n rows to skip :rtype: TableRow """ url = self.build_url(self._endpoints.get('get_rows')) params = {} ...
def get_rows(self, *, top=None, skip=None): """ Return the rows of this table :param int top: specify n rows to retrieve :param int skip: specify n rows to skip :rtype: TableRow """ url = self.build_url(self._endpoints.get('get_rows')) params = {} ...
[ "Return", "the", "rows", "of", "this", "table", ":", "param", "int", "top", ":", "specify", "n", "rows", "to", "retrieve", ":", "param", "int", "skip", ":", "specify", "n", "rows", "to", "skip", ":", "rtype", ":", "TableRow" ]
O365/python-o365
python
https://github.com/O365/python-o365/blob/02a71cf3775cc6a3c042e003365d6a07c8c75a73/O365/excel.py#L1277-L1300
[ "def", "get_rows", "(", "self", ",", "*", ",", "top", "=", "None", ",", "skip", "=", "None", ")", ":", "url", "=", "self", ".", "build_url", "(", "self", ".", "_endpoints", ".", "get", "(", "'get_rows'", ")", ")", "params", "=", "{", "}", "if", ...
02a71cf3775cc6a3c042e003365d6a07c8c75a73
train
Table.get_row
Returns a Row instance at an index
O365/excel.py
def get_row(self, index): """ Returns a Row instance at an index """ url = self.build_url(self._endpoints.get('get_row').format(id=index)) response = self.session.get(url) if not response: return None return self.row_constructor(parent=self, **{self._cloud_data_key: r...
def get_row(self, index): """ Returns a Row instance at an index """ url = self.build_url(self._endpoints.get('get_row').format(id=index)) response = self.session.get(url) if not response: return None return self.row_constructor(parent=self, **{self._cloud_data_key: r...
[ "Returns", "a", "Row", "instance", "at", "an", "index" ]
O365/python-o365
python
https://github.com/O365/python-o365/blob/02a71cf3775cc6a3c042e003365d6a07c8c75a73/O365/excel.py#L1302-L1308
[ "def", "get_row", "(", "self", ",", "index", ")", ":", "url", "=", "self", ".", "build_url", "(", "self", ".", "_endpoints", ".", "get", "(", "'get_row'", ")", ".", "format", "(", "id", "=", "index", ")", ")", "response", "=", "self", ".", "session...
02a71cf3775cc6a3c042e003365d6a07c8c75a73
train
Table.get_row_at_index
Returns a table row by it's index :param int index: the zero-indexed position of the row in the table
O365/excel.py
def get_row_at_index(self, index): """ Returns a table row by it's index :param int index: the zero-indexed position of the row in the table """ if index is None: return None url = self.build_url(self._endpoints.get('get_row_index')) response = self.s...
def get_row_at_index(self, index): """ Returns a table row by it's index :param int index: the zero-indexed position of the row in the table """ if index is None: return None url = self.build_url(self._endpoints.get('get_row_index')) response = self.s...
[ "Returns", "a", "table", "row", "by", "it", "s", "index", ":", "param", "int", "index", ":", "the", "zero", "-", "indexed", "position", "of", "the", "row", "in", "the", "table" ]
O365/python-o365
python
https://github.com/O365/python-o365/blob/02a71cf3775cc6a3c042e003365d6a07c8c75a73/O365/excel.py#L1310-L1324
[ "def", "get_row_at_index", "(", "self", ",", "index", ")", ":", "if", "index", "is", "None", ":", "return", "None", "url", "=", "self", ".", "build_url", "(", "self", ".", "_endpoints", ".", "get", "(", "'get_row_index'", ")", ")", "response", "=", "se...
02a71cf3775cc6a3c042e003365d6a07c8c75a73
train
Table.delete_row
Deletes a Row by it's index :param int index: the index of the row. zero indexed :return bool: Success or Failure
O365/excel.py
def delete_row(self, index): """ Deletes a Row by it's index :param int index: the index of the row. zero indexed :return bool: Success or Failure """ url = self.build_url(self._endpoints.get('delete_row').format(id=index)) return bool(self.session.post(url))
def delete_row(self, index): """ Deletes a Row by it's index :param int index: the index of the row. zero indexed :return bool: Success or Failure """ url = self.build_url(self._endpoints.get('delete_row').format(id=index)) return bool(self.session.post(url))
[ "Deletes", "a", "Row", "by", "it", "s", "index", ":", "param", "int", "index", ":", "the", "index", "of", "the", "row", ".", "zero", "indexed", ":", "return", "bool", ":", "Success", "or", "Failure" ]
O365/python-o365
python
https://github.com/O365/python-o365/blob/02a71cf3775cc6a3c042e003365d6a07c8c75a73/O365/excel.py#L1326-L1333
[ "def", "delete_row", "(", "self", ",", "index", ")", ":", "url", "=", "self", ".", "build_url", "(", "self", ".", "_endpoints", ".", "get", "(", "'delete_row'", ")", ".", "format", "(", "id", "=", "index", ")", ")", "return", "bool", "(", "self", "...
02a71cf3775cc6a3c042e003365d6a07c8c75a73
train
Table.add_rows
Add rows to this table. Multiple rows can be added at once. This request might occasionally receive a 504 HTTP error. The appropriate response to this error is to repeat the request. :param list values: Optional. a 1 or 2 dimensional array of values to add :param int index: Opt...
O365/excel.py
def add_rows(self, values=None, index=None): """ Add rows to this table. Multiple rows can be added at once. This request might occasionally receive a 504 HTTP error. The appropriate response to this error is to repeat the request. :param list values: Optional. a 1 or 2...
def add_rows(self, values=None, index=None): """ Add rows to this table. Multiple rows can be added at once. This request might occasionally receive a 504 HTTP error. The appropriate response to this error is to repeat the request. :param list values: Optional. a 1 or 2...
[ "Add", "rows", "to", "this", "table", ".", "Multiple", "rows", "can", "be", "added", "at", "once", "." ]
O365/python-o365
python
https://github.com/O365/python-o365/blob/02a71cf3775cc6a3c042e003365d6a07c8c75a73/O365/excel.py#L1335-L1362
[ "def", "add_rows", "(", "self", ",", "values", "=", "None", ",", "index", "=", "None", ")", ":", "params", "=", "{", "}", "if", "values", "is", "not", "None", ":", "if", "values", "and", "not", "isinstance", "(", "values", "[", "0", "]", ",", "li...
02a71cf3775cc6a3c042e003365d6a07c8c75a73
train
Table.update
Updates this table :param str name: the name of the table :param bool show_headers: whether or not to show the headers :param bool show_totals: whether or not to show the totals :param str style: the style of the table :return: Success or Failure
O365/excel.py
def update(self, *, name=None, show_headers=None, show_totals=None, style=None): """ Updates this table :param str name: the name of the table :param bool show_headers: whether or not to show the headers :param bool show_totals: whether or not to show the totals :param st...
def update(self, *, name=None, show_headers=None, show_totals=None, style=None): """ Updates this table :param str name: the name of the table :param bool show_headers: whether or not to show the headers :param bool show_totals: whether or not to show the totals :param st...
[ "Updates", "this", "table", ":", "param", "str", "name", ":", "the", "name", "of", "the", "table", ":", "param", "bool", "show_headers", ":", "whether", "or", "not", "to", "show", "the", "headers", ":", "param", "bool", "show_totals", ":", "whether", "or...
O365/python-o365
python
https://github.com/O365/python-o365/blob/02a71cf3775cc6a3c042e003365d6a07c8c75a73/O365/excel.py#L1364-L1395
[ "def", "update", "(", "self", ",", "*", ",", "name", "=", "None", ",", "show_headers", "=", "None", ",", "show_totals", "=", "None", ",", "style", "=", "None", ")", ":", "if", "name", "is", "None", "and", "show_headers", "is", "None", "and", "show_to...
02a71cf3775cc6a3c042e003365d6a07c8c75a73
train
Table._get_range
Returns a Range based on the endpoint name
O365/excel.py
def _get_range(self, endpoint_name): """ Returns a Range based on the endpoint name """ url = self.build_url(self._endpoints.get(endpoint_name)) response = self.session.get(url) if not response: return None data = response.json() return self.range_constructor...
def _get_range(self, endpoint_name): """ Returns a Range based on the endpoint name """ url = self.build_url(self._endpoints.get(endpoint_name)) response = self.session.get(url) if not response: return None data = response.json() return self.range_constructor...
[ "Returns", "a", "Range", "based", "on", "the", "endpoint", "name" ]
O365/python-o365
python
https://github.com/O365/python-o365/blob/02a71cf3775cc6a3c042e003365d6a07c8c75a73/O365/excel.py#L1402-L1410
[ "def", "_get_range", "(", "self", ",", "endpoint_name", ")", ":", "url", "=", "self", ".", "build_url", "(", "self", ".", "_endpoints", ".", "get", "(", "endpoint_name", ")", ")", "response", "=", "self", ".", "session", ".", "get", "(", "url", ")", ...
02a71cf3775cc6a3c042e003365d6a07c8c75a73
train
Table.get_worksheet
Returns this table worksheet
O365/excel.py
def get_worksheet(self): """ Returns this table worksheet """ url = self.build_url('') q = self.q().select('name').expand('worksheet') response = self.session.get(url, params=q.as_params()) if not response: return None data = response.json() ws = data...
def get_worksheet(self): """ Returns this table worksheet """ url = self.build_url('') q = self.q().select('name').expand('worksheet') response = self.session.get(url, params=q.as_params()) if not response: return None data = response.json() ws = data...
[ "Returns", "this", "table", "worksheet" ]
O365/python-o365
python
https://github.com/O365/python-o365/blob/02a71cf3775cc6a3c042e003365d6a07c8c75a73/O365/excel.py#L1442-L1454
[ "def", "get_worksheet", "(", "self", ")", ":", "url", "=", "self", ".", "build_url", "(", "''", ")", "q", "=", "self", ".", "q", "(", ")", ".", "select", "(", "'name'", ")", ".", "expand", "(", "'worksheet'", ")", "response", "=", "self", ".", "s...
02a71cf3775cc6a3c042e003365d6a07c8c75a73
train
WorkSheet.update
Changes the name, position or visibility of this worksheet
O365/excel.py
def update(self, *, name=None, position=None, visibility=None): """ Changes the name, position or visibility of this worksheet """ if name is None and position is None and visibility is None: raise ValueError('Provide at least one parameter to update') data = {} if name: ...
def update(self, *, name=None, position=None, visibility=None): """ Changes the name, position or visibility of this worksheet """ if name is None and position is None and visibility is None: raise ValueError('Provide at least one parameter to update') data = {} if name: ...
[ "Changes", "the", "name", "position", "or", "visibility", "of", "this", "worksheet" ]
O365/python-o365
python
https://github.com/O365/python-o365/blob/02a71cf3775cc6a3c042e003365d6a07c8c75a73/O365/excel.py#L1512-L1534
[ "def", "update", "(", "self", ",", "*", ",", "name", "=", "None", ",", "position", "=", "None", ",", "visibility", "=", "None", ")", ":", "if", "name", "is", "None", "and", "position", "is", "None", "and", "visibility", "is", "None", ":", "raise", ...
02a71cf3775cc6a3c042e003365d6a07c8c75a73
train
WorkSheet.get_tables
Returns a collection of this worksheet tables
O365/excel.py
def get_tables(self): """ Returns a collection of this worksheet tables""" url = self.build_url(self._endpoints.get('get_tables')) response = self.session.get(url) if not response: return [] data = response.json() return [self.table_constructor(parent=self...
def get_tables(self): """ Returns a collection of this worksheet tables""" url = self.build_url(self._endpoints.get('get_tables')) response = self.session.get(url) if not response: return [] data = response.json() return [self.table_constructor(parent=self...
[ "Returns", "a", "collection", "of", "this", "worksheet", "tables" ]
O365/python-o365
python
https://github.com/O365/python-o365/blob/02a71cf3775cc6a3c042e003365d6a07c8c75a73/O365/excel.py#L1536-L1548
[ "def", "get_tables", "(", "self", ")", ":", "url", "=", "self", ".", "build_url", "(", "self", ".", "_endpoints", ".", "get", "(", "'get_tables'", ")", ")", "response", "=", "self", ".", "session", ".", "get", "(", "url", ")", "if", "not", "response"...
02a71cf3775cc6a3c042e003365d6a07c8c75a73
train
WorkSheet.get_table
Retrieves a Table by id or name :param str id_or_name: The id or name of the column :return: a Table instance
O365/excel.py
def get_table(self, id_or_name): """ Retrieves a Table by id or name :param str id_or_name: The id or name of the column :return: a Table instance """ url = self.build_url(self._endpoints.get('get_table').format(id=id_or_name)) response = self.session.get(url) ...
def get_table(self, id_or_name): """ Retrieves a Table by id or name :param str id_or_name: The id or name of the column :return: a Table instance """ url = self.build_url(self._endpoints.get('get_table').format(id=id_or_name)) response = self.session.get(url) ...
[ "Retrieves", "a", "Table", "by", "id", "or", "name", ":", "param", "str", "id_or_name", ":", "The", "id", "or", "name", "of", "the", "column", ":", "return", ":", "a", "Table", "instance" ]
O365/python-o365
python
https://github.com/O365/python-o365/blob/02a71cf3775cc6a3c042e003365d6a07c8c75a73/O365/excel.py#L1550-L1560
[ "def", "get_table", "(", "self", ",", "id_or_name", ")", ":", "url", "=", "self", ".", "build_url", "(", "self", ".", "_endpoints", ".", "get", "(", "'get_table'", ")", ".", "format", "(", "id", "=", "id_or_name", ")", ")", "response", "=", "self", "...
02a71cf3775cc6a3c042e003365d6a07c8c75a73
train
WorkSheet.add_table
Adds a table to this worksheet :param str address: a range address eg: 'A1:D4' :param bool has_headers: if the range address includes headers or not :return: a Table instance
O365/excel.py
def add_table(self, address, has_headers): """ Adds a table to this worksheet :param str address: a range address eg: 'A1:D4' :param bool has_headers: if the range address includes headers or not :return: a Table instance """ if address is None: return...
def add_table(self, address, has_headers): """ Adds a table to this worksheet :param str address: a range address eg: 'A1:D4' :param bool has_headers: if the range address includes headers or not :return: a Table instance """ if address is None: return...
[ "Adds", "a", "table", "to", "this", "worksheet", ":", "param", "str", "address", ":", "a", "range", "address", "eg", ":", "A1", ":", "D4", ":", "param", "bool", "has_headers", ":", "if", "the", "range", "address", "includes", "headers", "or", "not", ":...
O365/python-o365
python
https://github.com/O365/python-o365/blob/02a71cf3775cc6a3c042e003365d6a07c8c75a73/O365/excel.py#L1562-L1579
[ "def", "add_table", "(", "self", ",", "address", ",", "has_headers", ")", ":", "if", "address", "is", "None", ":", "return", "None", "params", "=", "{", "'address'", ":", "address", ",", "'hasHeaders'", ":", "has_headers", "}", "url", "=", "self", ".", ...
02a71cf3775cc6a3c042e003365d6a07c8c75a73
train
WorkSheet.get_range
Returns a Range instance from whitin this worksheet :param str address: Optional, the range address you want :return: a Range instance
O365/excel.py
def get_range(self, address=None): """ Returns a Range instance from whitin this worksheet :param str address: Optional, the range address you want :return: a Range instance """ url = self.build_url(self._endpoints.get('get_range')) if address is not None: ...
def get_range(self, address=None): """ Returns a Range instance from whitin this worksheet :param str address: Optional, the range address you want :return: a Range instance """ url = self.build_url(self._endpoints.get('get_range')) if address is not None: ...
[ "Returns", "a", "Range", "instance", "from", "whitin", "this", "worksheet", ":", "param", "str", "address", ":", "Optional", "the", "range", "address", "you", "want", ":", "return", ":", "a", "Range", "instance" ]
O365/python-o365
python
https://github.com/O365/python-o365/blob/02a71cf3775cc6a3c042e003365d6a07c8c75a73/O365/excel.py#L1581-L1593
[ "def", "get_range", "(", "self", ",", "address", "=", "None", ")", ":", "url", "=", "self", ".", "build_url", "(", "self", ".", "_endpoints", ".", "get", "(", "'get_range'", ")", ")", "if", "address", "is", "not", "None", ":", "url", "=", "\"{}(addre...
02a71cf3775cc6a3c042e003365d6a07c8c75a73
train
WorkSheet.get_cell
Gets the range object containing the single cell based on row and column numbers.
O365/excel.py
def get_cell(self, row, column): """ Gets the range object containing the single cell based on row and column numbers. """ url = self.build_url(self._endpoints.get('get_cell').format(row=row, column=column)) response = self.session.get(url) if not response: return None ...
def get_cell(self, row, column): """ Gets the range object containing the single cell based on row and column numbers. """ url = self.build_url(self._endpoints.get('get_cell').format(row=row, column=column)) response = self.session.get(url) if not response: return None ...
[ "Gets", "the", "range", "object", "containing", "the", "single", "cell", "based", "on", "row", "and", "column", "numbers", "." ]
O365/python-o365
python
https://github.com/O365/python-o365/blob/02a71cf3775cc6a3c042e003365d6a07c8c75a73/O365/excel.py#L1605-L1611
[ "def", "get_cell", "(", "self", ",", "row", ",", "column", ")", ":", "url", "=", "self", ".", "build_url", "(", "self", ".", "_endpoints", ".", "get", "(", "'get_cell'", ")", ".", "format", "(", "row", "=", "row", ",", "column", "=", "column", ")",...
02a71cf3775cc6a3c042e003365d6a07c8c75a73
train
WorkSheet.add_named_range
Adds a new name to the collection of the given scope using the user's locale for the formula :param str name: the name of this range :param str reference: the reference for this range or formula :param str comment: a comment to describe this named range :param bool is_formula: True if th...
O365/excel.py
def add_named_range(self, name, reference, comment='', is_formula=False): """ Adds a new name to the collection of the given scope using the user's locale for the formula :param str name: the name of this range :param str reference: the reference for this range or formula :param ...
def add_named_range(self, name, reference, comment='', is_formula=False): """ Adds a new name to the collection of the given scope using the user's locale for the formula :param str name: the name of this range :param str reference: the reference for this range or formula :param ...
[ "Adds", "a", "new", "name", "to", "the", "collection", "of", "the", "given", "scope", "using", "the", "user", "s", "locale", "for", "the", "formula", ":", "param", "str", "name", ":", "the", "name", "of", "this", "range", ":", "param", "str", "referenc...
O365/python-o365
python
https://github.com/O365/python-o365/blob/02a71cf3775cc6a3c042e003365d6a07c8c75a73/O365/excel.py#L1613-L1634
[ "def", "add_named_range", "(", "self", ",", "name", ",", "reference", ",", "comment", "=", "''", ",", "is_formula", "=", "False", ")", ":", "if", "is_formula", ":", "url", "=", "self", ".", "build_url", "(", "self", ".", "_endpoints", ".", "get", "(", ...
02a71cf3775cc6a3c042e003365d6a07c8c75a73
train
WorkSheet.get_named_range
Retrieves a Named range by it's name
O365/excel.py
def get_named_range(self, name): """ Retrieves a Named range by it's name """ url = self.build_url(self._endpoints.get('get_named_range').format(name=name)) response = self.session.get(url) if not response: return None return self.named_range_constructor(parent=self, ...
def get_named_range(self, name): """ Retrieves a Named range by it's name """ url = self.build_url(self._endpoints.get('get_named_range').format(name=name)) response = self.session.get(url) if not response: return None return self.named_range_constructor(parent=self, ...
[ "Retrieves", "a", "Named", "range", "by", "it", "s", "name" ]
O365/python-o365
python
https://github.com/O365/python-o365/blob/02a71cf3775cc6a3c042e003365d6a07c8c75a73/O365/excel.py#L1636-L1642
[ "def", "get_named_range", "(", "self", ",", "name", ")", ":", "url", "=", "self", ".", "build_url", "(", "self", ".", "_endpoints", ".", "get", "(", "'get_named_range'", ")", ".", "format", "(", "name", "=", "name", ")", ")", "response", "=", "self", ...
02a71cf3775cc6a3c042e003365d6a07c8c75a73
train
WorkBook.get_worksheets
Returns a collection of this workbook worksheets
O365/excel.py
def get_worksheets(self): """ Returns a collection of this workbook worksheets""" url = self.build_url(self._endpoints.get('get_worksheets')) response = self.session.get(url) if not response: return [] data = response.json() return [self.worksheet_construc...
def get_worksheets(self): """ Returns a collection of this workbook worksheets""" url = self.build_url(self._endpoints.get('get_worksheets')) response = self.session.get(url) if not response: return [] data = response.json() return [self.worksheet_construc...
[ "Returns", "a", "collection", "of", "this", "workbook", "worksheets" ]
O365/python-o365
python
https://github.com/O365/python-o365/blob/02a71cf3775cc6a3c042e003365d6a07c8c75a73/O365/excel.py#L1720-L1732
[ "def", "get_worksheets", "(", "self", ")", ":", "url", "=", "self", ".", "build_url", "(", "self", ".", "_endpoints", ".", "get", "(", "'get_worksheets'", ")", ")", "response", "=", "self", ".", "session", ".", "get", "(", "url", ")", "if", "not", "r...
02a71cf3775cc6a3c042e003365d6a07c8c75a73
train
WorkBook.get_worksheet
Gets a specific worksheet by id or name
O365/excel.py
def get_worksheet(self, id_or_name): """ Gets a specific worksheet by id or name """ url = self.build_url(self._endpoints.get('get_worksheet').format(id=quote(id_or_name))) response = self.session.get(url) if not response: return None return self.worksheet_constructor...
def get_worksheet(self, id_or_name): """ Gets a specific worksheet by id or name """ url = self.build_url(self._endpoints.get('get_worksheet').format(id=quote(id_or_name))) response = self.session.get(url) if not response: return None return self.worksheet_constructor...
[ "Gets", "a", "specific", "worksheet", "by", "id", "or", "name" ]
O365/python-o365
python
https://github.com/O365/python-o365/blob/02a71cf3775cc6a3c042e003365d6a07c8c75a73/O365/excel.py#L1734-L1740
[ "def", "get_worksheet", "(", "self", ",", "id_or_name", ")", ":", "url", "=", "self", ".", "build_url", "(", "self", ".", "_endpoints", ".", "get", "(", "'get_worksheet'", ")", ".", "format", "(", "id", "=", "quote", "(", "id_or_name", ")", ")", ")", ...
02a71cf3775cc6a3c042e003365d6a07c8c75a73
train
WorkBook.add_worksheet
Adds a new worksheet
O365/excel.py
def add_worksheet(self, name=None): """ Adds a new worksheet """ url = self.build_url(self._endpoints.get('get_worksheets')) response = self.session.post(url, data={'name': name} if name else None) if not response: return None data = response.json() return sel...
def add_worksheet(self, name=None): """ Adds a new worksheet """ url = self.build_url(self._endpoints.get('get_worksheets')) response = self.session.post(url, data={'name': name} if name else None) if not response: return None data = response.json() return sel...
[ "Adds", "a", "new", "worksheet" ]
O365/python-o365
python
https://github.com/O365/python-o365/blob/02a71cf3775cc6a3c042e003365d6a07c8c75a73/O365/excel.py#L1742-L1749
[ "def", "add_worksheet", "(", "self", ",", "name", "=", "None", ")", ":", "url", "=", "self", ".", "build_url", "(", "self", ".", "_endpoints", ".", "get", "(", "'get_worksheets'", ")", ")", "response", "=", "self", ".", "session", ".", "post", "(", "...
02a71cf3775cc6a3c042e003365d6a07c8c75a73
train
WorkBook.delete_worksheet
Deletes a worksheet by it's id
O365/excel.py
def delete_worksheet(self, worksheet_id): """ Deletes a worksheet by it's id """ url = self.build_url(self._endpoints.get('get_worksheet').format(id=quote(worksheet_id))) return bool(self.session.delete(url))
def delete_worksheet(self, worksheet_id): """ Deletes a worksheet by it's id """ url = self.build_url(self._endpoints.get('get_worksheet').format(id=quote(worksheet_id))) return bool(self.session.delete(url))
[ "Deletes", "a", "worksheet", "by", "it", "s", "id" ]
O365/python-o365
python
https://github.com/O365/python-o365/blob/02a71cf3775cc6a3c042e003365d6a07c8c75a73/O365/excel.py#L1751-L1754
[ "def", "delete_worksheet", "(", "self", ",", "worksheet_id", ")", ":", "url", "=", "self", ".", "build_url", "(", "self", ".", "_endpoints", ".", "get", "(", "'get_worksheet'", ")", ".", "format", "(", "id", "=", "quote", "(", "worksheet_id", ")", ")", ...
02a71cf3775cc6a3c042e003365d6a07c8c75a73
train
WorkBook.invoke_function
Invokes an Excel Function
O365/excel.py
def invoke_function(self, function_name, **function_params): """ Invokes an Excel Function """ url = self.build_url(self._endpoints.get('function').format(function_name)) response = self.session.post(url, data=function_params) if not response: return None data = respo...
def invoke_function(self, function_name, **function_params): """ Invokes an Excel Function """ url = self.build_url(self._endpoints.get('function').format(function_name)) response = self.session.post(url, data=function_params) if not response: return None data = respo...
[ "Invokes", "an", "Excel", "Function" ]
O365/python-o365
python
https://github.com/O365/python-o365/blob/02a71cf3775cc6a3c042e003365d6a07c8c75a73/O365/excel.py#L1756-L1768
[ "def", "invoke_function", "(", "self", ",", "function_name", ",", "*", "*", "function_params", ")", ":", "url", "=", "self", ".", "build_url", "(", "self", ".", "_endpoints", ".", "get", "(", "'function'", ")", ".", "format", "(", "function_name", ")", "...
02a71cf3775cc6a3c042e003365d6a07c8c75a73
train
WorkBook.get_named_ranges
Returns the list of named ranges for this Workbook
O365/excel.py
def get_named_ranges(self): """ Returns the list of named ranges for this Workbook """ url = self.build_url(self._endpoints.get('get_names')) response = self.session.get(url) if not response: return [] data = response.json() return [self.named_range_construct...
def get_named_ranges(self): """ Returns the list of named ranges for this Workbook """ url = self.build_url(self._endpoints.get('get_names')) response = self.session.get(url) if not response: return [] data = response.json() return [self.named_range_construct...
[ "Returns", "the", "list", "of", "named", "ranges", "for", "this", "Workbook" ]
O365/python-o365
python
https://github.com/O365/python-o365/blob/02a71cf3775cc6a3c042e003365d6a07c8c75a73/O365/excel.py#L1770-L1779
[ "def", "get_named_ranges", "(", "self", ")", ":", "url", "=", "self", ".", "build_url", "(", "self", ".", "_endpoints", ".", "get", "(", "'get_names'", ")", ")", "response", "=", "self", ".", "session", ".", "get", "(", "url", ")", "if", "not", "resp...
02a71cf3775cc6a3c042e003365d6a07c8c75a73
train
EventRecurrence.to_api_data
Returns a dict to communicate with the server :rtype: dict
O365/calendar.py
def to_api_data(self): """ Returns a dict to communicate with the server :rtype: dict """ data = {} # recurrence pattern if self.__interval and isinstance(self.__interval, int): recurrence_pattern = data[self._cc('pattern')] = {} recurrence_patter...
def to_api_data(self): """ Returns a dict to communicate with the server :rtype: dict """ data = {} # recurrence pattern if self.__interval and isinstance(self.__interval, int): recurrence_pattern = data[self._cc('pattern')] = {} recurrence_patter...
[ "Returns", "a", "dict", "to", "communicate", "with", "the", "server" ]
O365/python-o365
python
https://github.com/O365/python-o365/blob/02a71cf3775cc6a3c042e003365d6a07c8c75a73/O365/calendar.py#L341-L397
[ "def", "to_api_data", "(", "self", ")", ":", "data", "=", "{", "}", "# recurrence pattern", "if", "self", ".", "__interval", "and", "isinstance", "(", "self", ".", "__interval", ",", "int", ")", ":", "recurrence_pattern", "=", "data", "[", "self", ".", "...
02a71cf3775cc6a3c042e003365d6a07c8c75a73
train
EventRecurrence._clear_pattern
Clears this event recurrence
O365/calendar.py
def _clear_pattern(self): """ Clears this event recurrence """ # pattern group self.__interval = None self.__days_of_week = set() self.__first_day_of_week = None self.__day_of_month = None self.__month = None self.__index = 'first' # range group ...
def _clear_pattern(self): """ Clears this event recurrence """ # pattern group self.__interval = None self.__days_of_week = set() self.__first_day_of_week = None self.__day_of_month = None self.__month = None self.__index = 'first' # range group ...
[ "Clears", "this", "event", "recurrence" ]
O365/python-o365
python
https://github.com/O365/python-o365/blob/02a71cf3775cc6a3c042e003365d6a07c8c75a73/O365/calendar.py#L399-L411
[ "def", "_clear_pattern", "(", "self", ")", ":", "# pattern group", "self", ".", "__interval", "=", "None", "self", ".", "__days_of_week", "=", "set", "(", ")", "self", ".", "__first_day_of_week", "=", "None", "self", ".", "__day_of_month", "=", "None", "self...
02a71cf3775cc6a3c042e003365d6a07c8c75a73
train
EventRecurrence.set_range
Set the range of recurrence :param date start: Start date of repetition :param date end: End date of repetition :param int occurrences: no of occurrences
O365/calendar.py
def set_range(self, start=None, end=None, occurrences=None): """ Set the range of recurrence :param date start: Start date of repetition :param date end: End date of repetition :param int occurrences: no of occurrences """ if start is None: if self.__start_da...
def set_range(self, start=None, end=None, occurrences=None): """ Set the range of recurrence :param date start: Start date of repetition :param date end: End date of repetition :param int occurrences: no of occurrences """ if start is None: if self.__start_da...
[ "Set", "the", "range", "of", "recurrence" ]
O365/python-o365
python
https://github.com/O365/python-o365/blob/02a71cf3775cc6a3c042e003365d6a07c8c75a73/O365/calendar.py#L413-L430
[ "def", "set_range", "(", "self", ",", "start", "=", "None", ",", "end", "=", "None", ",", "occurrences", "=", "None", ")", ":", "if", "start", "is", "None", ":", "if", "self", ".", "__start_date", "is", "None", ":", "self", ".", "__start_date", "=", ...
02a71cf3775cc6a3c042e003365d6a07c8c75a73
train
EventRecurrence.set_daily
Set to repeat every x no. of days :param int interval: no. of days to repeat at :keyword date start: Start date of repetition (kwargs) :keyword date end: End date of repetition (kwargs) :keyword int occurrences: no of occurrences (kwargs)
O365/calendar.py
def set_daily(self, interval, **kwargs): """ Set to repeat every x no. of days :param int interval: no. of days to repeat at :keyword date start: Start date of repetition (kwargs) :keyword date end: End date of repetition (kwargs) :keyword int occurrences: no of occurrences (kwa...
def set_daily(self, interval, **kwargs): """ Set to repeat every x no. of days :param int interval: no. of days to repeat at :keyword date start: Start date of repetition (kwargs) :keyword date end: End date of repetition (kwargs) :keyword int occurrences: no of occurrences (kwa...
[ "Set", "to", "repeat", "every", "x", "no", ".", "of", "days" ]
O365/python-o365
python
https://github.com/O365/python-o365/blob/02a71cf3775cc6a3c042e003365d6a07c8c75a73/O365/calendar.py#L432-L442
[ "def", "set_daily", "(", "self", ",", "interval", ",", "*", "*", "kwargs", ")", ":", "self", ".", "_clear_pattern", "(", ")", "self", ".", "__interval", "=", "interval", "self", ".", "set_range", "(", "*", "*", "kwargs", ")" ]
02a71cf3775cc6a3c042e003365d6a07c8c75a73
train
EventRecurrence.set_weekly
Set to repeat every week on specified days for every x no. of days :param int interval: no. of days to repeat at :param str first_day_of_week: starting day for a week :param list[str] days_of_week: list of days of the week to repeat :keyword date start: Start date of repetition (kwargs)...
O365/calendar.py
def set_weekly(self, interval, *, days_of_week, first_day_of_week, **kwargs): """ Set to repeat every week on specified days for every x no. of days :param int interval: no. of days to repeat at :param str first_day_of_week: starting day for a week :param list[str] da...
def set_weekly(self, interval, *, days_of_week, first_day_of_week, **kwargs): """ Set to repeat every week on specified days for every x no. of days :param int interval: no. of days to repeat at :param str first_day_of_week: starting day for a week :param list[str] da...
[ "Set", "to", "repeat", "every", "week", "on", "specified", "days", "for", "every", "x", "no", ".", "of", "days" ]
O365/python-o365
python
https://github.com/O365/python-o365/blob/02a71cf3775cc6a3c042e003365d6a07c8c75a73/O365/calendar.py#L444-L457
[ "def", "set_weekly", "(", "self", ",", "interval", ",", "*", ",", "days_of_week", ",", "first_day_of_week", ",", "*", "*", "kwargs", ")", ":", "self", ".", "set_daily", "(", "interval", ",", "*", "*", "kwargs", ")", "self", ".", "__days_of_week", "=", ...
02a71cf3775cc6a3c042e003365d6a07c8c75a73
train
EventRecurrence.set_monthly
Set to repeat every month on specified days for every x no. of days :param int interval: no. of days to repeat at :param int day_of_month: repeat day of a month :param list[str] days_of_week: list of days of the week to repeat :param index: index :keyword date start: Start date ...
O365/calendar.py
def set_monthly(self, interval, *, day_of_month=None, days_of_week=None, index=None, **kwargs): """ Set to repeat every month on specified days for every x no. of days :param int interval: no. of days to repeat at :param int day_of_month: repeat day of a month :param...
def set_monthly(self, interval, *, day_of_month=None, days_of_week=None, index=None, **kwargs): """ Set to repeat every month on specified days for every x no. of days :param int interval: no. of days to repeat at :param int day_of_month: repeat day of a month :param...
[ "Set", "to", "repeat", "every", "month", "on", "specified", "days", "for", "every", "x", "no", ".", "of", "days" ]
O365/python-o365
python
https://github.com/O365/python-o365/blob/02a71cf3775cc6a3c042e003365d6a07c8c75a73/O365/calendar.py#L459-L481
[ "def", "set_monthly", "(", "self", ",", "interval", ",", "*", ",", "day_of_month", "=", "None", ",", "days_of_week", "=", "None", ",", "index", "=", "None", ",", "*", "*", "kwargs", ")", ":", "if", "not", "day_of_month", "and", "not", "days_of_week", "...
02a71cf3775cc6a3c042e003365d6a07c8c75a73
train
EventRecurrence.set_yearly
Set to repeat every month on specified days for every x no. of days :param int interval: no. of days to repeat at :param int month: month to repeat :param int day_of_month: repeat day of a month :param list[str] days_of_week: list of days of the week to repeat :param index: inde...
O365/calendar.py
def set_yearly(self, interval, month, *, day_of_month=None, days_of_week=None, index=None, **kwargs): """ Set to repeat every month on specified days for every x no. of days :param int interval: no. of days to repeat at :param int month: month to repeat :param int day...
def set_yearly(self, interval, month, *, day_of_month=None, days_of_week=None, index=None, **kwargs): """ Set to repeat every month on specified days for every x no. of days :param int interval: no. of days to repeat at :param int month: month to repeat :param int day...
[ "Set", "to", "repeat", "every", "month", "on", "specified", "days", "for", "every", "x", "no", ".", "of", "days" ]
O365/python-o365
python
https://github.com/O365/python-o365/blob/02a71cf3775cc6a3c042e003365d6a07c8c75a73/O365/calendar.py#L483-L498
[ "def", "set_yearly", "(", "self", ",", "interval", ",", "month", ",", "*", ",", "day_of_month", "=", "None", ",", "days_of_week", "=", "None", ",", "index", "=", "None", ",", "*", "*", "kwargs", ")", ":", "self", ".", "set_monthly", "(", "interval", ...
02a71cf3775cc6a3c042e003365d6a07c8c75a73
train
Attendees.add
Add attendees to the parent event :param attendees: list of attendees to add :type attendees: str or tuple(str, str) or Attendee or list[str] or list[tuple(str,str)] or list[Attendee]
O365/calendar.py
def add(self, attendees): """ Add attendees to the parent event :param attendees: list of attendees to add :type attendees: str or tuple(str, str) or Attendee or list[str] or list[tuple(str,str)] or list[Attendee] """ if attendees: if isinstance(attendees, s...
def add(self, attendees): """ Add attendees to the parent event :param attendees: list of attendees to add :type attendees: str or tuple(str, str) or Attendee or list[str] or list[tuple(str,str)] or list[Attendee] """ if attendees: if isinstance(attendees, s...
[ "Add", "attendees", "to", "the", "parent", "event" ]
O365/python-o365
python
https://github.com/O365/python-o365/blob/02a71cf3775cc6a3c042e003365d6a07c8c75a73/O365/calendar.py#L680-L728
[ "def", "add", "(", "self", ",", "attendees", ")", ":", "if", "attendees", ":", "if", "isinstance", "(", "attendees", ",", "str", ")", ":", "self", ".", "__attendees", ".", "append", "(", "Attendee", "(", "address", "=", "attendees", ",", "event", "=", ...
02a71cf3775cc6a3c042e003365d6a07c8c75a73
train
Attendees.remove
Remove the provided attendees from the event :param attendees: list of attendees to add :type attendees: str or tuple(str, str) or Attendee or list[str] or list[tuple(str,str)] or list[Attendee]
O365/calendar.py
def remove(self, attendees): """ Remove the provided attendees from the event :param attendees: list of attendees to add :type attendees: str or tuple(str, str) or Attendee or list[str] or list[tuple(str,str)] or list[Attendee] """ if isinstance(attendees, (list, tuple)...
def remove(self, attendees): """ Remove the provided attendees from the event :param attendees: list of attendees to add :type attendees: str or tuple(str, str) or Attendee or list[str] or list[tuple(str,str)] or list[Attendee] """ if isinstance(attendees, (list, tuple)...
[ "Remove", "the", "provided", "attendees", "from", "the", "event" ]
O365/python-o365
python
https://github.com/O365/python-o365/blob/02a71cf3775cc6a3c042e003365d6a07c8c75a73/O365/calendar.py#L730-L754
[ "def", "remove", "(", "self", ",", "attendees", ")", ":", "if", "isinstance", "(", "attendees", ",", "(", "list", ",", "tuple", ")", ")", ":", "attendees", "=", "{", "attendee", ".", "address", "if", "isinstance", "(", "attendee", ",", "Attendee", ")",...
02a71cf3775cc6a3c042e003365d6a07c8c75a73
train
Attendees.to_api_data
Returns a dict to communicate with the server :rtype: dict
O365/calendar.py
def to_api_data(self): """ Returns a dict to communicate with the server :rtype: dict """ data = [] for attendee in self.__attendees: if attendee.address: att_data = { self._cc('emailAddress'): { self._cc('a...
def to_api_data(self): """ Returns a dict to communicate with the server :rtype: dict """ data = [] for attendee in self.__attendees: if attendee.address: att_data = { self._cc('emailAddress'): { self._cc('a...
[ "Returns", "a", "dict", "to", "communicate", "with", "the", "server" ]
O365/python-o365
python
https://github.com/O365/python-o365/blob/02a71cf3775cc6a3c042e003365d6a07c8c75a73/O365/calendar.py#L756-L772
[ "def", "to_api_data", "(", "self", ")", ":", "data", "=", "[", "]", "for", "attendee", "in", "self", ".", "__attendees", ":", "if", "attendee", ".", "address", ":", "att_data", "=", "{", "self", ".", "_cc", "(", "'emailAddress'", ")", ":", "{", "self...
02a71cf3775cc6a3c042e003365d6a07c8c75a73
train
Event.to_api_data
Returns a dict to communicate with the server :param restrict_keys: a set of keys to restrict the returned data to :rtype: dict
O365/calendar.py
def to_api_data(self, restrict_keys=None): """ Returns a dict to communicate with the server :param restrict_keys: a set of keys to restrict the returned data to :rtype: dict """ cc = self._cc # alias data = { cc('subject'): self.__subject, cc('b...
def to_api_data(self, restrict_keys=None): """ Returns a dict to communicate with the server :param restrict_keys: a set of keys to restrict the returned data to :rtype: dict """ cc = self._cc # alias data = { cc('subject'): self.__subject, cc('b...
[ "Returns", "a", "dict", "to", "communicate", "with", "the", "server" ]
O365/python-o365
python
https://github.com/O365/python-o365/blob/02a71cf3775cc6a3c042e003365d6a07c8c75a73/O365/calendar.py#L893-L929
[ "def", "to_api_data", "(", "self", ",", "restrict_keys", "=", "None", ")", ":", "cc", "=", "self", ".", "_cc", "# alias", "data", "=", "{", "cc", "(", "'subject'", ")", ":", "self", ".", "__subject", ",", "cc", "(", "'body'", ")", ":", "{", "cc", ...
02a71cf3775cc6a3c042e003365d6a07c8c75a73
train
Event.get_occurrences
Returns all the occurrences of a seriesMaster event for a specified time range. :type start: datetime :param start: the start of the time range :type end: datetime :param end: the end of the time range :param int limit: ax no. of events to get. Over 999 uses batch. :type ...
O365/calendar.py
def get_occurrences(self, start, end, *, limit=None, query=None, order_by=None, batch=None): """ Returns all the occurrences of a seriesMaster event for a specified time range. :type start: datetime :param start: the start of the time range :type end: datetime :param end:...
def get_occurrences(self, start, end, *, limit=None, query=None, order_by=None, batch=None): """ Returns all the occurrences of a seriesMaster event for a specified time range. :type start: datetime :param start: the start of the time range :type end: datetime :param end:...
[ "Returns", "all", "the", "occurrences", "of", "a", "seriesMaster", "event", "for", "a", "specified", "time", "range", ".", ":", "type", "start", ":", "datetime", ":", "param", "start", ":", "the", "start", "of", "the", "time", "range", ":", "type", "end"...
O365/python-o365
python
https://github.com/O365/python-o365/blob/02a71cf3775cc6a3c042e003365d6a07c8c75a73/O365/calendar.py#L1239-L1308
[ "def", "get_occurrences", "(", "self", ",", "start", ",", "end", ",", "*", ",", "limit", "=", "None", ",", "query", "=", "None", ",", "order_by", "=", "None", ",", "batch", "=", "None", ")", ":", "if", "self", ".", "event_type", "!=", "EventType", ...
02a71cf3775cc6a3c042e003365d6a07c8c75a73
train
Event.save
Create a new event or update an existing one by checking what values have changed and update them on the server :return: Success / Failure :rtype: bool
O365/calendar.py
def save(self): """ Create a new event or update an existing one by checking what values have changed and update them on the server :return: Success / Failure :rtype: bool """ if self.object_id: # update event if not self._track_changes: ...
def save(self): """ Create a new event or update an existing one by checking what values have changed and update them on the server :return: Success / Failure :rtype: bool """ if self.object_id: # update event if not self._track_changes: ...
[ "Create", "a", "new", "event", "or", "update", "an", "existing", "one", "by", "checking", "what", "values", "have", "changed", "and", "update", "them", "on", "the", "server" ]
O365/python-o365
python
https://github.com/O365/python-o365/blob/02a71cf3775cc6a3c042e003365d6a07c8c75a73/O365/calendar.py#L1326-L1375
[ "def", "save", "(", "self", ")", ":", "if", "self", ".", "object_id", ":", "# update event", "if", "not", "self", ".", "_track_changes", ":", "return", "True", "# there's nothing to update", "url", "=", "self", ".", "build_url", "(", "self", ".", "_endpoints...
02a71cf3775cc6a3c042e003365d6a07c8c75a73
train
Event.decline_event
Decline the event :param str comment: comment to add :param bool send_response: whether or not to send response back :return: Success / Failure :rtype: bool
O365/calendar.py
def decline_event(self, comment=None, *, send_response=True): """ Decline the event :param str comment: comment to add :param bool send_response: whether or not to send response back :return: Success / Failure :rtype: bool """ if not self.object_id: r...
def decline_event(self, comment=None, *, send_response=True): """ Decline the event :param str comment: comment to add :param bool send_response: whether or not to send response back :return: Success / Failure :rtype: bool """ if not self.object_id: r...
[ "Decline", "the", "event" ]
O365/python-o365
python
https://github.com/O365/python-o365/blob/02a71cf3775cc6a3c042e003365d6a07c8c75a73/O365/calendar.py#L1404-L1427
[ "def", "decline_event", "(", "self", ",", "comment", "=", "None", ",", "*", ",", "send_response", "=", "True", ")", ":", "if", "not", "self", ".", "object_id", ":", "raise", "RuntimeError", "(", "\"Can't accept event that doesn't exist\"", ")", "url", "=", "...
02a71cf3775cc6a3c042e003365d6a07c8c75a73
train
Event.get_body_text
Parse the body html and returns the body text using bs4 :return: body text :rtype: str
O365/calendar.py
def get_body_text(self): """ Parse the body html and returns the body text using bs4 :return: body text :rtype: str """ if self.body_type != 'HTML': return self.body try: soup = bs(self.body, 'html.parser') except RuntimeError: ...
def get_body_text(self): """ Parse the body html and returns the body text using bs4 :return: body text :rtype: str """ if self.body_type != 'HTML': return self.body try: soup = bs(self.body, 'html.parser') except RuntimeError: ...
[ "Parse", "the", "body", "html", "and", "returns", "the", "body", "text", "using", "bs4" ]
O365/python-o365
python
https://github.com/O365/python-o365/blob/02a71cf3775cc6a3c042e003365d6a07c8c75a73/O365/calendar.py#L1429-L1443
[ "def", "get_body_text", "(", "self", ")", ":", "if", "self", ".", "body_type", "!=", "'HTML'", ":", "return", "self", ".", "body", "try", ":", "soup", "=", "bs", "(", "self", ".", "body", ",", "'html.parser'", ")", "except", "RuntimeError", ":", "retur...
02a71cf3775cc6a3c042e003365d6a07c8c75a73
train
Calendar.update
Updates this calendar. Only name and color can be changed. :return: Success / Failure :rtype: bool
O365/calendar.py
def update(self): """ Updates this calendar. Only name and color can be changed. :return: Success / Failure :rtype: bool """ if not self.calendar_id: return False url = self.build_url(self._endpoints.get('calendar')) data = { self._cc('...
def update(self): """ Updates this calendar. Only name and color can be changed. :return: Success / Failure :rtype: bool """ if not self.calendar_id: return False url = self.build_url(self._endpoints.get('calendar')) data = { self._cc('...
[ "Updates", "this", "calendar", ".", "Only", "name", "and", "color", "can", "be", "changed", "." ]
O365/python-o365
python
https://github.com/O365/python-o365/blob/02a71cf3775cc6a3c042e003365d6a07c8c75a73/O365/calendar.py#L1521-L1542
[ "def", "update", "(", "self", ")", ":", "if", "not", "self", ".", "calendar_id", ":", "return", "False", "url", "=", "self", ".", "build_url", "(", "self", ".", "_endpoints", ".", "get", "(", "'calendar'", ")", ")", "data", "=", "{", "self", ".", "...
02a71cf3775cc6a3c042e003365d6a07c8c75a73
train
Calendar.get_events
Get events from the this Calendar :param int limit: max no. of events to get. Over 999 uses batch. :param query: applies a OData filter to the request :type query: Query or str :param order_by: orders the result set based on this condition :type order_by: Query or str :p...
O365/calendar.py
def get_events(self, limit=25, *, query=None, order_by=None, batch=None, download_attachments=False, include_recurring=True): """ Get events from the this Calendar :param int limit: max no. of events to get. Over 999 uses batch. :param query: applies a OData filter to the req...
def get_events(self, limit=25, *, query=None, order_by=None, batch=None, download_attachments=False, include_recurring=True): """ Get events from the this Calendar :param int limit: max no. of events to get. Over 999 uses batch. :param query: applies a OData filter to the req...
[ "Get", "events", "from", "the", "this", "Calendar" ]
O365/python-o365
python
https://github.com/O365/python-o365/blob/02a71cf3775cc6a3c042e003365d6a07c8c75a73/O365/calendar.py#L1565-L1663
[ "def", "get_events", "(", "self", ",", "limit", "=", "25", ",", "*", ",", "query", "=", "None", ",", "order_by", "=", "None", ",", "batch", "=", "None", ",", "download_attachments", "=", "False", ",", "include_recurring", "=", "True", ")", ":", "if", ...
02a71cf3775cc6a3c042e003365d6a07c8c75a73
train
Calendar.new_event
Returns a new (unsaved) Event object :rtype: Event
O365/calendar.py
def new_event(self, subject=None): """ Returns a new (unsaved) Event object :rtype: Event """ return self.event_constructor(parent=self, subject=subject, calendar_id=self.calendar_id)
def new_event(self, subject=None): """ Returns a new (unsaved) Event object :rtype: Event """ return self.event_constructor(parent=self, subject=subject, calendar_id=self.calendar_id)
[ "Returns", "a", "new", "(", "unsaved", ")", "Event", "object" ]
O365/python-o365
python
https://github.com/O365/python-o365/blob/02a71cf3775cc6a3c042e003365d6a07c8c75a73/O365/calendar.py#L1665-L1671
[ "def", "new_event", "(", "self", ",", "subject", "=", "None", ")", ":", "return", "self", ".", "event_constructor", "(", "parent", "=", "self", ",", "subject", "=", "subject", ",", "calendar_id", "=", "self", ".", "calendar_id", ")" ]
02a71cf3775cc6a3c042e003365d6a07c8c75a73
train
Calendar.get_event
Returns an Event instance by it's id :param param: an event_id or a Query instance :return: event for the specified info :rtype: Event
O365/calendar.py
def get_event(self, param): """ Returns an Event instance by it's id :param param: an event_id or a Query instance :return: event for the specified info :rtype: Event """ if param is None: return None if isinstance(param, str): url = self...
def get_event(self, param): """ Returns an Event instance by it's id :param param: an event_id or a Query instance :return: event for the specified info :rtype: Event """ if param is None: return None if isinstance(param, str): url = self...
[ "Returns", "an", "Event", "instance", "by", "it", "s", "id" ]
O365/python-o365
python
https://github.com/O365/python-o365/blob/02a71cf3775cc6a3c042e003365d6a07c8c75a73/O365/calendar.py#L1673-L1710
[ "def", "get_event", "(", "self", ",", "param", ")", ":", "if", "param", "is", "None", ":", "return", "None", "if", "isinstance", "(", "param", ",", "str", ")", ":", "url", "=", "self", ".", "build_url", "(", "self", ".", "_endpoints", ".", "get", "...
02a71cf3775cc6a3c042e003365d6a07c8c75a73
train
Schedule.list_calendars
Gets a list of calendars To use query an order_by check the OData specification here: http://docs.oasis-open.org/odata/odata/v4.0/errata03/os/complete/ part2-url-conventions/odata-v4.0-errata03-os-part2-url-conventions -complete.html :param int limit: max no. of calendars to ge...
O365/calendar.py
def list_calendars(self, limit=None, *, query=None, order_by=None): """ Gets a list of calendars To use query an order_by check the OData specification here: http://docs.oasis-open.org/odata/odata/v4.0/errata03/os/complete/ part2-url-conventions/odata-v4.0-errata03-os-part2-url-conventi...
def list_calendars(self, limit=None, *, query=None, order_by=None): """ Gets a list of calendars To use query an order_by check the OData specification here: http://docs.oasis-open.org/odata/odata/v4.0/errata03/os/complete/ part2-url-conventions/odata-v4.0-errata03-os-part2-url-conventi...
[ "Gets", "a", "list", "of", "calendars" ]
O365/python-o365
python
https://github.com/O365/python-o365/blob/02a71cf3775cc6a3c042e003365d6a07c8c75a73/O365/calendar.py#L1752-L1789
[ "def", "list_calendars", "(", "self", ",", "limit", "=", "None", ",", "*", ",", "query", "=", "None", ",", "order_by", "=", "None", ")", ":", "url", "=", "self", ".", "build_url", "(", "self", ".", "_endpoints", ".", "get", "(", "'root_calendars'", "...
02a71cf3775cc6a3c042e003365d6a07c8c75a73
train
Schedule.new_calendar
Creates a new calendar :param str calendar_name: name of the new calendar :return: a new Calendar instance :rtype: Calendar
O365/calendar.py
def new_calendar(self, calendar_name): """ Creates a new calendar :param str calendar_name: name of the new calendar :return: a new Calendar instance :rtype: Calendar """ if not calendar_name: return None url = self.build_url(self._endpoints.get('roo...
def new_calendar(self, calendar_name): """ Creates a new calendar :param str calendar_name: name of the new calendar :return: a new Calendar instance :rtype: Calendar """ if not calendar_name: return None url = self.build_url(self._endpoints.get('roo...
[ "Creates", "a", "new", "calendar" ]
O365/python-o365
python
https://github.com/O365/python-o365/blob/02a71cf3775cc6a3c042e003365d6a07c8c75a73/O365/calendar.py#L1791-L1811
[ "def", "new_calendar", "(", "self", ",", "calendar_name", ")", ":", "if", "not", "calendar_name", ":", "return", "None", "url", "=", "self", ".", "build_url", "(", "self", ".", "_endpoints", ".", "get", "(", "'root_calendars'", ")", ")", "response", "=", ...
02a71cf3775cc6a3c042e003365d6a07c8c75a73
train
Schedule.get_calendar
Returns a calendar by it's id or name :param str calendar_id: the calendar id to be retrieved. :param str calendar_name: the calendar name to be retrieved. :return: calendar for the given info :rtype: Calendar
O365/calendar.py
def get_calendar(self, calendar_id=None, calendar_name=None): """ Returns a calendar by it's id or name :param str calendar_id: the calendar id to be retrieved. :param str calendar_name: the calendar name to be retrieved. :return: calendar for the given info :rtype: Calendar ...
def get_calendar(self, calendar_id=None, calendar_name=None): """ Returns a calendar by it's id or name :param str calendar_id: the calendar id to be retrieved. :param str calendar_name: the calendar name to be retrieved. :return: calendar for the given info :rtype: Calendar ...
[ "Returns", "a", "calendar", "by", "it", "s", "id", "or", "name" ]
O365/python-o365
python
https://github.com/O365/python-o365/blob/02a71cf3775cc6a3c042e003365d6a07c8c75a73/O365/calendar.py#L1813-L1853
[ "def", "get_calendar", "(", "self", ",", "calendar_id", "=", "None", ",", "calendar_name", "=", "None", ")", ":", "if", "calendar_id", "and", "calendar_name", ":", "raise", "RuntimeError", "(", "'Provide only one of the options'", ")", "if", "not", "calendar_id", ...
02a71cf3775cc6a3c042e003365d6a07c8c75a73
train
Schedule.get_default_calendar
Returns the default calendar for the current user :rtype: Calendar
O365/calendar.py
def get_default_calendar(self): """ Returns the default calendar for the current user :rtype: Calendar """ url = self.build_url(self._endpoints.get('default_calendar')) response = self.con.get(url) if not response: return None data = response.json(...
def get_default_calendar(self): """ Returns the default calendar for the current user :rtype: Calendar """ url = self.build_url(self._endpoints.get('default_calendar')) response = self.con.get(url) if not response: return None data = response.json(...
[ "Returns", "the", "default", "calendar", "for", "the", "current", "user" ]
O365/python-o365
python
https://github.com/O365/python-o365/blob/02a71cf3775cc6a3c042e003365d6a07c8c75a73/O365/calendar.py#L1855-L1871
[ "def", "get_default_calendar", "(", "self", ")", ":", "url", "=", "self", ".", "build_url", "(", "self", ".", "_endpoints", ".", "get", "(", "'default_calendar'", ")", ")", "response", "=", "self", ".", "con", ".", "get", "(", "url", ")", "if", "not", ...
02a71cf3775cc6a3c042e003365d6a07c8c75a73
train
Schedule.get_events
Get events from the default Calendar :param int limit: max no. of events to get. Over 999 uses batch. :param query: applies a OData filter to the request :type query: Query or str :param order_by: orders the result set based on this condition :type order_by: Query or str ...
O365/calendar.py
def get_events(self, limit=25, *, query=None, order_by=None, batch=None, download_attachments=False, include_recurring=True): """ Get events from the default Calendar :param int limit: max no. of events to get. Over 999 uses batch. :param query: applies a OData filter to the ...
def get_events(self, limit=25, *, query=None, order_by=None, batch=None, download_attachments=False, include_recurring=True): """ Get events from the default Calendar :param int limit: max no. of events to get. Over 999 uses batch. :param query: applies a OData filter to the ...
[ "Get", "events", "from", "the", "default", "Calendar" ]
O365/python-o365
python
https://github.com/O365/python-o365/blob/02a71cf3775cc6a3c042e003365d6a07c8c75a73/O365/calendar.py#L1873-L1895
[ "def", "get_events", "(", "self", ",", "limit", "=", "25", ",", "*", ",", "query", "=", "None", ",", "order_by", "=", "None", ",", "batch", "=", "None", ",", "download_attachments", "=", "False", ",", "include_recurring", "=", "True", ")", ":", "defaul...
02a71cf3775cc6a3c042e003365d6a07c8c75a73
train
Token.expiration_datetime
Returns the expiration datetime :return datetime: The datetime this token expires
O365/utils/token.py
def expiration_datetime(self): """ Returns the expiration datetime :return datetime: The datetime this token expires """ expires_at = self.get('expires_at') if expires_at is None: # consider it is expired return dt.datetime.now() - dt.timedelta(sec...
def expiration_datetime(self): """ Returns the expiration datetime :return datetime: The datetime this token expires """ expires_at = self.get('expires_at') if expires_at is None: # consider it is expired return dt.datetime.now() - dt.timedelta(sec...
[ "Returns", "the", "expiration", "datetime", ":", "return", "datetime", ":", "The", "datetime", "this", "token", "expires" ]
O365/python-o365
python
https://github.com/O365/python-o365/blob/02a71cf3775cc6a3c042e003365d6a07c8c75a73/O365/utils/token.py#L33-L45
[ "def", "expiration_datetime", "(", "self", ")", ":", "expires_at", "=", "self", ".", "get", "(", "'expires_at'", ")", "if", "expires_at", "is", "None", ":", "# consider it is expired", "return", "dt", ".", "datetime", ".", "now", "(", ")", "-", "dt", ".", ...
02a71cf3775cc6a3c042e003365d6a07c8c75a73
train
BaseTokenBackend.token
Setter to convert any token dict into Token instance
O365/utils/token.py
def token(self, value): """ Setter to convert any token dict into Token instance """ if value and not isinstance(value, Token): value = Token(value) self._token = value
def token(self, value): """ Setter to convert any token dict into Token instance """ if value and not isinstance(value, Token): value = Token(value) self._token = value
[ "Setter", "to", "convert", "any", "token", "dict", "into", "Token", "instance" ]
O365/python-o365
python
https://github.com/O365/python-o365/blob/02a71cf3775cc6a3c042e003365d6a07c8c75a73/O365/utils/token.py#L63-L67
[ "def", "token", "(", "self", ",", "value", ")", ":", "if", "value", "and", "not", "isinstance", "(", "value", ",", "Token", ")", ":", "value", "=", "Token", "(", "value", ")", "self", ".", "_token", "=", "value" ]
02a71cf3775cc6a3c042e003365d6a07c8c75a73
train
FileSystemTokenBackend.get_token
Retrieves the token from the File System :return dict or None: The token if exists, None otherwise
O365/utils/token.py
def get_token(self): """ Retrieves the token from the File System :return dict or None: The token if exists, None otherwise """ token = None if self.token_path.exists(): with self.token_path.open('r') as token_file: token = self.token_construct...
def get_token(self): """ Retrieves the token from the File System :return dict or None: The token if exists, None otherwise """ token = None if self.token_path.exists(): with self.token_path.open('r') as token_file: token = self.token_construct...
[ "Retrieves", "the", "token", "from", "the", "File", "System", ":", "return", "dict", "or", "None", ":", "The", "token", "if", "exists", "None", "otherwise" ]
O365/python-o365
python
https://github.com/O365/python-o365/blob/02a71cf3775cc6a3c042e003365d6a07c8c75a73/O365/utils/token.py#L103-L113
[ "def", "get_token", "(", "self", ")", ":", "token", "=", "None", "if", "self", ".", "token_path", ".", "exists", "(", ")", ":", "with", "self", ".", "token_path", ".", "open", "(", "'r'", ")", "as", "token_file", ":", "token", "=", "self", ".", "to...
02a71cf3775cc6a3c042e003365d6a07c8c75a73
train
FileSystemTokenBackend.save_token
Saves the token dict in the specified file :return bool: Success / Failure
O365/utils/token.py
def save_token(self): """ Saves the token dict in the specified file :return bool: Success / Failure """ if self.token is None: raise ValueError('You have to set the "token" first.') try: if not self.token_path.parent.exists(): sel...
def save_token(self): """ Saves the token dict in the specified file :return bool: Success / Failure """ if self.token is None: raise ValueError('You have to set the "token" first.') try: if not self.token_path.parent.exists(): sel...
[ "Saves", "the", "token", "dict", "in", "the", "specified", "file", ":", "return", "bool", ":", "Success", "/", "Failure" ]
O365/python-o365
python
https://github.com/O365/python-o365/blob/02a71cf3775cc6a3c042e003365d6a07c8c75a73/O365/utils/token.py#L115-L134
[ "def", "save_token", "(", "self", ")", ":", "if", "self", ".", "token", "is", "None", ":", "raise", "ValueError", "(", "'You have to set the \"token\" first.'", ")", "try", ":", "if", "not", "self", ".", "token_path", ".", "parent", ".", "exists", "(", ")"...
02a71cf3775cc6a3c042e003365d6a07c8c75a73
train
FileSystemTokenBackend.delete_token
Deletes the token file :return bool: Success / Failure
O365/utils/token.py
def delete_token(self): """ Deletes the token file :return bool: Success / Failure """ if self.token_path.exists(): self.token_path.unlink() return True return False
def delete_token(self): """ Deletes the token file :return bool: Success / Failure """ if self.token_path.exists(): self.token_path.unlink() return True return False
[ "Deletes", "the", "token", "file", ":", "return", "bool", ":", "Success", "/", "Failure" ]
O365/python-o365
python
https://github.com/O365/python-o365/blob/02a71cf3775cc6a3c042e003365d6a07c8c75a73/O365/utils/token.py#L136-L144
[ "def", "delete_token", "(", "self", ")", ":", "if", "self", ".", "token_path", ".", "exists", "(", ")", ":", "self", ".", "token_path", ".", "unlink", "(", ")", "return", "True", "return", "False" ]
02a71cf3775cc6a3c042e003365d6a07c8c75a73
train
FirestoreBackend.get_token
Retrieves the token from the store :return dict or None: The token if exists, None otherwise
O365/utils/token.py
def get_token(self): """ Retrieves the token from the store :return dict or None: The token if exists, None otherwise """ token = None try: doc = self.doc_ref.get() except Exception as e: log.error('Token (collection: {}, doc_id: {}) ' ...
def get_token(self): """ Retrieves the token from the store :return dict or None: The token if exists, None otherwise """ token = None try: doc = self.doc_ref.get() except Exception as e: log.error('Token (collection: {}, doc_id: {}) ' ...
[ "Retrieves", "the", "token", "from", "the", "store", ":", "return", "dict", "or", "None", ":", "The", "token", "if", "exists", "None", "otherwise" ]
O365/python-o365
python
https://github.com/O365/python-o365/blob/02a71cf3775cc6a3c042e003365d6a07c8c75a73/O365/utils/token.py#L172-L190
[ "def", "get_token", "(", "self", ")", ":", "token", "=", "None", "try", ":", "doc", "=", "self", ".", "doc_ref", ".", "get", "(", ")", "except", "Exception", "as", "e", ":", "log", ".", "error", "(", "'Token (collection: {}, doc_id: {}) '", "'could not be ...
02a71cf3775cc6a3c042e003365d6a07c8c75a73
train
FirestoreBackend.save_token
Saves the token dict in the store :return bool: Success / Failure
O365/utils/token.py
def save_token(self): """ Saves the token dict in the store :return bool: Success / Failure """ if self.token is None: raise ValueError('You have to set the "token" first.') try: # set token will overwrite previous data self.doc_ref.se...
def save_token(self): """ Saves the token dict in the store :return bool: Success / Failure """ if self.token is None: raise ValueError('You have to set the "token" first.') try: # set token will overwrite previous data self.doc_ref.se...
[ "Saves", "the", "token", "dict", "in", "the", "store", ":", "return", "bool", ":", "Success", "/", "Failure" ]
O365/python-o365
python
https://github.com/O365/python-o365/blob/02a71cf3775cc6a3c042e003365d6a07c8c75a73/O365/utils/token.py#L192-L209
[ "def", "save_token", "(", "self", ")", ":", "if", "self", ".", "token", "is", "None", ":", "raise", "ValueError", "(", "'You have to set the \"token\" first.'", ")", "try", ":", "# set token will overwrite previous data", "self", ".", "doc_ref", ".", "set", "(", ...
02a71cf3775cc6a3c042e003365d6a07c8c75a73
train
FirestoreBackend.delete_token
Deletes the token from the store :return bool: Success / Failure
O365/utils/token.py
def delete_token(self): """ Deletes the token from the store :return bool: Success / Failure """ try: self.doc_ref.delete() except Exception as e: log.error('Could not delete the token (key: {}): {}'.format(self.doc_id, str(e))) return ...
def delete_token(self): """ Deletes the token from the store :return bool: Success / Failure """ try: self.doc_ref.delete() except Exception as e: log.error('Could not delete the token (key: {}): {}'.format(self.doc_id, str(e))) return ...
[ "Deletes", "the", "token", "from", "the", "store", ":", "return", "bool", ":", "Success", "/", "Failure" ]
O365/python-o365
python
https://github.com/O365/python-o365/blob/02a71cf3775cc6a3c042e003365d6a07c8c75a73/O365/utils/token.py#L211-L221
[ "def", "delete_token", "(", "self", ")", ":", "try", ":", "self", ".", "doc_ref", ".", "delete", "(", ")", "except", "Exception", "as", "e", ":", "log", ".", "error", "(", "'Could not delete the token (key: {}): {}'", ".", "format", "(", "self", ".", "doc_...
02a71cf3775cc6a3c042e003365d6a07c8c75a73
train
FirestoreBackend.check_token
Checks if the token exists :return bool: True if it exists on the store
O365/utils/token.py
def check_token(self): """ Checks if the token exists :return bool: True if it exists on the store """ try: doc = self.doc_ref.get() except Exception as e: log.error('Token (collection: {}, doc_id: {}) ' 'could not be retrieve...
def check_token(self): """ Checks if the token exists :return bool: True if it exists on the store """ try: doc = self.doc_ref.get() except Exception as e: log.error('Token (collection: {}, doc_id: {}) ' 'could not be retrieve...
[ "Checks", "if", "the", "token", "exists", ":", "return", "bool", ":", "True", "if", "it", "exists", "on", "the", "store" ]
O365/python-o365
python
https://github.com/O365/python-o365/blob/02a71cf3775cc6a3c042e003365d6a07c8c75a73/O365/utils/token.py#L223-L235
[ "def", "check_token", "(", "self", ")", ":", "try", ":", "doc", "=", "self", ".", "doc_ref", ".", "get", "(", ")", "except", "Exception", "as", "e", ":", "log", ".", "error", "(", "'Token (collection: {}, doc_id: {}) '", "'could not be retrieved from the backend...
02a71cf3775cc6a3c042e003365d6a07c8c75a73
train
Account.is_authenticated
Checks whether the library has the authentication and that is not expired :return: True if authenticated, False otherwise
O365/account.py
def is_authenticated(self): """ Checks whether the library has the authentication and that is not expired :return: True if authenticated, False otherwise """ token = self.con.token_backend.token if not token: token = self.con.token_backend.get_token() ...
def is_authenticated(self): """ Checks whether the library has the authentication and that is not expired :return: True if authenticated, False otherwise """ token = self.con.token_backend.token if not token: token = self.con.token_backend.get_token() ...
[ "Checks", "whether", "the", "library", "has", "the", "authentication", "and", "that", "is", "not", "expired", ":", "return", ":", "True", "if", "authenticated", "False", "otherwise" ]
O365/python-o365
python
https://github.com/O365/python-o365/blob/02a71cf3775cc6a3c042e003365d6a07c8c75a73/O365/account.py#L47-L56
[ "def", "is_authenticated", "(", "self", ")", ":", "token", "=", "self", ".", "con", ".", "token_backend", ".", "token", "if", "not", "token", ":", "token", "=", "self", ".", "con", ".", "token_backend", ".", "get_token", "(", ")", "return", "token", "i...
02a71cf3775cc6a3c042e003365d6a07c8c75a73
train
Account.authenticate
Performs the oauth authentication flow resulting in a stored token It uses the credentials passed on instantiation :param list[str] scopes: list of protocol user scopes to be converted by the protocol or scope helpers :param kwargs: other configurations to be passed to the Con...
O365/account.py
def authenticate(self, *, scopes, **kwargs): """ Performs the oauth authentication flow resulting in a stored token It uses the credentials passed on instantiation :param list[str] scopes: list of protocol user scopes to be converted by the protocol or scope helpers :param kwar...
def authenticate(self, *, scopes, **kwargs): """ Performs the oauth authentication flow resulting in a stored token It uses the credentials passed on instantiation :param list[str] scopes: list of protocol user scopes to be converted by the protocol or scope helpers :param kwar...
[ "Performs", "the", "oauth", "authentication", "flow", "resulting", "in", "a", "stored", "token", "It", "uses", "the", "credentials", "passed", "on", "instantiation" ]
O365/python-o365
python
https://github.com/O365/python-o365/blob/02a71cf3775cc6a3c042e003365d6a07c8c75a73/O365/account.py#L58-L71
[ "def", "authenticate", "(", "self", ",", "*", ",", "scopes", ",", "*", "*", "kwargs", ")", ":", "kwargs", ".", "setdefault", "(", "'token_backend'", ",", "self", ".", "con", ".", "token_backend", ")", "return", "oauth_authentication_flow", "(", "*", "self"...
02a71cf3775cc6a3c042e003365d6a07c8c75a73
train
Account.new_message
Creates a new message to be sent or stored :param str resource: Custom resource to be used in this message (Defaults to parent main_resource) :return: New empty message :rtype: Message
O365/account.py
def new_message(self, resource=None): """ Creates a new message to be sent or stored :param str resource: Custom resource to be used in this message (Defaults to parent main_resource) :return: New empty message :rtype: Message """ return Message(parent=self, mai...
def new_message(self, resource=None): """ Creates a new message to be sent or stored :param str resource: Custom resource to be used in this message (Defaults to parent main_resource) :return: New empty message :rtype: Message """ return Message(parent=self, mai...
[ "Creates", "a", "new", "message", "to", "be", "sent", "or", "stored" ]
O365/python-o365
python
https://github.com/O365/python-o365/blob/02a71cf3775cc6a3c042e003365d6a07c8c75a73/O365/account.py#L81-L89
[ "def", "new_message", "(", "self", ",", "resource", "=", "None", ")", ":", "return", "Message", "(", "parent", "=", "self", ",", "main_resource", "=", "resource", ",", "is_draft", "=", "True", ")" ]
02a71cf3775cc6a3c042e003365d6a07c8c75a73
train
Account.address_book
Get an instance to the specified address book for the specified account resource :param str resource: Custom resource to be used in this address book (Defaults to parent main_resource) :param str address_book: Choose from 'Personal' or 'GAL' (Global Address List) :retu...
O365/account.py
def address_book(self, *, resource=None, address_book='personal'): """ Get an instance to the specified address book for the specified account resource :param str resource: Custom resource to be used in this address book (Defaults to parent main_resource) :param str address_boo...
def address_book(self, *, resource=None, address_book='personal'): """ Get an instance to the specified address book for the specified account resource :param str resource: Custom resource to be used in this address book (Defaults to parent main_resource) :param str address_boo...
[ "Get", "an", "instance", "to", "the", "specified", "address", "book", "for", "the", "specified", "account", "resource" ]
O365/python-o365
python
https://github.com/O365/python-o365/blob/02a71cf3775cc6a3c042e003365d6a07c8c75a73/O365/account.py#L101-L121
[ "def", "address_book", "(", "self", ",", "*", ",", "resource", "=", "None", ",", "address_book", "=", "'personal'", ")", ":", "if", "address_book", ".", "lower", "(", ")", "==", "'personal'", ":", "return", "AddressBook", "(", "parent", "=", "self", ",",...
02a71cf3775cc6a3c042e003365d6a07c8c75a73
train
Account.storage
Get an instance to handle file storage (OneDrive / Sharepoint) for the specified account resource :param str resource: Custom resource to be used in this drive object (Defaults to parent main_resource) :return: a representation of OneDrive File Storage :rtype: Storage :...
O365/account.py
def storage(self, *, resource=None): """ Get an instance to handle file storage (OneDrive / Sharepoint) for the specified account resource :param str resource: Custom resource to be used in this drive object (Defaults to parent main_resource) :return: a representation of OneDri...
def storage(self, *, resource=None): """ Get an instance to handle file storage (OneDrive / Sharepoint) for the specified account resource :param str resource: Custom resource to be used in this drive object (Defaults to parent main_resource) :return: a representation of OneDri...
[ "Get", "an", "instance", "to", "handle", "file", "storage", "(", "OneDrive", "/", "Sharepoint", ")", "for", "the", "specified", "account", "resource" ]
O365/python-o365
python
https://github.com/O365/python-o365/blob/02a71cf3775cc6a3c042e003365d6a07c8c75a73/O365/account.py#L134-L149
[ "def", "storage", "(", "self", ",", "*", ",", "resource", "=", "None", ")", ":", "if", "not", "isinstance", "(", "self", ".", "protocol", ",", "MSGraphProtocol", ")", ":", "# TODO: Custom protocol accessing OneDrive/Sharepoint Api fails here", "raise", "RuntimeError...
02a71cf3775cc6a3c042e003365d6a07c8c75a73
train
Account.sharepoint
Get an instance to read information from Sharepoint sites for the specified account resource :param str resource: Custom resource to be used in this sharepoint object (Defaults to parent main_resource) :return: a representation of Sharepoint Sites :rtype: Sharepoint :ra...
O365/account.py
def sharepoint(self, *, resource=''): """ Get an instance to read information from Sharepoint sites for the specified account resource :param str resource: Custom resource to be used in this sharepoint object (Defaults to parent main_resource) :return: a representation of Share...
def sharepoint(self, *, resource=''): """ Get an instance to read information from Sharepoint sites for the specified account resource :param str resource: Custom resource to be used in this sharepoint object (Defaults to parent main_resource) :return: a representation of Share...
[ "Get", "an", "instance", "to", "read", "information", "from", "Sharepoint", "sites", "for", "the", "specified", "account", "resource" ]
O365/python-o365
python
https://github.com/O365/python-o365/blob/02a71cf3775cc6a3c042e003365d6a07c8c75a73/O365/account.py#L151-L167
[ "def", "sharepoint", "(", "self", ",", "*", ",", "resource", "=", "''", ")", ":", "if", "not", "isinstance", "(", "self", ".", "protocol", ",", "MSGraphProtocol", ")", ":", "# TODO: Custom protocol accessing OneDrive/Sharepoint Api fails here", "raise", "RuntimeErro...
02a71cf3775cc6a3c042e003365d6a07c8c75a73
train
Account.planner
Get an instance to read information from Microsoft planner
O365/account.py
def planner(self, *, resource=''): """ Get an instance to read information from Microsoft planner """ if not isinstance(self.protocol, MSGraphProtocol): # TODO: Custom protocol accessing OneDrive/Sharepoint Api fails here raise RuntimeError( 'planner api only wor...
def planner(self, *, resource=''): """ Get an instance to read information from Microsoft planner """ if not isinstance(self.protocol, MSGraphProtocol): # TODO: Custom protocol accessing OneDrive/Sharepoint Api fails here raise RuntimeError( 'planner api only wor...
[ "Get", "an", "instance", "to", "read", "information", "from", "Microsoft", "planner" ]
O365/python-o365
python
https://github.com/O365/python-o365/blob/02a71cf3775cc6a3c042e003365d6a07c8c75a73/O365/account.py#L169-L177
[ "def", "planner", "(", "self", ",", "*", ",", "resource", "=", "''", ")", ":", "if", "not", "isinstance", "(", "self", ".", "protocol", ",", "MSGraphProtocol", ")", ":", "# TODO: Custom protocol accessing OneDrive/Sharepoint Api fails here", "raise", "RuntimeError",...
02a71cf3775cc6a3c042e003365d6a07c8c75a73
train
DownloadableMixin.download
Downloads this file to the local drive. Can download the file in chunks with multiple requests to the server. :param to_path: a path to store the downloaded file :type to_path: str or Path :param str name: the name you want the stored file to have. :param int chunk_size: number ...
O365/drive.py
def download(self, to_path=None, name=None, chunk_size='auto', convert_to_pdf=False): """ Downloads this file to the local drive. Can download the file in chunks with multiple requests to the server. :param to_path: a path to store the downloaded file :type to_path: str...
def download(self, to_path=None, name=None, chunk_size='auto', convert_to_pdf=False): """ Downloads this file to the local drive. Can download the file in chunks with multiple requests to the server. :param to_path: a path to store the downloaded file :type to_path: str...
[ "Downloads", "this", "file", "to", "the", "local", "drive", ".", "Can", "download", "the", "file", "in", "chunks", "with", "multiple", "requests", "to", "the", "server", "." ]
O365/python-o365
python
https://github.com/O365/python-o365/blob/02a71cf3775cc6a3c042e003365d6a07c8c75a73/O365/drive.py#L30-L105
[ "def", "download", "(", "self", ",", "to_path", "=", "None", ",", "name", "=", "None", ",", "chunk_size", "=", "'auto'", ",", "convert_to_pdf", "=", "False", ")", ":", "# TODO: Add download with more than one request (chunk_requests) with", "# header 'Range'. For exampl...
02a71cf3775cc6a3c042e003365d6a07c8c75a73
train
CopyOperation._request_status
Checks the api endpoint to check if the async job progress
O365/drive.py
def _request_status(self): """ Checks the api endpoint to check if the async job progress """ if self.item_id: return True response = self.con.get(self.monitor_url) if not response: return False data = response.json() self.status = data.get('sta...
def _request_status(self): """ Checks the api endpoint to check if the async job progress """ if self.item_id: return True response = self.con.get(self.monitor_url) if not response: return False data = response.json() self.status = data.get('sta...
[ "Checks", "the", "api", "endpoint", "to", "check", "if", "the", "async", "job", "progress" ]
O365/python-o365
python
https://github.com/O365/python-o365/blob/02a71cf3775cc6a3c042e003365d6a07c8c75a73/O365/drive.py#L157-L173
[ "def", "_request_status", "(", "self", ")", ":", "if", "self", ".", "item_id", ":", "return", "True", "response", "=", "self", ".", "con", ".", "get", "(", "self", ".", "monitor_url", ")", "if", "not", "response", ":", "return", "False", "data", "=", ...
02a71cf3775cc6a3c042e003365d6a07c8c75a73
train
CopyOperation.check_status
Checks the api endpoint in a loop :param delay: number of seconds to wait between api calls. Note Connection 'requests_delay' also apply. :return: tuple of status and percentage complete :rtype: tuple(str, float)
O365/drive.py
def check_status(self, delay=0): """ Checks the api endpoint in a loop :param delay: number of seconds to wait between api calls. Note Connection 'requests_delay' also apply. :return: tuple of status and percentage complete :rtype: tuple(str, float) """ if not s...
def check_status(self, delay=0): """ Checks the api endpoint in a loop :param delay: number of seconds to wait between api calls. Note Connection 'requests_delay' also apply. :return: tuple of status and percentage complete :rtype: tuple(str, float) """ if not s...
[ "Checks", "the", "api", "endpoint", "in", "a", "loop" ]
O365/python-o365
python
https://github.com/O365/python-o365/blob/02a71cf3775cc6a3c042e003365d6a07c8c75a73/O365/drive.py#L175-L190
[ "def", "check_status", "(", "self", ",", "delay", "=", "0", ")", ":", "if", "not", "self", ".", "item_id", ":", "while", "not", "self", ".", "_request_status", "(", ")", ":", "# wait until _request_status returns True", "yield", "self", ".", "status", ",", ...
02a71cf3775cc6a3c042e003365d6a07c8c75a73
train
DriveItemVersion.restore
Restores this DriveItem Version. You can not restore the current version (last one). :return: Success / Failure :rtype: bool
O365/drive.py
def restore(self): """ Restores this DriveItem Version. You can not restore the current version (last one). :return: Success / Failure :rtype: bool """ url = self.build_url( self._endpoints.get('restore').format(id=self.object_id)) response = self.co...
def restore(self): """ Restores this DriveItem Version. You can not restore the current version (last one). :return: Success / Failure :rtype: bool """ url = self.build_url( self._endpoints.get('restore').format(id=self.object_id)) response = self.co...
[ "Restores", "this", "DriveItem", "Version", ".", "You", "can", "not", "restore", "the", "current", "version", "(", "last", "one", ")", "." ]
O365/python-o365
python
https://github.com/O365/python-o365/blob/02a71cf3775cc6a3c042e003365d6a07c8c75a73/O365/drive.py#L263-L275
[ "def", "restore", "(", "self", ")", ":", "url", "=", "self", ".", "build_url", "(", "self", ".", "_endpoints", ".", "get", "(", "'restore'", ")", ".", "format", "(", "id", "=", "self", ".", "object_id", ")", ")", "response", "=", "self", ".", "con"...
02a71cf3775cc6a3c042e003365d6a07c8c75a73
train
DriveItemVersion.download
Downloads this version. You can not download the current version (last one). :return: Success / Failure :rtype: bool
O365/drive.py
def download(self, to_path=None, name=None, chunk_size='auto', convert_to_pdf=False): """ Downloads this version. You can not download the current version (last one). :return: Success / Failure :rtype: bool """ return super().download(to_path=to_path, na...
def download(self, to_path=None, name=None, chunk_size='auto', convert_to_pdf=False): """ Downloads this version. You can not download the current version (last one). :return: Success / Failure :rtype: bool """ return super().download(to_path=to_path, na...
[ "Downloads", "this", "version", ".", "You", "can", "not", "download", "the", "current", "version", "(", "last", "one", ")", "." ]
O365/python-o365
python
https://github.com/O365/python-o365/blob/02a71cf3775cc6a3c042e003365d6a07c8c75a73/O365/drive.py#L277-L287
[ "def", "download", "(", "self", ",", "to_path", "=", "None", ",", "name", "=", "None", ",", "chunk_size", "=", "'auto'", ",", "convert_to_pdf", "=", "False", ")", ":", "return", "super", "(", ")", ".", "download", "(", "to_path", "=", "to_path", ",", ...
02a71cf3775cc6a3c042e003365d6a07c8c75a73
train
DriveItemPermission.update_roles
Updates the roles of this permission :return: Success / Failure :rtype: bool
O365/drive.py
def update_roles(self, roles='view'): """ Updates the roles of this permission :return: Success / Failure :rtype: bool """ if not self.object_id: return False url = self.build_url(self._endpoints.get('permission').format( driveitem_id=self.drivei...
def update_roles(self, roles='view'): """ Updates the roles of this permission :return: Success / Failure :rtype: bool """ if not self.object_id: return False url = self.build_url(self._endpoints.get('permission').format( driveitem_id=self.drivei...
[ "Updates", "the", "roles", "of", "this", "permission" ]
O365/python-o365
python
https://github.com/O365/python-o365/blob/02a71cf3775cc6a3c042e003365d6a07c8c75a73/O365/drive.py#L357-L381
[ "def", "update_roles", "(", "self", ",", "roles", "=", "'view'", ")", ":", "if", "not", "self", ".", "object_id", ":", "return", "False", "url", "=", "self", ".", "build_url", "(", "self", ".", "_endpoints", ".", "get", "(", "'permission'", ")", ".", ...
02a71cf3775cc6a3c042e003365d6a07c8c75a73
train
DriveItem.get_parent
the parent of this DriveItem :return: Parent of this item :rtype: Drive or drive.Folder
O365/drive.py
def get_parent(self): """ the parent of this DriveItem :return: Parent of this item :rtype: Drive or drive.Folder """ if self._parent and self._parent.object_id == self.parent_id: return self._parent else: if self.parent_id: return...
def get_parent(self): """ the parent of this DriveItem :return: Parent of this item :rtype: Drive or drive.Folder """ if self._parent and self._parent.object_id == self.parent_id: return self._parent else: if self.parent_id: return...
[ "the", "parent", "of", "this", "DriveItem" ]
O365/python-o365
python
https://github.com/O365/python-o365/blob/02a71cf3775cc6a3c042e003365d6a07c8c75a73/O365/drive.py#L534-L547
[ "def", "get_parent", "(", "self", ")", ":", "if", "self", ".", "_parent", "and", "self", ".", "_parent", ".", "object_id", "==", "self", ".", "parent_id", ":", "return", "self", ".", "_parent", "else", ":", "if", "self", ".", "parent_id", ":", "return"...
02a71cf3775cc6a3c042e003365d6a07c8c75a73
train
DriveItem.get_thumbnails
Returns this Item Thumbnails. Thumbnails are not supported on SharePoint Server 2016. :param size: request only the specified size: ej: "small", Custom 300x400 px: "c300x400", Crop: "c300x400_Crop" :return: Thumbnail Data :rtype: dict
O365/drive.py
def get_thumbnails(self, size=None): """ Returns this Item Thumbnails. Thumbnails are not supported on SharePoint Server 2016. :param size: request only the specified size: ej: "small", Custom 300x400 px: "c300x400", Crop: "c300x400_Crop" :return: Thumbnail Data :rtype:...
def get_thumbnails(self, size=None): """ Returns this Item Thumbnails. Thumbnails are not supported on SharePoint Server 2016. :param size: request only the specified size: ej: "small", Custom 300x400 px: "c300x400", Crop: "c300x400_Crop" :return: Thumbnail Data :rtype:...
[ "Returns", "this", "Item", "Thumbnails", ".", "Thumbnails", "are", "not", "supported", "on", "SharePoint", "Server", "2016", "." ]
O365/python-o365
python
https://github.com/O365/python-o365/blob/02a71cf3775cc6a3c042e003365d6a07c8c75a73/O365/drive.py#L549-L577
[ "def", "get_thumbnails", "(", "self", ",", "size", "=", "None", ")", ":", "if", "not", "self", ".", "object_id", ":", "return", "[", "]", "url", "=", "self", ".", "build_url", "(", "self", ".", "_endpoints", ".", "get", "(", "'thumbnails'", ")", ".",...
02a71cf3775cc6a3c042e003365d6a07c8c75a73
train
DriveItem.update
Updates this item :param kwargs: all the properties to be updated. only name and description are allowed at the moment. :return: Success / Failure :rtype: bool
O365/drive.py
def update(self, **kwargs): """ Updates this item :param kwargs: all the properties to be updated. only name and description are allowed at the moment. :return: Success / Failure :rtype: bool """ if not self.object_id: return False url = sel...
def update(self, **kwargs): """ Updates this item :param kwargs: all the properties to be updated. only name and description are allowed at the moment. :return: Success / Failure :rtype: bool """ if not self.object_id: return False url = sel...
[ "Updates", "this", "item" ]
O365/python-o365
python
https://github.com/O365/python-o365/blob/02a71cf3775cc6a3c042e003365d6a07c8c75a73/O365/drive.py#L579-L610
[ "def", "update", "(", "self", ",", "*", "*", "kwargs", ")", ":", "if", "not", "self", ".", "object_id", ":", "return", "False", "url", "=", "self", ".", "build_url", "(", "self", ".", "_endpoints", ".", "get", "(", "'item'", ")", ".", "format", "("...
02a71cf3775cc6a3c042e003365d6a07c8c75a73
train
DriveItem.delete
Moves this item to the Recycle Bin :return: Success / Failure :rtype: bool
O365/drive.py
def delete(self): """ Moves this item to the Recycle Bin :return: Success / Failure :rtype: bool """ if not self.object_id: return False url = self.build_url( self._endpoints.get('item').format(id=self.object_id)) response = self.con.de...
def delete(self): """ Moves this item to the Recycle Bin :return: Success / Failure :rtype: bool """ if not self.object_id: return False url = self.build_url( self._endpoints.get('item').format(id=self.object_id)) response = self.con.de...
[ "Moves", "this", "item", "to", "the", "Recycle", "Bin" ]
O365/python-o365
python
https://github.com/O365/python-o365/blob/02a71cf3775cc6a3c042e003365d6a07c8c75a73/O365/drive.py#L612-L631
[ "def", "delete", "(", "self", ")", ":", "if", "not", "self", ".", "object_id", ":", "return", "False", "url", "=", "self", ".", "build_url", "(", "self", ".", "_endpoints", ".", "get", "(", "'item'", ")", ".", "format", "(", "id", "=", "self", ".",...
02a71cf3775cc6a3c042e003365d6a07c8c75a73
train
DriveItem.move
Moves this DriveItem to another Folder. Can't move between different Drives. :param target: a Folder, Drive item or Item Id string. If it's a drive the item will be moved to the root folder. :type target: drive.Folder or DriveItem or str :return: Success / Failure :rtyp...
O365/drive.py
def move(self, target): """ Moves this DriveItem to another Folder. Can't move between different Drives. :param target: a Folder, Drive item or Item Id string. If it's a drive the item will be moved to the root folder. :type target: drive.Folder or DriveItem or str :ret...
def move(self, target): """ Moves this DriveItem to another Folder. Can't move between different Drives. :param target: a Folder, Drive item or Item Id string. If it's a drive the item will be moved to the root folder. :type target: drive.Folder or DriveItem or str :ret...
[ "Moves", "this", "DriveItem", "to", "another", "Folder", ".", "Can", "t", "move", "between", "different", "Drives", "." ]
O365/python-o365
python
https://github.com/O365/python-o365/blob/02a71cf3775cc6a3c042e003365d6a07c8c75a73/O365/drive.py#L633-L675
[ "def", "move", "(", "self", ",", "target", ")", ":", "if", "isinstance", "(", "target", ",", "Folder", ")", ":", "target_id", "=", "target", ".", "object_id", "elif", "isinstance", "(", "target", ",", "Drive", ")", ":", "# we need the root folder id", "roo...
02a71cf3775cc6a3c042e003365d6a07c8c75a73
train
DriveItem.copy
Asynchronously creates a copy of this DriveItem and all it's child elements. :param target: target location to move to. If it's a drive the item will be moved to the root folder. :type target: drive.Folder or Drive :param name: a new name for the copy. :rtype: CopyOpera...
O365/drive.py
def copy(self, target=None, name=None): """ Asynchronously creates a copy of this DriveItem and all it's child elements. :param target: target location to move to. If it's a drive the item will be moved to the root folder. :type target: drive.Folder or Drive :param name...
def copy(self, target=None, name=None): """ Asynchronously creates a copy of this DriveItem and all it's child elements. :param target: target location to move to. If it's a drive the item will be moved to the root folder. :type target: drive.Folder or Drive :param name...
[ "Asynchronously", "creates", "a", "copy", "of", "this", "DriveItem", "and", "all", "it", "s", "child", "elements", "." ]
O365/python-o365
python
https://github.com/O365/python-o365/blob/02a71cf3775cc6a3c042e003365d6a07c8c75a73/O365/drive.py#L677-L739
[ "def", "copy", "(", "self", ",", "target", "=", "None", ",", "name", "=", "None", ")", ":", "if", "target", "is", "None", "and", "name", "is", "None", ":", "raise", "ValueError", "(", "'Must provide a target or a name (or both)'", ")", "if", "isinstance", ...
02a71cf3775cc6a3c042e003365d6a07c8c75a73
train
DriveItem.get_versions
Returns a list of available versions for this item :return: list of versions :rtype: list[DriveItemVersion]
O365/drive.py
def get_versions(self): """ Returns a list of available versions for this item :return: list of versions :rtype: list[DriveItemVersion] """ if not self.object_id: return [] url = self.build_url( self._endpoints.get('versions').format(id=self.obje...
def get_versions(self): """ Returns a list of available versions for this item :return: list of versions :rtype: list[DriveItemVersion] """ if not self.object_id: return [] url = self.build_url( self._endpoints.get('versions').format(id=self.obje...
[ "Returns", "a", "list", "of", "available", "versions", "for", "this", "item" ]
O365/python-o365
python
https://github.com/O365/python-o365/blob/02a71cf3775cc6a3c042e003365d6a07c8c75a73/O365/drive.py#L741-L761
[ "def", "get_versions", "(", "self", ")", ":", "if", "not", "self", ".", "object_id", ":", "return", "[", "]", "url", "=", "self", ".", "build_url", "(", "self", ".", "_endpoints", ".", "get", "(", "'versions'", ")", ".", "format", "(", "id", "=", "...
02a71cf3775cc6a3c042e003365d6a07c8c75a73
train
DriveItem.get_version
Returns a version for specified id :return: a version object of specified id :rtype: DriveItemVersion
O365/drive.py
def get_version(self, version_id): """ Returns a version for specified id :return: a version object of specified id :rtype: DriveItemVersion """ if not self.object_id: return None url = self.build_url( self._endpoints.get('version').format(id=sel...
def get_version(self, version_id): """ Returns a version for specified id :return: a version object of specified id :rtype: DriveItemVersion """ if not self.object_id: return None url = self.build_url( self._endpoints.get('version').format(id=sel...
[ "Returns", "a", "version", "for", "specified", "id" ]
O365/python-o365
python
https://github.com/O365/python-o365/blob/02a71cf3775cc6a3c042e003365d6a07c8c75a73/O365/drive.py#L763-L783
[ "def", "get_version", "(", "self", ",", "version_id", ")", ":", "if", "not", "self", ".", "object_id", ":", "return", "None", "url", "=", "self", ".", "build_url", "(", "self", ".", "_endpoints", ".", "get", "(", "'version'", ")", ".", "format", "(", ...
02a71cf3775cc6a3c042e003365d6a07c8c75a73
train
DriveItem.share_with_link
Creates or returns a link you can share with others :param str share_type: 'view' to allow only view access, 'edit' to allow editions, and 'embed' to allow the DriveItem to be embedded :param str share_scope: 'anonymous': anyone with the link can access. 'organization' Only o...
O365/drive.py
def share_with_link(self, share_type='view', share_scope='anonymous'): """ Creates or returns a link you can share with others :param str share_type: 'view' to allow only view access, 'edit' to allow editions, and 'embed' to allow the DriveItem to be embedded :param str share_...
def share_with_link(self, share_type='view', share_scope='anonymous'): """ Creates or returns a link you can share with others :param str share_type: 'view' to allow only view access, 'edit' to allow editions, and 'embed' to allow the DriveItem to be embedded :param str share_...
[ "Creates", "or", "returns", "a", "link", "you", "can", "share", "with", "others" ]
O365/python-o365
python
https://github.com/O365/python-o365/blob/02a71cf3775cc6a3c042e003365d6a07c8c75a73/O365/drive.py#L785-L815
[ "def", "share_with_link", "(", "self", ",", "share_type", "=", "'view'", ",", "share_scope", "=", "'anonymous'", ")", ":", "if", "not", "self", ".", "object_id", ":", "return", "None", "url", "=", "self", ".", "build_url", "(", "self", ".", "_endpoints", ...
02a71cf3775cc6a3c042e003365d6a07c8c75a73
train
DriveItem.share_with_invite
Sends an invitation to access or edit this DriveItem :param recipients: a string or Contact or a list of the former representing recipients of this invitation :type recipients: list[str] or list[Contact] or str or Contact :param bool require_sign_in: if True the recipients inv...
O365/drive.py
def share_with_invite(self, recipients, require_sign_in=True, send_email=True, message=None, share_type='view'): """ Sends an invitation to access or edit this DriveItem :param recipients: a string or Contact or a list of the former representing recipients of this inv...
def share_with_invite(self, recipients, require_sign_in=True, send_email=True, message=None, share_type='view'): """ Sends an invitation to access or edit this DriveItem :param recipients: a string or Contact or a list of the former representing recipients of this inv...
[ "Sends", "an", "invitation", "to", "access", "or", "edit", "this", "DriveItem" ]
O365/python-o365
python
https://github.com/O365/python-o365/blob/02a71cf3775cc6a3c042e003365d6a07c8c75a73/O365/drive.py#L817-L880
[ "def", "share_with_invite", "(", "self", ",", "recipients", ",", "require_sign_in", "=", "True", ",", "send_email", "=", "True", ",", "message", "=", "None", ",", "share_type", "=", "'view'", ")", ":", "if", "not", "self", ".", "object_id", ":", "return", ...
02a71cf3775cc6a3c042e003365d6a07c8c75a73
train
DriveItem.get_permissions
Returns a list of DriveItemPermissions with the permissions granted for this DriveItem. :return: List of Permissions :rtype: list[DriveItemPermission]
O365/drive.py
def get_permissions(self): """ Returns a list of DriveItemPermissions with the permissions granted for this DriveItem. :return: List of Permissions :rtype: list[DriveItemPermission] """ if not self.object_id: return [] url = self.build_url( ...
def get_permissions(self): """ Returns a list of DriveItemPermissions with the permissions granted for this DriveItem. :return: List of Permissions :rtype: list[DriveItemPermission] """ if not self.object_id: return [] url = self.build_url( ...
[ "Returns", "a", "list", "of", "DriveItemPermissions", "with", "the", "permissions", "granted", "for", "this", "DriveItem", "." ]
O365/python-o365
python
https://github.com/O365/python-o365/blob/02a71cf3775cc6a3c042e003365d6a07c8c75a73/O365/drive.py#L882-L903
[ "def", "get_permissions", "(", "self", ")", ":", "if", "not", "self", ".", "object_id", ":", "return", "[", "]", "url", "=", "self", ".", "build_url", "(", "self", ".", "_endpoints", ".", "get", "(", "'permissions'", ")", ".", "format", "(", "id", "=...
02a71cf3775cc6a3c042e003365d6a07c8c75a73
train
Folder.create_child_folder
Creates a Child Folder :param str name: the name of the new child folder :param str description: the description of the new child folder :return: newly created folder :rtype: drive.Folder
O365/drive.py
def create_child_folder(self, name, description=None): """ Creates a Child Folder :param str name: the name of the new child folder :param str description: the description of the new child folder :return: newly created folder :rtype: drive.Folder """ if not self...
def create_child_folder(self, name, description=None): """ Creates a Child Folder :param str name: the name of the new child folder :param str description: the description of the new child folder :return: newly created folder :rtype: drive.Folder """ if not self...
[ "Creates", "a", "Child", "Folder" ]
O365/python-o365
python
https://github.com/O365/python-o365/blob/02a71cf3775cc6a3c042e003365d6a07c8c75a73/O365/drive.py#L1030-L1056
[ "def", "create_child_folder", "(", "self", ",", "name", ",", "description", "=", "None", ")", ":", "if", "not", "self", ".", "object_id", ":", "return", "None", "url", "=", "self", ".", "build_url", "(", "self", ".", "_endpoints", ".", "get", "(", "'li...
02a71cf3775cc6a3c042e003365d6a07c8c75a73
train
Folder.download_contents
This will download each file and folder sequentially. Caution when downloading big folder structures :param drive.Folder to_folder: folder where to store the contents
O365/drive.py
def download_contents(self, to_folder=None): """ This will download each file and folder sequentially. Caution when downloading big folder structures :param drive.Folder to_folder: folder where to store the contents """ to_folder = to_folder or Path() if not to_folder.ex...
def download_contents(self, to_folder=None): """ This will download each file and folder sequentially. Caution when downloading big folder structures :param drive.Folder to_folder: folder where to store the contents """ to_folder = to_folder or Path() if not to_folder.ex...
[ "This", "will", "download", "each", "file", "and", "folder", "sequentially", ".", "Caution", "when", "downloading", "big", "folder", "structures" ]
O365/python-o365
python
https://github.com/O365/python-o365/blob/02a71cf3775cc6a3c042e003365d6a07c8c75a73/O365/drive.py#L1058-L1072
[ "def", "download_contents", "(", "self", ",", "to_folder", "=", "None", ")", ":", "to_folder", "=", "to_folder", "or", "Path", "(", ")", "if", "not", "to_folder", ".", "exists", "(", ")", ":", "to_folder", ".", "mkdir", "(", ")", "for", "item", "in", ...
02a71cf3775cc6a3c042e003365d6a07c8c75a73
train
Folder.upload_file
Uploads a file :param item: path to the item you want to upload :type item: str or Path :param chunk_size: Only applies if file is bigger than 4MB. Chunk size for uploads. Must be a multiple of 327.680 bytes :return: uploaded file :rtype: DriveItem
O365/drive.py
def upload_file(self, item, chunk_size=DEFAULT_UPLOAD_CHUNK_SIZE): """ Uploads a file :param item: path to the item you want to upload :type item: str or Path :param chunk_size: Only applies if file is bigger than 4MB. Chunk size for uploads. Must be a multiple of 327.680 bytes...
def upload_file(self, item, chunk_size=DEFAULT_UPLOAD_CHUNK_SIZE): """ Uploads a file :param item: path to the item you want to upload :type item: str or Path :param chunk_size: Only applies if file is bigger than 4MB. Chunk size for uploads. Must be a multiple of 327.680 bytes...
[ "Uploads", "a", "file" ]
O365/python-o365
python
https://github.com/O365/python-o365/blob/02a71cf3775cc6a3c042e003365d6a07c8c75a73/O365/drive.py#L1140-L1229
[ "def", "upload_file", "(", "self", ",", "item", ",", "chunk_size", "=", "DEFAULT_UPLOAD_CHUNK_SIZE", ")", ":", "if", "item", "is", "None", ":", "raise", "ValueError", "(", "'Item must be a valid path to file'", ")", "item", "=", "Path", "(", "item", ")", "if",...
02a71cf3775cc6a3c042e003365d6a07c8c75a73
train
Drive._base_get_list
Returns a collection of drive items
O365/drive.py
def _base_get_list(self, url, limit=None, *, query=None, order_by=None, batch=None): """ Returns a collection of drive items """ if limit is None or limit > self.protocol.max_top_value: batch = self.protocol.max_top_value params = {'$top': batch if batch else...
def _base_get_list(self, url, limit=None, *, query=None, order_by=None, batch=None): """ Returns a collection of drive items """ if limit is None or limit > self.protocol.max_top_value: batch = self.protocol.max_top_value params = {'$top': batch if batch else...
[ "Returns", "a", "collection", "of", "drive", "items" ]
O365/python-o365
python
https://github.com/O365/python-o365/blob/02a71cf3775cc6a3c042e003365d6a07c8c75a73/O365/drive.py#L1334-L1373
[ "def", "_base_get_list", "(", "self", ",", "url", ",", "limit", "=", "None", ",", "*", ",", "query", "=", "None", ",", "order_by", "=", "None", ",", "batch", "=", "None", ")", ":", "if", "limit", "is", "None", "or", "limit", ">", "self", ".", "pr...
02a71cf3775cc6a3c042e003365d6a07c8c75a73
train
Drive.get_items
Returns a collection of drive items from the root folder :param int limit: max no. of items to get. Over 999 uses batch. :param query: applies a OData filter to the request :type query: Query or str :param order_by: orders the result set based on this condition :type order_by: Q...
O365/drive.py
def get_items(self, limit=None, *, query=None, order_by=None, batch=None): """ Returns a collection of drive items from the root folder :param int limit: max no. of items to get. Over 999 uses batch. :param query: applies a OData filter to the request :type query: Query or str :...
def get_items(self, limit=None, *, query=None, order_by=None, batch=None): """ Returns a collection of drive items from the root folder :param int limit: max no. of items to get. Over 999 uses batch. :param query: applies a OData filter to the request :type query: Query or str :...
[ "Returns", "a", "collection", "of", "drive", "items", "from", "the", "root", "folder" ]
O365/python-o365
python
https://github.com/O365/python-o365/blob/02a71cf3775cc6a3c042e003365d6a07c8c75a73/O365/drive.py#L1375-L1398
[ "def", "get_items", "(", "self", ",", "limit", "=", "None", ",", "*", ",", "query", "=", "None", ",", "order_by", "=", "None", ",", "batch", "=", "None", ")", ":", "if", "self", ".", "object_id", ":", "# reference the current drive_id", "url", "=", "se...
02a71cf3775cc6a3c042e003365d6a07c8c75a73
train
Drive.get_item
Returns a DriveItem by it's Id :return: one item :rtype: DriveItem
O365/drive.py
def get_item(self, item_id): """ Returns a DriveItem by it's Id :return: one item :rtype: DriveItem """ if self.object_id: # reference the current drive_id url = self.build_url( self._endpoints.get('get_item').format(id=self.object_id, ...
def get_item(self, item_id): """ Returns a DriveItem by it's Id :return: one item :rtype: DriveItem """ if self.object_id: # reference the current drive_id url = self.build_url( self._endpoints.get('get_item').format(id=self.object_id, ...
[ "Returns", "a", "DriveItem", "by", "it", "s", "Id" ]
O365/python-o365
python
https://github.com/O365/python-o365/blob/02a71cf3775cc6a3c042e003365d6a07c8c75a73/O365/drive.py#L1450-L1474
[ "def", "get_item", "(", "self", ",", "item_id", ")", ":", "if", "self", ".", "object_id", ":", "# reference the current drive_id", "url", "=", "self", ".", "build_url", "(", "self", ".", "_endpoints", ".", "get", "(", "'get_item'", ")", ".", "format", "(",...
02a71cf3775cc6a3c042e003365d6a07c8c75a73