class Github::Repos

def list_repos(*args)


@github.repos.list_repos(:org => 'org-name')
@github = Github.new
= Examples

List repositories for the specified organisation.

github.repos.list_repos(:user => 'user-name')
github = Github.new
= Examples

List public repositories for the specified user.

@github.repos.list_repos
@github = Github.new { :consumer_key => ... }
= Examples

List repositories for the authenticated user
def list_repos(*args)
  params = args.last.is_a?(Hash) ? args.pop : {}
  _normalize_params_keys(params)
  _merge_user_into_params!(params) unless params.has_key?('user')
  _filter_params_keys(%w[ org user type ], params)
  if (user_name = params.delete("user"))
    get("/users/#{user_name}/repos")
  elsif (org_name = params.delete("org"))
    get("/users/#{org_name}/repos", params)
  else
    # For authenticated user
    get("/user/repos", params)
  end
end