atlassian/stash-client

Atlassian Stash (Bitbucket v1) 的 PHP 客户端

1.1.1 2019-01-25 17:51 UTC

This package is auto-updated.

Last update: 2024-08-26 07:00:28 UTC


README

Build Status Latest Stable Version

Atlassian Stash PHP 客户端

Atlassian Stash (Bitbucket v1) 的 PHP 客户端

使用 Composer 安装

{
	"require" : {
		"atlassian/stash-client" : "1.1.*"
	}
}

示例

<?php
use Atlassian\Stash\StashClient;

// Init client, user/pass is optional
$stash = new StashClient('http://git.example.com', 'user', 'password');

// returns array of Atlassian\Stash\Api\Project
$projects = $stash->getProjects();

// returns array of Atlassian\Stash\Api\Repo
$repos = $stash->getRepos('test'); // By Project Key

// returns contents of file as a string
$fileContents = $stash->getRepoFileContents($repos[0], '/someFile.txt');

待办事项

当前客户端仅执行少数 GET 操作(见上文);许多方法缺失,请随时提交拉取请求。

参考文档:https://docs.atlassian.com/DAC/rest/stash/3.11.6/stash-rest.html