简体   繁体   English

警告您必须升级到最新版本的 google-spreadsheet

[英]Warning you must upgrade to the latest version of google-spreadsheet

I am trying to implement a project when I get some data from a google spreadsheet and insert into a database.当我从谷歌电子表格中获取一些数据并插入到数据库中时,我正在尝试实施一个项目。 Inserting part is not important for me yet.插入部分对我来说还不重要。 When I am trying to get the data from google spreadsheet document I get this Warning!当我尝试从 google 电子表格文档中获取数据时,我收到此警告!

 WARNING! You must upgrade to the latest version of google-spreadsheet!
 Google's deprecation date for the v3 sheets API is March 3rd 2020
 Bad news - this version of this module will stop working on that date :(
 Good news - the new version of the module uses the newer v4 api :)
 However, there are breaking changes, so please see the docs site
 https://theoephraim.github.io/node-google-spreadsheet

It's still give me the data, but I get the warning.它仍然给我数据,但我收到警告。 Somebody who knows how do i get rid of that warning?谁知道我如何摆脱那个警告?

The Google Sheets API has been upgrade from version v3 to version v4 Google Sheets API 已从 v3 版升级到 v4 版

What does it mean?这是什么意思?

  • It means that certain method names, parameters and building of the authentication client have changed.这意味着身份验证客户端的某些方法名称、参数和构建已更改。
  • If you are using an old code based on v3, so building the authentication client as const sheets = google.sheets({version: 'v3', auth});如果您使用的是基于 v3 的旧代码,那么将身份验证客户端构建为const sheets = google.sheets({version: 'v3', auth}); , your code will stop working in the near future ,您的代码将在不久的将来停止工作
  • While Google specifies March 3rd 2020 as the deprecation date, there is still some grace period, but your code could stop working any time!虽然 Google 将 2020 年 3 月 3 日指定为弃用日期,但仍有一些宽限期,但您的代码可能随时停止工作!
  • So, please update your code by changing to const sheets = google.sheets({version: 'v3', auth});因此,请通过更改为const sheets = google.sheets({version: 'v3', auth});来更新您的代码const sheets = google.sheets({version: 'v3', auth});
  • Adapt other parts of the authentication flow if necessary to the new procedure provided in the quickstart for v4如有必要,根据v4 快速入门中提供的新程序调整身份验证流程的其他部分
  • Go through the references to see if any of the requests you are using has changed and adapt as necessary.浏览参考资料以查看您使用的任何请求是否已更改并根据需要进行调整。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM