Class: SnapDeploy::Provider::Heroku::API::Key

Inherits:
Object
  • Object
show all
Defined in:
lib/snap_deploy/provider/heroku/api.rb

Overview

Keys represent public SSH keys associated with an account and are used to authorize accounts as they are performing git operations.

Instance Method Summary collapse

Constructor Details

#initialize(client) ⇒ Key

Returns a new instance of Key.



944
945
946
# File 'lib/snap_deploy/provider/heroku/api.rb', line 944

def initialize(client)
  @client = client
end

Instance Method Details

#create(body) ⇒ Object

Create a new key.

Parameters:

  • body:

    the object to pass as the request payload



951
952
953
# File 'lib/snap_deploy/provider/heroku/api.rb', line 951

def create(body)
  @client.key.create(body)
end

#delete(key_id_or_key_fingerprint) ⇒ Object

Delete an existing key

Parameters:

  • key_id_or_key_fingerprint:

    unique identifier of this key or a unique identifying string based on contents



958
959
960
# File 'lib/snap_deploy/provider/heroku/api.rb', line 958

def delete(key_id_or_key_fingerprint)
  @client.key.delete(key_id_or_key_fingerprint)
end

#info(key_id_or_key_fingerprint) ⇒ Object

Info for existing key.

Parameters:

  • key_id_or_key_fingerprint:

    unique identifier of this key or a unique identifying string based on contents



965
966
967
# File 'lib/snap_deploy/provider/heroku/api.rb', line 965

def info(key_id_or_key_fingerprint)
  @client.key.info(key_id_or_key_fingerprint)
end

#listObject

List existing keys.



970
971
972
# File 'lib/snap_deploy/provider/heroku/api.rb', line 970

def list()
  @client.key.list()
end