JSON and Wish List #57
|
Very nice package! 💯 Is there a way to retrieve all the library details in JSON format? I can convert the .tsv file to JSON, but I was wondering if it is possible to do that directly. Second, is there a way to download the Audible Wish List? |
Replies: 15 comments 72 replies
The Audible server response is JSON. So it is easy to output this data directly!
I can request the wishlist data from the Audible API. However, in order to download a file, it must first be in your own library. |
|
@giovannicoppola |
|
@giovannicoppola I‘ve implement the wishlist in the current development branch. You can use it when you clone it. Or you must wait until I release v0.1.0 to Pypi. |
|
Here you can find the changelog for the development branch! |
|
Ah, you mean using urllib to make a request to |
|
@giovannicoppola To use it this way:
Feel free to report me issues, if you find some, or feature requests. |
|
|
Here is my first attempt for a FlaskServer import logging
import click
from audible import Client
from flask import Flask
from flask.cli import FlaskGroup, ScriptInfo
from flask_restful import Api, Resource, request
logger = logging.getLogger("audible_cli.cmds.cmd_flask")
audible_cli_session = None
audible_cli_client = None
class RESTapp(Resource):
@staticmethod
def get(path=""):
args = request.args
r = audible_cli_client._request("GET", path, params=args)
return r
@staticmethod
def post(path=""):
json_body = request.get_json()
r = audible_cli_client._request("POST", path, json=json_body)
return r
@staticmethod
def put(path=""):
json_body = request.get_json()
r = audible_cli_client._request("PUT", path, json=json_body)
return r
@staticmethod
def delete(path=""):
r = audible_cli_client._request("DELETE", path)
return r
def create_app():
app = Flask(__name__)
api = Api(app)
api.add_resource(RESTapp, '/', '/<path:path>')
return app
@click.group(
"flask-server",
cls=FlaskGroup,
create_app=create_app,
load_dotenv=False
)
@click.pass_context
def cli(ctx):
"""Using Flask to make request to the API"""
# There can only be one `obj` in ctx. FlaskGroup needs his ScriptInfo
# The audible_cli.session obj must be keep for further purposes
global audible_cli_session
global audible_cli_client
audible_cli_session = ctx.obj
audible_cli_client = Client(auth=audible_cli_session.auth)
obj = ScriptInfo(
create_app=create_app,
set_debug_flag=ctx.command.set_debug_flag
)
ctx.obj = objCopy this to file named |
|
got it thanks!
did you mean `-p sort_by:Author`? That raises an `Uncaught Exception`
…On Tue, Mar 8, 2022 at 1:58 PM mkb79 ***@***.***> wrote:
Audible API is non public. So there is no official documentation about
available endpoints, params and message bodys! The Audible app for Windows,
Android or iOS uses them. So all information are obtained via HTTP sniffing!
—
Reply to this email directly, view it on GitHub
<#57 (reply in thread)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABMBYS4HCJ3A54FSLIWHRYTU66PMTANCNFSM5MZNZJKA>
.
Triage notifications on the go with GitHub Mobile for iOS
<https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675>
or Android
<https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
|
You have to use a |
|
Hi @mkb79 I am preparing the documentation and instructions to install |
|
ooh, do you now have a macos standalone? The link seems dead |
|
Hi @mkb79 , I hope you are well! I am back at this project and would like to release a first version of the workflow. I would like to bundle your package with my workflow (in the
but I get the following error: any recommendations? |
|
Hi @giovannicoppola me is fine, I hope you too! The only dependencies in my project which requires |


@giovannicoppola I‘ve implement the wishlist in the current development branch. You can use it when you clone it. Or you must wait until I release v0.1.0 to Pypi.