# 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.GroupAnalysts do @moduledoc """ API calls for all endpoints tagged `GroupAnalysts`. """ alias Thinkific.Connection import Thinkific.RequestBuilder @doc """ addGroupToAnalyst Assign Group Analyst to groups. User need to be assigned the Group Analyst (group_analyst) role. ## Parameters - connection (Thinkific.Connection): Connection to server - user_id (float()): ID of the User in the form of an integer. - opts (KeywordList): [optional] Optional parameters - :body (GroupAnalystsAddGroupRequest): Group Analyst ## Returns {:ok, %{}} on success {:error, info} on failure """ @spec add_group_to_analyst(Tesla.Env.client, float(), keyword()) :: {:ok, nil} | {:error, Tesla.Env.t} def add_group_to_analyst(connection, user_id, opts \\ []) do optional_params = %{ :"body" => :body } %{} |> method(:post) |> url("/group_analysts/#{user_id}/groups") |> add_optional_params(optional_params, opts) |> Enum.into([]) |> (&Connection.request(connection, &1)).() |> decode(false) end @doc """ removeGroupFromAnalyst Remove an analyst from a group ## Parameters - connection (Thinkific.Connection): Connection to server - user_id (float()): ID of the User in the form of an integer. - group_id (float()): ID of the Group in the form of an integer. - opts (KeywordList): [optional] Optional parameters ## Returns {:ok, %{}} on success {:error, info} on failure """ @spec remove_group_from_analyst(Tesla.Env.client, float(), float(), keyword()) :: {:ok, nil} | {:error, Tesla.Env.t} def remove_group_from_analyst(connection, user_id, group_id, _opts \\ []) do %{} |> method(:delete) |> url("/group_analysts/#{user_id}/groups/#{group_id}") |> Enum.into([]) |> (&Connection.request(connection, &1)).() |> decode(false) end end