Example #1
0
        public LoginResponse CreateLoginRequest(LoginRequest loginDetails)
        {
            var headers = new List <WebHeader>
            {
                new WebHeader {
                    HeaderKey = "User-Agent", HeaderValue = $"BSG Launcher {_launcherVersion}"
                }
            };

            var req      = new EftApiRequest(LoginEndPoint, headers);
            var response = req.Post <LoginResponse>(loginDetails);

            return(response.Data);
        }
Example #2
0
        public LauncherVersionResponse GetLauncherVersion()
        {
            var headers = new List <WebHeader>()
            {
                new WebHeader("User-Agent", $"BSG Launcher {_launcherVersion}")
            };

            var req      = new EftApiRequest(LuncherVersionEndPoint, headers);
            var response = req.Get <LauncherVersionResponse>();

            _launcherVersion = response.Data.data.Version;

            return(response.Data);
        }
Example #3
0
        public GameVersionResponse GetGameVersion(LoginResponse loginResponse, string sessionCookie)
        {
            var headers = new List <WebHeader>
            {
                new WebHeader("User-Agent", $"BSG Launcher {_launcherVersion}"),
                new WebHeader("Authorization", loginResponse.data.access_token),
                new WebHeader("Host", "launcher.escapefromtarkov.com"),
                new WebHeader("Cookie", $"PHPSESSID={sessionCookie}")
            };

            var req      = new EftApiRequest(GameVersionEndPoint, headers);
            var response = req.Get <GameVersionResponse>();

            return(response.Data);
        }
Example #4
0
        public AuthReponse CreateLoginAuthRequest(LoginResponse loginResponse, string hardwareId)
        {
            var headers = new List <WebHeader>
            {
                new WebHeader {
                    HeaderKey = "User-Agent", HeaderValue = $"BSG Launcher {_launcherVersion}"
                },
                new WebHeader {
                    HeaderKey = "Authorization", HeaderValue = loginResponse.data.access_token
                }
            };

            var req       = new EftApiRequest(AuthoriseAccountEndPoint, headers);
            var authToken = new AuthToken(hardwareId, LinkManager.GAME_VERSION);
            var response  = req.Post <AuthReponse>(authToken);

            return(response.Data);
        }