feat: Add GraphicDataRepository for fetching NPK sensor data
This commit is contained in:
parent
c994b3c529
commit
b2d0620219
|
|
@ -0,0 +1,17 @@
|
||||||
|
package com.syaroful.agrilinkvocpro.growth_recipe_feature.data.repository
|
||||||
|
|
||||||
|
import com.syaroful.agrilinkvocpro.growth_recipe_feature.data.model.NpkGraphicDayResponse
|
||||||
|
import com.syaroful.agrilinkvocpro.growth_recipe_feature.data.network.GrowthRecipeService
|
||||||
|
import retrofit2.Response
|
||||||
|
|
||||||
|
class GraphicDataRepository(private val apiService: GrowthRecipeService) {
|
||||||
|
suspend fun getNpkDataSensor(
|
||||||
|
authHeader: String,
|
||||||
|
startDate: String,
|
||||||
|
endDate: String,
|
||||||
|
timeRange: String = "DAILY",
|
||||||
|
sensor: String
|
||||||
|
): Response<NpkGraphicDayResponse> {
|
||||||
|
return apiService.getNpkDataSensorDaily(authHeader, startDate, endDate, timeRange, sensor)
|
||||||
|
}
|
||||||
|
}
|
||||||
Loading…
Reference in New Issue
Block a user