Skip to content

Commit d9eeea9

Browse files
authored
adds shakespeare sample test (GoogleCloudPlatform#185)
1 parent a056612 commit d9eeea9

File tree

7 files changed

+833
-0
lines changed

7 files changed

+833
-0
lines changed

bigquery/shakespeare/README.md

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
# Google BigQuery PHP Sample Application
2+
3+
## Description
4+
5+
This simple command-line application demonstrates how to invoke Google BigQuery from PHP.
6+
7+
## Build and Run
8+
1. **Enable APIs** - [Enable the BigQuery API](https://console.cloud.google.com/flows/enableapi?apiid=bigquery)
9+
and create a new project or select an existing project.
10+
2. **Download The Credentials** - Click "Go to credentials" after enabling the APIs. Click "New Credentials"
11+
and select "Service Account Key". Create a new service account, use the JSON key type, and
12+
select "Create". Once downloaded, set the environment variable `GOOGLE_APPLICATION_CREDENTIALS`
13+
to the path of the JSON key that was downloaded.
14+
3. **Clone the repo** and cd into this directory
15+
16+
```sh
17+
$ git clone https://github.com/GoogleCloudPlatform/php-docs-samples
18+
$ cd php-docs-samples/bigquery/api
19+
```
20+
4. **Install dependencies** via [Composer](http://getcomposer.org/doc/00-intro.md).
21+
Run `php composer.phar install` (if composer is installed locally) or `composer install`
22+
(if composer is installed globally).
23+
5. Run `php shakespeare.php YOUR_PROJECT_ID` to run the sample.
24+
```
25+
26+
## Contributing changes
27+
28+
* See [CONTRIBUTING.md](../../CONTRIBUTING.md)
29+
30+
## Licensing
31+
32+
* See [LICENSE](../../LICENSE)

bigquery/shakespeare/composer.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"require": {
3+
"google/cloud": "^0.10.1"
4+
}
5+
}

0 commit comments

Comments
 (0)