2017 © Pedro Peláez
 

library enom-sdk

image

coreproc/enom-sdk

  • Wednesday, March 2, 2016
  • by coreproc
  • Repository
  • 6 Watchers
  • 5 Stars
  • 44 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 7 Forks
  • 3 Open issues
  • 2 Versions
  • 0 % Grown

The README.md

Installation

Add this on your composer.json:, (*1)

"require": {
    "coreproc/enom-sdk-php": "dev-master"
},
"repositories": [
    {
        "type": "vcs",
        "url":  "https://git.coreproc.ph/coreproc/enom-sdk-php.git"
    }
]

Usage

Laravel 5.x users

Add this line in the providers array in config/app.php:, (*2)

'providers' => [
    // Other Service Providers

    Coreproc\Enom\Providers\EnomServiceProvider::class,
],

Add these lines in the facades array in config/app.php:, (*3)

'facades' => [
    // Other Facades

    'Tld' => Coreproc\Enom\Facades\Tld::class
    'Domain' => Coreproc\Enom\Facades\Domain::class,
],

Then run this command to publish the config file:, (*4)

php artisan vendor:publish --provider="Coreproc\Enom\Providers\EnomServiceProvider"

Set up your credentials on the published file config/enom.php:, (*5)

<?php

return [
    'userId'   => env('ENOM_USER_ID', ''),
    'password' => env('ENOM_PASSWORD', '')
];

You now have access to the facades Tld and Domain which you can use like so:, (*6)

$tlds = Tld::getList();
$domains = Domain::getList();

No need to manually set up the Enom client - it's already done. Please see methods of each class below., (*7)

Vanilla PHP

Set up the client, (*8)

$enom = new Enom('user-id', 'password');

TLDs

$tld = new Tld($enom);

try {
    $tld->authorize(['com', 'net', 'io']);
} catch (Coreproc\Enom\EnomApiException $e) {
    var_dump($e->getErrors());
}

Methods

Authorize TLDs, (*9)

authorize(array $tlds)

Remove TLDs, (*10)

remove(array $tlds)

Get TLD list, (*11)

getList()

Domains

$domain = new Domain($enom);

try {
    $domain->check('example', 'com');
} catch (Coreproc\Enom\EnomApiException $e) {
    var_dump($e->getErrors());
}

Methods

check($sld, $tld)

getNameSpinner($sld, $tld, $options = [])

getExtendedAttributes($tld)

purchase($sld, $tld, $extendedAttributes = [])

getStatus($sld, $tld, $orderId)

getList()

getInfo($sld, $tld)

setContactInformation($sld, $tld, $contactInfo = [])

getContactInformation($sld, $tld)

getWhoIsContactInformation($sld, $tld)

The Versions

02/03 2016

dev-develop

dev-develop

  Sources   Download

proprietary

The Requires

 

by Justin de Leon

04/12 2015

dev-master

9999999-dev

  Sources   Download

proprietary

The Requires

 

by Justin de Leon