public async Task PostGameImage(string gameID, string image, PotraceMode mode, double blackLevel, int brushSize) { RestRequest request = new RestRequest($"games/{gameID}/image", Method.POST); request.AddParameter("SessionToken", _sessionToken, ParameterType.HttpHeader); request.AddFile("file", image, ""); request.AddParameter("blacklevel", blackLevel, ParameterType.GetOrPost); request.AddParameter("brushsize", brushSize, ParameterType.GetOrPost); request.AddParameter("mode", (int)mode, ParameterType.GetOrPost); var response = await Execute(request); }
public async Task PutGameInformations(string gameID, PotraceMode mode, double blackLevel, int brushSize) { RestRequest request = new RestRequest($"games/{gameID}/image", Method.PUT); request.AddParameter("SessionToken", _sessionToken, ParameterType.HttpHeader); request.AddJsonBody(new { Mode = (int)mode, BlackLevel = blackLevel, BrushSize = brushSize, }); var response = await Execute(request); }