getMaterial abstract method

Future<MaterialDto> getMaterial(
  1. MaterialRefDto material
)

Fetches download information for a specific course material.

Returns the direct download URL and optional referer header required to download the material file.

The material should be obtained from getMaterials.

The download process varies by material type:

  • Standard files: Direct download URL
  • PDFs: Requires a referer URL for access
  • Course recordings: Returns iStream URL with streamable: true

When the returned MaterialDto has a non-null referer field, it must be included as the Referer header when downloading the file.

Throws an Exception if the material cannot be accessed or parsed.

Implementation

Future<MaterialDto> getMaterial(MaterialRefDto material);