luisalberto / gitlab
通过简单的强大API自动化GitLab。
dev-main
2022-06-11 14:18 UTC
Requires
- php: >=7.4
- ext-json: *
- guzzlehttp/guzzle: ~7.4
Requires (Dev)
- phpunit/php-code-coverage: >=6.0.7
- phpunit/phpunit: >=9.2
This package is auto-updated.
Last update: 2024-09-12 00:34:32 UTC
README
通过简单的强大API自动化GitLab。
要求
- GitLab版本14.7或更高
- PHP版本7.4或更高
安装
composer require luisalberto/gitlab:dev-main
用法
<?php
require_once(dirname( __FILE__ ) . '/vendor/autoload.php');
$client = new \GitLab\Client([
'debug' => true,
'headers' => [
'PRIVATE-TOKEN' => 'your-private-token'
]
]);
$projects = new \GitLab\Projects\Projects($client);
$response = $projects->getProject(12345678);
echo $response->getBody()->getContents();
许可证
完整许可证文本请见LICENSE。