Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/cannonb4ll/laravel-versio
Laravel wrapper for Versio's API
https://github.com/cannonb4ll/laravel-versio
Last synced: 29 days ago
JSON representation
Laravel wrapper for Versio's API
- Host: GitHub
- URL: https://github.com/cannonb4ll/laravel-versio
- Owner: Cannonb4ll
- License: mit
- Created: 2016-05-16T12:22:01.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2016-11-18T14:58:31.000Z (about 8 years ago)
- Last Synced: 2024-05-01T14:07:44.523Z (8 months ago)
- Language: PHP
- Homepage:
- Size: 15.6 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# LaravelVersio
Laravel Versio wrapper for their API. This package will convert all returned data in nice collections and suitable working data.
## Installation
```
composer require cannonb4ll/laravel-versio
```## Usage
Set up the following variables in your .env file:
```
VERSIO_ID=
VERSIO_PASS=
```Then you can use the class like this:
```
use LaravelVersio\Versio;$versio = new Versio;
// Enable sandbox mode like this:
$versio->sandboxMode(true);
```## Commands:
```
- $versio->domains()->register('domain', 'tld', ['ns1.domain.com', 'ns2.domain.com'], $contactId, $years = 1, $park = 0); // Register a domain, $contactId is required!
- $versio->domain_contacts()->create([
'initials', // REQUIRED
'surname', // REQUIRED
'email', // REQUIRED
'phone', // REQUIRED
'street', // REQUIRED
'hnr', // REQUIRED
'hnradd',
'zipcode', // REQUIRED
'city', // REQUIRED
'country' // REQUIRED (Syntax: NL, BE, UK etc)
]); // Create a domain contact, returns contact ID if succesfull.
- $versio->domains()->listActive(); // List active domains
- $versio->domains()->listInactive(); // List inactive domains
- $versio->domains()->listSingle('domain', 'tld'); // List a single domain
- $versio->domains()->isFree('domain', 'tld'); // Check if domain is free
- $versio->domains()->updateNameservers('domain', 'tld', $array); // Updates domain nameservers, array structure:
$nameservers = [
'ns1' => 'ns1.website.com',
'ns2' => 'ns2.website.com'
];- $versio->domains()->dnsRecords('domain', 'tld'); // List all DNS records
- $versio->domains()->storeDnsRecord('domain', 'tld', $array); // Store a new DNS record, returns record id, array structure:
[
'name' => 'test',
'type' => 'A',
'value' => '123.123.123.123',
'prio' => 10,
'ttl' => 300
]
- $versio->domains()->destroyDnsRecord('domain', 'tld', $record_id); // Destroy a DNS record, pass record ID as 3rth argument
- $versio->domains()->switchDns('domain', 'tld', true/false); // Switch DNS management/nameserver management, 3rth argument bool
```More commands are under progress.
## IMPORTANT
Please do not use this package yet in a production enviroment, it has not been finished yet and is bound to change abit.
## TODO:
- Expand with more commands
- Error handling