Skip to content

Commit

Permalink
Merge branch 'tristansokol-master'
Browse files Browse the repository at this point in the history
  • Loading branch information
Tom Walder committed Jul 28, 2016
2 parents cf93d1a + 427691e commit 13721be
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -74,11 +74,12 @@ Check out the [examples](examples/) folder for many more and fuller code samples

A little more configuration is required if you want or need to use the JSON API instead of Protocol Buffers.

The Store needs a `GDS\Gateway` to talk to Google and the gateway needs a `Google_Client` for authentication.
The Store needs a `GDS\Gateway` to talk to Google and the gateway needs a `Google_Client` for authentication. You will need to include the [Google Client LIbrary for PHP](https://developers.google.com/api-client-library/php/) as well as create credentials for a service account in order to build the `Google_Client` properly.


```php
$obj_client = GDS\Gateway\GoogleAPIClient::createClientFromJson('/path/to/your/service.json');
$obj_gateway = new GDS\Gateway\GoogleAPIClient($obj_client, DATASET_ID);
$obj_gateway = new GDS\Gateway\GoogleAPIClient($obj_client, PROJECT_ID);
$obj_book_store = new GDS\Store('Book', $obj_gateway);
```

Expand Down Expand Up @@ -341,7 +342,7 @@ This library supports namespaces, and they are be configured per `Gateway` insta
```php
// Create a store for a particular customer or 'application namespace'
$obj_client = GDS\Gateway::createGoogleClient(APP_NAME, ACCOUNT_NAME, KEY_FILE);
$obj_namespaced_gateway = new GDS\Gateway($obj_client, DATASET_ID, 'customer-namespace');
$obj_namespaced_gateway = new GDS\Gateway($obj_client, PROJECT_ID, 'customer-namespace');
$obj_namespaced_book_store = new BookStore($obj_namespaced_gateway);
```

Expand Down

0 comments on commit 13721be

Please sign in to comment.