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 Sourcedelete(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 Sourcedelete(ExClubhouse.Session.t(), integer()) :: :ok | {:error, ExClubhouse.Error.t()}
Link to this function
get(file_public_id)
View Sourceget(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 Sourceget(ExClubhouse.Session.t(), integer()) :: {:ok, ExClubhouse.Model.File.t() | nil} | {:error, ExClubhouse.Error.t()}
Link to this function
list()
View Sourcelist() :: {:error, ExClubhouse.Error.t()} | {:ok, [ExClubhouse.Model.File.t()]}
Lists all files
Example
iex> ExClubhouse.Api.File.list()
{:ok, [%ExClubhouse.Model.File{...}, ...]}
Link to this function
list(sess)
View Sourcelist(ExClubhouse.Session.t()) :: {:ok, [ExClubhouse.Model.File.t()]} | {:error, ExClubhouse.Error.t()}
Link to this function
update(file_public_id, file_input)
View Sourceupdate(integer(), ExClubhouse.Model.Input.File.t()) :: {:error, ExClubhouse.Error.t()} | {:ok, ExClubhouse.Model.File.t()}
Update a file
Example
iex> ExClubhouse.Api.File.update(1, ExClubhouse.Model.Input.File{...})
{:ok, %ExClubhouse.Model.File{...}}
Link to this function
update(session, file_public_id, file_input)
View Sourceupdate(ExClubhouse.Session.t(), integer(), ExClubhouse.Model.Input.File.t()) :: {:ok, ExClubhouse.Model.File.t()} | {:error, ExClubhouse.Error.t()}