DeviceModelRemoteDataSource

class DeviceModelRemoteDataSource(client: HttpClient, dispatchers: CoroutineDispatchers)(source)

Fetches the flasher's GLB device models; the URL is the illustration's with the extension swapped.

Constructors

Link copied to clipboard
constructor(client: HttpClient, dispatchers: CoroutineDispatchers)

Types

Link copied to clipboard
object Companion

Functions

Link copied to clipboard
suspend fun exists(imageFile: String): Boolean?

True when the model is served, false when the flasher answered without one, null when it could not be asked. The flasher is a single-page app that answers a missing path with 200 and its HTML shell, so only the GLB content type counts.

Link copied to clipboard
suspend fun fetch(imageFile: String): ByteArray?

The model bytes, or null when absent or the fetch failed.