Get User Habit Information in V3
Function: getHabitInfoV3
Flutter example:
/// Get user habit information in V3
getHabitInfoV3(
evtBase: _VBusEvtBase.base_app_get,
evtType: _VBusEvtType.func_v3_get_habit_information,
),
/// Send command to get user habit information in V3
libManager.send(evt: CmdEvtType.getHabitInfoV3, json: jsonEncode(json));
JSON fields received by the app:
Field Name | Field Type | Field Description |
---|---|---|
browse_count | int | Number of browsing items |
implement_count | int | Number of implementation items |
bro_items | array | Details of browsing items |
imp_items | array | Details of implementation items |
Field Name | Field Type | Field Description |
---|---|---|
type | int | Type of feature 1: Running Course 2: Running Plan 3: Device Sleep 4: Weight |
evt | int | Event 1: Browse Running Course 2: Browse Running Plan 3: Browse Sleep 4: Sleep Breathing 5: Click Weight Management |
year | int | Browsing Date (Year) |
month | int | Browsing Date (Month) |
day | int | Browsing Date (Day) |
hour | int | Last click time of the day (Hour) |
min | int | Last click time of the day (Minute) |
sec | int | Last click time of the day (Second) |
count | int | Number of clicks |
Field Name | Field Type | Field Description |
---|---|---|
type | int | Type of feature 1: Running Course 2: Running Plan 3: Post-running Stretch |
evt | int | Event 1: Use Running Course 2: Implement Running Plan 3: Implement Post-running Stretch |
start_year | int | Start Time (Year) |
start_month | int | Start Time (Month) |
start_day | int | Start Time (Day) |
start_hour | int | Start Time (Hour) |
start_min | int | Start Time (Minute) |
start_sec | int | Start Time (Second) |
end_year | int | End Time (Year) |
end_month | int | End Time (Month) |
end_day | int | End Time (Day) |
end_hour | int | End Time (Hour) |
end_min | int | End Time (Minute) |
end_sec | int | End Time (Second) |
completion_rate | int | Completion Rate (0 to 100) |
Example:
{
"browse_count": 1,
"implement_count": 1,
"bro_items": [
{
"type": 0,
"evt": 0,
"year": 0,
"month": 0,
"day": 0,
"hour": 0,
"min": 0,
"sec": 0,
"count": 0
}
],
"imp_items": [
{
"type": 0,
"evt": 0,
"start_year": 0,
"start_month": 0,
"start_day": 0,
"start_hour": 0,
"start_min": 0,
"start_sec": 0,
"end_year": 0,
"end_month": 0,
"end_day": 0,
"end_hour": 0,
"end_min": 0,
"end_sec": 0,
"completion_rate": 0
}
]
}