Open tunnckoCore opened 6 years ago
html index
<html>
<head>
<meta charset="utf-8">
<title>GUGL NOW - micro service for shortening and expanding urls</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<link href="https://tunnckocore.github.io/assets/css/style.css?v=f157ba07b19adf390d7a2d65b9c6c36868ecb1d2" rel="stylesheet">
</head>
<body>
<div class="container-lg px-3 my-5 markdown-body">
<h1>
Welcome to <a href="https://github.com/tunnckoCore/gugl.now.sh">GUGL NOW</a>
</h1>
<p>
A <a href="https://ghub.now.sh/micro">micro</a>-service for creating,
discoverying and expanding <a href="https://goo.gl">https://goo.gl</a> shortlinks.
</p>
<div class="comment-body markdown-body" style="min-height: 620.142px;">
<h2>Shortening long url</h2>
<p><strong>GET request:</strong> <code>/api/v1/shorten?url=<LONG URL HERE></code><br>
<strong>example:</strong> <a href="/api/v1/shorten?url=https://www.facebook.com/tunnckoCore" rel="nofollow">/api/v1/shorten?url=https://www.facebook.com/tunnckoCore</a><br>
<strong>response:</strong></p>
<div class="highlight highlight-source-json"><pre>{
<span class="pl-s"><span class="pl-pds">"</span>id<span class="pl-pds">"</span></span>: <span class="pl-s"><span class="pl-pds">"</span>up3mjD<span class="pl-pds">"</span></span>,
<span class="pl-s"><span class="pl-pds">"</span>shortUrl<span class="pl-pds">"</span></span>: <span class="pl-s"><span class="pl-pds">"</span>https://goo.gl/up3mjD<span class="pl-pds">"</span></span>,
<span class="pl-s"><span class="pl-pds">"</span>longUrl<span class="pl-pds">"</span></span>: <span class="pl-s"><span class="pl-pds">"</span>https://www.facebook.com/tunnckoCore<span class="pl-pds">"</span></span>
}</pre></div>
<h2>Expanding short url</h2>
<blockquote>The response object also has `analytics` and `created` propeties as seen at
<a href="https://developers.google.com/url-shortener/v1/getting_started#url_analytics">goo.gl
Shortener documentation</a>.
</blockquote>
<p><strong>GET request:</strong> <code>/api/v1/expand?url=<goo.gl SHORT URL></code><br>
<strong>example:</strong> <a href="/api/v1/expand?url=https://goo.gl/fbsS" rel="nofollow">/api/v1/expand?url=https://goo.gl/fbsS</a><br>
<strong>response:</strong></p>
<div class="highlight highlight-source-json"><pre>{
<span class="pl-s"><span class="pl-pds">"</span>id<span class="pl-pds">"</span></span>: <span class="pl-s"><span class="pl-pds">"</span>fbsS<span class="pl-pds">"</span></span>,
<span class="pl-s"><span class="pl-pds">"</span>shortUrl<span class="pl-pds">"</span></span>: <span class="pl-s"><span class="pl-pds">"</span>https://goo.gl/fbsS<span class="pl-pds">"</span></span>,
<span class="pl-s"><span class="pl-pds">"</span>longUrl<span class="pl-pds">"</span></span>: <span class="pl-s"><span class="pl-pds">"</span>http://www.google.com/<span class="pl-pds">"</span></span>
}</pre></div>
<h2>Finding by ID</h2>
<blockquote>The response object also has `analytics` and `created` propeties as seen at
<a href="https://developers.google.com/url-shortener/v1/getting_started#url_analytics">goo.gl
Shortener documentation</a>.
</blockquote>
<p><strong>GET request:</strong> <code>/api/v1/find?id=<short id></code><br>
<strong>example:</strong> <a href="/api/v1/find?id=tbMhrs" rel="nofollow">/api/v1/find?id=tbMhrs</a>
<em>(streaming video over IPFS)</em><br>
<strong>response:</strong></p>
<div class="highlight highlight-source-json"><pre>{
<span class="pl-s"><span class="pl-pds">"</span>id<span class="pl-pds">"</span></span>: <span class="pl-s"><span class="pl-pds">"</span>tbMhrs<span class="pl-pds">"</span></span>,
<span class="pl-s"><span class="pl-pds">"</span>shortUrl<span class="pl-pds">"</span></span>: <span class="pl-s"><span class="pl-pds">"</span>https://goo.gl/tbMhrs<span class="pl-pds">"</span></span>,
<span class="pl-s"><span class="pl-pds">"</span>longUrl<span class="pl-pds">"</span></span>: <span class="pl-s"><span class="pl-pds">"</span>https://ipfs.io/ipfs/Qmem4exur6JCXTkJuc4XSYttEzFJg1U6RejgKrot7DNuCB<span class="pl-pds">"</span></span>
}</pre></div>
<h2>Why? And limits</h2>
<p>
We need more simpler API and service with already given API KEY.<br>
The limits of the API are as defined at
<a href="https://developers.google.com/url-shortener/v1/getting_started#quota">Quotas Section</a>.
</p>
<div class="footer border-top border-gray-light mt-5 pt-3 text-right text-gray">
Copyright (c) 2018-present <a href="https://i.am.charlike.online">Charlike Mike Reagent</a>
<code><open.source.charlike@gmail.com></code>. MIT License.
<a href="https://github.com/tunnckoCore/gugl.now.sh">Source code</a>.
</div>
</div>
<!-- <p>
Copyright (c) 2018-present <a href="https://i.am.charlike.online">Charlike Mike Reagent</a>
<code><open.source.charlike@gmail.com></code>
</p> -->
</div>
</body>
</html>
Sadly... we should reconsider, since Google is dropping that service ;/ ;((
thin layer on top of goo.gl apy without needing api key.
http://jsbin.com/qamewaxubi/edit?output - html demo
zeit/micro server