~thirdplace/github-api-client

refactor: create class
initial commit

refs

main
browse  log 

clone

read-only
https://git.sr.ht/~thirdplace/github-api-client
read/write
git@git.sr.ht:~thirdplace/github-api-client

You can also use your local clone with git send-email.

#Github api client

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