i tried to poll tasks with hearts opt_field. In the documentation the specified json structure was
hearts [ { id: 1245, name: "Mittens" }, ... ]
but when when polled we get,
"hearts": [
{
"id": 17818qwerty545640,
"user": {
"id": 104764787853157345,
"name": "Gurdy Code"
}
},
{
"id": 17827xxxxuyyyy34676,
"user": {
"id": 1zxxcv672489,
"name": "Boumer Weckhunt"
}
}
]
does the id in the outer brackets have any usage?
The outer ids are the IDs of the hearts themselves - they are in a sense resources in their own right. They have a user
and a created_at
, which is the time when the user hearted the resource in question. You're absolutely correct that the documentation needs to be updated.