Constructor
# new ModuleService(cookie)
Creates an instance of ModuleService.
Parameters:
Name | Type | Description |
---|---|---|
cookie |
string
|
The cookie value. |
Methods
# async getModule(codeModule, codeInstance) → {Promise.<Item>}
Retrieve the module informations.
Parameters:
Name | Type | Description |
---|---|---|
codeModule |
string
|
The module code. |
codeInstance |
string
|
The module instance code. |
If an error occurs during the API request.
If the module is not found.
If the module is not a student module.
Error
A promise that resolves to the module informations.
Promise.<Item>
# async getStudentModulesForCurrentYear() → {Promise.<Array.<Item>>}
Retrieves the student modules for the current academic year.
If an error occurs during the API request.
Error
A promise that resolves to an array of student modules.
Promise.<Array.<Item>>