Giter Club home page Giter Club logo

gitlabkit's Introduction

GitLabKit

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.

Description

Followings currently implemented.

GET

Almost all without Labels, Notes, Deploy Keys, System Hooks, Groups. Testing is not enough.

POST

Nothing yet.

DELETE

Nothing yet.

Requirement

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.

Usage

// 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.

TODO

  • 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

Contribution

  1. Fork (https://github.com/toricls/GitLabKit/fork)
  2. Create a feature branch
  3. Commit your changes
  4. Rebase your local changes against the master branch
  5. Create new Pull Request

Licence

MIT

Author

toricls

gitlabkit's People

Contributors

mangerlahn avatar toricls avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

gitlabkit's Issues

GitLabKit's Future

Hi @Orih, I really think this is a great project, and I would like to be a part of it's future. I had some things in mind that we could do to improve it:

  • Update it to Swift 3.0 (you also said that this repo no longer works with recent Swift, why is that?)
  • Make it iOS compatible
  • Add more GETs (all of them including CI)
  • Add some examples and documentation
  • Add some DELETEs and POSTs.
  • Add to CocoaPods or to Swift Package Manager.

If you're interested in this, then please contact me by email at [email protected], I tried to find your email somewhere but wasn't able to.

Thank you,
Tiago

PS: Hum, maybe it would be good to move this to gitlab.com, or if you prefer I can also host it on my server, it just looks a bit wired to host it on GitHub ๐Ÿ˜‰

pod library?

Wonderful project! Can you add a podspec and make this library pod-installable?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.