hades-architect / united-domains
A library to use United Domains domainreselling.de API
0.3.0
2018-04-18 08:07 UTC
Requires
- php: ^7.1
- guzzlehttp/guzzle: ~6.3
- monolog/monolog: 1.*
Requires (Dev)
- phpunit/phpunit: 7.*|6.*|~5.7
This package is not auto-updated.
Last update: 2024-11-10 07:17:31 UTC
README
A convenient tool to use United Domains API. It provides tools for direct API calls and convenient wrappers.
Installation
composer require hades-architect/united-domains 0.2.1
Usage
Simple Client
Recommended way when you would like to have it simple. Provides more convenient way to use API but doesn't cover all known API methods.
$client = new \HadesArchitect\UnitedDomains\ClientFacade($username, $password); $records = $client->getRecords('my-domain.com'); if ($client->isDomainFree('example.com')) { ... }
Powerful Client
Doesn't have fancy facade methods giving you instead only the main call
method. The way to use API directly. No limits, but great power brings great responsibility ;)
$client = new \HadesArchitect\UnitedDomains\Client($username, $password); $response = $client->call('CheckDomain', ['domain' => 'example.com']); echo $response;
Traceable Client
It brings more output if you debug something.
// Client $client = new \HadesArchitect\UnitedDomains\TraceableClient($username, $password); // Logger $client->setLogger( new \Monolog\Logger( 'ud_api', [new \Monolog\Handler\StreamHandler('php://stdout', \Monolog\Logger::DEBUG)], [new \Monolog\Processor\PsrLogMessageProcessor()] ) ); $client->enableDebug(); $response = $client->call('CheckDomain', ['domain' => 'example.com']); echo $response;
Todo
- More tests
- Integration with Travis CI
- More methods for ClientFacade