适用于 Java 的 Google API 客户端库的示例
使用集合让一切井井有条 根据您的偏好保存内容并对其进行分类。
可用示例
如需查看适用于 Java 版 Google API 客户端库的所有示例,请浏览 GitHub 上的示例。每个示例都有一个 description.html 文件,用于说明如何设置和使用示例。(如需更轻松地在浏览器中查看说明,请访问 http://htmlpreview.github.io/ 并将 HTML 文件的网址粘贴到文本框中。)
我们欢迎大家贡献其他 API 的示例,如成为贡献者指南中所述。
如果您想为此处未列出的其他 API 请求示例,请将您的请求发布到 StackOverflow 上,并附上 API 专用标记,或参阅提交功能请求和缺陷了解详情。
如未另行说明,那么本页面中的内容已根据知识共享署名 4.0 许可获得了许可,并且代码示例已根据 Apache 2.0 许可获得了许可。有关详情,请参阅 Google 开发者网站政策。Java 是 Oracle 和/或其关联公司的注册商标。
最后更新时间 (UTC):2025-07-26。
[null,null,["最后更新时间 (UTC):2025-07-26。"],[[["\u003cp\u003eThe Google API Client Library for Java offers a variety of samples available for browsing on GitHub, each with instructions on setup and usage.\u003c/p\u003e\n"],["\u003cp\u003eUsers can easily view the sample instructions in a browser by pasting the HTML file's URL into the provided online tool.\u003c/p\u003e\n"],["\u003cp\u003eContributions for samples of other APIs are welcome and encouraged through the contributor guidelines.\u003c/p\u003e\n"],["\u003cp\u003eRequests for samples not currently available can be made on StackOverflow using API-specific tags or through the feature request process.\u003c/p\u003e\n"]]],[],null,["Available samples\n\nTo view all the samples that are available for the Google API Client Library\nfor Java,\nbrowse through the\n[samples on GitHub](https://github.com/googleapis/google-api-java-client-services#google-java-api-client-services).\nEach sample has an instructions.html file that explains how to set up and use\nthe sample. (To more easily view the instructions in a browser, visit\n\u003chttp://htmlpreview.github.io/\u003e and paste the URL\nof the HTML file into the text box.)\n\nWe welcome contributions for samples for other APIs, as described in our guide to\n[becoming a contributor](/api-client-library/java/google-api-java-client/contribute).\n\nIf you would like to request a sample for other APIs that are not listed here,\npost your request on [StackOverflow](http://stackoverflow.com/) with an API-specific\ntag, or see [File feature requests and defects](/api-client-library/java/google-api-java-client/support#file_feature_requests_and_defects) for more information."]]