我正在尝试构建Google生成的类,以便与YouTube v3 Data API进行交互。我在这里下载了他们的工具包:
https://code.google.com/p/google-api-objectivec-client/
我构建了“ServiceGenerator”,但我无法弄清楚我应该传递给它的确切内容。这显然不起作用。使用该工具的文档很少,而Google的文档总体上是相当大的,所以我无法跟踪它。
my-computer% ./ServiceGenerator https://www.googleapis.com/discovery/v1/apis/youtube/v3/rest --outputDir generatedYouTubeAPI --verbose
===============================================================================
Generation Settings:
Output Directory: /svn/google-api-objectivec-client-read-only/generatedYouTubeAPI
Discovery RPC URL: https://www.googleapis.com/rpc?prettyPrint=false
Flags:
+ Use service name directory: NO
+ Remove unknown files: NO
+ Add 'Generated' directory: NO
+ Allow rootURL overrides: YES
Loading API URLs(s):
+ Fetching https://www.googleapis.com/discovery/v1/apis/youtube/v3/rest
ERROR: The api description doesn't appear to be a discovery rpc description
Generating:
Writing:
- No changes from what is already on disk.
答案 0 :(得分:1)
https://code.google.com/p/google-api-objectivec-client/会拥有您需要的所有资源。你不需要自己生成它。
如果有一个未生成的lib,很乐意提供帮助。