public static void UpdatePersonalTwitchChannelInfo(string game, string status, string delay, string channelName) { TwitchBussinessLogic tbc = new TwitchBussinessLogic(); tbc.InitializeTwitchConnection(); tbc.baseTwitchUrl = tbc.baseTwitchUrl + "channels" + "/" + $"{channelName}"; var request = tbc.CreateWebRequestToTwitch(tbc.baseTwitchUrl); var channelSettings = new ChannelSettings() { channel = new Channel() { status = "Playing Hearthstone", game = "Hearthstone" } }; tbc.AddHeadersToWebRequest("", request); request = tbc.CreateDataToSend(request, channelSettings); var webResponse = request.GetResponse(); var responseBody = tbc.ReadTwitchResponse(webResponse); Console.WriteLine(responseBody); }
public static void GetTwitchChannelInfo(string channelName) { TwitchBussinessLogic tbc = new TwitchBussinessLogic(); tbc.InitializeTwitchConnection(); var request = tbc.CreateWebRequestToTwitch(tbc.baseTwitchUrl); var webResponse = tbc.ReadTwitchResponse(request.GetResponse()); Console.WriteLine(webResponse); }