MCPcopy
hub / github.com/burnash/gspread / fetch_sheet_metadata

Method fetch_sheet_metadata

gspread/http_client.py:287–307  ·  view source on GitHub ↗

Similar to :method spreadsheets_get:`gspread.http_client.spreadsheets_get`, get the spreadsheet form the API but by default **does not get the cells data**. It only retrieve the the metadata from the spreadsheet. :param str id: the spreadsheet ID key :param dict para

(
        self, id: str, params: Optional[ParamsType] = None
    )

Source from the content-addressed store, hash-verified

285 return r.json()
286
287 def fetch_sheet_metadata(
288 self, id: str, params: Optional[ParamsType] = None
289 ) -> Mapping[str, Any]:
290 """Similar to :method spreadsheets_get:`gspread.http_client.spreadsheets_get`,
291 get the spreadsheet form the API but by default **does not get the cells data**.
292 It only retrieve the the metadata from the spreadsheet.
293
294 :param str id: the spreadsheet ID key
295 :param dict params: (optional) the HTTP params for the GET request.
296 By default sets the parameter ``includeGridData`` to ``false``.
297 :returns: The raw spreadsheet
298 :rtype: dict
299 """
300 if params is None:
301 params = {"includeGridData": "false"}
302
303 url = SPREADSHEET_URL % id
304
305 r = self.request("get", url, params=params)
306
307 return r.json()
308
309 def get_file_drive_metadata(self, id: str) -> Any:
310 """Get the metadata from the Drive API for a specific file

Callers 15

_get_sheet_propertyMethod · 0.45
getMethod · 0.45
test_update_titleMethod · 0.45
test_update_tab_colorMethod · 0.45
test_clear_tab_colorMethod · 0.45
get_grid_propsMethod · 0.45
get_sheetMethod · 0.45

Calls 1

requestMethod · 0.95

Tested by 15

test_update_titleMethod · 0.36
test_update_tab_colorMethod · 0.36
test_clear_tab_colorMethod · 0.36
get_grid_propsMethod · 0.36
get_sheetMethod · 0.36
are_gridlines_hiddenMethod · 0.36