Closed tigerbears closed 12 years ago
I think this is similar to https://github.com/appdotnet/api-spec/issues/133 right? We are considering making it possible to retrieve posts in reverse order, which would have the effect of letting you get the post in question. When the documentation states that the reply root is included, it merely means that it will be included within the paginated set of posts that you can get.
Exactly. 133 seemed to be tabled for now, so I opened this as a separate issue even though the ultimate solution is eventually the same. It's different use case with IMO a different priority.
If we're somehow in a situation where adding this for all streams isn't feasible for a while, but could be done for this one soon, that would be fantastic. If we're in an "we'll add them all at once, and it's coming, hold your horses son" situation, then this is a dupe. :)
It's definitely closer to the latter case (if/when we add this, it will be to all of them at once). I'm not going to say "it's coming" but we're definitely thinking about this. This use case did give us something to think about as far as priorities go, but I'm still going to close it as a dupe of #133.
OK cool, thanks for adding this situation to the consideration. When this is in place, it will enable us to do some nice things with threads (whether text posts or the shiny new "machine" posts).
For example, when requesting https://alpha-api.app.net/stream/0/posts/315244/replies , post 315244 isn't included in the response.
The documentation states that it should be, which is a Good Thing (tm) when presenting a conversation to a user.
I suspect this is happening here because 315244 is a post from @dalton with at least 20 replies, and the API is simply returning the 20 newest posts in that thread. In this case, I need to view the conversation from the beginning.
Rather than tacking the post onto the response, this is probably another use case for a parameter requesting the N oldest posts rather than the N newest.
I could walk back in the conversation 20 at a time, but long conversations are going to make that a terrible mobile experience. (Based on my observations of user posting habits, conversations are getting long fast, as spinoff conversations occur constantly.) In some cases I could use since_id and before_id to just grab that original post, but that starts to break threads less than 20 posts long, which we can't detect reliably.
I'd argue that conversations are broken for mobile until /posts/foo/replies gains this ability. I have a workaround for now, but to do conversations reasonably well, this is key. Any consideration for implementing this soon would be gratefully appreciated.
If it's too hairy to add to all /posts/ endpoints, adding it to /replies and/or /threads would be a welcome first step. Thanks!