NAME

Astro::ADS::Role::ResultMapper - Maps the JSON structure returned from an ADS search query to an Astro::ADS::Result object

VERSION

version 1.92

SYNOPSIS

use Moo;
extends 'Astro::ADS';
with 'Astro::ADS::Role::ResultMapper';

...
return $self->parse_response( $json );

DESCRIPTION

parse_response

Takes the Mojo Response JSON and maps it to the Result object parameters, returning a Result object with Papers in the docs attribute.

parse_qtree_response

Takes the Mojo Response and maps it to the QTree object parameters, allocating the JSON fields to attributes and the content to the asset attribute to allow use of the Mojo::Asset::move_to function.

This interface is subject to change up to v2.0 to discover the best way to use the returned value.

COPYRIGHT AND LICENSE

This software is Copyright (c) 2025 by Boyd Duffee.

This is free software, licensed under:

The MIT (X11) License