@@ -610,45 +610,6 @@ public extension NextcloudKit {
610610 }
611611 // MARK: -
612612
613- func getCapabilities( account: String ,
614- options: NKRequestOptions = NKRequestOptions ( ) ,
615- taskHandler: @escaping ( _ task: URLSessionTask ) -> Void = { _ in } ,
616- completion: @escaping ( _ account: String , _ responseData: AFDataResponse < Data > ? , _ error: NKError ) -> Void ) {
617- let endpoint = " ocs/v1.php/cloud/capabilities "
618- guard let nkSession = nkCommonInstance. getSession ( account: account) ,
619- let url = nkCommonInstance. createStandardUrl ( serverUrl: nkSession. urlBase, endpoint: endpoint, options: options) ,
620- let headers = nkCommonInstance. getStandardHeaders ( account: account, options: options) else {
621- return options. queue. async { completion ( account, nil , . urlError) }
622- }
623-
624- nkSession. sessionData. request ( url, method: . get, encoding: URLEncoding . default, headers: headers, interceptor: NKInterceptor ( nkCommonInstance: nkCommonInstance) ) . validate ( statusCode: 200 ..< 300 ) . onURLSessionTaskCreation { task in
625- task. taskDescription = options. taskDescription
626- taskHandler ( task)
627- } . responseData ( queue: self . nkCommonInstance. backgroundQueue) { response in
628- switch response. result {
629- case . failure( let error) :
630- let error = NKError ( error: error, afResponse: response, responseData: response. data)
631- options. queue. async { completion ( account, response, error) }
632- case . success:
633- options. queue. async { completion ( account, response, . success) }
634- }
635- }
636- }
637-
638- func getCapabilitiesAsync( account: String ,
639- options: NKRequestOptions = NKRequestOptions ( ) ,
640- taskHandler: @escaping ( _ task: URLSessionTask ) -> Void = { _ in } ) async -> ( account: String , responseData: AFDataResponse < Data > ? , error: NKError ) {
641- await withUnsafeContinuation { continuation in
642- getCapabilities ( account: account,
643- options: options,
644- taskHandler: taskHandler) { account, responseData, error in
645- continuation. resume ( returning: ( account, responseData, error) )
646- }
647- }
648- }
649-
650- // MARK: -
651-
652613 func getRemoteWipeStatus( serverUrl: String ,
653614 token: String ,
654615 account: String ,
0 commit comments