gboddin/drone-php-client

Drone PHP 客户端

0.7.3 2017-09-18 08:12 UTC

This package is not auto-updated.

Last update: 2024-09-15 02:03:29 UTC


README

Drone PHP 客户端

此客户端是从 swagger.yml 文件生成的。

此 PHP 包是由 Swagger Codegen 项目自动生成的

  • 包版本:0.7.3

要求

PHP 5.5 及以上版本

安装与使用

Composer

要使用 Composer 安装绑定,请运行

composer require gboddin/php-drone-client

测试

要运行单元测试

composer install
./vendor/bin/phpunit

入门指南

请按照 安装过程 进行操作,然后运行以下命令

<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: accessToken
DroneClient\Configuration::getDefaultConfiguration()->setApiKey('access_token', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// DroneClient\Configuration::getDefaultConfiguration()->setApiKeyPrefix('access_token', 'Bearer');

$api_instance = new DroneClient\Api\BuildsApi();
$owner = "owner_example"; // string | owner of the repository
$name = "name_example"; // string | name of the repository

try {
    $result = $api_instance->reposOwnerNameBuildsGet($owner, $name);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling BuildsApi->reposOwnerNameBuildsGet: ', $e->getMessage(), PHP_EOL;
}

?>

API 端点文档

所有 URI 都相对于 https://:8080/api

模型文档

授权文档

accessToken

  • 类型:API 密钥
  • API 密钥参数名:access_token
  • 位置:URL 查询字符串

作者