Take the 2-minute tour ×
Stack Apps is a question and answer site for apps, scripts, and development with the Stack Exchange API. It's 100% free, no registration required.

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 question
  • answer_posted => the id of the answer
  • comment_posted => the id of the comment
  • post_edited => the id of the post
  • user_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
share|improve this question
    
Unless Kevin has just added it, this field already exists as event_id? –  Jonathan. Feb 12 '12 at 10:22
    
@Jonathan. I thought event_id was an identifier for the event itself, and not the thing to which the event refers –  Dave DeLong Feb 12 '12 at 16:15
    
the event_id always matches the id in the link 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. –  Jonathan. Feb 12 '12 at 16:34
    
@Jonathan. Thanks; in that light, I've updated my question :) –  Dave DeLong Feb 12 '12 at 22:04

1 Answer 1

up vote 2 down vote accepted

The documentation was confusing there, event_id is the question/answer/etc. id.

I've modified the documentation for the event type.

share|improve this answer
    
Excellent! Thank you for the clarification. –  Dave DeLong Feb 13 '12 at 19:01

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .