2017 © Pedro Peláez
 

library gitlab-api

A guzzle 5 client for the gitlab API using service descriptions

image

fgrosse/gitlab-api

A guzzle 5 client for the gitlab API using service descriptions

  • Monday, September 28, 2015
  • by FGrosse
  • Repository
  • 2 Watchers
  • 3 Stars
  • 19 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 2 Versions
  • 6 % Grown

The README.md

PHP Gitlab API

Build Status HHVM Status PHP 7 ready Coverage Status Scrutinizer Code Quality, (*1)

Latest Stable Version Latest Unstable Version License, (*2)

This is a php client for the gitlab API. This client bases on Guzzle 5 with service descriptions. You can have a quick overview of the implemented gitlab APIs in the yml files in [lib/Client/ServiceDescription][6]., (*3)

Implemented APIs (Gitlab ~7.7)

Dependencies

Gitlab-api requires at least PHP 5.5 and also been successfully tested using PHP 7 and HHVM. Furthermore the whole client is build upon the awesome Guzzle Services by Michael Dowling., (*4)

Installation

The preferred way to install this library is to rely on Composer:, (*5)

$ composer require fgrosse/gitlab-api

Usage

The API is still work in progress and the actual usage might change in the future., (*6)

The stable part of this API is available through the GitlabClient interface:, (*7)

$guzzleClient = GitlabGuzzleClient::factory([
    'base_url'  => $baseUrl,
    'api_token' => $token,
]);

$client = new HttpGitlabClient($guzzleClient);

$mergeRequests = $client->listMergeRequests($project,
    $state='closed',
    $order='updated_at',
    $sort='asc',
    $page=1, $perPage=5
);

If you want to access more functionality consider using the GitlabClient directly:, (*8)

$client = GitlabClient::factory([
    'base_url'  => $baseUrl,
    'api_token' => $token,
]);

$mergeRequests = $client->listMergeRequests([
    'project_id' => $project,
    'state'      => 'closed',
    'order_by'   => 'updated_at',
    'sort'       => 'asc',
    'page'       => 0,
    'per_page'   => 5,
]);

Checkout the [lib/Client/ServiceDescription][6] to see the available parameters for each API call. An executable example can be found in examples/merge_requests/api.php., (*9)

Not implemented APIs (yet)

  • deploy_key_multiple_projects API
  • deploy_keys API
  • groups API
  • milestones API
  • notes API
  • oauth2 API
  • project_snippets API
  • projects API
  • repositories API
  • repository_files API
  • services API
  • session API
  • system_hooks API
  • users API

License

This library is distributed under the MIT License., (*10)

The Versions

28/09 2015

dev-master

9999999-dev https://github.com/fgrosse/gitlab-api

A guzzle 5 client for the gitlab API using service descriptions

  Sources   Download

MIT

The Requires

 

The Development Requires

28/09 2015

0.9.0

0.9.0.0 https://github.com/fgrosse/gitlab-api

A guzzle 5 client for the gitlab API using service descriptions

  Sources   Download

MIT

The Requires

 

The Development Requires