https://github.com/d-date/lgtmkit
Get LGTM image from lgtm.in, written by swift
https://github.com/d-date/lgtmkit
danger lgtm swift
Last synced: 6 months ago
JSON representation
Get LGTM image from lgtm.in, written by swift
- Host: GitHub
- URL: https://github.com/d-date/lgtmkit
- Owner: d-date
- License: mit
- Created: 2017-12-14T09:51:36.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2017-12-16T08:42:29.000Z (almost 8 years ago)
- Last Synced: 2025-04-10T03:17:51.623Z (6 months ago)
- Topics: danger, lgtm, swift
- Language: Swift
- Homepage:
- Size: 7.81 KB
- Stars: 11
- Watchers: 2
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# LGTMKit
Get LGTM image from lgtm.in, written by swiftInspired by [danger-lgtm](https://github.com/leonhartX/danger-lgtm).
## Install
### Swift Package Manager
Specifiy Dependency on your `Package.swift`.
```swift
let package = Package(
name: "Dangerfile",
products: [.library(name: "MarathonDependencies", type: .dynamic, targets: ["Dangerfile"])],
dependencies: [
.package(url: "https//github.com/d-date/LGTMKit.git")
],
targets: [.target(name: "Dangerfile", dependencies: ["LGTMKit"])],
swiftLanguageVersions: [4]
)
```## Usage
Just written as below. Very easy 😎
```swift
import LGTMKitLGTMKit.fetchImage() { (url) in
print(url) // LGTM image url
}
```If you want a https image only, you can use `httpsImageOnly` option
```swift
LGTMKit.fetchImage(httpsImageOnly: true) { (url) in
print(url) // LGTM image url
}```
## Contribution
1. Download this repo.
2. Run `swift package generate-xcodeproj`.
3. You can develop with your Xcode.
4. Commit your change.
5. Make Pull Request.