mediahandler.types.audiobooks¶
Module: mediahandler.types.audiobooks
Module contains:
- mediahandler.types.audiobooks.MHAudiobook
Child class of MHMediaType for the audiobooks media type.
- mediahandler.types.audiobooks.get_book_info()
Makes API request to Google Books and returns results.
- class mediahandler.types.audiobooks.MHAudiobook(settings, push)¶
Bases: mediahandler.MHObject
Child class of MHObject for the audiobooks media type.
- Required arguments:
- settings
Dict or MHSettings object.
- push
MHPush object.
- Public method:
- mediahandler.types.audiobooks.MHAudiobook.add()
Main wrapper function for adding audiobook files. Processes calls to the Google Books API and ABC chaptering tool.
- class MHSettings(adict)¶
Bases: object
Object which serves as a simple structure for storing data as attributes.
- MHAudiobook.add(raw)¶
Main wrapper function for adding audiobook files. Processes calls to the Google Books API and ABC chaptering tool.
- Required arguments:
- raw
Valid path to audiobook files to be processed.
- MHAudiobook.set_book_info(query)¶
A wrapper function for calling get_book_info().
Converts resulting dict into object members.
- MHAudiobook.set_settings(adict)¶
Iteratively converts a dict into MHSettings objects and subsequently into object attributes.
- mediahandler.types.audiobooks.get_book_info(api_key, query)¶
Makes API request to Google Books.
- Required arguments:
- api_key
String. A valid Google API public access key.
- query
String. Search string to submit to Google.