Class: HerokuFormationValidator::HerokuApi

Inherits:
Object
  • Object
show all
Includes:
HTTParty
Defined in:
lib/heroku_formation_validator/heroku_api.rb

Instance Method Summary collapse

Constructor Details

#initialize(email, token) ⇒ HerokuApi

debug_output $stderr



10
11
12
# File 'lib/heroku_formation_validator/heroku_api.rb', line 10

def initialize(email, token)
  self.class.basic_auth email, token
end

Instance Method Details

#addons(app_id_or_name) ⇒ Object



26
27
28
# File 'lib/heroku_formation_validator/heroku_api.rb', line 26

def addons(app_id_or_name)
  self.class.get("/apps/#{app_id_or_name}/addons")
end

#appsObject



18
19
20
# File 'lib/heroku_formation_validator/heroku_api.rb', line 18

def apps
  self.class.get("/apps")
end

#configvars(app_id_or_name) ⇒ Object



22
23
24
# File 'lib/heroku_formation_validator/heroku_api.rb', line 22

def configvars(app_id_or_name)
  self.class.get("/apps/#{app_id_or_name}/config-vars")
end

#logdrains(app_id_or_name) ⇒ Object



30
31
32
# File 'lib/heroku_formation_validator/heroku_api.rb', line 30

def logdrains(app_id_or_name)
  self.class.get("/apps/#{app_id_or_name}/log-drains")
end

#pingObject



14
15
16
# File 'lib/heroku_formation_validator/heroku_api.rb', line 14

def ping
  apps.ok?
end