public ActionResult Preview(string id, int announcementApplicationId) { var storage = new Storage(); storage.Set(announcementApplicationId.ToString(), id); var connector = new YoutubeConnector(); var video = connector.GetById(id); var model = VideoModel.Create(video); model.AnnouncementApplicationId = announcementApplicationId; return(View("Preview", model)); }
public async Task <ActionResult> Attach(string id, int announcementApplicationId) { var video = YoutubeConnector.GetById(id); await ChalkableConnector.Announcement.UpdateAnnouncementApplicationMeta(announcementApplicationId, video.ShortTitle, video.ThumbUrl, video.ShortDescription); var storage = new Storage(ChalkableAuthorization.Configuration.ConnectionString); storage.Set(CurrentUser.DistrictId, announcementApplicationId, video.Id); return(ChlkJson(true)); }
public ActionResult Video(string id) { var video = YoutubeConnector.GetById(id); return(ChlkJson(video)); }