Emotion Health Reminder (Set / Query)

Function table: supportEmotionHealth

Example

Swift


// Set
let param = IDOEmotionHealthReminderParamModel(...)
Cmds.emotionHealthReminder(param).send { rs in
    if case .success(let obj) = rs {
        // Success
        // obj is IDOEmotionHealthReminderReplyModel
    }else {
        // Failure
    }
}

// Query
Cmds.emotionHealthReminder().send { rs in
    if case .success(let obj) = rs, obj.errorCode == 0 {
        if (obj.errorCode == 0) {
            // Success
            // obj is IDOEmotionHealthReminderReplyModel
        }else {
            // Failure
        }
    }else {
        // Failure
    }
}

Kotlin

// Set
Cmds.emotionHealthReminder().send {
    if (it.error.code == 0) {
        // Success
        // it.res is IDOEmotionHealthReminderReplyModel
    }else {
        // Failure
    }
}

// Query
Cmds.emotionHealthReminder().send {
    if (it.error.code == 0 && it.res?.errorCode == 0) {
        // Success
        // it.res is IDOEmotionHealthReminderReplyModel
    }else {
        // Failure
    }
}
Copyright © 2023-2024 IDO. All rights reserved. all right reserved,powered by Gitbook修改日期: 2026-03-13 12:04:56

results matching ""

    No results matching ""