Lines Matching refs:client

1 ![](https://github.com/googleapis/google-api-php-client/workflows/.github/workflows/tests.yml/badge…
6 …https://googleapis.github.io/google-api-php-client/main/">https://googleapis.github.io/google-api-…
12 These client libraries are officially supported by Google. However, the libraries are considered c…
16 …te], we recommend using the Google Cloud client libraries. For a complete list of supported Google…
52 …pin to the [latest version](https://github.com/googleapis/google-api-php-client-services/releases)…
109 …ts entirety. The [Releases](https://github.com/googleapis/google-api-php-client/releases) page lis…
110 with the name `google-api-php-client-[RELEASE_NAME].zip` for a package including this library and i…
115 require_once '/path/to/google-api-php-client/vendor/autoload.php';
121 See the [`examples/`](examples) directory for examples of the key client features. You can
137 $client = new Google\Client();
138 $client->setApplicationName("Client_Library_Examples");
139 $client->setDeveloperKey("YOUR_APP_KEY");
141 $service = new Google\Service\Books($client);
162 $client = new Google\Client();
163 $client->setAuthConfig('/path/to/client_credentials.json');
169 $client->addScope(Google\Service\Drive::DRIVE);
178 $client->setRedirectUri($redirect_uri);
185 $token = $client->fetchAccessTokenWithAuthCode($_GET['code']);
206 1. Tell the Google client to use your service account credentials to authenticate:
209 $client = new Google\Client();
210 $client->useApplicationDefaultCredentials();
216 $client->addScope(Google\Service\Drive::DRIVE);
222 $client->setSubject($user_to_impersonate);
234 $client = new Google\Client();
235 $client->setAuthConfig($jsonKey);
240 …s used to call the API in [google-api-php-client-services](https://github.com/googleapis/google-ap…
267 $datastore = new Google\Service\Datastore($client);
294 $datastore = new Google\Service\Datastore($client);
324 If you are installing this client only to authenticate your own HTTP client requests, you should us…
326 …uzzle Client](http://docs.guzzlephp.org/), so any request made using the client will contain the c…
329 // create the Google client
330 $client = new Google\Client();
337 $client->useApplicationDefaultCredentials();
338 $client->addScope(Google\Service\Plus::PLUS_ME);
341 $httpClient = $client->authorize();
349 … be done by passing a [PSR-6](https://www.php-fig.org/psr/psr-6/) compatible library to the client:
360 $client->setCache($cache);
371 …ccess token is granted. To do this, pass a callable to the `setTokenCallback` method on the client:
378 $client->setTokenCallback($tokenCallback);
392 $client = new Google\Client();
393 $client->setHttpClient($httpClient);
402 Google API Client uses [Guzzle](http://docs.guzzlephp.org/) as its default HTTP client. That means …
415 $client = new Google\Client();
416 $client->setHttpClient($httpClient);
433 …ask is via the google-api-php-client tag on StackOverflow: https://stackoverflow.com/questions/tag…
435 …ary, please [file an issue](https://github.com/googleapis/google-api-php-client/issues) in the Git…