Skip to content

Commit d73e675

Browse files
committed
Merge pull request googleapis#695 from bshaffer/v2-rcb-1
v2.0 RCB-1
2 parents a25dc9d + f15f268 commit d73e675

File tree

120 files changed

+3881
-10760
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

120 files changed

+3881
-10760
lines changed

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,4 @@ composer.lock
44
vendor
55
examples/testfile-small.txt
66
examples/testfile.txt
7-
tests/.accessToken
7+
tests/.apiKey

.travis.yml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,6 @@ cache:
1717
matrix:
1818
fast_finish: true
1919
include:
20-
# Can't test against 5.2; openssl is not available:
21-
# http://docs.travis-ci.com/user/languages/php/#PHP-installation
22-
- php: 5.3
2320
- php: 5.4
2421
- php: 5.5
2522
- php: 5.6

README.md

Lines changed: 30 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
[![Build Status](https://travis-ci.org/google/google-api-php-client.svg)](https://travis-ci.org/google/google-api-php-client)
1+
[![Build Status](https://travis-ci.org/google/google-api-php-client.svg)](https://travis-ci.org/google/google-api-php-client.svg?branch=master)
22

33
# Google APIs Client Library for PHP #
44

@@ -9,10 +9,7 @@ The Google API Client Library enables you to work with Google APIs such as Googl
99
This library is in Beta. We're comfortable enough with the stability and features of the library that we want you to build real production applications on it. We will make an effort to support the public and protected surface of the library and maintain backwards compatibility in the future. While we are still in Beta, we reserve the right to make incompatible changes. If we do remove some functionality (typically because better functionality exists or if the feature proved infeasible), our intention is to deprecate and provide ample time for developers to update their code.
1010

1111
## Requirements ##
12-
* [PHP 5.2.1 or higher](http://www.php.net/)
13-
* [PHP JSON extension](http://php.net/manual/en/book.json.php)
14-
15-
*Note*: some features (service accounts and id token verification) require PHP 5.3.0 and above due to cryptographic algorithm requirements.
12+
* [PHP 5.4.0 or higher](http://www.php.net/)
1613

1714
## Developer Documentation ##
1815
http://developers.google.com/api-client-library/php
@@ -22,24 +19,31 @@ http://developers.google.com/api-client-library/php
2219
For the latest installation and setup instructions, see [the documentation](https://developers.google.com/api-client-library/php/start/installation).
2320

2421
## Basic Example ##
25-
See the examples/ directory for examples of the key client features.
22+
See the examples/ directory for examples of the key client features. You can
23+
view them in your browser by running the php built-in web server.
24+
25+
```
26+
$ php -S localhost:8000 -t examples/
27+
```
28+
29+
And then browsing to the host and port you specified
30+
(in the above example, `http://localhost:8000`).
31+
2632
```PHP
27-
<?php
28-
29-
require_once 'google-api-php-client/src/Google/autoload.php'; // or wherever autoload.php is located
30-
31-
$client = new Google_Client();
32-
$client->setApplicationName("Client_Library_Examples");
33-
$client->setDeveloperKey("YOUR_APP_KEY");
34-
35-
$service = new Google_Service_Books($client);
36-
$optParams = array('filter' => 'free-ebooks');
37-
$results = $service->volumes->listVolumes('Henry David Thoreau', $optParams);
38-
39-
foreach ($results as $item) {
40-
echo $item['volumeInfo']['title'], "<br /> \n";
41-
}
42-
33+
// include your composer dependencies
34+
require_once 'vendor/autoload.php';
35+
36+
$client = new Google_Client();
37+
$client->setApplicationName("Client_Library_Examples");
38+
$client->setDeveloperKey("YOUR_APP_KEY");
39+
40+
$service = new Google_Service_Books($client);
41+
$optParams = array('filter' => 'free-ebooks');
42+
$results = $service->volumes->listVolumes('Henry David Thoreau', $optParams);
43+
44+
foreach ($results as $item) {
45+
echo $item['volumeInfo']['title'], "<br /> \n";
46+
}
4347
```
4448

4549
### Service Specific Examples ###
@@ -58,7 +62,7 @@ If there is a specific bug with the library, please file a issue in the Github i
5862

5963
We accept contributions via Github Pull Requests, but all contributors need to be covered by the standard Google Contributor License Agreement. You can find links, and more instructions, in the documentation: https://developers.google.com/api-client-library/php/contribute
6064

61-
### I want an example of X! ###
65+
### I want an example of X! ###
6266

6367
If X is a feature of the library, file away! If X is an example of using a specific service, the best place to go is to the teams for those specific APIs - our preference is to link to their examples rather than add them to the library, as they can then pin to specific versions of the library. If you have any examples for other APIs, let us know and we will happily add a link to the README above!
6468

@@ -68,7 +72,7 @@ When we started working on the 1.0.0 branch we knew there were several fundament
6872

6973
### Why does Google_..._Service have weird names? ###
7074

71-
The _Service classes are generally automatically generated from the API discovery documents: https://developers.google.com/discovery/. Sometimes new features are added to APIs with unusual names, which can cause some unexpected or non-standard style naming in the PHP classes.
75+
The _Service classes are generally automatically generated from the API discovery documents: https://developers.google.com/discovery/. Sometimes new features are added to APIs with unusual names, which can cause some unexpected or non-standard style naming in the PHP classes.
7276

7377
### How do I deal with non-JSON response types? ###
7478

@@ -95,10 +99,10 @@ Run the PHPUnit tests with PHPUnit. You can configure an API key and token in Ba
9599
To check for coding style violations, run
96100

97101
```
98-
vendor/bin/phpcs src --standard=style/ruleset.xml -np
102+
vendor/bin/phpcs src --standard=style/ruleset.xml -np
99103
```
100104

101-
To automatically fix (fixable) coding style violations, run
105+
To automatically fix (fixable) coding style violations, run
102106

103107
```
104108
vendor/bin/phpcbf src --standard=style/ruleset.xml

0 commit comments

Comments
 (0)