承接 radutopala/php-gitlab-api 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

radutopala/php-gitlab-api

Composer 安装命令:

composer require radutopala/php-gitlab-api

包简介

GitLab API client

关键字:

README 文档

README

Build Status

Based on php-github-api and code from KnpLabs.

Installation

Install Composer

$ curl -sS https://getcomposer.org/installer | php
$ sudo mv composer.phar /usr/local/bin/composer

Add the following to your require block in composer.json config. Note: be careful when using the dev-master tag as this may have unexpected results depending on your version of Gitlab. See the Versioning section below for more information.

"m4tthumphrey/php-gitlab-api": "dev-master"

Include Composer's autoloader:

require_once dirname(__DIR__).'/vendor/autoload.php';

Versioning

From the 6.0 stable release of Gitlab, I shall now be matching the client version with the Gitlab version. For example when Gitlab 6.1 is released I will release version 6.1.0 of the API client. If I need to make future updates to the client before the next API version is released. I will simply use a 3th build version. For example 6.1.1, 6.1.2 etc. It is recommended that you keep your composer file up to date depending on what version of Gitlab you are currently running. So if you are using 6.0, you should required 6.0.*; 6.1 should be 6.1.* etc etc.

General API Usage

$client = new \Gitlab\Client('http://git.yourdomain.com/api/v3/'); // change here
$client->authenticate('your_gitlab_token_here', \Gitlab\Client::AUTH_URL_TOKEN); // change here

$project = $client->api('projects')->create('My Project', array(
  'description' => 'This is a project',
  'issues_enabled' => false
));

Model Usage

You can also use the library in an object oriented manner.

$client = new \Gitlab\Client('http://git.yourdomain.com/api/v3/'); // change here
$client->authenticate('your_gitlab_token_here', \Gitlab\Client::AUTH_URL_TOKEN); // change here

Creating a new project

$project = \Gitlab\Model\Project::create($client, 'My Project', array(
  'description' => 'This is my project',
  'issues_enabled' => false
));

$project->addHook('http://mydomain.com/hook/push/1');

Creating a new issue

$project = new \Gitlab\Model\Project(1, $client);
$issue = $project->createIssue('This does not work..', array(
  'description' => 'This doesnt work properly. Please fix',
  'assignee_id' => 2
));

Closing that issue

$issue->close();

You get the idea! Take a look around and please feel free to report any bugs.

Framework Integrations

If you have integrated GitLab into a popular PHP framework let us know!

Contributing

There are many parts of Gitlab that I have not added to this as it was originally created for personal use, hence the lack of tests. Feel free to fork and add new functionality and tests, I'll gladly accept decent pull requests.

统计信息

  • 总下载量: 31
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 1
  • Forks: 457
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2016-01-31

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固