The "Event" object doesn't have an easy way for getting at the object relating to the event. There's a link
field, but I don't fancy having to parse the information out of that (although I could).
It'd be nice if the "Event" object had an object_id
field. This object_id
would have a different meaning depending on the event_type
field:
question_posted
=> the id of the questionanswer_posted
=> the id of the answercomment_posted
=> the id of the commentpost_edited
=> the id of the postuser_created
=> the id of the user
This would be much nicer than trying to retrieve the id from the link.
Alternatively, if the event_id
field already fulfills this purpose, then the documentation really needs to be updated to reflect that and not simply say:
event_id - integer, refers to an event
event_id
?event_id
was an identifier for the event itself, and not the thing to which the event refersevent_id
always matches the id in thelink
field. But it is not the most well named field, and the docs do say it "refers to an event", thought there isn't much point having it refer to an event as there's only one method you can get events from. So I'd say the docs are wrong.