appdotnet / api-spec

App.net API Documentation is on the web at https://developers.app.net. Source for these docs is in the new-docs branch here. Please use the issue tracker and submit pull requests! Help us build the real-time social service where users and developers come first, not advertisers.
https://developers.app.net
950 stars 99 forks source link

Go all-in on annotations #182

Open beccadax opened 12 years ago

beccadax commented 12 years ago

This is not really a serious proposal so much as a pie-in-the-sky suggestion that could give us an idea for a serious proposal.

I think that the machine_only parameter is a step in the wrong direction. It's a mistake to think of some posts as being for human consumption and others as being for machine consumption. It's better to think of your App.net stream as a mix of different post types, and clients should show whatever subset of those post types they understand. A chess post is for human consumption, but only through a client that understands chess.

Therefore, I (modestly) propose two changes:

Alpha clients should specify posts_with_annotations=net.app.core.alpha; chess clients should provide posts_with_annotations=games.chess; Alpha clients for chess enthusiasts that also show chess moves should provide posts_with_annotations=net.app.core.alpha,games.chess.

Note that posts_with_annotations does not specify that other annotation types should be omitted from posts. If a post has net.app.core.crosspost and net.app.core.alpha, an Alpha client should still receive the net.app.core.crosspost annotation, because it might use that information even though it doesn't want all crossposted posts. In SQL terms, it's a WHERE clause, not a SELECT clause. It controls which posts are included in the response, not which annotations are included in the posts.

neuroscr commented 11 years ago

Sounds like how the Channels are set up in a way, each having a type.

Also when we have user side filtering, then we'll hopefully be able to filter posts by annotation types