Exemple #1
0
        /// <summary>
        /// Allows you to retrieve raw Steam Community Market price data for a given item.
        /// You can use this data to create your own pricing algorithm if you need it.
        /// </summary>
        /// <param name="app">Inventory's game id.</param>
        /// <param name="marketHashName">The item's name.</param>
        /// <returns>Raw Steam Market price data for a given item.</returns>
        public static SteamItemRawPriceData GetRawPriceData(AppId.AppName app, string marketHashName)
        {
            CheckParameters(marketHashName);
            string urlRequest = GetUrlRequest(app, marketHashName);
            string result     = Server.ServerRequest.RequestServer(urlRequest);
            SteamItemRawPriceData steamItemRawPriceData = ReadSteamItemRawPrice(result);

            return(steamItemRawPriceData);
        }
Exemple #2
0
        private static SteamItemRawPriceData ReadSteamItemRawPrice(string result)
        {
            dynamic responseServerD = JsonConvert.DeserializeObject(result);
            dynamic updatedAtD      = responseServerD.data.updated_at;
            dynamic rawDataD        = responseServerD.data.raw_data;

            DateTime?           updatedAt     = ReadUpdatedAt(updatedAtD);
            List <ItemRawPrice> itemRawPrices = ReadItemRawPrices(rawDataD);

            SteamItemRawPriceData steamItemRawPriceData = new SteamItemRawPriceData(itemRawPrices, updatedAt);

            return(steamItemRawPriceData);
        }