NAME
Regru::API::Folder - REG.API v2 user folders management
VERSION
version 0.051
DESCRIPTION
REG.API folders management methods such as create/remove/rename folders, get/put services linked to and others.
ATTRIBUTES
namespace
Always returns the name of category: folder
. For internal uses only.
REG.API METHODS
nop
For testing purposes. Scope: everyone. Typical usage:
$resp = $client->folder->nop(
folder_name => 'our_folder',
);
Returns success response.
More info at Folder management: nop.
create
Creates a folder. Scope: clients. Typical usage:
$resp = $client->folder->create(
folder_name => 'vehicles',
);
Returns success response if folder was created or error otherwise.
More info at Folder management: create.
remove
Deletes an existing folder. Scope: clients. Typical usage:
$resp = $client->folder->remove(
folder_id => 674908,
);
Returns success response if folder was deleted or error otherwise.
More info at Folder management: remove.
rename
Renames an existing forder. Scope: clients. Typical usage:
$resp = $client->folder->rename(
folder_name => 'stuff',
new_folder_name => 'items',
);
Returns success response if folder was renamed or error otherwise.
More info at Folder management: rename.
get_services
Gets services linked to folder. Scope: clients. Typical usage:
$resp = $client->folder->get_services(
folder_id => 389765,
);
A success answer will contains a folder_content
with a list of services (domain names, hosting related items, etc) linked to requested folder.
More info at Folder management: get_services.
add_services
"Puts" services to folder. Scope: clients. Typical usage:
$resp = $client->folder->add_services(
folder_name => 'vehicles',
services => [
{ domain_name => 'crucible.co.uk' },
{ domain_name => 'ss-madame-de-pompadour.ru' },
],
return_folder_contents => 1,
);
A successful answer will contains a services
field with a list of services that was linked to the specified folder and result for each of them. Additionally might be returned a folder_content
field.
More info at Folder management: add_services.
remove_services
"Deletes" services from folder. Scope: clients. Typical usage:
$resp = $client->folder->remove_services(
folder_name => 'vehicles',
services => [
{ domain_name => 'bow-tie.com' },
],
);
A successful answer will contains a services
field with a list of services that was unlinked to the specified folder and result for each of them. Additionally might be returned a folder_content
field.
More info at Folder management: remove_services.
replace_services
"Replaces" services with a new set of services. Scope: clients. Typical usage:
$resp = $client->folder->replace_services(
folder_name => 'items',
services => [
{ domain_name => 'bow-tie.com' },
{ service_id => 188650 },
{ service_id => 239076 },
],
);
A successful answer will contains a services
field with a list of services that was linked to the specified folder and result for each of them. Additionally might be returned a folder_content
field.
More info at Folder management: replace_services.
move_services
"Transfers" services between folders. Scope: clients. Typical usage:
$resp = $client->folder->move_services(
folder_name => 'vehicles',
new_folder_name => 'items',
services => [
{ domain_name => 'bow-tie.cz' },
{ domain_name => 'hallucinogenic-lipstick.xxx' },
{ service_id => 783908 },
],
);
A successful answer will contains a services
field with a list of services that was linked to the specified folder and result for each of them. Additionally might be returned a folder_content
field with a contents of a destination folder.
More info at Folder management: move_services.
SEE ALSO
BUGS
Please report any bugs or feature requests on the bugtracker website https://github.com/regru/regru-api-perl/issues
When submitting a bug or request, please include a test-file or a patch to an existing test-file that illustrates the bug or desired feature.
AUTHORS
Polina Shubina <shubina@reg.ru>
Anton Gerasimov <a.gerasimov@reg.ru>
COPYRIGHT AND LICENSE
This software is copyright (c) 2013 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.