thirdplace/github-api-client

GitHub API 客户端

dev-main 2022-04-28 17:51 UTC

This package is not auto-updated.

Last update: 2024-09-27 05:19:07 UTC


README

需要个人访问令牌。

  • 获取问题
  • 创建问题

教程

使用composer安装

composer require thirdplace/github-api-client:dev-main

ss用法

<?php

    use Thirdplace\GithubClient;

    $token = '';
    $client = new GithubClient($token);

    $result = $client->github_create_issue('owner', 'repo', '$title', '$text');

    $result = $client->github_get_issues('owner', 'repo');

    print json_encode($result, JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES);

说明

如何做

参考

public function github_create_issue(string $owner, string $repo, string $title, string $body): array

public function github_get_issues(string $owner, string $repo): array