Skip to content

Commit

Permalink
Update docs
Browse files Browse the repository at this point in the history
  • Loading branch information
wojtekmach committed Oct 7, 2024
1 parent 39d77f0 commit affc3f7
Showing 1 changed file with 18 additions and 17 deletions.
35 changes: 18 additions & 17 deletions src/hex_repo.erl
Original file line number Diff line number Diff line change
Expand Up @@ -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) ->
Expand All @@ -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) ->
Expand All @@ -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) ->
Expand Down

0 comments on commit affc3f7

Please sign in to comment.