ethananony/gitea
最新稳定版本:v1.0.2
Composer 安装命令:
composer require ethananony/gitea
包简介
Gitea API
README 文档
README
This package provides an API client for Gitea API Version 1.
Getting Started
Prerequisites
This package has the following requirements:
- PHP 7.2
Installing
Install latest version via composer:
composer require avency/gitea
Basic usage
// This file is generated by Composer
require_once __DIR__ . '/vendor/autoload.php';
// - - - - -
// Create client and authenticate
$giteaClient = new Avency\Gitea\Client(
'https://gitea.yourdomain.com',
[
'type' => Avency\Gitea\Client::AUTH_TOKEN,
'auth' => 'your-auth-token'
]
);
or
$giteaClient = new Avency\Gitea\Client(
'https://gitea.yourdomain.com',
[
'type' => Avency\Gitea\Client::AUTH_BASIC_AUTH,
'auth' => [
'username' => 'your-username',
'password' => 'your-password',
]
]
);
// - - - - -
// Get a single repository
$repository = $giteaClient->repositories()->get('owner', 'repoName');
// Get version
$repository = $giteaClient->miscellaneous()->version();
Run an API call as another user:
// e.g. check subscription status as a user
$status = $giteaClient->sudo('username')->repositories()->checkSubscription();
Versioning
We use SemVer for versioning. For the versions available, see the tags on this repository.
Authors
- Michael Gerdemann - avency GmbH
See also the list of contributors who participated in this project.
License
This project is licensed under the MIT License - see the LICENSE.md file for details
Status of endpoints
Admin
Miscellaneous
Organization
Issue
Repository
User
Users
统计信息
- 总下载量: 182
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 2
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2022-08-10