Parsing players with fair play violation status?

Sort:
pers1pan

Hi!
I am trying to find a way to get a list of usernames for players who "cheated", but I could not find any good way to do that, so I am asking for your help.

Martin_Stahl

Pretty sure there isn't a comprehensive way.

diegolamarao

Endpoints

Player Profile

Description: Get additional details about a player in a game.
URL pattern: https://api.chess.com/pub/player/{username}
Data format:

{
  "@id": "URL", // the location of this profile (always self-referencing)
  "url": "URL", // the chess.com user's profile page (the username is displayed with the original letter case)
  "username": "string", // the username of this player
  "player_id": 41, // the non-changing Chess.com ID of this player
  "title": "string", // (optional) abbreviation of chess title, if any
  "status": "string", // account status: closed, closed:fair_play_violations, basic, premium, mod, staff
  "name": "string", // (optional) the personal first and last name
  "avatar": "URL", // (optional) URL of a 200x200 image
  "location": "string", // (optional) the city or location
  "country": "URL", // API location of this player's country's profile
  "joined": 1178556600, // timestamp of registration on Chess.com
  "last_online": 1500661803, // timestamp of the most recent login
  "followers": 17 // the number of players tracking this player's activity
  "is_streamer": "boolean", //if the member is a Chess.com streamer
  "twitch_url": "Twitch.tv URL",
  "fide": "integer" // FIDE rating
}


status": "string", // account status: closed, closed:fair_play_violations, basic, premium, mod, staff

is what you need

pers1pan
diegolamarao wrote:
Endpoints

Player Profile

Description: Get additional details about a player in a game.
URL pattern: https://api.chess.com/pub/player/{username}
Data format:

{ "@id": "URL", // the location of this profile (always self-referencing) "url": "URL", // the chess.com user's profile page (the username is displayed with the original letter case) "username": "string", // the username of this player "player_id": 41, // the non-changing Chess.com ID of this player "title": "string", // (optional) abbreviation of chess title, if any "status": "string", // account status: closed, closed:fair_play_violations, basic, premium, mod, staff "name": "string", // (optional) the personal first and last name "avatar": "URL", // (optional) URL of a 200x200 image "location": "string", // (optional) the city or location "country": "URL", // API location of this player's country's profile "joined": 1178556600, // timestamp of registration on Chess.com "last_online": 1500661803, // timestamp of the most recent login "followers": 17 // the number of players tracking this player's activity "is_streamer": "boolean", //if the member is a Chess.com streamer "twitch_url": "Twitch.tv URL", "fide": "integer" // FIDE rating }


status": "string", // account status: closed, closed:fair_play_violations, basic, premium, mod, staff

is what you need

Yes, but I need to get a list of all players who has cheated and the method you provided only gives information about 1 specific player (

CosmosOfSolomon

There is an endpoint (https://api.chess.com/pub/country/{iso}/players) that returns an array of usernames for active players specific to a country. You could potentially iterate over this array and pass each username to the player profile endpoint at: https://api.chess.com/pub/player/{username} to obtain "status" information.

You should note that by hitting the endpoint for players of a country: "By requesting this list once per day, you will obtain a list of all new registrants and all people who are currently active on Chess.com and identify themselves as being in (or associated with) this country."

pers1pan
ImperatorJM wrote:

There is an endpoint (https://api.chess.com/pub/country/{iso}/players) that returns an array of usernames for active players specific to a country. You could potentially iterate over this array and pass each username to the player profile endpoint at: https://api.chess.com/pub/player/{username} to obtain "status" information.

You should note that by hitting the endpoint for players of a country: "By requesting this list once per day, you will obtain a list of all new registrants and all people who are currently active on Chess.com and identify themselves as being in (or associated with) this country."

Thank you very much for suggestion, but I already tried this method and it did not work, because users who have been banned are not active at the moment and never will be (

Storms-Fast

Please see my thread:

https://www.chess.com/clubs/forum/view/help-me-with-chess-web-api-errors

It's not possible to do exactly what you want - but there are other things I have done on similar lines. 

Storms-Fast
ImperatorJM wrote:

There is an endpoint (https://api.chess.com/pub/country/{iso}/players) that returns an array of usernames for active players specific to a country. You could potentially iterate over this array and pass each username to the player profile endpoint at: https://api.chess.com/pub/player/{username} to obtain "status" information.

You should note that by hitting the endpoint for players of a country: "By requesting this list once per day, you will obtain a list of all new registrants and all people who are currently active on Chess.com and identify themselves as being in (or associated with) this country."

The issue with that endpoint is that it only gives you active users - not clsoed/banned accounts. So, what I did was to take a list of all active players in a country  and then run it after 10 days to show who was banned from that original list. Not ideal but gives you an indication of proportion of cheaters per country

CosmosOfSolomon

thumbup.png