Merge branch 'master' of ssh://git.calyrium.org:2244/kreativmonkey/shrt

master
kreativmonkey 8 years ago
commit 93e59df04b

@ -1,7 +1,5 @@
# shrt
Shrt is a url shortner writen in Go and by (Polr)[https://polr.me/index.php].
Shrt is a lightwaight, self-hostable open-source link shortening web application with a Restful API. It allows you to host your own URL shortener to gain control over you data. Shrt is inspired by [Polr](https://polr.me/index.php), a php based url shortener.
## Features
@ -14,7 +12,16 @@ Shrt is a url shortner writen in Go and by (Polr)[https://polr.me/index.php].
* [ ] Login
## Restful API
## API
To authenticate a user to Polr, you will need to provide an API key along with each request to the Polr API, as a GET or POST parameter. (e.g ``?key=API_KEY_HERE``)
### /api/v1/action/shorten
Arguments:
* ``url``: the URL to shorten (e.g https://google.com)
* ``custom_ending`` [not now supported] (optional): a custom ending for the short URL. If left empty, no custom ending will be assigned.
Short an URL
```
@ -25,6 +32,12 @@ Response:
"result": "https://example.com/5kq" }
```
### /api/v1/action/lookup
Arguments:
* ``url_ending``: the link ending for the URL to look up. (e.g 5ga)
Lookup for existing URL
```
@ -38,4 +51,9 @@ Response:
"clicks":"0"
}
}
```
```
## ToDo
* [ ] Add more Statistik details like the clicks from Country and Referer.
* [ ] Implements the correct HTTP Error Codes

Loading…
Cancel
Save