API::ParallelsWPB::Requests - processing of API requests
version 0.03
Getting the current version of the Parallels Web Presence Builder instance on the defined server.
Creating a site.
%param:
state
trial | suspended | regular This parameter is optional. It specifies whether the site is in the trial mode, suspended or active (regular value). Sites in the trial mode can be edited, but cannot be published to a hosting account.
publicationSettings
{ "targetUrl" => "ftp://username:password@ftp.example.com/path", "webSiteUrl" => "http://example.com", "fallbackIp" => "192.168.1.3" } This parameter is optional.
ownerInfo
{ "personalName" => "John Doe", "companyName" => "My Company LTD", "phone" => "+1-954-555-555", "email" => "john@example.com", "address" => "New", "city" => "New York", "state" => "New York", "zip" => "10292", "country" => "United states" } This parameter is optional.
isPromoFooterVisible
1 | 0 This parameter is optional. It specifies whether a text box containing an advertisement should be shown in a website footer (a section that appears at the bottom of every page on a site). To learn more about how to set the content to be shown in the promotional footer, see the section L<Configuring the Promotional Footer|http://download1.parallels.com/WPB/Doc/11.5/en-US/online/presence-builder-standalone-installation-administration-guide/71977.htm>.
Creating a Site
Generating a Security Token for Accessing a Site
uuid
Site UUID. This parameter is mandatory.
localeCode
This parameter is optional. It specifies the language that should be set for the user interface when the user (site owner) logs in to the editor. The following languages are supported: en_US - American English. en_GB - British English. de_DE - German. es_ES - Spanish. fr_FR - French it_IT - Italian. ja_JP - Japanese. nl_NL - Dutch. pl_PL - Polish. pt_BR - Brazilian Portuguese ru_RU - Russian. zh_CN - simplified Chinese. zh_TW - traditional Chinese. If no locale is defined, en_US will be used.
sessionLifeTime
This parameter is optional. It specifies the period of inactivity for a user's session in the editor. When this period elapses, the security token expires and the user needs to log in again. 1800 seconds by default.
Creates site based on a specified topic.
my $response = $client->deploy( localeCode => 'en_US', templateCode => 'music_blog' );
Locale code. The default value is en_US.
templateCode
Internal topic identification code. This parameter is optional. Default value is 'generic'.
title
Website name. This parameter is optional. Specifies what should be shown as the website name in the browser's title bar.
Creating a Site Based on a Website Topic
Retrieving information about a specific site.
Retrieving Information About a Specific Site
Retrieving information about all sites.
No parameters are required.
Retrieving Information About All Sites
Changes site properties.
trial | suspended | regular This parameter is optional. It specifies whether the site is in trial mode, suspended or active (regular value). Sites in trial mode can be edited, but cannot be published to a hosting account.
This parameter is optional. It specifies where to publish the site over FTP and what account credentials to use:
This parameter is optional. It specifies the contact information of the site owner.
1 | 0 This parameter is optional. It specifies whether a text box with an advertisement should be shown in the website footer.
Changing Site Properties and Settings
Publish a site.
Site UUID.
Publishing a Website
Deleting a site.
Deleting a Site
Retrieving the current content of the promotional footer.
Retrieving the Current Content of the Promotional Footer
Retrieving a List of Custom Variables for a Website.
Configuring the Trial Mode
Setting Trial Mode Messages
Setting a Custom Variable for a Website
uuid variable1 => value1 variable2 => value2 ... variableN => valueN
Retrieving Custom Variables Defined for All Websites
Setting Custom Variables for All Websites
variable1 => value1 variable2 => value2 ... variableN => valueN
Setting Custom Messages for the Trial Mode
my $response = $api->set_custom_trial_messages( { localeCode => 'en_US', messages => { defaultPersonalName => '{message1_en}', editorTopMessageTrialSite => '{message2_en}', initialMailSubject => '{message3_en}', initialMailHtml => '{message4_en}', trialSiteSignUpPublishTitle => '{message5_en}', trialSiteSignUpPublishMsg => '{message6_en}' } }, { localeCode => 'de_DE', messages => { defaultPersonalName => '{message1_de}', editorTopMessageTrialSite => '{message2_de}', initialMailSubject => '{message3_de}', initialMailHtml => '{message4_de}', trialSiteSignUpPublishTitle => '{message5_de}', trialSiteSignUpPublishMsg => '{message6_de}' } }, );
Retrieving Custom Messages for the Trial Mode
Changing the Default Content of the Promotional Footer
message
Showing the Promotional Footer on Websites
Removing the Promotional Footer from Websites
Set limitations for single site
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.
Restricting Resources by Means of the API
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 } } ]
Configuring the Buy and Publish Dialog Window
API::ParallelsWPB::Requests
Parallels Presence Builder Guide
API::ParallelsWPB
API::ParallelsWPB::Response
Alexander Ruzhnikov <a.ruzhnikov@reg.ru>
Polina Shubina <shubina@reg.ru>
This software is copyright (c) 2014 by REG.RU LLC.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.
To install API::ParallelsWPB, copy and paste the appropriate command in to your terminal.
cpanm
cpanm API::ParallelsWPB
CPAN shell
perl -MCPAN -e shell install API::ParallelsWPB
For more information on module installation, please visit the detailed CPAN module installation guide.