coverBytesForEdition
abstract fun coverBytesForEdition(edition: Edition, targetSize: IntSize, completion: (ByteArray?, CoverError?) -> Unit): Cancelable
This method provides a ByteArray value with the image file data for the cover of an edition. The cover is provided through the the completion callback. targetSize is used for URL creation if the image is not locally available, but this method makes no guarantees about the size of the image represented by the returned data.
The method returns a Cancelable that can be used to cancel the operation. If the operation is canceled, completion will be called with CoverError.CANCELED
The SDK keeps a cache, so it is safe to call this method in offline mode, if network fails or can't be accessed the SDK will use any cached image available, even if it needs to upscale to satisfy the boundingBoxSize
.