refactor: create class
initial commit
Requires a personal access token.
Install with composer:
composer require thirdplace/github-api-client:dev-main
ss Usage:
<?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