Last active
December 18, 2015 13:29
-
-
Save liuchang0812/5790551 to your computer and use it in GitHub Desktop.
api define
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
host url: http://3.lcusersystem.sinaapp.com/ |
取得提问列表
地址:/getrequestlist
返回:
json , 一个列表 , 每个内容包含 questionid,userid,category(所属类目),questioncontent(提问内容),questiondate(提问时间),answercontent(回答内容),answeruser(回复人),answerdate(回复时间)
例如:
{
[{'category': u'listen', 'questionId': 2, '_sa_instance_state': <sqlalchemy.orm.state.InstanceState object at 0x025975F0>, 'answerUser': None, 'answerContent': None, 'userId': 1, 'answerDate': None, 'questionDate': datetime.datetime(2013, 6, 16, 2, 4, 31, 860000), 'questionContent': u'how to learn ?'}, {'category': u'listen', 'questionId': 1, '_sa_instance_state': <sqlalchemy.orm.state.InstanceState object at 0x02597670>, 'answerUser': None, 'answerContent': None, 'userId': 1, 'answerDate': None, 'questionDate': datetime.datetime(2013, 6, 16, 2, 4, 20, 113000), 'questionContent': u'how to learn english?'}]
}
添加一条提问
地址: /subrequest
方法:POST
表单内容:
userid , category , questcontent
返回内容:
{
"result": "1"
}
添加一条分享
地址 : /addshare
方法 : POST
表单内容:
userid , content , title
返回内容:
json
例如:
成功
{
"result": "1"
}
失败
{
"result":“0”
}
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
修改用户信息
请求地址: /moduser
请求方法: POST
表单信息:
userid , username , email , passwd
返回内容:
一个json , 一个result字段。