maruTA-bis5 / mattermost4j

Mattermost API v4 Client for Java
Apache License 2.0
31 stars 20 forks source link

(minor) doApiGet(getUserByUsernameRoute(userName)) throws a 404 error #529

Closed laurentperez closed 1 year ago

laurentperez commented 1 year ago

Hello

Trying to get the User from its name, net.bis5.mattermost.client4.MattermostClient#getUserByUsername fails with 404 not found error

because GET has been replaced by POST

see https://api.mattermost.com/#tag/users/operation/GetUsersByUsernames

varargs with net.bis5.mattermost.client4.MattermostClient#getUsersByUsernames work, because it is using the doApiPost

should getUserByUsername be removed from the code and the test at mattermost4j-integration-test-base/src/test/java/net/bis5/mattermost/client4/integrationtest/api/UsersApiTest.java ?

maruTA-bis5 commented 1 year ago

getUserByUsername calls GET /users/username/%s
https://api.mattermost.com/#tag/users/operation/GetUserByUsername

laurentperez commented 1 year ago

you are correct. I had a typo in my username :sweat_smile:

closing.