Closed sjDan2003 closed 5 years ago
I've already added a couple placeholder buttons to save and load data from Google Drive. Recently I added a new Python file that will get the credentials and load the names of the files in that user's Google Drive folder. The following work items need to be done still though:
[x] Create a Google API project for this app and generate the OAuth 2.0 credentials. These credentials should be saved to the data folder
[x] Modify the SCOPES variable to allow for read and write access, since this app will want to write updated recipe data and download current recipe data.
[x] Write the function to check if the user has recipes saved already and load them if they do.
[x] Write the function to either upload a new recipe JSON or overwrite/append to an existing one.
Created a Google API project and confirmed that the new credentials point to the project. The new credentials still pull the same list of files as the demo credentials. To keep these safe, these credentials won't be saved in this repo.
After researching the various scopes, I decided on the https://www.googleapis.com/auth/drive.file scope. This app doesn't need access to a user's person files in their Google Drive account, and the drive.file scope only has visibility to the files "created or opened by the app".
Tried the scope and I was no longer able to see my personal files in my Google Drive account
Successfully fulfilled all of the acceptance criteria for this enhancement. Created a new file to use the Google Drive API and unit tests. Successfully integrated this new class into the CookbookGui and the dummy buttons now save and load as expected. Closing this issue.
Using the Google Drive APIs (https://developers.google.com/drive/api/v3/quickstart/python), upload the recipes to a user's Google Drive account.