PHP code example of emri99 / gitlab-generic-api-client
1. Go to this page and download the library: Download emri99/gitlab-generic-api-client library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
emri99 / gitlab-generic-api-client example snippets
$client = new GitlabApiClient('https://my.gitlab.com/api/v4');
/**
* $branches aint really a Branch instance
* @var Branch[] $branches
*/
$branches = $client->projects(1)
->repository()
->branches()
->get(array(
// parameters
))
// $branches is an array of stdclass having
// the same properties than a Branch class
foreach($branches as $branch) {
echo $branch->name;
}
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.