|
NAMEAstro::ADS::Metrics - Queries the ADS Metrics endpoint and collects the results VERSIONversion 1.91 SYNOPSIS my $metrics = Astro::ADS::Metrics->new({
bibcodes => ['...'], # list of bibcodes
{ types => ['basic'] } # types of metrics to return
});
my $json_result = $metrics->batch();
my $single_bibcode = $metrics->fetch('2019MNRAS.487.3523C');
my $detailed_stats = $metrics->details( @bibcodes );
DESCRIPTIONFetch Metrics for papers in the Harvard ADS Currently only "fetch" checks the Metrics object for how to make the calls. The json structure is documented on the ADS API website. I haven't used the ResultMapper to make it easier to access. You'll have to work that out yourself. Let me know if there's a better way. MethodsfetchFetch a single bibcode. No options taken. Returns the json response as a hash reference. batchTakes an array ref of bibcodes to find metrics for. An optional hash ref can limit the types of metrics returned and if the type is histogram, which histograms to return. As in { types => ['histograms'], histograms => ['citations'] }
Returns the json response as a hash reference. detailsQueries the metrics/details endpoint with a list of bibcodes. Takes no options. Returns the json response as a hash reference. NotesThis module's client methods are liable to change, but deprecation warnings will be issued if they do. See the docs. TODOThe Metrics object should store the arguments from the latest request, so that repeated calls can be brief. Consider using the ResultMapper to contain results (if that makes sense) or maybe to warn if there are any "skipped bibcodes" in the response. See Also
COPYRIGHT AND LICENSEThis software is Copyright (c) 2025 by Boyd Duffee. This is free software, licensed under: The MIT (X11) License
|