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

Method values_batch_get

gspread/http_client.py:239–256  ·  view source on GitHub ↗

Lower-level method that directly calls `spreadsheets/ /values:batchGet `_. :param list ranges: List of ranges in the `A1 notation <https://developers.google.com/sheets/api/guides/concepts#a1_notation

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

Source from the content-addressed store, hash-verified

237 return r.json()
238
239 def values_batch_get(
240 self, id: str, ranges: List[str], params: Optional[ParamsType] = None
241 ) -> Any:
242 """Lower-level method that directly calls `spreadsheets/<ID>/values:batchGet <https://developers.google.com/sheets/api/reference/rest/v4/spreadsheets.values/batchGet>`_.
243
244 :param list ranges: List of ranges in the `A1 notation <https://developers.google.com/sheets/api/guides/concepts#a1_notation>`_ of the values to retrieve.
245 :param dict params: (optional) `Values Batch Get Query parameters <https://developers.google.com/sheets/api/reference/rest/v4/spreadsheets.values/batchGet#query-parameters>`_.
246 :returns: `Values Batch Get Response body <https://developers.google.com/sheets/api/reference/rest/v4/spreadsheets.values/batchGet#response-body>`_.
247 :rtype: dict
248 """
249 if params is None:
250 params = {}
251
252 params["ranges"] = ranges
253
254 url = SPREADSHEET_VALUES_BATCH_URL % id
255 r = self.request("get", url, params=params)
256 return r.json()
257
258 def values_batch_update(
259 self, id: str, body: Optional[Mapping[str, Any]] = None

Callers 2

batch_getMethod · 0.45
test_values_batch_getMethod · 0.45

Calls 1

requestMethod · 0.95

Tested by 1

test_values_batch_getMethod · 0.36