141 lines
2.8 KiB
Markdown
Executable File
141 lines
2.8 KiB
Markdown
Executable File
|
|
用户信息
|
|
========
|
|
|
|
# 查看账号信息
|
|
- 地址: /api/person/self 或 /api/person/[person oid]
|
|
- 方法: GET
|
|
- 验证方法: Cookie: user
|
|
- 响应对象: [person](./object.md#person)
|
|
- URL参数: person oid
|
|
- 请求范例
|
|
|
|
curl -v -A CURL -b cookies.txt http://127.0.0.1:8888/api/person/self
|
|
|
|
> GET /api/person/self HTTP/1.1
|
|
> User-Agent: CURL
|
|
> Host: 127.0.0.1:8888
|
|
> Accept: */*
|
|
> Cookie: "user="2|1:0|10:1473817034|4:user|16:MTg2ODA1NTUwNzA=|2768bb77396815e5a7ca9fe3c65dc8060943c57aeb078c746faf56036533aa12""
|
|
|
|
- 响应范例
|
|
|
|
```json
|
|
{
|
|
"obj":{
|
|
"_id":{
|
|
"$oid":"565ba619bf483c7369e5b4a3"
|
|
},
|
|
"username":"18680555070",
|
|
"password":"f8cdb04495ded47615258f9dc6a3f4707fd2405434fefc3cbf4ef4e6",
|
|
"nickname":"2222",
|
|
"phone":"18680555070",
|
|
"telephone":"",
|
|
"app":"aiqiangua2.0",
|
|
"devicetokens":[
|
|
{
|
|
"token_type":"ios",
|
|
"token":"9dc0aa1154ad3c10d28bcbd21dbaa26d0fbc2135b1a6e2a2844517eb5fe5468b",
|
|
"is_enable_aliase":false,
|
|
"created_at":{
|
|
"$date":1473671277244
|
|
}
|
|
},
|
|
{
|
|
"token_type":"android",
|
|
"token":"22dde87aa7bbfde548179ef3933cb60f249592c2",
|
|
"is_enable_aliase":false,
|
|
"created_at":{
|
|
"$date":1473772757489
|
|
}
|
|
}
|
|
],
|
|
"weight":0,
|
|
"step":0,
|
|
"age":0,
|
|
"height":0,
|
|
"avatar":"18680555070.png",
|
|
"avatar_url":"/media/avatar/200/18680555070.jpg",
|
|
"role":"user",
|
|
"gender":"male",
|
|
"created_at":{
|
|
"$date":1448875673502
|
|
},
|
|
"updated_at":{
|
|
"$date":1448875673502
|
|
},
|
|
"lastlogin_ip":"121.32.197.247",
|
|
"lastlogin_at":{
|
|
"$date":1473772757475
|
|
},
|
|
"lastlogin_by":"",
|
|
"enable":false,
|
|
"email_is_checked":false,
|
|
"phone_is_checked":true,
|
|
"push_sos_enable":true,
|
|
"push_fence_enable":true,
|
|
"push_abnormal_enable":true,
|
|
"push_message_enable":true,
|
|
"push_lowpower_enable":true,
|
|
"push_system_enable":true,
|
|
"push_fall_enable":true,
|
|
"push_env_enable":true,
|
|
"auth_type":"weixin",
|
|
"auth_uid":"oXm9utw5vTIi4PV4bZtcFFeFJqS8",
|
|
"auth_updated_at":{
|
|
"$date":1448875673502
|
|
},
|
|
"register_app":"",
|
|
"is_device_owner":false,
|
|
"devices":[
|
|
|
|
],
|
|
"groups":[
|
|
{
|
|
"$oid":"565ba687bf483c7369e5b4a4"
|
|
}
|
|
],
|
|
"$community":{
|
|
|
|
},
|
|
"$devices":[
|
|
|
|
],
|
|
"$groups":[
|
|
{
|
|
"_id":{
|
|
"$oid":"565ba687bf483c7369e5b4a4"
|
|
},
|
|
"owner":{
|
|
"$oid":"565ba619bf483c7369e5b4a3"
|
|
},
|
|
"name":"18680555070家",
|
|
"created_at":{
|
|
"$date":1448875783707
|
|
},
|
|
"is_public":false,
|
|
"members":[
|
|
{
|
|
"$oid":"565ba687bf483c7369e5b4a5"
|
|
},
|
|
{
|
|
"$oid":"578f41442642511a2446b9f0"
|
|
},
|
|
{
|
|
"$oid":"57a40ebe2642514b25a49076"
|
|
},
|
|
{
|
|
"$oid":"57d108c4264251061d083074"
|
|
},
|
|
{
|
|
"$oid":"57d6144126425121e8b81865"
|
|
}
|
|
]
|
|
}
|
|
]
|
|
},
|
|
"success":true,
|
|
"obj_name":"person"
|
|
}
|
|
```
|