/// <summary> /// Record game area/stage details or meta information. /// </summary> /// <param name="request">AreaEventRequest</param> /// <returns>GenericResponse</returns> public GenericResponse AreaEvent(AreaEventRequest request) { using (var client = new WebClient()) { client.Headers.Add("Content-Type", "application/json"); var json = client.UploadString(string.Format("{0}/events/area{1}", BaseEndpoint, BuildQuerystring()), JsonConvert.SerializeObject(request)); return JsonConvert.DeserializeObject<GenericResponse>(json); } }
public GenericResponse AreaEventBasicAuth(AreaEventRequest request) { using (var client = new WebClient()) { client.Headers.Add("Content-Type", "application/json"); client.Headers[HttpRequestHeader.Authorization] = string.Format("Basic {0}", GetAuthHeader()); var json = client.UploadString(string.Format("{0}/events/area", BaseEndpoint), JsonConvert.SerializeObject(request)); return JsonConvert.DeserializeObject<GenericResponse>(json); } }