2017 © Pedro Peláez
 

library dnsimple

PHP Client for dnsimple REST API.

image

jdubreville/dnsimple

PHP Client for dnsimple REST API.

  • Friday, December 2, 2016
  • by jdubreville
  • Repository
  • 1 Watchers
  • 3 Stars
  • 108 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 2 Forks
  • 0 Open issues
  • 1 Versions
  • 0 % Grown

The README.md

DNSimple API Client PHP

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)

Installation

The API Client can be installed using Composer., (*3)

Composer

{
  "require": {
    "jdubreville/dnsipmle_api_client_php": "dev-master"
  }
}

Configuration

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);

Usage

Basic Operations

// 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();

Note on Patches/Pull Requests

  1. Fork the project.
  2. Make changes.
  3. Add tests for it. This way future releases can be verified.
  4. Commit your changes.
  5. Send a pull request.

License

Licensed under the MIT License, (*5)

Please refer to the LICENSE file for more information., (*6)

The Versions

02/12 2016

dev-master

9999999-dev https://github.com/jdubreville/dnsimple_api_client_php

PHP Client for dnsimple REST API.

  Sources   Download

MIT

The Requires

  • php >=5.3.1

 

The Development Requires

by Jim Dubreville