diff --git a/gspread/worksheet.py b/gspread/worksheet.py index c169c949..aae4ae46 100644 --- a/gspread/worksheet.py +++ b/gspread/worksheet.py @@ -2639,8 +2639,12 @@ def batch_merge( return self.client.batch_update(self.spreadsheet_id, {"requests": requests}) - def get_notes(self, default_empty_value: Optional[str] = "") -> List[List[str]]: - """Returns a list of lists containing all notes in the sheet. + def get_notes( + self, + default_empty_value: Optional[str] = "", + grid_range: Optional[str] = None, + ) -> List[List[str]]: + """Returns a list of lists containing all notes in the sheet or range. .. note:: @@ -2655,6 +2659,7 @@ def get_notes(self, default_empty_value: Optional[str] = "") -> List[List[str]]: :param str default_empty_value: (optional) Determines which value to use for cells without notes, defaults to None. + :param str grid_range: (optional) Range name in A1 notation, e.g. 'A1:A5'. Examples:: @@ -2664,21 +2669,32 @@ def get_notes(self, default_empty_value: Optional[str] = "") -> List[List[str]]: # 2 - B2 # Read all notes from the sheet - >>> arr = worksheet.get_notes() - >>> print(arr) + >>> worksheet.get_notes() [ ["A1"], ["", "B2"] ] - >>> print(gspread.utils.fill_gaps(arr, len(arr), max(len(a) for a in arr), None)) + >>> arr = worksheet.get_notes() + >>> gspread.utils.fill_gaps(arr, len(arr), max(len(a) for a in arr), None) [ ["A1", ""], ["", "B2"] ] + # Read notes from a specific range + >>> worksheet.get_notes(grid_range="A2:B2") + [ + ["", "B2"] + ] """ - params: ParamsType = {"fields": "sheets.data.rowData.values.note"} + params: ParamsType = { + "fields": "sheets.data.rowData.values.note", + "ranges": absolute_range_name(self.title, grid_range), + } + res = self.client.spreadsheets_get(self.spreadsheet_id, params) - data = res["sheets"][self.index]["data"][0].get("rowData", [{}]) + + # access 0th sheet because we specified a sheet with params["ranges"] above + data = res["sheets"][0]["data"][0].get("rowData", [{}]) notes: List[List[str]] = [] for row in data: notes.append([]) diff --git a/tests/cassettes/WorksheetTest.test_get_notes.json b/tests/cassettes/WorksheetTest.test_get_notes.json index ee21aa8c..d1ead538 100644 --- a/tests/cassettes/WorksheetTest.test_get_notes.json +++ b/tests/cassettes/WorksheetTest.test_get_notes.json @@ -8,7 +8,7 @@ "body": "{\"name\": \"Test WorksheetTest test_get_notes\", \"mimeType\": \"application/vnd.google-apps.spreadsheet\"}", "headers": { "User-Agent": [ - "python-requests/2.31.0" + "python-requests/2.32.3" ], "Accept-Encoding": [ "gzip, deflate" @@ -19,12 +19,6 @@ "Connection": [ "keep-alive" ], - "x-goog-api-client": [ - "cred-type/sa" - ], - "x-allowed-locations": [ - "0x0" - ], "Content-Length": [ "100" ], @@ -42,59 +36,59 @@ "message": "OK" }, "headers": { - "Transfer-Encoding": [ - "chunked" - ], - "Expires": [ - "Mon, 01 Jan 1990 00:00:00 GMT" + "Cache-Control": [ + "no-cache, no-store, max-age=0, must-revalidate" ], "X-Content-Type-Options": [ "nosniff" ], - "X-Frame-Options": [ - "SAMEORIGIN" + "Alt-Svc": [ + "h3=\":443\"; ma=2592000,h3-29=\":443\"; ma=2592000" + ], + "X-XSS-Protection": [ + "0" + ], + "Transfer-Encoding": [ + "chunked" ], "Pragma": [ "no-cache" ], - "Vary": [ - "Origin, X-Origin" - ], "Server": [ "ESF" ], - "Cache-Control": [ - "no-cache, no-store, max-age=0, must-revalidate" - ], "Date": [ - "Wed, 01 May 2024 12:10:35 GMT" + "Mon, 07 Oct 2024 19:28:43 GMT" ], - "Content-Type": [ - "application/json; charset=UTF-8" + "X-Frame-Options": [ + "SAMEORIGIN" ], - "Alt-Svc": [ - "h3=\":443\"; ma=2592000,h3-29=\":443\"; ma=2592000" + "Vary": [ + "Origin, X-Origin" ], - "X-XSS-Protection": [ - "0" + "Expires": [ + "Mon, 01 Jan 1990 00:00:00 GMT" + ], + "Content-Type": [ + "application/json; charset=UTF-8" ], "content-length": [ "187" ] }, "body": { - "string": "{\n \"kind\": \"drive#file\",\n \"id\": \"1D5C1Uoz_eZBURStCMEJCStrcW3H5MhVhAKkYTi19TWk\",\n \"name\": \"Test WorksheetTest test_get_notes\",\n \"mimeType\": \"application/vnd.google-apps.spreadsheet\"\n}\n" + "string": "{\n \"kind\": \"drive#file\",\n \"id\": \"1ixIGCQezexeSZMbzt_A3kYfYLMC9UI4mmFmlw-G_9NI\",\n \"name\": \"Test WorksheetTest test_get_notes\",\n \"mimeType\": \"application/vnd.google-apps.spreadsheet\"\n}\n" } } }, { "request": { "method": "GET", - "uri": "https://sheets.googleapis.com/v4/spreadsheets/1D5C1Uoz_eZBURStCMEJCStrcW3H5MhVhAKkYTi19TWk?includeGridData=false", + "uri": "https://sheets.googleapis.com/v4/spreadsheets/1ixIGCQezexeSZMbzt_A3kYfYLMC9UI4mmFmlw-G_9NI?includeGridData=false", "body": null, "headers": { "User-Agent": [ - "python-requests/2.31.0" + "python-requests/2.32.3" ], "Accept-Encoding": [ "gzip, deflate" @@ -105,12 +99,6 @@ "Connection": [ "keep-alive" ], - "x-goog-api-client": [ - "cred-type/sa" - ], - "x-allowed-locations": [ - "0x0" - ], "authorization": [ "" ] @@ -122,58 +110,58 @@ "message": "OK" }, "headers": { + "Cache-Control": [ + "private" + ], + "Alt-Svc": [ + "h3=\":443\"; ma=2592000,h3-29=\":443\"; ma=2592000" + ], + "X-XSS-Protection": [ + "0" + ], "Transfer-Encoding": [ "chunked" ], - "X-Content-Type-Options": [ - "nosniff" + "x-l2-request-path": [ + "l2-managed-6" + ], + "Server": [ + "ESF" + ], + "Date": [ + "Mon, 07 Oct 2024 19:28:43 GMT" ], "X-Frame-Options": [ "SAMEORIGIN" ], - "x-l2-request-path": [ - "l2-managed-6" - ], "Vary": [ "Origin", "X-Origin", "Referer" ], - "Server": [ - "ESF" - ], - "Cache-Control": [ - "private" - ], - "Date": [ - "Wed, 01 May 2024 12:10:36 GMT" + "X-Content-Type-Options": [ + "nosniff" ], "Content-Type": [ "application/json; charset=UTF-8" ], - "Alt-Svc": [ - "h3=\":443\"; ma=2592000,h3-29=\":443\"; ma=2592000" - ], - "X-XSS-Protection": [ - "0" - ], "content-length": [ "3331" ] }, "body": { - "string": "{\n \"spreadsheetId\": \"1D5C1Uoz_eZBURStCMEJCStrcW3H5MhVhAKkYTi19TWk\",\n \"properties\": {\n \"title\": \"Test WorksheetTest test_get_notes\",\n \"locale\": \"en_US\",\n \"autoRecalc\": \"ON_CHANGE\",\n \"timeZone\": \"Etc/GMT\",\n \"defaultFormat\": {\n \"backgroundColor\": {\n \"red\": 1,\n \"green\": 1,\n \"blue\": 1\n },\n \"padding\": {\n \"top\": 2,\n \"right\": 3,\n \"bottom\": 2,\n \"left\": 3\n },\n \"verticalAlignment\": \"BOTTOM\",\n \"wrapStrategy\": \"OVERFLOW_CELL\",\n \"textFormat\": {\n \"foregroundColor\": {},\n \"fontFamily\": \"arial,sans,sans-serif\",\n \"fontSize\": 10,\n \"bold\": false,\n \"italic\": false,\n \"strikethrough\": false,\n \"underline\": false,\n \"foregroundColorStyle\": {\n \"rgbColor\": {}\n }\n },\n \"backgroundColorStyle\": {\n \"rgbColor\": {\n \"red\": 1,\n \"green\": 1,\n \"blue\": 1\n }\n }\n },\n \"spreadsheetTheme\": {\n \"primaryFontFamily\": \"Arial\",\n \"themeColors\": [\n {\n \"colorType\": \"TEXT\",\n \"color\": {\n \"rgbColor\": {}\n }\n },\n {\n \"colorType\": \"BACKGROUND\",\n \"color\": {\n \"rgbColor\": {\n \"red\": 1,\n \"green\": 1,\n \"blue\": 1\n }\n }\n },\n {\n \"colorType\": \"ACCENT1\",\n \"color\": {\n \"rgbColor\": {\n \"red\": 0.25882354,\n \"green\": 0.52156866,\n \"blue\": 0.95686275\n }\n }\n },\n {\n \"colorType\": \"ACCENT2\",\n \"color\": {\n \"rgbColor\": {\n \"red\": 0.91764706,\n \"green\": 0.2627451,\n \"blue\": 0.20784314\n }\n }\n },\n {\n \"colorType\": \"ACCENT3\",\n \"color\": {\n \"rgbColor\": {\n \"red\": 0.9843137,\n \"green\": 0.7372549,\n \"blue\": 0.015686275\n }\n }\n },\n {\n \"colorType\": \"ACCENT4\",\n \"color\": {\n \"rgbColor\": {\n \"red\": 0.20392157,\n \"green\": 0.65882355,\n \"blue\": 0.3254902\n }\n }\n },\n {\n \"colorType\": \"ACCENT5\",\n \"color\": {\n \"rgbColor\": {\n \"red\": 1,\n \"green\": 0.42745098,\n \"blue\": 0.003921569\n }\n }\n },\n {\n \"colorType\": \"ACCENT6\",\n \"color\": {\n \"rgbColor\": {\n \"red\": 0.27450982,\n \"green\": 0.7411765,\n \"blue\": 0.7764706\n }\n }\n },\n {\n \"colorType\": \"LINK\",\n \"color\": {\n \"rgbColor\": {\n \"red\": 0.06666667,\n \"green\": 0.33333334,\n \"blue\": 0.8\n }\n }\n }\n ]\n }\n },\n \"sheets\": [\n {\n \"properties\": {\n \"sheetId\": 0,\n \"title\": \"Sheet1\",\n \"index\": 0,\n \"sheetType\": \"GRID\",\n \"gridProperties\": {\n \"rowCount\": 1000,\n \"columnCount\": 26\n }\n }\n }\n ],\n \"spreadsheetUrl\": \"https://docs.google.com/spreadsheets/d/1D5C1Uoz_eZBURStCMEJCStrcW3H5MhVhAKkYTi19TWk/edit\"\n}\n" + "string": "{\n \"spreadsheetId\": \"1ixIGCQezexeSZMbzt_A3kYfYLMC9UI4mmFmlw-G_9NI\",\n \"properties\": {\n \"title\": \"Test WorksheetTest test_get_notes\",\n \"locale\": \"en_US\",\n \"autoRecalc\": \"ON_CHANGE\",\n \"timeZone\": \"Etc/GMT\",\n \"defaultFormat\": {\n \"backgroundColor\": {\n \"red\": 1,\n \"green\": 1,\n \"blue\": 1\n },\n \"padding\": {\n \"top\": 2,\n \"right\": 3,\n \"bottom\": 2,\n \"left\": 3\n },\n \"verticalAlignment\": \"BOTTOM\",\n \"wrapStrategy\": \"OVERFLOW_CELL\",\n \"textFormat\": {\n \"foregroundColor\": {},\n \"fontFamily\": \"arial,sans,sans-serif\",\n \"fontSize\": 10,\n \"bold\": false,\n \"italic\": false,\n \"strikethrough\": false,\n \"underline\": false,\n \"foregroundColorStyle\": {\n \"rgbColor\": {}\n }\n },\n \"backgroundColorStyle\": {\n \"rgbColor\": {\n \"red\": 1,\n \"green\": 1,\n \"blue\": 1\n }\n }\n },\n \"spreadsheetTheme\": {\n \"primaryFontFamily\": \"Arial\",\n \"themeColors\": [\n {\n \"colorType\": \"TEXT\",\n \"color\": {\n \"rgbColor\": {}\n }\n },\n {\n \"colorType\": \"BACKGROUND\",\n \"color\": {\n \"rgbColor\": {\n \"red\": 1,\n \"green\": 1,\n \"blue\": 1\n }\n }\n },\n {\n \"colorType\": \"ACCENT1\",\n \"color\": {\n \"rgbColor\": {\n \"red\": 0.25882354,\n \"green\": 0.52156866,\n \"blue\": 0.95686275\n }\n }\n },\n {\n \"colorType\": \"ACCENT2\",\n \"color\": {\n \"rgbColor\": {\n \"red\": 0.91764706,\n \"green\": 0.2627451,\n \"blue\": 0.20784314\n }\n }\n },\n {\n \"colorType\": \"ACCENT3\",\n \"color\": {\n \"rgbColor\": {\n \"red\": 0.9843137,\n \"green\": 0.7372549,\n \"blue\": 0.015686275\n }\n }\n },\n {\n \"colorType\": \"ACCENT4\",\n \"color\": {\n \"rgbColor\": {\n \"red\": 0.20392157,\n \"green\": 0.65882355,\n \"blue\": 0.3254902\n }\n }\n },\n {\n \"colorType\": \"ACCENT5\",\n \"color\": {\n \"rgbColor\": {\n \"red\": 1,\n \"green\": 0.42745098,\n \"blue\": 0.003921569\n }\n }\n },\n {\n \"colorType\": \"ACCENT6\",\n \"color\": {\n \"rgbColor\": {\n \"red\": 0.27450982,\n \"green\": 0.7411765,\n \"blue\": 0.7764706\n }\n }\n },\n {\n \"colorType\": \"LINK\",\n \"color\": {\n \"rgbColor\": {\n \"red\": 0.06666667,\n \"green\": 0.33333334,\n \"blue\": 0.8\n }\n }\n }\n ]\n }\n },\n \"sheets\": [\n {\n \"properties\": {\n \"sheetId\": 0,\n \"title\": \"Sheet1\",\n \"index\": 0,\n \"sheetType\": \"GRID\",\n \"gridProperties\": {\n \"rowCount\": 1000,\n \"columnCount\": 26\n }\n }\n }\n ],\n \"spreadsheetUrl\": \"https://docs.google.com/spreadsheets/d/1ixIGCQezexeSZMbzt_A3kYfYLMC9UI4mmFmlw-G_9NI/edit\"\n}\n" } } }, { "request": { "method": "GET", - "uri": "https://sheets.googleapis.com/v4/spreadsheets/1D5C1Uoz_eZBURStCMEJCStrcW3H5MhVhAKkYTi19TWk?includeGridData=false", + "uri": "https://sheets.googleapis.com/v4/spreadsheets/1ixIGCQezexeSZMbzt_A3kYfYLMC9UI4mmFmlw-G_9NI?includeGridData=false", "body": null, "headers": { "User-Agent": [ - "python-requests/2.31.0" + "python-requests/2.32.3" ], "Accept-Encoding": [ "gzip, deflate" @@ -184,12 +172,6 @@ "Connection": [ "keep-alive" ], - "x-goog-api-client": [ - "cred-type/sa" - ], - "x-allowed-locations": [ - "0x0" - ], "authorization": [ "" ] @@ -201,58 +183,58 @@ "message": "OK" }, "headers": { + "Cache-Control": [ + "private" + ], + "Alt-Svc": [ + "h3=\":443\"; ma=2592000,h3-29=\":443\"; ma=2592000" + ], + "X-XSS-Protection": [ + "0" + ], "Transfer-Encoding": [ "chunked" ], - "X-Content-Type-Options": [ - "nosniff" + "x-l2-request-path": [ + "l2-managed-6" + ], + "Server": [ + "ESF" + ], + "Date": [ + "Mon, 07 Oct 2024 19:28:44 GMT" ], "X-Frame-Options": [ "SAMEORIGIN" ], - "x-l2-request-path": [ - "l2-managed-6" - ], "Vary": [ "Origin", "X-Origin", "Referer" ], - "Server": [ - "ESF" - ], - "Cache-Control": [ - "private" - ], - "Date": [ - "Wed, 01 May 2024 12:10:37 GMT" + "X-Content-Type-Options": [ + "nosniff" ], "Content-Type": [ "application/json; charset=UTF-8" ], - "Alt-Svc": [ - "h3=\":443\"; ma=2592000,h3-29=\":443\"; ma=2592000" - ], - "X-XSS-Protection": [ - "0" - ], "content-length": [ "3331" ] }, "body": { - "string": "{\n \"spreadsheetId\": \"1D5C1Uoz_eZBURStCMEJCStrcW3H5MhVhAKkYTi19TWk\",\n \"properties\": {\n \"title\": \"Test WorksheetTest test_get_notes\",\n \"locale\": \"en_US\",\n \"autoRecalc\": \"ON_CHANGE\",\n \"timeZone\": \"Etc/GMT\",\n \"defaultFormat\": {\n \"backgroundColor\": {\n \"red\": 1,\n \"green\": 1,\n \"blue\": 1\n },\n \"padding\": {\n \"top\": 2,\n \"right\": 3,\n \"bottom\": 2,\n \"left\": 3\n },\n \"verticalAlignment\": \"BOTTOM\",\n \"wrapStrategy\": \"OVERFLOW_CELL\",\n \"textFormat\": {\n \"foregroundColor\": {},\n \"fontFamily\": \"arial,sans,sans-serif\",\n \"fontSize\": 10,\n \"bold\": false,\n \"italic\": false,\n \"strikethrough\": false,\n \"underline\": false,\n \"foregroundColorStyle\": {\n \"rgbColor\": {}\n }\n },\n \"backgroundColorStyle\": {\n \"rgbColor\": {\n \"red\": 1,\n \"green\": 1,\n \"blue\": 1\n }\n }\n },\n \"spreadsheetTheme\": {\n \"primaryFontFamily\": \"Arial\",\n \"themeColors\": [\n {\n \"colorType\": \"TEXT\",\n \"color\": {\n \"rgbColor\": {}\n }\n },\n {\n \"colorType\": \"BACKGROUND\",\n \"color\": {\n \"rgbColor\": {\n \"red\": 1,\n \"green\": 1,\n \"blue\": 1\n }\n }\n },\n {\n \"colorType\": \"ACCENT1\",\n \"color\": {\n \"rgbColor\": {\n \"red\": 0.25882354,\n \"green\": 0.52156866,\n \"blue\": 0.95686275\n }\n }\n },\n {\n \"colorType\": \"ACCENT2\",\n \"color\": {\n \"rgbColor\": {\n \"red\": 0.91764706,\n \"green\": 0.2627451,\n \"blue\": 0.20784314\n }\n }\n },\n {\n \"colorType\": \"ACCENT3\",\n \"color\": {\n \"rgbColor\": {\n \"red\": 0.9843137,\n \"green\": 0.7372549,\n \"blue\": 0.015686275\n }\n }\n },\n {\n \"colorType\": \"ACCENT4\",\n \"color\": {\n \"rgbColor\": {\n \"red\": 0.20392157,\n \"green\": 0.65882355,\n \"blue\": 0.3254902\n }\n }\n },\n {\n \"colorType\": \"ACCENT5\",\n \"color\": {\n \"rgbColor\": {\n \"red\": 1,\n \"green\": 0.42745098,\n \"blue\": 0.003921569\n }\n }\n },\n {\n \"colorType\": \"ACCENT6\",\n \"color\": {\n \"rgbColor\": {\n \"red\": 0.27450982,\n \"green\": 0.7411765,\n \"blue\": 0.7764706\n }\n }\n },\n {\n \"colorType\": \"LINK\",\n \"color\": {\n \"rgbColor\": {\n \"red\": 0.06666667,\n \"green\": 0.33333334,\n \"blue\": 0.8\n }\n }\n }\n ]\n }\n },\n \"sheets\": [\n {\n \"properties\": {\n \"sheetId\": 0,\n \"title\": \"Sheet1\",\n \"index\": 0,\n \"sheetType\": \"GRID\",\n \"gridProperties\": {\n \"rowCount\": 1000,\n \"columnCount\": 26\n }\n }\n }\n ],\n \"spreadsheetUrl\": \"https://docs.google.com/spreadsheets/d/1D5C1Uoz_eZBURStCMEJCStrcW3H5MhVhAKkYTi19TWk/edit\"\n}\n" + "string": "{\n \"spreadsheetId\": \"1ixIGCQezexeSZMbzt_A3kYfYLMC9UI4mmFmlw-G_9NI\",\n \"properties\": {\n \"title\": \"Test WorksheetTest test_get_notes\",\n \"locale\": \"en_US\",\n \"autoRecalc\": \"ON_CHANGE\",\n \"timeZone\": \"Etc/GMT\",\n \"defaultFormat\": {\n \"backgroundColor\": {\n \"red\": 1,\n \"green\": 1,\n \"blue\": 1\n },\n \"padding\": {\n \"top\": 2,\n \"right\": 3,\n \"bottom\": 2,\n \"left\": 3\n },\n \"verticalAlignment\": \"BOTTOM\",\n \"wrapStrategy\": \"OVERFLOW_CELL\",\n \"textFormat\": {\n \"foregroundColor\": {},\n \"fontFamily\": \"arial,sans,sans-serif\",\n \"fontSize\": 10,\n \"bold\": false,\n \"italic\": false,\n \"strikethrough\": false,\n \"underline\": false,\n \"foregroundColorStyle\": {\n \"rgbColor\": {}\n }\n },\n \"backgroundColorStyle\": {\n \"rgbColor\": {\n \"red\": 1,\n \"green\": 1,\n \"blue\": 1\n }\n }\n },\n \"spreadsheetTheme\": {\n \"primaryFontFamily\": \"Arial\",\n \"themeColors\": [\n {\n \"colorType\": \"TEXT\",\n \"color\": {\n \"rgbColor\": {}\n }\n },\n {\n \"colorType\": \"BACKGROUND\",\n \"color\": {\n \"rgbColor\": {\n \"red\": 1,\n \"green\": 1,\n \"blue\": 1\n }\n }\n },\n {\n \"colorType\": \"ACCENT1\",\n \"color\": {\n \"rgbColor\": {\n \"red\": 0.25882354,\n \"green\": 0.52156866,\n \"blue\": 0.95686275\n }\n }\n },\n {\n \"colorType\": \"ACCENT2\",\n \"color\": {\n \"rgbColor\": {\n \"red\": 0.91764706,\n \"green\": 0.2627451,\n \"blue\": 0.20784314\n }\n }\n },\n {\n \"colorType\": \"ACCENT3\",\n \"color\": {\n \"rgbColor\": {\n \"red\": 0.9843137,\n \"green\": 0.7372549,\n \"blue\": 0.015686275\n }\n }\n },\n {\n \"colorType\": \"ACCENT4\",\n \"color\": {\n \"rgbColor\": {\n \"red\": 0.20392157,\n \"green\": 0.65882355,\n \"blue\": 0.3254902\n }\n }\n },\n {\n \"colorType\": \"ACCENT5\",\n \"color\": {\n \"rgbColor\": {\n \"red\": 1,\n \"green\": 0.42745098,\n \"blue\": 0.003921569\n }\n }\n },\n {\n \"colorType\": \"ACCENT6\",\n \"color\": {\n \"rgbColor\": {\n \"red\": 0.27450982,\n \"green\": 0.7411765,\n \"blue\": 0.7764706\n }\n }\n },\n {\n \"colorType\": \"LINK\",\n \"color\": {\n \"rgbColor\": {\n \"red\": 0.06666667,\n \"green\": 0.33333334,\n \"blue\": 0.8\n }\n }\n }\n ]\n }\n },\n \"sheets\": [\n {\n \"properties\": {\n \"sheetId\": 0,\n \"title\": \"Sheet1\",\n \"index\": 0,\n \"sheetType\": \"GRID\",\n \"gridProperties\": {\n \"rowCount\": 1000,\n \"columnCount\": 26\n }\n }\n }\n ],\n \"spreadsheetUrl\": \"https://docs.google.com/spreadsheets/d/1ixIGCQezexeSZMbzt_A3kYfYLMC9UI4mmFmlw-G_9NI/edit\"\n}\n" } } }, { "request": { "method": "POST", - "uri": "https://sheets.googleapis.com/v4/spreadsheets/1D5C1Uoz_eZBURStCMEJCStrcW3H5MhVhAKkYTi19TWk/values/%27Sheet1%27:clear", + "uri": "https://sheets.googleapis.com/v4/spreadsheets/1ixIGCQezexeSZMbzt_A3kYfYLMC9UI4mmFmlw-G_9NI/values/%27Sheet1%27:clear", "body": null, "headers": { "User-Agent": [ - "python-requests/2.31.0" + "python-requests/2.32.3" ], "Accept-Encoding": [ "gzip, deflate" @@ -263,12 +245,6 @@ "Connection": [ "keep-alive" ], - "x-goog-api-client": [ - "cred-type/sa" - ], - "x-allowed-locations": [ - "0x0" - ], "Content-Length": [ "0" ], @@ -283,58 +259,58 @@ "message": "OK" }, "headers": { + "Cache-Control": [ + "private" + ], + "Alt-Svc": [ + "h3=\":443\"; ma=2592000,h3-29=\":443\"; ma=2592000" + ], + "X-XSS-Protection": [ + "0" + ], "Transfer-Encoding": [ "chunked" ], - "X-Content-Type-Options": [ - "nosniff" + "x-l2-request-path": [ + "l2-managed-6" + ], + "Server": [ + "ESF" + ], + "Date": [ + "Mon, 07 Oct 2024 19:28:45 GMT" ], "X-Frame-Options": [ "SAMEORIGIN" ], - "x-l2-request-path": [ - "l2-managed-6" - ], "Vary": [ "Origin", "X-Origin", "Referer" ], - "Server": [ - "ESF" - ], - "Cache-Control": [ - "private" - ], - "Date": [ - "Wed, 01 May 2024 12:10:37 GMT" + "X-Content-Type-Options": [ + "nosniff" ], "Content-Type": [ "application/json; charset=UTF-8" ], - "Alt-Svc": [ - "h3=\":443\"; ma=2592000,h3-29=\":443\"; ma=2592000" - ], - "X-XSS-Protection": [ - "0" - ], "content-length": [ "107" ] }, "body": { - "string": "{\n \"spreadsheetId\": \"1D5C1Uoz_eZBURStCMEJCStrcW3H5MhVhAKkYTi19TWk\",\n \"clearedRange\": \"Sheet1!A1:Z1000\"\n}\n" + "string": "{\n \"spreadsheetId\": \"1ixIGCQezexeSZMbzt_A3kYfYLMC9UI4mmFmlw-G_9NI\",\n \"clearedRange\": \"Sheet1!A1:Z1000\"\n}\n" } } }, { "request": { "method": "GET", - "uri": "https://sheets.googleapis.com/v4/spreadsheets/1D5C1Uoz_eZBURStCMEJCStrcW3H5MhVhAKkYTi19TWk?includeGridData=false", + "uri": "https://sheets.googleapis.com/v4/spreadsheets/1ixIGCQezexeSZMbzt_A3kYfYLMC9UI4mmFmlw-G_9NI?includeGridData=false", "body": null, "headers": { "User-Agent": [ - "python-requests/2.31.0" + "python-requests/2.32.3" ], "Accept-Encoding": [ "gzip, deflate" @@ -345,12 +321,6 @@ "Connection": [ "keep-alive" ], - "x-goog-api-client": [ - "cred-type/sa" - ], - "x-allowed-locations": [ - "0x0" - ], "authorization": [ "" ] @@ -362,58 +332,58 @@ "message": "OK" }, "headers": { + "Cache-Control": [ + "private" + ], + "Alt-Svc": [ + "h3=\":443\"; ma=2592000,h3-29=\":443\"; ma=2592000" + ], + "X-XSS-Protection": [ + "0" + ], "Transfer-Encoding": [ "chunked" ], - "X-Content-Type-Options": [ - "nosniff" + "x-l2-request-path": [ + "l2-managed-6" + ], + "Server": [ + "ESF" + ], + "Date": [ + "Mon, 07 Oct 2024 19:28:45 GMT" ], "X-Frame-Options": [ "SAMEORIGIN" ], - "x-l2-request-path": [ - "l2-managed-6" - ], "Vary": [ "Origin", "X-Origin", "Referer" ], - "Server": [ - "ESF" - ], - "Cache-Control": [ - "private" - ], - "Date": [ - "Wed, 01 May 2024 12:10:39 GMT" + "X-Content-Type-Options": [ + "nosniff" ], "Content-Type": [ "application/json; charset=UTF-8" ], - "Alt-Svc": [ - "h3=\":443\"; ma=2592000,h3-29=\":443\"; ma=2592000" - ], - "X-XSS-Protection": [ - "0" - ], "content-length": [ "3331" ] }, "body": { - "string": "{\n \"spreadsheetId\": \"1D5C1Uoz_eZBURStCMEJCStrcW3H5MhVhAKkYTi19TWk\",\n \"properties\": {\n \"title\": \"Test WorksheetTest test_get_notes\",\n \"locale\": \"en_US\",\n \"autoRecalc\": \"ON_CHANGE\",\n \"timeZone\": \"Etc/GMT\",\n \"defaultFormat\": {\n \"backgroundColor\": {\n \"red\": 1,\n \"green\": 1,\n \"blue\": 1\n },\n \"padding\": {\n \"top\": 2,\n \"right\": 3,\n \"bottom\": 2,\n \"left\": 3\n },\n \"verticalAlignment\": \"BOTTOM\",\n \"wrapStrategy\": \"OVERFLOW_CELL\",\n \"textFormat\": {\n \"foregroundColor\": {},\n \"fontFamily\": \"arial,sans,sans-serif\",\n \"fontSize\": 10,\n \"bold\": false,\n \"italic\": false,\n \"strikethrough\": false,\n \"underline\": false,\n \"foregroundColorStyle\": {\n \"rgbColor\": {}\n }\n },\n \"backgroundColorStyle\": {\n \"rgbColor\": {\n \"red\": 1,\n \"green\": 1,\n \"blue\": 1\n }\n }\n },\n \"spreadsheetTheme\": {\n \"primaryFontFamily\": \"Arial\",\n \"themeColors\": [\n {\n \"colorType\": \"TEXT\",\n \"color\": {\n \"rgbColor\": {}\n }\n },\n {\n \"colorType\": \"BACKGROUND\",\n \"color\": {\n \"rgbColor\": {\n \"red\": 1,\n \"green\": 1,\n \"blue\": 1\n }\n }\n },\n {\n \"colorType\": \"ACCENT1\",\n \"color\": {\n \"rgbColor\": {\n \"red\": 0.25882354,\n \"green\": 0.52156866,\n \"blue\": 0.95686275\n }\n }\n },\n {\n \"colorType\": \"ACCENT2\",\n \"color\": {\n \"rgbColor\": {\n \"red\": 0.91764706,\n \"green\": 0.2627451,\n \"blue\": 0.20784314\n }\n }\n },\n {\n \"colorType\": \"ACCENT3\",\n \"color\": {\n \"rgbColor\": {\n \"red\": 0.9843137,\n \"green\": 0.7372549,\n \"blue\": 0.015686275\n }\n }\n },\n {\n \"colorType\": \"ACCENT4\",\n \"color\": {\n \"rgbColor\": {\n \"red\": 0.20392157,\n \"green\": 0.65882355,\n \"blue\": 0.3254902\n }\n }\n },\n {\n \"colorType\": \"ACCENT5\",\n \"color\": {\n \"rgbColor\": {\n \"red\": 1,\n \"green\": 0.42745098,\n \"blue\": 0.003921569\n }\n }\n },\n {\n \"colorType\": \"ACCENT6\",\n \"color\": {\n \"rgbColor\": {\n \"red\": 0.27450982,\n \"green\": 0.7411765,\n \"blue\": 0.7764706\n }\n }\n },\n {\n \"colorType\": \"LINK\",\n \"color\": {\n \"rgbColor\": {\n \"red\": 0.06666667,\n \"green\": 0.33333334,\n \"blue\": 0.8\n }\n }\n }\n ]\n }\n },\n \"sheets\": [\n {\n \"properties\": {\n \"sheetId\": 0,\n \"title\": \"Sheet1\",\n \"index\": 0,\n \"sheetType\": \"GRID\",\n \"gridProperties\": {\n \"rowCount\": 1000,\n \"columnCount\": 26\n }\n }\n }\n ],\n \"spreadsheetUrl\": \"https://docs.google.com/spreadsheets/d/1D5C1Uoz_eZBURStCMEJCStrcW3H5MhVhAKkYTi19TWk/edit\"\n}\n" + "string": "{\n \"spreadsheetId\": \"1ixIGCQezexeSZMbzt_A3kYfYLMC9UI4mmFmlw-G_9NI\",\n \"properties\": {\n \"title\": \"Test WorksheetTest test_get_notes\",\n \"locale\": \"en_US\",\n \"autoRecalc\": \"ON_CHANGE\",\n \"timeZone\": \"Etc/GMT\",\n \"defaultFormat\": {\n \"backgroundColor\": {\n \"red\": 1,\n \"green\": 1,\n \"blue\": 1\n },\n \"padding\": {\n \"top\": 2,\n \"right\": 3,\n \"bottom\": 2,\n \"left\": 3\n },\n \"verticalAlignment\": \"BOTTOM\",\n \"wrapStrategy\": \"OVERFLOW_CELL\",\n \"textFormat\": {\n \"foregroundColor\": {},\n \"fontFamily\": \"arial,sans,sans-serif\",\n \"fontSize\": 10,\n \"bold\": false,\n \"italic\": false,\n \"strikethrough\": false,\n \"underline\": false,\n \"foregroundColorStyle\": {\n \"rgbColor\": {}\n }\n },\n \"backgroundColorStyle\": {\n \"rgbColor\": {\n \"red\": 1,\n \"green\": 1,\n \"blue\": 1\n }\n }\n },\n \"spreadsheetTheme\": {\n \"primaryFontFamily\": \"Arial\",\n \"themeColors\": [\n {\n \"colorType\": \"TEXT\",\n \"color\": {\n \"rgbColor\": {}\n }\n },\n {\n \"colorType\": \"BACKGROUND\",\n \"color\": {\n \"rgbColor\": {\n \"red\": 1,\n \"green\": 1,\n \"blue\": 1\n }\n }\n },\n {\n \"colorType\": \"ACCENT1\",\n \"color\": {\n \"rgbColor\": {\n \"red\": 0.25882354,\n \"green\": 0.52156866,\n \"blue\": 0.95686275\n }\n }\n },\n {\n \"colorType\": \"ACCENT2\",\n \"color\": {\n \"rgbColor\": {\n \"red\": 0.91764706,\n \"green\": 0.2627451,\n \"blue\": 0.20784314\n }\n }\n },\n {\n \"colorType\": \"ACCENT3\",\n \"color\": {\n \"rgbColor\": {\n \"red\": 0.9843137,\n \"green\": 0.7372549,\n \"blue\": 0.015686275\n }\n }\n },\n {\n \"colorType\": \"ACCENT4\",\n \"color\": {\n \"rgbColor\": {\n \"red\": 0.20392157,\n \"green\": 0.65882355,\n \"blue\": 0.3254902\n }\n }\n },\n {\n \"colorType\": \"ACCENT5\",\n \"color\": {\n \"rgbColor\": {\n \"red\": 1,\n \"green\": 0.42745098,\n \"blue\": 0.003921569\n }\n }\n },\n {\n \"colorType\": \"ACCENT6\",\n \"color\": {\n \"rgbColor\": {\n \"red\": 0.27450982,\n \"green\": 0.7411765,\n \"blue\": 0.7764706\n }\n }\n },\n {\n \"colorType\": \"LINK\",\n \"color\": {\n \"rgbColor\": {\n \"red\": 0.06666667,\n \"green\": 0.33333334,\n \"blue\": 0.8\n }\n }\n }\n ]\n }\n },\n \"sheets\": [\n {\n \"properties\": {\n \"sheetId\": 0,\n \"title\": \"Sheet1\",\n \"index\": 0,\n \"sheetType\": \"GRID\",\n \"gridProperties\": {\n \"rowCount\": 1000,\n \"columnCount\": 26\n }\n }\n }\n ],\n \"spreadsheetUrl\": \"https://docs.google.com/spreadsheets/d/1ixIGCQezexeSZMbzt_A3kYfYLMC9UI4mmFmlw-G_9NI/edit\"\n}\n" } } }, { "request": { "method": "GET", - "uri": "https://sheets.googleapis.com/v4/spreadsheets/1D5C1Uoz_eZBURStCMEJCStrcW3H5MhVhAKkYTi19TWk?fields=sheets.data.rowData.values.note", + "uri": "https://sheets.googleapis.com/v4/spreadsheets/1ixIGCQezexeSZMbzt_A3kYfYLMC9UI4mmFmlw-G_9NI?fields=sheets.data.rowData.values.note&ranges=%27Sheet1%27", "body": null, "headers": { "User-Agent": [ - "python-requests/2.31.0" + "python-requests/2.32.3" ], "Accept-Encoding": [ "gzip, deflate" @@ -424,12 +394,6 @@ "Connection": [ "keep-alive" ], - "x-goog-api-client": [ - "cred-type/sa" - ], - "x-allowed-locations": [ - "0x0" - ], "authorization": [ "" ] @@ -441,41 +405,41 @@ "message": "OK" }, "headers": { + "Cache-Control": [ + "private" + ], + "Alt-Svc": [ + "h3=\":443\"; ma=2592000,h3-29=\":443\"; ma=2592000" + ], + "X-XSS-Protection": [ + "0" + ], "Transfer-Encoding": [ "chunked" ], - "X-Content-Type-Options": [ - "nosniff" + "x-l2-request-path": [ + "l2-managed-6" + ], + "Server": [ + "ESF" + ], + "Date": [ + "Mon, 07 Oct 2024 19:28:46 GMT" ], "X-Frame-Options": [ "SAMEORIGIN" ], - "x-l2-request-path": [ - "l2-managed-6" - ], "Vary": [ "Origin", "X-Origin", "Referer" ], - "Server": [ - "ESF" - ], - "Cache-Control": [ - "private" - ], - "Date": [ - "Wed, 01 May 2024 12:10:39 GMT" + "X-Content-Type-Options": [ + "nosniff" ], "Content-Type": [ "application/json; charset=UTF-8" ], - "Alt-Svc": [ - "h3=\":443\"; ma=2592000,h3-29=\":443\"; ma=2592000" - ], - "X-XSS-Protection": [ - "0" - ], "content-length": [ "69" ] @@ -488,11 +452,11 @@ { "request": { "method": "POST", - "uri": "https://sheets.googleapis.com/v4/spreadsheets/1D5C1Uoz_eZBURStCMEJCStrcW3H5MhVhAKkYTi19TWk:batchUpdate", - "body": "{\"requests\": [{\"updateCells\": {\"range\": {\"startRowIndex\": 0, \"endRowIndex\": 1, \"startColumnIndex\": 0, \"endColumnIndex\": 1, \"sheetId\": 0}, \"fields\": \"note\", \"rows\": [{\"values\": [{\"note\": \"read my note\"}]}]}}, {\"updateCells\": {\"range\": {\"startRowIndex\": 1, \"endRowIndex\": 2, \"startColumnIndex\": 1, \"endColumnIndex\": 2, \"sheetId\": 0}, \"fields\": \"note\", \"rows\": [{\"values\": [{\"note\": \"Or don't\"}]}]}}]}", + "uri": "https://sheets.googleapis.com/v4/spreadsheets/1ixIGCQezexeSZMbzt_A3kYfYLMC9UI4mmFmlw-G_9NI:batchUpdate", + "body": "{\"requests\": [{\"updateCells\": {\"range\": {\"startRowIndex\": 0, \"endRowIndex\": 1, \"startColumnIndex\": 0, \"endColumnIndex\": 1, \"sheetId\": 0}, \"fields\": \"note\", \"rows\": [{\"values\": [{\"note\": \"read my note\"}]}]}}, {\"updateCells\": {\"range\": {\"startRowIndex\": 1, \"endRowIndex\": 2, \"startColumnIndex\": 1, \"endColumnIndex\": 2, \"sheetId\": 0}, \"fields\": \"note\", \"rows\": [{\"values\": [{\"note\": \"Or don't\"}]}]}}, {\"updateCells\": {\"range\": {\"startRowIndex\": 2, \"endRowIndex\": 3, \"startColumnIndex\": 0, \"endColumnIndex\": 1, \"sheetId\": 0}, \"fields\": \"note\", \"rows\": [{\"values\": [{\"note\": \"another note\"}]}]}}, {\"updateCells\": {\"range\": {\"startRowIndex\": 2, \"endRowIndex\": 3, \"startColumnIndex\": 2, \"endColumnIndex\": 3, \"sheetId\": 0}, \"fields\": \"note\", \"rows\": [{\"values\": [{\"note\": \"test\"}]}]}}]}", "headers": { "User-Agent": [ - "python-requests/2.31.0" + "python-requests/2.32.3" ], "Accept-Encoding": [ "gzip, deflate" @@ -503,14 +467,8 @@ "Connection": [ "keep-alive" ], - "x-goog-api-client": [ - "cred-type/sa" - ], - "x-allowed-locations": [ - "0x0" - ], "Content-Length": [ - "398" + "778" ], "Content-Type": [ "application/json" @@ -526,58 +484,58 @@ "message": "OK" }, "headers": { + "Cache-Control": [ + "private" + ], + "Alt-Svc": [ + "h3=\":443\"; ma=2592000,h3-29=\":443\"; ma=2592000" + ], + "X-XSS-Protection": [ + "0" + ], "Transfer-Encoding": [ "chunked" ], - "X-Content-Type-Options": [ - "nosniff" + "x-l2-request-path": [ + "l2-managed-6" + ], + "Server": [ + "ESF" + ], + "Date": [ + "Mon, 07 Oct 2024 19:28:47 GMT" ], "X-Frame-Options": [ "SAMEORIGIN" ], - "x-l2-request-path": [ - "l2-managed-6" - ], "Vary": [ "Origin", "X-Origin", "Referer" ], - "Server": [ - "ESF" - ], - "Cache-Control": [ - "private" - ], - "Date": [ - "Wed, 01 May 2024 12:10:40 GMT" + "X-Content-Type-Options": [ + "nosniff" ], "Content-Type": [ "application/json; charset=UTF-8" ], - "Alt-Svc": [ - "h3=\":443\"; ma=2592000,h3-29=\":443\"; ma=2592000" - ], - "X-XSS-Protection": [ - "0" - ], "content-length": [ - "105" + "121" ] }, "body": { - "string": "{\n \"spreadsheetId\": \"1D5C1Uoz_eZBURStCMEJCStrcW3H5MhVhAKkYTi19TWk\",\n \"replies\": [\n {},\n {}\n ]\n}\n" + "string": "{\n \"spreadsheetId\": \"1ixIGCQezexeSZMbzt_A3kYfYLMC9UI4mmFmlw-G_9NI\",\n \"replies\": [\n {},\n {},\n {},\n {}\n ]\n}\n" } } }, { "request": { "method": "GET", - "uri": "https://sheets.googleapis.com/v4/spreadsheets/1D5C1Uoz_eZBURStCMEJCStrcW3H5MhVhAKkYTi19TWk?fields=sheets.data.rowData.values.note", + "uri": "https://sheets.googleapis.com/v4/spreadsheets/1ixIGCQezexeSZMbzt_A3kYfYLMC9UI4mmFmlw-G_9NI?fields=sheets.data.rowData.values.note&ranges=%27Sheet1%27%21A2%3AC3", "body": null, "headers": { "User-Agent": [ - "python-requests/2.31.0" + "python-requests/2.32.3" ], "Accept-Encoding": [ "gzip, deflate" @@ -588,12 +546,6 @@ "Connection": [ "keep-alive" ], - "x-goog-api-client": [ - "cred-type/sa" - ], - "x-allowed-locations": [ - "0x0" - ], "authorization": [ "" ] @@ -605,58 +557,131 @@ "message": "OK" }, "headers": { + "Cache-Control": [ + "private" + ], + "Alt-Svc": [ + "h3=\":443\"; ma=2592000,h3-29=\":443\"; ma=2592000" + ], + "X-XSS-Protection": [ + "0" + ], "Transfer-Encoding": [ "chunked" ], - "X-Content-Type-Options": [ - "nosniff" + "x-l2-request-path": [ + "l2-managed-6" + ], + "Server": [ + "ESF" + ], + "Date": [ + "Mon, 07 Oct 2024 19:28:47 GMT" ], "X-Frame-Options": [ "SAMEORIGIN" ], - "x-l2-request-path": [ - "l2-managed-6" - ], "Vary": [ "Origin", "X-Origin", "Referer" ], - "Server": [ - "ESF" - ], - "Cache-Control": [ - "private" - ], - "Date": [ - "Wed, 01 May 2024 12:10:41 GMT" + "X-Content-Type-Options": [ + "nosniff" ], "Content-Type": [ "application/json; charset=UTF-8" ], + "content-length": [ + "514" + ] + }, + "body": { + "string": "{\n \"sheets\": [\n {\n \"data\": [\n {\n \"rowData\": [\n {\n \"values\": [\n {},\n {\n \"note\": \"Or don't\"\n }\n ]\n },\n {\n \"values\": [\n {\n \"note\": \"another note\"\n },\n {},\n {\n \"note\": \"test\"\n }\n ]\n }\n ]\n }\n ]\n }\n ]\n}\n" + } + } + }, + { + "request": { + "method": "GET", + "uri": "https://sheets.googleapis.com/v4/spreadsheets/1ixIGCQezexeSZMbzt_A3kYfYLMC9UI4mmFmlw-G_9NI?fields=sheets.data.rowData.values.note&ranges=%27Sheet1%27", + "body": null, + "headers": { + "User-Agent": [ + "python-requests/2.32.3" + ], + "Accept-Encoding": [ + "gzip, deflate" + ], + "Accept": [ + "*/*" + ], + "Connection": [ + "keep-alive" + ], + "authorization": [ + "" + ] + } + }, + "response": { + "status": { + "code": 200, + "message": "OK" + }, + "headers": { + "Cache-Control": [ + "private" + ], "Alt-Svc": [ "h3=\":443\"; ma=2592000,h3-29=\":443\"; ma=2592000" ], "X-XSS-Protection": [ "0" ], + "Transfer-Encoding": [ + "chunked" + ], + "x-l2-request-path": [ + "l2-managed-6" + ], + "Server": [ + "ESF" + ], + "Date": [ + "Mon, 07 Oct 2024 19:28:48 GMT" + ], + "X-Frame-Options": [ + "SAMEORIGIN" + ], + "Vary": [ + "Origin", + "X-Origin", + "Referer" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "Content-Type": [ + "application/json; charset=UTF-8" + ], "content-length": [ - "424" + "662" ] }, "body": { - "string": "{\n \"sheets\": [\n {\n \"data\": [\n {\n \"rowData\": [\n {\n \"values\": [\n {\n \"note\": \"read my note\"\n }\n ]\n },\n {\n \"values\": [\n {},\n {\n \"note\": \"Or don't\"\n }\n ]\n }\n ]\n }\n ]\n }\n ]\n}\n" + "string": "{\n \"sheets\": [\n {\n \"data\": [\n {\n \"rowData\": [\n {\n \"values\": [\n {\n \"note\": \"read my note\"\n }\n ]\n },\n {\n \"values\": [\n {},\n {\n \"note\": \"Or don't\"\n }\n ]\n },\n {\n \"values\": [\n {\n \"note\": \"another note\"\n },\n {},\n {\n \"note\": \"test\"\n }\n ]\n }\n ]\n }\n ]\n }\n ]\n}\n" } } }, { "request": { "method": "DELETE", - "uri": "https://www.googleapis.com/drive/v3/files/1D5C1Uoz_eZBURStCMEJCStrcW3H5MhVhAKkYTi19TWk?supportsAllDrives=True", + "uri": "https://www.googleapis.com/drive/v3/files/1ixIGCQezexeSZMbzt_A3kYfYLMC9UI4mmFmlw-G_9NI?supportsAllDrives=True", "body": null, "headers": { "User-Agent": [ - "python-requests/2.31.0" + "python-requests/2.32.3" ], "Accept-Encoding": [ "gzip, deflate" @@ -667,12 +692,6 @@ "Connection": [ "keep-alive" ], - "x-goog-api-client": [ - "cred-type/sa" - ], - "x-allowed-locations": [ - "0x0" - ], "Content-Length": [ "0" ], @@ -687,41 +706,41 @@ "message": "No Content" }, "headers": { - "Expires": [ - "Mon, 01 Jan 1990 00:00:00 GMT" + "Cache-Control": [ + "no-cache, no-store, max-age=0, must-revalidate" ], "X-Content-Type-Options": [ "nosniff" ], - "X-Frame-Options": [ - "SAMEORIGIN" - ], "Content-Length": [ "0" ], + "Alt-Svc": [ + "h3=\":443\"; ma=2592000,h3-29=\":443\"; ma=2592000" + ], + "X-XSS-Protection": [ + "0" + ], "Pragma": [ "no-cache" ], - "Vary": [ - "Origin, X-Origin" - ], "Server": [ "ESF" ], - "Cache-Control": [ - "no-cache, no-store, max-age=0, must-revalidate" - ], "Date": [ - "Wed, 01 May 2024 12:10:41 GMT" + "Mon, 07 Oct 2024 19:28:48 GMT" ], - "Content-Type": [ - "text/html" + "X-Frame-Options": [ + "SAMEORIGIN" ], - "Alt-Svc": [ - "h3=\":443\"; ma=2592000,h3-29=\":443\"; ma=2592000" + "Vary": [ + "Origin, X-Origin" ], - "X-XSS-Protection": [ - "0" + "Expires": [ + "Mon, 01 Jan 1990 00:00:00 GMT" + ], + "Content-Type": [ + "text/html" ] }, "body": { diff --git a/tests/cassettes/WorksheetTest.test_get_notes_2nd_sheet.json b/tests/cassettes/WorksheetTest.test_get_notes_2nd_sheet.json new file mode 100644 index 00000000..68de9698 --- /dev/null +++ b/tests/cassettes/WorksheetTest.test_get_notes_2nd_sheet.json @@ -0,0 +1,1511 @@ +{ + "version": 1, + "interactions": [ + { + "request": { + "method": "POST", + "uri": "https://www.googleapis.com/drive/v3/files?supportsAllDrives=True", + "body": "{\"name\": \"Test WorksheetTest test_get_notes_2nd_sheet\", \"mimeType\": \"application/vnd.google-apps.spreadsheet\"}", + "headers": { + "User-Agent": [ + "python-requests/2.32.3" + ], + "Accept-Encoding": [ + "gzip, deflate" + ], + "Accept": [ + "*/*" + ], + "Connection": [ + "keep-alive" + ], + "Content-Length": [ + "110" + ], + "Content-Type": [ + "application/json" + ], + "authorization": [ + "" + ] + } + }, + "response": { + "status": { + "code": 200, + "message": "OK" + }, + "headers": { + "Vary": [ + "Origin, X-Origin" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "Date": [ + "Mon, 07 Oct 2024 19:27:44 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Expires": [ + "Mon, 01 Jan 1990 00:00:00 GMT" + ], + "Alt-Svc": [ + "h3=\":443\"; ma=2592000,h3-29=\":443\"; ma=2592000" + ], + "Cache-Control": [ + "no-cache, no-store, max-age=0, must-revalidate" + ], + "Content-Type": [ + "application/json; charset=UTF-8" + ], + "Transfer-Encoding": [ + "chunked" + ], + "X-XSS-Protection": [ + "0" + ], + "Server": [ + "ESF" + ], + "X-Frame-Options": [ + "SAMEORIGIN" + ], + "content-length": [ + "197" + ] + }, + "body": { + "string": "{\n \"kind\": \"drive#file\",\n \"id\": \"1EAqgeQrhtltuzA3qYPTQiiz23g2re7Jr4rnVOCUDybA\",\n \"name\": \"Test WorksheetTest test_get_notes_2nd_sheet\",\n \"mimeType\": \"application/vnd.google-apps.spreadsheet\"\n}\n" + } + } + }, + { + "request": { + "method": "GET", + "uri": "https://sheets.googleapis.com/v4/spreadsheets/1EAqgeQrhtltuzA3qYPTQiiz23g2re7Jr4rnVOCUDybA?includeGridData=false", + "body": null, + "headers": { + "User-Agent": [ + "python-requests/2.32.3" + ], + "Accept-Encoding": [ + "gzip, deflate" + ], + "Accept": [ + "*/*" + ], + "Connection": [ + "keep-alive" + ], + "authorization": [ + "" + ] + } + }, + "response": { + "status": { + "code": 200, + "message": "OK" + }, + "headers": { + "Vary": [ + "Origin", + "X-Origin", + "Referer" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "Date": [ + "Mon, 07 Oct 2024 19:27:45 GMT" + ], + "x-l2-request-path": [ + "l2-managed-6" + ], + "Alt-Svc": [ + "h3=\":443\"; ma=2592000,h3-29=\":443\"; ma=2592000" + ], + "Content-Type": [ + "application/json; charset=UTF-8" + ], + "Cache-Control": [ + "private" + ], + "Transfer-Encoding": [ + "chunked" + ], + "X-XSS-Protection": [ + "0" + ], + "Server": [ + "ESF" + ], + "X-Frame-Options": [ + "SAMEORIGIN" + ], + "content-length": [ + "3341" + ] + }, + "body": { + "string": "{\n \"spreadsheetId\": \"1EAqgeQrhtltuzA3qYPTQiiz23g2re7Jr4rnVOCUDybA\",\n \"properties\": {\n \"title\": \"Test WorksheetTest test_get_notes_2nd_sheet\",\n \"locale\": \"en_US\",\n \"autoRecalc\": \"ON_CHANGE\",\n \"timeZone\": \"Etc/GMT\",\n \"defaultFormat\": {\n \"backgroundColor\": {\n \"red\": 1,\n \"green\": 1,\n \"blue\": 1\n },\n \"padding\": {\n \"top\": 2,\n \"right\": 3,\n \"bottom\": 2,\n \"left\": 3\n },\n \"verticalAlignment\": \"BOTTOM\",\n \"wrapStrategy\": \"OVERFLOW_CELL\",\n \"textFormat\": {\n \"foregroundColor\": {},\n \"fontFamily\": \"arial,sans,sans-serif\",\n \"fontSize\": 10,\n \"bold\": false,\n \"italic\": false,\n \"strikethrough\": false,\n \"underline\": false,\n \"foregroundColorStyle\": {\n \"rgbColor\": {}\n }\n },\n \"backgroundColorStyle\": {\n \"rgbColor\": {\n \"red\": 1,\n \"green\": 1,\n \"blue\": 1\n }\n }\n },\n \"spreadsheetTheme\": {\n \"primaryFontFamily\": \"Arial\",\n \"themeColors\": [\n {\n \"colorType\": \"TEXT\",\n \"color\": {\n \"rgbColor\": {}\n }\n },\n {\n \"colorType\": \"BACKGROUND\",\n \"color\": {\n \"rgbColor\": {\n \"red\": 1,\n \"green\": 1,\n \"blue\": 1\n }\n }\n },\n {\n \"colorType\": \"ACCENT1\",\n \"color\": {\n \"rgbColor\": {\n \"red\": 0.25882354,\n \"green\": 0.52156866,\n \"blue\": 0.95686275\n }\n }\n },\n {\n \"colorType\": \"ACCENT2\",\n \"color\": {\n \"rgbColor\": {\n \"red\": 0.91764706,\n \"green\": 0.2627451,\n \"blue\": 0.20784314\n }\n }\n },\n {\n \"colorType\": \"ACCENT3\",\n \"color\": {\n \"rgbColor\": {\n \"red\": 0.9843137,\n \"green\": 0.7372549,\n \"blue\": 0.015686275\n }\n }\n },\n {\n \"colorType\": \"ACCENT4\",\n \"color\": {\n \"rgbColor\": {\n \"red\": 0.20392157,\n \"green\": 0.65882355,\n \"blue\": 0.3254902\n }\n }\n },\n {\n \"colorType\": \"ACCENT5\",\n \"color\": {\n \"rgbColor\": {\n \"red\": 1,\n \"green\": 0.42745098,\n \"blue\": 0.003921569\n }\n }\n },\n {\n \"colorType\": \"ACCENT6\",\n \"color\": {\n \"rgbColor\": {\n \"red\": 0.27450982,\n \"green\": 0.7411765,\n \"blue\": 0.7764706\n }\n }\n },\n {\n \"colorType\": \"LINK\",\n \"color\": {\n \"rgbColor\": {\n \"red\": 0.06666667,\n \"green\": 0.33333334,\n \"blue\": 0.8\n }\n }\n }\n ]\n }\n },\n \"sheets\": [\n {\n \"properties\": {\n \"sheetId\": 0,\n \"title\": \"Sheet1\",\n \"index\": 0,\n \"sheetType\": \"GRID\",\n \"gridProperties\": {\n \"rowCount\": 1000,\n \"columnCount\": 26\n }\n }\n }\n ],\n \"spreadsheetUrl\": \"https://docs.google.com/spreadsheets/d/1EAqgeQrhtltuzA3qYPTQiiz23g2re7Jr4rnVOCUDybA/edit\"\n}\n" + } + } + }, + { + "request": { + "method": "GET", + "uri": "https://sheets.googleapis.com/v4/spreadsheets/1EAqgeQrhtltuzA3qYPTQiiz23g2re7Jr4rnVOCUDybA?includeGridData=false", + "body": null, + "headers": { + "User-Agent": [ + "python-requests/2.32.3" + ], + "Accept-Encoding": [ + "gzip, deflate" + ], + "Accept": [ + "*/*" + ], + "Connection": [ + "keep-alive" + ], + "authorization": [ + "" + ] + } + }, + "response": { + "status": { + "code": 200, + "message": "OK" + }, + "headers": { + "Vary": [ + "Origin", + "X-Origin", + "Referer" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "Date": [ + "Mon, 07 Oct 2024 19:27:46 GMT" + ], + "x-l2-request-path": [ + "l2-managed-6" + ], + "Alt-Svc": [ + "h3=\":443\"; ma=2592000,h3-29=\":443\"; ma=2592000" + ], + "Content-Type": [ + "application/json; charset=UTF-8" + ], + "Cache-Control": [ + "private" + ], + "Transfer-Encoding": [ + "chunked" + ], + "X-XSS-Protection": [ + "0" + ], + "Server": [ + "ESF" + ], + "X-Frame-Options": [ + "SAMEORIGIN" + ], + "content-length": [ + "3341" + ] + }, + "body": { + "string": "{\n \"spreadsheetId\": \"1EAqgeQrhtltuzA3qYPTQiiz23g2re7Jr4rnVOCUDybA\",\n \"properties\": {\n \"title\": \"Test WorksheetTest test_get_notes_2nd_sheet\",\n \"locale\": \"en_US\",\n \"autoRecalc\": \"ON_CHANGE\",\n \"timeZone\": \"Etc/GMT\",\n \"defaultFormat\": {\n \"backgroundColor\": {\n \"red\": 1,\n \"green\": 1,\n \"blue\": 1\n },\n \"padding\": {\n \"top\": 2,\n \"right\": 3,\n \"bottom\": 2,\n \"left\": 3\n },\n \"verticalAlignment\": \"BOTTOM\",\n \"wrapStrategy\": \"OVERFLOW_CELL\",\n \"textFormat\": {\n \"foregroundColor\": {},\n \"fontFamily\": \"arial,sans,sans-serif\",\n \"fontSize\": 10,\n \"bold\": false,\n \"italic\": false,\n \"strikethrough\": false,\n \"underline\": false,\n \"foregroundColorStyle\": {\n \"rgbColor\": {}\n }\n },\n \"backgroundColorStyle\": {\n \"rgbColor\": {\n \"red\": 1,\n \"green\": 1,\n \"blue\": 1\n }\n }\n },\n \"spreadsheetTheme\": {\n \"primaryFontFamily\": \"Arial\",\n \"themeColors\": [\n {\n \"colorType\": \"TEXT\",\n \"color\": {\n \"rgbColor\": {}\n }\n },\n {\n \"colorType\": \"BACKGROUND\",\n \"color\": {\n \"rgbColor\": {\n \"red\": 1,\n \"green\": 1,\n \"blue\": 1\n }\n }\n },\n {\n \"colorType\": \"ACCENT1\",\n \"color\": {\n \"rgbColor\": {\n \"red\": 0.25882354,\n \"green\": 0.52156866,\n \"blue\": 0.95686275\n }\n }\n },\n {\n \"colorType\": \"ACCENT2\",\n \"color\": {\n \"rgbColor\": {\n \"red\": 0.91764706,\n \"green\": 0.2627451,\n \"blue\": 0.20784314\n }\n }\n },\n {\n \"colorType\": \"ACCENT3\",\n \"color\": {\n \"rgbColor\": {\n \"red\": 0.9843137,\n \"green\": 0.7372549,\n \"blue\": 0.015686275\n }\n }\n },\n {\n \"colorType\": \"ACCENT4\",\n \"color\": {\n \"rgbColor\": {\n \"red\": 0.20392157,\n \"green\": 0.65882355,\n \"blue\": 0.3254902\n }\n }\n },\n {\n \"colorType\": \"ACCENT5\",\n \"color\": {\n \"rgbColor\": {\n \"red\": 1,\n \"green\": 0.42745098,\n \"blue\": 0.003921569\n }\n }\n },\n {\n \"colorType\": \"ACCENT6\",\n \"color\": {\n \"rgbColor\": {\n \"red\": 0.27450982,\n \"green\": 0.7411765,\n \"blue\": 0.7764706\n }\n }\n },\n {\n \"colorType\": \"LINK\",\n \"color\": {\n \"rgbColor\": {\n \"red\": 0.06666667,\n \"green\": 0.33333334,\n \"blue\": 0.8\n }\n }\n }\n ]\n }\n },\n \"sheets\": [\n {\n \"properties\": {\n \"sheetId\": 0,\n \"title\": \"Sheet1\",\n \"index\": 0,\n \"sheetType\": \"GRID\",\n \"gridProperties\": {\n \"rowCount\": 1000,\n \"columnCount\": 26\n }\n }\n }\n ],\n \"spreadsheetUrl\": \"https://docs.google.com/spreadsheets/d/1EAqgeQrhtltuzA3qYPTQiiz23g2re7Jr4rnVOCUDybA/edit\"\n}\n" + } + } + }, + { + "request": { + "method": "POST", + "uri": "https://sheets.googleapis.com/v4/spreadsheets/1EAqgeQrhtltuzA3qYPTQiiz23g2re7Jr4rnVOCUDybA/values/%27Sheet1%27:clear", + "body": null, + "headers": { + "User-Agent": [ + "python-requests/2.32.3" + ], + "Accept-Encoding": [ + "gzip, deflate" + ], + "Accept": [ + "*/*" + ], + "Connection": [ + "keep-alive" + ], + "Content-Length": [ + "0" + ], + "authorization": [ + "" + ] + } + }, + "response": { + "status": { + "code": 200, + "message": "OK" + }, + "headers": { + "Vary": [ + "Origin", + "X-Origin", + "Referer" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "Date": [ + "Mon, 07 Oct 2024 19:27:47 GMT" + ], + "x-l2-request-path": [ + "l2-managed-6" + ], + "Alt-Svc": [ + "h3=\":443\"; ma=2592000,h3-29=\":443\"; ma=2592000" + ], + "Content-Type": [ + "application/json; charset=UTF-8" + ], + "Cache-Control": [ + "private" + ], + "Transfer-Encoding": [ + "chunked" + ], + "X-XSS-Protection": [ + "0" + ], + "Server": [ + "ESF" + ], + "X-Frame-Options": [ + "SAMEORIGIN" + ], + "content-length": [ + "107" + ] + }, + "body": { + "string": "{\n \"spreadsheetId\": \"1EAqgeQrhtltuzA3qYPTQiiz23g2re7Jr4rnVOCUDybA\",\n \"clearedRange\": \"Sheet1!A1:Z1000\"\n}\n" + } + } + }, + { + "request": { + "method": "POST", + "uri": "https://sheets.googleapis.com/v4/spreadsheets/1EAqgeQrhtltuzA3qYPTQiiz23g2re7Jr4rnVOCUDybA:batchUpdate", + "body": "{\"requests\": [{\"addSheet\": {\"properties\": {\"title\": \"worksheet 2\", \"sheetType\": \"GRID\", \"gridProperties\": {\"rowCount\": 3, \"columnCount\": 3}}}}]}", + "headers": { + "User-Agent": [ + "python-requests/2.32.3" + ], + "Accept-Encoding": [ + "gzip, deflate" + ], + "Accept": [ + "*/*" + ], + "Connection": [ + "keep-alive" + ], + "Content-Length": [ + "144" + ], + "Content-Type": [ + "application/json" + ], + "authorization": [ + "" + ] + } + }, + "response": { + "status": { + "code": 200, + "message": "OK" + }, + "headers": { + "Vary": [ + "Origin", + "X-Origin", + "Referer" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "Date": [ + "Mon, 07 Oct 2024 19:27:48 GMT" + ], + "x-l2-request-path": [ + "l2-managed-6" + ], + "Alt-Svc": [ + "h3=\":443\"; ma=2592000,h3-29=\":443\"; ma=2592000" + ], + "Content-Type": [ + "application/json; charset=UTF-8" + ], + "Cache-Control": [ + "private" + ], + "Transfer-Encoding": [ + "chunked" + ], + "X-XSS-Protection": [ + "0" + ], + "Server": [ + "ESF" + ], + "X-Frame-Options": [ + "SAMEORIGIN" + ], + "content-length": [ + "381" + ] + }, + "body": { + "string": "{\n \"spreadsheetId\": \"1EAqgeQrhtltuzA3qYPTQiiz23g2re7Jr4rnVOCUDybA\",\n \"replies\": [\n {\n \"addSheet\": {\n \"properties\": {\n \"sheetId\": 367780790,\n \"title\": \"worksheet 2\",\n \"index\": 1,\n \"sheetType\": \"GRID\",\n \"gridProperties\": {\n \"rowCount\": 3,\n \"columnCount\": 3\n }\n }\n }\n }\n ]\n}\n" + } + } + }, + { + "request": { + "method": "GET", + "uri": "https://sheets.googleapis.com/v4/spreadsheets/1EAqgeQrhtltuzA3qYPTQiiz23g2re7Jr4rnVOCUDybA?fields=sheets.data.rowData.values.note&ranges=%27worksheet+2%27", + "body": null, + "headers": { + "User-Agent": [ + "python-requests/2.32.3" + ], + "Accept-Encoding": [ + "gzip, deflate" + ], + "Accept": [ + "*/*" + ], + "Connection": [ + "keep-alive" + ], + "authorization": [ + "" + ] + } + }, + "response": { + "status": { + "code": 200, + "message": "OK" + }, + "headers": { + "Vary": [ + "Origin", + "X-Origin", + "Referer" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "Date": [ + "Mon, 07 Oct 2024 19:27:48 GMT" + ], + "x-l2-request-path": [ + "l2-managed-6" + ], + "Alt-Svc": [ + "h3=\":443\"; ma=2592000,h3-29=\":443\"; ma=2592000" + ], + "Content-Type": [ + "application/json; charset=UTF-8" + ], + "Cache-Control": [ + "private" + ], + "Transfer-Encoding": [ + "chunked" + ], + "X-XSS-Protection": [ + "0" + ], + "Server": [ + "ESF" + ], + "X-Frame-Options": [ + "SAMEORIGIN" + ], + "content-length": [ + "69" + ] + }, + "body": { + "string": "{\n \"sheets\": [\n {\n \"data\": [\n {}\n ]\n }\n ]\n}\n" + } + } + }, + { + "request": { + "method": "POST", + "uri": "https://sheets.googleapis.com/v4/spreadsheets/1EAqgeQrhtltuzA3qYPTQiiz23g2re7Jr4rnVOCUDybA:batchUpdate", + "body": "{\"requests\": [{\"updateCells\": {\"range\": {\"startRowIndex\": 0, \"endRowIndex\": 1, \"startColumnIndex\": 0, \"endColumnIndex\": 1, \"sheetId\": 367780790}, \"fields\": \"note\", \"rows\": [{\"values\": [{\"note\": \"the first time\"}]}]}}, {\"updateCells\": {\"range\": {\"startRowIndex\": 2, \"endRowIndex\": 3, \"startColumnIndex\": 1, \"endColumnIndex\": 2, \"sheetId\": 367780790}, \"fields\": \"note\", \"rows\": [{\"values\": [{\"note\": \"two sheets\"}]}]}}]}", + "headers": { + "User-Agent": [ + "python-requests/2.32.3" + ], + "Accept-Encoding": [ + "gzip, deflate" + ], + "Accept": [ + "*/*" + ], + "Connection": [ + "keep-alive" + ], + "Content-Length": [ + "418" + ], + "Content-Type": [ + "application/json" + ], + "authorization": [ + "" + ] + } + }, + "response": { + "status": { + "code": 200, + "message": "OK" + }, + "headers": { + "Vary": [ + "Origin", + "X-Origin", + "Referer" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "Date": [ + "Mon, 07 Oct 2024 19:27:49 GMT" + ], + "x-l2-request-path": [ + "l2-managed-6" + ], + "Alt-Svc": [ + "h3=\":443\"; ma=2592000,h3-29=\":443\"; ma=2592000" + ], + "Content-Type": [ + "application/json; charset=UTF-8" + ], + "Cache-Control": [ + "private" + ], + "Transfer-Encoding": [ + "chunked" + ], + "X-XSS-Protection": [ + "0" + ], + "Server": [ + "ESF" + ], + "X-Frame-Options": [ + "SAMEORIGIN" + ], + "content-length": [ + "105" + ] + }, + "body": { + "string": "{\n \"spreadsheetId\": \"1EAqgeQrhtltuzA3qYPTQiiz23g2re7Jr4rnVOCUDybA\",\n \"replies\": [\n {},\n {}\n ]\n}\n" + } + } + }, + { + "request": { + "method": "GET", + "uri": "https://sheets.googleapis.com/v4/spreadsheets/1EAqgeQrhtltuzA3qYPTQiiz23g2re7Jr4rnVOCUDybA?fields=sheets.data.rowData.values.note&ranges=%27worksheet+2%27", + "body": null, + "headers": { + "User-Agent": [ + "python-requests/2.32.3" + ], + "Accept-Encoding": [ + "gzip, deflate" + ], + "Accept": [ + "*/*" + ], + "Connection": [ + "keep-alive" + ], + "authorization": [ + "" + ] + } + }, + "response": { + "status": { + "code": 200, + "message": "OK" + }, + "headers": { + "Vary": [ + "Origin", + "X-Origin", + "Referer" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "Date": [ + "Mon, 07 Oct 2024 19:27:50 GMT" + ], + "x-l2-request-path": [ + "l2-managed-6" + ], + "Alt-Svc": [ + "h3=\":443\"; ma=2592000,h3-29=\":443\"; ma=2592000" + ], + "Content-Type": [ + "application/json; charset=UTF-8" + ], + "Cache-Control": [ + "private" + ], + "Transfer-Encoding": [ + "chunked" + ], + "X-XSS-Protection": [ + "0" + ], + "Server": [ + "ESF" + ], + "X-Frame-Options": [ + "SAMEORIGIN" + ], + "content-length": [ + "444" + ] + }, + "body": { + "string": "{\n \"sheets\": [\n {\n \"data\": [\n {\n \"rowData\": [\n {\n \"values\": [\n {\n \"note\": \"the first time\"\n }\n ]\n },\n {},\n {\n \"values\": [\n {},\n {\n \"note\": \"two sheets\"\n }\n ]\n }\n ]\n }\n ]\n }\n ]\n}\n" + } + } + }, + { + "request": { + "method": "GET", + "uri": "https://sheets.googleapis.com/v4/spreadsheets/1EAqgeQrhtltuzA3qYPTQiiz23g2re7Jr4rnVOCUDybA?fields=sheets.data.rowData.values.note&ranges=%27worksheet+2%27%21A2%3AC3", + "body": null, + "headers": { + "User-Agent": [ + "python-requests/2.32.3" + ], + "Accept-Encoding": [ + "gzip, deflate" + ], + "Accept": [ + "*/*" + ], + "Connection": [ + "keep-alive" + ], + "authorization": [ + "" + ] + } + }, + "response": { + "status": { + "code": 200, + "message": "OK" + }, + "headers": { + "Vary": [ + "Origin", + "X-Origin", + "Referer" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "Date": [ + "Mon, 07 Oct 2024 19:27:50 GMT" + ], + "x-l2-request-path": [ + "l2-managed-6" + ], + "Alt-Svc": [ + "h3=\":443\"; ma=2592000,h3-29=\":443\"; ma=2592000" + ], + "Content-Type": [ + "application/json; charset=UTF-8" + ], + "Cache-Control": [ + "private" + ], + "Transfer-Encoding": [ + "chunked" + ], + "X-XSS-Protection": [ + "0" + ], + "Server": [ + "ESF" + ], + "X-Frame-Options": [ + "SAMEORIGIN" + ], + "content-length": [ + "294" + ] + }, + "body": { + "string": "{\n \"sheets\": [\n {\n \"data\": [\n {\n \"rowData\": [\n {},\n {\n \"values\": [\n {},\n {\n \"note\": \"two sheets\"\n }\n ]\n }\n ]\n }\n ]\n }\n ]\n}\n" + } + } + }, + { + "request": { + "method": "DELETE", + "uri": "https://www.googleapis.com/drive/v3/files/1EAqgeQrhtltuzA3qYPTQiiz23g2re7Jr4rnVOCUDybA?supportsAllDrives=True", + "body": null, + "headers": { + "User-Agent": [ + "python-requests/2.32.3" + ], + "Accept-Encoding": [ + "gzip, deflate" + ], + "Accept": [ + "*/*" + ], + "Connection": [ + "keep-alive" + ], + "Content-Length": [ + "0" + ], + "authorization": [ + "" + ] + } + }, + "response": { + "status": { + "code": 204, + "message": "No Content" + }, + "headers": { + "Vary": [ + "Origin, X-Origin" + ], + "Content-Length": [ + "0" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "Date": [ + "Mon, 07 Oct 2024 19:27:51 GMT" + ], + "Pragma": [ + "no-cache" + ], + "Expires": [ + "Mon, 01 Jan 1990 00:00:00 GMT" + ], + "Alt-Svc": [ + "h3=\":443\"; ma=2592000,h3-29=\":443\"; ma=2592000" + ], + "Cache-Control": [ + "no-cache, no-store, max-age=0, must-revalidate" + ], + "Content-Type": [ + "text/html" + ], + "X-XSS-Protection": [ + "0" + ], + "Server": [ + "ESF" + ], + "X-Frame-Options": [ + "SAMEORIGIN" + ] + }, + "body": { + "string": "" + } + } + }, + { + "request": { + "method": "POST", + "uri": "https://www.googleapis.com/drive/v3/files?supportsAllDrives=True", + "body": "{\"name\": \"Test WorksheetTest test_get_notes_2nd_sheet\", \"mimeType\": \"application/vnd.google-apps.spreadsheet\"}", + "headers": { + "User-Agent": [ + "python-requests/2.32.3" + ], + "Accept-Encoding": [ + "gzip, deflate" + ], + "Accept": [ + "*/*" + ], + "Connection": [ + "keep-alive" + ], + "Content-Length": [ + "110" + ], + "Content-Type": [ + "application/json" + ], + "authorization": [ + "" + ] + } + }, + "response": { + "status": { + "code": 200, + "message": "OK" + }, + "headers": { + "Cache-Control": [ + "no-cache, no-store, max-age=0, must-revalidate" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "Alt-Svc": [ + "h3=\":443\"; ma=2592000,h3-29=\":443\"; ma=2592000" + ], + "X-XSS-Protection": [ + "0" + ], + "Transfer-Encoding": [ + "chunked" + ], + "Pragma": [ + "no-cache" + ], + "Server": [ + "ESF" + ], + "Date": [ + "Mon, 07 Oct 2024 19:28:50 GMT" + ], + "X-Frame-Options": [ + "SAMEORIGIN" + ], + "Vary": [ + "Origin, X-Origin" + ], + "Expires": [ + "Mon, 01 Jan 1990 00:00:00 GMT" + ], + "Content-Type": [ + "application/json; charset=UTF-8" + ], + "content-length": [ + "197" + ] + }, + "body": { + "string": "{\n \"kind\": \"drive#file\",\n \"id\": \"1ZMPsJJzU7mYbZlWDkedfckOibDOJpLP3W_v_YterZew\",\n \"name\": \"Test WorksheetTest test_get_notes_2nd_sheet\",\n \"mimeType\": \"application/vnd.google-apps.spreadsheet\"\n}\n" + } + } + }, + { + "request": { + "method": "GET", + "uri": "https://sheets.googleapis.com/v4/spreadsheets/1ZMPsJJzU7mYbZlWDkedfckOibDOJpLP3W_v_YterZew?includeGridData=false", + "body": null, + "headers": { + "User-Agent": [ + "python-requests/2.32.3" + ], + "Accept-Encoding": [ + "gzip, deflate" + ], + "Accept": [ + "*/*" + ], + "Connection": [ + "keep-alive" + ], + "authorization": [ + "" + ] + } + }, + "response": { + "status": { + "code": 200, + "message": "OK" + }, + "headers": { + "Cache-Control": [ + "private" + ], + "Alt-Svc": [ + "h3=\":443\"; ma=2592000,h3-29=\":443\"; ma=2592000" + ], + "X-XSS-Protection": [ + "0" + ], + "Transfer-Encoding": [ + "chunked" + ], + "x-l2-request-path": [ + "l2-managed-6" + ], + "Server": [ + "ESF" + ], + "Date": [ + "Mon, 07 Oct 2024 19:28:54 GMT" + ], + "X-Frame-Options": [ + "SAMEORIGIN" + ], + "Vary": [ + "Origin", + "X-Origin", + "Referer" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "Content-Type": [ + "application/json; charset=UTF-8" + ], + "content-length": [ + "3341" + ] + }, + "body": { + "string": "{\n \"spreadsheetId\": \"1ZMPsJJzU7mYbZlWDkedfckOibDOJpLP3W_v_YterZew\",\n \"properties\": {\n \"title\": \"Test WorksheetTest test_get_notes_2nd_sheet\",\n \"locale\": \"en_US\",\n \"autoRecalc\": \"ON_CHANGE\",\n \"timeZone\": \"Etc/GMT\",\n \"defaultFormat\": {\n \"backgroundColor\": {\n \"red\": 1,\n \"green\": 1,\n \"blue\": 1\n },\n \"padding\": {\n \"top\": 2,\n \"right\": 3,\n \"bottom\": 2,\n \"left\": 3\n },\n \"verticalAlignment\": \"BOTTOM\",\n \"wrapStrategy\": \"OVERFLOW_CELL\",\n \"textFormat\": {\n \"foregroundColor\": {},\n \"fontFamily\": \"arial,sans,sans-serif\",\n \"fontSize\": 10,\n \"bold\": false,\n \"italic\": false,\n \"strikethrough\": false,\n \"underline\": false,\n \"foregroundColorStyle\": {\n \"rgbColor\": {}\n }\n },\n \"backgroundColorStyle\": {\n \"rgbColor\": {\n \"red\": 1,\n \"green\": 1,\n \"blue\": 1\n }\n }\n },\n \"spreadsheetTheme\": {\n \"primaryFontFamily\": \"Arial\",\n \"themeColors\": [\n {\n \"colorType\": \"TEXT\",\n \"color\": {\n \"rgbColor\": {}\n }\n },\n {\n \"colorType\": \"BACKGROUND\",\n \"color\": {\n \"rgbColor\": {\n \"red\": 1,\n \"green\": 1,\n \"blue\": 1\n }\n }\n },\n {\n \"colorType\": \"ACCENT1\",\n \"color\": {\n \"rgbColor\": {\n \"red\": 0.25882354,\n \"green\": 0.52156866,\n \"blue\": 0.95686275\n }\n }\n },\n {\n \"colorType\": \"ACCENT2\",\n \"color\": {\n \"rgbColor\": {\n \"red\": 0.91764706,\n \"green\": 0.2627451,\n \"blue\": 0.20784314\n }\n }\n },\n {\n \"colorType\": \"ACCENT3\",\n \"color\": {\n \"rgbColor\": {\n \"red\": 0.9843137,\n \"green\": 0.7372549,\n \"blue\": 0.015686275\n }\n }\n },\n {\n \"colorType\": \"ACCENT4\",\n \"color\": {\n \"rgbColor\": {\n \"red\": 0.20392157,\n \"green\": 0.65882355,\n \"blue\": 0.3254902\n }\n }\n },\n {\n \"colorType\": \"ACCENT5\",\n \"color\": {\n \"rgbColor\": {\n \"red\": 1,\n \"green\": 0.42745098,\n \"blue\": 0.003921569\n }\n }\n },\n {\n \"colorType\": \"ACCENT6\",\n \"color\": {\n \"rgbColor\": {\n \"red\": 0.27450982,\n \"green\": 0.7411765,\n \"blue\": 0.7764706\n }\n }\n },\n {\n \"colorType\": \"LINK\",\n \"color\": {\n \"rgbColor\": {\n \"red\": 0.06666667,\n \"green\": 0.33333334,\n \"blue\": 0.8\n }\n }\n }\n ]\n }\n },\n \"sheets\": [\n {\n \"properties\": {\n \"sheetId\": 0,\n \"title\": \"Sheet1\",\n \"index\": 0,\n \"sheetType\": \"GRID\",\n \"gridProperties\": {\n \"rowCount\": 1000,\n \"columnCount\": 26\n }\n }\n }\n ],\n \"spreadsheetUrl\": \"https://docs.google.com/spreadsheets/d/1ZMPsJJzU7mYbZlWDkedfckOibDOJpLP3W_v_YterZew/edit\"\n}\n" + } + } + }, + { + "request": { + "method": "GET", + "uri": "https://sheets.googleapis.com/v4/spreadsheets/1ZMPsJJzU7mYbZlWDkedfckOibDOJpLP3W_v_YterZew?includeGridData=false", + "body": null, + "headers": { + "User-Agent": [ + "python-requests/2.32.3" + ], + "Accept-Encoding": [ + "gzip, deflate" + ], + "Accept": [ + "*/*" + ], + "Connection": [ + "keep-alive" + ], + "authorization": [ + "" + ] + } + }, + "response": { + "status": { + "code": 200, + "message": "OK" + }, + "headers": { + "Cache-Control": [ + "private" + ], + "Alt-Svc": [ + "h3=\":443\"; ma=2592000,h3-29=\":443\"; ma=2592000" + ], + "X-XSS-Protection": [ + "0" + ], + "Transfer-Encoding": [ + "chunked" + ], + "x-l2-request-path": [ + "l2-managed-6" + ], + "Server": [ + "ESF" + ], + "Date": [ + "Mon, 07 Oct 2024 19:28:55 GMT" + ], + "X-Frame-Options": [ + "SAMEORIGIN" + ], + "Vary": [ + "Origin", + "X-Origin", + "Referer" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "Content-Type": [ + "application/json; charset=UTF-8" + ], + "content-length": [ + "3341" + ] + }, + "body": { + "string": "{\n \"spreadsheetId\": \"1ZMPsJJzU7mYbZlWDkedfckOibDOJpLP3W_v_YterZew\",\n \"properties\": {\n \"title\": \"Test WorksheetTest test_get_notes_2nd_sheet\",\n \"locale\": \"en_US\",\n \"autoRecalc\": \"ON_CHANGE\",\n \"timeZone\": \"Etc/GMT\",\n \"defaultFormat\": {\n \"backgroundColor\": {\n \"red\": 1,\n \"green\": 1,\n \"blue\": 1\n },\n \"padding\": {\n \"top\": 2,\n \"right\": 3,\n \"bottom\": 2,\n \"left\": 3\n },\n \"verticalAlignment\": \"BOTTOM\",\n \"wrapStrategy\": \"OVERFLOW_CELL\",\n \"textFormat\": {\n \"foregroundColor\": {},\n \"fontFamily\": \"arial,sans,sans-serif\",\n \"fontSize\": 10,\n \"bold\": false,\n \"italic\": false,\n \"strikethrough\": false,\n \"underline\": false,\n \"foregroundColorStyle\": {\n \"rgbColor\": {}\n }\n },\n \"backgroundColorStyle\": {\n \"rgbColor\": {\n \"red\": 1,\n \"green\": 1,\n \"blue\": 1\n }\n }\n },\n \"spreadsheetTheme\": {\n \"primaryFontFamily\": \"Arial\",\n \"themeColors\": [\n {\n \"colorType\": \"TEXT\",\n \"color\": {\n \"rgbColor\": {}\n }\n },\n {\n \"colorType\": \"BACKGROUND\",\n \"color\": {\n \"rgbColor\": {\n \"red\": 1,\n \"green\": 1,\n \"blue\": 1\n }\n }\n },\n {\n \"colorType\": \"ACCENT1\",\n \"color\": {\n \"rgbColor\": {\n \"red\": 0.25882354,\n \"green\": 0.52156866,\n \"blue\": 0.95686275\n }\n }\n },\n {\n \"colorType\": \"ACCENT2\",\n \"color\": {\n \"rgbColor\": {\n \"red\": 0.91764706,\n \"green\": 0.2627451,\n \"blue\": 0.20784314\n }\n }\n },\n {\n \"colorType\": \"ACCENT3\",\n \"color\": {\n \"rgbColor\": {\n \"red\": 0.9843137,\n \"green\": 0.7372549,\n \"blue\": 0.015686275\n }\n }\n },\n {\n \"colorType\": \"ACCENT4\",\n \"color\": {\n \"rgbColor\": {\n \"red\": 0.20392157,\n \"green\": 0.65882355,\n \"blue\": 0.3254902\n }\n }\n },\n {\n \"colorType\": \"ACCENT5\",\n \"color\": {\n \"rgbColor\": {\n \"red\": 1,\n \"green\": 0.42745098,\n \"blue\": 0.003921569\n }\n }\n },\n {\n \"colorType\": \"ACCENT6\",\n \"color\": {\n \"rgbColor\": {\n \"red\": 0.27450982,\n \"green\": 0.7411765,\n \"blue\": 0.7764706\n }\n }\n },\n {\n \"colorType\": \"LINK\",\n \"color\": {\n \"rgbColor\": {\n \"red\": 0.06666667,\n \"green\": 0.33333334,\n \"blue\": 0.8\n }\n }\n }\n ]\n }\n },\n \"sheets\": [\n {\n \"properties\": {\n \"sheetId\": 0,\n \"title\": \"Sheet1\",\n \"index\": 0,\n \"sheetType\": \"GRID\",\n \"gridProperties\": {\n \"rowCount\": 1000,\n \"columnCount\": 26\n }\n }\n }\n ],\n \"spreadsheetUrl\": \"https://docs.google.com/spreadsheets/d/1ZMPsJJzU7mYbZlWDkedfckOibDOJpLP3W_v_YterZew/edit\"\n}\n" + } + } + }, + { + "request": { + "method": "POST", + "uri": "https://sheets.googleapis.com/v4/spreadsheets/1ZMPsJJzU7mYbZlWDkedfckOibDOJpLP3W_v_YterZew/values/%27Sheet1%27:clear", + "body": null, + "headers": { + "User-Agent": [ + "python-requests/2.32.3" + ], + "Accept-Encoding": [ + "gzip, deflate" + ], + "Accept": [ + "*/*" + ], + "Connection": [ + "keep-alive" + ], + "Content-Length": [ + "0" + ], + "authorization": [ + "" + ] + } + }, + "response": { + "status": { + "code": 200, + "message": "OK" + }, + "headers": { + "Cache-Control": [ + "private" + ], + "Alt-Svc": [ + "h3=\":443\"; ma=2592000,h3-29=\":443\"; ma=2592000" + ], + "X-XSS-Protection": [ + "0" + ], + "Transfer-Encoding": [ + "chunked" + ], + "x-l2-request-path": [ + "l2-managed-6" + ], + "Server": [ + "ESF" + ], + "Date": [ + "Mon, 07 Oct 2024 19:28:56 GMT" + ], + "X-Frame-Options": [ + "SAMEORIGIN" + ], + "Vary": [ + "Origin", + "X-Origin", + "Referer" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "Content-Type": [ + "application/json; charset=UTF-8" + ], + "content-length": [ + "107" + ] + }, + "body": { + "string": "{\n \"spreadsheetId\": \"1ZMPsJJzU7mYbZlWDkedfckOibDOJpLP3W_v_YterZew\",\n \"clearedRange\": \"Sheet1!A1:Z1000\"\n}\n" + } + } + }, + { + "request": { + "method": "POST", + "uri": "https://sheets.googleapis.com/v4/spreadsheets/1ZMPsJJzU7mYbZlWDkedfckOibDOJpLP3W_v_YterZew:batchUpdate", + "body": "{\"requests\": [{\"addSheet\": {\"properties\": {\"title\": \"worksheet 2\", \"sheetType\": \"GRID\", \"gridProperties\": {\"rowCount\": 3, \"columnCount\": 3}}}}]}", + "headers": { + "User-Agent": [ + "python-requests/2.32.3" + ], + "Accept-Encoding": [ + "gzip, deflate" + ], + "Accept": [ + "*/*" + ], + "Connection": [ + "keep-alive" + ], + "Content-Length": [ + "144" + ], + "Content-Type": [ + "application/json" + ], + "authorization": [ + "" + ] + } + }, + "response": { + "status": { + "code": 200, + "message": "OK" + }, + "headers": { + "Cache-Control": [ + "private" + ], + "Alt-Svc": [ + "h3=\":443\"; ma=2592000,h3-29=\":443\"; ma=2592000" + ], + "X-XSS-Protection": [ + "0" + ], + "Transfer-Encoding": [ + "chunked" + ], + "x-l2-request-path": [ + "l2-managed-6" + ], + "Server": [ + "ESF" + ], + "Date": [ + "Mon, 07 Oct 2024 19:28:56 GMT" + ], + "X-Frame-Options": [ + "SAMEORIGIN" + ], + "Vary": [ + "Origin", + "X-Origin", + "Referer" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "Content-Type": [ + "application/json; charset=UTF-8" + ], + "content-length": [ + "382" + ] + }, + "body": { + "string": "{\n \"spreadsheetId\": \"1ZMPsJJzU7mYbZlWDkedfckOibDOJpLP3W_v_YterZew\",\n \"replies\": [\n {\n \"addSheet\": {\n \"properties\": {\n \"sheetId\": 1690535305,\n \"title\": \"worksheet 2\",\n \"index\": 1,\n \"sheetType\": \"GRID\",\n \"gridProperties\": {\n \"rowCount\": 3,\n \"columnCount\": 3\n }\n }\n }\n }\n ]\n}\n" + } + } + }, + { + "request": { + "method": "GET", + "uri": "https://sheets.googleapis.com/v4/spreadsheets/1ZMPsJJzU7mYbZlWDkedfckOibDOJpLP3W_v_YterZew?fields=sheets.data.rowData.values.note&ranges=%27worksheet+2%27", + "body": null, + "headers": { + "User-Agent": [ + "python-requests/2.32.3" + ], + "Accept-Encoding": [ + "gzip, deflate" + ], + "Accept": [ + "*/*" + ], + "Connection": [ + "keep-alive" + ], + "authorization": [ + "" + ] + } + }, + "response": { + "status": { + "code": 200, + "message": "OK" + }, + "headers": { + "Cache-Control": [ + "private" + ], + "Alt-Svc": [ + "h3=\":443\"; ma=2592000,h3-29=\":443\"; ma=2592000" + ], + "X-XSS-Protection": [ + "0" + ], + "Transfer-Encoding": [ + "chunked" + ], + "x-l2-request-path": [ + "l2-managed-6" + ], + "Server": [ + "ESF" + ], + "Date": [ + "Mon, 07 Oct 2024 19:28:57 GMT" + ], + "X-Frame-Options": [ + "SAMEORIGIN" + ], + "Vary": [ + "Origin", + "X-Origin", + "Referer" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "Content-Type": [ + "application/json; charset=UTF-8" + ], + "content-length": [ + "69" + ] + }, + "body": { + "string": "{\n \"sheets\": [\n {\n \"data\": [\n {}\n ]\n }\n ]\n}\n" + } + } + }, + { + "request": { + "method": "POST", + "uri": "https://sheets.googleapis.com/v4/spreadsheets/1ZMPsJJzU7mYbZlWDkedfckOibDOJpLP3W_v_YterZew:batchUpdate", + "body": "{\"requests\": [{\"updateCells\": {\"range\": {\"startRowIndex\": 0, \"endRowIndex\": 1, \"startColumnIndex\": 0, \"endColumnIndex\": 1, \"sheetId\": 1690535305}, \"fields\": \"note\", \"rows\": [{\"values\": [{\"note\": \"the first time\"}]}]}}, {\"updateCells\": {\"range\": {\"startRowIndex\": 2, \"endRowIndex\": 3, \"startColumnIndex\": 1, \"endColumnIndex\": 2, \"sheetId\": 1690535305}, \"fields\": \"note\", \"rows\": [{\"values\": [{\"note\": \"two sheets\"}]}]}}]}", + "headers": { + "User-Agent": [ + "python-requests/2.32.3" + ], + "Accept-Encoding": [ + "gzip, deflate" + ], + "Accept": [ + "*/*" + ], + "Connection": [ + "keep-alive" + ], + "Content-Length": [ + "420" + ], + "Content-Type": [ + "application/json" + ], + "authorization": [ + "" + ] + } + }, + "response": { + "status": { + "code": 200, + "message": "OK" + }, + "headers": { + "Cache-Control": [ + "private" + ], + "Alt-Svc": [ + "h3=\":443\"; ma=2592000,h3-29=\":443\"; ma=2592000" + ], + "X-XSS-Protection": [ + "0" + ], + "Transfer-Encoding": [ + "chunked" + ], + "x-l2-request-path": [ + "l2-managed-6" + ], + "Server": [ + "ESF" + ], + "Date": [ + "Mon, 07 Oct 2024 19:28:58 GMT" + ], + "X-Frame-Options": [ + "SAMEORIGIN" + ], + "Vary": [ + "Origin", + "X-Origin", + "Referer" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "Content-Type": [ + "application/json; charset=UTF-8" + ], + "content-length": [ + "105" + ] + }, + "body": { + "string": "{\n \"spreadsheetId\": \"1ZMPsJJzU7mYbZlWDkedfckOibDOJpLP3W_v_YterZew\",\n \"replies\": [\n {},\n {}\n ]\n}\n" + } + } + }, + { + "request": { + "method": "GET", + "uri": "https://sheets.googleapis.com/v4/spreadsheets/1ZMPsJJzU7mYbZlWDkedfckOibDOJpLP3W_v_YterZew?fields=sheets.data.rowData.values.note&ranges=%27worksheet+2%27", + "body": null, + "headers": { + "User-Agent": [ + "python-requests/2.32.3" + ], + "Accept-Encoding": [ + "gzip, deflate" + ], + "Accept": [ + "*/*" + ], + "Connection": [ + "keep-alive" + ], + "authorization": [ + "" + ] + } + }, + "response": { + "status": { + "code": 200, + "message": "OK" + }, + "headers": { + "Cache-Control": [ + "private" + ], + "Alt-Svc": [ + "h3=\":443\"; ma=2592000,h3-29=\":443\"; ma=2592000" + ], + "X-XSS-Protection": [ + "0" + ], + "Transfer-Encoding": [ + "chunked" + ], + "x-l2-request-path": [ + "l2-managed-6" + ], + "Server": [ + "ESF" + ], + "Date": [ + "Mon, 07 Oct 2024 19:28:59 GMT" + ], + "X-Frame-Options": [ + "SAMEORIGIN" + ], + "Vary": [ + "Origin", + "X-Origin", + "Referer" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "Content-Type": [ + "application/json; charset=UTF-8" + ], + "content-length": [ + "444" + ] + }, + "body": { + "string": "{\n \"sheets\": [\n {\n \"data\": [\n {\n \"rowData\": [\n {\n \"values\": [\n {\n \"note\": \"the first time\"\n }\n ]\n },\n {},\n {\n \"values\": [\n {},\n {\n \"note\": \"two sheets\"\n }\n ]\n }\n ]\n }\n ]\n }\n ]\n}\n" + } + } + }, + { + "request": { + "method": "GET", + "uri": "https://sheets.googleapis.com/v4/spreadsheets/1ZMPsJJzU7mYbZlWDkedfckOibDOJpLP3W_v_YterZew?fields=sheets.data.rowData.values.note&ranges=%27worksheet+2%27%21A2%3AC3", + "body": null, + "headers": { + "User-Agent": [ + "python-requests/2.32.3" + ], + "Accept-Encoding": [ + "gzip, deflate" + ], + "Accept": [ + "*/*" + ], + "Connection": [ + "keep-alive" + ], + "authorization": [ + "" + ] + } + }, + "response": { + "status": { + "code": 200, + "message": "OK" + }, + "headers": { + "Cache-Control": [ + "private" + ], + "Alt-Svc": [ + "h3=\":443\"; ma=2592000,h3-29=\":443\"; ma=2592000" + ], + "X-XSS-Protection": [ + "0" + ], + "Transfer-Encoding": [ + "chunked" + ], + "x-l2-request-path": [ + "l2-managed-6" + ], + "Server": [ + "ESF" + ], + "Date": [ + "Mon, 07 Oct 2024 19:28:59 GMT" + ], + "X-Frame-Options": [ + "SAMEORIGIN" + ], + "Vary": [ + "Origin", + "X-Origin", + "Referer" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "Content-Type": [ + "application/json; charset=UTF-8" + ], + "content-length": [ + "294" + ] + }, + "body": { + "string": "{\n \"sheets\": [\n {\n \"data\": [\n {\n \"rowData\": [\n {},\n {\n \"values\": [\n {},\n {\n \"note\": \"two sheets\"\n }\n ]\n }\n ]\n }\n ]\n }\n ]\n}\n" + } + } + }, + { + "request": { + "method": "DELETE", + "uri": "https://www.googleapis.com/drive/v3/files/1ZMPsJJzU7mYbZlWDkedfckOibDOJpLP3W_v_YterZew?supportsAllDrives=True", + "body": null, + "headers": { + "User-Agent": [ + "python-requests/2.32.3" + ], + "Accept-Encoding": [ + "gzip, deflate" + ], + "Accept": [ + "*/*" + ], + "Connection": [ + "keep-alive" + ], + "Content-Length": [ + "0" + ], + "authorization": [ + "" + ] + } + }, + "response": { + "status": { + "code": 204, + "message": "No Content" + }, + "headers": { + "Cache-Control": [ + "no-cache, no-store, max-age=0, must-revalidate" + ], + "X-Content-Type-Options": [ + "nosniff" + ], + "Content-Length": [ + "0" + ], + "Alt-Svc": [ + "h3=\":443\"; ma=2592000,h3-29=\":443\"; ma=2592000" + ], + "X-XSS-Protection": [ + "0" + ], + "Pragma": [ + "no-cache" + ], + "Server": [ + "ESF" + ], + "Date": [ + "Mon, 07 Oct 2024 19:29:00 GMT" + ], + "X-Frame-Options": [ + "SAMEORIGIN" + ], + "Vary": [ + "Origin, X-Origin" + ], + "Expires": [ + "Mon, 01 Jan 1990 00:00:00 GMT" + ], + "Content-Type": [ + "text/html" + ] + }, + "body": { + "string": "" + } + } + } + ] +} diff --git a/tests/worksheet_test.py b/tests/worksheet_test.py index 369d9c92..f8523b5b 100644 --- a/tests/worksheet_test.py +++ b/tests/worksheet_test.py @@ -1669,20 +1669,63 @@ def test_worksheet_notes(self): @pytest.mark.vcr() def test_get_notes(self): w = self.spreadsheet.worksheets()[0] - notes = {"A1": "read my note", "B2": "Or don't"} - notes_array = [ + notes = { + "A1": "read my note", + "B2": "Or don't", + "A3": "another note", + "C3": "test", + } + expected_notes = [ [notes["A1"]], ["", notes["B2"]], + ["another note", "", "test"], + ] + + expected_range_notes = [ + ["", "Or don't"], + ["another note", "", "test"], ] empty_notes = w.get_notes() w.insert_notes(notes) + range_notes = w.get_notes(grid_range="A2:C3") all_notes = w.get_notes() self.assertEqual(empty_notes, [[]]) - self.assertEqual(all_notes, notes_array) + self.assertEqual(all_notes, expected_notes) + self.assertEqual(range_notes, expected_range_notes) + + @pytest.mark.vcr() + def test_get_notes_2nd_sheet(self): + w2 = self.spreadsheet.add_worksheet("worksheet 2", 3, 3) + + notes = { + "A1": "the first time", + "B3": "two sheets", + } + + expected_notes = [ + ["the first time"], + [], + ["", "two sheets"], + ] + expected_range_notes = [ + [], + ["", "two sheets"], + ] + + empty_notes = w2.get_notes() + + w2.insert_notes(notes) + + all_notes = w2.get_notes() + range_notes = w2.get_notes(grid_range="A2:C3") + + self.assertEqual(empty_notes, [[]]) + self.assertEqual(all_notes, expected_notes) + self.assertEqual(range_notes, expected_range_notes) @pytest.mark.vcr() def test_batch_clear(self):