Modules

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

Module hex_api_package_owner

Function Index

add/5 Adds a packages owner.
delete/3 Deletes a packages owner.
get/3 Gets a packages owner.
list/2 Lists the packages owners.

Function Details

add/5


        add(Config::hex_core:config(), PackageName::binary(), UsernameOrEmail::binary(), Level::binary(), Transfer::boolean()) -> hex_api:response()
        

Adds a packages owner.

Examples:

  > hex_api_package_owner:add(hex_core:default_config(), <<"package">>, <<"user">>, <<"full">>, false).
          {ok, {200, ..., #{
               <<"email">> => <<"user@example.com">>,
               <<"full_name">> => <<"John Doe">>,
               <<"handles">> => #{...},
               <<"inserted_at">> => <<"2014-04-21T17:20:12Z">>,
               <<"level">> => <<"full">>,
               <<"updated_at">> => <<"2019-08-04T19:28:05Z">>,
               <<"url">> => <<"https://hex.pm/api/users/user">>,
               <<"username">> => <<"user">>
               }}}
        

delete/3


        delete(Config::hex_core:config(), PackageName::binary(), UsernameOrEmail::binary()) -> hex_api:response()
        

Deletes a packages owner.

Examples:

  > hex_api_package_owner:delete(hex_core:default_config(), <<"package">>, <<"user">>).
          {ok, {204, ..., nil}}
        

get/3


        get(Config::hex_core:config(), PackageName::binary(), UsernameOrEmail::binary()) -> hex_api:response()
        

Gets a packages owner.

Examples:

  > hex_api_package_owner:get(hex_core:default_config(), <<"package">>, <<"user">>).
          {ok, {200, ..., #{
               <<"email">> => <<"user@example.com">>,
               <<"full_name">> => <<"John Doe">>,
               <<"handles">> => #{...},
               <<"inserted_at">> => <<"2014-04-21T17:20:12Z">>,
               <<"level">> => <<"full">>,
               <<"updated_at">> => <<"2019-08-04T19:28:05Z">>,
               <<"url">> => <<"https://hex.pm/api/users/user">>,
               <<"username">> => <<"user">>
               }}}
        

list/2


        list(Config::hex_core:config(), PackageName::binary()) -> hex_api:response()
        

Lists the packages owners.

Examples:

  > hex_api_package_owner:list(hex_core:default_config(), <<"package">>).
          {ok, {200, ..., [#{
               <<"email">> => <<"user@example.com">>,
               <<"full_name">> => <<"John Doe">>,
               <<"handles">> => #{...},
               <<"inserted_at">> => <<"2014-04-21T17:20:12Z">>,
               <<"level">> => <<"full">>,
               <<"updated_at">> => <<"2019-08-04T19:28:05Z">>,
               <<"url">> => <<"https://hex.pm/api/users/user">>,
               <<"username">> => <<"user">>
               }]}}