我开始使用Google Cloud Endpoints,并且在指定多个服务类时遇到问题。任何想法如何得到这个工作?具有多个服务类的云端点
ApiConfigurationError: Attempting to implement service myservice, version v1, with multiple classes that aren't compatible. See docstring for api() for examples how to implement a multi-class API.
这就是我如何创建我的端点服务器。
AVAILABLE_SERVICES = [
FirstService,
SecondService
]
app = endpoints.api_server(AVAILABLE_SERVICES)
,并为每个服务类我这样做:
@endpoints.api(name='myservice', version='v1', description='MyService API')
class FirstService(remote.Service):
...
@endpoints.api(name='myservice', version='v1', description='MyService API')
class SecondService(remote.Service):
...
完全分开这些工作中的每一个,但我不知道如何让他们的工作时,将它们结合起来。
非常感谢。
看这个https://developers.google.com/appengine/docs/python/endpoints/create_api#creating_an_api_implemented_with_multiple_classes] – 2013-12-23 05:23:33