The class has a dependency with PHP cURL
https://www.php.net/manual/en/book.curl.php
If that is not working for you, the class won't work for you.
Class namespace: namespace php\github;
Instantiation:
$hub = new php\github\phpGithub();
Optional
$hub->AddCurlConfig(CURLOPT_CAINFO, "/path/to/php/curl/cacert.pem");
Sample client
$response=$hub->returnRoot();
if($response->success) {
echo $response->urlip ." " . $response->url ." " . $response->http_code . "<br>";
}
Sample output
140.82.112.6 https://api.github.com/ 200
In tab Example you find a more comprehensive sample github api client
|