thirdplace / github-api-client
Client for github api
dev-main
2022-04-28 17:51 UTC
Requires
- php: >=7.4
- ext-curl: *
- ext-json: *
This package is not auto-updated.
Last update: 2024-05-24 03:40:48 UTC
README
Requires a personal access token.
- Get issues
- Create an issue
Tutorial
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);
Explanation
How-to
Reference
public function github_create_issue(string $owner, string $repo, string $title, string $body): array
public function github_get_issues(string $owner, string $repo): array