voceconnect/thermal-api

Allow more advanced User filtering

Sammaye opened this issue · 4 comments

Being able to search by nickname would be quite good for SEF.

I can imagine there are other cases to add that could make user querying a bit more feature rich.

Why does an API need to be search engine friendly?

If you are writing a client application, the assumption is that you have access to properties like the ID.

The application has access to ID however the application cannot be SEF without having to store a map of all authors and their IDs on my side, unless I write a URL like:

/author/123/Sammaye

It is possible but it still breaks SEF.

Again, in my opinion this is an issue for your client application, not the API. If @prettyboymp disagrees with me, we can move forward on this functionality. However, I do not believe it is the responsibility of an API to provide friendly URLs. It's just a resource for data.

Reopening. I agree that the API doesn't need to be SEF, but we do need some better filter options on users. Right now, there are none other than paging. This needs some thought around it, though. The WP_User_Query class' query vars for filtering aren't the best for an API.