From ac345872f345a7606d9e1f92b10f1c2fe7e59101 Mon Sep 17 00:00:00 2001 From: John Pedrie Date: Thu, 14 Dec 2017 14:46:31 -0500 Subject: [PATCH] Update ML client constructor docs (#795) * Update LanguageClient constructor docs * Update other ML clients --- src/Language/LanguageClient.php | 6 ++++-- src/Speech/SpeechClient.php | 6 ++++-- src/Translate/TranslateClient.php | 6 ++++-- src/Vision/VisionClient.php | 6 ++++-- 4 files changed, 16 insertions(+), 8 deletions(-) diff --git a/src/Language/LanguageClient.php b/src/Language/LanguageClient.php index 8250dcbe299..bda227a246d 100644 --- a/src/Language/LanguageClient.php +++ b/src/Language/LanguageClient.php @@ -66,11 +66,13 @@ class LanguageClient /** * Create a Language client. * + * Note that when creating a LanguageClient instance, setting + * `$config.projectId` is not supported. To switch between projects, you + * must provide credentials with access to the project. + * * @param array $config [optional] { * Configuration Options. * - * @type string $projectId The project ID from the Google Developer's - * Console. * @type CacheItemPoolInterface $authCache A cache for storing access * tokens. **Defaults to** a simple in memory implementation. * @type array $authCacheOptions Cache configuration options. diff --git a/src/Speech/SpeechClient.php b/src/Speech/SpeechClient.php index 94e81b46edb..54b41ac9518 100644 --- a/src/Speech/SpeechClient.php +++ b/src/Speech/SpeechClient.php @@ -59,11 +59,13 @@ class SpeechClient /** * Create a Speech client. * + * Note that when creating a SpeechClient instance, setting + * `$config.projectId` is not supported. To switch between projects, you + * must provide credentials with access to the project. + * * @param array $config [optional] { * Configuration Options. * - * @type string $projectId The project ID from the Google Developer's - * Console. * @type CacheItemPoolInterface $authCache A cache for storing access * tokens. **Defaults to** a simple in memory implementation. * @type array $authCacheOptions Cache configuration options. diff --git a/src/Translate/TranslateClient.php b/src/Translate/TranslateClient.php index d15c604513c..67304f6dccb 100644 --- a/src/Translate/TranslateClient.php +++ b/src/Translate/TranslateClient.php @@ -70,6 +70,10 @@ class TranslateClient /** * Create a Translate client. * + * Note that when creating a TranslateClient instance, setting + * `$config.projectId` is not supported. To switch between projects, you + * must provide credentials with access to the project. + * * @param array $config [optional] { * Configuration Options. * @@ -77,8 +81,6 @@ class TranslateClient * @type string $target The target language to assign to the client. * Must be a valid ISO 639-1 language code. **Defaults to** `"en"` * (English). - * @type string $projectId The project ID from the Google Developer's - * Console. * @type CacheItemPoolInterface $authCache A cache used storing access * tokens. **Defaults to** a simple in memory implementation. * @type array $authCacheOptions Cache configuration options. diff --git a/src/Vision/VisionClient.php b/src/Vision/VisionClient.php index 5c553a1b5b3..abb5abbe827 100644 --- a/src/Vision/VisionClient.php +++ b/src/Vision/VisionClient.php @@ -54,11 +54,13 @@ class VisionClient /** * Create a Vision client. * + * Note that when creating a VisionClient instance, setting + * `$config.projectId` is not supported. To switch between projects, you + * must provide credentials with access to the project. + * * @param array $config [optional] { * Configuration Options. * - * @type string $projectId The project ID from the Google Developer's - * Console. * @type CacheItemPoolInterface $authCache A cache for storing access * tokens. **Defaults to** a simple in memory implementation. * @type array $authCacheOptions Cache configuration options.