Esempio n. 1
0
        public LocChar(string refreshToken)
        {
            RefreshToken = refreshToken;
            updateAuthToken();

            // character ID
            HttpWebRequest web = (HttpWebRequest)WebRequest.CreateHttp("https://login.eveonline.com/oauth/verify");

            web.Method = "GET";
            web.Headers.Add("Authorization", "Bearer " + AuthToken);
            web.ContentLength = 0;

            var response = web.GetResponse();

            using (var sr = new StreamReader(response.GetResponseStream()))
            {
                string  text = sr.ReadToEnd();
                JObject res  = JObject.Parse(text);
                this.CharacterID   = int.Parse((string)res["CharacterID"]);
                this.CharacterName = (string)res["CharacterName"];
            }
            Character = this;
        }
Esempio n. 2
0
 public Form1()
 {
     InitializeComponent();
     this.refreshToken.Text = "EBb41PywItqhVpo7744FW1Rv0Q_UBSPBIz255Uhf9Nc96bnMcxmFt0wlWxLOGUlqmA9Tmjco4osYVk7URvYJRg2";
     LocChar me = new LocChar(this.refreshToken.Text);
 }