Thư viện và mẫu
Sử dụng bộ sưu tập để sắp xếp ngăn nắp các trang
Lưu và phân loại nội dung dựa trên lựa chọn ưu tiên của bạn.
Thư viện ứng dụng giúp bạn dễ dàng sử dụng API Sách bằng ngôn ngữ bạn yêu thích!
Thư viện ứng dụng API Sách
Chúng tôi đã phát triển một thư viện ứng dụng được viết riêng cho API Sách.
Thư viện ứng dụng Google API
Chúng tôi cũng cung cấp các thư viện ứng dụng API Google chung mà bạn có thể sử dụng với API Sách.
Thư viện ứng dụng API Google được cung cấp bằng một số ngôn ngữ lập trình phổ biến, giúp bạn dễ dàng sử dụng API Sách.
Trong các bảng sau, cột đầu tiên cho biết giai đoạn phát triển của từng thư viện (lưu ý rằng một số thư viện đang ở giai đoạn đầu) và đường liên kết đến tài liệu về thư viện đó. Cột thứ hai liên kết đến các mẫu có sẵn cho mỗi thư viện.
Các thư viện ở giai đoạn đầu này cũng có sẵn:
Các mẫu nổi bật
Thông thường, cách dễ nhất để tìm hiểu cách sử dụng API là xem mã mẫu. Các bảng ở trên cung cấp đường liên kết đến một số mẫu cơ bản cho từng ngôn ngữ được hiển thị. Phần này nêu bật một số mẫu thú vị khác cho API Sách.
Ngôn ngữ |
Các mẫu nổi bật |
Phiên bản API |
Java |
|
1.0 |
Trừ phi có lưu ý khác, nội dung của trang này được cấp phép theo Giấy phép ghi nhận tác giả 4.0 của Creative Commons và các mẫu mã lập trình được cấp phép theo Giấy phép Apache 2.0. Để biết thông tin chi tiết, vui lòng tham khảo Chính sách trang web của Google Developers. Java là nhãn hiệu đã đăng ký của Oracle và/hoặc các đơn vị liên kết với Oracle.
Cập nhật lần gần đây nhất: 2025-03-20 UTC.
[null,null,["Cập nhật lần gần đây nhất: 2025-03-20 UTC."],[[["\u003cp\u003eClient libraries simplify using the Books API with your preferred programming language, including a dedicated library for Java.\u003c/p\u003e\n"],["\u003cp\u003eGoogle offers generic API client libraries for the Books API, available in various languages like Java, JavaScript, .NET, Objective-C, PHP, and Python.\u003c/p\u003e\n"],["\u003cp\u003eEarly-stage client libraries are also provided for Dart, Go, Node.js, and Ruby, expanding the range of language options.\u003c/p\u003e\n"],["\u003cp\u003eSample code is available for all supported languages, demonstrating practical usage and aiding in understanding API implementation.\u003c/p\u003e\n"]]],[],null,["# Libraries and Samples\n\nClient libraries make it easy to use the Books API in your favorite language!\n\n#### Books API client libraries\n\nWe have developed a client library written specifically for the Books API.\n\n| Language | Google Books Client library name | Public repository | Required Dependencies |\n| Java | Google Books Client Library for Java | [Download](https://code.google.com/p/google-api-java-client/wiki/APIs#Books_API) | [Google APIs Client Library for Java](https://code.google.com/p/google-api-java-client) |\n|----------|--------------------------------------|----------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------|\n\n#### Google API client libraries\n\nWe also offer generic Google API client libraries that you can use with Books API.\n\nThe Google API client libraries, which are available in a number of popular programming languages, make it easy to use the Books API.\n\nIn the following tables, the first column shows each library's stage of development (note that\nsome are in early stages), and links to documentation for the library. The second column links to\navailable samples for each library.\n\n| Documentation | Samples |\n| [Google API Client Library for Java](https://developers.google.com/api-client-library/java/) | [Java samples](/api-client-library/java/apis) |\n| [Google API Client Library for JavaScript](/api-client-library/javascript/start/start-js) | [JavaScript samples](/api-client-library/javascript/samples/samples) |\n| [Google API Client Library for .NET](/api-client-library/dotnet/get_started) | [.NET samples](/api-client-library/dotnet/apis) |\n| [Google API Client Library for Objective-C for REST](https://github.com/google/google-api-objectivec-client-for-rest) | [Objective-C samples](https://github.com/google/google-api-objectivec-client-for-rest/tree/master/Examples) |\n| [Google API Client Library for PHP ()](/api-client-library/php) | [PHP samples](https://github.com/google/google-api-php-client/tree/master/examples) |\n| [Google API Client Library for Python (v1/v2)](/api-client-library/python) | [Python samples](https://github.com/google/google-api-python-client/tree/master/samples) |\n|-----------------------------------------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------|\n\nThese early-stage libraries are also available:\n\n| Documentation | Samples |\n| [Google APIs Client Libraries for Dart (beta)](https://pub.dartlang.org/packages/googleapis) | [Dart samples](https://github.com/dart-lang/googleapis_examples) |\n| [Google API Client Library for Go ()](https://github.com/google/google-api-go-client) | [Go samples](https://github.com/google/google-api-go-client/tree/master/examples) |\n| [Google API Client Library for Node.js (alpha)](https://github.com/google/google-api-nodejs-client/) | [Node.js samples](https://github.com/google/google-api-nodejs-client/tree/master/samples) |\n| [Google API Client Library for Ruby (alpha)](/api-client-library/ruby/start/get_started) | [Ruby samples](https://github.com/google/google-api-ruby-client-samples) |\n|------------------------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------|\n\nFeatured samples\n----------------\n\nOften, the easiest way to learn how to use an API is to look at sample code. The tables above provide links to some basic samples for each of the languages shown. This section highlights some additional interesting samples for the Books API.\n\n| Language | Featured samples | API version |\n| Java | - **[Books Search Command Line App](https://code.google.com/p/google-api-java-client/source/browse?repo=samples#hg%2Fbooks-cmdline-sample)** Source code for a sample command line app which performs book searches via the Books API. | 1.0 |\n|----------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|-------------|\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e"]]