| @@ 76-85 (lines=10) @@ | ||
| 73 | * List all release |
|
| 74 | * @return type |
|
| 75 | */ |
|
| 76 | public function listRepositories($owner,$repo) { |
|
| 77 | try { |
|
| 78 | $url = "https://api.github.com/repos/$owner/$repo/releases"; |
|
| 79 | $releases = $this->github_api->getCurl($url); |
|
| 80 | //dd($releases); |
|
| 81 | return $releases; |
|
| 82 | } catch (Exception $ex) { |
|
| 83 | return redirect('/')->with('fails', $ex->getMessage()); |
|
| 84 | } |
|
| 85 | } |
|
| 86 | ||
| 87 | /** |
|
| 88 | * List only one release by tag |
|
| @@ 125-133 (lines=9) @@ | ||
| 122 | * @param type $id |
|
| 123 | * @return type |
|
| 124 | */ |
|
| 125 | public function getReleaseById($id) { |
|
| 126 | try { |
|
| 127 | $url = "https://api.github.com/repos/ladybirdweb/faveo-helpdesk/releases/$id"; |
|
| 128 | $releaseid = $this->github_api->getCurl($url); |
|
| 129 | return $releaseid; |
|
| 130 | } catch (Exception $ex) { |
|
| 131 | return redirect('/')->with('fails', $ex->getMessage()); |
|
| 132 | } |
|
| 133 | } |
|
| 134 | ||
| 135 | /** |
|
| 136 | * Get the count of download of the release |
|
| @@ 139-147 (lines=9) @@ | ||
| 136 | * Get the count of download of the release |
|
| 137 | * @return array||redirect |
|
| 138 | */ |
|
| 139 | public function getDownloadCount() { |
|
| 140 | try { |
|
| 141 | $url = "https://api.github.com/repos/ladybirdweb/faveo-helpdesk/downloads"; |
|
| 142 | $downloads = $this->github_api->getCurl($url); |
|
| 143 | return $downloads; |
|
| 144 | } catch (Exception $ex) { |
|
| 145 | return redirect('/')->with('fails', $ex->getMessage()); |
|
| 146 | } |
|
| 147 | } |
|
| 148 | ||
| 149 | /** |
|
| 150 | * |
|