/// <summary> /// Record game downloaded event (since most stores keep track of purchases, this event /// can be raise upon first run) /// </summary> /// <param name="request">DownloadedRequest</param> /// <returns>GenericResponse</returns> public GenericResponse DownloadedEvent(DownloadedRequest request) { using (var client = new WebClient()) { client.Headers.Add("Content-Type", "application/json"); var json = client.UploadString(string.Format("{0}/events/downloaded{1}", BaseEndpoint, BuildQuerystring()), JsonConvert.SerializeObject(request)); return JsonConvert.DeserializeObject<GenericResponse>(json); } }
public GenericResponse DownloadedEventBasicAuth(DownloadedRequest request) { throw new NotImplementedException(); }
public GenericResponse DownloadedEventBasicAuth(DownloadedRequest 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/downloaded", BaseEndpoint), JsonConvert.SerializeObject(request)); return JsonConvert.DeserializeObject<GenericResponse>(json); } }