Estimated Reading Time for Blog Posts, Articles, etc. https://github.com/ethauvin/readingtime
Find a file
2020-07-23 22:58:01 -07:00
.circleci Added TravisCI and CircleCI configurations. 2020-07-23 22:52:25 -07:00
.idea Added maven publication, bintray, etc. 2020-07-23 20:55:48 -07:00
config/detekt Added detekt. 2020-07-23 10:50:52 -07:00
examples Fixed arguments checks. 2020-07-23 22:51:19 -07:00
gradle/wrapper Initial commit. 2020-07-23 01:47:35 -07:00
src Cleanup. 2020-07-23 20:56:07 -07:00
.editorconfig Initial commit. 2020-07-23 01:47:35 -07:00
.gitattributes Initial commit. 2020-07-23 01:47:35 -07:00
.gitignore Initial commit. 2020-07-23 01:47:35 -07:00
.travis.yml Added TravisCI and CircleCI configurations. 2020-07-23 22:52:25 -07:00
build.gradle.kts Added maven publication, bintray, etc. 2020-07-23 20:55:48 -07:00
gradlew Made gradlew executable in git. 2020-07-23 22:58:01 -07:00
gradlew.bat Made gradlew executable in git. 2020-07-23 22:58:01 -07:00
LICENSE.TXT Added license and copyright. 2020-07-23 11:44:43 -07:00
pom.xml Added maven publication, bintray, etc. 2020-07-23 20:55:48 -07:00
README.md Added README. 2020-07-23 22:51:50 -07:00
settings.gradle.kts Initial commit. 2020-07-23 01:47:35 -07:00

License (3-Clause BSD) release Maven Central Download

Known Vulnerabilities Quality Gate Status Build Status CircleCI

is.gd Shortener for Kotlin/Java

A simple implementation of the is.gd API.

Examples (TL;DR)

import net.thauvin.erik.isgd.Isgd

...

Isgd.shorten("https://www.example.com/") // returns https://is.gd/Pt2sET
Isgd.lookup("https://is.gd/Pt2sET") // returns https://www.example.com

JSON or XML

The is.gd API can return data in plain text (default), JSON or XML.

Isgd.shorten("https://www.example.com/", format = Format.JSON)

returns:

{ "shorturl": "https://is.gd/Pt2sET" }

Parameters

All of the is.gd API parameters are supported:

Isgd.shorten(url = url, shorturl="foobar", callback = "test", logstats = true, format = Format.JSON)

returns:

test({ "shorturl": "https://is.gd/foobar" });

Gradle

To use with Gradle, include the following dependency in your build file:

repositories {
    jcenter()
}

dependencies {
    implementation("net.thauvin.erik:isgd-shorten:0.9.1")
}

v.gd

Additionally, link can be shortened using v.gd by setting the isVgd flag:

Isgd.shorten("https://www.example.com/", isVgd = true) // returns https://v.gd/2z2ncj