{"id":15293649,"url":"https://github.com/serhii-londar/githubapi","last_synced_at":"2025-04-13T13:24:27.320Z","repository":{"id":28822897,"uuid":"116837728","full_name":"serhii-londar/GithubAPI","owner":"serhii-londar","description":"Swift implementation of Github REST API v3","archived":false,"fork":false,"pushed_at":"2021-11-02T16:15:19.000Z","size":591,"stargazers_count":87,"open_issues_count":2,"forks_count":23,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-04-09T03:05:27.103Z","etag":null,"topics":["api","github-api","githubapi","hacktoberfest","rest","rest-api","swift","swift4"],"latest_commit_sha":null,"homepage":"","language":"Swift","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/serhii-londar.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-01-09T16:00:42.000Z","updated_at":"2024-12-23T22:14:15.000Z","dependencies_parsed_at":"2022-07-25T18:02:54.540Z","dependency_job_id":null,"html_url":"https://github.com/serhii-londar/GithubAPI","commit_stats":null,"previous_names":[],"tags_count":11,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/serhii-londar%2FGithubAPI","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/serhii-londar%2FGithubAPI/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/serhii-londar%2FGithubAPI/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/serhii-londar%2FGithubAPI/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/serhii-londar","download_url":"https://codeload.github.com/serhii-londar/GithubAPI/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248719020,"owners_count":21150676,"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","github-api","githubapi","hacktoberfest","rest","rest-api","swift","swift4"],"created_at":"2024-09-30T16:50:24.866Z","updated_at":"2025-04-13T13:24:27.271Z","avatar_url":"https://github.com/serhii-londar.png","language":"Swift","readme":"# GitHubAPI\n\n[![CI Status](http://img.shields.io/travis/serhii-londar/GithubAPI.svg?style=flat)](https://travis-ci.org/serhii-londar/GithubAPI)\n[![Version](https://img.shields.io/cocoapods/v/GithubAPI.svg?style=flat)](http://cocoapods.org/pods/GithubAPI)\n[![License](https://img.shields.io/cocoapods/l/GithubAPI.svg?style=flat)](http://cocoapods.org/pods/GithubAPI)\n[![Platform](https://img.shields.io/cocoapods/p/GithubAPI.svg?style=flat)](http://cocoapods.org/pods/GithubAPI)\n\nSwift implementation of GitHub REST api v3. Library support Swift 4.2. Work is in progress. \n\nCurrently supported: \n\n- [x] [Issues API](https://developer.github.com/v3/issues/).\n- [x] [Activity API(Feeds, Notification)](https://developer.github.com/v3/activity/notifications/).\n- [x] [Repositories API](https://developer.github.com/v3/repos/).\n- [x] [Search API](https://developer.github.com/v3/search/).\n- [x] [User API](https://developer.github.com/v3/users/).\n\nTODO:\n\n- [ ] [Activity API (Events, Starring, Watching)](https://developer.github.com/v3/activity/).\n- [ ] [Organizations API](https://developer.github.com/v3/orgs/).\n- [ ] [Projects API](https://developer.github.com/v3/projects/).\n- [ ] [Pull Requests API](https://developer.github.com/v3/pulls/). \n- [ ] [Reactions API](https://developer.github.com/v3/reactions/).\n- [ ] [Repositories API](https://developer.github.com/v3/repos/).\n- [ ] [Users API (Emails, Followers, Public Keys, GPG Keys, Block Another User)](https://developer.github.com/v3/users/).\n- [ ] Documentation.\n\n## Example Usage\n\n### Authentication\n\n#### Basic Authentication\n\nThis lib support Basic Authentication with login/password:\n\n```swift\nlet authentication = BasicAuthentication(username: \"username\", password: \"password\")\nUserAPI(authentication: authentication).getUser { (response, error) in\n\tif let response = response {\n\t\tprint(response)\n\t} else {\n\t\tprint(error ?? \"\")\n\t}\n}\n```\n\n#### OAuth2 Token (sent in a header)\n\nIf you generate personal access token or receive access token from OAuth2, you can use it with AccessTokenAuthentication:\n\n```swift\nlet authentication = AccessTokenAuthentication(access_token: \"token\")\nUserAPI(authentication: authentication).getUser(username: \"serhii-londar\") { (response, error) in\n\tif let response = response {\n\t\tprint(response)\n\t} else {\n\t\tprint(error ?? \"\")\n\t}\n}\n```\n\n#### OAuth2 Token (sent as a parameter)\n\nIf you generate personal access token or receive access token from OAuth2, you can use it in next way:\n\n```swift\nlet authentication = TokenAuthentication(token: \"token\")\nUserAPI(authentication: authentication).getAllUsers(since: \"1\") { (reposne, error) in\n\tif let response = response {\n\t\tprint(response)\n\t} else {\n\t\tprint(error ?? \"\")\n\t}\n}\n```\n\n### Issues API\n\n#### Create Issue:\n\n```swift\nlet issue = Issue(title: \"New Issue\")\nIssuesAPI(authentication: AccessTokenAuthentication(access_token: \"access_token\")).createIssue(owner: \"owner\", repository: \"repository\", issue: issue) { (response, error) in\n\tif let response = response {\n\n\t} else {\n\t\tprint(error ?? \"\")\n\t}\n}\n```\n#### Update Issue:\n\n```swift\nlet issue = Issue(title: \"Updated Issue\")\n        IssuesAPI(authentication: AccessTokenAuthentication(access_token: \"access_token\")).updateIssue(owner: \"owner\", repository: \"repository\", number: number, issue: issue) { (response, error) in\n\tif let response = response {\n\n\t} else {\n\t\tprint(error ?? \"\")\n\t}\n}\n```\n\n### Repositories API\n\n#### Get list of all repositories of user:\n\n```swift\nRepositoriesAPI(authentication: AccessTokenAuthentication(access_token: \"access_token\")).repositories(user: \"user\", type: .all) { (response, error) in\n\tif let response = response {\n\n\t} else {\n\t\tprint(error ?? \"\")\n\t}\n}\n```\n\n### Search API\n\n#### Seart all repositories which contains qwer in name:\n\n```swift\nSearchAPI().searchRepositories(q: \"qwer\", page: 1, per_page: 100) { (response, error) in\n\tif let response = response {\n\n\t} else {\n\t\tprint(error ?? \"\")\n\t}\n}\n```\n        \n\n## Example Application\n\nTo run the example project, clone the repo, and run `pod install` from the Example directory first. \n\nExample project contains example app with list of all user's GitHub notification. \n\n\n\u003cp align=\"center\"\u003e\n\u003cimg src=\"./Screenshots/main_screen.png\" width=\"350\"/\u003e\n\u003c/p\u003e\n\n## Requirements\n\n* Xcode 9 or later\n* iOS 9.0 or later\n* macOS 10.12 or later\n* Ubuntu 16.04 or later\n* Swift 4.0 or later\n\n## Installation\n\nGitHubAPI is available through [CocoaPods](http://cocoapods.org). To install\nit, simply add the following line to your Podfile:\n\n```ruby\npod 'GithubAPI'\n```\n\n## Author\n\nSerhii Londar, serhii.londar@gmail.com\n\n## License\n\nGitHubAPI is available under the MIT license. See the LICENSE file for more info.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fserhii-londar%2Fgithubapi","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fserhii-londar%2Fgithubapi","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fserhii-londar%2Fgithubapi/lists"}