[英]Google Endpoints Android Client Library for multiple api classes
I split up the code for my endpoints api over several classes with the @endpoints.api decorator. 我使用@ endpoints.api装饰器将端点api的代码分成几个类。 This was the way recommended by Google ( source ).
这是Google推荐的方法( 来源 )。 Now I am trying to generate the Android client libraries using the command line tool.
现在,我正在尝试使用命令行工具生成Android客户端库。 I can generate the library for one class using the following command
我可以使用以下命令为一个类生成库
endpointscfg.py get_client_lib java -bs gradle api.HelloWorldApi
and this works. 这可行。 But I have other classes that need to also be part of the library.
但是我还有其他一些类也需要包含在库中。 eg.
例如。
endpointscfg.py get_client_lib java -bs gradle api.GoodbyeWorldApi
I do not know how to generate one complete library encompassing both of these classes. 我不知道如何生成一个包含这两个类的完整库。
Did some looking around endpointscfg file in google's tools folder and realized that it takes multiple remote.service files as arguments. 有人环顾了Google工具文件夹中的endpointscfg文件,发现它需要多个remote.service文件作为参数。 So I was able to use the following command to create client libraries from all the classes
endpointscfg.py get_client_lib java api.GoodbyeWorldApi api.HelloWorldApi -bs gradle
因此,我能够使用以下命令从所有类
endpointscfg.py get_client_lib java api.GoodbyeWorldApi api.HelloWorldApi -bs gradle
创建所有客户端库
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.