Exemple #1
0
        private void button1_Click(object sender, EventArgs e)
        {
            charName = textBoxAcc.Text;

            new Thread(() =>
            {
                Thread.CurrentThread.IsBackground = true;
                PublicStash.fillRootObjects(charStash, textBoxAcc.Text, PublicStash.GetLatestId());
            }).Start();
        }
Exemple #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);
        }