When querying the /users/{ids}/reputation API route, the reputation_change
field is missing from the results on community-wiki answers. I think the reputation type should always include this field, and its value should be 0 if there was no reputation change on the post. (Alternatively, you could just exclude 0-change reputation objects from the query results.)
Here's a query example with results that are missing the reputation_change
field:
The CW posts 13977422 and 13975947 are the two that are missing the field.
{
"on_date": 1356103151,
"vote_type": "accepts",
"post_type": "answer",
"post_id": 13977422,
"user_id": 1288
},
{
"on_date": 1356060056,
"vote_type": "accepts",
"post_type": "answer",
"post_id": 13975947,
"user_id": 1288
}
The two examples above are answer accepts, but this also sometimes happens on answer upvotes.
{
"on_date": 1379667908,
"vote_type": "up_votes",
"post_type": "answer",
"post_id": 8669380,
"user_id": 1288
}
{
"on_date": 1374767790,
"vote_type": "up_votes",
"post_type": "answer",
"post_id": 17593979,
"user_id": 1288
}
But not always. Here's one that has a reputation_change
value of 0.
{
"on_date": 1380379795,
"reputation_change": 0,
"vote_type": "up_votes",
"post_type": "answer",
"post_id": 623007,
"user_id": 1288
}
From this very small sample, it looks like the reputation_change
field is missing on posts where the community wiki checkbox was checked when the post was created.