Source code for goodreads_api_client.resources.author

# -*- coding: utf-8 -*-
"""Module containing author resource class."""

from goodreads_api_client.resources.base import Resource


[docs]class Author(Resource): resource_name = 'author'
[docs] def books(self, id_: str): """List books for an author. TODO: Add pagination support """ endpoint = 'author/list/{}'.format(id_) res = self._transport.req(endpoint=endpoint) return res['author']['books']
[docs] def show(self, id_: str): return self._show_single_resource(id_)