gboddin/drone-php-client

0.7.3 2017-09-18 08:12 UTC

This package is not auto-updated.

Last update: 2024-03-16 23:21:15 UTC


README

Drone PHP Client

This client was generated from the swagger.yml file.

This PHP package is automatically generated by the Swagger Codegen project:

  • Package version: 0.7.3

Requirements

PHP 5.5 and later

Installation & Usage

Composer

To install the bindings via Composer, run:

composer require gboddin/php-drone-client

Tests

To run the unit tests:

composer install
./vendor/bin/phpunit

Getting Started

Please follow the installation procedure and then run the following:

<?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;
}

?>

Documentation for API Endpoints

All URIs are relative to http://localhost:8080/api

Class Method HTTP request Description
BuildsApi reposOwnerNameBuildsGet GET /repos/{owner}/{name}/builds Get recent builds
BuildsApi reposOwnerNameBuildsNumberGet GET /repos/{owner}/{name}/builds/{number} Get the latest build
BuildsApi reposOwnerNameBuildsNumberPost POST /repos/{owner}/{name}/builds/{number} Restart a build
BuildsApi reposOwnerNameLogsNumberJobDelete DELETE /repos/{owner}/{name}/logs/{number}/{job} Cancel a Job
BuildsApi reposOwnerNameLogsNumberJobGet GET /repos/{owner}/{name}/logs/{number}/{job} Get build logs
ReposApi reposOwnerNameDelete DELETE /repos/{owner}/{name} Delete a repo
ReposApi reposOwnerNameEncryptPost POST /repos/{owner}/{name}/encrypt Encrypt repo secrets
ReposApi reposOwnerNameGet GET /repos/{owner}/{name} Get a repo
ReposApi reposOwnerNamePatch PATCH /repos/{owner}/{name} Updates a repo
ReposApi reposOwnerNamePost POST /repos/{owner}/{name} Activates a repo
UserApi userGet GET /user Gets a user
UserApi userPatch PATCH /user Updates a user
UserApi userReposGet GET /user/repos Get user repos
UsersApi usersGet GET /users Get all users
UsersApi usersLoginDelete DELETE /users/{login} Delete a user
UsersApi usersLoginGet GET /users/{login} Get a user
UsersApi usersLoginPatch PATCH /users/{login} Update a user
UsersApi usersLoginPost POST /users/{login} Create a user

Documentation For Models

Documentation For Authorization

accessToken

  • Type: API key
  • API key parameter name: access_token
  • Location: URL query string

Author