public void FetchUnviewedTournamentsHandler(string jsonString) { JSONNode json = JSON.Parse(jsonString); if (wasSuccess(json)) { JSONNode tournamentsNode = json["tournaments"]; fetchUnviewedTournamentsSuccessHandler(TournamentProtocol.ParseTournaments(tournamentsNode["results"])); } else { fetchUnviewedTournamentsErrorHandler(getErrors(json)); } }
public void ReportScoreHandler(string jsonString) { JSONNode json = JSON.Parse(jsonString); if (wasSuccess(json)) { _fetchWallet(); JSONClass tournamentNode = json["tournament"] as JSONClass; if (reportScoreSuccessHandler != null) { reportScoreSuccessHandler(TournamentProtocol.ParseTournament(tournamentNode)); } } else { reportScoreErrorHandler(getErrors(json)); } }