This is a simple, object oriented PHP5 client for GitLab's API, implemented with an intentionally similar API to GitLab's native RESTful API.
- Code Standards: Implements PSR-0 code and structure standards to accommodate auto-loading using Composer or another class auto-loading solution.
- Speed and Familiarity: Lightweight, fast, and friendly object model utilizing lazy loading with an intentional similarly to GitLab's own RESTful API.
- Tests and Continuous Integration: Extensive PHPUnit tests utilizing Travis CI as our continuous integration service.
- Quality, Coverage and Dependencies: Code quality reports with Code Climate, coverage reports with Coveralls, and dependency version monitoring using Gemnasium.
- Documentation and Examples: Comprehensive examples written in markdown and automatically generated API documentationn.
This library requires a short list of dependencies for both a production installation or a development build.
- PHP >= 5.5 or HHVM
- The Curl extension
- The Guzzle HTTP request framework
- The Buzz HTTP request framework until the conversion to Gizzle is complete.
- PHPUnit >= 4.0
- Coveralls Reporter >= 0.6.1
- Code Climate Reporter >= 0.1.2
- Sami >= 2.0
This library can be included into your project easily using Composer by adding the dependency to the require
section of your composer.json
project file.
{
"require": {
"scribe/gitlab-api-library": "dev-master"
}
}
<?php
require_once 'vendor/autoload.php';
$client = new \Gitlab\Client('http://git.yourdomain.com/api/v3/');
$client->authenticate('your_gitlab_token_here', \Gitlab\Client::AUTH_URL_TOKEN);
For general usage and examples, you can check the doc directory. For a comprehensive API reference, check this project's github.io webpage.
This project has code contributed from an array of individuals.