Project

class Project(json_data, linked_user: User)

Contains all the data regarding a project.

update_data()

Updates the project’s information.

update_content(from_url: str | None = None, from_document: str | None = None, auto_convert: bool = False)

Updates the project’s content from a URL or document file. Returns true if it was successful.

delete()

Deletes the project.

convert()

Begins the conversion of the project into a snapshot.

get_chapters() List[Chapter]

Gets the project’s chapters.

get_chapter_by_id(chapter_id: str) Chapter

Gets a chapter by its ID.

get_snapshots() List[ProjectSnapshot]

Gets the project’s snapshots (audio versions).

get_snapshot_by_id(project_snapshot_id: str) ProjectSnapshot

Gets a snapshot of the project by ID.

class Chapter(json_data, parent_project: Project)
update_data()

Updates the chapter’s data.

delete()

Deletes the chapter.

convert()

Begins the conversion of the chapter into a snapshot.

get_snapshots() List[ChapterSnapshot]

Gets the chapter’s snapshots (audio versions).

get_snapshot_by_id(chapter_snapshot_id: str) ChapterSnapshot

Gets a snapshot of the chapter by ID.

class ProjectSnapshot(json_data, parent_project: Project)

Bases: _PlayableItem

created_at_unix: str

The UNIX timestamp for when the snapshot was created.

get_audio_bytes() bytes

Retrieves the audio bytes associated with this object. .. note:: The audio will be cached so that it’s not downloaded every time this is called.

Returns:

a bytes object containing the audio in whatever format it was originally uploaded in.

Return type:

bytes

class ChapterSnapshot(json_data, parent_chapter: Chapter)

Bases: _PlayableItem

created_at_unix: str

The UNIX timestamp for when the snapshot was created.

get_audio_bytes() bytes

Retrieves the audio bytes associated with this object. .. note:: The audio will be cached so that it’s not downloaded every time this is called.

Returns:

a bytes object containing the audio in whatever format it was originally uploaded in.

Return type:

bytes