public IRestResponse DelConnect(string login, string session) { request = new RestRequest("connect", Method.DELETE); Request.UserAccount reqBody = new Request.UserAccount(); reqBody.auth.login = login; reqBody.auth.session = session; request.AddJsonBody(reqBody); response = client.Execute(request); return(response); }
public IRestResponse newGame(string login, string session) { request = new RestRequest("newGame", Method.POST); Request.UserAccount reqBody = new Request.UserAccount(); reqBody.auth.login = login; reqBody.auth.session = session; request.AddJsonBody(reqBody); response = client.Execute(request); return(response); }
public IRestResponse Connect(User user, int hero) { request = new RestRequest("connect", Method.POST); Request.UserAccount reqBody = new Request.UserAccount(); reqBody.auth.login = user.Login; reqBody.auth.session = user.Session; reqBody.game = user.Game; reqBody.hero = hero; request.AddJsonBody(reqBody); response = client.Execute(request); return(response); }