Class: PlatformAPI::ConfigVar

Inherits:
Object
  • Object
show all
Defined in:
lib/platform-api/client.rb

Overview

Config Vars allow you to manage the configuration information provided to an app on Heroku.

Instance Method Summary collapse

Constructor Details

#initialize(client) ⇒ ConfigVar

Returns a new instance of ConfigVar.



1495
1496
1497
# File 'lib/platform-api/client.rb', line 1495

def initialize(client)
  @client = client
end

Instance Method Details

#info_for_app(app_id_or_app_name) ⇒ Object

Get config-vars for app.

Parameters:

  • app_id_or_app_name:

    unique identifier of app or unique name of app



1502
1503
1504
# File 'lib/platform-api/client.rb', line 1502

def info_for_app(app_id_or_app_name)
  @client.config_var.info_for_app(app_id_or_app_name)
end

#info_for_app_release(app_id_or_app_name, release_id_or_release_version) ⇒ Object

Get config-vars for a release.

Parameters:

  • app_id_or_app_name:

    unique identifier of app or unique name of app

  • release_id_or_release_version:

    unique identifier of release or unique version assigned to the release



1510
1511
1512
# File 'lib/platform-api/client.rb', line 1510

def info_for_app_release(app_id_or_app_name, release_id_or_release_version)
  @client.config_var.info_for_app_release(app_id_or_app_name, release_id_or_release_version)
end

#update(app_id_or_app_name, body = {}) ⇒ Object

Update config-vars for app. You can update existing config-vars by setting them again, and remove by setting it to null.

Parameters:

  • app_id_or_app_name:

    unique identifier of app or unique name of app

  • body:

    the object to pass as the request payload



1518
1519
1520
# File 'lib/platform-api/client.rb', line 1518

def update(app_id_or_app_name, body = {})
  @client.config_var.update(app_id_or_app_name, body)
end