API-ParallelsWPB
view release on metacpan or search on metacpan
lib/API/ParallelsWPB/Requests.pm view on Meta::CPAN
$param{publicationSettings} ||= {};
$param{ownerInfo} ||= {};
$param{isPromoFooterVisible} ||= '';
my $post_array = [ {
state => $param{state},
publicationSettings => $param{publicationSettings},
ownerInfo => $param{ownerInfo},
isPromoFooterVisible => $param{isPromoFooterVisible}
} ];
my $res = $self->f_request(
['sites'],
{
req_type => 'post',
post_data => $post_array,
}
);
my $uuid = $res->response;
if ( $uuid ) {
$self->{uuid} = $uuid;
}
else {
carp "parameter uuid not found";
}
return $res;
}
sub gen_token {
my ( $self, %param ) = @_;
$param{localeCode} ||= DEFAULT_LOCALE_CODE;
$param{sessionLifeTime} ||= DEFAULT_SESSIONLIFETIME;
my $uuid = $self->_get_uuid( %param );
return $self->f_request(
[ 'sites', $uuid, 'token' ],
{
req_type => 'post',
post_data => [
{
localeCode => $param{localeCode},
sessionLifeTime => $param{sessionLifeTime},
} ],
}
);
}
sub deploy {
my ( $self, %param ) = @_;
$param{localeCode} ||= $self->DEFAULT_LOCALE_CODE;
$param{templateCode} ||= $self->DEFAULT_TEMPLATE_CODE;
my $siteuuid = $self->_get_uuid( %param );
my @post_data = map { $param{$_} } qw/templateCode localeCode title/;
return $self->f_request(
[ 'sites', $siteuuid, 'deploy' ],
{
req_type => 'post',
post_data => \@post_data
}
);
}
sub get_site_info {
my ( $self, %param ) = @_;
my $uuid = $self->_get_uuid( %param );
return $self->f_request( [ 'sites', $uuid ], { req_type => 'get' } );
}
sub get_sites_info {
my ( $self ) = @_;
return $self->f_request( [qw/ sites /], { req_type => 'get' } );
}
sub change_site_properties {
my ( $self, %param ) = @_;
my $uuid = $self->_get_uuid( %param );
return $self->f_request(
[ 'sites', $uuid ],
{
req_type => 'put',
post_data => [\%param]
}
);
}
sub publish {
my ( $self, %param ) = @_;
my $uuid = $self->_get_uuid( %param );
return $self->f_request(
[ 'sites', $uuid, 'publish' ],
{
req_type => 'post',
}
);
}
sub delete_site {
my ( $self, %param ) = @_;
lib/API/ParallelsWPB/Requests.pm view on Meta::CPAN
uuid
=head2 B<set_site_promo_footer_invisible($self, %param)>
Removing the Promotional Footer from Websites
%param:
uuid
=head2 B<set_limits>
Set limitations for single site
%param:
uuid
Site UUID.
The next list contains parameters/modules, that can be limited. Value for parameter must be an integer, that means maximum number of elements, that can be added on site. Value -1 means unlimited elements count
for all modules/pages except eshop module. It can accept only positive numbers.
maxPagesNumber
Number of pages on a site.
video
Embedded Video module.
imagegallery
Image Gallery module.
blog
Blog module.
eshop
Online Store and Shopping Cart modules.
commenting
Commenting module.
contact
Contact Form module.
sharethis
Social Sharing module.
advertisement
Advertisement module.
map
Map module.
search
Search module.
navigation
Navigation module.
breadcrumbs
Breadcrumbs module.
siteLogo
Site Logo module.
script
Script module.
slider
Image Slider module.
L<Restricting Resources by Means of the API|http://download1.parallels.com/WPB/Doc/11.5/en-US/online/presence-builder-standalone-installation-administration-guide/index.htm?fileName=71986.htm>
=head2 B<configure_buy_and_publish_dialog>
Configuration for Buy & Publish dialog box in constructor.
$params:
[
{
"localeCode" => "de_DE",
"messages" => {
"upsellDialogTitle" => $title,
"upsellDialogMsg" => $html
}
},
{
"localeCode" => "ru_RU",
"messages" => {
"upsellDialogTitle" => $title,
"upsellDialogMsg" => $html
}
}
]
L<Configuring the Buy and Publish Dialog Window|http://download1.parallels.com/WPB/Doc/11.5/en-US/online/presence-builder-standalone-installation-administration-guide/index.htm?fileName=71987.htm>
( run in 0.487 second using v1.01-cache-2.11-cpan-140bd7fdf52 )