Humaans.PerformanceTemplates (Humaans v0.6.0)

Copy Markdown View Source

This module provides functions for listing and retrieving performance template resources in the Humaans API. Performance templates are read-only via the API.

Summary

Functions

Lists all performance_templates.

Retrieves a specific performance_template by ID.

Types

list_response()

@type list_response() ::
  {:ok,
   [
     %Humaans.Resources.PerformanceTemplate{
       company_id: term(),
       created_at: term(),
       id: term(),
       name: term(),
       updated_at: term()
     }
   ]}
  | {:error, Humaans.Error.t()}

response()

@type response() ::
  {:ok,
   %Humaans.Resources.PerformanceTemplate{
     company_id: term(),
     created_at: term(),
     id: term(),
     name: term(),
     updated_at: term()
   }}
  | {:error, Humaans.Error.t()}

Functions

list(client, params \\ %{})

@spec list(client :: map(), params :: map() | keyword() | [{String.t(), term()}]) ::
  {:ok, [Humaans.Resources.PerformanceTemplate.t()]}
  | {:error, Humaans.Error.t()}

Lists all performance_templates.

Returns a list of performance_templates matching the optional filter params.

Parameters

  • client - Client created with Humaans.new/1
  • params - Optional map of filter parameters (default: %{})

Examples

client = Humaans.new(access_token: "your_access_token")
{:ok, performance_templates} = Humaans.PerformanceTemplates.list(client)
{:ok, performance_templates} = Humaans.PerformanceTemplates.list(client, %{})

retrieve(client, id)

@spec retrieve(client :: map(), id :: String.t()) ::
  {:ok, Humaans.Resources.PerformanceTemplate.t()} | {:error, Humaans.Error.t()}

Retrieves a specific performance_template by ID.

Parameters

  • client - Client created with Humaans.new/1
  • id - String ID of the performance_template to retrieve

Examples

client = Humaans.new(access_token: "your_access_token")
{:ok, performance_template} = Humaans.PerformanceTemplates.retrieve(client, "performance_template_id")