Exemple #1
0
        public async Task <HttpStatusCode> MakeGetRequestStatusCode(string url, string accessToken)
        {
            _wrapper.SetAccessToken(accessToken);
            var response = await _wrapper.GetAsync(url);

            return(response.StatusCode);
        }
Exemple #2
0
        public async Task <HttpStatusCode> MovePlayerToTradePile(string url, string accessToken, MovePlayerBodyModel playerDetails)
        {
            _wrapper.SetAccessToken(accessToken);

            //var listData = new List<MovePlayerBodyModel>
            //{
            //    playerDetails
            //};

            var stringContent = new StringContent(JsonConvert.SerializeObject(playerDetails));

            var response = await _wrapper.PutAsync(url, stringContent);

            return(response.StatusCode);
        }
Exemple #3
0
        public async Task <HttpStatusCode> SellPlayer(string url, string accessToken, SellPlayerModel sellPlayerModel)
        {
            _wrapper.SetAccessToken(accessToken);
            var body     = new StringContent(JsonConvert.SerializeObject(sellPlayerModel));
            var response = await _wrapper.PostAsync(url, body);

            return(response.StatusCode);
        }
Exemple #4
0
 public async Task MakeDeleteRequest(string token, string url)
 {
     _wrapper.SetAccessToken(token);
     var response = await _wrapper.DeleteAsync(url);
 }