public static async Task SendMessageAsync(string Gamertag, string Message) { string Endpoint = "/conversations"; //string Data = string.Format("{\"to\":\"{0}\",\"message\":\"{1}\"}", Gamertag, Message); string Data = "{\"to\":\"" + Gamertag + "\",\"message\":\"" + Message + "\"}"; Uri RequestAddress = new Uri(string.Format("{0}{1}", BASEURI, Endpoint)); string Response = await RestServices.GetPostResponseAsync(RequestAddress, Data, APIKEY).ConfigureAwait(false); }
public static async Task UnfavoriteFriendAsync(string xuid) { string Endpoint = "/friends/favorite/remove"; //string Data = string.Format("{\"xuids\":[{0}]}", xuid); string Data = "{\"xuids\":[" + xuid + "]}"; Uri RequestAddress = new Uri(string.Format("{0}{1}", BASEURI, Endpoint)); string Response = await RestServices.GetPostResponseAsync(RequestAddress, Data, APIKEY).ConfigureAwait(false); }