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
)
| 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 |