我可以从桌面应用程序使用GAE Cloud Endpoints吗?

Jul*_*ina 5 google-app-engine google-cloud-endpoints

我想编写一个与基于GAE的Web服务交互的桌面应用程序.对于Android和Web客户端,可以自动生成客户端库.有没有办法为C或C++生成客户端库?我也愿意接受Python.

Sca*_*ami 9

从理论上讲,只要发现文档可用(云端点就是这种情况),所有Google API客户端库都允许访问任何基于发现的API,即使在大多数情况下功能都没有很好地记录.

有关当前可用客户端库的列表,请参阅https://developers.google.com/discovery/libraries.

作为如何将python客户端库与云端点一起使用的示例:

service = build("your_api", "your_api_version", http=http, 
  discoveryServiceUrl=("https://yourapp.appspot.com/_ah/api/discovery/v1/"
                       "apis/{api}/{apiVersion}/rest"))

result = service.resource().method([parameters]).execute()
Run Code Online (Sandbox Code Playgroud)

  • 只是一个小的后续:用`http_method ='POST''注释的方法被称为略有不同,因为他们希望他们在`body`中的参数像这样:`service.some_method(body = {'param_foo':42,'param_bar ':"zoo"}).execute()` (3认同)