示例#1
0
        public void Can_search_geo_by_lat_long()
        {
            var service = new TwitterService(_consumerKey, _consumerSecret);

            service.AuthenticateWith(_accessToken, _accessTokenSecret);

            var places = service.GeoSearch(new GeoSearchOptions {
                Lat = 45.42153, Long = -75.697193
            }).ToList();

            Assert.IsNotEmpty(places);

            places = places.OrderBy(p => p.Id).ToList();
            Assert.AreEqual("05ebfafd8a5c1f5a", places[0].Id);
        }
        public void Can_search_geo_by_ip()
        {
            var service = new TwitterService(_consumerKey, _consumerSecret);

            service.AuthenticateWith(_accessToken, _accessTokenSecret);

            var places = service.GeoSearch(new GeoSearchOptions {
                Ip = "24.246.1.165"
            }).ToList();

            Assert.IsNotEmpty(places);

            places = places.OrderBy(p => p.Id).ToList();
            Assert.AreEqual("06183ca2a30a18e8", places[0].Id);
        }
示例#3
0
        public void Can_search_geo_by_ip()
        {
            //This test is currently failing. No matter what IP is provided, no result is returned
            //as Twitter says it has no location associated. Still trying to figure out if this
            //is a Twitter problem, data problem, or problem on our end.
            var service = new TwitterService(_consumerKey, _consumerSecret);

            service.AuthenticateWith(_accessToken, _accessTokenSecret);

            var result = service.GeoSearch(new GeoSearchOptions {
                Ip = "24.246.1.165"
            });

            Assert.IsNotNull(result);
            var places = result.ToList();

            Assert.IsNotEmpty(places);

            places = places.OrderBy(p => p.Id).ToList();
            Assert.AreEqual("06183ca2a30a18e8", places[0].Id);
        }
        public void Can_search_geo_by_lat_long()
        {
            var service = new TwitterService(_consumerKey, _consumerSecret);
            service.AuthenticateWith(_accessToken, _accessTokenSecret);

            var places = service.GeoSearch(new GeoSearchOptions { Lat = 45.42153, Long = -75.697193}).ToList();
            Assert.IsNotEmpty(places);

            places = places.OrderBy(p => p.Id).ToList();
            Assert.AreEqual("06183ca2a30a18e8", places[0].Id);
        }
        public void Can_search_geo_by_ip()
        {
            var service = new TwitterService(_consumerKey, _consumerSecret);
            service.AuthenticateWith(_accessToken, _accessTokenSecret);

            var places = service.GeoSearch(new GeoSearchOptions { Ip = "24.246.1.165" }).ToList();
            Assert.IsNotEmpty(places);

            places = places.OrderBy(p => p.Id).ToList();
            Assert.AreEqual("06183ca2a30a18e8", places[0].Id);
        }
        public void Can_search_geo_by_ip()
        {
					//This test is currently failing. No matter what IP is provided, no result is returned
					//as Twitter says it has no location associated. Still trying to figure out if this
					//is a Twitter problem, data problem, or problem on our end.
            var service = new TwitterService(_consumerKey, _consumerSecret);
            service.AuthenticateWith(_accessToken, _accessTokenSecret);

						var result = service.GeoSearch(new GeoSearchOptions { Ip = "24.246.1.165" });
						Assert.IsNotNull(result);
						var places = result.ToList();
            Assert.IsNotEmpty(places);

            places = places.OrderBy(p => p.Id).ToList();
            Assert.AreEqual("06183ca2a30a18e8", places[0].Id);
        }