Beispiel #1
0
        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));
            }
        }
Beispiel #2
0
        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));
            }
        }