mirror of
https://github.com/mkb79/audible-cli.git
synced 2025-06-28 09:14:02 -04:00
# Added - `--aax-fallback` option to `download` command to download books in aax format and fallback to aaxc, if the book is not available as aax - `--annotation` option to `download` command to get bookmarks and notes - `questionary` package to dependencies - `add` and `remove` subcommands to wishlist - `full_response_callback` to `utils` - `export_to_csv` to `utils` - `run_async` to `decorators` - `pass_client` to `decorators` - `profile_option` to `decorators` - `password_option` to `decorators` - `timeout_option` to `decorators` - `bunch_size_option` to `decorators` - `ConfigFile.get_profile_option` get the value for an option for a given profile - `Session.selected.profile` to get the profile name for the current session - `Session.get_auth_for_profile` to get an auth file for a given profile - `models.BaseItem.create_base_filename` to build a filename in given mode - `models.LibraryItem.get_annotations` to get annotations for a library item # Changed - bump `audible` to v0.8.2 to fix a bug in httpx - rework plugin examples in `plugin_cmds` - rename `config.Config` to `config.ConfigFile` - move `click_verbosity_logger` from `_logging` to `decorators` and rename it to `verbosity_option` - move `wrap_async` from `utils` to `decorators` - move `add_param_to_session` from `config` to `decorators` - move `pass_session` from `config` to `decorators` - `download` command let you now select items when using `--title` option # Fixed - the `library export` and `wishlist export` command will now export to `csv` correctly
21 lines
522 B
Python
21 lines
522 B
Python
import click
|
|
|
|
from audible.exceptions import NotFoundError
|
|
from audible_cli.decorators import pass_client
|
|
|
|
|
|
@click.command("get-annotations")
|
|
@click.argument("asin")
|
|
@pass_client
|
|
async def cli(client, asin):
|
|
url = f"https://cde-ta-g7g.amazon.com/FionaCDEServiceEngine/sidecar"
|
|
params = {
|
|
"type": "AUDI",
|
|
"key": asin
|
|
}
|
|
try:
|
|
r = await client.get(url, params=params)
|
|
except NotFoundError:
|
|
click.echo(f"No annotations found for asin {asin}")
|
|
else:
|
|
click.echo(r)
|