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

API calls for all endpoints tagged Categories.

Link to this section Summary

Functions

crateCollection Creates a new Category

deleteCollectionByID Deletes the Category identified by the provided id

GetCollectionbyID Retrieves a Collection

getCollections Retrieves a list of Collections NOTE: This endpoint will be renamed to /categories in future API versions.

getProductsbyID Retrieves Products within the Category identified by the provided id

updateCollectioByID Updates the Category identified by the provided id

Link to this section Functions

Link to this function

crate_collection(connection, opts \\ [])

Specs

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

crateCollection Creates a new Category

Parameters

  • connection (Thinkific.Connection): Connection to server
  • opts (KeywordList): [optional] Optional parameters
    • :body (CollectionRequest): New collections attributes

Returns

} on success {:error, info} on failure

Link to this function

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

Specs

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

deleteCollectionByID Deletes the Category identified by the provided id

Parameters

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

Returns

} on success {:error, info} on failure

Link to this function

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

Specs

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

GetCollectionbyID Retrieves a Collection

Parameters

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

Returns

} on success {:error, info} on failure

Link to this function

get_collections(connection, opts \\ [])

Specs

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

getCollections Retrieves a list of Collections NOTE: This endpoint will be renamed to /categories in future API versions.

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

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

Specs

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

getProductsbyID Retrieves Products within the Category identified by the provided id

Parameters

  • connection (Thinkific.Connection): Connection to server
  • id (float()): ID of the Chapter in the form of an integer
  • 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

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

Specs

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

updateCollectioByID Updates the Category identified by the provided id

Parameters

  • connection (Thinkific.Connection): Connection to server
  • id (float()): ID of the Category in the form of an integer
  • opts (KeywordList): [optional] Optional parameters
    • :body (CollectionRequest): Collections attributes

Returns

} on success {:error, info} on failure