Доработка новых запросов для АПИ #12

Merged
nm17 merged 4 commits from request-entities into master 2023-06-22 21:45:03 +03:00
55 changed files with 501 additions and 0 deletions
Showing only changes of commit e5e6e5dfb5 - Show all commits

View file

@ -0,0 +1,16 @@
package ru.nm17.narodmon.appNarodMonApiClient.entities
data class Sensor(
val changed: Int,
val fav: Int,
val id: Int,
val mac: String,
val name: String,
val pub: Int,
val time: Int,
val trend: Int,
val type: Int,
val unit: String,
val value: Double
)

View file

@ -0,0 +1,8 @@
package ru.nm17.narodmon.appNarodMonApiClient.entities.addLike
data class AddLikeRequestEntity(
val api_key: String,
val cmd: String,
val id: Int,
val uuid: String
)

View file

@ -0,0 +1,7 @@
package ru.nm17.narodmon.appNarodMonApiClient.entities.addLike
data class AddLikeResponseEntity(
val id: Int,
val liked: Int,
val time: Int
)

View file

@ -0,0 +1,11 @@
package ru.nm17.narodmon.appNarodMonApiClient.entities.appInit
data class AppInitRequestEntity(
val api_key: String,
val cmd: String,
val lang: String,
val platform: String,
val utc: Int,
val uuid: String,
val version: String
)

View file

@ -0,0 +1,14 @@
package ru.nm17.narodmon.appNarodMonApiClient.entities.appInit
data class AppInitResponseEntity(
val addr: String,
val favorites: List<Any>,
val lat: Double,
val latest: String,
val login: String,
val lon: Double,
val timestamp: Int,
val types: List<AppInitTypeEntity>,
val url: String,
val vip: Int
)

View file

@ -0,0 +1,7 @@
package ru.nm17.narodmon.appNarodMonApiClient.entities.appInit
data class AppInitTypeEntity(
val name: String,
val type: Int,
val unit: String
)

View file

@ -0,0 +1,12 @@
package ru.nm17.narodmon.appNarodMonApiClient.entities.bugReport
data class BugReportRequestEntity(
val api_key: String,
val cmd: String,
val email: String,
val logs: String,
val mess: String,
val name: String,
val time: Int,
val uuid: String
)

View file

@ -0,0 +1,8 @@
package ru.nm17.narodmon.appNarodMonApiClient.entities.disLike
data class DisLikeRequestEntity(
val api_key: String,
val cmd: String,
val id: Int,
val uuid: String
)

View file

@ -0,0 +1,7 @@
package ru.nm17.narodmon.appNarodMonApiClient.entities.disLike
data class DisLikeResponseEntity(
val id: Int,
val liked: Int,
val time: Int
)

View file

@ -0,0 +1,12 @@
package ru.nm17.narodmon.appNarodMonApiClient.entities.mapBounds
data class MapBoundsDeviceEntity(
val id: Int,
val lat: Double,
val lon: Double,
val name: String,
val time: Int,
val type: Int,
val unit: String,
val value: Double
)

View file

@ -0,0 +1,10 @@
package ru.nm17.narodmon.appNarodMonApiClient.entities.mapBounds
data class MapBoundsRequestEntity(
val api_key: String,
val bounds: List<Int>,
val cmd: String,
val lang: String,
val limit: Int,
val uuid: String
)

View file

@ -0,0 +1,6 @@
package ru.nm17.narodmon.appNarodMonApiClient.entities.mapBounds
data class MapBoundsResponseEntity(
val devices: List<MapBoundsDeviceEntity>,
val webcams: List<MapBoundsWebcamEntity>
)

View file

@ -0,0 +1,10 @@
package ru.nm17.narodmon.appNarodMonApiClient.entities.mapBounds
data class MapBoundsWebcamEntity(
val id: Int,
val image: String,
val lat: Double,
val lon: Double,
val name: String,
val time: Int
)

View file

@ -0,0 +1,9 @@
package ru.nm17.narodmon.appNarodMonApiClient.entities.nameSensor
data class NameSensorRequestEntity(
val api_key: String,
val cmd: String,
val id: Int,
val name: String,
val uuid: String
)

View file

@ -0,0 +1,8 @@
package ru.nm17.narodmon.appNarodMonApiClient.entities.pubSensor
data class PubSensorRequestEntity(
val api_key: String,
val cmd: String,
val id: Int,
val uuid: String
)

View file

@ -0,0 +1,6 @@
package ru.nm17.narodmon.appNarodMonApiClient.entities.pubSensor
data class PubSensorResponseEntity(
val code: Int,
val id: Int
)

View file

@ -0,0 +1,9 @@
package ru.nm17.narodmon.appNarodMonApiClient.entities.sendCommand
data class SendCommandRequestEntity(
val api_key: String,
val cmd: String,
val command: String,
val id: Int,
val uuid: String
)

View file

@ -0,0 +1,13 @@
package ru.nm17.narodmon.appNarodMonApiClient.entities.sendComplaint
data class SendComplaintRequestEntity(
val api_key: String,
val cmd: String,
val email: String,
val id: Int,
val name: String,
val problem: String,
val time: Int,
val uuid: String,
val value: Int
)

View file

@ -0,0 +1,12 @@
package ru.nm17.narodmon.appNarodMonApiClient.entities.sendMessage
data class SendMessageRequestEntity(
val api_key: String,
val cmd: String,
val email: String,
val mess: String,
val name: String,
val subj: String,
val uid: Int,
val uuid: String
)

View file

@ -0,0 +1,7 @@
package ru.nm17.narodmon.appNarodMonApiClient.entities.sensorsHistory
data class HistoryDataEntity(
val id: Int,
val time: Int,
val value: Double
)

View file

@ -0,0 +1,8 @@
package ru.nm17.narodmon.appNarodMonApiClient.entities.sensorsHistory
data class HistorySensorEntity(
val id: Int,
val name: String,
val type: Int,
val unit: String
)

View file

@ -0,0 +1,10 @@
package ru.nm17.narodmon.appNarodMonApiClient.entities.sensorsHistory
data class SensorsHistoryRequestEntity(
val api_key: String,
val cmd: String,
val id: Int,
val offset: Int,
val period: String,
val uuid: String
)

View file

@ -0,0 +1,6 @@
package ru.nm17.narodmon.appNarodMonApiClient.entities.sensorsHistory
data class SensorsHistoryResponseEntity(
val `data`: List<HistoryDataEntity>,
val sensors: List<HistorySensorEntity>
)

View file

@ -0,0 +1,18 @@
package ru.nm17.narodmon.appNarodMonApiClient.entities.sensorsNearby
import ru.nm17.narodmon.ui.entities.SensorEntity
data class NearbyDeviceEntity(
val cmd: Int,
val distance: Double,
val id: Int,
val lat: Double,
val location: String,
val lon: Double,
val mac: String,
val my: Int,
val name: String,
val owner: String,
val sensors: List<SensorEntity>,
val time: Int
)

View file

@ -0,0 +1,12 @@
package ru.nm17.narodmon.appNarodMonApiClient.entities.sensorsNearby
data class SensorsNearbyRequestEntity(
val api_key: String,
val cmd: String,
val lang: String,
val lat: Double,
val lon: Double,
val radius: Int,
val types: List<Int>,
val uuid: String
)

View file

@ -0,0 +1,5 @@
package ru.nm17.narodmon.appNarodMonApiClient.entities.sensorsNearby
data class SensorsNearbyResponseEntity(
val devices: List<NearbyDeviceEntity>
)

View file

@ -0,0 +1,19 @@
package ru.nm17.narodmon.appNarodMonApiClient.entities.sensorsOnDevice
import ru.nm17.narodmon.ui.entities.SensorEntity
data class SensorOnDeviceEntity(
val cmd: Int,
val distance: Double,
val id: Int,
val info: String,
val location: String,
val mac: String,
val my: Int,
val name: String,
val owner: String,
val photo: String,
val sensors: List<SensorEntity>,
val site: String,
val time: Int
)

View file

@ -0,0 +1,9 @@
package ru.nm17.narodmon.appNarodMonApiClient.entities.sensorsOnDevice
data class SensorsOnDeviceRequestEntity(
val api_key: String,
val cmd: String,
val devices: List<Int>,
val lang: String,
val uuid: String
)

View file

@ -0,0 +1,5 @@
package ru.nm17.narodmon.appNarodMonApiClient.entities.sensorsOnDevice
data class SensorsOnDeviceResponseEntity(
val devices: List<SensorOnDeviceEntity>
)

View file

@ -0,0 +1,10 @@
package ru.nm17.narodmon.appNarodMonApiClient.entities.sensorsValues
data class SensorValueEntity(
val changed: Int,
val id: Int,
val time: Int,
val trend: Int,
val type: Int,
val value: Int
)

View file

@ -0,0 +1,8 @@
package ru.nm17.narodmon.appNarodMonApiClient.entities.sensorsValues
data class SensorsValuesRequestEntity(
val api_key: String,
val cmd: String,
val sensors: List<Int>,
val uuid: String
)

View file

@ -0,0 +1,5 @@
package ru.nm17.narodmon.appNarodMonApiClient.entities.sensorsValues
data class SensorsValuesResponseEntity(
val sensors: List<SensorValueEntity>
)

View file

@ -0,0 +1,9 @@
package ru.nm17.narodmon.appNarodMonApiClient.entities.userFavorites
data class FavoriteSensorEntity(
val id: Int,
val name: String,
val time: Int,
val type: Int,
val value: Double
)

View file

@ -0,0 +1,8 @@
package ru.nm17.narodmon.appNarodMonApiClient.entities.userFavorites
data class FavoriteWebcamEntity(
val id: Int,
val image: String,
val name: String,
val time: Int
)

View file

@ -0,0 +1,10 @@
package ru.nm17.narodmon.appNarodMonApiClient.entities.userFavorites
data class UserFavoritesRequestEntity(
val api_key: String,
val cmd: String,
val lang: String,
val sensors: List<Int>,
val uuid: String,
val webcams: List<Int>
)

View file

@ -0,0 +1,6 @@
package ru.nm17.narodmon.appNarodMonApiClient.entities.userFavorites
data class UserFavoritesResponseEntity(
val sensors: List<FavoriteSensorEntity>,
val webcams: List<FavoriteWebcamEntity>
)

View file

@ -0,0 +1,6 @@
package ru.nm17.narodmon.appNarodMonApiClient.entities.userLocation
data class CellEntity(
val bssid: String,
val rssi: Int
)

View file

@ -0,0 +1,9 @@
package ru.nm17.narodmon.appNarodMonApiClient.entities.userLocation
data class UserLocationByAddrRequestEntity(
val addr: String,
val api_key: String,
val cmd: String,
val lang: String,
val uuid: String
)

View file

@ -0,0 +1,9 @@
package ru.nm17.narodmon.appNarodMonApiClient.entities.userLocation
data class UserLocationByCellRequestEntity(
val api_key: String,
val cells: List<CellEntity>,
val cmd: String,
val lang: String,
val uuid: String
)

View file

@ -0,0 +1,10 @@
package ru.nm17.narodmon.appNarodMonApiClient.entities.userLocation
data class UserLocationByCoordRequestEntity(
val api_key: String,
val cmd: String,
val lang: String,
val lat: Double,
val lon: Double,
val uuid: String
)

View file

@ -0,0 +1,9 @@
package ru.nm17.narodmon.appNarodMonApiClient.entities.userLocation
data class UserLocationByWifiRequestEntity(
val api_key: String,
val cmd: String,
val lang: String,
val uuid: String,
val wifi: List<WifiEntity>
)

View file

@ -0,0 +1,7 @@
package ru.nm17.narodmon.appNarodMonApiClient.entities.userLocation
data class UserLocationResponseEntity(
val addr: String,
val lat: Double,
val lon: Double
)

View file

@ -0,0 +1,6 @@
package ru.nm17.narodmon.appNarodMonApiClient.entities.userLocation
data class WifiEntity(
val bssid: String,
val rssi: Int
)

View file

@ -0,0 +1,10 @@
package ru.nm17.narodmon.appNarodMonApiClient.entities.userLogon
data class UserLogonRequestEntity(
val api_key: String,
val cmd: String,
val hash: String,
val lang: String,
val login: String,
val uuid: String
)

View file

@ -0,0 +1,8 @@
package ru.nm17.narodmon.appNarodMonApiClient.entities.userLogon
data class UserLogonResponseEntity(
val login: String,
val tz: Int,
val uid: Int,
val vip: Int
)

View file

@ -0,0 +1,7 @@
package ru.nm17.narodmon.appNarodMonApiClient.entities.userLogout
data class UserLogoutRequestEntity(
val api_key: String,
val cmd: String,
val uuid: String
)

View file

@ -0,0 +1,6 @@
package ru.nm17.narodmon.appNarodMonApiClient.entities.userLogout
data class UserLogoutResponseEntity(
val login: String,
val uid: Int
)

View file

@ -0,0 +1,14 @@
package ru.nm17.narodmon.appNarodMonApiClient.entities.weatherReport
data class WeatherReportRequestEntity(
val api_key: String,
val cmd: String,
val humid: String,
val lang: String,
val lat: Double,
val lon: Double,
val press: String,
val temp: String,
val uuid: String,
val wind: String
)

View file

@ -0,0 +1,5 @@
package ru.nm17.narodmon.appNarodMonApiClient.entities.weatherReport
data class WeatherReportResponseEntity(
val result: String
)

View file

@ -0,0 +1,6 @@
package ru.nm17.narodmon.appNarodMonApiClient.entities.webcamImages
data class WebcamImageEntity(
val image: String,
val time: Int
)

View file

@ -0,0 +1,9 @@
package ru.nm17.narodmon.appNarodMonApiClient.entities.webcamImages
data class WebcamImagesRequestEntity(
val api_key: String,
val cmd: String,
val id: Int,
val limit: Int,
val uuid: String
)

View file

@ -0,0 +1,9 @@
package ru.nm17.narodmon.appNarodMonApiClient.entities.webcamImages
data class WebcamImagesResponseEntity(
val distance: Double,
val id: Int,
val images: List<WebcamImageEntity>,
val location: String,
val name: String
)

View file

@ -0,0 +1,15 @@
package ru.nm17.narodmon.appNarodMonApiClient.entities.webcamsNearby
data class WebcamNearbyEntity(
val distance: Double,
val fav: Int,
val id: Int,
val image: String,
val lat: Double,
val location: String,
val lon: Double,
val my: Int,
val name: String,
val owner: String,
val time: Int
)

View file

@ -0,0 +1,11 @@
package ru.nm17.narodmon.appNarodMonApiClient.entities.webcamsNearby
data class WebcamsNearbyRequestEntity(
val api_key: String,
val cmd: String,
val lang: String,
val lat: Double,
val lon: Double,
val radius: Int,
val uuid: String
)

View file

@ -0,0 +1,5 @@
package ru.nm17.narodmon.appNarodMonApiClient.entities.webcamsNearby
data class WebcamsResponseEntity(
val webcams: List<WebcamNearbyEntity>
)