googleapis / google-api-php-client

A PHP client library for accessing Google APIs
Apache License 2.0
9.2k stars 3.52k forks source link

feat: add universe domain support #2563

Closed bshaffer closed 2 months ago

bshaffer commented 4 months ago

See also https://github.com/googleapis/google-api-php-client-services/pull/4675

The following manual test worked using this branch:

$universeDomain = 'MY_UNIVERSE_DOMAIN';
$projectId = 'MY_PROJECT_ID';

$client = new Google\Client([
    'universe_domain' => $universeDomain,
    'scopes' => ['https://www.googleapis.com/auth/cloud-platform'],
]);
$client->useApplicationDefaultCredentials();
$storage = new Google\Service\Storage($client);

$buckets = $storage->buckets->listBuckets($projectId);

foreach ($buckets as $bucket) {
    echo $bucket->name . PHP_EOL;
}