Module hex_api_package
Function Index
get/2 | Gets package. |
search/3 | Searches packages. |
Function Details
get/2
get(Config, Name) -> any()
Gets package.
Examples:
> hex_api_package:get(hex_core:default_config(), <<"package">>).
{ok, {200, ..., #{
<<"name">> => <<"package1">>,
<<"meta">> => #{
<<"description">> => ...,
<<"licenses">> => ...,
<<"links">> => ...,
<<"maintainers">> => ...
},
...,
<<"releases">> => [
#{<<"url">> => ..., <<"version">> => <<"0.5.0">>}],
#{<<"url">> => ..., <<"version">> => <<"1.0.0">>}],
...
]}}}
search/3
search(Config, Query, SearchParams) -> any()
Searches packages.
Examples:
> hex_api_package:search(hex_core:default_config(), <<"package">>, []).
{ok, {200, ..., [
#{<<"name">> => <<"package1">>, ...},
...
]}}