[Deprecated] Using My URL Shortener API


Recently I've got a new domain, and that domain is https://isshort.tk.
If you've read my article about Using My URL Shortener API, you might notice that the domain is not short at all! So I decided to make a new one that is shorter!

This article is still the same; Showing y'all how to use my URL Shortener API.
Again, there are 2 ways to do so :

  1. Is to visit https://isshort.tk
  2. Is using the REST API from https://isshort.tk/new/
  3. Is to make your self a custom shortener link from https://isshort.tk/custom/

1. Visiting https://isshort.tk

Just visit it, baka baka.
In programmatic way, you make an HTTP request to https://isshort.tk/new/
Let's say we're using Node.js here, just make something like :
const request = require("request");
request({
    uri: "https://isshort.tk/new/google.com"
  },
  (err, res, body) => {
    console.log(body);
  });
Then you will get an output similiar to this :
{
  "long": "google.com",
  "short": "isshort.tk/oIkEZ"
}
Easy as fuck my dude.
You should by now notice the custom route followed by comma prefix in the link I've given above don't you?
Now try to do this :
const request = require("request");
request({
    uri: "https://isshort.tk/custom/mysite.com,mysite"
  },
  (err, res, body) => {
    console.log(body);
  });
That's how you make a custom short link URL. The step to use it in programmatic way is the same as the previous one, the only difference is you will need to change /new/ into /custom/ and then add ,yourshortlink after your main link.
Your expected output would be :
{
  "long": "mysite.com",
  "short": "isshort.tk/mysite"
}

That's all, and stay cool!

standinshd

Just another ordinary human but with a crazy level of interests in IT

No comments:

Post a Comment