NAME
WebService::Eulerian::Analytics::Website::Ope - access to the Ope service for a given website : campaigns for inbound traffic.
DESCRIPTION
This module allow you to access the Ope service holding information about all the partners for your inbound traffic.
SYNOPSIS
#
my
$api
= new WebService::Eulerian::Analytics::Website::Ope(
apikey
=>
'THE KEY PROVIDED BY YOUR ACCOUNT MANAGER FOR API ACCESS'
,
host
=>
'THE HOST ON WHICH THE API IS HOSTED'
);
METHODS
getById : return a ope given it's id
input
id of the targetted website
id of the ope
output
hash reference containing the attributes of the ope
sample
my
$rh_ope
=
$api
->getById(
$my_website_id
, 1);
#
if
(
$api
->fault ) {
die
$api
->faultstring();
}
#
foreach
(
keys
%{
$rh_ope
} ) {
$_
.
" => "
.
$rh_ope
->{
$_
}.
"\n"
;
}
getByName : return a ope given it's name
input
id of the targetted website
name of the ope
output
hash reference containing the attributes of the ope
sample
my
$rh_ope
=
$api
->getByName(
$my_website_id
,
'test'
);
#
if
(
$api
->fault ) {
die
$api
->faultstring();
}
#
foreach
(
keys
%{
$rh_ope
} ) {
$_
.
" => "
.
$rh_ope
->{
$_
}.
"\n"
;
}
search : search for an ope
input
id of the targetted website
hash of search parameters
hash of optionnal search parameters
o sortkey : key on which the sorting can be done, defaults to ope_name
o sortdir : direction of the sorting, defaults to asc
o start : for paging, indicate the start index, defaults to 0
o limit : for paging, indicate the numer of results requested, default to 30
output
hash reference containing the following keys
o results : array of hash containing the list of ope matching the search
o totalcount : total number of items matching the search, used for paging.
sample
my
$rh_result
=
$api
->search(
$my_website_id
, { }, {
limit
=> 20 });
"Total count : "
.(
$rh_result
->{totalcount} || 0).
"<\n"
;
for
( @{
$rh_result
->{results} || [] } ) {
"\t name="
.
$_
->{ope_name}.
" | id="
.
$_
->{ope_id}.
"<\n"
;
}
getURL : fetch all the destination urls for a given ope
input
id of the targetted website
id of the targetted ope
hash of optionnal search parameters
o start : for paging, indicate the start index, defaults to 0
o limit : for paging, indicate the numer of results requested, default to 30
output
hash reference containing the following keys
o results : array of hash containing the list of url matching the ope
o totalcount : total number of items matching the search, used for paging.
sample
my
$rh_result
=
$api
->getURL(
$my_website_id
,
$my_ope_id
, {
limit
=> 20 });
"Total count : "
.(
$rh_result
->{totalcount} || 0).
"<\n"
;
for
( @{
$rh_result
->{results} || [] } ) {
"\t url="
.
$_
->{opedata_clickthruurl}.
" | id="
.
$_
->{opedata_id}.
"<\n"
;
}
SEE ALSO
WebService::Eulerian::Analytics
AUTHOR
Mathieu Jondet <mathieu@eulerian.com>
COPYRIGHT
Copyright (c) 2008 Eulerian Technologies Ltd http://www.eulerian.com
This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA