The Google APIs Client Library for PHP has officially reached Beta.
The Google API PHP client supports the following Google APIs right now, with more on the way.
Here is some sample code that demonstrates how to use the library and the Google Books API to search for and print the titles of free ebooks by Henry David Thoreau:
Blog: The official Google Code blog
Post: Google APIs Client Library for PHP (Beta)
Link: http://googlecode.blogspot. com/2011/09/google-apis- client-library-for-php-beta. html
The Google API PHP client supports the following Google APIs right now, with more on the way.
- Buzz API - Sample
- Books API - Sample
- Latitude API - Sample
- Page Speed Online API - Sample
- Tasks API - Sample
- URL Shortener API - Sample
curl "http://google-api-php-client.googlecode.com/files/google-api-php-client-0.4.1.tar.gz" -O
tar -xvf google-api-php-client-0.4.1.tar.gz
cd google-api-php-client/examples/
Here is some sample code that demonstrates how to use the library and the Google Books API to search for and print the titles of free ebooks by Henry David Thoreau:
<?php require_once 'path/to/src/apiClient.php'; require_once 'path/to/src/contrib/apiBooksService.php'; $client = new apiClient(); $client->setApplicationName("My_Books_API_Example"); $service = new apiBooksService($client); $optParams = array('filter' => 'free-ebooks'); $results = $service->volumes->listVolumes('Henry David Thoreau', $optParams); foreach ($results['items'] as $item) { print($item['volumeInfo']['title'] . '<br>'); }
Blog: The official Google Code blog
Post: Google APIs Client Library for PHP (Beta)
Link: http://googlecode.blogspot.
No comments:
Post a Comment