Access to Starring and Watching a Repository for [non] authenticated users. Wrap GitHub Activity API.
*** No authentication required. ***
$users = $client->api('user')->starred('ornicar');
Returns an array of starred repos.
$users = $client->api('user')->watched('ornicar');
Returns an array of watched repos.
*** Requires authentication. ***
$activity = $client->api('current_user')->starring()->all();
Returns an array of starred repos.
$owner = "KnpLabs";
$repo = "php-github-api";
$activity = $client->api('current_user')->starring()->check($owner, $repo);
Throws an Exception with code 404 in case that the repo is not starred by the authenticated user or NULL in case that it is starred by the authenticated user.
$owner = "KnpLabs";
$repo = "php-github-api";
$activity = $client->api('current_user')->starring()->star($owner, $repo);
Throws an Exception in case of failure or NULL in case of success.
$owner = "KnpLabs";
$repo = "php-github-api";
$activity = $client->api('current_user')->starring()->unstar($owner, $repo);
Throws an Exception in case of failure or NULL in case of success.
$activity = $client->api('current_user')->watchers()->all();
Returns an array of watched repos.
$owner = "KnpLabs";
$repo = "php-github-api";
$activity = $client->api('current_user')->watchers()->check($owner, $repo);
Throws an Exception with code 404 in case that the repo is not being watched by the authenticated user or NULL in case that it is being watched by the authenticated user.
$owner = "KnpLabs";
$repo = "php-github-api";
$activity = $client->api('current_user')->watchers()->watch($owner, $repo);
Throws an Exception in case of failure or NULL in case of success.
$owner = "KnpLabs";
$repo = "php-github-api";
$activity = $client->api('current_user')->watchers()->unwatch($owner, $repo);
Throws an Exception in case of failure or NULL in case of success.