From 95112b1eb06a4be531ded59563d53a63a8d614e8 Mon Sep 17 00:00:00 2001 From: Minteck Date: Sun, 8 Aug 2021 12:04:30 +0200 Subject: Opening! --- includes/stats/apis.php | 46 +++++++++++++++++++++++----------------------- 1 file changed, 23 insertions(+), 23 deletions(-) (limited to 'includes/stats/apis.php') diff --git a/includes/stats/apis.php b/includes/stats/apis.php index 5e8d05b..060ba18 100644 --- a/includes/stats/apis.php +++ b/includes/stats/apis.php @@ -1,23 +1,23 @@ -keys = json_decode(file_get_contents("./credentials.json"), true); - } - - public function GitHub(string $path) { - exec("curl -A \"Minteck-Space/0.0.0 (nekostarfan@gmail.com)\" -H \"Authorization: token " . $this->keys["github"] . "\" https://api.github.com/" . $path, $op); - $result = implode("\n", $op); - - return $result; - } - - public function Reddit(string $path) { - exec("curl -A \"Minteck-Space/0.0.0 (nekostarfan@gmail.com)\" https://www.reddit.com/" . $path . ".json", $op); - $result = implode("\n", $op); - - return $result; - } -} +keys = json_decode(file_get_contents("./credentials.json"), true); + } + + public function GitHub(string $path) { + exec("curl -A \"Minteck-Space/0.0.0 (nekostarfan@gmail.com)\" -H \"Authorization: token " . $this->keys["github"] . "\" https://api.github.com/" . $path, $op); + $result = implode("\n", $op); + + return $result; + } + + public function Reddit(string $path) { + exec("curl -A \"Minteck-Space/0.0.0 (nekostarfan@gmail.com)\" https://www.reddit.com/" . $path . ".json", $op); + $result = implode("\n", $op); + + return $result; + } +} -- cgit