@@ -7,14 +7,14 @@ import Alamofire
77import SwiftyJSON
88
99public extension NextcloudKit {
10- // Retrieves the list of supported text processing task types from the server.
11- // These types define the kinds of operations (e.g., summarization, translation) supported by the assistant API.
12- //
13- // Parameters:
14- // - account: The Nextcloud account initiating the request.
15- // - options: Optional configuration for the HTTP request.
16- // - taskHandler: Optional closure to access the underlying URLSessionTask.
17- // - completion: Completion handler providing the account, available task types, response, and NKError.
10+ /// Retrieves the list of supported text processing task types from the server.
11+ /// These types define the kinds of operations (e.g., summarization, translation) supported by the assistant API.
12+ ///
13+ /// Parameters:
14+ /// - account: The Nextcloud account initiating the request.
15+ /// - options: Optional configuration for the HTTP request.
16+ /// - taskHandler: Optional closure to access the underlying URLSessionTask.
17+ /// - completion: Completion handler providing the account, available task types, response, and NKError.
1818 func textProcessingGetTypes( account: String ,
1919 options: NKRequestOptions = NKRequestOptions ( ) ,
2020 taskHandler: @escaping ( _ task: URLSessionTask ) -> Void = { _ in } ,
@@ -77,18 +77,18 @@ public extension NextcloudKit {
7777 }
7878 }
7979
80- // Schedules a new text processing task on the server (e.g., translation, summary, etc.).
81- // The request includes the input text, the type of task to execute, and a unique identifier.
82- //
83- // Parameters:
84- // - input: The raw input string to be processed.
85- // - typeId: The identifier of the task type (e.g., "summarize", "translate").
86- // - appId: The application identifier (default is "assistant").
87- // - identifier: A client-side unique string to track this task.
88- // - account: The Nextcloud account executing the request.
89- // - options: Optional request configuration (headers, queue, etc.).
90- // - taskHandler: Optional closure to access the URLSessionTask.
91- // - completion: Completion handler returning the account, resulting task object, response, and any NKError.
80+ /// Schedules a new text processing task on the server (e.g., translation, summary, etc.).
81+ /// The request includes the input text, the type of task to execute, and a unique identifier.
82+ ///
83+ /// Parameters:
84+ /// - input: The raw input string to be processed.
85+ /// - typeId: The identifier of the task type (e.g., "summarize", "translate").
86+ /// - appId: The application identifier (default is "assistant").
87+ /// - identifier: A client-side unique string to track this task.
88+ /// - account: The Nextcloud account executing the request.
89+ /// - options: Optional request configuration (headers, queue, etc.).
90+ /// - taskHandler: Optional closure to access the URLSessionTask.
91+ /// - completion: Completion handler returning the account, resulting task object, response, and any NKError.
9292 func textProcessingSchedule( input: String ,
9393 typeId: String ,
9494 appId: String = " assistant " ,
@@ -168,15 +168,15 @@ public extension NextcloudKit {
168168 }
169169 }
170170
171- // Retrieves the current status and data of a previously scheduled text processing task.
172- // Useful for polling or checking the result of a long-running task by its unique ID.
173- //
174- // Parameters:
175- // - taskId: The server-side ID of the text processing task to retrieve.
176- // - account: The Nextcloud account making the request.
177- // - options: Optional request configuration.
178- // - taskHandler: Optional closure to access the URLSessionTask.
179- // - completion: Completion handler returning the account, task object, raw response, and NKError.
171+ /// Retrieves the current status and data of a previously scheduled text processing task.
172+ /// Useful for polling or checking the result of a long-running task by its unique ID.
173+ ///
174+ /// Parameters:
175+ /// - taskId: The server-side ID of the text processing task to retrieve.
176+ /// - account: The Nextcloud account making the request.
177+ /// - options: Optional request configuration.
178+ /// - taskHandler: Optional closure to access the URLSessionTask.
179+ /// - completion: Completion handler returning the account, task object, raw response, and NKError.
180180 func textProcessingGetTask( taskId: Int ,
181181 account: String ,
182182 options: NKRequestOptions = NKRequestOptions ( ) ,
@@ -243,15 +243,15 @@ public extension NextcloudKit {
243243 }
244244 }
245245
246- // Deletes a specific text processing task on the server.
247- // This is used to cancel or clean up tasks that are no longer needed.
248- //
249- // Parameters:
250- // - taskId: The ID of the task to be deleted.
251- // - account: The Nextcloud account making the request.
252- // - options: Optional request configuration.
253- // - taskHandler: Optional closure to access the URLSessionTask.
254- // - completion: Completion handler returning the account, deleted task object, raw response, and NKError.
246+ /// Deletes a specific text processing task on the server.
247+ /// This is used to cancel or clean up tasks that are no longer needed.
248+ ///
249+ /// Parameters:
250+ /// - taskId: The ID of the task to be deleted.
251+ /// - account: The Nextcloud account making the request.
252+ /// - options: Optional request configuration.
253+ /// - taskHandler: Optional closure to access the URLSessionTask.
254+ /// - completion: Completion handler returning the account, deleted task object, raw response, and NKError.
255255 func textProcessingDeleteTask( taskId: Int ,
256256 account: String ,
257257 options: NKRequestOptions = NKRequestOptions ( ) ,
@@ -318,15 +318,15 @@ public extension NextcloudKit {
318318 }
319319 }
320320
321- // Retrieves a list of all text processing tasks associated with a specific app ID.
322- // This includes both pending and completed tasks, useful for tracking the assistant's activity.
323- //
324- // Parameters:
325- // - appId: Identifier of the application requesting the tasks (e.g., "assistant").
326- // - account: The Nextcloud account making the request.
327- // - options: Optional HTTP request configuration.
328- // - taskHandler: Optional closure to access the URLSessionTask.
329- // - completion: Completion handler returning the account, task list, raw response, and NKError.
321+ /// Retrieves a list of all text processing tasks associated with a specific app ID.
322+ /// This includes both pending and completed tasks, useful for tracking the assistant's activity.
323+ ///
324+ /// Parameters:
325+ /// - appId: Identifier of the application requesting the tasks (e.g., "assistant").
326+ /// - account: The Nextcloud account making the request.
327+ /// - options: Optional HTTP request configuration.
328+ /// - taskHandler: Optional closure to access the URLSessionTask.
329+ /// - completion: Completion handler returning the account, task list, raw response, and NKError.
330330 func textProcessingTaskList( appId: String ,
331331 account: String ,
332332 options: NKRequestOptions = NKRequestOptions ( ) ,
@@ -393,5 +393,3 @@ public extension NextcloudKit {
393393 }
394394 }
395395}
396-
397-
0 commit comments