我開始使用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