Skip to content

Commit a2a0fac

Browse files
doc
Signed-off-by: Marino Faggiana <marino@marinofaggiana.com>
1 parent 7e3dcff commit a2a0fac

12 files changed

Lines changed: 573 additions & 492 deletions

Sources/NextcloudKit/NextcloudKit+API.swift

Lines changed: 153 additions & 153 deletions
Large diffs are not rendered by default.

Sources/NextcloudKit/NextcloudKit+Assistant.swift

Lines changed: 47 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,14 @@ import Alamofire
77
import SwiftyJSON
88

99
public 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-

Sources/NextcloudKit/NextcloudKit+AssistantV2.swift

Lines changed: 37 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -7,15 +7,15 @@ import Alamofire
77
import SwiftyJSON
88

99
public extension NextcloudKit {
10-
// Retrieves the list of supported task types for a specific account and task category.
11-
// Typically used to discover available AI or text processing capabilities.
12-
//
13-
// Parameters:
14-
// - account: The Nextcloud account making the request.
15-
// - supportedTaskType: Type of tasks to retrieve, default is "Text".
16-
// - options: Optional HTTP request configuration.
17-
// - taskHandler: Optional closure to access the URLSessionTask.
18-
// - completion: Completion handler returning the account, list of supported types, raw response, and NKError.
10+
/// Retrieves the list of supported task types for a specific account and task category.
11+
/// Typically used to discover available AI or text processing capabilities.
12+
///
13+
/// Parameters:
14+
/// - account: The Nextcloud account making the request.
15+
/// - supportedTaskType: Type of tasks to retrieve, default is "Text".
16+
/// - options: Optional HTTP request configuration.
17+
/// - taskHandler: Optional closure to access the URLSessionTask.
18+
/// - completion: Completion handler returning the account, list of supported types, raw response, and NKError.
1919
func textProcessingGetTypesV2(account: String,
2020
supportedTaskType: String = "Text",
2121
options: NKRequestOptions = NKRequestOptions(),
@@ -86,16 +86,16 @@ public extension NextcloudKit {
8686
}
8787
}
8888

89-
// Schedules a new text processing task for a specific account and task type.
90-
// Useful for initiating assistant-based text analysis, generation, or transformation.
91-
//
92-
// Parameters:
93-
// - input: The input text to be processed.
94-
// - taskType: The specific task type to execute (e.g., summarization, sentiment analysis).
95-
// - account: The Nextcloud account initiating the task.
96-
// - options: Optional HTTP request configuration.
97-
// - taskHandler: Optional closure to access the underlying URLSessionTask.
98-
// - completion: Completion handler returning the account, scheduled task, raw response, and NKError.
89+
/// Schedules a new text processing task for a specific account and task type.
90+
/// Useful for initiating assistant-based text analysis, generation, or transformation.
91+
///
92+
/// Parameters:
93+
/// - input: The input text to be processed.
94+
/// - taskType: The specific task type to execute (e.g., summarization, sentiment analysis).
95+
/// - account: The Nextcloud account initiating the task.
96+
/// - options: Optional HTTP request configuration.
97+
/// - taskHandler: Optional closure to access the underlying URLSessionTask.
98+
/// - completion: Completion handler returning the account, scheduled task, raw response, and NKError.
9999
func textProcessingScheduleV2(input: String,
100100
taskType: TaskTypeData,
101101
account: String,
@@ -169,15 +169,15 @@ public extension NextcloudKit {
169169
}
170170
}
171171

172-
// Retrieves all scheduled text processing tasks of a specific type for the given account.
173-
// Useful for listing and tracking tasks like summarization, transcription, or classification.
174-
//
175-
// Parameters:
176-
// - taskType: Identifier of the task type to filter tasks (e.g., "Text").
177-
// - account: The Nextcloud account performing the request.
178-
// - options: Optional HTTP request configuration.
179-
// - taskHandler: Optional closure to access the underlying URLSessionTask.
180-
// - completion: Completion handler returning the account, list of tasks, raw response, and NKError.
172+
/// Retrieves all scheduled text processing tasks of a specific type for the given account.
173+
/// Useful for listing and tracking tasks like summarization, transcription, or classification.
174+
///
175+
/// Parameters:
176+
/// - taskType: Identifier of the task type to filter tasks (e.g., "Text").
177+
/// - account: The Nextcloud account performing the request.
178+
/// - options: Optional HTTP request configuration.
179+
/// - taskHandler: Optional closure to access the underlying URLSessionTask.
180+
/// - completion: Completion handler returning the account, list of tasks, raw response, and NKError.
181181
func textProcessingGetTasksV2(taskType: String,
182182
account: String,
183183
options: NKRequestOptions = NKRequestOptions(),
@@ -244,15 +244,15 @@ public extension NextcloudKit {
244244
}
245245
}
246246

247-
// Deletes a scheduled text processing task with a specific identifier.
248-
// Useful for canceling tasks that are no longer needed or invalid.
249-
//
250-
// Parameters:
251-
// - taskId: The unique identifier of the task to delete.
252-
// - account: The Nextcloud account executing the deletion.
253-
// - options: Optional HTTP request configuration.
254-
// - taskHandler: Optional closure to access the underlying URLSessionTask.
255-
// - completion: Completion handler returning the account, raw response, and NKError.
247+
/// Deletes a scheduled text processing task with a specific identifier.
248+
/// Useful for canceling tasks that are no longer needed or invalid.
249+
///
250+
/// Parameters:
251+
/// - taskId: The unique identifier of the task to delete.
252+
/// - account: The Nextcloud account executing the deletion.
253+
/// - options: Optional HTTP request configuration.
254+
/// - taskHandler: Optional closure to access the underlying URLSessionTask.
255+
/// - completion: Completion handler returning the account, raw response, and NKError.
256256
func textProcessingDeleteTaskV2(taskId: Int64,
257257
account: String,
258258
options: NKRequestOptions = NKRequestOptions(),

0 commit comments

Comments
 (0)