Elive::Entity::Report - Elluminate Report entity instance class
This is the entity class for server side reports. These are visible on the Elluminate server under the 'Reports' tab.
Please note that the list method (listReports command) does not return the body of the report. The report object needs to be refetched via the retrieve method.
list
listReports
retrieve
For example, the following code snippet exports all reports for a site:
my $reports = Elive::Entity::Report->list; my @report_ids = map {$_->reportId} @$reports; foreach my $report_id (@report_ids) { # # listed objects don't have the report body, refetch them. # my $rpt = Elive::Entity::Report->retrieve( $report_id ); my $name = $rpt->name; $name =~ s/[^\w]//g; # sanitise my $export_file = "/tmp/report_${reportId}_${name}.xml"; open (my $dump_fh, '>', $export_file) or die "unable to open $export_file: $!"; print $dump_fh $rpt->xml; close ($dump_fh); }
my $all_reports = Elive::Entity::Report->list();
List reports.
Note: This command does not return the body of the report (xml property).
xml
my $report = Elive::Entity::Report->retrieve( $report_id ); my $report_xml = $report->xml;
Retrieves a report, including the body of the report (xml property).
The insert method is not available for reports.
insert
The update method is not available for reports.
update
my $report = Elive::Entity::Report->retrieve( $report_id ); $report->delete if $report;
Deletes a report.
To install Elive, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Elive
CPAN shell
perl -MCPAN -e shell install Elive
For more information on module installation, please visit the detailed CPAN module installation guide.