isgd-shorten

is.gd Shortener for Kotlin/Java

License

License

Categories

Categories

Net
GroupId

GroupId

net.thauvin.erik
ArtifactId

ArtifactId

isgd-shorten
Last Version

Last Version

0.9.1
Release Date

Release Date

Type

Type

jar
Description

Description

isgd-shorten
is.gd Shortener for Kotlin/Java
Project URL

Project URL

https://github.com/ethauvin/isgd-shorten
Source Code Management

Source Code Management

https://github.com/ethauvin/isgd-shorten

Download isgd-shorten

How to add to project

<!-- https://jarcasting.com/artifacts/net.thauvin.erik/isgd-shorten/ -->
<dependency>
    <groupId>net.thauvin.erik</groupId>
    <artifactId>isgd-shorten</artifactId>
    <version>0.9.1</version>
</dependency>
// https://jarcasting.com/artifacts/net.thauvin.erik/isgd-shorten/
implementation 'net.thauvin.erik:isgd-shorten:0.9.1'
// https://jarcasting.com/artifacts/net.thauvin.erik/isgd-shorten/
implementation ("net.thauvin.erik:isgd-shorten:0.9.1")
'net.thauvin.erik:isgd-shorten:jar:0.9.1'
<dependency org="net.thauvin.erik" name="isgd-shorten" rev="0.9.1">
  <artifact name="isgd-shorten" type="jar" />
</dependency>
@Grapes(
@Grab(group='net.thauvin.erik', module='isgd-shorten', version='0.9.1')
)
libraryDependencies += "net.thauvin.erik" % "isgd-shorten" % "0.9.1"
[net.thauvin.erik/isgd-shorten "0.9.1"]

Dependencies

runtime (1)

Group / Artifact Type Version
org.jetbrains.kotlin : kotlin-stdlib-jdk8 jar 1.3.72

Project Modules

There are no modules declared in this project.

License (3-Clause BSD) release Maven Central Download

Known Vulnerabilities Quality Gate Status Build Status CircleCI

is.gd Shortener for Kotlin/Java/Android

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")
}

Instructions for using with Maven, Ivy, etc. can be found on Maven Central.

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

Versions

Version
0.9.1