/// <summary> /// Remove a participant from a tournament. /// </summary> /// <param name="tournament"></param> /// <param name="participant"></param> /// <returns></returns> public Participant ParticipantDestroy(Tournament tournament, Participant participant) { string url = string.Format("tournaments/{0}/participants/{1}", this.TournamentIdentifier(tournament), participant.Id); var json = this.MakeJsonRequest(url, "DELETE"); return Deserializer.Participant(json); }
/// <summary> /// Change some information about a participant. /// </summary> /// <param name="tournament"></param> /// <param name="participant"></param> /// <param name="parameters"></param> /// <returns></returns> public Participant ParticipantUpdate(Tournament tournament, Participant participant, ParticipantUpdateParameters parameters) { if (parameters == null) { throw new ArgumentNullException("parameters"); } var param = parameters.ToDictionary(); string url = string.Format("tournaments/{0}/participants/{1}", this.TournamentIdentifier(tournament), participant.Id); var json = this.MakeJsonRequest(url, WebRequestMethods.Http.Put, param); return Deserializer.Participant(json); }