Thinkific.Api.Groups (Thinkific API SDK v0.1.3)

API calls for all endpoints tagged Groups.

Link to this section Summary

Functions

createGroup Creates a group

getGroup Retrieves a specific group

getGroupAnalysts Retrieves a list of group analysts

getGroups Retrieves a list of groups

postGroupAnalysts Assign Group Analysts to a group. Users need to be assigned the Group Analyst (group_analyst) role.

removeAnalystFromGroup Remove an analyst from a group

Link to this section Functions

Link to this function

create_group(connection, opts \\ [])

Specs

create_group(Tesla.Env.client(), keyword()) ::
  {:ok, Thinkific.Model.GroupResponse.t()} | {:error, Tesla.Env.t()}

createGroup Creates a group

Parameters

  • connection (Thinkific.Connection): Connection to server
  • opts (KeywordList): [optional] Optional parameters
    • :body (GroupRequest): Group

Returns

} on success {:error, info} on failure

Link to this function

get_group(connection, id, opts \\ [])

Specs

get_group(Tesla.Env.client(), float(), keyword()) ::
  {:ok, Thinkific.Model.GroupResponse.t()} | {:error, Tesla.Env.t()}

getGroup Retrieves a specific group

Parameters

  • connection (Thinkific.Connection): Connection to server
  • id (float()): The ID of the Group to fetch.
  • opts (KeywordList): [optional] Optional parameters

Returns

} on success {:error, info} on failure

Link to this function

get_group_analysts(connection, group_id, opts \\ [])

Specs

get_group_analysts(Tesla.Env.client(), float(), keyword()) ::
  {:ok, Thinkific.Model.GetGroupAnalystsResponse.t()} | {:error, Tesla.Env.t()}

getGroupAnalysts Retrieves a list of group analysts

Parameters

  • connection (Thinkific.Connection): Connection to server
  • group_id (float()): ID of the Group in the form of an integer.
  • opts (KeywordList): [optional] Optional parameters

Returns

} on success {:error, info} on failure

Link to this function

get_groups(connection, opts \\ [])

Specs

get_groups(Tesla.Env.client(), keyword()) ::
  {:ok, Thinkific.Model.GetGroupsResponse.t()} | {:error, Tesla.Env.t()}

getGroups Retrieves a list of groups

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

} on success {:error, info} on failure

Link to this function

post_group_analysts(connection, group_id, opts \\ [])

Specs

post_group_analysts(Tesla.Env.client(), float(), keyword()) ::
  {:ok, nil} | {:error, Tesla.Env.t()}

postGroupAnalysts Assign Group Analysts to a group. Users need to be assigned the Group Analyst (group_analyst) role.

Parameters

  • connection (Thinkific.Connection): Connection to server
  • group_id (float()): ID of the Group in the form of an integer.
  • opts (KeywordList): [optional] Optional parameters
    • :body (GroupAddAnalystRequest): Group Analyst

Returns

} on success {:error, info} on failure

Link to this function

remove_analyst_from_group(connection, group_id, user_id, opts \\ [])

Specs

remove_analyst_from_group(Tesla.Env.client(), float(), float(), keyword()) ::
  {:ok, nil} | {:error, Tesla.Env.t()}

removeAnalystFromGroup Remove an analyst from a group

Parameters

  • connection (Thinkific.Connection): Connection to server
  • group_id (float()): ID of the Group in the form of an integer.
  • user_id (float()): ID of the User in the form of an integer.
  • opts (KeywordList): [optional] Optional parameters

Returns

} on success {:error, info} on failure