2017 © Pedro Peláez
 

library php-gitlab-ci-sdk

GitLab CI SDK

image

neilime/php-gitlab-ci-sdk

GitLab CI SDK

  • Monday, November 23, 2015
  • by Neilime
  • Repository
  • 1 Watchers
  • 8 Stars
  • 11 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 1 Forks
  • 0 Open issues
  • 1 Versions
  • 10 % Grown

The README.md

Gitlab CI SDK

Latest Stable Version Total Downloads, (*1)

NOTE : If you want to contribute don't hesitate, I'll review any PR., (*2)

Introduction

Gitlab CI SDK is a PHP Wrapper for use with the Gitlab CI API., (*3)

Based on php-gitlab-api., (*4)

Requirements

Installation

Main Setup

By cloning project

  1. Install the Buzz (>=0.7) by cloning them into ./vendor/.
  2. Clone this project into your ./vendor/ directory.

With composer

  1. Add this project in your composer.json:, (*5)

    "require": {
        "neilime/php-gitlab-ci-sdk": "1.0.0"
    }
    
  2. Now tell composer to download AssetsBundle by running the command:, (*6)

    $ php composer.phar update
    

General API Usage

$oClient = new \GitlabCI\Client('http://ci.example.com/api/v1/'); // change here
$oClient->authenticate('your_gitlab_ci_token_here','http://demo.gitlab.com', \GitlabCI\Client::AUTH_URL_TOKEN); // change here

$oProject = $oClient->api('projects')->create('My Project', array(
  'gitlab_id' => 2,
));

Model Usage

You can also use the library in an object oriented manner., (*7)

$oClient = new \GitlabCI\Client('http://ci.example.com/api/v1/'); // change here
$oClient->authenticate('your_gitlab_ci_token_here','http://demo.gitlab.com', \GitlabCI\Client::AUTH_URL_TOKEN); // change here

Creating a new project, (*8)

```php $oProject = \GitlabCI\Model\Project::create($oClient, 'My Project', array( 'gitlab_id' => 2, ));, (*9)

The Versions

23/11 2015

dev-master

9999999-dev http://neilime.github.io/php-gitlab-ci-sdk

GitLab CI SDK

  Sources   Download

MIT

The Requires

 

api sdk ci gitlab gitlab ci