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.
- Implement more apis
- Decide on how to deal with 404 responses. I'm just treating them as normal responses and returning an empty array for now.
- More effective and efficient testing with stub or something like that
- Fork (https://github.com/toricls/GitLabKit/fork)
- Create a feature branch
- Commit your changes
- Rebase your local changes against the master branch
- Create new Pull Request