lib/google/cloud/translate/api.rb in google-cloud-translate-1.0.1 vs lib/google/cloud/translate/api.rb in google-cloud-translate-1.1.0

- old
+ new

@@ -67,22 +67,23 @@ # # @example # require "google/cloud/translate" # # translate = Google::Cloud::Translate.new( - # project: "my-todo-project", - # keyfile: "/path/to/keyfile.json" + # project_id: "my-todo-project", + # credentials: "/path/to/keyfile.json" # ) # - # translate.project #=> "my-todo-project" + # translate.project_id #=> "my-todo-project" # - def project + def project_id service.project end + alias_method :project, :project_id ## # @private Default project. - def self.default_project + def self.default_project_id ENV["TRANSLATE_PROJECT"] || ENV["GOOGLE_CLOUD_PROJECT"] || ENV["GCLOUD_PROJECT"] || Google::Cloud.env.project_id end