Esempio n. 1
0
        public ActionResult Index()
        {
            //This sln will be completely local; additions will be discarded upon exit.
            //To persist, a database will be required.
            if(Incidents == null)
            {
                Incidents = new List<Incident>();
            }

            Incident inc;
            //Or Hardcode specific values
            for(int i = 0; i <= 4; i++)
            {
                inc = new Incident();
                inc.Event = "Event" + i;
                inc.Description = "Desc" + i;
                inc.Location = "Loc" + i;

                Incidents.Add(inc);
            }
            ViewBag.LayoutTag = 0;
            return View();
        }
Esempio n. 2
0
        public ActionResult ListInc(Incident model)
        {
            // In v1.1, all API calls require authentication
            var service = new TwitterService(_consumerKey, _consumerSecret);
            service.AuthenticateWith(_accessToken, _accessTokenSecret);

            IEnumerable<TwitterStatus> tweets = service.ListTweetsOnHomeTimeline(new ListTweetsOnHomeTimelineOptions());
            foreach (TwitterStatus tweet in tweets)
            {
                ViewBag.Tweet = tweet.Text;
            }

            return ListInc();
        }