Skip to content

Commit 5a046aa

Browse files
committed
[ADDED] Warning note about API being not available
1 parent 5fa7ba8 commit 5a046aa

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

app/src/main/java/ink/trmnl/android/data/TrmnlDisplayRepository.kt

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,12 +90,19 @@ class TrmnlDisplayRepository
9090
* Fetches the current display data from the server using the provided access token.
9191
* If the app is in debug mode, it uses mock data instead.
9292
*
93+
* ⚠️ NOTE: This API is not available on BYOS servers.
94+
* See https://discord.com/channels/1281055965508141100/1331360842809348106/1382863253880963124
95+
*
9396
* @param trmnlDeviceConfig Device configuration containing the access token and other settings.
9497
* @return A [TrmnlDisplayInfo] object containing the current display data.
9598
*/
9699
suspend fun getCurrentDisplayData(trmnlDeviceConfig: TrmnlDeviceConfig): TrmnlDisplayInfo {
97100
Timber.i("Fetching current display data from server for device: ${trmnlDeviceConfig.type}")
98101

102+
if (trmnlDeviceConfig.type == TrmnlDeviceType.BYOS) {
103+
Timber.w("Current display image data API is not available for BYOS service.")
104+
}
105+
99106
if (repositoryConfigProvider.shouldUseFakeData) {
100107
// Avoid using real API in debug mode
101108
return fakeTrmnlDisplayInfo(apiUsed = "current-image")

0 commit comments

Comments
 (0)