-
Added
bundles_createthat takes a config file and installs a bundle. -
The
role_revokefunction now takes a%Role{}, and a%Group{}instead of names. It returns a%Group{}with the associated roles as an attribute. The originalrole_revokecan still be used for users. -
The
role_grantfunction now takes a%Role{}, and a%Group{}instead of names. It returns a%Group{}with the associated roles as an attribute. The originalrole_grantcan still be used for users. -
The
bundle_status,bundle_enableandbundle_disablefunctions were removed. All calls should now go throughbundle_updateand pass theenabled:astrueorfalse. This command returns{:ok, %Bundle}. -
The
users_indexnow returns{:ok, [%User{}]}on success -
The
users_createnow returns{:ok, %User{}}on success -
The
bundle_indexnow returns{:ok, [%Bundle{}]}on success -
The
groups_indexnow returns a list of%Group{}structs instead of a map. -
The
permission_createnow takes a single parameter ofname. This will be used as the name of the command and a defaultsitenamespace. The fake server will accept a:separating the namespace and the command name. -
The
permission_indexnow returns a%Permissionstruct instead of a bare map. -
role_updatenow returns{:ok, %CogApi.Resources.Role{}}on success. -
Moved old functionality to
CogApi.HTTP.Old. Code will stay there until it is tested and has a Fake implementation. -
CogApi.Clientwas introduced as an behavior forCogApi.HTTP.ClientandCogApi.Fake.Clientto conform to. -
params passed to
role_createmust have atoms as keys. -
CogApi.HTTPClientwas renamed toCogApi.HTTP.Client. -
CogApi.HTTP.Client.authenticate/1 will now return a specific error message if the username/password is incorrect. Previously, it returned
{:error, "An instance of cog must be running"}. Now it returns{:error, "Invalid username/password"}. -
CogApi.HTTP.Client.authenticate/1 no longer nests the "error" message. It now returns tuple of
{:error, "Error message here"}instead of{:error, %{"error" => "Error message here"}. -
role_createnow returns{:ok, %CogApi.Resources.Role{}}on success. -
role_indexnow returns{:ok, [%CogApi.Resources.Role{}]}on success. -
The struct for
:proto, :host, :port, :version, :token, :username, :passwordas renamed toCogApi.Endpoint. -
Created a
CogApi.Fake.Clientfor use in test environments. -
Moved top level api client from
CogApitoCogApi.HTTPClient.