https://github.com/h2glab/gitlab-provider
📜 Gitlab Provider for Vapor
https://github.com/h2glab/gitlab-provider
gitlab library provider swift vapor
Last synced: 8 months ago
JSON representation
📜 Gitlab Provider for Vapor
- Host: GitHub
- URL: https://github.com/h2glab/gitlab-provider
- Owner: h2glab
- License: mit
- Created: 2018-12-12T22:21:10.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2019-09-11T10:02:00.000Z (almost 7 years ago)
- Last Synced: 2025-09-17T18:05:21.893Z (9 months ago)
- Topics: gitlab, library, provider, swift, vapor
- Language: Swift
- Homepage:
- Size: 25.4 KB
- Stars: 7
- Watchers: 3
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Vapor Gitlab Provider


## Getting Started
In your `Package.swift` file, add the following
```swift
.package(url: "https://github.com/h2glab/gitlab-provider.git", from: "0.1.0")
```
Register the config and the provider to your Application
```swift
let config = GitlabConfig(serverUrl: URL(string: "https://www.gitlab.com")!, privateToken: "PRIVATE_TOKEN")
services.register(config)
try services.register(GitlabProvider())
app = try Application(services: services)
gitlabClient = try app.make(GitlabClient.self)
```
Service is configured.
Interacting with the API is quite easy and adopts the `Future` syntax used in Vapor 3.
Now you can list all issues easily.
```swift
let filter = Issue.Filter.Builder().withLabels(["High"]).withPerPage(10).build()
let futureIssue = try gitlabClient.issue.list(filter: filter)
futureIssue.map { issues in (do something with issues...) }
```
## Whats Implemented
TBD
## License
Vapor Gitlab Provider is available under the MIT license. See the [LICENSE](LICENSE) file for more info.
## Contributing
To contribute a feature or idea to Gitlab Provider, [create an issue][1] explaining your idea.
If you find a bug, please [create an issue][1].
[1]: https://github.com/h2glab/gitlab-provider/issues/new