PHPackages                             fenglangyj/gitlabapi - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [API Development](/categories/api)
4. /
5. fenglangyj/gitlabapi

ActiveLibrary[API Development](/categories/api)

fenglangyj/gitlabapi
====================

这是一个 gitlab api sdk，封装了仓用gitlab接口请求

10PHP

Since Dec 16Pushed 4y ago1 watchersCompare

[ Source](https://github.com/fenglangyj/gitlabapi)[ Packagist](https://packagist.org/packages/fenglangyj/gitlabapi)[ RSS](/packages/fenglangyj-gitlabapi/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

gitlab接口调用sdk
=============

[](#gitlab接口调用sdk)

gitlab官方接口文档：
-------------

[](#gitlab官方接口文档)

> [https://docs.gitlab.com/ee/api/api\_resources.html](https://docs.gitlab.com/ee/api/api_resources.html)

使用composer安装
------------

[](#使用composer安装)

> composer require "fenglangyj/gitlabapi"

创建 apitoken
-----------

[](#创建-apitoken)

登录gitlab后台,访问: “http://【您的gitlab域名】/profile/personal\_access\_tokens” 创建 apitoken

使用方法
----

[](#使用方法)

```
  $access_token="【在您gitlab后台获取到的apitoken】";
  $gitlab_url="【您的gitlab访问域名】";
  $GitLabApi = new \fenglangyj\GitLabApi\GitLabApi($access_token,$gitlab_url);

  //获取配置信息
  $conf = $GitLabApi->getConfig();

  //添加账户
  $res = $GitLabApi->users_add('fenglangyj','fenglangyj@139.com','asdfasdf');
  print_r($res);

  //查询所有用户
  $user_all = $GitLabApi->users_all();
  print_r($user_all);

  //查询指定用户
  $user_info = $GitLabApi->users_get('username');
  print_r($user_info);

  //修改用户数据
  $user_info = $GitLabApi->users_put(2,[
      'password'=>'asdfasdf'
  ]);
  print_r($user_info);

  //删除用户数据
  $res = $GitLabApi->users_del(2);
  print_r($res);

  //建立项目，分组id3是米末分组
  $res = $GitLabApi->projects_add('projects_name2','projects_path2',3);
  print_r($res);

```

###  Health Score

15

—

LowBetter than 3% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity2

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity27

Early-stage or recently created project

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

### Community

Maintainers

![](https://www.gravatar.com/avatar/9a4d706d3e93c35409366ec764e70387f08cfe78154f39208fdd171e0e3f93ba?d=identicon)[fenglangyj](/maintainers/fenglangyj)

---

Top Contributors

[![fenglangyj](https://avatars.githubusercontent.com/u/2166661?v=4)](https://github.com/fenglangyj "fenglangyj (11 commits)")

### Embed Badge

![Health badge](/badges/fenglangyj-gitlabapi/health.svg)

```
[![Health](https://phpackages.com/badges/fenglangyj-gitlabapi/health.svg)](https://phpackages.com/packages/fenglangyj-gitlabapi)
```

###  Alternatives

[stripe/stripe-php

Stripe PHP Library

4.0k143.3M480](/packages/stripe-stripe-php)[twilio/sdk

A PHP wrapper for Twilio's API

1.6k92.9M272](/packages/twilio-sdk)[facebook/php-business-sdk

PHP SDK for Facebook Business

90821.9M34](/packages/facebook-php-business-sdk)[meilisearch/meilisearch-php

PHP wrapper for the Meilisearch API

74513.7M114](/packages/meilisearch-meilisearch-php)[google/gax

Google API Core for PHP

265103.1M454](/packages/google-gax)[google/common-protos

Google API Common Protos for PHP

173103.7M50](/packages/google-common-protos)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
