def get_all_reviews_xml( params: Dict[str, str]) -> List[Tuple[str, Type[Element]]]: xml = get_index_xml(params=params) root = xml.find('INDEX') or xml sources: List[Tuple[str, str]] = [(source.text, REVIEW_SOURCES.get(source.tag, '')) for source in root.iter() if source.tag in REVIEW_SOURCES] return [ (name, parse_xml(get_raw_response_for_source(source=file, params=params))) for (file, name) in sources ] # FIXME: needs more type annotations ?
def make_large_cover_image_url(params: Dict[str, str]) -> Element: return parse_xml(make_request_for_source(source=LARGE_COVER, params=params))
def make_medium_cover_image_url(params: Dict[str, str]) -> Element: return parse_xml( make_request_for_source(source=MEDIUM_COVER, params=params))
def make_small_cover_image_url(params: Dict[str, str]) -> Element: return parse_xml(make_request_for_source(source=SMALL_COVER, params=params))
def get_fiction_xml(params: Dict[str, str]) -> Element: return parse_xml(get_raw_response_for_source(source=FICTION, params=params))
def get_excerpt_xml(params: Dict[str, str]) -> Element: return parse_xml(get_raw_response_for_source(source=EXCERPT, params=params))
def get_av_summary_xml(params: Dict[str, str]) -> Element: return parse_xml( get_raw_response_for_source(source=AV_SUMMARY, params=params))
def get_author_notes_xml(params: Dict[str, str]) -> Element: return parse_xml( get_raw_response_for_source(source=AUTHOR_NOTES, params=params))
def get_index_xml(params: Dict[str, str]) -> Element: return parse_xml(get_raw_response_for_source(source=INDEX, params=params))