Live app on heroku :
base_url: https://sandeep-urlshortner.herokuapp.com/
{
"url" : "https://google.com"\
}
[200]
{
"url": "https://google.com",\
"short_code": "0",
"created_at": "2021-12-05T19:45:37.639376Z",
"updated_at": "2021-12-05T19:45:37.639323Z",
"count": 0,
"hourly_hits": 0
}
[400]
{
"message": "Invalid url"
}
[200]
{
"url": "https://google.com",\
"short_code": "0",
"created_at": "2021-12-05T19:45:37.639376Z",
"updated_at": "2021-12-05T19:45:37.639323Z",
"count": 5,
"hourly_hits": 3
}
[400]
{
"message": "Something went wrong"
}
It should redirect to the original url
This API will return list of urls which contains the given keyword
[200]
[
{
"url": "https://google.com",
"short_code": "0",
"created_at": "2021-12-05T19:45:37.639376Z",
"updated_at": "2021-12-05T19:45:37.639323Z",
"count": 1,
"hourly_hits": 1
},
{
"url": "https://googlefacebook.com",
"short_code": "2",
"created_at": "2021-12-05T20:07:33.604457Z",
"updated_at": "2021-12-05T20:07:33.604395Z",
"count": 0,
"hourly_hits": 0
}
]