/** * @return array[\GitHub\WebhookList] */ public function webhooks() { $url = \GitHub::$endpoint . "repositories/{$this->id}/hooks"; $data = \GitHub::request($url); $return = new WebhookList((array) $data, $this); return $return; }
/** * @return array[\GitHub\Repo] */ public function getRepos() { $url = \GitHub::$endpoint . "users/{$this->login}/repos"; $data = \GitHub::request($url); $return = []; foreach ($data as $repo) { $return[$repo->name] = new Repo(); $return[$repo->name]->setData($repo); } return (array) $return; }