从 Qt 应用程序访问 Cloud Datastore

Accessing Cloud Datastore from Qt app

我使用 Endpoints-Proto-Datastore 开发了一个 REST API 后端,它包装了 Cloud Endpoints Python API。我开始研究 Qt 并试图了解从 Qt 网络或其他库访问我的 API 会涉及什么。它可能与使用甚至处理 OAuth2 流的 Python 客户端库从命令行进行调用一样简单吗?这将是非常好的。如果这能让事情变得更简单,我可能会使用 PyQt。

您的端点服务可以生成描述 API 的 OpenAPI 规范文件。执行此操作后,有许多兼容 OpenAPI 的软件包可以为您生成客户端代码。

我找到了 this document,它为我的目的提供了一个很好的概述:

"The Google APIs Client Library for C++ will automatically take care of many of the tedious details for interpreting and complying with the discovery documents so that you can write simpler and familiar C++ code."

现在是构建和安装 C++ 客户端,然后弄清楚如何生成客户端库并从 Qt 应用程序访问它的问题。但这超出了这个问题的范围。