Method: NexusCli::RepositoryActions#get_group_repository

Defined in:
lib/nexus_cli/mixins/repository_actions.rb

#get_group_repository(group_id) ⇒ String

Gets information about the given group repository with the given [group_id].

Parameters:

  • group_id (String)

    the id of the group repository to find

Returns:

  • (String)

    a JSON String of information about the given group repository



99
100
101
102
103
104
105
106
107
108
109
# File 'lib/nexus_cli/mixins/repository_actions.rb', line 99

def get_group_repository(group_id)
  response = nexus.get(nexus_url("service/local/repo_groups/#{sanitize_for_id(group_id)}"), :header => DEFAULT_ACCEPT_HEADER)
  case response.status
  when 200
    return response.content
  when 404
    raise RepositoryNotFoundException
  else
    raise UnexpectedStatusCodeException.new(response.status)
  end
end