This module provides functions for listing and retrieving role permission resources in the Humaans API. Role permissions are read-only via the API.
Summary
Types
@type list_response() :: {:ok, [ %Humaans.Resources.RolePermission{ id: term(), name: term(), role_id: term() } ]} | {:error, Humaans.Error.t()}
@type response() :: {:ok, %Humaans.Resources.RolePermission{id: term(), name: term(), role_id: term()}} | {:error, Humaans.Error.t()}
Functions
@spec list(client :: map(), params :: map() | keyword() | [{String.t(), term()}]) :: {:ok, [Humaans.Resources.RolePermission.t()]} | {:error, Humaans.Error.t()}
Lists all role_permissions.
Returns a list of role_permissions matching the optional filter params.
Parameters
client- Client created withHumaans.new/1params- Optional map of filter parameters (default:%{})
Examples
client = Humaans.new(access_token: "your_access_token")
{:ok, role_permissions} = Humaans.RolePermissions.list(client)
{:ok, role_permissions} = Humaans.RolePermissions.list(client, %{})
@spec retrieve(client :: map(), id :: String.t()) :: {:ok, Humaans.Resources.RolePermission.t()} | {:error, Humaans.Error.t()}
Retrieves a specific role_permission by ID.
Parameters
client- Client created withHumaans.new/1id- String ID of the role_permission to retrieve
Examples
client = Humaans.new(access_token: "your_access_token")
{:ok, role_permission} = Humaans.RolePermissions.retrieve(client, "role_permission_id")