|
@@ -27,7 +27,9 @@ try {
|
|
|
|
|
|
$repos = $me->repos()->load();
|
|
$repos = $me->repos()->load();
|
|
|
|
|
|
- echo "\nNormal repo\n";
|
|
|
|
|
|
+ $repo = $repos->get("gogs-php-api-client");
|
|
|
|
+
|
|
|
|
+ /*echo "\nNormal repo\n";
|
|
foreach($repos->all() as $key => $repo)
|
|
foreach($repos->all() as $key => $repo)
|
|
echo sprintf("* %s: %s\n", $key, $repo->name);
|
|
echo sprintf("* %s: %s\n", $key, $repo->name);
|
|
|
|
|
|
@@ -107,7 +109,7 @@ try {
|
|
throw new ApiException\NotAuthorizedException("Creating organization", $e->getCode(), $e);
|
|
throw new ApiException\NotAuthorizedException("Creating organization", $e->getCode(), $e);
|
|
} catch (ApiException\HTTPUnexpectedResponse $e) {
|
|
} catch (ApiException\HTTPUnexpectedResponse $e) {
|
|
echo $e->getResponse();
|
|
echo $e->getResponse();
|
|
- }*/
|
|
|
|
|
|
+ }
|
|
|
|
|
|
echo "\nLooking up organizations of test-" . $me->username . "\n";
|
|
echo "\nLooking up organizations of test-" . $me->username . "\n";
|
|
foreach($orgs->search(array("name" => "test-" . $me->username))->all() as $key => $org)
|
|
foreach($orgs->search(array("name" => "test-" . $me->username))->all() as $key => $org)
|
|
@@ -124,7 +126,7 @@ try {
|
|
echo sprintf("%s: delete %s\n", $key, $user->delete() ? "true" : "false");
|
|
echo sprintf("%s: delete %s\n", $key, $user->delete() ? "true" : "false");
|
|
|
|
|
|
|
|
|
|
-
|
|
|
|
|
|
+ */
|
|
echo "\n\n\nLOG:\n" . join("\n", $client->get_log());
|
|
echo "\n\n\nLOG:\n" . join("\n", $client->get_log());
|
|
|
|
|
|
} catch (ApiException\NotAuthorizedException $e) {
|
|
} catch (ApiException\NotAuthorizedException $e) {
|