module Gitlab::Client::Keys

Defines methods related to keys. @see docs.gitlab.com/ce/api/keys.html

Public Instance Methods

key(id) click to toggle source

Gets information about a key.

@example

Gitlab.key(1)

@param [Integer] id The ID of a key. @return [Gitlab::ObjectifiedHash]

# File lib/gitlab/client/keys.rb, line 14
def key(id)
  get("/keys/#{id}")
end
key_by_fingerprint(fingerprint) click to toggle source

Gets information about a key by key fingerprint.

@example

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

@param [String] fingerprint The Fingerprint of a key. @return [Gitlab::ObjectifiedHash]

# File lib/gitlab/client/keys.rb, line 25
def key_by_fingerprint(fingerprint)
  get('/keys', query: { fingerprint: fingerprint })
end