Lines Matching +full:github +full:- +full:token

1 ![](https://github.com/googleapis/google-api-php-client/workflows/.github/workflows/tests.yml/badge…
6 …dt><dd><a href="https://googleapis.github.io/google-api-php-client/main/">https://googleapis.githu…
16-datastore], [Cloud Storage][cloud-storage], [Pub/Sub][cloud-pubsub], and [Compute Engine][cloud-c…
18 [cloud-datastore]: https://github.com/googleapis/google-cloud-php-datastore
19 [cloud-pubsub]: https://github.com/googleapis/google-cloud-php-pubsub
20 [cloud-storage]: https://github.com/googleapis/google-cloud-php-storage
21 [cloud-compute]: https://github.com/googleapis/google-cloud-php-compute
37 [installation instructions](https://getcomposer.org/doc/00-intro.md) if you do not already have
49 require_once '/path/to/your-project/vendor/autoload.php';
52-services`. That library provides up-to-date API wrappers for a large number of Google APIs. In or…
67 "pre-autoload-dump": "Google\\Task\\Composer::cleanup"
70 "google/apiclient-services": [
82 remove the `vendor/google/apiclient-services` directory explicitly for the
86 rm -r vendor/google/apiclient-services
97 "google/apiclient-services": [
109 …nload the package in its entirety. The [Releases](https://github.com/googleapis/google-api-php-cli…
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';
122 view them in your browser by running the php built-in web server.
125 $ php -S localhost:8000 -t examples/
138 $client->setApplicationName("Client_Library_Examples");
139 $client->setDeveloperKey("YOUR_APP_KEY");
144 'filter' => 'free-ebooks',
146 $results = $service->volumes->listVolumes($query, $optParams);
148 foreach ($results->getItems() as $item) {
155 > An example of this can be seen in [`examples/simple-file-upload.php`](examples/simple-file-upload…
157 …nstructions to [Create Web Application Credentials](docs/oauth-web.md#create-authorization-credent…
163 $client->setAuthConfig('/path/to/client_credentials.json');
169 $client->addScope(Google\Service\Drive::DRIVE);
178 $client->setRedirectUri($redirect_uri);
181 1. In the script handling the redirect URI, exchange the authorization code for an access token:
185 $token = $client->fetchAccessTokenWithAuthCode($_GET['code']);
191 > An example of this can be seen in [`examples/service-account.php`](examples/service-account.php).
198 1. Follow the instructions to [Create a Service Account](docs/oauth-server.md#creating-a-service-ac…
203 putenv('GOOGLE_APPLICATION_CREDENTIALS=/path/to/service-account.json');
210 $client->useApplicationDefaultCredentials();
216 $client->addScope(Google\Service\Drive::DRIVE);
219 1. If you have delegated domain-wide access to the service account and you want to impersonate a us…
222 $client->setSubject($user_to_impersonate);
235 $client->setAuthConfig($jsonKey);
240-api-php-client-services](https://github.com/googleapis/google-api-php-client-services) are autoge…
242 A JSON request to the [Datastore API](https://developers.google.com/apis-explorer/#p/datastore/v1be…
269 // build the query - this maps directly to the JSON
287 $response = $datastore->projects->runQuery('YOUR_DATASET_ID', $request);
299 // - set the order
301 $order->setDirection('descending');
303 $property->setName('title');
304 $order->setProperty($property);
305 $query->setOrder([$order]);
306 // - set the kinds
308 $kind->setName('Book');
309 $query->setKinds([$kind]);
310 // - set the limit
311 $query->setLimit(10);
314 $request->setQuery($query);
315 $response = $datastore->projects->runQuery('YOUR_DATASET_ID', $request);
318 …ecommended to look at the [APIs Explorer](https://developers.google.com/apis-explorer/#p/) before …
324 …requests, you should use [`google/auth`](https://github.com/googleapis/google-auth-library-php#cal…
334 * directly with an access token, API key, or (recommended) using
337 $client->useApplicationDefaultCredentials();
338 $client->addScope(Google\Service\Plus::PLUS_ME);
341 $httpClient = $client->authorize();
344 $response = $httpClient->get('https://www.googleapis.com/plus/v1/people/me');
349 …to improve performance. This can be done by passing a [PSR-6](https://www.php-fig.org/psr/psr-6/) …
360 $client->setCache($cache);
363 In this example we use [PHP Cache](http://www.php-cache.com/). Add this to your project with compos…
366 composer require cache/filesystem-adapter
371 …ount#overview), it may be useful to perform some action when a new access token is granted. To do …
376 $logger->debug(sprintf('new access token received at cache key %s', $cacheKey));
378 $client->setTokenCallback($tokenCallback);
383 …se of [Charles Web Proxy](https://www.charlesproxy.com/documentation/getting-started/). Download a…
393 $client->setHttpClient($httpClient);
416 $client->setHttpClient($httpClient);
419 … as [Handlers and Middleware](http://docs.guzzlephp.org/en/stable/handlers-and-middleware.html) of…
423 YouTube: https://github.com/youtube/api-samples/tree/master/php
427 Please see the [contributing](.github/CONTRIBUTING.md) page for more information. In particular, we…
433 …ace to ask is via the google-api-php-client tag on StackOverflow: https://stackoverflow.com/questi…
435github.com/googleapis/google-api-php-client/issues) in the GitHub issues tracker, including an exa…
439 …cific service, the best place to go is to the teams for those specific APIs - our preference is to…
443 …are added to APIs with unusual names, which can cause some unexpected or non-standard style naming…
445 ### How do I deal with non-JSON response types? ###
461 Run the PHPUnit tests with PHPUnit. You can configure an API key and token in BaseTest.php to run a…
470 vendor/bin/phpcs src --standard=style/ruleset.xml -np
476 vendor/bin/phpcbf src --standard=style/ruleset.xml