Esempio n. 1
0
        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));
        }
Esempio n. 2
0
        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));
        }
Esempio n. 3
0
        public ActionResult Video(string id)
        {
            var video = YoutubeConnector.GetById(id);

            return(ChlkJson(video));
        }