API client library for GitLab API, written in Swift
GitLabKit is an API client library for GitLab API, written in Swift.
Based on this interesting idea.
Notice: Public interfaces may be changed until the project version reaches into v1.0.
Followings currently implemented.
Almost all without Labels, Notes, Deploy Keys, System Hooks, Groups.
Testing is not enough.
Nothing yet.
Nothing yet.
GitLabKit is written as a Cocoa Framework (for OS X) for now.
Tested on OS X 10.12.5 with Xcode 8.3.3 (8E3004b), self hosted GitLab CE 7.5.3 b656b85.
GitLabKit is using libraries listed above.
All dependencies are resolved by CocoaPods with its version 1.2.0 or newer.
// Init api client
let client: GitLabApiClient = GitLabApiClient(host: "https://git.example.com", privateToken: "YOUR-PRIVATE-TOKEN")
// Get users
let params = UserQueryParamBuilder()
client.get(params, handler: { (response: GitLabResponse<User>?, error: NSError?) -> Void in
println(response!.result!.count)
})
// Get user by Id
let params = UserQueryParamBuilder().id(1)
client.get(params, handler: { (response: GitLabResponse<User>?, error: NSError?) -> Void in
let user: User = response!.result![0]
println(user.name!)
})
see test sources to get more usage.