Added ShortenConfig && LookupConfig

This commit is contained in:
Erik C. Thauvin 2024-06-03 17:59:57 -07:00
parent 63645f7cf4
commit e20934fc08
Signed by: erik
GPG key ID: 776702A6A2DA330E
15 changed files with 138 additions and 171 deletions

View file

@ -94,11 +94,10 @@ Instructions for using with Maven, Ivy, etc. can be found on [Maven Central](htt
To make it easier to use the library with Java, configuration builders are available:
```java
var config = new Config.Builder()
.url("https://www.example.com/")
.shortUrl("foobar")
var config = new ShortenConfig.Builder("https://www.example.com/")
.shorturl("foobar")
.callback("test")
.logStats(true)
.logstats(true)
.format(Format.JSON)
.build();
@ -106,8 +105,8 @@ Isgd.shorten(config);
```
```java
var config = new Config.Builder()
.shortUrl("https://is.gd/Pt2sET")
var config = new LookupConfig.Builder("https://is.gd/Pt2sET")
.callback("test")
.format(Format.XML)
.build();