Exemplo n.º 1
0
        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);
        }
Exemplo n.º 2
0
        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);
        }