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 Google API (có sẵn 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 Google Site Verification API.
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 (xin lưu ý rằng một số thư viện đang ở giai đoạn đầu) và các đường liên kết đến tài liệu của 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 sau đây cũng có sẵn:
Các mẫu nổi bật cho API này
Thông thường, cách dễ nhất để tìm hiểu cách sử dụng một API là xem mã mẫu. Bảng bên 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 các mẫu đặc biệt thú vị cho Google Site Verification API.
Ngôn ngữ |
Các mẫu nổi bật |
Phiên bản API |
PHP |
- Trình bổ trợ Xác minh trang web cho WordPress
(Nguồn)
Trình bổ trợ cho WordPress sử dụng API Xác minh trang web của Google để xác minh blog. Minh hoạ cách sử dụng thư viện PHP để thực hiện các lệnh gọi API và xác thực bằng OAuth. Tệp ZIP của trình bổ trợ chứa mã PHP chưa được biên dịch và không bị làm rối mã nguồn. Bạn có thể dùng mã này làm mã ví dụ.
Trình bổ trợ này được cấp phép theo GPLv2 để tuân thủ các yêu cầu pháp lý của WordPress; thư viện ứng dụng PHP cũng có thể tải xuống theo các điều khoản của giấy phép Apache 2.0 ít hạn chế hơn.
|
1.0 |
[null,null,[],[[["\u003cp\u003eGoogle API client libraries simplify the use of the Google Site Verification API and are available in various programming languages, including Java, JavaScript, .NET, Objective-C, PHP, and Python.\u003c/p\u003e\n"],["\u003cp\u003eSample code for the Google Site Verification API is readily available for multiple languages, aiding developers in understanding and utilizing the API effectively.\u003c/p\u003e\n"],["\u003cp\u003eThe libraries have varying stages of development, with some, such as Dart, Go, Node.js, and Ruby, being in early stages (alpha/beta).\u003c/p\u003e\n"],["\u003cp\u003eA featured sample showcasing the practical application of the Google Site Verification API is the Site Verification WordPress Plugin, demonstrating API calls, OAuth authentication, and the use of the PHP library.\u003c/p\u003e\n"]]],["Google API client libraries simplify the use of the Google Site Verification API across multiple programming languages. Documentation and sample code are provided for Java, JavaScript, .NET, Objective-C, PHP, and Python. Early-stage support includes Dart, Go, Node.js, and Ruby. Featured samples are available, including a WordPress plugin that demonstrates the PHP library and OAuth authentication for the API's version 1.0. Sample code allows users to see working examples.\n"],null,["# Libraries and Samples\n\nThe Google API client libraries, which are available in a number of popular programming languages, make it easy to use the Google Site Verification 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 for this API\n-----------------------------\n\nOften, the easiest way to learn how to use an API can be to look at sample code. The table above provides links to some basic samples for each of the languages shown. This section highlights particularly interesting samples for the Google Site Verification API.\n\n| Language | Featured samples | API version |\n| PHP | - [**Site Verification Wordpress Plugin**](https://wordpress.org/plugins/wp-site-verification-tool/) ([Source](http://plugins.svn.wordpress.org/official-google-site-verification-plugin/trunk/)) Plugin for Wordpress that uses Google Site Verification API to verify blogs. Demonstrates use of the PHP library for making API calls, and authentication using OAuth. Plugin ZIP file contains uncompiled and unobfuscated PHP code that can be used as example code. This plugin is licensed under GPLv2 to comply with Wordpress legal requirements; the PHP client library is also [available for download](http://code.google.com/p/google-api-php-client/) under terms of the less-restrictive Apache 2.0 license. | 1.0 |\n|----------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|-------------|\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e"]]