mirror of
https://github.com/usetrmnl/trmnl-android.git
synced 2026-04-29 13:35:26 -07:00
Merge pull request #28 from usetrmnl/cleanup
[CLEANUP] Log api that is not used in the app
This commit is contained in:
@@ -104,17 +104,6 @@ class TrmnlDisplayRepository
|
||||
return displayInfo
|
||||
}
|
||||
|
||||
/**
|
||||
* Check the server status by making a request to the log endpoint.
|
||||
*/
|
||||
suspend fun checkServerStatus(): Boolean {
|
||||
val response = apiService.getLog("RANDOM-ID", "RANDOM-TOKEN").successOrNull()
|
||||
Timber.d("Device log status response: $response")
|
||||
|
||||
// If we got 200 OK, we assume the server is up
|
||||
return response != null
|
||||
}
|
||||
|
||||
/**
|
||||
* Generates fake display info for debugging purposes without wasting an API request.
|
||||
*
|
||||
|
||||
@@ -3,7 +3,6 @@ package ink.trmnl.android.network
|
||||
import com.slack.eithernet.ApiResult
|
||||
import ink.trmnl.android.network.model.TrmnlCurrentImageResponse
|
||||
import ink.trmnl.android.network.model.TrmnlDisplayResponse
|
||||
import ink.trmnl.android.network.model.TrmnlLogResponse
|
||||
import retrofit2.http.GET
|
||||
import retrofit2.http.Header
|
||||
|
||||
@@ -39,10 +38,4 @@ interface TrmnlApiService {
|
||||
suspend fun getCurrentDisplayData(
|
||||
@Header("access-token") accessToken: String,
|
||||
): ApiResult<TrmnlCurrentImageResponse, Unit>
|
||||
|
||||
@GET("api/log")
|
||||
suspend fun getLog(
|
||||
@Header("ID") id: String,
|
||||
@Header("Access-Token") accessToken: String,
|
||||
): ApiResult<TrmnlLogResponse, Unit>
|
||||
}
|
||||
|
||||
@@ -1,11 +0,0 @@
|
||||
package ink.trmnl.android.network.model
|
||||
|
||||
import com.squareup.moshi.Json
|
||||
import com.squareup.moshi.JsonClass
|
||||
|
||||
@JsonClass(generateAdapter = true)
|
||||
data class TrmnlLogResponse(
|
||||
@Json(name = "status") val status: Int,
|
||||
@Json(name = "error") val error: String? = null,
|
||||
// Add other fields if available in the actual response
|
||||
)
|
||||
Reference in New Issue
Block a user