Module: Heroku::Api::Postgres

Defined in:
lib/heroku/api/postgres/client.rb,
lib/heroku/api/postgres/backups.rb,
lib/heroku/api/postgres/version.rb,
lib/heroku/api/postgres/databases.rb,
lib/heroku/api/postgres/credentials.rb

Defined Under Namespace

Classes: Backups, Client, Credentials, Databases

Constant Summary collapse

VERSION =
'0.13.1'

Class Method Summary collapse

Class Method Details

.connect(api_key = ENV.fetch('HEROKU_API_KEY', nil)) ⇒ Object



6
7
8
9
10
# File 'lib/heroku/api/postgres/client.rb', line 6

def self.connect(api_key = ENV.fetch('HEROKU_API_KEY', nil))
  Client.new(api_key).tap do |c|
    c.heroku_client = PlatformAPI.connect(api_key)
  end
end

.connect_oauth(oauth_client_key = ENV.fetch('HEROKU_OAUTH_TOKEN', nil)) ⇒ Object



12
13
14
15
16
# File 'lib/heroku/api/postgres/client.rb', line 12

def self.connect_oauth(oauth_client_key = ENV.fetch('HEROKU_OAUTH_TOKEN', nil))
  Client.new(oauth_client_key).tap do |c|
    c.heroku_client = PlatformAPI.connect_oauth(oauth_client_key)
  end
end