이 페이지에서는 Endpoints 프레임워크 명령줄 도구를 사용하여 백엔드 서버 API에서 클라이언트 라이브러리를 생성하는 방법을 설명합니다. 모든 자바 또는 Android 앱에서 이 라이브러리를 사용하여 API를 호출할 수 있습니다.
개발자는 Endpoints Frameworks 명령줄 도구를 사용하여 애플리케이션이 API에 액세스할 수 있게 해주는 클라이언트 라이브러리 번들을 생성할 수 있습니다. 클라이언트 라이브러리를 생성하면 Endpoints 프레임워크 명령줄 도구는 API 노출 영역을 기술하는 검색 문서를 자동으로 생성합니다.
Endpoints 프레임워크 명령줄 도구를 사용하면 다음 유형의 클라이언트 번들을 생성할 수 있습니다.
Maven: 이 번들에는 Endpoints 프레임워크 및 Google API 클라이언트 라이브러리 종속 항목을 포함하는 pom.xml 파일이 포함됩니다.
readme.html 파일은 다양한 클라이언트 애플리케이션 유형별로 pom.xml 파일에 추가해야 하는 항목과 Maven을 사용하여 API에 맞는 클라이언트 라이브러리를 빌드하는 방법에 대한 자세한 정보를 제공합니다.
Gradle: 이 번들에는 Endpoints 프레임워크 및 Google API 클라이언트 라이브러리 종속 항목을 포함하는 build.gradle 파일이 포함됩니다.
readme.html 파일은 다양한 클라이언트 애플리케이션 유형별로 build.gradle 파일에 추가해야 하는 항목과 Gradle을 사용하여 API에 맞는 클라이언트 라이브러리를 빌드하는 방법에 대한 자세한 정보를 제공합니다.
기본 클라이언트 번들: 이 번들에는 모든 종속 항목 라이브러리와 생성된 source.jar 파일이 포함됩니다. 이 파일은 클라이언트에서 API를 호출하는 데 사용하는 자바 라이브러리입니다. 이 번들은 OAuth를 포함한 모든 Google API 클라이언트 라이브러리 기능을 클라이언트에 제공합니다. readme.html 파일은 다양한 유형의 클라이언트 애플리케이션에 필요한 .jar 파일의 목록과 클라이언트 라이브러리 사용을 위한 그 밖의 자세한 정보를 제공합니다.
Android 앱에서 클라이언트 라이브러리를 사용하는 경우 Gradle 클라이언트 번들을 사용하는 것이 좋습니다.
명령줄 구문
Endpoints 프레임워크 명령줄 도구에는 컴파일된 바이너리가 필요하므로 이 도구를 사용하려면 먼저 백엔드 프로젝트를 빌드해야 합니다. 기본값(--war="./war")을 사용하지 않으려면 WEB-INF 디렉터리와 컴파일된 자바 클래스가 포함된 대상 출력 디렉터리를 가리키는 --war= 옵션을 제공해도 됩니다.
[[["이해하기 쉬움","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-09-04(UTC)"],[[["\u003cp\u003eThe Endpoints Frameworks command-line tool generates client library bundles, enabling Java or Android apps to access backend server APIs.\u003c/p\u003e\n"],["\u003cp\u003eThis tool automatically generates a Discovery document that outlines the API's structure, which is crucial for client interactions.\u003c/p\u003e\n"],["\u003cp\u003eClient library bundles can be generated in Maven, Gradle, or default formats, with each format catering to different project setups and providing necessary dependencies and build instructions.\u003c/p\u003e\n"],["\u003cp\u003eThe command-line tool requires compiled backend project binaries and allows options for specifying the build system, war directory, and output location, making customization easy.\u003c/p\u003e\n"],["\u003cp\u003eThe generated client libraries are compatible with Java 7+, Android 1.6+, and App Engine, ensuring wide applicability.\u003c/p\u003e\n"]]],[],null,["# Cloud Endpoints Frameworks for App Engine command-line tool\n\nThis page describes how to generate a client library from your backend server API by using the Endpoints Frameworks command-line tool. Any Java or Android app can use this library to call the API.\n\nYou can generate client library bundles that allow applications to access your\nAPI using the Endpoints Frameworks command-line tool. When you\ngenerate a client library, the Endpoints Frameworks command-line tool\nautomatically generates a\n[Discovery document](https://developers.google.com/discovery/v1/reference/apis)\nthat describes the surface of your API.\n\nTo get the Endpoints Frameworks command-line tool, download\n[`endpoints-framework-tools`](http://search.maven.org/remotecontent?filepath=com/google/endpoints/endpoints-framework-tools/2.2.1/endpoints-framework-tools-2.2.1.zip)\nfrom the [Maven Central Repository](http://search.maven.org/).\nAfter you extract the contents of the zip file, the tool is in the\n`endpoints-framework-tools-2.2.1/bin/` directory.\n\nGenerating a client library bundle from an API\n----------------------------------------------\n\nYou can use the Endpoints Frameworks command-line tool to generate the\nfollowing types of client bundles:\n\n- Maven: This bundle includes a `pom.xml` file with the\n Endpoints Frameworks and Google API Client Library dependencies.\n The `readme.html` file provides detailed information on what you need to add\n to your `pom.xml` file for different types of client\n applications and how to build a client library for your API using Maven.\n\n- Gradle: This bundle includes a `build.gradle` file with the\n Endpoints Frameworks and Google API Client Library dependencies.\n The `readme.html` file provides detailed information on what you need to add\n to your `build.gradle` file for different types of client applications and\n how to build a client library for your API using Gradle.\n\n- Default client bundle: This bundle contains all the dependency libraries and\n the generated `source.jar` file, which is the Java library that you use in\n your client to call your API. This bundle provides your client with all of\n the Google API Client Library capabilities, including OAuth. The\n `readme.html` file lists the `.jar` files that are required for different\n types of client applications and other details for using the client library.\n\nIf you are using the client library with an Android app, we recommend that you\nuse a Gradle client bundle.\n\n### Command-line syntax\n\nBefore you use the Endpoints Frameworks command-line tool, you must\nbuild your backend project because this tool requires compiled binaries. You can\noptionally supply the `--war=` option pointing to the build target output\ndirectory containing the `WEB-INF` directory and compiled java classes if you\ndon't want to use the default (`--war=\"./war\"`).\n\nThe basic syntax is as follows: \n\n```\n/path-to/endpoints-framework-tools-2.2.1/bin/endpoints-framework-tools \\\n get-client-lib OPTIONS CLASS_NAME\n```\n\nwhere:\n\n- \u003cvar translate=\"no\"\u003eOPTIONS\u003c/var\u003e, if supplied, is one or more items shown in the [Options table](#options).\n- \u003cvar translate=\"no\"\u003eCLASS_NAME\u003c/var\u003e is the fully qualified class name of your API.\n\nFor example: \n\n /path-to/endpoints-framework-tools-2.2.1/bin/endpoints-framework-tools \\\n get-client-lib --war=target/echo-1.0-SNAPSHOT -bs gradle com.example.echo.Echo\n\nwhere `target/echo-1.0-SNAPSHOT` is the relative or absolute path to the\ntarget build directory containing `WEB-INF` and the compiled backend classes.\n| **Note:** If your API is implemented from multiple classes, specify each of them separated by a space.\n\n### Options\n\nYou can use the following options:\n\n\n### Supported client platforms\n\nThe following platforms are supported in the client bundle produced by the\nEndpoints Frameworks command-line tool:\n\n- Java 7 and higher:\n- [Android](https://github.com/googleapis/google-api-java-client/wiki/Android) 1.6 and higher.\n- [App Engine](https://github.com/googleapis/google-api-java-client/wiki)."]]