dev-master
9999999-dev https://github.com/jdubreville/dnsimple_api_client_phpPHP Client for dnsimple REST API.
MIT
The Requires
- php >=5.3.1
The Development Requires
by Jim Dubreville
Wallogit.com
2017 © Pedro Peláez
PHP Client for dnsimple REST API.
A PHP Client for the DNSimple API. For information on parameters please review the DNSimple API Reference., (*1)
Please note this is still in development on pieces of the code as not all functions have been tested., (*2)
The API Client can be installed using Composer., (*3)
{
"require": {
"jdubreville/dnsipmle_api_client_php": "dev-master"
}
}
Configuring the client is done through an instance of the jduebrville\dnsimple\Client class., (*4)
use jdubreville\dnsimple\Client as DNSimpleAPI; $email = "email@example.com"; // replace with your account email address $token = "ajfdaojfoawjf98uwejfaw"; // replace with your account token (found in account settings) $client = new DNSimpleAPI($email, $token);
// Get all domains
$domains = $client->domains()->getAll();
print_r($domains);
// Search for a given record.
$domains = $client->domains()->getAll(array('name' => 'some_host_name'));
print_r($domains);
// Create a new domain
$newDomain = $client->domains()->create(array(
'name' => 'example.com',
)
));
print_r($newDomain);
// Get a domain
$domain = $client->domains('example.com')->get();
print_r($domain);
// Add a Domain Record
$client->domains('example.com')->records()->create(array(
'name' => '',
'record_type' => 'A',
'content' => '1.2.3.4'
));
// Delete a Domain
$client->domains('example.com')->delete();
Licensed under the MIT License, (*5)
Please refer to the LICENSE file for more information., (*6)
PHP Client for dnsimple REST API.
MIT