コード例 #1
0
        public static async Task<string> SearchAsync(double latitude, double longitude, OAuthResponse oAuthResponse)
        {
            var media = new InstaSharp.Endpoints.Media(InstagramConfig, oAuthResponse);
            var searchResults = await media.Search(latitude, longitude, 5000);

            return SerializeResults(searchResults.Data);
        }
コード例 #2
0
        public static async Task <string> SearchAsync(double latitude, double longitude, OAuthResponse oAuthResponse)
        {
            var media         = new InstaSharp.Endpoints.Media(InstagramConfig, oAuthResponse);
            var searchResults = await media.Search(latitude, longitude, 5000);

            return(SerializeResults(searchResults.Data));
        }
コード例 #3
0
        public MediaController()
        {
            var instance = InstaSharpConfig.Instance;

            _media = new InstaSharp.Endpoints.Media(instance.config, instance.oauthResponse);
            _likes = new Endpoints.Likes(instance.config, instance.oauthResponse);
            _comments = new Endpoints.Comments(instance.config, instance.oauthResponse);
        }
コード例 #4
0
ファイル: HomeController.cs プロジェクト: docstrum/ProxyMe
        public async Task<ActionResult> NearMe()
        {
            var oAuthResponse = Session["FRED.AuthInfo"] as OAuthResponse;

            if (oAuthResponse == null)
            {
                return RedirectToAction("Login");
            }
            var locations = new InstaSharp.Endpoints.Media(config, oAuthResponse);
            var geo = new InstaSharp.Endpoints.Geographies(config, oAuthResponse);
            var start = DateTime.Now - TimeSpan.FromDays(1);
            var end = DateTime.Now;
            var posts = new List<WallElement>();
            return View(posts);
        }
コード例 #5
0
ファイル: HomeController.cs プロジェクト: docstrum/ProxyMe
 public async Task<ActionResult> FullInfo2(double latitude, double longitude)
 {
     if (latitude == 0)
     {
         return View();
     }
     ModelState.Clear();
     var oAuthResponse = Session["FRED.AuthInfo"] as OAuthResponse;
     if (oAuthResponse == null)
     {
         return RedirectToAction("Login");
     }
     var InstagramId = oAuthResponse.User.Id.ToString();
     var locations = new InstaSharp.Endpoints.Media(config, oAuthResponse);
     var geo = new InstaSharp.Endpoints.Geographies(config, oAuthResponse);
     var start = DateTime.Now - TimeSpan.FromDays(1);
     var end = DateTime.Now;
     var locFeed = await locations.Search(latitude, longitude, 5000, start, end);
     var posts = new List<WallElement>();
     foreach (var post in locFeed.Data)
     {
         posts.Add(InstsharpMedia2WallElement(post, latitude, longitude));
     }
     posts = posts.OrderBy(x => x.Distance).ToList();
     //var temp = CreateWall(posts, oAuthResponse.User.Id.ToString());
     return View(posts);
 }