Module: Gitlab::Client::Keys

Included in:
Gitlab::Client
Defined in:
lib/gitlab/client/keys.rb

Overview

Defines methods related to keys.

Instance Method Summary collapse

Instance Method Details

#key(id) ⇒ Gitlab::ObjectifiedHash

Gets information about a key.

Examples:

Gitlab.key(1)

Parameters:

  • id (Integer)

    The ID of a key.

Returns:



14
15
16
# File 'lib/gitlab/client/keys.rb', line 14

def key(id)
  get("/keys/#{id}")
end

#key_by_fingerprint(fingerprint) ⇒ Gitlab::ObjectifiedHash

Gets information about a key by key fingerprint.

Examples:

Gitlab.key_by_fingerprint("9f:70:33:b3:50:4d:9a:a3:ef:ea:13:9b:87:0f:7f:7e")

Parameters:

  • fingerprint (String)

    The Fingerprint of a key.

Returns:



25
26
27
# File 'lib/gitlab/client/keys.rb', line 25

def key_by_fingerprint(fingerprint)
  get('/keys', query: { fingerprint: fingerprint })
end