Esempio n. 1
0
        /// <summary>
        /// Allows you to retrieve data for specific Item IDs that are currently on sale.
        /// </summary>
        /// <param name="app">Inventory's game id.</param>
        /// <param name="itemIds">List of item ids. Upto 250 item IDs.</param>
        /// <returns>Specific items on sale on BitSkins.</returns>
        public static SpecificItems GetSpecificItemsOnSale(AppId.AppName app, List <string> itemIds)
        {
            CheckParameters(itemIds);
            string        urlRequest    = GetUrlRequest(app, itemIds);
            string        result        = Server.ServerRequest.RequestServer(urlRequest);
            SpecificItems specificItems = ReadSpecificItems(result);

            return(specificItems);
        }
Esempio n. 2
0
        private static SpecificItems ReadSpecificItems(string result)
        {
            dynamic responseServerD = JsonConvert.DeserializeObject(result);
            dynamic itemsOnSaleD    = responseServerD.data.items_on_sale;
            dynamic itemsNotOnSaleD = responseServerD.data.items_not_on_sale;

            List <ItemOnSale> itemsOnSale    = ReadItemsOnSale(itemsOnSaleD);
            List <string>     itemsNotOnSale = ReadItemsNotOnSale(itemsNotOnSaleD);

            SpecificItems specificItems = new SpecificItems(itemsOnSale, itemsNotOnSale);

            return(specificItems);
        }