// This will POST an update private void PostTitle(String title) { Media livestream2 = new Media { media_id = UserId, media_status = title, media_user_name = Channel, media_category_id = GetGameId(gameComboBox.Text), media_recording = GetRecordings().ToString(), media_hidden = GetHiddenBoolean() }; List<Media> livestream = new List<Media> {livestream2}; var json = new JavaScriptSerializer().Serialize(new { livestream }); API.Put( String.Format("{0}/media/live/{1}.json?showHidden=true&authToken={2}&nocache=true", API.BaseApi, Channel, AuthToken), json); groupBox1.Focus(); }
private void PostGame(String gameName) { #region Hide //String gameObject = API.GetApi(String.Format("{0}/game/{1}?seo=true", API.BaseApi, RemoveDiacritics(gameName.Replace("-", "").Replace(".", " -").Replace(" ", "-").Replace(",", " -").Replace(":", "")))).ToString(); #endregion Media livestream2 = new Media { media_id = UserId, media_status = streamTitle.Text, media_user_name = Channel, media_category_id = GetGameId(gameName), media_recording = GetRecordings().ToString(), media_hidden = GetHiddenBoolean() }; List<Media> livestream = new List<Media> {livestream2}; var json = new JavaScriptSerializer().Serialize(new { livestream }); Debug.WriteLine(json); API.Put( String.Format("{0}/media/live/{1}.json?showHidden=true&authToken={2}&nocache=true", API.BaseApi, Channel, AuthToken), json); groupBox1.Focus(); }