MCPcopy Create free account
hub / github.com/O365/python-o365 / to_api_data

Method to_api_data

O365/excel.py:620–641  ·  view source on GitHub ↗

Returns a dict to communicate with the server :param restrict_keys: a set of keys to restrict the returned data to :rtype: dict

(self, restrict_keys=None)

Source from the content-addressed store, hash-verified

618 self._track_changes.add('values')
619
620 def to_api_data(self, restrict_keys=None):
621 """ Returns a dict to communicate with the server
622
623 :param restrict_keys: a set of keys to restrict the returned data to
624 :rtype: dict
625 """
626 cc = self._cc # alias
627 data = {
628 cc('column_hidden'): self._column_hidden,
629 cc('row_hidden'): self._row_hidden,
630 cc('formulas'): self._formulas,
631 cc('formulas_local'): self._formulas_local,
632 cc('formulas_r1_c1'): self._formulas_r1_c1,
633 cc('number_format'): self._number_format,
634 cc('values'): self._values,
635 }
636
637 if restrict_keys:
638 for key in list(data.keys()):
639 if key not in restrict_keys:
640 del data[key]
641 return data
642
643 def _get_range(self, endpoint, *args, method='GET', **kwargs):
644 """ Helper that returns another range"""

Callers 2

updateMethod · 0.95
updateMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected