{
"status":0
"message":"failed"
}
PETLOG_SALT:保存密码使用的“盐”
PETLOG_DATABASE:数据库URL
PETLOG_SECRET_KEY:密钥
PETLOG_REGISER_KEY:注册用户时的加密密钥
PETLOG_CARD_IMAGES:用户的图片的存储路径
PETLOG_MAIL_USERNAME:邮箱系统账号
PETLOG_MAIL_PASSWORD:邮箱系统密码
Request:
{
"email": Text,
"password": Text,
"user_nickname": Text,
"address": Text,
"gender": Text[male/female],
"register_key": MD5 SHA1-32
}
Response:
{
"status":1/0
"message":"success"/"failed"
}
Request:
{
"email":Text
}
Response:
{
"status":1 “status":0
"code": "message":failed
}
Request:
Response:
{
"status":1/0,
"message: "ok"/"failed"
}
Request:
{
"email":Text,
"password":Text
}
Response:
{
"status":1, "status":0,
"token": "message":"failed"
}
Response:
{
”status:1/0 (是否登录)
"message:
"user":{
"name":Text,
"avatar":Text,
"motto":Text,
"gender":Text,
"birth_day":YYYY-MM-DD,
"location":Text
}
}
Request:
{
multipart/form-data
}
Response:
{
"status":1, "status":0,
"filename": "message":"faied"
}
Request:
{
"name":Text,
"avatar":Text,
"motto":Text,
"gender":Text,
"birth_day":YYYY-MM-DD,
"location":Text
}
Response:
{
"status":1, "status":0,
"message":"success" "message":"failed"
}
Response:
{
"status":1, "status":0,
"tags":Array "tags":Array
}
Request:
{
"content":Text,
"status":Text,
"tags":Array,
"images":Array,
"for":Text
}
Response:
{
"status":1, "status":0,
"message":"success" "message":"failed"
}
Requuest:
{
"card_id":Text,
"to_author":Bool,
"reply_to":Text,
"content":Text
}
Response:
{
"status":1, "status":0,
"message":
"time":
}
Request:
{
"id",Text,
"action":1/0
}
Response:
{
"status":1/0,
"message":"success"/"fail"
}
Request:
{
multipart/form-data
}
Response:
{
"status":1/0,
"filename":
}
Response:
{
"status" : 0,
"message" : "你没有权限获得该宠物的时间轴"/
"status"1,
message: Text,
name: Text, //宠物昵称
age: Int, //根据添加宠物时提供的出生日期计算
avatar: Text, //宠物头像
motto: Text, //宠物简介
items: [
{
// 非年份时
date: (M)M-(D)D,
is_year: false,
items: [
{
content: Text,
images: Array,
status: Text,
id: Text
},
{
...
}
]
},
{
//是年份时, “”、[]均代表空值
date: "",
items: [],
is_year: true,
year: Int
}
]
}
Response:
{
status: 1/0, //用户是否登录的标识符
infinited: Bool, //如果取完所有卡片,返回true,否则返回false
cards: [
{
id: Text,
author: {
name: Text,
id: Text,
avatar: Text,
followed: Bool
},
liked: Bool,
post: {
time: YYYY年(M)M月(M)M日 hh:mm,
content: Text,
status: Text, //记录宠物状态
tags: Array,
likes: Int,
images: Array
},
comments: Int //评论数
}
]
}
Response:
{
id: Text,
author: {
name: Text,
id: Text,
avatar: Text,
followed: Bool
},
liked: Bool,
post: {
time: YYYY年(M)M月(M)M日 hh:mm,
content: Text,
status: Text, //记录宠物状态
tags: Array,
likes: Int,
images: Array
},
comments: [
{
id: Text,
author: {
name: Text,
id: Text,
avatar: Text
},
to_author: Bool, //标识被回复人是否是作者
reply_to: Text, //被回复人昵称
time: YYYY-M-D, //如果年份与当前年份相等,只显示M-D
content: Text
}
]
}
Response:
{
status: 1/0, //是否获取成功的标识符
infinited: Bool, //如果取完所有卡片,返回true,否则返回false
cards: [
{
id: Text,
author: {
name: Text,
id: Text,
avatar: Text,
followed: Bool
},
liked: Bool,
post: {
time: YYYY年(M)M月(M)M日 hh:mm,
content: Text,
status: Text, //记录宠物状态
tags: Array,
likes: Int,
images: Array
},
comments: Int //评论数
}
]
}
Response:
{
}
Request:
{
"id":Text,
"action":1/0
}
Response:
{
"status":1/0,
"message":"关注成功"/"取消关注成功"
}
Response:
{
status: 1/0, //用于判断用户是否登录
message: Text,
followers: [
{
name: Text, //用户昵称
id: Text,
avatar: Text,
motto: Text,
followed: Bool
}
]
}
Response:
{
status: 1/0, //用于判断用户是否登录
message: Text,
followers: [
{
name: Text, //用户昵称
id: Text,
avatar: Text,
motto: Text,
followed: Bool
}
]
}
Request:
{
}
Response:
{
status: 1/0, //用于标识用户是否登录
message: Text,
user: {
name: Text,
avatar: Text,
followers: Int,
following: Int,
motto: Text
}
}
Request:
{
status: 1/0, //用于标识用户是否登录
message: Text,
user: {
name: Text,
avatar: Text,
motto: Text,
gender: Text[male/female],
birth_day: YYYY-MM-DD,
location: Text
}
}
Response:
{
status: 1/0, //用于标识用户是否登录
message: Text,
user: {
name: Text,
avatar: Text,
motto: Text,
gender: Text[male/female],
birth_day: YYYY-MM-DD,
location: Text
}
}
Request:
{
status: 1/0, //用于判断该宠物是否属于当前用户
message: Text,
id: Text,
name: Text,
motto: Text,
avatar: Text,
gender: Text[male/female],
birth_day: YYYY-MM-DD,
meet_day: YYYY-MM-DD,
variety: Text
}
Response:
{
"status":1/0,
"message":"success"/"failed"
}
Request:
{
name: Text,
motto: Text,
avatar: Text,
gender: Text[male/female],
birth_day: YYYY-MM-DD,
meet_day: YYYY-MM-DD,
variety: Text
}
Response:
{
status: 1/0,
message: Text,
id: Text
}
Request:
{
"id":Text
}
Response:
{
status: 1/0, //用于判断该宠物是否属于当前用户
message: Text,
name: Text,
motto: Text,
avatar: Text,
gender: Text[male/female],
birth_day: YYYY-MM-DD,
meet_day: YYYY-MM-DD,
variety: Text
}