lib/google/cloud/speech/v1.rb in google-cloud-speech-0.29.0 vs lib/google/cloud/speech/v1.rb in google-cloud-speech-0.30.0
- old
+ new
@@ -1,6 +1,6 @@
-# Copyright 2017 Google LLC
+# Copyright 2018 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
@@ -11,10 +11,11 @@
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
require "google/cloud/speech/v1/speech_client"
+require "google/cloud/speech/v1/helpers"
module Google
module Cloud
# rubocop:disable LineLength
@@ -91,21 +92,30 @@
# Google::Gax#construct_settings for the structure of
# this data. Falls back to the default config if not specified
# or the specified config is missing data points.
# @param timeout [Numeric]
# The default timeout, in seconds, for calls made through this client.
+ # @param metadata [Hash]
+ # Default metadata to be sent with each request. This can be overridden on a per call basis.
+ # @param exception_transformer [Proc]
+ # An optional proc that intercepts any exceptions raised during an API call to inject
+ # custom error handling.
def self.new \
credentials: nil,
scopes: nil,
client_config: nil,
timeout: nil,
+ metadata: nil,
+ exception_transformer: nil,
lib_name: nil,
lib_version: nil
kwargs = {
credentials: credentials,
scopes: scopes,
client_config: client_config,
timeout: timeout,
+ metadata: metadata,
+ exception_transformer: exception_transformer,
lib_name: lib_name,
lib_version: lib_version
}.select { |_, v| v != nil }
Google::Cloud::Speech::V1::SpeechClient.new(**kwargs)
end