Wynncraft / WynncraftAPI

Official Wynncraft Public API (Documentation & Issue Tracker)
https://docs.wynncraft.com/
21 stars 10 forks source link

Request: Player API v2 to allow case insensitive username as well as UUIDs #7

Open dukio opened 5 years ago

dukio commented 5 years ago

Current player API v2: https://api.wynncraft.com/v2/player/{username}/stats

The {username} parameter, currently, is a case sensitive player name. I think it should be made case insensitive to allow for easier API usage (not having to find the correct player name case) as well as to fix the bug where a player who changed the case of his nickname can't be found in the API.

Example player with the case bug:

Searching for Flare2B in the API will return a "Bad Request" while searching for the old nickname would return the correct information.

In addition to insensitive name cases, I would also suggest to allow UUIDs to be used in the {username} parameter (both in the dashed and clear versions).

In the end, with this improvements the player API would return the same response for these calls:

colinrioux commented 5 years ago

Case insensitivity was added in patch 2.0.2