API-PleskExpand

 view release on metacpan or  search on metacpan

lib/API/PleskExpand/Accounts.pm  view on Meta::CPAN

    'min_domains' -- Least Domains (% used) registers a client on the server with the minimum number of domains.
    'max_diskspace' -- Least Disk Space (% used) registers a client on the server with the minimum disk space used.
    '' -- Select manually, Specify the target Plesk server by selecting its name from the list.
 	
When choosing a 'manual' (select => '') option you should set server_id!
For 'optimal', 'min_domains', 'max_diskspace' you can ask additional server group id ('group_id' params) or server keyword ('server_keyword' param);


Return (Data::Dumper output):

  VAR1 = bless( {
    'answer_data'   => [ {
      'server_id'   => '1',
      'status'      => 'ok',
      'expiration'  => '-1',
      'tmpl_id'     => '1',
      'id'          => '15'
    } ], 
    'error_codes' => ''
  }, 'API::Plesk::Response' );

lib/API/PleskExpand/Accounts.pm  view on Meta::CPAN


Changes the account params.

Params:
  general_info -- hashref`s with new user details
  id           -- client id 


Return:

  $VAR1 = bless( {
    'answer_data' => [ {
        'server_id'       => '1',
        'status'          => 'ok',
        'tmpl_id'         => '1',
        'id'              => '15',
        'plesk_client_id' => '384',
        'login'           => 'suxdffffxx'
    } ],
        'error_codes' => ''
  }, 'API::Plesk::Response' );

lib/API/PleskExpand/Accounts.pm  view on Meta::CPAN


=item delete(%params)

Delete accounts.

Params:
  id -- client id in Plesk

Return:

    $VAR1 = bless( {
        'answer_data' => [ {
            'server_id' => '1',
            'status' => 'ok',
            'id' => '15'
        } ],
        'error_codes' => ''
    }, 'API::Plesk::Response' );


Example:

lib/API/PleskExpand/Domains.pm  view on Meta::CPAN


  dname              => 'yandex.ru',   # domain name
  client_id          => 9,             # add domain to client with certain id
  'template-id'      => 1,             # domain template id
  ftp_login          => 'nrgsdasd',    # username for ftp 
  ftp_password       => 'dasdasd',     # password for ftp account
  attach_to_template => 1,             # attach domain to template ? 1 -- yes, 0 -- no

Return:

  $VAR1 = bless( {
    'answer_data' => [ {
        'server_id'     => '1',
        'status'        => 'ok',
        'expiration'    => '-1',
        'tmpl_id'       => '1',
        'client_id'     => '16',
        'id' => '15'
    } ],
        'error_codes' => ''
  }, 'API::Plesk::Response' );



( run in 0.898 second using v1.01-cache-2.11-cpan-de7293f3b23 )