【问题标题】:How to find out what API version Google Data API .NET Client library uses?如何找出 Google Data API .NET 客户端库使用的 API 版本?
【发布时间】:2014-10-17 22:03:39
【问题描述】:

我正在为 Google Data API 使用 .NET 客户端库(2.2.0 版):

https://code.google.com/p/google-gdata/downloads/list

我得知 Google 将停止对日历 API 的 API v2 支持。我不确定 .NET 客户端库正在使用哪个版本的 API,或者如何弄清楚? Google Data .NET Client Library 文档真的很差。我有源代码,但任何关于如何确定我正在使用的 API 版本的提示都将不胜感激。

我怀疑 GData .NET 库将 APIv2 用于日历,并将 APIv3 用于联系人,但我不确定/困惑。

标记

【问题讨论】:

  • 这些已弃用的 API 有一个博客,is here。是的,博客也被弃用了。 Google 很快就会感到无聊。

标签: .net gdata google-api-dotnet-client


【解决方案1】:

我找到了。查看 GData .NET 客户端库 2.2.0 的源代码,您可以看到它使用 APIv2 作为日历接口,使用 APIv3 作为联系人接口。

versioninterfaces.cs:

public const int VersionTwo = 2;
public const int VersionThree = 3;

日历服务.cs:

protected override void InitVersionInformation() {
    this.ProtocolMajor = VersionDefaults.VersionTwo;
}

contactservices.cs:

protected override void InitVersionInformation() {
    this.ProtocolMajor = VersionDefaults.VersionThree;
}

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2014-07-08
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多