Exemplo n.º 1
0
        private static TwitterTrendViewModel Convert(TwitterTrend src)
        {
            TwitterTrendViewModel result = new TwitterTrendViewModel
            {
                Name = src.Name
            };

            return(result);
        }
Exemplo n.º 2
0
        public void Twitter_GetTrendsForAllPlaces()
        {
            TwitterTrend tt = new TwitterTrend(new TwitterTestDataSource());

            tt.GetData(tt.Context);
            TwitterDataComponent tdc = tt.DroneDataComponent as TwitterDataComponent;

            Assert.IsNotNull(tdc.TrendRootList);
            Assert.AreNotEqual(0, tdc.TrendRootList.Count());
        }
Exemplo n.º 3
0
        public ObservableCollection <TwitterTrend> CollectTrend(IPlaceTrends trends)
        {
            TrendCollection collection = new TrendCollection();

            foreach (var tr in trends.Trends.ToList())
            {
                TwitterTrend t = new TwitterTrend
                {
                    Name            = tr.Name,
                    URL             = tr.URL,
                    Query           = tr.Query,
                    PromotedContent = tr.PromotedContent,
                    TweetVolume     = tr.TweetVolume,
                };
                collection.Add(t);
            }
            return(collection);
        }
Exemplo n.º 4
0
        private void OnSelectionChanged()
        {
            TwitterTrend trend = ListSelection as TwitterTrend;

            if (trend == null)
            {
                return;
            }

            ListSelection = null;

            var resource = new TwitterResource
            {
                Data = trend.Name,
                Type = ResourceType.Search,
                User = DataTransfer.CurrentAccount
            };

            ResourceViewModel.Resource = resource;
            Navigate(Uris.ResourceView);
        }
Exemplo n.º 5
0
        public void CurrentTrends()
        {
            var result = TwitterTrend.Trends(1);

            Assert.IsNotNull(result.ResponseObject, result.ErrorMessage);
        }
Exemplo n.º 6
0
        public static void CurrentTrends()
        {
            TwitterTrendCollection trends = TwitterTrend.Trends(1).ResponseObject;

            Assert.IsNotNull(trends);
        }