Added config example
This commit is contained in:
parent
85507a1e06
commit
ca6ac25013
1 changed files with 3 additions and 0 deletions
|
@ -1,5 +1,7 @@
|
||||||
package com.example;
|
package com.example;
|
||||||
|
|
||||||
|
import net.thauvin.erik.isgd.Config;
|
||||||
|
import net.thauvin.erik.isgd.Format;
|
||||||
import net.thauvin.erik.isgd.Isgd;
|
import net.thauvin.erik.isgd.Isgd;
|
||||||
import net.thauvin.erik.isgd.IsgdException;
|
import net.thauvin.erik.isgd.IsgdException;
|
||||||
|
|
||||||
|
@ -10,6 +12,7 @@ public final class IsgdSample {
|
||||||
try {
|
try {
|
||||||
if (arg.contains("is.gd")) {
|
if (arg.contains("is.gd")) {
|
||||||
System.out.println(arg + " <-- " + Isgd.lookup(arg));
|
System.out.println(arg + " <-- " + Isgd.lookup(arg));
|
||||||
|
System.out.print(Isgd.lookup(new Config.Builder().shorturl(arg).format(Format.WEB).build()));
|
||||||
} else {
|
} else {
|
||||||
System.out.println(arg + " --> " + Isgd.shorten(arg));
|
System.out.println(arg + " --> " + Isgd.shorten(arg));
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue