Class: PlatformAPI::Key
- Inherits:
-
Object
- Object
- PlatformAPI::Key
- Defined in:
- lib/platform-api/client.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
-
#create(body) ⇒ Object
Create a new key.
-
#delete(key_id_or_key_fingerprint) ⇒ Object
Delete an existing key.
-
#info(key_id_or_key_fingerprint) ⇒ Object
Info for existing key.
-
#initialize(client) ⇒ Key
constructor
A new instance of Key.
-
#list ⇒ Object
List existing keys.
Constructor Details
#initialize(client) ⇒ Key
Returns a new instance of Key.
779 780 781 |
# File 'lib/platform-api/client.rb', line 779 def initialize(client) @client = client end |
Instance Method Details
#create(body) ⇒ Object
Create a new key.
786 787 788 |
# File 'lib/platform-api/client.rb', line 786 def create(body) @client.key.create(body) end |
#delete(key_id_or_key_fingerprint) ⇒ Object
Delete an existing key
793 794 795 |
# File 'lib/platform-api/client.rb', line 793 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.
800 801 802 |
# File 'lib/platform-api/client.rb', line 800 def info(key_id_or_key_fingerprint) @client.key.info(key_id_or_key_fingerprint) end |
#list ⇒ Object
List existing keys.
805 806 807 |
# File 'lib/platform-api/client.rb', line 805 def list() @client.key.list() end |