Closed Bug 1089770 Opened 10 years ago Closed 10 years ago

Need to get all answers to a question.

Categories

(support.mozilla.org :: Questions, task, P2)

Tracking

(Not tracked)

RESOLVED FIXED
2014Q4

People

(Reporter: rik, Assigned: mythmon)

References

Details

(Whiteboard: u=dev c=buddyup p=1 s=2014.20)

To have a responsive application, we need to get all answers to a question in one request.

I think the cleanest API for this would be GET /question/{id}?full_content=1 or something similar.
Blocks: 1061568
After some thought (and looking at some other APIs including GitHub's issue API) I think it would make sense to just include the content in the response all the time. Does that sound reasonable to you? Then to get all answers to a question you could make a GET to /api/2/answer/?question={id} and that would include everything you need to fill out the answers on a question detail page.

Do you see any problem with always including the full content?
No, we will never query an answer without the content. I was thinking though that putting this API on the question endpoint will allow us to only do one HTTP request when a user opens a thread.
We're going to go with /api/2/answer/?question={id}  that gives us the full content for now. It's one more request but that's not too bad and will make it much easier to implement server side.
Mike did this in this sprint. Assuming 1pt
Assignee: nobody → mcooper
Priority: -- → P2
Whiteboard: u=dev c=buddyup p=1 s=2014.20
Target Milestone: --- → 2014Q4
Deployed to prod.
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.