@@ -123,7 +123,6 @@ InputSource inputSource
123123 default :
124124 throw new MindeeInputException ( $ "Unsupported input source { inputSource . GetType ( ) . Name } ") ;
125125 }
126-
127126 return await _mindeeApi . ReqPostEnqueueAsync ( inputSource , parameters , ct ) ;
128127 }
129128
@@ -151,21 +150,21 @@ public async Task<JobResponse> GetJobFromUrlAsync(string pollingUrl, Cancellatio
151150 /// <summary>
152151 /// Get a result directly from a polling URL.
153152 /// </summary>
154- /// <param name="pollingUrl ">The result's URL.</param>
153+ /// <param name="resultUrl ">The result's URL.</param>
155154 /// <param name="ct">Cancellation token.</param>
156155 /// <returns>
157156 /// <see cref="ExtractionResponse" />
158157 /// </returns>
159- public async Task < TResponse > GetResultFromUrlAsync < TResponse > ( string pollingUrl , CancellationToken ct = default )
158+ public async Task < TResponse > GetResultFromUrlAsync < TResponse > ( string resultUrl , CancellationToken ct = default )
160159 where TResponse : BaseResponse , new ( )
161160 {
162- _logger ? . LogInformation ( "Polling : {}" , pollingUrl ) ;
161+ _logger ? . LogInformation ( "Getting result at : {}" , resultUrl ) ;
163162
164- if ( string . IsNullOrWhiteSpace ( pollingUrl ) )
163+ if ( string . IsNullOrWhiteSpace ( resultUrl ) )
165164 {
166- throw new MindeeInputException ( nameof ( pollingUrl ) ) ;
165+ throw new MindeeInputException ( nameof ( resultUrl ) ) ;
167166 }
168- return await _mindeeApi . ReqGetResultFromUrlAsync < TResponse > ( pollingUrl , ct ) ;
167+ return await _mindeeApi . ReqGetResultFromUrlAsync < TResponse > ( resultUrl , ct ) ;
169168 }
170169
171170 /// <summary>
@@ -180,7 +179,7 @@ public async Task<TResponse> GetResultFromUrlAsync<TResponse>(string pollingUrl,
180179 public async Task < TResponse > GetResultAsync < TResponse > ( string jobId , CancellationToken ct = default )
181180 where TResponse : BaseResponse , new ( )
182181 {
183- _logger ? . LogInformation ( "Polling : {}" , jobId ) ;
182+ _logger ? . LogInformation ( "Getting result with ID : {}" , jobId ) ;
184183
185184 if ( string . IsNullOrWhiteSpace ( jobId ) )
186185 {
@@ -200,7 +199,7 @@ public async Task<TResponse> GetResultAsync<TResponse>(string jobId, Cancellatio
200199 /// </returns>
201200 public async Task < JobResponse > GetJobAsync ( string jobId , CancellationToken ct = default )
202201 {
203- _logger ? . LogInformation ( "Getting job {}" , jobId ) ;
202+ _logger ? . LogInformation ( "Getting job ID: {}" , jobId ) ;
204203
205204 if ( string . IsNullOrWhiteSpace ( jobId ) )
206205 {
@@ -234,20 +233,6 @@ InputSource inputSource
234233 , CancellationToken ct = default )
235234 where TResponse : BaseResponse , new ( )
236235 {
237- switch ( inputSource )
238- {
239- case LocalInputSource :
240- _logger ? . LogInformation ( "Enqueuing: local source" ) ;
241- break ;
242- case UrlInputSource :
243- _logger ? . LogInformation ( "Enqueuing: URL source" ) ;
244- break ;
245- case null :
246- throw new ArgumentNullException ( nameof ( inputSource ) ) ;
247- default :
248- throw new MindeeInputException ( $ "Unsupported input source { inputSource . GetType ( ) . Name } ") ;
249- }
250-
251236 pollingOptions ??= new PollingOptions ( ) ;
252237
253238 var enqueueResponse = await EnqueueAsync (
@@ -264,7 +249,8 @@ InputSource inputSource
264249 /// <param name="modelType">Model type filter.</param>
265250 /// <param name="ct">Cancellation token.</param>
266251 /// <returns></returns>
267- public async Task < SearchResponse > SearchModels ( string name = null , string modelType = null , CancellationToken ct = default )
252+ public async Task < SearchResponse > SearchModels (
253+ string name = null , string modelType = null , CancellationToken ct = default )
268254 {
269255 return await _mindeeApi . SearchModels ( name , modelType , ct ) ;
270256 }
0 commit comments