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.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

According to this question (and its answer), questions and answers are using the same index to determine their ID. In other words:

  • Question with ID #1
    • Answer with ID #2
    • Answer with ID #3
    • Answer with ID #4
  • Question with ID #5

Because the 3 answers consumed 3 ids, it is impossible for a question to have ID #2, #3, or #4. This is the behavior as defined in the question linked to above.

However, this is not reflected in the API. In some cases, you must know the type of a post in order to request information about it. For example, if you want to request the comments of a particular post, you must use either /questions/{id}/comments or /answers/{id}/comments. It would be really wonderful if I could just use /posts/{id}/comments and not have to rely on knowing the post type in order to retrieve its comments.

Pretty please?

share|improve this question
    
Why would you need this? – Kevin Montrose May 29 '10 at 20:01
    
@Kevin it makes library implementation slightly simpler. Specific example: retrieve the comments to a particular post. Instead of having to know that the post is a Q or an A, I could just request /posts/{id}/comments and be done with it. (which I realize now isn't immediately obvious in my question. i'll update it) – Dave DeLong May 29 '10 at 20:50
1  
There's some merit to a posts/{id}/comments method. However, if any method might return different types (for instance, a hypothetical /posts/{id}) I'd have to say its not worth complexity. – Kevin Montrose May 30 '10 at 5:18
up vote 1 down vote accepted

The /posts/{id}/comments method has been implemented.

share|improve this answer
    
yay! thank you. :) – Dave DeLong Jun 1 '10 at 16:46

You must log in to answer this question.

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