12345678910111213141516171819202122232425 |
- <?php namespace Client;
- class GogsAPI {
- use \Lib\Curl;
- public function __construct($api_url, $api_token) {
- $this->url = $api_url;
- $this->token = $api_token;
- }
- public function users() {
- return new Request\Users($this->url, $this->token);
- }
- public function repos() {
- return new Request\Repos($this->url, $this->token);
- }
- public function user(string $name = "me") {
- return new Request\User($this->url, $this->token, $name);
- }
- public function __destruct() {}
- }
- ?>
|