Services: 4 | Last version: v0.0.4 (28.09.2021)
QuickList
Services:
Install:
go get github.com/illiafox/shorturl
Usage:
import "github.com/illiafox/shorturl"
shorturl.func()
Cleanuri:
Limits: 2 requests per second (per IP)
Cleanuri(url string) (string,err)
url = URL to shorten https://www.example.me
returns short url (cleanuri.com/) , error (nil - no error)
- Usage:
link, err := shorturl.Cleanuri("https://github.com/illiafox")
if err != nil {
// panic
}
OUTPUT: https://cleanuri.com/XgpYj6
-
Errors:
All api errors is json:
{"error":"API Error: URL is invalid. (check #2)"}
Others: ⬇ Errors
GoTiny:
Limits: Unknown
GoTiny(url string) (string,err)
url = Url | Text to shorten
if url: https://www.example.me
else: "text"
returns 6-digit code link (gotiny.cc/abc123) , error (nil - no error)
You can short you text instead of link
- Usage:
link, err := shorturl.GoTiny("https://github.com/illiafox")
if err != nil {
// panic
}
OUTPUT: gotiny.cc/a63c2k
link, err := shorturl.GoTiny("Hello World!")
if err != nil {
// panic
}
Errors: only from ⬇ Errors
OnePt
(currently not working)
issues )
Warning: couldn't check this function due to server 500 error (if works please tell about this inLimits: unknown
Pt1(url string,short string) (string,err)
url = URL to shorten https://www.example.me
short(optional) - The part after 1pt.co/ that will redirect to your long URL
returns short url (cleanuri.com/) , error (nil - no error)
If paramter short is not provided or the requested short URL is already taken, it will return a random 5-letter
- Usage (NOT TESTED):
link, err := shorturl.Pt1("https://github.com/illiafox","abc12") // or ("link","")
if err != nil {
// panic
}
OUTPUT (not checked): 1pt.co/XgpYj6
- Errors: There are only one error that we know: 500 code
Others: ⬇ Errors
Errors
These bindings can return errors from: