Example #1
0
        public static string XuidFromGamertag(string Gamertag)
        {
            string      Endpoint       = string.Format("/friends/search?gt={0}", Gamertag);
            Uri         RequestAddress = new Uri(string.Format("{0}{1}", BASEURI, Endpoint));
            string      Response       = RestServices.GetResponse(RequestAddress, APIKEY);
            XboxProfile p = new XboxProfile(Response);

            return(p.ID.ToString());
        }
Example #2
0
        public static async Task <string> XuidFromGamertagAsync(string Gamertag)
        {
            string Endpoint       = string.Format("/friends/search?gt={0}", Gamertag);
            Uri    RequestAddress = new Uri(string.Format("{0}{1}", BASEURI, Endpoint));
            string Response       = await RestServices.GetResponseAsync(RequestAddress, APIKEY).ConfigureAwait(false);

            XboxProfile p = new XboxProfile(Response);

            return(p.ID.ToString());
        }