Business-SiteCatalyst
view release on metacpan or search on metacpan
lib/Business/SiteCatalyst/Report.pm view on Meta::CPAN
package Business::SiteCatalyst::Report;
use strict;
use warnings;
use Carp;
use Data::Dumper;
use Data::Validate::Type;
=head1 NAME
Business::SiteCatalyst::Report - Interface to Adobe Omniture SiteCatalyst's REST API 'Report' module.
=head1 VERSION
Version 1.2.2
=cut
our $VERSION = '1.2.2';
=head1 SYNOPSIS
This module allows you to interact with Adobe (formerly Omniture) SiteCatalyst,
a web analytics service. It encapsulates all the communications with the API
provided by Adobe SiteCatalyst to offer a Perl interface for managing reports,
pulling company-specific SiteCatalyst data (ex: token usage), uploading SAINT
data (feature not implemented yet), etc.
Please note that you will need to have purchased the Adobe SiteCatalyst product,
and have web services enabled within your account first in order to obtain a web
services shared secret, as well as agree with the Terms and Conditions for using
the API.
use Business::SiteCatalyst;
# Create an object to communicate with Adobe SiteCatalyst
my $site_catalyst = Business::SiteCatalyst->new(
username => 'dummyusername',
shared_secret => 'dummysecret',
api_subdomain => 'api|api2', #optional; default value='api'
);
my $report = $site_catalyst->instantiate_report(
type => 'report type',
report_suite_id => 'report suite id',
);
# See SiteCatalyst API Explorer at
# https://developer.omniture.com/en_US/get-started/api-explorer
# for Report.Queue[Trended|Ranked|Overtime] documentation
$report->queue(
%report_arguments, #report-dependant
);
my $results;
for ( my $tries = 0; $tries < 20; tries++ )
{
if ( $report->is_ready() )
{
$results = $report->retrieve();
last;
}
else
{
sleep 5;
}
}
unless ( defined $results )
{
$cancel_success = $report->cancel();
}
=head1 METHODS
=head2 new()
Create a new Business::SiteCatalyst::Report object, which
will allow retrieval of SiteCatalyst reports.
NOTE: This should not be called directly. Instead, use C<Business::SiteCatalyst->instantiate_report()>.
my $report = Business::SiteCatalyst::Report->new(
$site_catalyst,
type => 'report type',
( run in 1.569 second using v1.01-cache-2.11-cpan-b16cb0d3907 )