在哪里可以找到 Google.GData.Spreadsheets nuget 包的正确文档?
Where to find proper documentation for Google.GData.Spreadsheets nuget package?
所以,有一个应用程序 X,我目前正在修复,它是使用 .Net Framerwork v4.5 和 Google.GData.Spreadsheets[= 编写的25=] nuget 包,它从某些 Google 电子表格中检索行和列。
Google 上个月(2021 年 8 月)正式关闭了 v3 电子表格 API,这导致 X 停止工作。
X 是一个遗留应用程序,由暂时不在我公司工作的员工编写,其中大部分是遗留代码。使用旧电子表格包的某些部分我既无法理解也无法正确调试。我真的很想至少找到那个旧包的文档,这样我就可以了解发生了什么。我对新的 api 基本上没有问题,因为 guide how to migrate from v3 to v4, so I can see which OAuth2.0 consent scopes are changed etc. But for some reason, I struggle to find any documentation for Google.GData.Spreadsheets (at least on nuget.org and code.google.com 没有有用的信息。
- 有人使用过 Google.GData.Spreadsheets 软件包吗?如果使用过,您找到文档了吗?
- 在这种情况下,有人能给我至少一般的方向性建议吗?
- 我过去 7 个月没有使用 .net 平台,所以我解决此类问题的一般方法可能存在一些问题。
Did anybody work with Google.GData.Spreadsheets package, and if so, were did you find documentation?
不,您不会 Google 表格的 Gdata 版本 api 已经过时并且与 Google 表格 api v4 完全不同,您无法继续让它工作。
Can somebody give me at least general directional advice in this situation?
您需要切换到 Google Sheets api v4 在官方文档中有一个示例用于 .net Google sheets api sample 此示例使用 Google api .net 客户端库
.net 的库是 Google api .net 客户端库
控制台应用程序的授权应该是这样的。
using (var stream = new FileStream(clientSecretJson, FileMode.Open, FileAccess.Read))
{
string credPath = System.Environment.GetFolderPath(System.Environment.SpecialFolder.Personal);
credPath = Path.Combine(credPath, ".credentials/", System.Reflection.Assembly.GetExecutingAssembly().GetName().Name);
// Requesting Authentication or loading previously stored authentication for userName
var credential = GoogleWebAuthorizationBroker.AuthorizeAsync(GoogleClientSecrets.Load(stream).Secrets,
scopes,
userName,
CancellationToken.None,
new FileDataStore(credPath, true)).Result;
credential.GetAccessTokenForRequestAsync();
return credential;
}
同样,这个 api 与 gdata 完全不同,这意味着您需要更改您的应用程序对 api 进行的所有调用,以使用新的 v4 版本。我个人希望这是一个完整的重写,大约八年前我对像你这样的应用程序进行了升级。 Gdata 完全不同,一切从头开始。
I didn't work with .net platform for last 7 months, so there might be some issues in my general methodology for solving this kind of a problem.
- 对 .NET Framework 4、4.5 和 4.5.1 的支持已于 2016 年 1 月 12 日结束。
- 对 .NET Framework 4.5.2、4.6 和 4.6.1 的支持将于 2022 年 4 月 26 日结束。
您不妨升级到 .net 5。
文档
至于找旧文档恐怕已经没有了。我再也找不到 Github 上的源代码,也找不到文档本身。 Google 宣布 API 将在一年多前消失,你来晚了。
所以,有一个应用程序 X,我目前正在修复,它是使用 .Net Framerwork v4.5 和 Google.GData.Spreadsheets[= 编写的25=] nuget 包,它从某些 Google 电子表格中检索行和列。
Google 上个月(2021 年 8 月)正式关闭了 v3 电子表格 API,这导致 X 停止工作。
X 是一个遗留应用程序,由暂时不在我公司工作的员工编写,其中大部分是遗留代码。使用旧电子表格包的某些部分我既无法理解也无法正确调试。我真的很想至少找到那个旧包的文档,这样我就可以了解发生了什么。我对新的 api 基本上没有问题,因为 guide how to migrate from v3 to v4, so I can see which OAuth2.0 consent scopes are changed etc. But for some reason, I struggle to find any documentation for Google.GData.Spreadsheets (at least on nuget.org and code.google.com 没有有用的信息。
- 有人使用过 Google.GData.Spreadsheets 软件包吗?如果使用过,您找到文档了吗?
- 在这种情况下,有人能给我至少一般的方向性建议吗?
- 我过去 7 个月没有使用 .net 平台,所以我解决此类问题的一般方法可能存在一些问题。
Did anybody work with Google.GData.Spreadsheets package, and if so, were did you find documentation?
不,您不会 Google 表格的 Gdata 版本 api 已经过时并且与 Google 表格 api v4 完全不同,您无法继续让它工作。
Can somebody give me at least general directional advice in this situation?
您需要切换到 Google Sheets api v4 在官方文档中有一个示例用于 .net Google sheets api sample 此示例使用 Google api .net 客户端库
.net 的库是 Google api .net 客户端库
控制台应用程序的授权应该是这样的。
using (var stream = new FileStream(clientSecretJson, FileMode.Open, FileAccess.Read))
{
string credPath = System.Environment.GetFolderPath(System.Environment.SpecialFolder.Personal);
credPath = Path.Combine(credPath, ".credentials/", System.Reflection.Assembly.GetExecutingAssembly().GetName().Name);
// Requesting Authentication or loading previously stored authentication for userName
var credential = GoogleWebAuthorizationBroker.AuthorizeAsync(GoogleClientSecrets.Load(stream).Secrets,
scopes,
userName,
CancellationToken.None,
new FileDataStore(credPath, true)).Result;
credential.GetAccessTokenForRequestAsync();
return credential;
}
同样,这个 api 与 gdata 完全不同,这意味着您需要更改您的应用程序对 api 进行的所有调用,以使用新的 v4 版本。我个人希望这是一个完整的重写,大约八年前我对像你这样的应用程序进行了升级。 Gdata 完全不同,一切从头开始。
I didn't work with .net platform for last 7 months, so there might be some issues in my general methodology for solving this kind of a problem.
- 对 .NET Framework 4、4.5 和 4.5.1 的支持已于 2016 年 1 月 12 日结束。
- 对 .NET Framework 4.5.2、4.6 和 4.6.1 的支持将于 2022 年 4 月 26 日结束。
您不妨升级到 .net 5。
文档
至于找旧文档恐怕已经没有了。我再也找不到 Github 上的源代码,也找不到文档本身。 Google 宣布 API 将在一年多前消失,你来晚了。