# 无忧的接口定义（三）

www.MyException.Cn  网友分享于：2013-09-07  浏览：0次

1. 整句翻译接口

```{
"id": 1,
"questionId": 0,
"translate_lines": "当x=3的时候，找到f(x)=x*x-x +1的切线的方程"
}```

结果集解析

id： 主键

questiongId 问题主键

translate_line 翻译语句

2 重点翻译接口

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

3 获取单个提示步骤接口

请求地址：http://localhost:8080/apcompany/learn/hit/{questiongId}/{stepId}

```{
"id": 2,
"img_string": "Hint 1: To find equation of the tangent line, we need to find its slope and y-intercept. \n提示一：要找到切线方程，我们需要找到该方程的斜率与y轴截距",
"question_id": 1,
"step": 1
}```
结果解析

id 主键

img_string:提示信息，by the way 可以是图片的二进制存储

question_id ：问题主键

step：提示步骤

4 获取所有的提示步骤接口

请求地址：http://localhost:8080/apcompany/learn/hit/{questiongId}

```[
{
"id": 2,
"img_string": "Hint 1: To find equation of the tangent line, we need to find its slope and y-intercept. \n提示一：要找到切线方程，我们需要找到该方程的斜率与y轴截距",
"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 提示二：切线斜率即为当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                提示三：现在需要知道切线上一点的坐标来求y轴截距",
"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? \n提示四：知道了切线斜率与切线上一点坐标，所以切线方程是？",
"question_id": 1,
"step": 4
}
]```
id 主键

img_string:提示信息，by the way 可以是图片的二进制存储

question_id ：问题主键

step：提示步骤