{"id":18722146,"url":"https://github.com/muetze42/github-api","last_synced_at":"2025-04-12T15:30:34.473Z","repository":{"id":223043843,"uuid":"759150343","full_name":"Muetze42/github-api","owner":"Muetze42","description":"A PHP GitHub API wrapper wich used the Laravel HTTP Client (based on Guzzle HTTP client)","archived":true,"fork":false,"pushed_at":"2024-03-11T16:55:49.000Z","size":90,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-12T11:54:54.036Z","etag":null,"topics":["api-wrapper","github-api","guzzle-http","http-client","illuminate-http","php-8-2"],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Muetze42.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"license","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"github":["Muetze42"],"ko_fi":"normanhuth","custom":["https://huth.it/coffee"]}},"created_at":"2024-02-17T19:33:27.000Z","updated_at":"2024-03-12T18:44:45.000Z","dependencies_parsed_at":"2024-11-07T13:42:37.416Z","dependency_job_id":"c572b610-1f63-4d1a-9db2-c148ec2833f0","html_url":"https://github.com/Muetze42/github-api","commit_stats":null,"previous_names":["muetze42/github-api"],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Muetze42%2Fgithub-api","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Muetze42%2Fgithub-api/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Muetze42%2Fgithub-api/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Muetze42%2Fgithub-api/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Muetze42","download_url":"https://codeload.github.com/Muetze42/github-api/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248589218,"owners_count":21129564,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["api-wrapper","github-api","guzzle-http","http-client","illuminate-http","php-8-2"],"created_at":"2024-11-07T13:40:04.934Z","updated_at":"2025-04-12T15:30:34.026Z","avatar_url":"https://github.com/Muetze42.png","language":"PHP","funding_links":["https://github.com/sponsors/Muetze42","https://ko-fi.com/normanhuth","https://huth.it/coffee"],"categories":[],"sub_categories":[],"readme":"# GitHub API\n\nA PHP GitHub API wrapper wich used the [Laravel HTTP Client](https://laravel.com/docs/http-client) (based on\n[Guzzle HTTP client](http://docs.guzzlephp.org/en/stable/)).\n\nThis package does not require Laravel and can be used in any PHP application.\n\nThe API endpoint methods are automatically generated with the references from\n[octokit/openapi](https://github.com/octokit/openapi/).\n\n## Installation\n\n```shell\ncomposer require norman-huth/github-api\n```\n\n## Usage\n\n```php\n\u003c?php\n\nuse NormanHuth\\GithubApi\\Client;\n\nrequire_once __DIR__ . '/vendor/autoload.php';\n\n$client = new Client('{GITHUB_TOKEN_HERE}');\n\n$response = $client-\u003erepos()-\u003ereposCreateAFork(\n    owner: 'Muetze42',\n    repo: 'github-api',\n    requestBody: ['organization' =\u003e 'MyVendor', 'name' =\u003e 'MyRepo']\n);\n\n// Get data as array\nreturn $response-\u003ejson()\n// Get data as object\nreturn $response-\u003eobject()\n// More infos: https://laravel.com/docs/http-client#making-requests\n```\n\nEvery method returns a `\\Illuminate\\Http\\Client\\Response`.\n\n```php\n\u003c?php\n\nif ($response-\u003esuccessful()) {\n    return $response-\u003ejson();\n}\n```\n\n## Endpoints\n\nSee [ENDPOINTS.md](ENDPOINTS.md)\n\n## Aliases methods for the current authenticated user\n\nFor frequently used endpoints for the current authenticated user, there are also additional methods that can be called\ndirectly from the client.\n\n### Get the authenticated user\n\nAlias for `$client-\u003eusers()-\u003egetTheAuthenticatedUser()`.\n\nUse the REST API to get public and private information about authenticated users.\n\nReference: https://docs.github.com/en/rest/users/users#get-the-authenticated-user\n\n```php\n\u003c?php\n\n$client-\u003ewhoami();\n```\n\n### List repositories for the authenticated user\n\nReference: https://docs.github.com/en/rest/repos/repos#list-repositories-for-the-authenticated-user\n\nAlias for `$client-\u003erepos()-\u003elistRepositoriesForTheAuthenticatedUser()`.\n\n```php\n\u003c?php\n\n$client-\u003euserRepositories();\n```\n\n### List gists for the authenticated user\n\nReference: https://docs.github.com/rest/gists/gists#list-gists-for-the-authenticated-user\n\nAlias for `$client-\u003egists()-\u003elistGistsForTheAuthenticatedUser()`.\n\n```php\n\u003c?php\n\n$client-\u003euserGists();\n```\n\n### List issues assigned to the authenticated user\n\nReference: https://docs.github.com/rest/issues/issues#list-issues-assigned-to-the-authenticated-user\n\nAlias for `$client-\u003eissues()-\u003elistIssuesAssignedToTheAuthenticatedUser()`.\n\n```php\n\u003c?php\n\n$client-\u003euserIssues();\n```\n\n### List notifications for the authenticated user\n\nReference: https://docs.github.com/rest/activity/notifications#list-notifications-for-the-authenticated-user\n\nAlias for `$client-\u003eactivity()-\u003elistNotificationsForTheAuthenticatedUser()`.\n\n```php\n\u003c?php\n\n$client-\u003euserNotifications();\n```\n\n### List organization issues assigned to the authenticated user\n\nReference: https://docs.github.com/rest/issues/issues#list-organization-issues-assigned-to-the-authenticated-user\n\nAlias for `$client-\u003eissues()-\u003elistOrganizationIssuesAssignedToTheAuthenticatedUser()`.\n\n```php\n\u003c?php\n\n$client-\u003euserOrganizationIssues();\n```\n\n### List repository notifications for the authenticated user\n\nReference: https://docs.github.com/rest/activity/notifications#list-repository-notifications-for-the-authenticated-user\n\nAlias for `$client-\u003eactivity()-\u003elistRepositoryNotificationsForTheAuthenticatedUser()`.\n\n```php\n\u003c?php\n\n$client-\u003euserRepositoryNotifications();\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmuetze42%2Fgithub-api","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmuetze42%2Fgithub-api","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmuetze42%2Fgithub-api/lists"}