55 lines
1016 B
Markdown
55 lines
1016 B
Markdown
|
|
|
||
|
|
# Study task-1
|
||
|
|
|
||
|
|
Text transliteration service with API
|
||
|
|
|
||
|
|
|
||
|
|
|
||
|
|
## Installation
|
||
|
|
|
||
|
|
```bash
|
||
|
|
git clone https://git.moondev.space/themoon/study-task-1.git
|
||
|
|
cd study-task-1
|
||
|
|
pip install -r requirements.txt
|
||
|
|
python3 main.py
|
||
|
|
```
|
||
|
|
And open http://127.0.0.1:5000/
|
||
|
|
## API Reference
|
||
|
|
|
||
|
|
#### Transliterate and save text
|
||
|
|
|
||
|
|
```http
|
||
|
|
POST /api/store
|
||
|
|
```
|
||
|
|
Request JSON body:
|
||
|
|
| Parameter | Type | Description |
|
||
|
|
| :-------- | :------- | :------------------------- |
|
||
|
|
| `data` | `string` | **Required**. Text to transliterate |
|
||
|
|
|
||
|
|
#### Get history
|
||
|
|
|
||
|
|
```http
|
||
|
|
GET /api/history
|
||
|
|
```
|
||
|
|
Request GET params:
|
||
|
|
| Parameter | Type | Description |
|
||
|
|
| :-------- | :------- | :-------------------------------- |
|
||
|
|
| `limit` | `integer` | **Required**. Number of records to display|
|
||
|
|
|
||
|
|
|
||
|
|
|
||
|
|
|
||
|
|
## Test example
|
||
|
|
|
||
|
|
```
|
||
|
|
curl --header "Content-Type: application/json" \
|
||
|
|
--request POST \
|
||
|
|
--data '{"data":"проверка"}' \
|
||
|
|
http://localhost:5000/api/store
|
||
|
|
```
|
||
|
|
|
||
|
|
## Authors
|
||
|
|
|
||
|
|
- [Vyacheslav K.](https://t.me/moon_devv)
|
||
|
|
|