Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add universe domain support #2563

Merged
merged 14 commits into from
Apr 24, 2024
Prev Previous commit
Next Next commit
update documentation regarding setting API key and access token directly
  • Loading branch information
bshaffer committed Feb 22, 2024
commit 5623323a2e551a08f6c402911527dcf6a3fc43ea
12 changes: 11 additions & 1 deletion src/Client.php
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,10 @@ public function __construct(array $config = [])

// Simple API access key, also from the API console. Ensure you get
// a Server key, and not a Browser key.
// **NOTE:** The universe domain is assumed to be "googleapis.com" unless
// explicitly set. When setting an API ley directly via this option, there
// is no way to verify the universe domain. Be sure to set the
// "universe_domain" option if "googleapis.com" is not intended.
'developer_key' => '',

// For use with Google Cloud Platform
Expand Down Expand Up @@ -179,7 +183,8 @@ public function __construct(array $config = [])
// from certain APIs.
'api_format_v2' => false,

// Setting the universe domain will change the
// Setting the universe domain will change the default rootUrl of the service.
// The universe domain is assumed to be "googleapis.com" if not set explicitly.
'universe_domain' => GetUniverseDomainInterface::DEFAULT_UNIVERSE_DOMAIN,
], $config);

Expand Down Expand Up @@ -511,6 +516,11 @@ public function isUsingApplicationDefaultCredentials()
* as calling `clear()` will remove all cache items, including any items not
* related to Google API PHP Client.)
*
* **NOTE:** The universe domain is assumed to be "googleapis.com" unless
* explicitly set. When setting an access token directly via this method, there
* is no way to verify the universe domain. Be sure to set the "universe_domain"
* option if "googleapis.com" is not intended.
*
* @param string|array $token
* @throws InvalidArgumentException
*/
Expand Down
Loading