ExClubhouse v0.5.1 ExClubhouse.Api.File View Source

File api

Link to this section Summary

Link to this section Functions

Link to this function

delete(file_public_id)

View Source
delete(integer()) :: :ok | {:error, ExClubhouse.Error.t()}

Delete a file

## Example

iex> ExClubhouse.Api.File.delete(1)
:ok
Link to this function

delete(session, file_public_id)

View Source
delete(ExClubhouse.Session.t(), integer()) ::
  :ok | {:error, ExClubhouse.Error.t()}
Link to this function

get(file_public_id)

View Source
get(integer()) ::
  {:error, ExClubhouse.Error.t()} | {:ok, nil | ExClubhouse.Model.File.t()}

Get a single file by id

Example

iex> ExClubhouse.Api.File.get(1)
{:ok, %ExClubhouse.Model.File{...}}
Link to this function

get(session, file_public_id)

View Source

Lists all files

Example

iex> ExClubhouse.Api.File.list()
{:ok, [%ExClubhouse.Model.File{...}, ...]}

Update a file

Example

iex> ExClubhouse.Api.File.update(1, ExClubhouse.Model.Input.File{...})
{:ok, %ExClubhouse.Model.File{...}}