好的,解决了我自己的问题..我只是接受了错误的任务..并且 kraken.io 网站上的文档有问题。
根据文档,您应该给它一个uri和optimizeUploadWaitRequest..而根据元数据,没有什么需要uri +和optimizeUploadWaitRequest ..只有uri和cancellationToken或文件路径和optimizeUploadWaitRequest..所以..是的。 .应该先看看那里。
//public Task<IApiResponse<OptimizeResult>> Optimize(byte[] image, string filename, IOptimizeUploadRequest optimizeRequest, CancellationToken cancellationToken);
//public Task<IApiResponse<OptimizeResult>> Optimize(string filePath, IOptimizeSetUploadRequest optimizeRequest);
//public Task<IApiResponse<OptimizeResult>> Optimize(byte[] image, string filename, IOptimizeSetUploadRequest optimizeRequest, CancellationToken cancellationToken);
//public Task<IApiResponse<OptimizeResult>> Optimize(byte[] image, string filename, IOptimizeSetUploadRequest optimizeRequest);
//public Task<IApiResponse<OptimizeResult>> Optimize(IOptimizeSetRequest optimizeSetRequest, CancellationToken cancellationToken);
//public Task<IApiResponse<OptimizeResult>> Optimize(IOptimizeSetRequest optimizeSetRequest);
//public Task<IApiResponse<OptimizeResult>> Optimize(IOptimizeRequest optimizeRequest, CancellationToken cancellationToken);
//public Task<IApiResponse<OptimizeResult>> Optimize(IOptimizeRequest optimizeRequest);
//public Task<IApiResponse<OptimizeResult>> Optimize(string filePath, IOptimizeSetUploadRequest optimizeRequest, CancellationToken cancellationToken);
//public Task<IApiResponse<OptimizeResult>> Optimize(string filePath, IOptimizeUploadRequest optimizeRequest, CancellationToken cancellationToken);
//public Task<IApiResponse<OptimizeResult>> Optimize(string filePath, IOptimizeUploadRequest optimizeRequest);
//public Task<IApiResponse<OptimizeResult>> Optimize(byte[] image, string filename, IOptimizeUploadRequest optimizeRequest);
//public Task<IApiResponse<OptimizeResult>> Optimize(string filePath, Uri callbackUrl, CancellationToken cancellationToken);
//public Task<IApiResponse<OptimizeResult>> Optimize(string filePath, Uri callbackUrl);
//public Task<IApiResponse<OptimizeResult>> Optimize(Uri imageUri, Uri callbackUrl);
//public Task<IApiResponse<OptimizeResult>> Optimize(Uri imageUri, Uri callbackUrl, CancellationToken cancellationToken);
//public Task<IApiResponse<OptimizeWaitResult>> OptimizeWait(string filePath, IOptimizeUploadWaitRequest optimizeWaitRequest);
//public Task<IApiResponse<OptimizeWaitResult>> OptimizeWait(Uri imageUri);
public Task<IApiResponse<OptimizeWaitResult>> OptimizeWait(Uri imageUri, CancellationToken cancellationToken);
//public Task<IApiResponse<OptimizeSetWaitResults>> OptimizeWait(string filePath, IOptimizeSetUploadWaitRequest optimizeWaitRequest, CancellationToken cancellationToken);
//public Task<IApiResponse<OptimizeSetWaitResults>> OptimizeWait(string filePath, IOptimizeSetUploadWaitRequest optimizeWaitRequest);
//public Task<IApiResponse<OptimizeSetWaitResults>> OptimizeWait(byte[] image, string filename, IOptimizeSetUploadWaitRequest optimizeWaitRequest, CancellationToken cancellationToken);
//public Task<IApiResponse<OptimizeSetWaitResults>> OptimizeWait(byte[] image, string filename, IOptimizeSetUploadWaitRequest optimizeWaitRequest);
//public Task<IApiResponse<OptimizeSetWaitResults>> OptimizeWait(IOptimizeSetWaitRequest optimizeSetWaitRequest, CancellationToken cancellationToken);
//public Task<IApiResponse<OptimizeSetWaitResults>> OptimizeWait(IOptimizeSetWaitRequest optimizeSetWaitRequest);
//public Task<IApiResponse<OptimizeWaitResult>> OptimizeWait(string filePath);
//public Task<IApiResponse<OptimizeWaitResult>> OptimizeWait(string filePath, CancellationToken cancellationToken);
//public Task<IApiResponse<OptimizeWaitResult>> OptimizeWait(IOptimizeWaitRequest optimizeWaitRequest, CancellationToken cancellationToken);
//public Task<IApiResponse<OptimizeWaitResult>> OptimizeWait(IOptimizeWaitRequest optimizeWaitRequest);
//public Task<IApiResponse<OptimizeWaitResult>> OptimizeWait(byte[] image, string filename, IOptimizeUploadWaitRequest optimizeWaitRequest, CancellationToken cancellationToken);
//public Task<IApiResponse<OptimizeWaitResult>> OptimizeWait(byte[] image, string filename, IOptimizeUploadWaitRequest optimizeWaitRequest);
public Task<IApiResponse<OptimizeWaitResult>> OptimizeWait(string filePath, IOptimizeUploadWaitRequest optimizeWaitRequest, CancellationToken cancellationToken);
//public Task<IApiResponse<UserResult>> UserStatus(CancellationToken cancellationToken);
//public Task<IApiResponse<UserResult>> UserStatus();
所以我只需要从那里取出正确的一个(两个条目没有被注释掉..为了清楚起见..我希望)
所以是的.. 和 kraken 一样好用.. 文档.. 不是最新的。