Closed DylanGraham closed 6 years ago
Looks good to me! Will reopen to trigger a new CI build.
@DylanGraham: Please always gofmt your code before committing! You can simply do that and push the fix to your fork. This will update this pull request automatically and should hopefully make the CI happy.
Wow, so sorry! IntelliJ is meant to do that automatically :joy:
No worries, thanks for your contribution!
Actually, this isn't quite doing what I was expecting it to do. Unlike the docs suggest at first glance, it's not returning a list of suggested users, but a list of suggested categories. This will need some further wrapping to decode it properly: it just happens to JSON decode the name
value into the User struct's name
.
Instead of reverting this, I'll look into finishing this up myself.
I was thinking the output list of name
would be used in another function to get the list of users from each category. Or would you prefer both the /users/suggestions
and /users/suggestions/:slug
were called in the one function?
The existing GetUsersSuggestions
should then return the categories along with their slugs, which we'll have to add a new struct for. I'd recommend following anaconda's style by adding a GetUsersSuggestionsBySlug
method, which then really returns the list of users.
Add /users/suggestions.json endpoint. Not sure if you are after contributions, let me know if not!