Method: Github::Client::Repos::Keys#list

Defined in:
lib/github_api/client/repos/keys.rb

#list(*args) ⇒ Object Also known as: all

List deploy keys

Examples:

github = Github.new
github.repos.keys.list 'user-name', 'repo-name'
github.repos.keys.list 'user-name', 'repo-name' { |key| ... }
keys = Github::Repos::Keys.new user: 'user-name', repo: 'repo-name'
keys.list

Parameters:

  • :user (String)
  • String (String :repo)

    :repo

See Also:



24
25
26
27
28
29
30
31
# File 'lib/github_api/client/repos/keys.rb', line 24

def list(*args)
  arguments(args, required: [:user, :repo])

  response = get_request("/repos/#{arguments.user}/#{arguments.repo}/keys",
                         arguments.params)
  return response unless block_given?
  response.each { |el| yield el }
end