Пример #1
0
        public String GetPilotSheetBySID(String SID = null, String server = null)
        {
            if (server == null)
            {
                server = user.server;
            }

            if (SID != null)
            {
                WebRequestService.Cookies = new CookieCollection()
                {
                    new Cookie("dosid", SID, "/", "darkorbit.com")
                };

                try
                {
                    String htmlContent = WebRequestService.GetRequestAsync("https://" + server + "/indexInternal.es?action=internalPilotSheet");
                    if (getSIDByHtml(htmlContent) == null)
                    {
                        return(null);
                    }
                    return(htmlContent);
                }
                catch
                {
                    //new Exception();
                    return(null);
                }
            }
            return(null);
        }
Пример #2
0
        public void setBid(List <BidModel> bids)
        {
            try
            {
                bids.ForEach(async bid =>
                {
                    Console.WriteLine("New bid for offer: " + bid.Offer.name);

                    String post = "reloadToken=" + Helpers.TokenGenerator.Generate(32) +
                                  "&auctionType=hour" +
                                  "&subAction=bid" +
                                  "&lootId=" + bid.Offer.lootId +
                                  "&itemId=" + bid.Offer.itemKey +
                                  "&credits=" + bid.YouNewBid;
                    await WebRequestService.PostRequestAsync("https://" + user.server + "/indexInternal.es?action=internalAuction", post);
                    bid.isRunning = true;

                    Console.WriteLine(post);
                });
            }
            catch (Exception e)
            {
                Console.WriteLine("New exception: " + e.Message);
            }
        }