Add weather plugin sdk classes

This commit is contained in:
MM20
2023-12-17 18:02:11 +01:00
parent f327906a3e
commit 24c0899035
9 changed files with 585 additions and 9 deletions
@@ -2,4 +2,5 @@ package de.mm20.launcher2.plugin
enum class PluginType {
FileSearch,
Weather,
}
@@ -0,0 +1,6 @@
package de.mm20.launcher2.plugin.config
data class WeatherPluginConfig(
val supportsAutoLocation: Boolean,
val supportsCustomLocation: Boolean,
)
@@ -0,0 +1,47 @@
package de.mm20.launcher2.plugin.contracts
object WeatherPluginContract {
object Paths {
const val Weather = "weather"
const val Locations = "locations"
}
object ForecastParams {
const val Lat = "lat"
const val Lon = "lon"
const val Id = "id"
const val LocationName = "location_name"
}
object ForecastColumns {
const val Timestamp = "timestamp"
const val CreatedAt = "created_at"
const val Temperature = "temperature"
const val TemperatureMin = "temperature_min"
const val TemperatureMax = "temperature_max"
const val Pressure = "pressure"
const val Humidity = "humidity"
const val WindSpeed = "wind_speed"
const val WindDirection = "wind_direction"
const val Precipitation = "precipitation"
const val RainProbability = "rain_probability"
const val Clouds = "clouds"
const val Location = "location"
const val Provider = "provider"
const val ProviderUrl = "provider_url"
const val Night = "night"
const val Icon = "icon"
const val Condition = "condition"
}
object LocationParams {
const val Query = "query"
}
object LocationColumns {
const val Id = "id"
const val Lat = "lat"
const val Lon = "lon"
const val Name = "name"
}
}