2014-10-02 126 views
0

无论如何在VS 2008中使用谷歌云存储API?google-cloud-storage .net 3.5不支持?

它显示Google.Apis.dll是由较新版本构建的,因此当我尝试构建我的项目时,无法在我的项目上运行。

我试图从Google云端存储测试API。

var googleClientService = new BaseClientService.Initializer(); 
 
googleClientService.ApiKey = "ABcdefghUSftzxcvbnmEhLmGcZnfcE_12345678"; 
 

 
var storageService = new StorageService(googleClientService); 
 
var getRequest = storageService.Buckets.List("demotest");

+0

我希望它不是一个真正的API密钥;) – 2014-10-02 06:26:30

+0

哈哈,它不是。我自己打字。这就是为什么它包含'abcdefg'和'12345678'。 – 2014-10-02 09:48:17

回答

1

Sorrry,我不相信有可用的.NET的早期版本预建的.NET客户端。虽然图书馆的源代码是公开的。如果你觉得自己是个挑战,你也许可以试着建立它。另外,该库仅仅是一个公开的RESTful API的小包装。您也可以使用标准HTTP库直接调用Google Cloud Storage API,但您必须处理授权。

+0

我只找到了如何使用NuGet获取库,它没有下载源代码,只有.dll文件。你知道在哪里可以找到源代码吗? – 2014-10-03 02:15:15

+0

当然,这里是去:https://code.google.com/p/google-api-dotnet-client/ – 2014-10-03 07:08:52