vexura / mailcow-api

MailCow API 的一个功能全面的实现

dev-main 2022-11-09 16:46 UTC

This package is auto-updated.

Last update: 2024-09-09 21:15:22 UTC


README

这个 PHP 7.2+ 库允许您与 VPNResellers-API 进行通信。

Latest Stable Version Total Downloads Latest Unstable Version License PHP Version Require

入门指南

推荐使用 Composer 安装!

在您的项目根目录中执行以下操作

$ composer require vexura/mailcow-api

或者将其添加到您的 composer.json 文件中

{
    "require": {
        "vexura/mailcow-api": "^1.0"
    }
}

然后执行安装

$ composer install --no-dev

示例

创建 MailCowAPI 主对象并获取所有域名

<?php
// Require the autoloader
require_once 'vendor/autoload.php';
// Use the library namespace
use Vexura\MailCowAPI;
// Then simply pass your API-Token when creating the API client object.
$client = new MailCowAPI('API-Token');
// Then you are able to perform a request
var_dump($client->domains()->getDomains());
?>