fetchResourceData

abstract fun fetchResourceData(resourceUrl: String, onSuccess: (ByteArray) -> Unit, onError: (ColibrioException) -> Unit)

Fetches a resource from the source publication by URL.

If successful, onSuccess is called with the resource data. Otherwise, onError is called.


abstract suspend fun fetchResourceData(resourceUrl: String): ColibrioResult<ByteArray>

Fetches a resource from the source publication by URL.

Return

Either ColibrioResult.Success with the resource data, or ColibrioResult.Error containing the error.