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

Google Spreadsheet API v3 Deprecation #553

Open
2 tasks
daemon1024 opened this issue Aug 15, 2021 · 11 comments · May be fixed by #555
Open
2 tasks

Google Spreadsheet API v3 Deprecation #553

daemon1024 opened this issue Aug 15, 2021 · 11 comments · May be fixed by #555
Assignees
Labels
help wanted Extra attention is needed priority

Comments

@daemon1024
Copy link
Member

For spreadsheet based layers and utility, we are dependent on APIv3 of Google. Which has now been deprecated as noted in https://cloud.google.com/blog/products/g-suite/migrate-your-apps-use-latest-sheets-api. It seems the deadline was August 2nd, and since we have already crossed it, our layers are broken rn, specifically pfasLayer

Here's the migration guide https://developers.google.com/sheets/api/guides/migration

TODO

  • Migrate pfasLayer
  • Update spreadsheetlayer utility function
@daemon1024
Copy link
Member Author

daemon1024 commented Aug 15, 2021

https://developers.google.com/sheets/api/reference/rest/v4/spreadsheets.values/get has the browser code for making the API call.
It seems like it's important to initiate and authorize client before making requests now.

@daemon1024
Copy link
Member Author

Noting a few important changes:

  • You need an API key irrespective of the visibility of the spreadsheet
  • The spreadsheet needs to be viewable by anyone with link, instead of published

@daemon1024
Copy link
Member Author

bpk68/g-sheets-api#97 (comment) has highlighted and explained things in a great way 🙌🏽

@jywarren
Copy link
Member

Ah! There may be a way to get just CSV (via bpk68/g-sheets-api#97):

Another option is to use the Publish to Web option and select CSV.
This doesn't require a key:
https://docs.google.com/spreadsheets/d/e/2PACX-1vTkCHOZXGAAoL4mMNQLUKfOKzLHCcf9XhdvQhV_cXOwgFWTWw4M-_L9SdkPJlNvYHwVvy4D_xqS5na9/pub?output=csv

We could parse that, it wouldn't be too hard!

We'd have to link people to this page to show how to Publish to Web: https://support.google.com/docs/answer/183965?hl=en&co=GENIE.Platform%3DDesktop and include a screenshot in the docs.

@jywarren
Copy link
Member

Maybe using this? https://csv.js.org/parse/

@daemon1024
Copy link
Member Author

Ohh, I used the CSV to make a copy, but it didn't cross my mind that we can use it in the code too 😅 Looking into it, thank you.

@daemon1024
Copy link
Member Author

daemon1024 commented Aug 20, 2021

https://github.com/fureweb-com/public-google-sheets-parser Found this npm package, seems like it's returning the data in a very nice way. Tried it out at https://api.fureweb.com/#/spreadsheets/spreadsheetId

image

@jywarren
Copy link
Member

jywarren commented Jun 7, 2022

Noting also that the FracTracker layer uses a spreadsheet and is also failing: #668

@julianavmgiusti
Copy link

@jywarren and @TildaDares I'm looking foward to work on my contributions. Just looking for a second issue to solve. I found this one and wondering can I claim this issue?

@jywarren
Copy link
Member

Hi @julianavmgiusti I appreciate it -- it's probably a pretty complex issue, but if you'd like to try using https://github.com/fureweb-com/public-google-sheets-parser, we would love your help! Thank you!

@julianavmgiusti
Copy link

Hi @jywarren ok I'm outreachy applicant, so the project that is on the program is Improve MapKnitter Lite for mapmaking with aerial photos as a lightweight web service and I just found one, I metioned you on comment, can you help me to contribute to this project?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed priority
Projects
None yet
3 participants