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 98 forks source link

api support for sort criteria #144

Closed rjo closed 11 years ago

rjo commented 12 years ago

I'm building a profile view in #Mention that displays a list of all followers. I'd like to implement an alphabetic partition in my UI (A-D E-J ...) to make this easier to navigate but I would need API support to do it.

If /stream/0/users/[user_id]/following and /stream/0/users/[user_id]/followers supported these additional keys:

keyacceptable values
sort_criteriausername, name
orderascending, descending

and pagination was able to apply to the sorted set, then clients could easily navigate long profile lists in alpha order. This would make it easier for users to casually browse or look for a name in a followers list.

orianmarx commented 11 years ago

I agree that this is nice feature to provide in a client. That said, it is very process intensive to do on the backend and given the reality that most follower counts will likely not exceed thousand of followers for quite some time, we suggest you fetch all followers for a user and do the sorting on your end. We're unlikely to add this to the API for a long long time so I'm closing this thread.

rjo commented 11 years ago

Fair enough