定制 chrometoaster/sitehost-api-client 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

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

chrometoaster/sitehost-api-client

Composer 安装命令:

composer require chrometoaster/sitehost-api-client

包简介

PHP client for SiteHost's API

README 文档

README

Overview

This is a work in progress piece of code that may or may not get extended further as/when needed.

API documentation

SiteHost's API documentation

Features

  • Get API info
  • Get cloud stack info
  • Update cloud stack info
  • Get API job info

Installation

composer install chrometoaster/sitehost-api-client:~0.1

Example usage

It is recommended to define the API key and the client ID as environment variables, e.g. through your cloud container environment variables configuration or via your virtual host configuration.

use Chrometoaster\SiteHost\API\Client as SiteHostAPIClient;

$env_api_key   = getenv('SITEHOST_API_KEY');
$env_client_id = getenv('SITEHOST_CLIENT_ID');

// create a client
$client = new SiteHostAPIClient($env_api_key, $env_client_id);

// read cloud stack info
$info = $client->getStackInfo('ex-myserver', 'abc123def456ab12');

// check the response is valid and has data
if ($info->isValid()) {
    // work with the information here
    ...
    ... 
}

TODO

  • Implement methods and handling for other API endpoints
  • Add tests.

Licence

BSD-3-Clause, see the licence for details.

Contributing

In general, please be nice to each other. For more details see the Code of Conduct.

Code guidelines

This project follows the standards defined in:

Before submitting a PR, please run the script below to lint and update the code according to the standards above.

composer run full-check

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: BSD-3-Clause
  • 更新时间: 2019-11-14

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固