Codebase list ruby-gitlab / run/f1200725-3f95-4c50-86ee-36095969cb72/main lib / gitlab / client / keys.rb
run/f1200725-3f95-4c50-86ee-36095969cb72/main

Tree @run/f1200725-3f95-4c50-86ee-36095969cb72/main (Download .tar.gz)

keys.rb @run/f1200725-3f95-4c50-86ee-36095969cb72/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