But both members & clubs have immutable id's, so that isn't really a problem - simply use the relevant id from the endpoint.
For example:-
https://api.chess.com/pub/player/whitedrake
{"avatar":"https://images.chesscomfiles.com/uploads/v1/user/37499010.39de8711.200x200o.552c20f23cf0.jpeg","player_id":37499010,"@id":"https://api.chess.com/pub/player/whitedrake","url":"https://www.chess.com/member/WhiteDrake","name":"Jan","username":"whitedrake","followers":35,"country":"https://api.chess.com/pub/country/CZ","location":"Prague","last_online":1553504848,"joined":1501682199,"status":"premium","is_streamer":false}
Your player id never changes & will follow you until your account is closed.
I’m sure a lot of you have already been solving this challenge. What’s the best way to assign a name (of a member or of a club) to an immutable identifier of any kind? I mean, club names may change and members can change their names too. If I cache some data (e.g. how many team matches a member has tried to sign up for) and then a name gets changed, how easily find out that I already have some data cached for that name?
In theory, a good sollution would be to convert the current name of a member (or club) to an integer, which doesn’t need to hold any meaning, just be unique and immutable (hence the title of the thread). Some sort of a primary key candidate. Members register to Chess.com sequentially (and clubs are created in sequential order too), so the number in the registration order would be a candidate, if it’s accessible somehow.
So, what’s currently the best way to do this?