Skip to content

frzam/short-url

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

72 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Shorten Bulky Links

Shrt-URL

Build simple and reliable short links.

About | Features | API | Installation | License

About

Short-URL is used to make six characters URL and it can be retrived at lightning speed. Try it out.

It has an amazing API for getting the click details of each shorturl that has been clicked.

Features

  • Built six characters long links.
  • TSL based encryptions for all the URLs.
  • RESTful based API to get the click counts.
  • API for getting click details which includes its IP, Location and TimeStamp etc.
  • API supports searching click details by city, country or IP.
  • Google reCaptcha is implemented to prevent from bots.

API

  • Get all click details for particular shorturl.

    https://shrt-url.xyz/api/v1/{shorturl}?skip=0&limit=100
    

    Example: {shorturl} = 52ea82r. Try it out here.

  • Get all click details for particular shorturl for past N days.

    https://shrt-url.xyz/api/v1/{shorturl}/{days}?skip=0&limit=100
    

    Example: {shorturl} = 52ea82r and {days} = 7. Try it out here.

  • Delete all the details for a url.

    https://shrt-url.xyz/api/v1/{shorturl}
    

    Example: Method: DELETE. Try it out here.

  • Get all the click details by a country for one shorturl.

    https://shrt-url.xyz/api/v1/{shorturl}/country/{country}
    

    Example: {shorturl} = 52ea82r and {country} = India. Try it out here.

  • Get all the click details by a city for one shorturl.

    https://shrt-url.xyz/api/v1/{shorturl}/city/{city}
    

    Example: {shorturl} = 52ea82r and {city} = Powai. Try it out here.

  • Get all the click details by an IP for one shorturl.

    https://shrt-url.xyz/api/v1/{shorturl}/ip/{ip}
    

    Example: {shorturl} = 52ea82r. Try it out here.

  • Get total click count for one shorturl.

    https://shrt-url.xyz/api/v1/{shorturl}/totalcount
    

    Example: {shorturl} = 52ea82r. Try it out here.

  • Get click count for past N days for one shorturl.

    https://shrt-url.xyz/api/v1/{shorturl}/totalcount/{days}
    

    Example: {shorturl} = 52ea82r. Try it out here.

  • Get total click count from one IP for one shorturl.

    https://shrt-url.xyz/api/v1/{shorturl}/ip/{ip}/totalcount/
    

    Example: {shorturl} = 52ea82r. Try it out here.

Installation

To run the application you need to type below mentioned command.

go run main.go

To successfully run the application you need to set below mentioned environment variables on your system.

primary_db_name = 
primary_db_host = 
primary_db_port = 
cache_db_name =  
cache_db_host = 
cache_db_port =
host = 
PORT =
ipstack_api_key = Ex: API Key for ipstack
env = DEV
fullchain= Ex: /path/fullchain.pem
privkey= Ex: /path/privkey.pem
private_token=Ex: Captcha Token.

License

Short-URL is provided under Apache 2.0 license.

About

Shrt-URL is used to build simple and reliable short links.

Topics

Resources

Stars

Watchers

Forks

Languages