An open API service indexing awesome lists of open source software.

https://github.com/hamzaerbay/emoji-url-shortener


https://github.com/hamzaerbay/emoji-url-shortener

Last synced: 3 months ago
JSON representation

Awesome Lists containing this project

README

        

### Setup
```
python3 -m venv venv
source venv/bin/activate
pip install -r requirements.txt
```

### Run
```
# run server
source venv/bin/activate
uvicorn shortener_app.main:app --reload
```
### GET
`/{url_key}`
### POST
`/url`
### GET
`/admin/{secret_key}`
#### Response
```
{
"target_url": "https://www.foo.com",
"is_active": true,
"clicks": 3,
"url": "http://127.0.0.1:8000/πŸ˜¨πŸ˜…πŸ˜―πŸ˜πŸ‘Ί",
"admin_url": "http://127.0.0.1:8000/admin/πŸ₯‘πŸ˜¨πŸ˜…πŸ˜―πŸ˜πŸ‘Ί_πŸ˜’πŸ˜ˆπŸ˜–πŸ€₯πŸ˜ΏπŸ˜‚πŸ€«πŸ˜―"
}
```
### DELETE
`/admin/{secret_key}`
```
{
"detail": "Succsessfully deleted the 'https://www.foo.com'"
}
```

### Swaggger
http://127.0.0.1:8000/docs