Ejemplo n.º 1
0
        public void ButtonPublicLoopClick()
        {
            charName = form.textBoxAcc.Text;

            new Thread(() =>
            {
                Thread.CurrentThread.IsBackground = true;
                PublicStash.fillRootObjects(charStash, form.textBoxAcc.Text, PublicStash.GetLatestId());
            }).Start();
        }
Ejemplo n.º 2
0
        public static string getPublicJSON(string next_change_id = null)
        {
            string jsonRequest = @"http://www.pathofexile.com/api/public-stash-tabs";
            string result      = "";

            if (next_change_id == null)
            {
                next_change_id = PublicStash.GetLatestId();
            }
            Debug.WriteLine("Getting " + next_change_id);
            jsonRequest += "?id=" + next_change_id;

            HttpWebRequest request  = (HttpWebRequest)WebRequest.Create(jsonRequest);
            WebResponse    response = request.GetResponse();

            using (Stream responseStream = response.GetResponseStream())
            {
                StreamReader reader = new StreamReader(responseStream);
                result = reader.ReadToEnd();
                reader.Close();
            }
            return(result);
        }