zimbra_api 1.0.1 copy "zimbra_api: ^1.0.1" to clipboard
zimbra_api: ^1.0.1 copied to clipboard

Zimbra SOAP API library in Dart language.

Zimbra SOAP client library in Dart language #

This library is a simple Object Oriented wrapper for the Zimbra SOAP API.

Features #

Getting started #

In your Dart or flutter project add the dependency:

dependencies:
  ...
  zimbra_api:

Usage #

Authentication #

Authentication by account name.

final api = MailApi('mail.domain.com');
final response = await api.authByAccountName('name@domain.com', 'password');
if (response != null) {
  final authToken = response.authToken;
}

Authentication by auth token which auth token can obtain from previous authentication.

final api = MailApi('mail.domain.com');
final response = await api.authByToken('auth token');

Authentication by preauth which preauth key can obtain from zmprov generateDomainPreAuthKey command

final api = MailApi('mail.domain.com');
final response = await api.authByPreauth('name@domain.com', 'preauth key');
if (response != null) {
  final authToken = response.authToken;
}

Basic Usage #

  1. Create api instance from one of Account & Mail API.
  2. Authentication with api.auth() method.
  3. From api object, you can access to Account & Mail API.

Example: Search messages has attachment in Inbox

final api = MailApi('mail.domain.com');
final response = await api.authByAccountName('name@domain.com', 'password');
if (response != null) {
  final query = 'in:inbox has:attachment';
  final searchResponse = await api.search(query: query, searchTypes: 'message');
  final messages = searchResponse.messageHits;
}

Licensing #

BSD 3-Clause

For the full copyright and license information, please view the LICENSE
file that was distributed with this source code.
1
likes
130
points
24
downloads

Publisher

unverified uploader

Weekly Downloads

Zimbra SOAP API library in Dart language.

Repository (GitHub)
View/report issues

Documentation

API reference

License

BSD-3-Clause (license)

Dependencies

crypto, http

More

Packages that depend on zimbra_api