API-MailboxOrg

 view release on metacpan or  search on metacpan

lib/API/MailboxOrg.pm  view on Meta::CPAN

    default => sub {
        Mojo::UserAgent->new
    }
);

sub _load_namespace ($package) {
    my @modules = find_modules $package . '::API', { recursive => 1 };

    for my $module ( @modules ) {
        load_class( $module );

        my $base = (split /::/, $module)[-1];

        no strict 'refs'; ## no critic
        *{ $package . '::' . decamelize( $base ) } = sub ($api) {
            weaken $api;
            state $object //= $module->instance(
                api => $api,
            );

            return $object;
        };
    }
}

__PACKAGE__->_load_namespace;

1;

__END__

=pod

=encoding UTF-8

=head1 NAME

API::MailboxOrg - Perl library to work with the API for the Mailbox.org API

=head1 VERSION

version 1.0.2

=head1 SYNOPSIS

    use API::MailboxOrg;
    use Data::Printer;

    my $api = API::MailboxOrg->new(
        user     => 'test_name@example.tld',
        password => 'test1234567789',
    );

    my $all_videochats = $api->videochat->list(
        mail => 'test_name@example.tld',
    );
    p $all_videochats;

=head1 INFO

This is still pretty alpha. The API of this distribution might change.

=head1 ATTRIBUTES

=over 4

=item * base_uri

I<(optional)> Default: C</v1>

=item * client 

I<(optional)> A C<Mojo::UserAgent> compatible user agent. By default a new object of C<Mojo::UserAgent>
is created.

=item * host

I<(optional)> This is the URL to Mailbox.org API. Defaults to C<https://api.mailbox.org>

=item * token

After authenticating, this will be the auth id.

=back

=head1 METHODS

=over 4

=item * account

=item * backup

=item * base

=item * blacklist

=item * capabilities

=item * context

=item * domain

=item * hello

=item * invoice

=item * mail

=item * mailinglist

=item * password

=item * passwordreset

=item * spamprotect

=item * test

=item * user



( run in 0.424 second using v1.01-cache-2.11-cpan-140bd7fdf52 )