Module: TQ::ServiceAccount
Instance Method Summary collapse
Instance Method Details
#client(file) ⇒ Object
80 81 82 83 84 85 86 87 88 89 90 |
# File 'lib/tq.rb', line 80 def client(file) creds = Google::Auth::ServiceAccountCredentials.make_creds( :json_key_io => File.open(file, 'r'), :scope => TQ::API_SCOPES ) creds.fetch_access_token! client = CloudTasks::CloudTasksService.new client. = creds client end |