public MessageService(IXblConfiguration config)
     : base(config, "https://msg.xboxlive.com/")
 {
     Headers = new Dictionary <string, string>()
     {
         { "x-xbl-contract-version", "1" }
     };
 }
 public ProfileService(IXblConfiguration config)
     : base(config, "https://profile.xboxlive.com/")
 {
     Headers = new Dictionary <string, string>()
     {
         { "x-xbl-contract-version", "2" }
     };
 }
Exemplo n.º 3
0
 public ProfileService(IXblConfiguration config, IRestSharpEx httpClient)
     : base(config, "https://profile.xboxlive.com", httpClient)
 {
     Headers = new NameValueCollection()
     {
         { "x-xbl-contract-version", "2" }
     };
 }
Exemplo n.º 4
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);
        }
Exemplo n.º 5
0
        public XblService(IXblConfiguration config, string baseUrl)
        {
            HttpClient = new HttpClient();

            Config  = config;
            BaseUrl = baseUrl;

            HttpClient.BaseAddress = new Uri(baseUrl);

            HttpClient.DefaultRequestHeaders.Authorization =
                new AuthenticationHeaderValue($"XBL3.0 x={Config.Userhash};{Config.xToken.Jwt}");
        }
        public AchievementService(IXblConfiguration config)
            : base(config, "https://achievements.xboxlive.com/")
        {
            Headers_X360 = new Dictionary <string, string>()
            {
                { "x-xbl-contract-version", "1" }
            };

            Headers_XONE = new Dictionary <string, string>()
            {
                { "x-xbl-contract-version", "2" }
            };
        }
Exemplo n.º 7
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" }
            };
        }
Exemplo n.º 8
0
 public CQSService(IXblConfiguration config)
     : base(config, "https://cqs.xboxlive.com/")
 {
     Headers = new Dictionary <string, string>()
     {
         { "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", "1.b" },
         { "x-xbl-device-type", "WindowsPhone" },
         { "x-xbl-isautomated-client", "true" }
     };
 }
Exemplo n.º 9
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" }
     };
 }
Exemplo n.º 10
0
 public AccountService(IXblConfiguration config)
     : base(config, "https://accounts.xboxlive.com/")
 {
 }
Exemplo n.º 11
0
 public AccountService(IXblConfiguration config, IRestSharpEx httpClient)
     : base(config, "https://accounts.xboxlive.com", httpClient)
 {
 }