public static async Task <BlitlineBatchResponse> SendAsync(this IEnumerable <BlitlineRequest> requests) { var api = new BlitlineApi(); var response = await api.ProcessImagesAsync(requests); return(response); }
public void ShouldGenerateAnError() { "Give I have an incomplete request".Context(() => { _blitline = new BlitlineApi(); _request = new BlitlineRequest("blah", "https://s3-eu-west-1.amazonaws.com/gdoubleu-blitline/moi.jpg"); var cropFunction = new CropFunction { X = 51, Y = 126, Width = 457 - 126, Height = 382 - 51, Save = new Save { ImageIdentifier = "image_identifier" } }; _request.AddFunction(cropFunction); }); "When I process the request".Do(() => _response = _blitline.ProcessImages(_request)); "Then the response should fail".Observation(() => Assert.True(_response.Failed)); "And the response should contain an error".Observation(() => Assert.NotEmpty(_response.Results.Error)); }
public static async Task <BlitlineResponse> SendAsync(this BlitlineRequest request) { var api = new BlitlineApi(); var response = await api.ProcessImagesAsync(request); return(response); }
public static async Task<BlitlineBatchResponse> SendAsync(this IEnumerable<BlitlineRequest> requests) { var api = new BlitlineApi(); var response = await api.ProcessImagesAsync(requests); return response; }
public static Task<BlitlineResponse> SendAsync(this BlitlineRequest request) { var api = new BlitlineApi(); var response = api.ProcessImagesAsync(request); return response; }
public static BlitlineResponse Send(this BlitlineRequest request) { var api = new BlitlineApi(); return api.ProcessImages(request); }
public static BlitlineBatchResponse Send(this IEnumerable<BlitlineRequest> requests) { var api = new BlitlineApi(); return api.ProcessImages(requests); }