jdubreville/dnsimple 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

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

  1. Fork the project.
  2. Make changes.
  3. Add tests for it. This way future releases can be verified.
  4. Commit your changes.
  5. 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

GitHub 信息

  • Stars: 3
  • Watchers: 1
  • Forks: 3
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2014-11-05