예제 #1
0
 /// <summary>
 ///     Retrieve all of the available market orders, including prices, stations, order IDs, volumes, etc., on a given jump
 ///     path.
 /// </summary>
 /// <param name="startSystem">SystemID or System name</param>
 /// <param name="endSystem">SystemID or System name</param>
 /// <param name="typeId">Type ID</param>
 /// <param name="options">Optional; Valid options: HourLimit, MinQuantity.</param>
 /// <returns></returns>
 public QuickLookResponse GetQuicklookPath(object startSystem, object endSystem, long typeId,
                                           EveCentralOptions options)
 {
     Contract.Requires(options != null, "Options cannot be null.");
     Contract.Requires(startSystem != null, "Start system cannot be null.");
     Contract.Requires(endSystem != null, "End system cannot be null.");
     return(GetQuicklookPathAsync(startSystem, endSystem, typeId, options).Result);
 }
예제 #2
0
        /// <summary>
        ///     Returns all of the available market orders, including prices, stations, order IDs, volumes, etc.
        /// </summary>
        /// <param name="options">Valid options; Items, HourLimit, MinQuantity, Regions, Systems</param>
        /// <returns></returns>
        public Task <QuickLookResponse> GetQuicklookAsync(EveCentralOptions options)
        {
            Contract.Requires(options != null, "Options cannot be null");
            Contract.Requires(options.Items.Count != 0, "You need to specify atleast one type.");
            const string relUri      = "/api/quicklook";
            string       queryString = options.GetItemQuery("typeid") + options.GetHourQuery("sethours") +
                                       options.GetMinQuantityQuery("setminQ") +
                                       options.GetRegionQuery("regionlimit") + options.GetSystemQuery("usesystem");

            return(requestAsync <QuickLookResponse>(relUri, queryString, Method));
        }
예제 #3
0
        /// <summary>
        ///     Retrieve all of the available market orders, including prices, stations, order IDs, volumes, etc., on a given jump
        ///     path.
        /// </summary>
        /// <param name="startSystem">SystemID or System name</param>
        /// <param name="endSystem">SystemID or System name</param>
        /// <param name="typeId">Type ID</param>
        /// <param name="options">Optional; Valid options: HourLimit, MinQuantity.</param>
        /// <returns></returns>
        public Task <QuickLookResponse> GetQuicklookPathAsync(object startSystem, object endSystem, long typeId,
                                                              EveCentralOptions options)
        {
            Contract.Requires(options != null, "Options cannot be null.");
            Contract.Requires(startSystem != null, "Start system cannot be null.");
            Contract.Requires(endSystem != null, "End system cannot be null.");
            var relUri = "/api/quicklook/onpath";

            relUri += "/from/" + startSystem + "/to/" + endSystem + "/fortype/" + typeId;
            var queryString = options.GetHourQuery("sethours");

            queryString += options.GetMinQuantityQuery("setminQ");
            return(requestAsync <QuickLookResponse>(relUri, queryString, Method));
        }
예제 #4
0
 public void GetMarketStat_ValidRequest_ValidResponse() {
     var options = new EveCentralOptions() {System = 30000142};
     options.Items.Add(34);
     MarketStatResponse res = _api.GetMarketStat(options);
     EveCentralMarketStatItem entry = res.Result.First();
     Assert.AreEqual(TypeId, entry.TypeId);
     Assert.AreNotEqual(0, entry.All.Average);
     Assert.AreNotEqual(0, entry.All.Volume);
     Assert.AreNotEqual(0, entry.All.Max);
     Assert.AreNotEqual(0, entry.All.Min);
     Assert.AreNotEqual(0, entry.All.StdDev);
     Assert.AreNotEqual(0, entry.All.Median);
     Assert.AreNotEqual(0, entry.All.Percentile);
 }
예제 #5
0
 /// <summary>
 ///     Returns all of the available market orders, including prices, stations, order IDs, volumes, etc.
 /// </summary>
 /// <param name="options">Valid options; Items, HourLimit, MinQuantity, Regions, Systems</param>
 /// <returns></returns>
 public QuickLookResponse GetQuicklook(EveCentralOptions options)
 {
     Contract.Requires(options != null, "Options cannot be null");
     Contract.Requires(options.Items.Count != 0, "You need to specify atleast one type.");
     return(GetQuicklookAsync(options).Result);
 }
예제 #6
0
 /// <summary>
 ///     Returns aggregate statistics for the items specified.
 /// </summary>
 /// <param name="options">Valid options; Items, HourLimit, MinQuantity, Regions, Systems</param>
 /// <returns></returns>
 public MarketStatResponse GetMarketStat(EveCentralOptions options)
 {
     Contract.Requires(options != null, "Options cannot be null");
     Contract.Requires(options.Items.Count != 0, "You need to specify atleast one type.");
     return(GetMarketStatAsync(options).Result);
 }
예제 #7
0
 public EveCentral_Tests() {
     _api = new EveCentral();
     _validOptions = new EveCentralOptions {HourLimit = HourLimit, MinQuantity = MinQty};
     _validOptions.Items.Add(TypeId);
     _validOptions.Regions.Add(RegionId);
 }