2017 © Pedro Peláez
 

library google-api-php-client

A wrapper for the official Google api PHP client.

image

pixelfederation/google-api-php-client

A wrapper for the official Google api PHP client.

  • Monday, July 16, 2018
  • by pixelfederation
  • Repository
  • 3 Watchers
  • 1 Stars
  • 79 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 7 Versions
  • 49 % Grown

The README.md

GoogleApi PHP Client

A wrapper for the official Google api PHP client., (*1)

Usage

To install the composer package, run the following command:, (*2)

composer require pixelfederation/google-api-php-client

After the installation of the dependencies, the Client should be instantiated this way:, (*3)

$googleServiceFactory = new \PixelFederation\GoogleApi\Factory\GoogleServiceFactory('Server API key');
$resultFactory = new \PixelFederation\GoogleApi\Factory\ResultFactory();

$client = new \PixelFederation\GoogleApi\Client($googleServiceFactory, $resultFactory);
  • $googleServiceFactory: "Server Api key" documentation - https://developers.google.com/api-client-library/php/auth/api-keys

Now you are able to call methods from ClientInterface. For example, if you can read something from https://docs.google.com/spreadsheets/d/1BxiMVs0XRA5nFMdKvBdBZjgmUUqptlbs74OgvE2upms, (*4)

// $client->getSheetById($spreadsheetId, $name, array $keys, $range = 'A1:XXX');


/**
 * @param string $spreadsheetId The ID of the spreadsheet to retrieve data from.
 * @param string $name          Name of Sheet
 * @param array  $keys          Names of column what you can retrieve
 * @param string $range         The A1 notation of the values to retrieve.
 *
 * @return Result
 */
$result = $client->getSheetById("1BxiMVs0XRA5nFMdKvBdBZjgmUUqptlbs74OgvE2upms", "Class Data", [
    "Student Name",
    "Gender",
    "Home State",
]);

$response = $result->findBy([ 'Gender' => "Female", "Home State" => "MD" ]);

/*
Array
(
    [8] => Array
        (
            [Student Name] => Dorothy
            [Gender] => Female
            [Home State] => MD
        )

)
*/

The Versions

16/07 2018

dev-master

9999999-dev

A wrapper for the official Google api PHP client.

  Sources   Download

BSD-3-Clause

The Requires

 

by Juraj Surman

google spreadsheet google api

16/07 2018

1.1.0

1.1.0.0

A wrapper for the official Google api PHP client.

  Sources   Download

BSD-3-Clause

The Requires

 

by Juraj Surman

google spreadsheet google api

28/02 2017

1.0.0

1.0.0.0

A wrapper for the official Google api PHP client.

  Sources   Download

BSD-3-Clause

The Requires

 

by Juraj Surman

google spreadsheet google api

29/06 2016

0.1.3

0.1.3.0

A wrapper for the official Google api PHP client.

  Sources   Download

BSD-3-Clause

The Requires

 

by Juraj Surman

google spreadsheet google api

29/06 2016

0.1.2

0.1.2.0

A wrapper for the official Google api PHP client.

  Sources   Download

BSD-3-Clause

The Requires

 

by Juraj Surman

google spreadsheet google api

29/06 2016

0.1.1

0.1.1.0

A wrapper for the official Google api PHP client.

  Sources   Download

BSD-3-Clause

The Requires

 

by Juraj Surman

google spreadsheet google api

28/06 2016

0.1.0

0.1.0.0

A wrapper for the official Google api PHP client.

  Sources   Download

BSD-3-Clause

The Requires

 

by Juraj Surman

google spreadsheet google api