inquid / yii2-godaddy
Godaddy api library
Installs: 604
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 2
Forks: 0
Open Issues: 0
Type:yii2-extension
Requires
- yiisoft/yii2: ~2.0.0
- yiisoft/yii2-httpclient: ~2.0.0
This package is auto-updated.
Last update: 2024-10-29 05:22:36 UTC
README
Godaddy api library
Godaddy api library
Installation
The preferred way to install this extension is through composer.
Either run
php composer.phar require --prefer-dist inquid/yii2-godaddy "*"
or add
"inquid/yii2-godaddy": "*"
to the require section of your composer.json
file.
Usage
Configuration
Add as component
$config = [ // ... 'components' => [ 'godaddy' => [ 'class' => 'inquid\godaddy\Godaddy', 'apiKey' => 'API_KEY', 'apiSecret' => 'API_SECRET' ], // ... ], ],
Usage
Get domain aviability
$response = Yii::$app->godaddy->getDomainAviability([ 'domain'=>'example.com' ]); print_r($response);
Inserts a new record to a domain
$record = new \inquid\godaddy\models\Record(); $record->setData('XX.XXX.XXX.XX'); $record->setName('subdomain'); $record->setTtl(600); $record->setType('A'); $response = Yii::$app->godaddy->insertRecord("domain.com",$record); print_r($response);