Get the watch face list v3
Function table: use this API when getNewWatchList == true; otherwise use Get the watch face list v2.
Optional request state (query bitmask) is valid only when firmware enables supportWatchFileListUseVersion.
Example
Swift
// Default (backward compatible)
Cmds.getWatchListV3().send { rs in
if case .success(let obj) = rs {
// obj is IDOWatchListModel
}
}
// Enum combination: installed watch faces only
Cmds.getWatchListV3(queryTypes: [.installed]).send { rs in
// ...
}
// Enum combination: downloading + installing + installed
Cmds.getWatchListV3(queryTypes: [.downloading, .installing, .installed]).send { rs in
// ...
}
// Parse single item state (state may be nil)
if let raw = item.state, let itemState = IDOWatchItemState(rawValue: raw) {
switch itemState {
case .downloading: break
case .installing: break
case .installed: break
default: break
}
}
Kotlin
// Default (backward compatible)
Cmds.getWatchListV3().send {
if (it.error.code == 0) {
// it.res is IDOWatchListModel
}
}
// Enum combination: installed watch faces only
Cmds.getWatchListV3(IDOWatchListQueryType.INSTALLED).send { /* ... */ }
// Enum combination: all three scopes
Cmds.getWatchListV3(
IDOWatchListQueryType.DOWNLOADING,
IDOWatchListQueryType.INSTALLING,
IDOWatchListQueryType.INSTALLED,
).send { /* ... */ }
// Parse single item state (state may be null)
when (item.state?.let { IDOWatchItemState.from(it) }) {
IDOWatchItemState.DOWNLOADING -> { }
IDOWatchItemState.INSTALLING -> { }
IDOWatchItemState.INSTALLED -> { }
else -> { }
}