acexintense / github-wrapper
该软件包最新版本(0.0.1)没有提供许可证信息。
PHP项目的简单GitHub包装器。
0.0.1
2017-03-28 18:57 UTC
Requires
- php: >=5.6.4
This package is not auto-updated.
Last update: 2024-09-20 19:31:25 UTC
README
一个简单的PHP类,允许创建和编辑GitHub的问题。
需求
使用此包装器需要GitHub账户,因为GitHub需要用户的认证。
还需要为该用户生成一个Token。要为用户生成Token,请访问:https://github.com/settings/tokens
选项
这些选项在GitHub.php类中以常量的形式存在。
(string) GITHUB_API - Generic API endpoint.
(string) TOKEN - Generate this for your user.
(string) REPOSITORY_OWNER - Owner of the repository create / update issues on.
(string) REPOSITORY - Repository to create / update issues on.
用法
$github = GitHub::getInstance();
createIssueFromArray(issueContents, decode);
issueContents : array
decode: boolean(*)
issueContents - Structure
[
'title' => '',
'body' => '',
'assignee' => '',
'labels' => [
''
]
]
createIssue(title, body, assignee, labels, decode)
title : string
body : string
assignee : string
labels : array
decode : boolean(*)
updateIssueFromArray(issueId, issueContents, decode)
issueId : int
issueContents : array
decode : boolean(*)
issueContents - Structure
[
'title' => '',
'body' => '',
'assignee' => '',
'state' => '',
'labels' => [
''
]
]
updateIssue(issueId, title, body, assignee, state, labels, decode)
issueId : int
title : string
body : string
assignee : string
state: string
labels : array
decode : boolean(*)
updateIssuesFromArray(issueId, issueContents, decode)
issueId : array
issueContents : array
decode : boolean(*)
issueContents - Structure
[
'title' => '',
'body' => '',
'assignee' => '',
'state' => '',
'labels' => [
''
]
]
updateIssues(issueIds, title, body, assignee, state, labels, decode)
issueIds : array
title : string
body : string
assignee : string
state: string
labels : array
decode : boolean(*)
getIssues(decode)
decode : boolean(*)
(*) Decoding the response from the server from JSON to a PHP array.