Skip to content

Bugfix: Google Drive API about() set storageQuota field#111

Merged
dzuluaga merged 2 commits intomainfrom
bugfix/google-drive-get-storage-info
Apr 18, 2025
Merged

Bugfix: Google Drive API about() set storageQuota field#111
dzuluaga merged 2 commits intomainfrom
bugfix/google-drive-get-storage-info

Conversation

@TranceLove
Copy link
Copy Markdown
Collaborator

Summary

As documented in https://developers.google.com/drive/api/reference/rest/v3/about/get, the fields parameter is required, hence setting fields = storageQuota for quota query to succeed.

Demo

Changes is internal, hence should not affect display to end user at sample app.

Checklist:

  • Documentation is up to date to reflect these changes - changes is internal, hence should not need updating
  • Created Unit tests

As documented in https://developers.google.com/drive/api/reference/rest/v3/about/get, the fields parameter is required, hence setting fields = storageQuota for quota query to succeed.

Signed-off-by: Raymond Lai <airwave209gt@gmail.com>
@dzuluaga
Copy link
Copy Markdown
Contributor

dzuluaga commented Apr 15, 2025

Thanks so much, @TranceLove!

Would you mind signing your commit? You can follow [these instructions](https://docs.github.com/en/authentication/managing-commit-signature-verification/signing-commits) if needed.

Also, I've added a few suggestions below from Copilot — feel free to take a look.

One quick thought: do you think this feature should be surfaced in the sample app? Totally okay if you can't take it on right now, but if you think it's worth including, would you mind opening a tech debt issue so we can track it for later?

Appreciate your help! 🙌

CC - @itsme291 (Saurabh)

@dzuluaga dzuluaga requested a review from Copilot April 15, 2025 22:17
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot reviewed 7 out of 7 changed files in this pull request and generated no comments.

Comments suppressed due to low confidence (1)

packages/plugin-googledrive-non-gms/src/test/java/com/openmobilehub/android/storage/plugin/googledrive/nongms/data/repository/NonGmsFileRepositoryTest.kt:1047

  • [nitpick] For consistency with the repository code, consider referencing the STORAGE_QUOTA constant defined in NonGmsFileRepository.kt rather than using the literal "storageQuota" string in tests.
googleStorageApiService.about("storageQuota")

Made STORAGE_QUOTA @VisibleForTesting so tests can take reference to.

Signed-off-by: Raymond Lai <airwave209gt@gmail.com>
@dzuluaga dzuluaga self-requested a review April 18, 2025 21:32
@dzuluaga dzuluaga merged commit 2f362dc into main Apr 18, 2025
4 checks passed
@dzuluaga dzuluaga deleted the bugfix/google-drive-get-storage-info branch April 18, 2025 21:34
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 this pull request may close these issues.

3 participants