joecohens / now-php-client
PHP 5.4+ 版本的 Now Instant API 包装器
dev-master
2020-05-25 15:58 UTC
Requires
- php: >=5.4.0
- guzzlehttp/guzzle: ~5.3|~6.0
Requires (Dev)
- mockery/mockery: 0.9.*
- phpunit/phpunit: ~4.8
This package is auto-updated.
Last update: 2024-08-26 01:33:32 UTC
README
非官方的 PHP +5.4 客户端,用于 Now Instant Api
使用方法
安装包
composer require joecohens/now-php-client
需要 composer 自动加载
require __DIR__.'/../vendor/autoload.php';
创建 Now 客户端实例
$now = new Jeocohens\Now\Now(API_TOKEN, TEAM_ID);
使用任何资源端点
$now->deployments()
参考
部署
$now->deployments(); $now->deployment($id); $now->createDeployment($body); $now->deleteDeployment($id);
文件
$now->files($id); $now->file($id, $fileId);
域名
$now->domains(); $now->addDomain($name, $isExternalDNS = false); $now->deleteDomain($name); $now->domainRecords($domain); $now->addDomainRecord($domain, array $recordData = []); $now->deleteDomainRecord($domain, $recordId);
证书
$now->certificates($cn); $now->createCertificate($cn); $now->renewCertificate($cn); $now->replaceCertificate($cn, $cert, $key, $ca); $now->deleteCertificate($cn);
别名
$now->aliases($id = null); $now->createAlias($id, $alias); $now->deleteAlias($id);
秘密
$now->secrets(); $now->createSecret($name, $value); $now->renameSecret($id, $name); $now->deleteSecret($id);