Modules

hex_api hex_api_key hex_api_package hex_api_package_owner hex_api_release hex_api_user hex_core hex_http hex_http_httpc hex_pb_names hex_pb_package hex_pb_signed hex_pb_versions hex_registry hex_repo hex_tarball safe_erl_term

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">>, ...},
      ...
  ]}}