FeedbackUploader

public class FeedbackUploader

FeedbackUploader can be used to upload Feedback objects to SAP Cloud Platform 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

    feedbacks

    A collection of Feedback objects to be uploaded.

    sapURLSession

    The SAPURLSession instance which will be used to upload the records.

    settingsParameters

    Parameters from which the endpoint is created; the backendURL, applicationID, applicationVersion, and deviceID are used from this parameter.

    anonymous

    Determines whether the server should parse the feedback report anonymously.

    completionHandler

    The 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

    uploadEndPoint

    the desired upload endpoint

    feedbacks

    A collection of Feedback objects to be uploaded.

    sapURLSession

    The SAPURLSession instance which will be used to upload the records.

    settingsParameters

    Parameters from which the endpoint is created; the backendURL, applicationID, applicationVersion, and deviceID are used from this parameter.

    anonymous

    Determines whether the server should parse the feedback report anonymously.

    completionHandler

    The 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

    error

    error that will be logged

  • Collection of possible errors that could occur during the upload.

    See more

    Declaration

    Swift

    public enum FeedbackUploadError : SAPError