https://github.com/joecohens/now-php-client
A PHP 5.4+ wrapper for the Now Instant API
https://github.com/joecohens/now-php-client
now now-client php php-client zeit
Last synced: 4 months ago
JSON representation
A PHP 5.4+ wrapper for the Now Instant API
- Host: GitHub
- URL: https://github.com/joecohens/now-php-client
- Owner: joecohens
- License: mit
- Created: 2017-10-14T06:52:14.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2020-05-25T15:58:27.000Z (almost 6 years ago)
- Last Synced: 2025-03-27T21:02:12.249Z (11 months ago)
- Topics: now, now-client, php, php-client, zeit
- Language: PHP
- Size: 19.5 KB
- Stars: 3
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# now php client
[](https://travis-ci.org/joecohens/now-php-client)
[](https://styleci.io/repos/106905656)
A non official PHP +5.4 client for the [Now Instant Api](https://zeit.co/api)
## Usage
Install the package:
```
composer require joecohens/now-php-client
```
Require composer autoload:
```php
require __DIR__.'/../vendor/autoload.php';
```
Create an instance of the Now Client:
```php
$now = new Jeocohens\Now\Now(API_TOKEN, TEAM_ID);
```
Use any of the resource enpoints:
```php
$now->deployments()
````
## Reference
#### Deployments
```php
$now->deployments();
$now->deployment($id);
$now->createDeployment($body);
$now->deleteDeployment($id);
```
#### Files
```php
$now->files($id);
$now->file($id, $fileId);
```
#### Domains
```php
$now->domains();
$now->addDomain($name, $isExternalDNS = false);
$now->deleteDomain($name);
$now->domainRecords($domain);
$now->addDomainRecord($domain, array $recordData = []);
$now->deleteDomainRecord($domain, $recordId);
```
#### Certificates
```php
$now->certificates($cn);
$now->createCertificate($cn);
$now->renewCertificate($cn);
$now->replaceCertificate($cn, $cert, $key, $ca);
$now->deleteCertificate($cn);
```
#### Aliases
```php
$now->aliases($id = null);
$now->createAlias($id, $alias);
$now->deleteAlias($id);
```
#### Secrets
```php
$now->secrets();
$now->createSecret($name, $value);
$now->renameSecret($id, $name);
$now->deleteSecret($id);
```