diff --git a/src/hex_repo.erl b/src/hex_repo.erl index bf537a7..da9b6df 100644 --- a/src/hex_repo.erl +++ b/src/hex_repo.erl @@ -21,11 +21,11 @@ %% %% ``` %% > hex_repo:get_names(hex_core:default_config()). -%% {ok, {200, ..., -%% [ -%% #{name => <<"package1">>}, -%% #{name => <<"package2">>}, -%% ]}} +%% {ok,{200, ..., +%% #{packages => [ +%% #{name => <<"package1">>}, +%% #{name => <<"package2">>}, +%% ...]}}} %% ''' %% @end get_names(Config) when is_map(Config) -> @@ -42,12 +42,12 @@ get_names(Config) when is_map(Config) -> %% ``` %% > hex_repo:get_versions(Config). %% {ok, {200, ..., -%% [ -%% #{name => <<"package1">>, retired => [], -%% versions => [<<"1.0.0">>]}, -%% #{name => <<"package2">>, retired => [<<"0.5.0>>"], -%% versions => [<<"0.5.0">>, <<"1.0.0">>]}, -%% ]}} +%% #{packages => [ +%% #{name => <<"package1">>, retired => [], +%% versions => [<<"1.0.0">>]}, +%% #{name => <<"package2">>, retired => [<<"0.5.0>>"], +%% versions => [<<"0.5.0">>, <<"1.0.0">>]}, +%% ...]}}} %% ''' %% @end get_versions(Config) when is_map(Config) -> @@ -64,12 +64,13 @@ get_versions(Config) when is_map(Config) -> %% ``` %% > hex_repo:get_package(hex_core:default_config(), <<"package1">>). %% {ok, {200, ..., -%% { -%% #{checksum => ..., version => <<"0.5.0">>, dependencies => []}, -%% #{checksum => ..., version => <<"1.0.0">>, dependencies => [ -%% #{package => <<"package2">>, optional => true, requirement => <<"~> 0.1">>} -%% ]}, -%% ]}} +%% #{name => <<"package1">>, +%% releases => [ +%% #{checksum => ..., version => <<"0.5.0">>, dependencies => []}, +%% #{checksum => ..., version => <<"1.0.0">>, dependencies => [ +%% #{package => <<"package2">>, optional => true, requirement => <<"~> 0.1">>} +%% ]}, +%% ]}}} %% ''' %% @end get_package(Config, Name) when is_binary(Name) and is_map(Config) ->