예제 #1
0
        public ActionResult Index()
        {
            var fiddlerProxy = new WebProxy("127.0.0.1", 8888);

            //var falcon = new FalconClient("api_key");
            var falcon         = new FalconClient("api_key", fiddlerProxy);
            var channels       = falcon.GetChannels();
            var uniqueNetworks = channels.Items.Select(x => x.Network).Distinct().ToArray();

            foreach (var uniqueNetwork in uniqueNetworks)
            {
                var chan    = channels.Items.First(x => x.Network == uniqueNetwork);
                var content = falcon.GetContentFeed(channels: new[] { chan.Id }, limit: 100);
                var t       = 1;
            }

            return(View());
        }
예제 #2
0
        public void DoesItConnect()
        {
            var apiKey = "<omitted>";

            var client = new FalconClient(apiKey);

            var channels = client.GetChannels();

            Assert.That(channels, Is.Not.Null);
            Assert.That(channels.Items, Is.Not.Null);


            var channelIds = new[] { "<omitted>" };

            var feed = client.GetContentFeed(
                since: new DateTime(2014, 01, 01),
                until: new DateTime(2015, 05, 31),
                limit: 100,
                sort: Models.SortOrder.Desc,
                channels: channelIds,
                tags: null);

            Assert.That(feed, Is.Not.Null);
        }