示例#1
0
        private static string GetUrlRequest(AppId.AppName app, int page)
        {
            Server.UrlCreator urlCreator = new Server.UrlCreator($"https://bitskins.com/api/v1/get_reset_price_items/");
            urlCreator.AppendUrl($"&app_id={(int)app}");
            urlCreator.AppendUrl($"&page={page}");

            return(urlCreator.ReadUrl());
        }
示例#2
0
        private static string GetUrlRequestForAllBuyOrders(AppId.AppName app, string marketHashName)
        {
            Server.UrlCreator urlCreator = new Server.UrlCreator($"https://bitskins.com/api/v1/cancel_all_buy_orders/");
            urlCreator.AppendUrl($"&app_id={(int)app}");
            urlCreator.AppendUrl($"&market_hash_name={marketHashName}");

            return(urlCreator.ReadUrl());
        }
示例#3
0
        private static string GetUrlRequest(string tradeToken, string tradeId)
        {
            Server.UrlCreator urlCreator = new Server.UrlCreator($"https://bitskins.com/api/v1/get_trade_details/");
            urlCreator.AppendUrl($"&trade_token={tradeToken}");
            urlCreator.AppendUrl($"&trade_id={tradeId}");

            return(urlCreator.ReadUrl());
        }
示例#4
0
        private static string GetUrlRequest(AppId.AppName app, string marketHashName)
        {
            Server.UrlCreator urlCreator = new Server.UrlCreator($"https://bitskins.com/api/v1/get_steam_price_data/");
            urlCreator.AppendUrl($"&app_id={(int)app}");
            urlCreator.AppendUrl($"&market_hash_name={marketHashName}");

            return(urlCreator.ReadUrl());
        }
示例#5
0
        private static string GetUrlRequest(AppId.AppName app, string name, double price)
        {
            Server.UrlCreator urlCreator = new Server.UrlCreator($"https://bitskins.com/api/v1/get_expected_place_in_queue_for_new_buy_order/");
            urlCreator.AppendUrl($"&app_id={(int)app}");
            urlCreator.AppendUrl($"&name={name}");
            urlCreator.AppendUrl($"&price={price.ToString(System.Globalization.CultureInfo.InvariantCulture)}");

            return(urlCreator.ReadUrl());
        }
示例#6
0
        private static string GetUrlRequest(AppId.AppName app, string name, int page)
        {
            Server.UrlCreator urlCreator = new Server.UrlCreator($"https://bitskins.com/api/v1/get_market_buy_orders/");
            urlCreator.AppendUrl($"&app_id={(int)app}");
            urlCreator.AppendUrl($"&market_hash_name={name}");
            urlCreator.AppendUrl($"&page={page}");

            return(urlCreator.ReadUrl());
        }
示例#7
0
        private static string GetUrlRequestForBuyOrders(AppId.AppName app, List <string> buyOrderIds)
        {
            const string delimiter = ",";

            Server.UrlCreator urlCreator = new Server.UrlCreator($"https://bitskins.com/api/v1/cancel_buy_orders/");
            urlCreator.AppendUrl($"&app_id={(int)app}");
            urlCreator.AppendUrl($"&buy_order_ids={buyOrderIds.ToStringWithDelimiter(delimiter)}");

            return(urlCreator.ReadUrl());
        }
示例#8
0
        private static string GetUrlRequest(AppId.AppName app, string name, double price, int quantity)
        {
            Server.UrlCreator urlCreator = new Server.UrlCreator($"https://bitskins.com/api/v1/create_buy_order/");
            urlCreator.AppendUrl($"&app_id={(int)app}");
            urlCreator.AppendUrl($"&name={name}");
            urlCreator.AppendUrl($"&price={price.ToString(System.Globalization.CultureInfo.InvariantCulture)}");
            urlCreator.AppendUrl($"&quantity={quantity}");

            return(urlCreator.ReadUrl());
        }
示例#9
0
        private static string GetUrlRequest(double amount, WithdrawalMoneyMethod withdrawalMoneyMethod)
        {
            string method = WithdrawalMoneyMethodToString(withdrawalMoneyMethod);

            Server.UrlCreator urlCreator = new Server.UrlCreator($"https://bitskins.com/api/v1/request_withdrawal/");
            urlCreator.AppendUrl($"&amount={amount}");
            urlCreator.AppendUrl($"&withdrawal_method={method}");

            return(urlCreator.ReadUrl());
        }
示例#10
0
        private static string GetUrlRequest(AppId.AppName app, List <string> itemIds)
        {
            const string delimiter = ",";

            Server.UrlCreator urlCreator = new Server.UrlCreator($"https://bitskins.com/api/v1/delist_item/");
            urlCreator.AppendUrl($"&app_id={(int)app}");
            urlCreator.AppendUrl($"&item_ids={itemIds.ToStringWithDelimiter(delimiter)}");

            return(urlCreator.ReadUrl());
        }
示例#11
0
        private static string GetUrlRequest(AppId.AppName app, List <string> itemIds, List <double> itemPrices,
                                            bool autoTrade, bool allowTradeDelayedPurchases)
        {
            const string delimiter = ",";

            Server.UrlCreator urlCreator = new Server.UrlCreator($"https://bitskins.com/api/v1/buy_item/");
            urlCreator.AppendUrl($"&app_id={(int)app}");
            urlCreator.AppendUrl($"&item_ids={itemIds.ToStringWithDelimiter(delimiter)}");
            urlCreator.AppendUrl($"&prices={itemPrices.ToStringWithDelimiter(delimiter)}");
            urlCreator.AppendUrl($"&auto_trade={autoTrade}");
            urlCreator.AppendUrl($"&allow_trade_delayed_purchases={allowTradeDelayedPurchases}");

            return(urlCreator.ReadUrl());
        }
        private static string GetUrlRequest(double amount)
        {
            Server.UrlCreator urlCreator = new Server.UrlCreator($"https://bitskins.com/api/v1/create_bitcoin_payment/");
            urlCreator.AppendUrl($"&amount={amount.ToString(System.Globalization.CultureInfo.InvariantCulture)}");

            return(urlCreator.ReadUrl());
        }
示例#13
0
        private static string GetUrlRequest(bool activeOnly)
        {
            Server.UrlCreator urlCreator = new Server.UrlCreator($"https://bitskins.com/api/v1/get_recent_trade_offers/");
            urlCreator.AppendUrl($"&active_only={activeOnly}");

            return(urlCreator.ReadUrl());
        }
示例#14
0
        private static string GetUrlRequest(AppId.AppName app, string name, BuyOrderType type, int page)
        {
            Server.UrlCreator urlCreator = new Server.UrlCreator($"https://bitskins.com/api/v1/get_buy_order_history/");
            urlCreator.AppendUrl($"&app_id={(int)app}");
            urlCreator.AppendUrl($"&page={page}");
            if (!String.IsNullOrEmpty(name))
            {
                urlCreator.AppendUrl($"&market_hash_name={name}");
            }
            if (type != BuyOrderType.NotImportant)
            {
                urlCreator.AppendUrl($"&type={BuyOrderTypeToString(type)}");
            }

            return(urlCreator.ReadUrl());
        }
示例#15
0
        private static string GetUrlRequest(int page)
        {
            Server.UrlCreator urlCreator = new Server.UrlCreator($"https://bitskins.com/api/v1/get_money_events/");
            urlCreator.AppendUrl($"&page={page}");

            return(urlCreator.ReadUrl());
        }
示例#16
0
        private static string GetUrlRequest(AppId.AppName app)
        {
            Server.UrlCreator urlCreator = new Server.UrlCreator($"https://bitskins.com/api/v1/summarize_buy_orders/");
            urlCreator.AppendUrl($"&app_id={(int)app}");

            return(urlCreator.ReadUrl());
        }
示例#17
0
        private static string GetUrlRequest(AppId.AppName app)
        {
            Server.UrlCreator urlCreator = new Server.UrlCreator($"https://bitskins.com/api/v1/get_price_data_for_items_on_sale/");
            urlCreator.AppendUrl($"&app_id={(int)app}");

            return(urlCreator.ReadUrl());
        }
示例#18
0
        private static string GetUrlRequest(AppId.AppName app, int page, List <string> names, ResultsPerPage resultsPerPage)
        {
            const string delimiter = ",";

            Server.UrlCreator urlCreator = new Server.UrlCreator($"https://bitskins.com/api/v1/get_item_history/");
            urlCreator.AppendUrl($"&page={page}");
            urlCreator.AppendUrl($"&app_id={(int)app}");
            urlCreator.AppendUrl($"&per_page={(int)resultsPerPage}");

            if (names != null && names.Count > 0)
            {
                urlCreator.AppendUrl($"&names={names.ToStringWithDelimiter(delimiter)}");
                urlCreator.AppendUrl($"&delimiter={delimiter}");
            }

            return(urlCreator.ReadUrl());
        }
示例#19
0
        private static string GetUrlRequest(AppId.AppName app, int page, string marketHashName, double minPrice, double maxPrice,
                                            SortBy sortBy, SortOrder sortOrder, ThreeChoices hasStickers, ThreeChoices isStattrak, ThreeChoices isSouvenir,
                                            ResultsPerPage resultsPerPage, ThreeChoices tradeDelayedItems)
        {
            Server.UrlCreator urlCreator = new Server.UrlCreator($"https://bitskins.com/api/v1/get_inventory_on_sale/");
            urlCreator.AppendUrl($"&page={page}");
            urlCreator.AppendUrl($"&app_id={(int)app}");
            urlCreator.AppendUrl($"&per_page={(int)resultsPerPage}");

            if (!string.IsNullOrEmpty(marketHashName))
            {
                urlCreator.AppendUrl($"&market_hash_name={marketHashName}");
            }

            if (minPrice > 0)
            {
                urlCreator.AppendUrl($"&min_price={minPrice}");
            }

            if (maxPrice > 0)
            {
                urlCreator.AppendUrl($"&max_price={maxPrice}");
            }

            if (sortBy != SortBy.Not)
            {
                urlCreator.AppendUrl($"&sort_by={SortByToString(sortBy)}");
            }

            if (sortOrder != SortOrder.Not)
            {
                urlCreator.AppendUrl($"&order={SortOrderToString(sortOrder)}");
            }

            if (app == AppId.AppName.CounterStrikGlobalOffensive)
            {
                urlCreator.AppendUrl($"&has_stickers={(int)hasStickers}");
                urlCreator.AppendUrl($"&is_stattrak={(int)isStattrak}");
                urlCreator.AppendUrl($"&is_souvenir={(int)isSouvenir}");
                urlCreator.AppendUrl($"&show_trade_delayed_items={(int)tradeDelayedItems}");
            }

            return(urlCreator.ReadUrl());
        }