public ProfileService(IXblConfiguration config, IRestSharpEx httpClient)
     : base(config, "https://profile.xboxlive.com", httpClient)
 {
     Headers = new NameValueCollection()
     {
         { "x-xbl-contract-version", "2" }
     };
 }
Esempio n. 2
0
        public XblService(IXblConfiguration config, string baseUrl, IRestSharpEx httpClient)
        {
            Config  = config;
            BaseUrl = baseUrl;

            HttpClient = httpClient;
            Console.WriteLine("ParamsNull: " + (HttpClient.DefaultParameters == null));
            HttpClient.BaseUrl = new Uri(baseUrl);
            HttpClient.AddDefaultHeader("Authorization", $"XBL3.0 x={Config.Userhash};{Config.xToken.Jwt}");
            HttpClient.SetSerializer(NewtonsoftJsonSerializer.CamelCase);
        }
Esempio n. 3
0
        public AchievementService(IXblConfiguration config, IRestSharpEx httpClient)
            : base(config, "https://achievements.xboxlive.com", httpClient)
        {
            Headers_X360 = new NameValueCollection()
            {
                { "x-xbl-contract-version", "1" }
            };

            Headers_XONE = new NameValueCollection()
            {
                { "x-xbl-contract-version", "2" }
            };
        }
Esempio n. 4
0
 public EDSService(IXblConfiguration config, IRestSharpEx httpClient)
     : base(config, "https://eds.xboxlive.com", httpClient)
 {
     Headers = new NameValueCollection()
     {
         { "Cache-Control", "no-cache" },
         { "Accept", "application/json" },
         { "Pragma", "no-cache" },
         { "x-xbl-client-type", "Companion" },
         { "x-xbl-client-version", "2.0" },
         { "x-xbl-contract-version", "3.2" },
         { "x-xbl-device-type", "WindowsPhone" },
         { "x-xbl-isautomated-client", "true" }
     };
 }
Esempio n. 5
0
 public AccountService(IXblConfiguration config, IRestSharpEx httpClient)
     : base(config, "https://accounts.xboxlive.com", httpClient)
 {
 }