Current section
Files
Jump to
Current section
Files
lib/thinkific/api/custom_profile_field_definitions.ex
# NOTE: This class is auto generated by the swagger code generator program.
# https://github.com/swagger-api/swagger-codegen.git
# Do not edit the class manually.
defmodule Thinkific.Api.CustomProfileFieldDefinitions do
@moduledoc """
API calls for all endpoints tagged `CustomProfileFieldDefinitions`.
"""
alias Thinkific.Connection
import Thinkific.RequestBuilder
@doc """
getCustomProfileFields
Retrieve a list of Custom Profile Field Definitions
## Parameters
- connection (Thinkific.Connection): Connection to server
- opts (KeywordList): [optional] Optional parameters
- :page (float()): The page within the collection to fetch.
- :limit (float()): The number of items to be returned.
## Returns
{:ok, %Thinkific.Model.GetCustomProfileFieldDefinitions{}} on success
{:error, info} on failure
"""
@spec get_custom_profile_fields(Tesla.Env.client, keyword()) :: {:ok, Thinkific.Model.GetCustomProfileFieldDefinitions.t} | {:error, Tesla.Env.t}
def get_custom_profile_fields(connection, opts \\ []) do
optional_params = %{
:"page" => :query,
:"limit" => :query
}
%{}
|> method(:get)
|> url("/custom_profile_field_definitions")
|> add_optional_params(optional_params, opts)
|> Enum.into([])
|> (&Connection.request(connection, &1)).()
|> decode(%Thinkific.Model.GetCustomProfileFieldDefinitions{})
end
end