mcmatters/gitlab-api

0.1 2019-10-08 11:46 UTC

README

Installation

composer require mcmatters/gitlab-api

Usage

<?php

declare(strict_types = 1);

require 'vendor/autoload.php';

$client = new \McMatters\GitlabApi\GitlabClient('URL', 'TOKEN');

// You can use one of the fifth resource contexts:
// 1. Groups
// 2. Projects
// 3. Standalone
// 4. Users
// 5. Templates
// Each of them you can find on https://gitlab.com/help/api/api_resources.md
$epics = $client->group()->epic()->list(1);
$mergeRequests = $client->project()->mergeRequest()->list(1);
$queueMetrics = $client->standalone()->sidekiqMetric()->queueMetrics();
$starredProjects = $client->user()->project()->listStarred(1);
$dockerTemplates = $client->template()->dockerfile()->list();