fluminus v2.0.1 Fluminus.API.Module.Weblecture View Source

Provides an abstraction over a weblecture in LumiNUS, and operations possible on them using LumiNUS API.

Struct fields:

  • :id - id of the weblecture
  • :name - name of the weblecture
  • :module_id - the module_id to which the weblecture is from.

Link to this section Summary

Functions

Downloads the given weblecture to the location specified by path.

Creates Elixir.Fluminus.API.Module.Weblecture struct from LumiNUS API response.

Obtains the download url for a given weblecture.

Link to this section Types

Link to this type

t()

View Source
t() :: %Fluminus.API.Module.Weblecture{
  id: String.t(),
  module_id: String.t(),
  name: String.t()
}

Link to this section Functions

Link to this function

download(weblecture, auth, path, verbose)

View Source
download(
  Fluminus.API.Module.Weblecture.t(),
  Fluminus.Authorization.t(),
  Path.t(),
  bool()
) :: :ok | {:error, :exists | any()}

Downloads the given weblecture to the location specified by path.

This function will return {:error, :exists} if the file already exists in the given path

Creates Elixir.Fluminus.API.Module.Weblecture struct from LumiNUS API response.

Link to this function

get_download_url(weblecture, auth)

View Source
get_download_url(Fluminus.API.Module.Weblecture.t(), Fluminus.Authorization.t()) ::
  {:ok, String.t()} | {:error, any()}

Obtains the download url for a given weblecture.