dopee/transip-api

TransIp API 客户端

1.4.6 2017-05-09 12:50 UTC

This package is auto-updated.

Last update: 2024-09-09 18:19:52 UTC


README

transip API 包装器

###Symfony2 你想在 symfony2 项目中使用 TransIp API 吗?

https://github.com/dopee/transip-api-bundle

安装

composer.json

"require": {
  ...
  "dopee/transip-api": "1.1.0"
}

运行 composer update verschoof/transip-api-bundle

用法

$login      = ''; // Your login at transip
$privateKey = ''; // Your key from transip

$client = new Transip\Client($login, $privateKey, true);

$domainApi  = $client->api('domain');
$domainInfo = $domainApi->getInfo('domain.com'); 
// This returns an exception if the domain cannot be found !
// So it might be wise to do it in a try catch instruction
$status = $domainApi->checkAvailability(); 
// returns the string FREE if the domain is available

TransIp API 文档

https://api.transip.nl/docs/transip.nl/