EPrints Technical Mailing List Archive

See the EPrints wiki for instructions on how to join this mailing list and related information.

Message: #04459


< Previous (by date) | Next (by date) > | < Previous (in thread) | Next (in thread) > | Messages - Most Recent First | Threads - Most Recent First

[EP-tech] Re: IRStats API


Looking at something similar, I was getting the data into monthly chunks with a CGI script which you could then parse and output as JSON - hopefully that will point you in the right direction?

...
        my $session = new EPrints::Session;
        my $handler = $session->plugin( "Stats::Handler" );
        $handler->debug(1);
        my $ctx = $handler->context( {datatype=> "downloads", set_name=>"eprint", set_value=>$eprint } );
        my $stats = $handler->data( $ctx )->select( fields => ["datestamp"]);
        my %month_count;
        for my $day_count (@{$stats->data})
        {
                $month_count{substr($day_count->{datestamp},0,6)} += $day_count->{count};
        }
...


-----Original Message-----
From: Andrew Beeken [mailto:anbeeken@lincoln.ac.uk]
Sent: 08 July 2015 13:18
To: eprints-tech@ecs.soton.ac.uk
Subject: [EP-tech] IRStats API

Hello all,

I know that there is a page on the Wiki regarding the API for IRStats, however my question is somewhat more specific. I'm working on a tool attempting to combine different metrics relating to EPrints outputs in one dashboard. This is being written in PHP and currently incorporates data from Altmetric and Scopus, scraped nightly into a local database. The guide for the IRStats API discusses using it within the Perl environment of EPrints, however it does not mention if it's possible to access the data from an external application (that I can see at least)

Is this possible or am I barking up the wrong tree?

All the best,
Andrew

The University of Lincoln, located in the heart of the city of Lincoln, has established an international reputation based on high student satisfaction, excellent graduate employment and world-class research.

The information in this e-mail and any attachments may be confidential. If you have received this email in error please notify the sender immediately and remove it from your system. Do not disclose the contents to another person or take copies.

Email is not secure and may contain viruses. The University of Lincoln makes every effort to ensure email is sent without viruses, but cannot guarantee this and recommends recipients take appropriate precautions.

The University may monitor email traffic data and content in accordance with its policies and English law. Further information can be found at: http://www.lincoln.ac.uk/legal.

*** Options: http://mailman.ecs.soton.ac.uk/mailman/listinfo/eprints-tech
*** Archive: http://www.eprints.org/tech.php/
*** EPrints community wiki: http://wiki.eprints.org/
*** EPrints developers Forum: http://forum.eprints.org/
-- The Open University is incorporated by Royal Charter (RC 000391), an exempt charity in England & Wales and a charity registered in Scotland (SC 038302). The Open University is authorised and regulated by the Financial Conduct Authority.