“用户:wuhongjun”的版本间的差异

来自Blueidea
跳转至: 导航、 搜索
(→‎推送接口地址)
(→‎获取多条帖子信息)
第171行: 第171行:
 
|-
 
|-
 
!scope="row"|clsid
 
!scope="row"|clsid
−
| true || string||班级id
+
| false|| int||班级id
 
|-
 
|-
−
!scope="row"|appid
+
!scope="row"|startid
−
| true || string||push平台的appid
+
| true || int||起始id
 
|-
 
|-
−
!scope="row"|apikey
+
!scope="row"|number
−
| true || string||push平台的apikey
+
| true || int||获取多少条
 
|-
 
|-
−
!scope="row"|secretkey
+
!scope="row"|order
−
| true || string||push平台的secretkey
+
| true || string||排序字段(可以逗号分隔,如id asc,name desc)
 
|-
 
|-
−
!scope="row"|id
 
−
| true || string||push平台的id
 
−
|-
 
−
!scope="row"|name
 
−
| true || string||push平台的name
 
 
|}
 
|}
 
'''返回结果''':JSON格式,status=0表示操作成功
 
'''返回结果''':JSON格式,status=0表示操作成功

2014-07-28T11:59:13的版本

手机API接口

登陆接口

请求地址:http://192.168.1.5/teach/api/login
请求方式:POST
请求参数:

参数名称 必选 类型及范围 说明
username true string 用户名或者email
authcode true string 密码经过md5加密后的字符串

返回结果:JSON格式

{
    "status":1,
    "error":"",          
    "user":{}
}

登出接口

请求地址:http://192.168.1.5/teach/api/logout
请求方式:POST
请求参数:

参数名称 必选 类型及范围 说明
username true string 用户名或者email

返回结果:JSON格式

{
    "status":1,
    "error":""
}

密码修改接口

请求地址:http://192.168.1.5/teach/api/updatepwd
请求方式:POST
请求参数:

参数名称 必选 类型及范围 说明
username true string 用户名或者email
oldpwd true string 旧密码
newpwd true string 新密码

返回结果:JSON格式

{
    "status":1,
    "error":""
}


用户信息读取

请求地址:http://192.168.1.5/teach/api/getuser
请求方式:POST
请求参数:

参数名称 必选 类型及范围 说明
uid true int 用户id

返回结果:JSON格式

{
    "status":1,
    "error":"",
    "user":{}
}

推送接口地址

请求地址:http://192.168.1.5/teach/api/push
请求方式:POST
请求参数:

参数名称 必选 类型及范围 说明
token true string push平台的token
appid true string push平台的appid
apikey true string push平台的apikey
secretkey true string push平台的secretkey
id true string push平台的id
name true string push平台的name

返回结果:JSON格式,status=0表示操作成功

{
    "status":0
}

获取单条帖子信息

请求地址:http://192.168.1.5/teach/api/get_signal_thread
请求方式:POST
请求参数:

参数名称 必选 类型及范围 说明
tid true string 帖子ID

返回结果:JSON格式,status=0表示操作成功

{
    "status":0,
    "result":{
        author:'',// 作者
        clsname:'',// 所在班级
        subject:'',// 主题
        content:'',// 内容
        dateline:''// 发帖时间
 
    }
}

获取多条帖子信息

请求地址:http://192.168.1.5/teach/api/get_many_thread
请求方式:POST
请求参数:

参数名称 必选 类型及范围 说明
clsid false int 班级id
startid true int 起始id
number true int 获取多少条
order true string 排序字段(可以逗号分隔,如id asc,name desc)

返回结果:JSON格式,status=0表示操作成功

{
    "status":0
}