PHPackages                             socialconnect/github - 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. socialconnect/github

ActiveLibrary[API Development](/categories/api)

socialconnect/github
====================

Awesome SDK to work with GitHub

0.1.0(10y ago)07MITPHPPHP &gt;=5.4

Since Aug 23Pushed 10y ago5 watchersCompare

[ Source](https://github.com/SocialConnect/github)[ Packagist](https://packagist.org/packages/socialconnect/github)[ RSS](/packages/socialconnect-github/feed)WikiDiscussions master Synced 2w ago

READMEChangelog (1)Dependencies (3)Versions (3)Used By (0)

[![](https://camo.githubusercontent.com/72077a3c4109141dba0ab2f1714ff03ba3d347212a1eb729d8dd71cec43ec605/68747470733a2f2f736f6369616c636f6e6e6563742e6769746875622e696f2f6173736574732f69636f6e732f6d61726b2d6769746875622e737667)](https://camo.githubusercontent.com/72077a3c4109141dba0ab2f1714ff03ba3d347212a1eb729d8dd71cec43ec605/68747470733a2f2f736f6369616c636f6e6e6563742e6769746875622e696f2f6173736574732f69636f6e732f6d61726b2d6769746875622e737667) GitHub SDK
============================================================================================================================================================================================================================================================================================================================================================================================================================================================================

[](#-github-sdk)

[![Build Status](https://camo.githubusercontent.com/d1b9e7c6e8eb2f5d0963c48dc47b5bae72f87a79893fbebb29def5ca22f50462/68747470733a2f2f7472617669732d63692e6f72672f536f6369616c436f6e6e6563742f6769746875622e737667)](https://travis-ci.org/SocialConnect/github)[![Scrutinizer Code Quality](https://camo.githubusercontent.com/e6826b097d8b26398a91e3d2f105de335b6b88251da530c6fcdd15c52315cb8d/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f536f6369616c436f6e6e6563742f6769746875622f6261646765732f7175616c6974792d73636f72652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/SocialConnect/github/?branch=master)[![Code Coverage](https://camo.githubusercontent.com/56d12793d95149d3fc43a22eb58c3366ff65a035487dfedd8f1e3d0152fc5a79/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f536f6369616c436f6e6e6563742f6769746875622f6261646765732f636f7665726167652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/SocialConnect/github/?branch=master)[![Latest Stable Version](https://camo.githubusercontent.com/18fa41d10dedb750b60050317955627197af3a421dd09b302bbe8ce84306ad67/68747470733a2f2f706f7365722e707567782e6f72672f736f6369616c636f6e6e6563742f6769746875622f762f737461626c652e737667)](https://packagist.org/packages/socialconnect/github)[![License](https://camo.githubusercontent.com/6d396dd6a11cba8ba48ed8705082865222c32297bbbb750e5266ba8d2417d7ad/68747470733a2f2f706f7365722e707567782e6f72672f536f6369616c436f6e6e6563742f6769746875622f6c6963656e73652e737667)](https://packagist.org/packages/socialconnect/github)

> Awesome SDK to work with [GitHub](https://developer.github.com/)

Available methods:

APIMethodsDocumentationSpecification testsRepositories0/15 ❌[getRepositories](https://developer.github.com/v3/repos/#list-your-repositories)❌❌[getUserRepositories](https://developer.github.com/v3/users/#get-the-authenticated-user)❌❌[getOrgRepositories](https://developer.github.com/v3/users/#update-the-authenticated-user)❌❌Users2/4 ❌[getUser](https://developer.github.com/v3/users/#get-a-single-user)✔️✔️[getSelf](https://developer.github.com/v3/users/#get-the-authenticated-user)❌❌[updateUser](https://developer.github.com/v3/users/#update-the-authenticated-user)❌❌[getUsers](https://developer.github.com/v3/users/#get-all-users)✔️✔️OAuth/WebHook
-------------

[](#oauthwebhook)

This library is a Client only, see:

OAuth provider in [socialconnect/auth](https://github.com/socialconnect/auth) project.

Github WebHook Service in [ovr/github-webhook-service](https://github.com/ovr/github-webhook-service) project.

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

[](#installation)

Add a requirement to your `composer.json`:

```
{
    "require": {
        "socialconnect/github": "~0.1"
    }
}
```

Run the composer installer:

```
php composer.phar install
```

How to use
----------

[](#how-to-use)

First you need to create service:

```
// Your GitHub Application's settings
$appId = 'appId';
$appSecret = 'secret';

$ghClient = new \SocialConnect\GitHub\Client($appId, $appSecret);
$ghClient->setHttpClient(new \SocialConnect\Common\Http\Client\Curl());
```

Get user with specified $id:
----------------------------

[](#get-user-with-specified-id)

```
$ghClient = $ghClient->getUser('ovr');
var_dump($user);
```

Customs methods
---------------

[](#customs-methods)

```
$parameters = [];
$result = $ghClient->request('method/CustomMethod', $parameters);
if ($result) {
    var_dump($result);
}
```

Custom entities
---------------

[](#custom-entities)

```
class MyUserEntitiy extends \SocialConnect\GitHub\Entity\User {
    public function myOwnMethod()
    {
        //do something
    }
}

$ghClient->getEntityUser(new MyUserEntitiy());
$user = $ghClient->getUser(1);

if ($user) {
    $ghClient->myOwnMethod();
}
```

License
-------

[](#license)

This project is open-sourced software licensed under the MIT License. See the LICENSE file for more information.

###  Health Score

23

—

LowBetter than 26% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity4

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity49

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 97.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

Unknown

Total

1

Last Release

3957d ago

### Community

Maintainers

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

---

Top Contributors

[![ovr](https://avatars.githubusercontent.com/u/572096?v=4)](https://github.com/ovr "ovr (37 commits)")[![scrutinizer-auto-fixer](https://avatars.githubusercontent.com/u/6253494?v=4)](https://github.com/scrutinizer-auto-fixer "scrutinizer-auto-fixer (1 commits)")

###  Code Quality

TestsPHPUnit

Code StylePHP\_CodeSniffer

### Embed Badge

![Health badge](/badges/socialconnect-github/health.svg)

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

###  Alternatives

[exsyst/swagger

A php library to manipulate Swagger specifications

35816.3M7](/packages/exsyst-swagger)[hubspot/api-client

Hubspot API client

24015.5M18](/packages/hubspot-api-client)[botman/driver-telegram

Telegram driver for BotMan

93452.6k6](/packages/botman-driver-telegram)[socialconnect/vk-sdk

172.5k](/packages/socialconnect-vk-sdk)

PHPackages © 2026

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