2017 © Pedro Peláez
 

library google-books-api-client

A Google Books API Client

image

marvelley/google-books-api-client

A Google Books API Client

  • Thursday, August 4, 2016
  • by craigmarvelley
  • Repository
  • 2 Watchers
  • 10 Stars
  • 145 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 3 Forks
  • 0 Open issues
  • 3 Versions
  • 0 % Grown

The README.md

Google Books API Client

About

A PHP client for the Google Books API. Based on the Guzzle library, (*1)

Installation

Installing via Composer

The recommended way to install the library is via Composer., (*2)

  1. Add marvelley/google-books-api-client as a dependency in your project's composer.json file:, (*3)

    {
        "require": {
            "marvelley/google-books-api-client": "*"
        }
    }

    Consider tightening your dependencies to a known version when deploying mission critical applications (e.g. 2.8.*)., (*4)

  2. Download and install Composer:, (*5)

    curl -s http://getcomposer.org/installer | php
  3. Install your dependencies:, (*6)

    php composer.phar install
  4. Require Composer's autoloader, (*7)

    Composer also prepares an autoload file that's capable of autoloading all of the classes in any of the libraries that it downloads. To use it, just add the following line to your code's bootstrap process:, (*8)

    require 'vendor/autoload.php';

You can find out more on how to install Composer, configure autoloading, and other best-practices for defining dependencies at getcomposer.org., (*9)

Using the client

<?php

$client = GoogleBooksApiClient::factory(array('base_url' => 'https://www.googleapis.com'));
$command = $client->getCommand('GetVolume', array('id' => 'zyTCAlFPjgYC'));

$responseModel = $client->execute($command);
$data = $responseModel->toArray();

echo $data['id']; // prints 'zyTCAlFPjgYC'

Running the unit tests

vendor/bin/phpunit 

The Versions

04/08 2016

dev-master

9999999-dev

A Google Books API Client

  Sources   Download

The Requires

 

The Development Requires

by Craig Marvelley

guzzle

25/10 2012

1.0.0

1.0.0.0

A Google Books API Client

  Sources   Download

The Requires

 

by Craig Marvelley

guzzle

25/10 2012

dev-guzzle-refactor

dev-guzzle-refactor

A Google Books API Client

  Sources   Download

The Requires

 

by Craig Marvelley

guzzle