jdubreville/dnsimple
Composer 安装命令:
composer require jdubreville/dnsimple
包简介
PHP Client for dnsimple REST API.
README 文档
README
A PHP Client for the DNSimple API. For information on parameters please review the DNSimple API Reference.
Please note this is still in development on pieces of the code as not all functions have been tested.
Installation
The API Client can be installed using Composer.
Composer
{
"require": {
"jdubreville/dnsipmle_api_client_php": "dev-master"
}
}
Configuration
Configuring the client is done through an instance of the jduebrville\dnsimple\Client class.
use jdubreville\dnsimple\Client as DNSimpleAPI; $email = "email@example.com"; // replace with your account email address $token = "ajfdaojfoawjf98uwejfaw"; // replace with your account token (found in account settings) $client = new DNSimpleAPI($email, $token);
Usage
Basic Operations
// Get all domains $domains = $client->domains()->getAll(); print_r($domains); // Search for a given record. $domains = $client->domains()->getAll(array('name' => 'some_host_name')); print_r($domains); // Create a new domain $newDomain = $client->domains()->create(array( 'name' => 'example.com', ) )); print_r($newDomain); // Get a domain $domain = $client->domains('example.com')->get(); print_r($domain); // Add a Domain Record $client->domains('example.com')->records()->create(array( 'name' => '', 'record_type' => 'A', 'content' => '1.2.3.4' )); // Delete a Domain $client->domains('example.com')->delete();
Note on Patches/Pull Requests
- Fork the project.
- Make changes.
- Add tests for it. This way future releases can be verified.
- Commit your changes.
- Send a pull request.
License
Licensed under the MIT License
Please refer to the LICENSE file for more information.
统计信息
- 总下载量: 114
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 3
- 点击次数: 1
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2014-11-05