fluminus v2.2.1 Fluminus.API.Module View Source
Provides an abstraction over a module in LumiNUS, and operations possible on the module using LumiNUS API.
Struct fields:
:id
- id of the module in the LumiNUS API:code
- code of the module, e.g."CS1101S"
:name
- name of the module, e.g."Programming Methodology"
:teaching?
-true
if the user is teaching the module,false
if the user is taking the module:term
- a string identifier used by the LumiNUS API to uniquely identify a term (semester), e.g."1820"
is invalid
Link to this section Summary
Functions
Returns a list of announcements for a given module.
Creates Elixir.Fluminus.API.Module
struct from LumiNUS API response.
Get all the lesson plans associated with this Module.
Get all the weblectures associated with this Module.
Link to this section Types
Specs
Link to this section Functions
Specs
announcements(t(), Fluminus.Authorization.t(), bool()) :: {:ok, [%{title: String.t(), description: String.t(), datetime: DateTime.t()}]} | {:error, any()}
Returns a list of announcements for a given module.
The LumiNUS API provides 2 separate endpoints for archived and non-archived announcements. By default, announcements are archived after roughly 16 weeks (hence, the end of the semester) so most of the times, we should never need to access archived announcements.
Specs
external_multimedias(t(), Fluminus.Authorization.t()) :: {:ok, [Fluminus.API.Module.ExternalMultimedia.t()]} | {:error, any()}
Specs
Creates Elixir.Fluminus.API.Module
struct from LumiNUS API response.
Specs
lessons(t(), Fluminus.Authorization.t()) :: {:ok, [Fluminus.API.Module.Lesson.t()]} | {:error, any()}
Get all the lesson plans associated with this Module.
Specs
multimedias(t(), Fluminus.Authorization.t()) :: {:ok, [Fluminus.API.File.t()]} | {:error, any()}
Specs
weblectures(t(), Fluminus.Authorization.t()) :: {:ok, [String.t()]} | {:error, any()}
Get all the weblectures associated with this Module.