Esempio n. 1
0
            public static byte[] GetPriceGuideFile(string gameId)
            {
                var doc = MakeRequest("https://api.cardmarket.com/ws/v2.0/priceguide?idGame="
                                      + gameId, "GET");

                var node = doc.GetElementsByTagName("response");

                if (node.Count > 0 && node.Item(0)["priceguidefile"].InnerText != null)
                {
                    var data          = Convert.FromBase64String(node.Item(0)["priceguidefile"].InnerText);
                    var aDecompressed = MKMHelpers.GzDecompress(data);
                    return(aDecompressed);
                }
                else
                {
                    MKMHelpers.LogError("getting price guide file", "failed to get the price guide file from MKM.", false);
                    return(null);
                }
            }