PHPackages                             onecreate/oc-api - 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. onecreate/oc-api

ActiveLibrary[API Development](/categories/api)

onecreate/oc-api
================

A RESTful API package

v0.0.6(8y ago)020Apache-2.0JavaScript

Since Dec 8Pushed 8y ago1 watchersCompare

[ Source](https://github.com/guozqiu/oc-api)[ Packagist](https://packagist.org/packages/onecreate/oc-api)[ RSS](/packages/onecreate-oc-api/feed)WikiDiscussions master Synced 4d ago

READMEChangelogDependencies (2)Versions (7)Used By (0)

OC-Api
======

[](#oc-api)

说明
--

[](#说明)

thinkphp5编写的restful风格的API，集API请求处理，权限认证，自动生成文档等功能；

- restful风格处理请求

> 每个接口对于一个控制器，method对应\[method\]方法响应

- 权限认证

> Basic,Oauth Client Credentials Grant

- 文档生成

> 简洁，优雅，不需要额外的文档工具;

安装
--

[](#安装)

- 如果想在你的TP5项目中使用,那么可以直接使用

```
composer require onecreate/oc-api

```

- 如果是新项目先要创建tp5项目,然后再require

```
composer create-project topthink/think api  --prefer-dist
composer require onecreate/oc-api

```

- 在扩展配置目录（extra）中增加api\_doc.php

```
return [
    '1' => ['name' => 'v1版本接口', 'id' => '1', 'parent' => '0', 'class' => '', 'readme' => ''],
    '2' => ['name' => 'v2版本接口', 'id' => '2', 'parent' => '0', 'class' => '', 'readme' => ''],
    '10' => ['name' => '公用接口', 'id' => '10', 'parent' => '1', 'class' => '', 'readme' => '/doc/common/common.md'],
    //用户接口
    '20' => ['name' => '用户接口', 'id' => '20', 'parent' => '1', 'readme' => '', 'class' => ''],
    //用户接口-基础接口
    '21' => ['name' => '用户接口-基础接口', 'id' => '21', 'parent' => '20', 'readme' => '/doc/user/base.md', 'class' => ''],
    //用户接口-个人中心
    '22' => ['name' => '用户接口-个人中心', 'id' => '22', 'parent' => '20', 'readme' => '/doc/user/account.md', 'class' => ''],
    //众筹项目接口
    '30' => ['name' => '众筹项目接口', 'id' => '30', 'parent' => '2', 'readme' => '/doc/project/project.md', 'class' => ''],
];

```

###  Health Score

25

—

LowBetter than 37% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity57

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 50% 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.

###  Release Activity

Cadence

Every ~1 days

Total

6

Last Release

3076d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/4d1195e14a13b422c1cec5d9000159977d56df932a4aaa692175432a44a88018?d=identicon)[guozqiu](/maintainers/guozqiu)

---

Top Contributors

[![guozqiu](https://avatars.githubusercontent.com/u/2257844?v=4)](https://github.com/guozqiu "guozqiu (7 commits)")[![liushoukun](https://avatars.githubusercontent.com/u/26298472?v=4)](https://github.com/liushoukun "liushoukun (7 commits)")

### Embed Badge

![Health badge](/badges/onecreate-oc-api/health.svg)

```
[![Health](https://phpackages.com/badges/onecreate-oc-api/health.svg)](https://phpackages.com/packages/onecreate-oc-api)
```

###  Alternatives

[naixiaoxin/think-wechat

EasyWechat For Thnkphp5.1+

27316.1k1](/packages/naixiaoxin-think-wechat)[gatsbyjs/wp-gatsby

Optimize your WordPress site as a source for Gatsby site(s)

16813.5k](/packages/gatsbyjs-wp-gatsby)[weiwei/api-doc

The ThinkPHP6 Api Doc Package

10710.2k](/packages/weiwei-api-doc)[liushoukun/dawn-api

A RESTful API package

283.2k](/packages/liushoukun-dawn-api)

PHPackages © 2026

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