-
Notifications
You must be signed in to change notification settings - Fork 12
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Contacts index / search / discovery / relationship status #54
Comments
A draft for point 2, adding a new query parameter FilterThe The possible values are:
Examples:
|
Sorry for the late response here, had to take a bit of time to consider your proposal and give it the time it deserves. I'm not sure I quite like the idea of using the What you are suggesting is a generic How about this: Instead of mixing search and lists, we could refactor the aspects routes to be below a
It seems like a bit more work, and maybe that's not worth it, but maybe that results in more predictable APIs. I would love to hear a third opinion as well. Maybe I'm overcomplicating. :) |
The draft is intended to cover the usecases described in 2. For the usecases described in 1 I agree and was roughly planning to have some kind of I'm not sure I see it as magic values but rather building up a search expression language while avoiding to have a full blown parser for it that could parse something like |
Fair points. For some reason, I read your point 1 as point 2 (because you started at 0, tricky!) and then confused myself. Your arguments are good, go for it. :) |
Four related topics, so I'll start with one issue for all of them.
Currently you can search through all known users to a pod. You can also get a list of contacts per aspect. There's no way to search/list/discover people beyond that. This leaves a couple of use cases without a clear path forward or an efficient implementation.
Some API consumers don't need to care about aspects, only a users contacts. Or maybe the want to build a contacts first, aspects second UI. We shouldn't frame client developers by only offering an aspects first, contacts second API.
For example when mentioning somebody, it would be good to have a route that can search through all the contacts of a user, optionally filtered through a given list of aspects. This could be just new query parameters to
/search/users
.Currently there's no (clear) way to trigger a user discovery by diaspora ID.
/search/users
could implicitly do this (it doesn't currently). But then we have to think of how to communicate the fact that the endpoint may return a result with a second request in a couple of seconds to minutes while the background job does its thing.Touching Point 1. and 2. heavily, but I felt it can be its own topic: Currently relationship status is only ever returned on the extended profile route. There's no contacts index that returns it. This leaves clients with a N*M query if they want to discover the relationship status of all contacts, where N = number of aspects, M = average amount of users per aspect. Point 1. could remove the N but leaves an 1 + M (M = total number of contacts) amount of queries. While it's nice that the current routes can reuse the "short profile" data structure a lot, it leaves a lot to be desired for usecases like selecting the recipients of a conversation. Getting a list of contacts only sharing with but not receiving from the user is outright impossible currently. So we probably should return relationship status in the current contacts for aspect route, the proposed all contacts route and the user search route. Additionally filter options for relationship status in all those routes seem sensible.
The text was updated successfully, but these errors were encountered: