exbil / mailcow-php-api
MailCow API的全功能实现
0.14.1
2023-10-05 15:55 UTC
Requires
- php: >=7.2
- ext-json: *
- guzzlehttp/guzzle: ^7.5
Requires (Dev)
- phpunit/phpunit: ^9.5.0
This package is auto-updated.
Last update: 2024-09-07 00:59:08 UTC
README
入门指南
需求
在项目根目录下执行以下命令:
$ composer require exbil/mailcow-php-api
或者将以下内容添加到你的 composer.json
文件中:
{ "require": { "exbil/mailcow-php-api": "^0.14.1" } }
然后执行安装
$ composer install --no-dev
用法
在此处搜索API文档:这里。
你需要一个API密钥。
示例
<?php // Require the autoloader require_once 'vendor/autoload.php'; // Use the library namespace use Exbil\MailCow\MailCowAPI; // Then simply pass your API-Token when creating the API client object. $client = new MailCowAPI('mailcow-with-https.example.com','MAILCOW_API_KEY'); // Then you are able to perform a request var_dump($client->domains()->getDomains()); ?>