Codebase list ruby-gitlab / a6c98ec7-e6cb-4782-9fd4-933278cc2bfc/main lib / gitlab / client / keys.rb
a6c98ec7-e6cb-4782-9fd4-933278cc2bfc/main

Tree @a6c98ec7-e6cb-4782-9fd4-933278cc2bfc/main (Download .tar.gz)

keys.rb @a6c98ec7-e6cb-4782-9fd4-933278cc2bfc/mainraw · history · blame

# frozen_string_literal: true

class Gitlab::Client
  # Defines methods related to keys.
  # @see https://docs.gitlab.com/ce/api/keys.html
  module Keys
    # Gets information about a key.
    #
    # @example
    #   Gitlab.key(1)
    #
    # @param  [Integer] id The ID of a key.
    # @return [Gitlab::ObjectifiedHash]
    def key(id)
      get("/keys/#{id}")
    end
  end
end