PHP Classes

File: Readme

Recommend this page to a friend!
  Classes of Mat Jung  >  Github PHP API Library  >  Readme  >  Download  
File: Readme
Role: Documentation
Content type: text/plain
Description: Readme
Class: Github PHP API Library
Get responses to requests to the Github API
Author: By
Last change: Entered reference to Example
Date: 2 years ago
Size: 622 bytes
 

Contents

Class file image Download
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
For more information send a message to info at phpclasses dot org.