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)
| 371 | self._track_changes.add('wrap_text') |
| 372 | |
| 373 | def to_api_data(self, restrict_keys=None): |
| 374 | """ Returns a dict to communicate with the server |
| 375 | |
| 376 | :param restrict_keys: a set of keys to restrict the returned data to |
| 377 | :rtype: dict |
| 378 | """ |
| 379 | cc = self._cc # alias |
| 380 | data = { |
| 381 | cc('column_width'): self._column_width, |
| 382 | cc('horizontal_alignment'): self._horizontal_alignment, |
| 383 | cc('row_height'): self._row_height, |
| 384 | cc('vertical_alignment'): self._vertical_alignment, |
| 385 | cc('wrap_text'): self._wrap_text, |
| 386 | } |
| 387 | |
| 388 | if restrict_keys: |
| 389 | for key in list(data.keys()): |
| 390 | if key not in restrict_keys: |
| 391 | del data[key] |
| 392 | return data |
| 393 | |
| 394 | def update(self): |
| 395 | """ Updates this range format """ |