Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
56 changes: 28 additions & 28 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,15 @@
Add this on your `composer.json`:

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

# Usage

## Laravel 5.x users
Expand All @@ -20,27 +20,27 @@ Add this line in the `providers` array in `config/app.php`:

'providers' => [
// Other Service Providers

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

Add these lines in the `facades` array in `config/app.php`:

'facades' => [
// Other Facades

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

Then run this command to publish the config file:

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

Set up your credentials on the published file `config/enom.php`:

<?php

return [
'userId' => env('ENOM_USER_ID', ''),
'password' => env('ENOM_PASSWORD', '')
Expand All @@ -50,9 +50,9 @@ You now have access to the facades `Tld` and `Domain` which you can use like so:

$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.

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

## Vanilla PHP

Set up the client
Expand All @@ -62,56 +62,56 @@ Set up the client
## TLDs

$tld = new Tld($enom);

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

## Methods

Authorize TLDs

authorize(array $tlds)

Remove TLDs

remove(array $tlds)

Get TLD list

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)