Bạn đang xem tài liệu cũ về API Thư viện Google Photos.
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.
Bạn có thể xem các mẫu cho API Thư viện Google Photos trong kho lưu trữ mẫu Google Photos trên GitHub. Ngoài ra, bạn có thể tìm thấy các đoạn mã trên mỗi trang trong hướng dẫn dành cho nhà phát triển này.
Mẫu trên GitHub
Kho lưu trữ GitHub chứa một mẫu cho thấy chức năng tìm kiếm và liệt kê của API Thư viện được triển khai trong một khung ảnh trực tuyến bằng cách sử dụng Node JS.
Kho lưu trữ GitHub cho mỗi thư viện ứng dụng chứa nhiều mẫu cho biết cách sử dụng API Thư viện bằng nhiều ngôn ngữ.
Khắc phục sự cố
Nếu bạn gặp sự cố khi sử dụng các mẫu, hãy đảm bảo rằng bạn đã làm như sau:
Bạn cần thêm thông tin xác thực OAuth vào dự án mẫu. Để biết thông tin chi tiết, vui lòng xem tệp README.
`
Đoạn mã trong hướng dẫn dành cho nhà phát triển
Mỗi trang trong hướng dẫn dành cho nhà phát triển bao gồm các đoạn mã và lệnh gọi REST minh hoạ các tính năng cụ thể của API. Sau đây là một số hướng dẫn có sẵn cho các tính năng:
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-08-29 UTC.
[null,null,["Cập nhật lần gần đây nhất: 2025-08-29 UTC."],[[["\u003cp\u003eComprehensive Google Photos Library API samples are available in the \u003ca href=\"https://github.com/googlesamples/google-photos\"\u003eGoogle Photos sample repository\u003c/a\u003e on GitHub and as code snippets throughout this developer's guide.\u003c/p\u003e\n"],["\u003cp\u003eThe GitHub samples demonstrate API functionality through an online photo frame application using Node.js and offer examples in various programming languages within individual client library repositories.\u003c/p\u003e\n"],["\u003cp\u003eThis guide features code snippets and REST calls on each page, illustrating specific API features such as album management, library content listing, and media searching with filters.\u003c/p\u003e\n"],["\u003cp\u003eBefore running samples, ensure you've set up a Google Developer's project, enabled the API, and configured OAuth credentials as detailed in the setup instructions.\u003c/p\u003e\n"]]],["The Google Photos Library API offers samples in two locations: a GitHub repository and the developer's guide. The GitHub repository provides a Node.js sample demonstrating search and listing functionalities, and client library repositories offer samples in multiple languages. The developer's guide includes code snippets and REST calls for features like managing albums, listing content, and searching/filtering media. To use the samples, users must set up a Google Developer's project, enable the API, and configure OAuth credentials.\n"],null,["# Samples for the Google Photos Library API are available from the [Google Photos sample\nrepository](https://github.com/googlesamples/google-photos) on GitHub. In\naddition, you can find code snippets on each page of this developer's guide.\n\nSamples on GitHub\n-----------------\n\nThe [GitHub repository](https://github.com/googlesamples/google-photos) contains\na sample that shows the search and list functionality of the Library API\nas implemented in an online photo frame using Node JS.\n\nThe [GitHub repositories for each client\nlibrary](/photos/library/guides/client-libraries) contain multiple samples that\nshow how to use the Library API in different languages.\n\n### Troubleshooting\n\nIf you're having trouble using the samples, make sure that you've done the\nfollowing:\n\n- Set up a Google Developer's project.\n- [Enabled the API](/photos/library/guides/get-started#enable-the-api).\n- [Set up OAuth credentials](/photos/library/guides/get-started#request-id).\n\nThe OAuth credentials need to be added to the sample project. For details, see\nthe README.\n\\`\n\nCode snippets in the developer's guide\n--------------------------------------\n\nEach page in the developer's guide includes code snippets and REST calls that\nillustrate particular features of the API. Some of the guides available for\nfeatures include the following:\n\n- [Managing albums](/photos/library/guides/manage-albums)\n- [Listing library contents, albums, and media\n items](/photos/library/guides/list)\n- [Searching media and applying filters](/photos/library/guides/apply-filters)"]]