コード例 #1
0
 public MarketUserData SendQueryUserRequest()
 {
     try
     {
         return(SimpleHTTPClient.SendPostRequest <QueryUserRequest, MarketUserData>(Url, User, new QueryUserRequest()));
     }
     catch (Exception e)
     {
         myLogger.Error("Exeption: " + e.Message + error);
         return(new MarketUserData {
             Error = e
         });
     }
 }
コード例 #2
0
 public MarketItemQuery SendQueryBuySellRequest(int id)
 {
     try
     {
         return(SimpleHTTPClient.SendPostRequest <QueryBuySellRequest, MarketItemQuery>(Url, User, new QueryBuySellRequest(id)));
     }
     catch (Exception e)
     {
         myLogger.Error("Exeption: " + e.Message + error + ", ID: " + id);
         return(new MarketItemQuery {
             Error = e
         });
     }
 }
コード例 #3
0
 public MarketCommodityOffer SendQueryMarketRequest(int commodity)
 {
     try
     {
         return(SimpleHTTPClient.SendPostRequest <QueryMarketRequest, MarketCommodityOffer>(Url, User, new QueryMarketRequest(commodity)));
     }
     catch (Exception e)
     {
         myLogger.Error("Exeption: " + e.Message + error + ", Commodity: " + commodity);
         return(new MarketCommodityOffer {
             Error = e
         });
     }
 }
コード例 #4
0
 public MarketBuySell SendBuyRequest(int price, int commodity, int amount)
 {
     try
     {
         return(new MarketBuySell
         {
             Id = Int32.Parse(SimpleHTTPClient.SendPostRequest(Url, User, new BuyRequest(commodity, amount, price)))
         });
     }
     catch (Exception e)
     {
         myLogger.Error("Exeption: " + e.Message + error + ", Price: " + price + ", Commodity: " + commodity + ", Amount: " + amount);
         return(new MarketBuySell {
             Error = e
         });
     }
 }
コード例 #5
0
 public MarketUserRequests QueryUserRequests()
 {
     try
     {
         return(new MarketUserRequests
         {
             Requests = SimpleHTTPClient.SendPostRequest <QueryUserRequests, List <AllDataRequest> >(Url, User, new QueryUserRequests())
         });
     }
     catch (Exception e)
     {
         myLogger.Error("Exeption: " + e.Message + error);
         return(new MarketUserRequests {
             Error = e
         });
     }
 }
コード例 #6
0
 public AllMarketRequest QueryAllMarketRequest()
 {
     try
     {
         return(new AllMarketRequest
         {
             MarketInfo = SimpleHTTPClient.SendPostRequest <QueryAllMarketRequest, List <ItemAskBid> >(Url, User, new QueryAllMarketRequest())
         });
     }
     catch (Exception e)
     {
         myLogger.Error("Exeption: " + e.Message + error);
         return(new AllMarketRequest {
             Error = e
         });
     }
 }
コード例 #7
0
        public bool SendCancelBuySellRequest(int id)
        {
            string ans = "";

            try
            {
                ans = SimpleHTTPClient.SendPostRequest(Url, User, new CancelBuySellRequest(id));
            }
            catch (Exception e)
            {
                myLogger.Error("Exeption: " + e.Message + error + ", ID: " + id);
                return(false);
            }
            if (ans.Equals("Ok"))
            {
                return(true);
            }
            myLogger.Debug("Exeption: " + ans + ", ID: " + id);
            return(false);
        }