back
▲ 4 points

Testing HN API

by yamrzou·6y ago·12 comments·view on hn ↗
This is a test. Please don't upvote.
12 comments
Results if anyone stumbles upon this:

* When adding an item, its id, its parent id (if it has one), and the story id show up in the /updates endpoint.

* When editing a comment, the comment id and the story id show up in the /updates endpoint.

* When deleting a comment, its id and the story id show up in the /updates endpoint, but not its parent id.

* When kids order changes, their parent id and the story id show up in the /updates endpoint, but not necessarily the kids ids.

Yet another test. Edited.
Is the story included in /updates if a comment is added?
Is the story included in /updates if a reply to a comment is added?

Edit: What if the comment is edited?

Testing with a nested reply.

Edited the nested reply.

When posting a reply, do all parents show in /updates?
Retrying, as an upvote may have caused the story to show in /updates

Edit with result (also useful for a test) : only direct parent id and story id show in /updates when posting a reply. What about edits?

Result : In case of an edit, only the story id shows in /updates.

Testing deletes.

When deleting a comment, only the comment id and the story id are shown in the updates, but not the direct parent.
Deleted comment ids are still visible in the kids attribute of an item.
Second rep.
Result: after 10 minutes, comment order changed, both story id and direct parent id showed in /updates.