serverdensity/sd-api-wrapper 问题修复 & 功能扩展

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

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

serverdensity/sd-api-wrapper

最新稳定版本:0.7.9

Composer 安装命令:

composer require serverdensity/sd-api-wrapper

包简介

A php wrapper for the Server Density API v2

README 文档

README

To get this up and running you need to to use composer.

Download composer

curl -s http://getcomposer.org/installer | php

Then install the dependencies

php composer.phar install

To run the tests run the following command in the terminal

vendor/phpunit/phpunit/phpunit test

To run functional tests you need to type in the following. This will only run the functional tests. You need to submit your own token for this to work though. Which you can do in the following path: test/serverdensity/Tests/functional/TestCase.

vendor/phpunit/phpunit/phpunit --group functional test

How to use it

<?php

use serverdensity\Client;

$client = new Client();
$client->authenticate('auth_token_here');

// A basic call to view devices
$devices = $client->api('devices')->all();

A longer list of examples can be found among our api docs

Installing the wrapper

Copy the json below into composer.json and run php composer.phar install. You can find the package itself on the packagist

{
    "require": {
        "serverdensity/sd-api-wrapper": ">=0.7.4"
    }
}

The following verbs exist

  • Create - creating a resource, takes an array
  • Delete - deleting a resource, takes an ID
  • View - viewing a single resource, taken an ID
  • All - view all resources
  • Update - updating a resource, takes fields that needs updating.
  • Search (for some endpoints).

统计信息

  • 总下载量: 191
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 3
  • 点击次数: 0
  • 依赖项目数: 1
  • 推荐数: 0

GitHub 信息

  • Stars: 3
  • Watchers: 20
  • Forks: 5
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2015-04-21