FeedbackUploader
public class FeedbackUploader
FeedbackUploader can be used to upload Feedback
objects to SAP Mobile Services.
Feedback (comments; context) that includes HTML tags will be modified with character deletions. Output varies by condition.
-
Uploads user feedback in JSON format.
Declaration
Swift
public static func upload(feedbacks: [Feedback], sapURLSession: SAPURLSession, settingsParameters: SAPcpmsSettingsParameters, anonymous: Bool = true, completionHandler: @escaping (Error?) -> Void = FeedbackUploader.defaultCompletionHandler)Parameters
feedbacksA collection of
Feedbackobjects to be uploaded.sapURLSessionThe
SAPURLSessioninstance which will be used to upload the records.settingsParametersParameters from which the endpoint is created; the
backendURL,applicationID,applicationVersion, anddeviceIDare used from this parameter.anonymousDetermines whether the server should parse the feedback report anonymously.
completionHandlerThe function that is called at the end of the upload process.
-
Uploads user feedback in JSON format to the given endpoint.
Declaration
Swift
public static func upload(to uploadEndpoint: URL, feedbacks: [Feedback], sapURLSession: SAPURLSession, settingsParameters: SAPcpmsSettingsParameters, anonymous: Bool = true, completionHandler: @escaping (Error?) -> Void)Parameters
uploadEndPointthe desired upload endpoint
feedbacksA collection of
Feedbackobjects to be uploaded.sapURLSessionThe
SAPURLSessioninstance which will be used to upload the records.settingsParametersParameters from which the endpoint is created; the
backendURL,applicationID,applicationVersion, anddeviceIDare used from this parameter.anonymousDetermines whether the server should parse the feedback report anonymously.
completionHandlerThe function that is called at the end of the upload process.
-
The default completion handler for Feedback uploads. Logs the error with the root logger if there is any.
Declaration
Swift
public static func defaultCompletionHandler(_ error: Error?)Parameters
errorerror that will be logged
-
Collection of possible errors that could occur during the upload.
See moreDeclaration
Swift
public enum FeedbackUploadError : SAPError