Module: TQ::ServiceAccount
Instance Method Summary collapse
Instance Method Details
#client(file) ⇒ Object
72 73 74 75 76 77 78 79 80 81 82 |
# File 'lib/tq.rb', line 72 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 |