Current section

Files

Jump to
thinkific_admin_api lib thinkific_admin_api api contents.ex
Raw

lib/thinkific_admin_api/api/contents.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 ThinkificAdminAPI.Api.Contents do
@moduledoc """
API calls for all endpoints tagged `Contents`.
"""
alias ThinkificAdminAPI.Connection
import ThinkificAdminAPI.RequestBuilder
@doc """
getContentByID
Retrieves a Content
## Parameters
- connection (ThinkificAdminAPI.Connection): Connection to server
- id (float()): ID of the Content in the form of an integer
- opts (KeywordList): [optional] Optional parameters
## Returns
{:ok, %ThinkificAdminAPI.Model.ContentResponse{}} on success
{:error, info} on failure
"""
@spec get_content_by_id(Tesla.Env.client, float(), keyword()) :: {:ok, ThinkificAdminAPI.Model.ContentResponse.t} | {:error, Tesla.Env.t}
def get_content_by_id(connection, id, _opts \\ []) do
%{}
|> method(:get)
|> url("/contents/#{id}")
|> Enum.into([])
|> (&Connection.request(connection, &1)).()
|> decode(%ThinkificAdminAPI.Model.ContentResponse{})
end
end