public async Task <IActionResult> OnPostUpdateAsync() { Tag T = new Tag(); T.TagID = int.Parse(Request.Form["SelectedTagID"]); T.Name = Request.Form["Name"]; T.Hashtags = Request.Form["Hashtags"]; T.ParentTagID = int.Parse(Request.Form["TagParentID"]); T.Type = int.Parse(Request.Form["TagType"]); string en = Request.Form["Enabled"]; if (en == "on" || en == "true") { T.Enabled = true; } else { T.Enabled = false; } string PostResponse = await DS.PutAsyncString(T, "Tag/UpdateTag"); string repsonse = await DS.GetAsync("Tag/GetAll"); Tags = JsonConvert.DeserializeObject <List <Tag> >(repsonse); return(Page()); }
public async Task <IActionResult> OnPostComicAsync() { string response = await DS.GetAsync("user/IsEditorLoggedIn"); EditorLoggedIn = Newtonsoft.Json.JsonConvert.DeserializeObject <bool>(response); if (EditorLoggedIn) { ComicStrip CS = new ComicStrip(); CS.DefaultHeight = int.Parse(Request.Form["DefaultHeight"]); CS.DefaultWidth = int.Parse(Request.Form["DefaultWidth"]); CS.Description = Request.Form["Description"]; CS.Name = Request.Form["Name"]; CS.Enabled = (int.Parse(Request.Form["enabledStatus"]) != 0); CS.ImageURL = Request.Form["imgURLtextbox"]; HttpResponseMessage message = await DS.PostAsync(CS, "comic/AddComic"); if (message.StatusCode != System.Net.HttpStatusCode.OK) { ResponseMessage = "There was a problem uploading the comic."; } else { string newEpID = await DS.GetAsync("comic/GetLatestComicID"); SavedStripID = Newtonsoft.Json.JsonConvert.DeserializeObject <int>(newEpID); } } return(Page()); }
private async Task <string> GetNewsletters() { string response = await DS.GetAsync("News/GetNewsStubs"); NewsLetters = JsonConvert.DeserializeObject <List <Newsletter> >(response); return(""); }
public async Task <IActionResult> OnPostScheduleAsync() { AddScheduleEvent ASSE = new AddScheduleEvent(); ScheduleEvent SE = new ScheduleEvent(); SE.Ended = false; SE.GameID = 1; SE.MinutesToAddOnTrigger = int.Parse(Request.Form["MinutesToAddOnTrigger"]); SE.NextTrigger = DateTime.Parse(Request.Form["NextTrigger"].ToString()); SE.Notes = Request.Form["Notes"]; SE.NumberOfTimesToTrigger = int.Parse(Request.Form["NumberOfTimesToTrigger"]); SE.NumberOfTimesTriggered = 0; SE.ScheduelID = int.Parse(Request.Form["ScheduleID"]); ASSE.SE = SE; ASSE.ChangeEvents = Request.Form["IDList"]; HttpResponseMessage PostResponse = await DS.PostAsync(ASSE, "bot/AddScheduleEvent"); string content = await PostResponse.Content.ReadAsStringAsync(); SimpleResponse SR = JsonConvert.DeserializeObject <SimpleResponse>(content); string response = await DS.GetAsync("bot/GetInfoForScheduleEventAdd"); ASEP = JsonConvert.DeserializeObject <AddSchedulEventPrep>(response); return(Page()); }
public async Task <IActionResult> OnGetAsync() { string ComicListResponse = await DS.GetAsync("comic/GetAllComics"); Strips = Newtonsoft.Json.JsonConvert.DeserializeObject <List <ComicStrip> >(ComicListResponse); return(Page()); }
public async Task <IActionResult> OnGetAsync() { string Response = await DS.GetAsync("Twitter/GetAll"); Tweets = Newtonsoft.Json.JsonConvert.DeserializeObject <List <Tweet> >(Response); return(Page()); }
public async Task <IActionResult> OnGetAsync() { //First, see if the user can edit the series string response = await DS.GetAsync("Series/GetEditSeriesForUser/" + SeriesID); SeriesWithSubseries SWS = new SeriesWithSubseries(); SWS = Newtonsoft.Json.JsonConvert.DeserializeObject <APONCoreLibrary.Models.SeriesWithSubseries>(response); Series = SWS.Series; SaveStatus = "NotSaved"; for (int i = 0; i < SWS.SubseriesIDs.Count; i++) { if (i == 0) { SubseriesIDs = SWS.SubseriesIDs[i].ToString(); } else { SubseriesIDs = SubseriesIDs + "," + SWS.SubseriesIDs[i].ToString(); } } return(Page()); }
private async Task <bool> GetUsers() { string response = await DS.GetAsync("User/GetAllUsersList"); Users = Newtonsoft.Json.JsonConvert.DeserializeObject <List <UserBriefWithBadges> >(response); return(true); }
private async Task <string> GetData() { string result = await DS.GetAsync("Twitter/GetAllTwitterAccountInfo"); TWIList = JsonConvert.DeserializeObject <List <TwitterAccountInfo> >(result); return(string.Empty); }
public async Task <IActionResult> OnPostRefreshStubsAsync() { string response = await DS.GetAsync("News/GenerateNewsLetterStubs"); await GetNewsletters(); return(Page()); }
public async Task <IActionResult> OnPostRunTestAsync() { string response = await DS.GetAsync("News/RunTestNL"); await GetNewsletters(); return(Page()); }
public async Task <IActionResult> OnPostConstructAsync() { string response = await DS.GetAsync("News/ConstructNewsletter"); await GetNewsletters(); return(Page()); }
public async Task <IActionResult> OnGetAsync() { string Response = await DS.GetAsync("SplashNews"); SplashNewsList = Newtonsoft.Json.JsonConvert.DeserializeObject <List <SplashNews> >(Response); return(Page()); }
public async Task <IActionResult> OnGetAsync() { string response = await DS.GetAsync("bot/GetAllSchedules"); Schedules = JsonConvert.DeserializeObject <List <Schedule> >(response); return(Page()); }
public async Task <IActionResult> OnGetAsync() { string response = await DS.GetAsync("Streaming/GetChannels"); Channels = JsonConvert.DeserializeObject <List <StreamChannel> >(response); return(Page()); }
public async Task <IActionResult> OnGetAsync() { string response = await DS.GetAsync("bot/GetScheduleEventsOverview"); Overview = JsonConvert.DeserializeObject <List <ScheduledEventOverview> >(response); return(Page()); }
public async Task <IActionResult> OnGetAsync() { string response = await DS.GetAsync("feed/GetActiveFeeds"); Feeds = Newtonsoft.Json.JsonConvert.DeserializeObject <List <RSSFeed> >(response); return(Page()); }
public async Task <IActionResult> OnGetAsync() { string repsonse = await DS.GetAsync("Tag/GetAll"); Tags = JsonConvert.DeserializeObject <List <Tag> >(repsonse); return(Page()); }
public async Task <IActionResult> OnGet() { string response = await DS.GetAsync("user/IsEditorLoggedIn"); EditorLoggedIn = Newtonsoft.Json.JsonConvert.DeserializeObject <bool>(response); SavedStripID = -1; return(Page()); }
public async Task <IActionResult> OnGetAsync() { string Response = await DS.GetAsync("bot/GetDescriptionsForObject/" + GameObjectID); ODL = JsonConvert.DeserializeObject <ObjectDescriptionList>(Response); return(Page()); }
public async Task <IActionResult> OnGetAsync() { //get List of objects string response = await DS.GetAsync("bot/GetInfoForScheduleEventAdd"); ASEP = JsonConvert.DeserializeObject <AddSchedulEventPrep>(response); return(Page()); }
public async Task <IActionResult> OnGetAsync() { SECE = new ScheduleEventsAndChangeEvents(); string result = await DS.GetAsync("bot/GetSchedualEventsAndChangeEvents"); SECE = JsonConvert.DeserializeObject <ScheduleEventsAndChangeEvents>(result); return(Page()); }
public async Task <IActionResult> OnGetAsync() { string Response = await DS.GetAsync("bot/GetChangeEvent/" + ID); ChangeEvent = JsonConvert.DeserializeObject <ChangeEventWithDescriptions>(Response); return(Page()); }
public async Task <IActionResult> OnGetAsync() { string response = await DS.GetAsync("Series/GetSubseriesPageInfo/" + SubseriesID); this.SubSeries = Newtonsoft.Json.JsonConvert.DeserializeObject <SubseriesPageInfo>(response); this.EpCount = this.SubSeries.Episodes.Count; return(Page()); }
public async Task <bool> LoadTags() { //Use dataservice to get all tags. string result = await DS.GetAsync("Tag/GetAll"); RawTags = Newtonsoft.Json.JsonConvert.DeserializeObject <List <Tag> >(result); return(true); }
public async Task <IActionResult> OnGetAsync() { string Response = await DS.GetAsync("AboutUs/GetAboutUsPageInfo"); Info = Newtonsoft.Json.JsonConvert.DeserializeObject <AboutUsPageInfo>(Response); IMTS.setParams("https://www.allportsopen.com/AboutUs", "article", "About Us", "The All Ports Open Network Crew", "https://media.allportsopen.org/Images/LogoSmWText.png"); return(Page()); }
public async Task <IActionResult> OnGetAsync() { string result = await DS.GetAsync("bot/GetScheduleEventForEdit/" + id); SEFE = JsonConvert.DeserializeObject <ScheduleEventForEdit>(result); return(Page()); }
public async Task <IActionResult> OnGetAsync() { Mode = "Edit"; ReturnURL = Request.Headers["Referer"].ToString(); string result = await DS.GetAsync("Forum/GetForumPost/" + ForumPostID); FP = Newtonsoft.Json.JsonConvert.DeserializeObject <ForumPost>(result); return(Page()); }
public async Task <IActionResult> OnGetAsync() { string result = await DS.GetAsync("Feed/GetFeedReleases/" + id); FWR = Newtonsoft.Json.JsonConvert.DeserializeObject <FeedWithReleases>(result); return(Page()); }
public async Task <IActionResult> OnGetAsync() { ErrorMessage = ""; //Get list of all subseries and their episodes string response = await DS.GetAsync("Series/GetAllSubseries"); subseriesList = Newtonsoft.Json.JsonConvert.DeserializeObject <List <SubseriesPageInfo> >(response); return(Page()); }