Skip to content

Commit 3d8cd31

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

8 files changed

Lines changed: 400 additions & 390 deletions

Sources/NextcloudKit/NextcloudKit+NCText.swift

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

99
public extension NextcloudKit {
10-
// Retrieves the list of editors and creators for collaborative text editing.
11-
//
12-
// Parameters:
13-
// - account: The account from which to fetch the editor details.
14-
// - options: Optional request configuration such as headers, queue, or API version.
15-
// - taskHandler: Callback to track the underlying URLSessionTask.
16-
// - completion: Returns the account, array of editors, array of creators, the raw response data, and NKError.
10+
/// Retrieves the list of editors and creators for collaborative text editing.
11+
///
12+
/// Parameters:
13+
/// - account: The account from which to fetch the editor details.
14+
/// - options: Optional request configuration such as headers, queue, or API version.
15+
/// - taskHandler: Callback to track the underlying URLSessionTask.
16+
/// - completion: Returns the account, array of editors, array of creators, the raw response data, and NKError.
1717
func textObtainEditorDetails(account: String,
1818
options: NKRequestOptions = NKRequestOptions(),
1919
taskHandler: @escaping (_ task: URLSessionTask) -> Void = { _ in },
@@ -89,16 +89,16 @@ public extension NextcloudKit {
8989
}
9090
}
9191

92-
// Opens a file using the specified text editor and returns the access URL.
93-
//
94-
// Parameters:
95-
// - fileNamePath: The path of the file to open on the server.
96-
// - fileId: Optional file identifier used to reference the file more precisely.
97-
// - editor: The identifier of the text editor to use.
98-
// - account: The account initiating the file open request.
99-
// - options: Optional configuration for the request (headers, API version, etc.).
100-
// - taskHandler: Callback triggered with the underlying URLSessionTask.
101-
// - completion: Returns the account, the resulting file editor URL, raw response data, and an NKError.
92+
/// Opens a file using the specified text editor and returns the access URL.
93+
///
94+
/// Parameters:
95+
/// - fileNamePath: The path of the file to open on the server.
96+
/// - fileId: Optional file identifier used to reference the file more precisely.
97+
/// - editor: The identifier of the text editor to use.
98+
/// - account: The account initiating the file open request.
99+
/// - options: Optional configuration for the request (headers, API version, etc.).
100+
/// - taskHandler: Callback triggered with the underlying URLSessionTask.
101+
/// - completion: Returns the account, the resulting file editor URL, raw response data, and an NKError.
102102
func textOpenFile(fileNamePath: String,
103103
fileId: String? = nil,
104104
editor: String,
@@ -174,13 +174,13 @@ public extension NextcloudKit {
174174
}
175175
}
176176

177-
// Retrieves the list of available editor templates for the given account.
178-
//
179-
// Parameters:
180-
// - account: The account requesting the list of templates.
181-
// - options: Optional request configuration such as headers, queue, or API version.
182-
// - taskHandler: Callback triggered with the underlying URLSessionTask.
183-
// - completion: Returns the account, an optional array of NKEditorTemplate, the raw response, and an NKError.
177+
/// Retrieves the list of available editor templates for the given account.
178+
///
179+
/// Parameters:
180+
/// - account: The account requesting the list of templates.
181+
/// - options: Optional request configuration such as headers, queue, or API version.
182+
/// - taskHandler: Callback triggered with the underlying URLSessionTask.
183+
/// - completion: Returns the account, an optional array of NKEditorTemplate, the raw response, and an NKError.
184184
func textGetListOfTemplates(account: String,
185185
options: NKRequestOptions = NKRequestOptions(),
186186
taskHandler: @escaping (_ task: URLSessionTask) -> Void = { _ in },
@@ -250,17 +250,17 @@ public extension NextcloudKit {
250250
}
251251
}
252252

253-
// Creates a new file using a specific editor, creator, and template.
254-
//
255-
// Parameters:
256-
// - fileNamePath: The full destination path where the new file will be created.
257-
// - editorId: The identifier of the editor to use (e.g., "richdocuments").
258-
// - creatorId: The identifier of the creator (e.g., "document", "spreadsheet").
259-
// - templateId: The identifier of the template to use for this file.
260-
// - account: The account performing the operation.
261-
// - options: Optional request configuration (headers, queue, version, etc.).
262-
// - taskHandler: Callback to monitor the underlying URLSessionTask.
263-
// - completion: Returns the account, the resulting file URL (if any), the raw response, and NKError.
253+
/// Creates a new file using a specific editor, creator, and template.
254+
///
255+
/// Parameters:
256+
/// - fileNamePath: The full destination path where the new file will be created.
257+
/// - editorId: The identifier of the editor to use (e.g., "richdocuments").
258+
/// - creatorId: The identifier of the creator (e.g., "document", "spreadsheet").
259+
/// - templateId: The identifier of the template to use for this file.
260+
/// - account: The account performing the operation.
261+
/// - options: Optional request configuration (headers, queue, version, etc.).
262+
/// - taskHandler: Callback to monitor the underlying URLSessionTask.
263+
/// - completion: Returns the account, the resulting file URL (if any), the raw response, and NKError.
264264
func textCreateFile(fileNamePath: String,
265265
editorId: String,
266266
creatorId: String,

Sources/NextcloudKit/NextcloudKit+PushNotification.swift

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

99
public extension NextcloudKit {
10-
// Subscribes the current device to push notifications.
11-
//
12-
// Parameters:
13-
// - serverUrl: The base server URL for the Nextcloud instance.
14-
// - pushTokenHash: Hashed device push token, used for identification.
15-
// - devicePublicKey: The public key of the device for encryption/authentication.
16-
// - proxyServerUrl: The URL of the proxy push server.
17-
// - account: The Nextcloud account performing the subscription.
18-
// - options: Optional request configuration (headers, version, etc.).
19-
// - taskHandler: Callback to monitor the `URLSessionTask`.
20-
// - completion: Returns the account, device identifier, push signature, public key, response data, and NKError.
10+
/// Subscribes the current device to push notifications.
11+
///
12+
/// Parameters:
13+
/// - serverUrl: The base server URL for the Nextcloud instance.
14+
/// - pushTokenHash: Hashed device push token, used for identification.
15+
/// - devicePublicKey: The public key of the device for encryption/authentication.
16+
/// - proxyServerUrl: The URL of the proxy push server.
17+
/// - account: The Nextcloud account performing the subscription.
18+
/// - options: Optional request configuration (headers, version, etc.).
19+
/// - taskHandler: Callback to monitor the `URLSessionTask`.
20+
/// - completion: Returns the account, device identifier, push signature, public key, response data, and NKError.
2121
func subscribingPushNotification(serverUrl: String,
2222
pushTokenHash: String,
2323
devicePublicKey: String,
@@ -107,14 +107,14 @@ public extension NextcloudKit {
107107
}
108108
}
109109

110-
// Unsubscribes the current device from push notifications.
111-
//
112-
// Parameters:
113-
// - serverUrl: The base server URL of the Nextcloud instance.
114-
// - account: The Nextcloud account performing the unsubscription.
115-
// - options: Optional request configuration (headers, queue, etc.).
116-
// - taskHandler: Callback to monitor the `URLSessionTask`.
117-
// - completion: Returns the account, raw response data, and NKError.
110+
/// Unsubscribes the current device from push notifications.
111+
///
112+
/// Parameters:
113+
/// - serverUrl: The base server URL of the Nextcloud instance.
114+
/// - account: The Nextcloud account performing the unsubscription.
115+
/// - options: Optional request configuration (headers, queue, etc.).
116+
/// - taskHandler: Callback to monitor the `URLSessionTask`.
117+
/// - completion: Returns the account, raw response data, and NKError.
118118
func unsubscribingPushNotification(serverUrl: String,
119119
account: String,
120120
options: NKRequestOptions = NKRequestOptions(),
@@ -172,18 +172,18 @@ public extension NextcloudKit {
172172
}
173173
}
174174

175-
// Subscribes a device to the push proxy server for receiving push notifications.
176-
//
177-
// Parameters:
178-
// - proxyServerUrl: The URL of the push proxy server.
179-
// - pushToken: The token representing the push notification subscription.
180-
// - deviceIdentifier: A unique identifier for the device.
181-
// - signature: A signature to validate the subscription.
182-
// - publicKey: The public key associated with the device.
183-
// - account: The Nextcloud account performing the subscription.
184-
// - options: Optional request customization.
185-
// - taskHandler: Callback for tracking the underlying URLSessionTask.
186-
// - completion: Returns the account, raw response data, and NKError.
175+
/// Subscribes a device to the push proxy server for receiving push notifications.
176+
///
177+
/// Parameters:
178+
/// - proxyServerUrl: The URL of the push proxy server.
179+
/// - pushToken: The token representing the push notification subscription.
180+
/// - deviceIdentifier: A unique identifier for the device.
181+
/// - signature: A signature to validate the subscription.
182+
/// - publicKey: The public key associated with the device.
183+
/// - account: The Nextcloud account performing the subscription.
184+
/// - options: Optional request customization.
185+
/// - taskHandler: Callback for tracking the underlying URLSessionTask.
186+
/// - completion: Returns the account, raw response data, and NKError.
187187
func subscribingPushProxy(proxyServerUrl: String,
188188
pushToken: String,
189189
deviceIdentifier: String,
@@ -264,17 +264,17 @@ public extension NextcloudKit {
264264
}
265265
}
266266

267-
// Unsubscribes a device from the push proxy server.
268-
//
269-
// Parameters:
270-
// - proxyServerUrl: The URL of the push proxy server.
271-
// - deviceIdentifier: A unique identifier for the device.
272-
// - signature: A cryptographic signature to authenticate the request.
273-
// - publicKey: The public key associated with the device.
274-
// - account: The Nextcloud account initiating the request.
275-
// - options: Optional configuration for the request (queue, headers, version, etc.).
276-
// - taskHandler: Callback triggered when the underlying URLSessionTask is created.
277-
// - completion: Completion handler with account, response data, and NKError result.
267+
/// Unsubscribes a device from the push proxy server.
268+
///
269+
/// Parameters:
270+
/// - proxyServerUrl: The URL of the push proxy server.
271+
/// - deviceIdentifier: A unique identifier for the device.
272+
/// - signature: A cryptographic signature to authenticate the request.
273+
/// - publicKey: The public key associated with the device.
274+
/// - account: The Nextcloud account initiating the request.
275+
/// - options: Optional configuration for the request (queue, headers, version, etc.).
276+
/// - taskHandler: Callback triggered when the underlying URLSessionTask is created.
277+
/// - completion: Completion handler with account, response data, and NKError result.
278278
func unsubscribingPushProxy(proxyServerUrl: String,
279279
deviceIdentifier: String,
280280
signature: String,

Sources/NextcloudKit/NextcloudKit+RecommendedFiles.swift

Lines changed: 9 additions & 9 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 a list of recommended files from the server.
11-
//
12-
// Parameters:
13-
// - account: The Nextcloud account used to perform the request.
14-
// - options: Optional configuration for headers, queue, versioning, etc.
15-
// - request: Optional callback to observe or manipulate the underlying DataRequest.
16-
// - taskHandler: Callback triggered when the URLSessionTask is created.
17-
// - completion: Completion handler returning the account, the list of recommendations,
18-
// the raw response data, and an NKError result.
10+
/// Retrieves a list of recommended files from the server.
11+
///
12+
/// Parameters:
13+
/// - account: The Nextcloud account used to perform the request.
14+
/// - options: Optional configuration for headers, queue, versioning, etc.
15+
/// - request: Optional callback to observe or manipulate the underlying DataRequest.
16+
/// - taskHandler: Callback triggered when the URLSessionTask is created.
17+
/// - completion: Completion handler returning the account, the list of recommendations,
18+
/// the raw response data, and an NKError result.
1919
func getRecommendedFiles(account: String,
2020
options: NKRequestOptions = NKRequestOptions(),
2121
request: @escaping (DataRequest?) -> Void = { _ in },

Sources/NextcloudKit/NextcloudKit+Richdocuments.swift

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

99
public extension NextcloudKit {
10-
// Requests a URL for editing or viewing a file via the Richdocuments (Collabora/OnlyOffice) app.
11-
//
12-
// Parameters:
13-
// - fileID: The unique identifier of the file for which the document URL is requested.
14-
// - account: The Nextcloud account performing the request.
15-
// - options: Optional configuration such as custom headers, queue, or API version.
16-
// - taskHandler: Callback invoked when the underlying URLSessionTask is created.
17-
// - completion: Completion handler returning the account, document URL (if available),
18-
// the raw HTTP response, and an NKError object.
10+
/// Requests a URL for editing or viewing a file via the Richdocuments (Collabora/OnlyOffice) app.
11+
///
12+
/// Parameters:
13+
/// - fileID: The unique identifier of the file for which the document URL is requested.
14+
/// - account: The Nextcloud account performing the request.
15+
/// - options: Optional configuration such as custom headers, queue, or API version.
16+
/// - taskHandler: Callback invoked when the underlying URLSessionTask is created.
17+
/// - completion: Completion handler returning the account, document URL (if available),
18+
/// the raw HTTP response, and an NKError object.
1919
func createUrlRichdocuments(fileID: String,
2020
account: String,
2121
options: NKRequestOptions = NKRequestOptions(),
@@ -82,14 +82,14 @@ public extension NextcloudKit {
8282
}
8383
}
8484

85-
// Retrieves the list of Richdocuments templates of a given type (e.g., "document", "spreadsheet").
86-
//
87-
// Parameters:
88-
// - typeTemplate: The type of template to retrieve (e.g., "document", "presentation").
89-
// - account: The Nextcloud account performing the request.
90-
// - options: Optional configuration (headers, queue, API version, etc.).
91-
// - taskHandler: Callback invoked when the underlying URLSessionTask is created.
92-
// - completion: Completion handler returning the account, array of templates, response data, and NKError.
85+
/// Retrieves the list of Richdocuments templates of a given type (e.g., "document", "spreadsheet").
86+
///
87+
/// Parameters:
88+
/// - typeTemplate: The type of template to retrieve (e.g., "document", "presentation").
89+
/// - account: The Nextcloud account performing the request.
90+
/// - options: Optional configuration (headers, queue, API version, etc.).
91+
/// - taskHandler: Callback invoked when the underlying URLSessionTask is created.
92+
/// - completion: Completion handler returning the account, array of templates, response data, and NKError.
9393
func getTemplatesRichdocuments(typeTemplate: String,
9494
account: String,
9595
options: NKRequestOptions = NKRequestOptions(),
@@ -167,15 +167,15 @@ public extension NextcloudKit {
167167
}
168168
}
169169

170-
// Creates a new Richdocuments file using a specific template.
171-
//
172-
// Parameters:
173-
// - path: The target path where the new document should be created.
174-
// - templateId: The ID of the Richdocuments template to use.
175-
// - account: The Nextcloud account performing the request.
176-
// - options: Optional request configuration (headers, queue, API version, etc.).
177-
// - taskHandler: Callback invoked when the underlying URLSessionTask is created.
178-
// - completion: Completion handler returning the account, resulting file URL, raw response, and NKError.
170+
/// Creates a new Richdocuments file using a specific template.
171+
///
172+
/// Parameters:
173+
/// - path: The target path where the new document should be created.
174+
/// - templateId: The ID of the Richdocuments template to use.
175+
/// - account: The Nextcloud account performing the request.
176+
/// - options: Optional request configuration (headers, queue, API version, etc.).
177+
/// - taskHandler: Callback invoked when the underlying URLSessionTask is created.
178+
/// - completion: Completion handler returning the account, resulting file URL, raw response, and NKError.
179179
func createRichdocuments(path: String,
180180
templateId: String,
181181
account: String,
@@ -246,14 +246,14 @@ public extension NextcloudKit {
246246
}
247247
}
248248

249-
// Creates a new Richdocuments file based on a default asset (no template).
250-
//
251-
// Parameters:
252-
// - path: The destination path where the asset will be created.
253-
// - account: The Nextcloud account initiating the creation.
254-
// - options: Optional configuration for the request (e.g. headers, queue, API version).
255-
// - taskHandler: Callback invoked when the underlying URLSessionTask is created.
256-
// - completion: Completion handler returning account, resulting file URL, raw response data, and NKError.
249+
/// Creates a new Richdocuments file based on a default asset (no template).
250+
///
251+
/// Parameters:
252+
/// - path: The destination path where the asset will be created.
253+
/// - account: The Nextcloud account initiating the creation.
254+
/// - options: Optional configuration for the request (e.g. headers, queue, API version).
255+
/// - taskHandler: Callback invoked when the underlying URLSessionTask is created.
256+
/// - completion: Completion handler returning account, resulting file URL, raw response data, and NKError.
257257
func createAssetRichdocuments(path: String,
258258
account: String,
259259
options: NKRequestOptions = NKRequestOptions(),

0 commit comments

Comments
 (0)