{"id":18525794,"url":"https://github.com/toricls/gitlabkit","last_synced_at":"2025-04-09T12:31:33.866Z","repository":{"id":26299639,"uuid":"29747517","full_name":"toricls/GitLabKit","owner":"toricls","description":"API client library for GitLab API, written in Swift","archived":false,"fork":false,"pushed_at":"2017-06-18T14:53:52.000Z","size":109,"stargazers_count":57,"open_issues_count":2,"forks_count":7,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-03-24T05:35:13.157Z","etag":null,"topics":["gitlab-api","swift"],"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/toricls.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":"2015-01-23T18:50:54.000Z","updated_at":"2024-10-22T13:29:44.000Z","dependencies_parsed_at":"2022-08-27T09:10:23.344Z","dependency_job_id":null,"html_url":"https://github.com/toricls/GitLabKit","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/toricls%2FGitLabKit","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/toricls%2FGitLabKit/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/toricls%2FGitLabKit/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/toricls%2FGitLabKit/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/toricls","download_url":"https://codeload.github.com/toricls/GitLabKit/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248040330,"owners_count":21037848,"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":["gitlab-api","swift"],"created_at":"2024-11-06T17:47:03.077Z","updated_at":"2025-04-09T12:31:28.841Z","avatar_url":"https://github.com/toricls.png","language":"Swift","readme":"GitLabKit\n====\n\nGitLabKit is an API client library for [GitLab API](https://gitlab.com/help/api/README.md), written in Swift.\n\nBased on [this interesting idea](http://developer.hatenastaff.com/entry/smart-api-client-with-swift-using-enum-and-generics).\n\nNotice: Public interfaces may be changed until the project version reaches into v1.0.\n\n## Description\n\nFollowings currently implemented.\n\n### GET\n\nAlmost all without Labels, Notes, Deploy Keys, System Hooks, Groups.\nTesting is not enough.\n\n### POST\n\nNothing yet.\n\n### DELETE\n\nNothing yet.\n\n## Requirement\n\nGitLabKit is written as a Cocoa Framework (for OS X) for now.\nTested on OS X 10.12.5 with Xcode 8.3.3 (8E3004b), self hosted GitLab CE 7.5.3 b656b85.\n\n- [Alamofire](https://github.com/Alamofire/Alamofire)\n- [Mantle](https://github.com/Mantle/Mantle)\n\nGitLabKit is using libraries listed above.\nAll dependencies are resolved by [CocoaPods](http://cocoapods.org/) with its version 1.2.0 or newer.\n\n## Usage\n\n```swift\n// Init api client\nlet client: GitLabApiClient = GitLabApiClient(host: \"https://git.example.com\", privateToken: \"YOUR-PRIVATE-TOKEN\")\n\n// Get users\nlet params = UserQueryParamBuilder()\nclient.get(params, handler: { (response: GitLabResponse\u003cUser\u003e?, error: NSError?) -\u003e Void in\n\tprintln(response!.result!.count)\n})\n\n// Get user by Id\nlet params = UserQueryParamBuilder().id(1)\nclient.get(params, handler: { (response: GitLabResponse\u003cUser\u003e?, error: NSError?) -\u003e Void in\n    let user: User = response!.result![0]\n\tprintln(user.name!)\n})\n```\n\nsee [test sources](https://github.com/toricls/GitLabKit/tree/master/GitLabKitTests) to get more usage.\n\n## TODO\n\n- Implement more apis\n- Decide on how to deal with 404 responses. I'm just treating them as normal responses and returning an empty array for [now](https://github.com/toricls/GitLabKit/blob/master/GitLabKit/GitLabApiClient.swift#L79).\n- More effective and efficient testing with stub or something like that\n\n## Contribution\n\n1. Fork ([https://github.com/toricls/GitLabKit/fork](https://github.com/toricls/GitLabKit/fork))\n2. Create a feature branch\n3. Commit your changes\n4. Rebase your local changes against the master branch\n5. Create new Pull Request\n\n## Licence\n\n[MIT](https://github.com/toricls/GitLabKit/blob/master/LICENCE)\n\n## Author\n\n[toricls](https://github.com/toricls)\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftoricls%2Fgitlabkit","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftoricls%2Fgitlabkit","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftoricls%2Fgitlabkit/lists"}