APIs for Club Arenas

Sort:
Avatar of aplfan

I'd like to start soon tournaments with the very interesting new Clubs Arenas feature announced this fall: https://www.chess.com/news/view/chesscom-releases-club-arenas

These tournaments generate scores for Clubs and for players.  I'd like to know how could I use APIs for this?

Thanks!

Avatar of io_kloud

Tried to get the team and player points for the given club arena tour: 

https://www.chess.com/tournament/live/arena/first-ever-partner-clubs-multi-club-arena-1694295

I tried some endpoints and the endpoint that is close to getting the team score is: https://api.chess.com/pub/tournament/{url-ID}/{round}

Unfortunately it only gives the player points and pgn games. No mention of what team the player belongs and no info on club points.

Sample code in python.

"""
Tournament's round
Description: Get details about a tournament's round.
URL pattern: https://api.chess.com/pub/tournament/{url-ID}/{round}
"""
import requests
from pprint import pprint

def get_tour_round_details(tid, round):
    url = f'https://api.chess.com/pub/tournament/{tid}/{round}'
    return requests.get(url).json()

 

tid = 'first-ever-partner-clubs-multi-club-arena-1694295'
round = 1
info = get_tour_round_details(tid, round)
print(info.keys())
pprint(info['players'])

 

Result

dict_keys(['games', 'players'])
[{'place_finish': 10, 'points': 2, 'username': 'kostasmouridis'},
{'place_finish': 3, 'points': 14, 'username': 'nikos8109'},
{'place_finish': 14, 'points': 0, 'username': 'thetsekz'},
{'place_finish': 11, 'points': 2, 'username': 'joseph7505'},
{'place_finish': 14, 'points': 0, 'username': 'pelevzdravko'},
{'place_finish': 5, 'points': 6, 'username': 'snakekaki'},
{'place_finish': 12, 'points': 2, 'username': 'mrrapai'},
{'place_finish': 2, 'points': 27, 'username': 'ayanda9757'},
{'place_finish': 14, 'points': 0, 'username': 'arnav290308'},
{'place_finish': 14, 'points': 0, 'username': 'skipper_chess'},
{'place_finish': 6, 'points': 5, 'username': 'pikachu0114'},
{'place_finish': 13, 'points': 1, 'username': 'baokhoa2k10'},
{'place_finish': 15, 'points': 0, 'username': 'tomtday'},
{'place_finish': 1, 'points': 27, 'username': '14isgreat'},
{'place_finish': 9, 'points': 3, 'username': 'johnworldesen2200'},
{'place_finish': 14, 'points': 0, 'username': 'murkapn'},
{'place_finish': 16, 'points': 0, 'username': 'indian-king6'},
{'place_finish': 10, 'points': 2, 'username': 'i_dug_your_graveyard'},
{'place_finish': 15, 'points': 0, 'username': 'mateo_loko17'},
{'place_finish': 14, 'points': 0, 'username': 'lkgj123'},
{'place_finish': 8, 'points': 3, 'username': 'trannam2104'},
{'place_finish': 4, 'points': 9, 'username': 'le-quan'},
{'place_finish': 15, 'points': 0, 'username': 'chess_joker_ctl'},
{'place_finish': 16, 'points': 0, 'username': 'chesslord_i'},
{'place_finish': 10, 'points': 2, 'username': 'architgirme'},
{'place_finish': 11, 'points': 2, 'username': 'brysteryyt'},
{'place_finish': 7, 'points': 5, 'username': 'aprovlepti'},
{'place_finish': 14, 'points': 0, 'username': 'flamebolt76'}]

Avatar of aplfan

Thanks very much for your help!

I am a newbie here.  Do you know how we could approach Chess.com to ask them to develop the API also including the club scores?

Avatar of io_kloud

There is a feature request topic I opened at

https://www.chess.com/clubs/forum/view/feature-requests-2

you may write your feature requests there.

Avatar of aplfan

Great!  Thanks!