Skip to content

Commit

Permalink
Added missing fields
Browse files Browse the repository at this point in the history
  • Loading branch information
fp12 committed Jan 11, 2017
1 parent 37b6fa9 commit 522c32c
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 7 deletions.
3 changes: 2 additions & 1 deletion challonge/match.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@ class Match(metaclass=FieldHolder):
'player2_is_prereq_match_loser', 'player2_prereq_match_id',
'player2_votes', 'round', 'scheduled_time', 'started_at',
'state', 'tournament_id', 'underway_at', 'updated_at',
'winner_id', 'prerequisite_match_ids_csv', 'scores_csv']
'winner_id', 'prerequisite_match_ids_csv', 'scores_csv',
'optional', 'rushb_id', 'completed_at', 'suggested_play_order']

def __init__(self, connection, json_def, **kwargs):
self.connection = connection
Expand Down
3 changes: 2 additions & 1 deletion challonge/participant.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@ class Participant(metaclass=FieldHolder):
'removable', 'participatable_or_invitation_attached', 'confirm_remove',
'invitation_pending', 'display_name_with_invitation_email_address',
'email_hash', 'username', 'attached_participatable_portrait_url',
'can_check_in', 'checked_in', 'reactivatable']
'can_check_in', 'checked_in', 'reactivatable',
'display_name', 'group_player_ids']

def __init__(self, connection, json_def, **kwargs):
self.connection = connection
Expand Down
9 changes: 4 additions & 5 deletions challonge/tournament.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ class Tournament(metaclass=FieldHolder):
'predictions_opened_at', 'private', 'progress_meter',
'pts_for_bye', 'pts_for_game_tie', 'pts_for_game_win',
'pts_for_match_tie', 'pts_for_match_win', 'quick_advance',
'ranked_by', 'require_shelpers_agreement',
'ranked_by', 'require_score_agreement',
'rr_pts_for_game_tie', 'rr_pts_for_game_win',
'rr_pts_for_match_tie', 'rr_pts_for_match_win',
'sequential_pairings', 'show_rounds', 'signup_cap',
Expand All @@ -72,7 +72,9 @@ class Tournament(metaclass=FieldHolder):
'sign_up_url', 'review_before_finalizing',
'accepting_predictions', 'participants_locked',
'game_name', 'participants_swappable',
'team_convertable', 'group_stages_were_started']
'team_convertable', 'group_stages_were_started',
'locked_at', 'event_id', 'public_predictions_before_start_time',
'ranked', 'grand_finals_modifier', 'predict_the_losers_bracket']

_update_parameters = ['name', 'tournament_type', 'url', 'subdomain', 'description', 'open_signup', 'hold_third_place_match',
'pts_for_match_win', 'pts_for_match_tie', 'pts_for_game_win', 'pts_for_game_tie', 'pts_for_bye', 'swiss_rounds',
Expand All @@ -97,9 +99,6 @@ def _refresh_from_json(self, json_def):
t_data = json_def['tournament']
self._get_from_dict(t_data)

# view missing fields
# print([(k, v) for k, v in t_data.items() if k not in self._fields])

if 'participants' in t_data:
self._refresh_participants_from_json(t_data['participants'])
if 'matches' in t_data:
Expand Down

0 comments on commit 522c32c

Please sign in to comment.