Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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: about 1 month 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 (about 7 years ago)
- Default Branch: master
- Last Pushed: 2020-05-25T15:58:27.000Z (over 4 years ago)
- Last Synced: 2024-04-19T02:44:28.227Z (9 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
[![Build Status](https://img.shields.io/travis/joecohens/now-php-client/master.svg?style=flat-square)](https://travis-ci.org/joecohens/now-php-client)
[![StyleCI](https://styleci.io/repos/106905656/shield?branch=master)](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);
```