ao3_sync.api.resources.WorksApi
API for handling AO3 works
Parameters:
Name | Type | Description | Default |
---|---|---|---|
client |
AO3ApiClient
|
AO3ApiClient instance |
required |
Attributes:
Name | Type | Description |
---|---|---|
URL_PATH |
str
|
URL path for works |
download(work_id, download_url)
Downloads the work download files for the given work.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
work_id |
str
|
Work ID to download |
required |
download_url |
str
|
URL of the work download file |
required |
fetch_download_links(work_id, formats=DEFAULT_DOWNLOAD_FORMATS)
Fetches the download links for the given work.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
work_id |
str
|
Work ID to fetch download links for |
required |
formats |
list[DownloadFormat]
|
Formats to download. Defaults to DEFAULT_DOWNLOAD_FORMATS |
DEFAULT_DOWNLOAD_FORMATS
|
Returns:
Name | Type | Description |
---|---|---|
download_links |
list[str]
|
List of download links |
sync(work_id, formats=DEFAULT_DOWNLOAD_FORMATS)
Syncs a work from AO3.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
work_id |
str
|
Work ID to sync |
required |
formats |
list[DownloadFormat]
|
Formats to download. Defaults to DEFAULT_DOWNLOAD_FORMATS |
DEFAULT_DOWNLOAD_FORMATS
|