{"id":20446955,"url":"https://github.com/socialconnect/github","last_synced_at":"2026-04-15T21:32:41.114Z","repository":{"id":20114904,"uuid":"23384698","full_name":"SocialConnect/github","owner":"SocialConnect","description":"GitHub SDK","archived":false,"fork":false,"pushed_at":"2015-10-10T11:10:19.000Z","size":204,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":6,"default_branch":"master","last_synced_at":"2024-10-29T21:06:00.413Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://sc.dmtry.me/","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/SocialConnect.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2014-08-27T09:46:11.000Z","updated_at":"2015-08-23T09:48:32.000Z","dependencies_parsed_at":"2022-07-12T15:17:34.592Z","dependency_job_id":null,"html_url":"https://github.com/SocialConnect/github","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SocialConnect%2Fgithub","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SocialConnect%2Fgithub/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SocialConnect%2Fgithub/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SocialConnect%2Fgithub/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/SocialConnect","download_url":"https://codeload.github.com/SocialConnect/github/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241997289,"owners_count":20055113,"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":[],"created_at":"2024-11-15T10:23:52.166Z","updated_at":"2026-04-15T21:32:41.083Z","avatar_url":"https://github.com/SocialConnect.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# \u003cimg src=\"https://socialconnect.github.io/assets/icons/mark-github.svg\" width=\"27\"\u003e GitHub SDK\n[![Build Status](https://travis-ci.org/SocialConnect/github.svg)](https://travis-ci.org/SocialConnect/github)\n[![Scrutinizer Code Quality](https://scrutinizer-ci.com/g/SocialConnect/github/badges/quality-score.png?b=master)](https://scrutinizer-ci.com/g/SocialConnect/github/?branch=master)\n[![Code Coverage](https://scrutinizer-ci.com/g/SocialConnect/github/badges/coverage.png?b=master)](https://scrutinizer-ci.com/g/SocialConnect/github/?branch=master)\n[![Latest Stable Version](https://poser.pugx.org/socialconnect/github/v/stable.svg)](https://packagist.org/packages/socialconnect/github)\n[![License](https://poser.pugx.org/SocialConnect/github/license.svg)](https://packagist.org/packages/socialconnect/github)\n\n\u003e Awesome SDK to work with [GitHub](https://developer.github.com/)\n\nAvailable methods:\n\n| API          | Methods                                                                                        | Documentation      | Specification tests |\n|--------------|------------------------------------------------------------------------------------------------|--------------------|---------------------|\n| Repositories |                                                                                                | 0/15 :x:           |                     |\n|              | [getRepositories](https://developer.github.com/v3/repos/#list-your-repositories)               | :x:                | :x:                 |\n|              | [getUserRepositories](https://developer.github.com/v3/users/#get-the-authenticated-user)       | :x:                | :x:                 |\n|              | [getOrgRepositories](https://developer.github.com/v3/users/#update-the-authenticated-user)     | :x:                | :x:                 |\n| Users        |                                                                                                | 2/4 :x:            |                     |\n|              | [getUser](https://developer.github.com/v3/users/#get-a-single-user)                            | :heavy_check_mark: | :heavy_check_mark:  |\n|              | [getSelf](https://developer.github.com/v3/users/#get-the-authenticated-user)                   | :x:                | :x:                 |\n|              | [updateUser](https://developer.github.com/v3/users/#update-the-authenticated-user)             | :x:                | :x:                 |\n|              | [getUsers](https://developer.github.com/v3/users/#get-all-users)                               | :heavy_check_mark: | :heavy_check_mark:  |\n\n## OAuth/WebHook\n\nThis library is a Client only, see:\n\nOAuth provider in [socialconnect/auth](https://github.com/socialconnect/auth) project.\n\nGithub WebHook Service in [ovr/github-webhook-service](https://github.com/ovr/github-webhook-service) project.\n\n## Installation\n\nAdd a requirement to your `composer.json`:\n\n```json\n{\n    \"require\": {\n        \"socialconnect/github\": \"~0.1\"\n    }\n}\n```\n\nRun the composer installer:\n\n```bash\nphp composer.phar install\n```\n\nHow to use\n----------\n\nFirst you need to create service:\n\n```php\n// Your GitHub Application's settings\n$appId = 'appId';\n$appSecret = 'secret';\n\n$ghClient = new \\SocialConnect\\GitHub\\Client($appId, $appSecret);\n$ghClient-\u003esetHttpClient(new \\SocialConnect\\Common\\Http\\Client\\Curl());\n```\n\n## Get user with specified $id:\n\n```php\n$ghClient = $ghClient-\u003egetUser('ovr');\nvar_dump($user);\n```\n\n## Customs methods\n\n```php\n$parameters = [];\n$result = $ghClient-\u003erequest('method/CustomMethod', $parameters);\nif ($result) {\n    var_dump($result);\n}\n```\n\n## Custom entities\n\n```php\nclass MyUserEntitiy extends \\SocialConnect\\GitHub\\Entity\\User {\n    public function myOwnMethod()\n    {\n        //do something\n    }\n}\n\n$ghClient-\u003egetEntityUser(new MyUserEntitiy());\n$user = $ghClient-\u003egetUser(1);\n\nif ($user) {\n    $ghClient-\u003emyOwnMethod();\n}\n```\n\nLicense\n-------\n\nThis project is open-sourced software licensed under the MIT License. See the LICENSE file for more information.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsocialconnect%2Fgithub","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsocialconnect%2Fgithub","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsocialconnect%2Fgithub/lists"}