Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

get_notes from a range #1482

Closed
twosheds opened this issue Jun 13, 2024 · 5 comments · Fixed by #1487
Closed

get_notes from a range #1482

twosheds opened this issue Jun 13, 2024 · 5 comments · Fixed by #1487
Assignees

Comments

@twosheds
Copy link

I think get_notes would be more useful if if could be applied to a range in addition to a worksheet.

@muddi900
Copy link
Contributor

Would this be a good addition:

-    def get_notes(self, default_empty_value: Optional[str] = "") -> List[List[str]]:
+    def get_notes(
+        self, default_empty_value: Optional[str] = "", range: Optional[str] = None
+    ) -> List[List[str]]:

# ...

         params: ParamsType = {"fields": "sheets.data.rowData.values.note"}
+        if range is not None:
+            params["ranges"] = absolute_range_name(self.title, range)
         res = self.client.spreadsheets_get(self.spreadsheet_id, params)

muddi900 added a commit to muddi900/gspread that referenced this issue Jun 23, 2024
@muddi900
Copy link
Contributor

@lavigne958 I have added tested the code and it works as expected.

Should I open a pull request?

@alifeee
Copy link
Collaborator

alifeee commented Jun 23, 2024

I have added tested the code and it works as expected.

Should I open a pull request?

hi hi @muddi900! thanks for the enthusiasm :)

we'd love to have a PR! it would be great if you created a unit test to test the new functionality, as we try to create for all changes.

if you need some help with the testing framework beyond the contributing guide, let us know and we will be happy to help :)

lavigne958 added a commit that referenced this issue Oct 7, 2024
Added a range option to `Worksheet.get_notes` [Issue #1482]
@twosheds
Copy link
Author

twosheds commented Oct 9, 2024 via email

@alifeee
Copy link
Collaborator

alifeee commented Oct 9, 2024

it is not in 6.1.3. it will be added in 6.2.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants