钱迹 URL scheme 读取预算
前缀
qianji://qianji.app/read/budget
支持这些参数:
date
查看指定时间段的预算。cateId
指定分类ID,查看该分类的预算使用情况cateName
指定分类名称,查看该分类的预算使用情况
参数 date
日期范围,规则如下:
date=year2022
搜索2022年的预算date=month2023-03
搜索 2023-05 月的预算- 不传入,则默认为当前月份
- 如果不符合以上规则的参数,则会被忽略
完整示例:
qianji://qianji.app/read/budget?&date=month2023-03
注:获得 2023-03 月预算的使用情况。
返回结果(JSON):
{
"date": "month2024-03",
"total": 12000.0,
"used": 5000.0,
"averageLeft": 242.0,
"todayLeft": 68.0
}
字段说明:
date
预算的日期范围total
总预算used
已使用averageLeft
剩余日均预算todayLeft
今日剩余预算
参数 cateId 或 cateName
- 查看某个分类的预算,需要同时指定
date
参数。 - 如果
&cateId=1234
代表指定分类ID - 如果
&cateName=三餐
代表通过名称查询,如果有同名的分类,只会取第一个。
完整示例:
qianji://qianji.app/read/budget?&date=month2023-03&cateName=三餐
注:获得 2023-03 月预算中三餐分类的预算使用情况。
qianji://qianji.app/read/budget?&date=month2023-03&cateId=784823
注:获得 2023-03 月预算中分类 ID 为 784823 的预算使用情况。
返回结果(JSON):
{
"date": "month2024-03",
"total": 12000.0,
"used": 5000.0,
"category": {
"id": 12223123,
"name": "三餐",
"icon": "https://res.qianjiapp.com/ic_sancan.png"
}
}