Module hex_api_package
Function Index
get/2 | Gets a package. |
search/3 | Searches packages. |
Function Details
get/2
get(Config::hex_core:config(), Name::binary()) -> hex_api:response()
Gets a 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::hex_core:config(), Query::binary(), SearchParams::[binary()]) -> hex_api:response()
Searches packages.
Examples:
> hex_api_package:search(hex_core:default_config(), <<"package">>, []).
{ok, {200, ..., [
#{<<"name">> => <<"package1">>, ...},
...
]}}