Beispiel #1
0
        public ChallongeTournament UpdateTournament(string tournamentUrl, TournamentCreation t)
        {
            var tournament = new JsonTournamentCreation();

            tournament.json = t;
            return(ProcessJson <ChallongeTournament, JsonChallongeTournament>(
                       JsonConvert.DeserializeObject <JsonChallongeTournament>(
                           Send(tournament, "PUT", "/" + tournamentUrl)
                           )
                       ));
        }
Beispiel #2
0
        /**
         * public JsonChallongeTournament CreateTournament(ChallongeTournament t)
         *
         * Purpose: <summary>Creates a PGTournament using Challonge's API.</summary>
         *
         * Parameters:
         * TournamentCreation    The TournamentCreation object to be passed to the Challonge's Website
         *
         * Return Value:
         * JsonChallongeTournament   The processed object returned by the API
         * null                      In case a problem occurred, it will be logged by the API
         */
        public ChallongeTournament CreateTournament(TournamentCreation t)
        {
            //Creates the wrapper for the send method
            var tournament = new JsonTournamentCreation();

            tournament.json = t;
            return(ProcessJson <ChallongeTournament, JsonChallongeTournament>(
                       JsonConvert.DeserializeObject <JsonChallongeTournament>(
                           Send(tournament)
                           )
                       ));
        }