{"id":15502915,"url":"https://github.com/dmyers/octogun","last_synced_at":"2025-04-22T23:14:48.493Z","repository":{"id":8855559,"uuid":"10564782","full_name":"dmyers/octogun","owner":"dmyers","description":"Simple PHP wrapper for the GitHub API","archived":false,"fork":false,"pushed_at":"2019-09-10T16:07:49.000Z","size":355,"stargazers_count":7,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-22T23:14:40.881Z","etag":null,"topics":["api","client","github","php"],"latest_commit_sha":null,"homepage":null,"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/dmyers.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2013-06-08T06:29:52.000Z","updated_at":"2020-04-27T18:07:38.000Z","dependencies_parsed_at":"2022-08-27T20:51:37.410Z","dependency_job_id":null,"html_url":"https://github.com/dmyers/octogun","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dmyers%2Foctogun","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dmyers%2Foctogun/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dmyers%2Foctogun/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dmyers%2Foctogun/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dmyers","download_url":"https://codeload.github.com/dmyers/octogun/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250337950,"owners_count":21414104,"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","client","github","php"],"created_at":"2024-10-02T09:11:34.750Z","updated_at":"2025-04-22T23:14:48.476Z","avatar_url":"https://github.com/dmyers.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Octogun [![Build Status](https://secure.travis-ci.org/dmyers/octogun.png?branch=master)](http://travis-ci.org/dmyers/octogun) [![Coverage Status](https://coveralls.io/repos/dmyers/octogun/badge.png)](https://coveralls.io/r/dmyers/octogun)\n\nSimple PHP wrapper for the GitHub API. This is an unofficial port of [Octokit.rb](https://github.com/octokit/octokit.rb) in PHP. The goal is to have feature parity between languages.\n\n## Installation\n\nSimply install using composer:\n\n```bash\n$ composer require dmyers/octogun\n```\n\n### Examples\n\n#### Show a user\n\n```php\n$client = \\Octogun\\Octogun::users();\n$client-\u003euser('sferik');\n```\n\n#### Show a repository\n\n```php\n$client = \\Octogun\\Octogun::repositories();\n$client-\u003erepo('octogun/octogun.rb');\n```\n\n#### Authenticated Requests\n\nFor methods that require authentication, you'll need to setup a client with\nyour login and password.\n\n```php\n$client = new \\Octogun\\Client(['login' =\u003e 'me', 'password' =\u003e 'sekret']);\n$client-\u003eusers()-\u003efollow('sferik');\n```\n\nAlternately, you can authenticate with a [GitHub OAuth2 token][oauth].\n\n[oauth]: http://developer.github.com/v3/oauth\n\n```php\n$client = new \\Octogun\\Client(['login' =\u003e 'me', 'oauth_token' =\u003e 'oauth2token']);\n$client-\u003eusers()-\u003efollow('sferik');\n```\n\n### Using with GitHub Enterprise\n\nTo use with [GitHub Enterprise](https://enterprise.github.com/), you'll need to\nset the API and web endpoints before instantiating a client.\n\n```php\n$client = new \\Octogun\\Client(['login' =\u003e 'USERNAME', 'password' =\u003e 'PASSWORD']);\n$client-\u003econfiguration()-\u003eset('api_endpoint', 'https://github.company.com/api/v3';\n$client-\u003econfiguration()-\u003eset('web_endpoint', 'https://github.company.com/';\n```\n## Copyright\n\nCopyright (c) 2013 Derek Myers. See [LICENSE][] for details.\n[license]: LICENSE.md\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdmyers%2Foctogun","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdmyers%2Foctogun","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdmyers%2Foctogun/lists"}