Hassle-free interface definition (3)

 

1. Whole sentence translation interface

Request address: http://localhost:8080/apcompany/learn/translation/{questionId}

Request method: POST

Parameter meaning: questionId The primary key of the question

The result is as follows

 

{
    "id": 1,
    "questionId": 0,
    "translate_lines": "When x=3, find the equation of the tangent of f(x)=x*xx +1"
}

 Result set parsing

 

id: primary key

questiongId question primary key

translate_line translate statement

 

2 Key translation interface

Request address: http://localhost:8080/apcompany/lea rn/ keyword/{wordId}

Request method: POST

Parameter meaning: wordId key words that need to be translated

The result is as follows:

{
    "id": 1,
    "name": "切线"
}

  

3 Get a single prompt step interface

 Request address: http://localhost:8080/apcompany/learn/ hit/{questiongId}/{stepId}

Request method: POST

Parameter meaning: questionId is the primary key of the question, stepId is the step ID, starting from 1

The result is as follows

 

{
    "id": 2,
    "img_string": "Hint 1: To find equation of the tangent line, we need to find its slope and y-intercept. \nHint 1: To find the tangent equation, we need to find its slope and y-intercept" ,
    "question_id": 1,
    "step": 1
}
 Results parsing

 

id primary key

img_string: prompt information, by the way can be the binary storage of the image

question_id : Question primary key

step: prompt step

4 Get all the prompt steps interface

 Request address: http://localhost:8080/apcompany/learn/ hit/{questiongId}

Request method: POST

Parameter meaning: questionId The primary key of the question

The result is as follows

[
    {
        "id": 2,
        "img_string": "Hint 1: To find equation of the tangent line, we need to find its slope and y-intercept. \nHint 1: To find the tangent equation, we need to find its slope and y-intercept" ,
        "question_id": 1,
        "step": 1
    },
    {
        "id": 3,
        "img_string": "Hint 2: Slope of the tangent line is the derivative of f(x) at x=0 \n Hint 2: The slope of the tangent line is the derivative of the function when x=0",
        "question_id": 1,
        "step": 2
    },
    {
        "id": 4,
        "img_string": "Hint 3: We need the coordinates of a point on the line to find y-intercept.\n\n Hint 3: Now we need to know the coordinates of a point on the tangent to find the y-intercept",
        "question_id": 1,
        "step": 3
    },
    {
        "id": 5,
        "img_string": "Hint 4: We know the slope and a point on the tangent line, what is the linear equation? \nHint 4: Know the slope of the tangent and the coordinates of a point on the tangent, so what is the tangent equation?",
        "question_id": 1,
        "step": 4
    }
]
 id primary key

 

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=326021479&siteId=291194637