public static OptimizeRequest ThatHasAnExistingImageAndValidCallBackUri(this OptimizeRequest optimizeRequest) { optimizeRequest = new OptimizeRequest( Given.AnExternalImageUrl.ThatPointsToAValidImageOnTheWeb() , Given.ACallBackUrl.ThatIsAValidCallBackUrl()); return(optimizeRequest); }
public Task <IApiResponse <OptimizeResult> > Optimize(Uri imageUri, Uri callbackUrl, CancellationToken cancellationToken) { var optimize = new OptimizeRequest(imageUri, callbackUrl); var message = Optimize(optimize, cancellationToken); return(message); }
public OptimizeRequestTests() { var request = new OptimizeRequest(typeof(ElasticsearchProject)) { ExpandWildcards = ExpandWildcards.Open }; //TODO Index(request) does not work as expected var response = this._client.Optimize(request); this._status = response.ConnectionStatus; }
public OptimizeRequestTests() { var request = new OptimizeRequest(typeof(ElasticsearchProject)) { ExpandWildcards = ExpandWildcards.Open }; //TODO Index(request) does not work as expected var response = this._client.Optimize(request); this._status = response.ConnectionStatus; }
public async Task <IActionResult> Post(OptimizeRequest request) { if (!ModelState.IsValid) { return(BadRequest(ModelState)); } var task = new OptimizeBackgroundTask { Title = request.Title, Path = request.Path }; var handler = new OptimizeBackgroundTaskHandler(loggerFactory, progressHubContext); await backgroundTaskQueue.QueueBackgroundWorkItemAsync(handler.Handle, task); return(Ok()); }
public Task <IApiResponse <OptimizeResult> > Optimize(Uri imageUri, Uri callbackUrl, CancellationToken cancellationToken) { if (imageUri == null) { throw new ArgumentNullException(nameof(imageUri)); } if (callbackUrl == null) { throw new ArgumentNullException(nameof(callbackUrl)); } var optimize = new OptimizeRequest(imageUri, callbackUrl); var message = Optimize(optimize, cancellationToken); return(message); }