commscenter / name-com-php-sdk
PHP SDK for Name.Com API v4
dev-master
2020-07-08 15:44 UTC
Requires
- pckg-app/api: dev-master
Suggests
- pckg/framework: Add framework to use built-in console commands and providers
This package is auto-updated.
Last update: 2024-12-22 15:24:58 UTC
README
Install package with composer
$ composer require commscenter/name-com-php-sdk
Usage
Standalone
Instantiate new OpenCode\NameCom\Api
class and pass endpoint
, username
and token
.
$api = new \OpenCode\NameCom\Api('endpoint', 'username', 'token');
Pckg framework
Add provider OpenCode\NameCom\Provider\NameCom
and auto resolve Api
object.
$api = resolve(\OpenCode\NameCom\Provider\NameCom::class)
Endpoints
Domain
$api->domain()->checkAvailability('yourdomain.com');
$api->domain()->register('yourdomain.com');