更新用户详细地址
好热闹
Method and URL Structure
Method |
Resource URL |
POST |
/forum/user_update/ |
Request Parameters
Name |
Description |
Required |
Default |
username |
用户名 |
YES |
|
password |
密码 |
YES |
|
optname |
要更新的数据选项 |
YES |
|
value [^value] |
要更新的值 |
YES |
|
Optname List
Name |
Description |
info |
修改基本信息: 昵称、头像、简介 |
nickname |
昵称 |
desc |
简介 |
thumb |
头像 |
deliver_addess |
收货地址 |
name |
收货人姓名 |
telphone |
电话 |
Deliver Adress Parameters
Request
{
"username":"username",
"password":"password",
"optname":"deliver_addess",
"value":data,
}
cURL Example
# 更新收获取地址
$ curl -H "Accept: application/json" -H "Content-Type: application/json" -X POST \
--data '{
"username":"18012345678",
"password":"123456",
"optname":"deliver_address",
"value": {
"provincial":"上海",
"city":"上海",
"area":"浦东",
"town":"张江",
"address_detail":"我的收货地址",
"postcode":"12345"
}
}' \
'http://www.haorenao.cn/froum/user_update/'
# 更新基本信息
$ curl -H "Accept: application/json" -H "Content-Type: application/json" -X POST \
--data '{
"username":"18012345678",
"password":"123456",
"optname":"info",
"value":{
"nickename":"erxiao",
"desc":"nanana",
"thumb":""
}
}' \
http://www.haorenao.cn/forum/user_update/
# 更新昵称
$ curl -d '{"username":"18016271364", "password=123456", "optname":"nickname", "value":"xiaoer"}' http://www.haorenao.cn/forum/user_upate
JSON Response
Name |
Description |
ret |
标识是否成功。ok, 成功; failed, 失败 |
reason |
失败原因 |
{
"ret":"ok",
"reason":"",
}