MCPcopy Index your code
hub / github.com/O365/python-o365 / _load_data

Method _load_data

O365/excel.py:171–187  ·  view source on GitHub ↗

Loads the data into this instance

(self)

Source from the content-addressed store, hash-verified

169 self._underline = 'None'
170
171 def _load_data(self):
172 """ Loads the data into this instance """
173 url = self.parent.build_url(self.parent._endpoints.get('format'))
174 response = self.parent.session.get(url)
175 if not response:
176 return False
177 data = response.json()
178
179 self._bold = data.get('bold', False)
180 self._color = data.get('color', '#000000') # default black
181 self._italic = data.get('italic', False)
182 self._name = data.get('name', 'Calibri') # default Calibri
183 self._size = data.get('size', 10) # default 10
184 self._underline = data.get('underline', 'None')
185
186 self._loaded = True
187 return True
188
189 def to_api_data(self, restrict_keys=None):
190 """ Returns a dict to communicate with the server

Callers 6

boldMethod · 0.95
colorMethod · 0.95
italicMethod · 0.95
nameMethod · 0.95
sizeMethod · 0.95
underlineMethod · 0.95

Calls 3

build_urlMethod · 0.80
jsonMethod · 0.80
getMethod · 0.45

Tested by

no test coverage detected