Weave Code
Code Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Github Api Laravel Package

knplabs/github-api

Lightweight, well-tested PHP wrapper for GitHub APIs v3 (REST) and v4 (GraphQL). PSR-17/PSR-18 compatible via HTTPlug, with easy setup using Guzzle, Symfony HttpClient, or other PSR clients. Supports framework integrations (Laravel via graham-campbell/github).

View on GitHub
Deep Wiki
Context7

Activity API (incomplete)

Back to the navigation

Access to Starring and Watching a Repository for [non] authenticated users. Wrap GitHub Activity API.

*** No authentication required. ***

Get repos that a specific user has starred

$users = $client->api('user')->starred('ornicar');

Returns an array of starred repos.

Get repos that a specific user is watching

$users = $client->api('user')->watched('ornicar');

Returns an array of watched repos.

*** Requires authentication. ***

Get repos that an authenticated user has starred

$activity = $client->api('current_user')->starring()->all();

Returns an array of starred repos.

Get list of private and public events for an authenticated user for all repos

$activity = $client->api('user')->events('ornicar');

Returns an array of private and public events created for all repos related to the user.

Get repos that an authenticated user has starred with creation date

Support for getting the star creation timestamp in the response, using the custom Accept: application/vnd.github.v3.star+json header.

$activity = $client->api('current_user')->starring()->configure('star')->all();

Returns an array of starred repos, including the created_at attribute for every star.

Check if authenticated user has starred a specific repo

$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.

Star a specific repo for 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.

Unstar a specific repo for authenticated user

$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.

Get repos that an authenticated user is watching

$activity = $client->api('current_user')->watchers()->all();

Returns an array of watched repos.

Check if authenticated user is watching a specific repo

$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.

Watch a specific repo for 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.

Stop watching a specific repo for authenticated user

$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.

Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
davejamesmiller/laravel-breadcrumbs
artisanry/parsedown
christhompsontldr/phpsdk
bower-asset/punycode
bower-asset/inputmask
bower-asset/jquery
bower-asset/yii2-pjax
laravel/nova
spatie/laravel-mailcoach
spatie/laravel-superseeder
laravel/liferaft
nst/json-test-suite
danielmiessler/sec-lists
jackalope/jackalope-transport
twbs/bootstrap4
php-http/client-implementation
phpcr/phpcr-implementation
cucumber/gherkin-monorepo
haydenpierce/class-finder
psr/simple-cache-implementation