[[["容易理解","easyToUnderstand","thumb-up"],["確實解決了我的問題","solvedMyProblem","thumb-up"],["其他","otherUp","thumb-up"]],[["難以理解","hardToUnderstand","thumb-down"],["資訊或程式碼範例有誤","incorrectInformationOrSampleCode","thumb-down"],["缺少我需要的資訊/範例","missingTheInformationSamplesINeed","thumb-down"],["翻譯問題","translationIssue","thumb-down"],["其他","otherDown","thumb-down"]],["上次更新時間:2025-08-18 (世界標準時間)。"],[[["\u003cp\u003eThis guide demonstrates how to structure an API across multiple classes using decorators, contrasting with single-class API setups detailed elsewhere.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003e@api_collection.api_class\u003c/code\u003e decorator is used to designate classes that contribute to the API, with \u003ccode\u003eresource_name\u003c/code\u003e setting the class's API Explorer name.\u003c/p\u003e\n"],["\u003cp\u003eThe optional \u003ccode\u003epath\u003c/code\u003e argument in \u003ccode\u003e@api_class\u003c/code\u003e and \u003ccode\u003e@endpoints.method\u003c/code\u003e determines the URL structure for classes and methods, appending to the root API path, or overriding the class path with a leading \u003ccode\u003e/\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003eMethods within classes are made accessible via the API using the \u003ccode\u003e@endpoints.method\u003c/code\u003e decorator, and without a specified path the method name is used.\u003c/p\u003e\n"],["\u003cp\u003eYou must use the \u003ccode\u003eendpoints.api_server\u003c/code\u003e code and pass in your \u003ccode\u003eapi_collection\u003c/code\u003e variable to the function to serve the multi-class API.\u003c/p\u003e\n"]]],[],null,[]]