The Geographies Api
Inheritance: InstaSharp.Endpoints.InstagramApi
示例#1
0
 public RecentMediaController(ILogger log, InstagramConfig config, ISubscriptionRepository subscriptions)
 {
     _geoEndpoint = new Geographies(config);
     _tagEndpoint = new Tags(config);
     _config = config;
     _log = log;
     _subscriptions = subscriptions;
 }
示例#2
0
        /// <summary>
        /// recieves real-time update notices from Instagram
        /// </summary>
        /// <param name="content"></param>
        /// <returns></returns>
        public async Task<IHttpActionResult> Post(Realtime[] content)
        {
            var geoEndpoint = new Geographies(_config);

            //TODO: parse content and broadcast to clients
            for (int i = 0; i < content.Length; i++)
            {
                _log.Information("content push recieved: {0}: {1}",  content[i].Object, content[i].Object_ID);
                _notificationContext.Clients.All.newMediaAvailable(content[i].Object_ID);
            }

            return Ok();
        }