Ejemplo n.º 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);
 }
Ejemplo n.º 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));
        }
Ejemplo n.º 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));
        }
Ejemplo n.º 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);
 }
Ejemplo n.º 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);
 }
Ejemplo n.º 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);
 }
Ejemplo n.º 7
0
 public EveCentral_Tests() {
     _api = new EveCentral();
     _validOptions = new EveCentralOptions {HourLimit = HourLimit, MinQuantity = MinQty};
     _validOptions.Items.Add(TypeId);
     _validOptions.Regions.Add(RegionId);
 }