查看指定年月饼状图
[TOC]
简要描述
- 消费信息饼状图接口
请求URL
请求方式
- GET[Params]
请求参数
- 默认为当年当月
- month=0,返回当年的消费信息
- month为其他,则返回当月的消费信息
Header | 是否必选 | 参数类型 | 说明描述 |
---|---|---|---|
type1 | 是 | string | 选择收支类型 |
year | 是 | string | 根据年合成的信息 |
month | 是 | string | 根据月合成的信息 |
返回参数说明
根据选择的type1 返回相对应的消费类型
- type1=expand
Header | 是否必选 | 参数类型 | 说明描述 |
---|---|---|---|
type1 | 是 | string | 收支类型 |
type2 | 是 | string | 根据type1选择的收支类型,返回对应的消费类型 |
data | 是 | int | 消费/收入的金额 |
proportion | 是 | string | 在全部消费/收入中所占有的比例 |
返回示例
{
"status": 200,
"message": "成功",
"data": {
"type1":"expand"
"type2":{
"food","travel","funny","study","daily","other"
}
"data":{
1000,500,500,300,500,200
}
"proportion":{
0.333,0.167,0.167,0.10,0.167,0.066
}
}
}
备注
type1分为earning和expand两种模式