- A Swift implementation of octokit.objc, using RxSwift and Tailor
- Hope it is useful to you, as it is to me
- Try to use more Swift style
- User: identify a user
- Server: identify server (Github or Github Enterprise)
- Client: make request. If associated with a valid token, it is considered authenticated client
let user = User(rawLogin: "onmyway133", server: Server.dotComServer)
let client = Client(unauthenticatedUser: user)
client.fetchUserStarredRepositories().subscribeNext { repositories in
print(repositories)
}
Make your own request using RequestDescriptor
let requestDescriptor = RequestDescriptor().then {
$0.path = "repos/\(owner)/\(name)"
$0.etag = "12345"
}
return enqueue(requestDescriptor).map {
return Parser.one($0.jsonArray)
}
- Fetch server metadata
- Native flow
- OAuth flow
- Follow
- Unfollow
- Fetch user info
- Fetch repositories
- Create repository
- Fetch commits
- Fetch pull requests
- Fetch issues
- Watch
- Make pull requests
- Fetch organizations
- Fetch teams
- Search repositories
- Fetch user events
- Fetch gists
- Create tree
- Create blob
- Create commit
- Star
- Unstar
- Fetch notifications
GithubSwift is available through CocoaPods. To install it, simply add the following line to your Podfile:
pod 'Github.swift'
GithubSwift is also available through Carthage. To install just write into your Cartfile:
github "onmyway133/Github.swift"
Khoa Pham, onmyway133@gmail.com
We would love you to contribute to GithubSwift, check the CONTRIBUTING file for more info.
GithubSwift is available under the MIT license. See the LICENSE file for more info.