Skip to content

Instantly share code, notes, and snippets.

@lucas1
Last active April 24, 2016 16:37
Show Gist options
  • Save lucas1/7543aefa3efd27449e068d3326d83736 to your computer and use it in GitHub Desktop.
Save lucas1/7543aefa3efd27449e068d3326d83736 to your computer and use it in GitHub Desktop.

NAME

iRedAdmin::Domain - API for add, edit, delete, enable and disable Domain

VERSION

Version 0.01

SYNOPSIS

use iRedAdmin;
 
my $iredadmin = iRedAdmin->new(
    url => 'https://hostname.mydomain.com/iredadmin',
    username => 'postmaster@mydomain.com',
    password => 'your_password',
    cookie => '/home/user/cookie.txt',
    lang => 3
);

my $admin = $iredadmin->Domain->Add(
    domain => 'foo.com',
    name => 'Company Foo',
);

print $iredadmin->error unless $admin; # print error if $admin is equal 0

METHODS

Add

Method to add Domain.

Arguments

domain

Address of Domain

name

Company/Organization Name

Edit

Method to edit Admin.

Arguments

name

Change Company/Organization Name

enable

1 to enable, 0 to disable, without set not change domain

Enable

Method to enable Domains.

Example

$iredadmin->Domain->Enable(
   'foo.com',
   'bar.com',
   'baz.com'
);

Disable

Method to disable Domains.

Example

$iredadmin->Domain->Disable(
   'foo.com',
   'bar.com',
   'baz.com'
);

Delete

Method to delete Domains.

Example

$iredadmin->Domain->Delete(
   'foo.com',
   'bar.com',
   'baz.com'
);

AUTHOR

Lucas Tiago de Moraes, <lucastiagodemoraes@gmail.com>

COPYRIGHT AND LICENSE

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.8.8 or, at your option, any later version of Perl 5 you may have available.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment