| get_names/1 | Gets names resource from the repository. |
| get_package/2 | Gets package resource from the repository. |
| get_tarball/3 | Gets tarball from the repository. |
| get_versions/1 | Gets versions resource from the repository. |
get_names(Config) -> any()
Gets names resource from the repository.
Examples:
> r3_hex_repo:get_names(r3_hex_core:default_config()).
{ok, {200, ...,
[
#{name => <<"package1">>},
#{name => <<"package2">>},
]}}
get_package(Config, Name) -> any()
Gets package resource from the repository.
Examples:
> r3_hex_repo:get_package(r3_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">>}
]},
]}}
get_tarball(Config, Name, Version) -> any()
Gets tarball from the repository.
Examples:
> {ok, {200, _, Tarball}} = r3_hex_repo:get_tarball(r3_hex_core:default_config(), <<"package1">>, <<"1.0.0">>),
> {ok, #{metadata := Metadata}} = r3_hex_tarball:unpack(Tarball, memory).
get_versions(Config) -> any()
Gets versions resource from the repository.
Examples:
> r3_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">>]},
]}}
Generated by EDoc