yet another github api refactoring
[pharext/pharext.org] / app / Github / API / Repos / ReposCallback.php
diff --git a/app/Github/API/Repos/ReposCallback.php b/app/Github/API/Repos/ReposCallback.php
new file mode 100644 (file)
index 0000000..78d68c9
--- /dev/null
@@ -0,0 +1,15 @@
+<?php
+
+namespace app\Github\API\Repos;
+
+use app\Github\API\Callback;
+use app\Github\API\Hooks\HooksCallback;
+
+class ReposCallback extends Callback
+{
+       function __invoke($json, $links = null) {
+               foreach ($json as $repo) {
+                       $this->api->listHooks($repo->full_name, new HooksCallback($this->api, $repo));
+               }
+       }
+}