GithubKitForSample
This is a simple Github API client and UI to use in sample projects.
Requirements
- Xcode 8.3.3
- Swift 3.1
- iOS 9.0
- carthage 0.23.0
- RxSwift 3.6.1
- SwiftIconFont 2.7.0
- Nuke 5.1.1
Installation
You can install via Carthage.
github "marty-suzuki/GithubKitForSample"
Usage
import GithubKit
ApiSession.shared.token = "/* Your Token */"
/// - note: You can search users.
let request = SearchUserRequest(query: "marty-suzuki", after: nil)
ApiSession.shared.send(request) {
switch $0 {
case .success(let value):
//
case .failure(let error):
//
}
}
/// - note: You can fetch user's repositories.
let request = UserNodeRequest(id: user.id, after: nil)
ApiSession.shared.send(request) {
switch $0 {
case .success(let value):
//
case .failure(let error):
//
}
}