PHPackages                             dmyers/octogun - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [API Development](/categories/api)
4. /
5. dmyers/octogun

ActiveLibrary[API Development](/categories/api)

dmyers/octogun
==============

Simple wrapper for the GitHub v3 API

v0.0.5(8y ago)790MITPHPPHP &gt;=5.3.2

Since May 9Pushed 6y ago1 watchersCompare

[ Source](https://github.com/dmyers/octogun)[ Packagist](https://packagist.org/packages/dmyers/octogun)[ Docs](http://github.com/dmyers/octogun)[ RSS](/packages/dmyers-octogun/feed)WikiDiscussions master Synced 1w ago

READMEChangelog (5)Dependencies (3)Versions (6)Used By (0)

Octogun [![Build Status](https://camo.githubusercontent.com/302872a73ad4307178d87758cbc62187dd0cd3ba7c7c5345f540d72c37d9ceb1/68747470733a2f2f7365637572652e7472617669732d63692e6f72672f646d796572732f6f63746f67756e2e706e673f6272616e63683d6d6173746572)](http://travis-ci.org/dmyers/octogun) [![Coverage Status](https://camo.githubusercontent.com/6a8bf1ee9930b61539889b74b3720b568f1f34e43cb414de5b6631ba150b91a3/68747470733a2f2f636f766572616c6c732e696f2f7265706f732f646d796572732f6f63746f67756e2f62616467652e706e67)](https://coveralls.io/r/dmyers/octogun)
======================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================

[](#octogun--)

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

Installation
------------

[](#installation)

Simply install using composer:

```
$ composer require dmyers/octogun
```

### Examples

[](#examples)

#### Show a user

[](#show-a-user)

```
$client = \Octogun\Octogun::users();
$client->user('sferik');
```

#### Show a repository

[](#show-a-repository)

```
$client = \Octogun\Octogun::repositories();
$client->repo('octogun/octogun.rb');
```

#### Authenticated Requests

[](#authenticated-requests)

For methods that require authentication, you'll need to setup a client with your login and password.

```
$client = new \Octogun\Client(['login' => 'me', 'password' => 'sekret']);
$client->users()->follow('sferik');
```

Alternately, you can authenticate with a [GitHub OAuth2 token](http://developer.github.com/v3/oauth).

```
$client = new \Octogun\Client(['login' => 'me', 'oauth_token' => 'oauth2token']);
$client->users()->follow('sferik');
```

### Using with GitHub Enterprise

[](#using-with-github-enterprise)

To use with [GitHub Enterprise](https://enterprise.github.com/), you'll need to set the API and web endpoints before instantiating a client.

```
$client = new \Octogun\Client(['login' => 'USERNAME', 'password' => 'PASSWORD']);
$client->configuration()->set('api_endpoint', 'https://github.company.com/api/v3';
$client->configuration()->set('web_endpoint', 'https://github.company.com/';
```

Copyright
---------

[](#copyright)

Copyright (c) 2013 Derek Myers. See \[LICENSE\]\[\] for details. \[license\]: LICENSE.md

###  Health Score

26

—

LowBetter than 43% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity15

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity52

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 99.4% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~296 days

Total

5

Last Release

3203d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/aaa4519bbe44b5aa912f7a39a04a242a6d55f0ff11c91b86c15a5e91a73e29b9?d=identicon)[dmyers](/maintainers/dmyers)

---

Top Contributors

[![dmyers](https://avatars.githubusercontent.com/u/207171?v=4)](https://github.com/dmyers "dmyers (172 commits)")[![YoruNoHikage](https://avatars.githubusercontent.com/u/969003?v=4)](https://github.com/YoruNoHikage "YoruNoHikage (1 commits)")

---

Tags

apiclientgithubphpgithubGitHub-API

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/dmyers-octogun/health.svg)

```
[![Health](https://phpackages.com/badges/dmyers-octogun/health.svg)](https://phpackages.com/packages/dmyers-octogun)
```

###  Alternatives

[knplabs/github-api

GitHub API v3 client

2.2k15.8M187](/packages/knplabs-github-api)[phpsa/laravel-postman

Export laravel API routes to postman

1014.7k](/packages/phpsa-laravel-postman)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
