??? This already shows up. See here:
https://www.chess.com/leaderboard/daily
for example.
My bad -- I haven't noticed what club this was in.
You're right - such addition is definitely needed.
I would have a single field, title, and only populate it if the person has registered a title with chess.com.
Is there value in having two fields, one boolean and one possibly empty?
I would have a single field, title, and only populate it if the person has registered a title with chess.com.
Is there value in having two fields, one boolean and one possibly empty?
I guess a single field 'title' would probably work too. My original idea behind a player_type was to categorise the players like what kind of happens in the existing 'status' key. And if player_type is titled, then a 'title' key will be provided, otherwise it would not be there.
I guess a 'title': 'GM' -if they are GM, for example- and a 'title': null for those untitled players would also accomplish this.
Either will work. Consistency is good. Simplicity is also good. Competing aspirations some of the time. I'd prefer this endpoint be consistent with others over being simpler, but OTOH I've a background in database normalisation, and you can't fill the title field unless the player_type is titled ... better to avoid the chance for bugs and have a single field.
I presume that most/all of this data is stored in some backend relational database anyway, so translation should be relatively easy. (Says he who's yet to write a line of JSON code, but who has used X number of RPC-over-HTTP protocols in the past.)
Also written some of my own, and used web scrapers when I absolutely had too. I've a good war story about one of those, but it needs beer or liquor to discuss properly.
This is a good idea. In addition to identifying the title in the player profile, should we provide a list of players for each title? Is there a use-case for such a list, that could not be performed with the title in the username lookup?
Would it be possible to somehow show if a player is titled or not? Perhaps even add what their title is?
Edit:
Perhaps a "player_type": "titled | untitled" could be provided in the https://api.chess.com/pub/player/{username} endpoint. And if they are titled perhaps something -if they are a GM, for example-: "title": "GM"