Fluminus.API.Module.Weblecture (fluminus v2.2.9) 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

Specs

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

Specs

download(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

Specs

from_api(api_response :: any(), Fluminus.API.Module.t()) :: t()

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

Link to this function

get_download_url(weblecture, auth)

View Source

Specs

get_download_url(t(), Fluminus.Authorization.t()) ::
  {:ok, String.t()} | {:error, any()}

Obtains the download url for a given weblecture.