112 lines
3.2 KiB
Markdown
112 lines
3.2 KiB
Markdown
# Endpoints examples
|
|
|
|
Test quick examples for each endpoint:
|
|
|
|
## Grade 1
|
|
|
|
### Join corresponding sums
|
|
|
|
```bash
|
|
curl -X POST "http://127.0.0.1:8000/math/grade_1/join_corresponding_sums" \
|
|
-H "Content-Type: application/json" \
|
|
-d '{
|
|
"pair_count": 3,
|
|
"min_sum": 2,
|
|
"max_sum": 10,
|
|
"min_addend": 1,
|
|
"max_addend": 9,
|
|
"seed": 1
|
|
}'
|
|
```
|
|
|
|
### Join pictures with quantity
|
|
|
|
```bash
|
|
curl -X POST "http://127.0.0.1:8000/math/grade_1/join_pictures_with_quantity" \
|
|
-H "Content-Type: application/json" \
|
|
-d '{
|
|
"available_pictures": [
|
|
{"id": "picture-1", "name": "Apple", "image_path": "/images/apple.png"},
|
|
{"id": "picture-2", "name": "Banana", "image_path": "/images/banana.png"},
|
|
{"id": "picture-3", "name": "Car", "image_path": "/images/car.png"},
|
|
{"id": "picture-4", "name": "Dog", "image_path": "/images/dog.png"},
|
|
{"id": "picture-5", "name": "Elephant", "image_path": "/images/elephant.png"},
|
|
{"id": "picture-6", "name": "Fish", "image_path": "/images/fish.png"},
|
|
{"id": "picture-7", "name": "Grape", "image_path": "/images/grape.png"},
|
|
{"id": "picture-8", "name": "Hat", "image_path": "/images/hat.png"},
|
|
{"id": "picture-9", "name": "Ice Cream", "image_path": "/images/ice-cream.png"},
|
|
{"id": "picture-10", "name": "Juice", "image_path": "/images/juice.png"}
|
|
],
|
|
"container_count_per_side": 5,
|
|
"min_quantity": 1,
|
|
"max_quantity": 10,
|
|
"seed": 1
|
|
}'
|
|
```
|
|
|
|
### Where are more items
|
|
|
|
```bash
|
|
curl -X POST "http://127.0.0.1:8000/math/grade_1/where_are_more_items" \
|
|
-H "Content-Type: application/json" \
|
|
-d '{
|
|
"available_pictures": [
|
|
{"id": "picture-1", "name": "Panda", "image_path": "/images/panda.png"},
|
|
{"id": "picture-2", "name": "Koala", "image_path": "/images/koala.png"},
|
|
{"id": "picture-3", "name": "Orange", "image_path": "/images/orange.png"},
|
|
{"id": "picture-4", "name": "Apple", "image_path": "/images/apple.png"},
|
|
{"id": "picture-5", "name": "Donut", "image_path": "/images/donut.png"},
|
|
{"id": "picture-6", "name": "Candy", "image_path": "/images/candy.png"}
|
|
],
|
|
"comparison_count": 3,
|
|
"min_quantity": 1,
|
|
"max_quantity": 10,
|
|
"seed": 1
|
|
}'
|
|
```
|
|
|
|
### Compose and decompose numbers
|
|
|
|
```bash
|
|
curl -X POST "http://127.0.0.1:8000/math/grade_1/compose_and_decompose_numbers" \
|
|
-H "Content-Type: application/json" \
|
|
-d '{
|
|
"picture": {
|
|
"id": "cube",
|
|
"name": "Cube",
|
|
"image_path": "/images/cube.png"
|
|
},
|
|
"whole": 10,
|
|
"randomize_rows": false,
|
|
"seed": 1
|
|
}'
|
|
```
|
|
|
|
### Sum with image reference
|
|
|
|
```bash
|
|
curl -X POST "http://127.0.0.1:8000/math/grade_1/sum_with_image_reference" \
|
|
-H "Content-Type: application/json" \
|
|
-d '{
|
|
"first_quantity": 5,
|
|
"second_quantity": 4,
|
|
"first_description": "flores rojas",
|
|
"second_description": "flores blancas",
|
|
"common_object": "flores",
|
|
"first_picture": {
|
|
"id": "red-flower",
|
|
"name": "Red flower",
|
|
"image_path": "/images/red-flower.png"
|
|
},
|
|
"second_picture": {
|
|
"id": "white-flower",
|
|
"name": "White flower",
|
|
"image_path": "/images/white-flower.png"
|
|
},
|
|
"option_count": 3,
|
|
"min_option_quantity": 1,
|
|
"max_option_quantity": 20,
|
|
"seed": 1
|
|
}'
|
|
```
|