gotiny
Advanced tools
Comparing version 1.5.4 to 1.5.5
{ | ||
"name": "gotiny", | ||
"version": "1.5.4", | ||
"version": "1.5.5", | ||
"description": "SDK for GoTiny: A lightweight link shortener API", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.js", |
@@ -0,1 +1,7 @@ | ||
> ### GoTiny is no longer available | ||
> | ||
> Read more: [GoTiny is shutting down](https://github.com/robvanbakel/gotiny-api/issues/11) | ||
--- | ||
# GoTiny SDK | ||
@@ -148,3 +154,3 @@ | ||
gotiny.get("https://gotiny.cc/y68hxc" , { extended: true }) | ||
gotiny.get("https://gotiny.cc/y68hxc", { extended: true }) | ||
.then(res => console.log(res)) // { code: 'y68hxc', long: 'https://amazon.com/very-long-url' } | ||
@@ -172,1 +178,2 @@ .catch(err => console.log(err)) | ||
- [robvanbakel/gotiny-slack-bot](https://github.com/robvanbakel/gotiny-slack-bot) | ||
- [robvanbakel/gotiny-vscode-extension](https://github.com/robvanbakel/gotiny-vscode-extension) |
@@ -43,8 +43,8 @@ import axios from "axios"; | ||
// Loop through API response and create array with GoTiny objects | ||
data.forEach((doc: GoTinyObject) => { | ||
data.forEach(({long, code}: GoTinyObject) => { | ||
output.push({ | ||
long: doc.long, | ||
code: doc.code, | ||
tiny: `gotiny.cc/${doc.code}`, | ||
link: `https://gotiny.cc/${doc.code}`, | ||
long, | ||
code, | ||
tiny: `gotiny.cc/${code}`, | ||
link: `https://gotiny.cc/${code}`, | ||
}); | ||
@@ -51,0 +51,0 @@ }); |
26171
178
29