(programId, isRefresh = false, {priority = FOREGROUND_PRIORITY} = {})
| 129 | } |
| 130 | |
| 131 | export async function getProgramDesc(programId, isRefresh = false, {priority = FOREGROUND_PRIORITY} = {}) { |
| 132 | /* |
| 133 | * Get the description of the program from the server or local storage by programId |
| 134 | * @param programId [String]: programId |
| 135 | * @param isRefresh [Boolean]: whether to refresh the data |
| 136 | * @return: description of the program |
| 137 | */ |
| 138 | const descriptions = await getProgramDescs([programId], isRefresh, {priority}); |
| 139 | return descriptions[programId]; |
| 140 | } |
| 141 | |
| 142 | export async function getProgramDescs(programIds, isRefresh = false, {priority = FOREGROUND_PRIORITY} = {}) { |
| 143 | const uniqueProgramIds = [...new Set(programIds)].filter(Boolean); |
no test coverage detected