https://github.com/hamzaerbay/emoji-url-shortener
https://github.com/hamzaerbay/emoji-url-shortener
Last synced: 3 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/hamzaerbay/emoji-url-shortener
- Owner: hamzaerbay
- Created: 2022-08-29T02:38:58.000Z (almost 3 years ago)
- Default Branch: main
- Last Pushed: 2022-08-31T22:35:05.000Z (over 2 years ago)
- Last Synced: 2024-12-31T09:17:49.541Z (5 months ago)
- Language: Python
- Size: 13.7 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Code of conduct: CODE_OF_CONDUCT.md
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