我想用 Dart 代码从 Google Drive 电子表格中读取数据(作为虚拟机中的控制台应用程序运行,而不是在浏览器中运行)。我对 API 的名称有些困惑;表格是 Google 云端硬盘的一部分,但我能找到的所有 Google 云端硬盘 API 文档都与将云端硬盘的 UI 集成到您的应用中有关。
还有this关于SO的问题,但已经过去了2年多了,所以我希望它不再正确,并且有一个API。
我找到了this Dart Google API 库,但它说:
THIS LIBRARY IS DEPRECATED Please use the Google API Dart libraries in http://pub.dartlang.org, the Dart package manager Search for 'google' or the API of your choice. For example: http://pub.dartlang.org/packages/google_drive_v2_api
但是我很难找到我应该使用哪个包。 Drive API 没有太多信息,而且名称中似乎没有包含“Sheets”或“Docs”的 API。
最佳答案
您需要使用电子表格 API https://developers.google.com/google-apps/spreadsheets/ .
没有适用于它的 Dart 库,但它是一个结构良好的 REST API,因此非常容易对其进行编程。
关于dart - 是否可以从(服务器-VM-运行)Dart 代码读取 Google 电子表格?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/25650261/