Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- int PostGetPriceItem(string nameItem)
- {
- Bot.log.Info("Submitting /api/getPriceItem.php...");
- var postUrl = domainAddress + "api/getPriceItem.php";
- var data = new System.Collections.Specialized.NameValueCollection();
- data.Add("key", Bot.CSGOCenterAPIKey);
- data.Add("name", nameItem);
- postUrl += "?sig=" + Bot.CreateSHA256(Bot.CSGOCenterAPIKey + nameItem, Bot.CSGOCenterAPIKey);
- var response = SteamWeb.Fetch(postUrl, "POST", data, null, false, "http://www.csgocenter.com");
- var json = Newtonsoft.Json.JsonConvert.DeserializeObject<dynamic>(response);
- Bot.log.Info("Encountered: \r\n" + response);
- try
- {
- var value = json.price;
- return value;
- }
- catch
- {
- return 0;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement