Sync API Reference

BlackboardSync

Blackboard Sync

Download your Blackboard Learn content automatically.

class blackboard_sync.sync.BlackboardSync[source]

Represents an instance of the BlackboardSync application.

Create an instance of the program.

_sync_task() None[source]

Constantly check if data is outdated and if so start download.

Method run by Sync thread.

auth(cookies: RequestsCookieJar) bool[source]

Create a new Blackboard session with the given cookies.

download() datetime | None[source]
property download_location: Path | None

Location to where all the content will be downloaded.

force_sync() None[source]

Force Sync thread to start download job ASAP.

property has_error: bool

Flag indicates an error resulting in no downloads.

property is_active: bool

Indicate the state of the sync thread.

property is_logged_in: bool

Indicate if a user session is currently active.

property is_syncing: bool

Flag raised everytime a download job is running.

property last_sync_time: datetime | None

Datetime right before last download job started.

log_out() None[source]

Stop syncing and forget user session.

property min_year: int | None
property next_sync: datetime | None

Time when last sync will be outdated.

property outdated: bool

Return true if last download job is outdated.

redownload() None[source]
schedule_next_sync(start_time: datetime | None) None[source]
setup(university_index: int, download_location: Path, min_year: int | None = None) None[source]

Setup the university information.

start_sync() bool[source]

Starts Sync thread or returns False if not possible.

stop_sync() None[source]

Stop Sync thread.

property sync_interval: int

Time to wait between download jobs.

property university_index: int | None
property username: str | None

BlackboardDownload

BlackboardDownload, mass download all user content from Blackboard

class blackboard_sync.download.BlackboardDownload(sess: BlackboardExtended, download_location: Path, last_downloaded: datetime | None = None, min_year: int | None = None)[source]

Blackboard download job.

BlackboardDownload constructor

Download all files in blackboard recursively to download_location, only if they have been altered since specified datetime

Keyword arguments:

Parameters:
  • sess (BlackboardExtended) – UCLan BB user session

  • download_location ((str / Path)) – Where files will be stored

  • last_downloaded (str) – Files modified before are ignored

  • min_year – Courses created before are ignored

cancel() None[source]

Cancel the download job.

download() datetime | None[source]

Retrieve the user’s courses, and start download of all contents

Returns:

Datetime when method was called.

property download_location: Path

The location where files will be downloaded to.

property user_id: str

User ID used for API calls.