Skip to content

Commit

Permalink
Clean ups
Browse files Browse the repository at this point in the history
  • Loading branch information
navybk committed Jul 24, 2018
1 parent a96207e commit bfbd066
Show file tree
Hide file tree
Showing 9 changed files with 11 additions and 12 deletions.
2 changes: 1 addition & 1 deletion src/main/java/io/rudolph/netatmo/NetatmoApi.kt
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@ package io.rudolph.netatmo

import com.jakewharton.retrofit2.adapter.kotlin.coroutines.experimental.CoroutineCallAdapterFactory
import io.rudolph.netatmo.api.aircare.AirCareConnector
import io.rudolph.netatmo.api.common.transform.JacksonTransform
import io.rudolph.netatmo.api.energy.EnergyConnector
import io.rudolph.netatmo.api.weather.WeatherConnector
import io.rudolph.netatmo.oauth2.TokenStorage
import io.rudolph.netatmo.oauth2.model.Scope
import io.rudolph.netatmo.oauth2.networkinterceptor.AuthInterceptor
import io.rudolph.netatmo.oauth2.networkinterceptor.TimeoutInterceptor
import io.rudolph.netatmo.api.common.transform.JacksonTransform
import okhttp3.OkHttpClient
import okhttp3.logging.HttpLoggingInterceptor
import retrofit2.Retrofit
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import io.rudolph.netatmo.api.energy.model.TypedBaseResult
import io.rudolph.netatmo.executable.Executable
import retrofit2.Retrofit

class AirCareConnector(api: Retrofit): CommonConnector(api) {
class AirCareConnector(api: Retrofit) : CommonConnector(api) {

private val airCareService = api.create(AirCareService::class.java)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,5 @@ data class MeasureRequestResponse(
val stepTime: LocalDateTime,

@JsonProperty("value")
val value: MutableList<MutableList<Float>>?= mutableListOf<MutableList<Float>>()
val value: MutableList<MutableList<Float>>? = mutableListOf<MutableList<Float>>()
)
Original file line number Diff line number Diff line change
Expand Up @@ -22,5 +22,5 @@ interface CommonService {
@Query("limit") limit: Int? = null,
@Query("optimize") optimize: Boolean? = null,
@Query("real_time") realTime: String? = null
): Call<TypedBaseResult<List<MeasureRequestResponse>>>
): Call<TypedBaseResult<List<MeasureRequestResponse>>>
}
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,16 @@ import com.fasterxml.jackson.databind.DeserializationFeature
import com.fasterxml.jackson.databind.ObjectMapper
import com.fasterxml.jackson.databind.module.SimpleModule
import com.fasterxml.jackson.module.kotlin.registerKotlinModule
import io.rudolph.netatmo.api.common.model.DeviceType
import io.rudolph.netatmo.api.common.model.Scale
import io.rudolph.netatmo.api.common.model.ScaleType
import io.rudolph.netatmo.api.energy.model.TemperatureType
import io.rudolph.netatmo.api.energy.model.ThermMode
import io.rudolph.netatmo.api.energy.model.ZoneType
import io.rudolph.netatmo.api.energy.model.transform.TemperaturTypeDeserializer
import io.rudolph.netatmo.api.energy.model.transform.ThermModeDeserializer
import io.rudolph.netatmo.api.energy.model.transform.ZoneTypeDeserializer
import io.rudolph.netatmo.api.energy.model.transform.ZoneTypeSerializer
import io.rudolph.netatmo.api.common.model.DeviceType
import io.rudolph.netatmo.api.common.model.Scale
import io.rudolph.netatmo.api.common.model.ScaleType
import io.rudolph.netatmo.api.weather.model.Measure
import io.rudolph.netatmo.api.weather.model.transform.MeasureDeserializer
import io.rudolph.netatmo.oauth2.model.Scope
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
package io.rudolph.netatmo.api.energy.service

import io.rudolph.netatmo.api.energy.model.*
import io.rudolph.netatmo.api.common.model.DeviceType
import io.rudolph.netatmo.api.common.service.CommonService
import io.rudolph.netatmo.api.energy.model.*
import retrofit2.Call
import retrofit2.http.*

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import io.rudolph.netatmo.api.weather.service.WeatherService
import io.rudolph.netatmo.executable.Executable
import retrofit2.Retrofit

class WeatherConnector(api: Retrofit): CommonConnector(api) {
class WeatherConnector(api: Retrofit) : CommonConnector(api) {
private val weatherService = api.create(WeatherService::class.java)

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@ import com.fasterxml.jackson.core.JsonParser
import com.fasterxml.jackson.databind.DeserializationContext
import com.fasterxml.jackson.databind.JsonDeserializer
import com.fasterxml.jackson.databind.JsonNode
import io.rudolph.netatmo.api.common.transform.JacksonTransform
import io.rudolph.netatmo.api.weather.model.BaseOutdoorMeasure
import io.rudolph.netatmo.api.weather.model.Measure
import io.rudolph.netatmo.api.weather.model.RainGaugeMeasure
import io.rudolph.netatmo.api.weather.model.WindMeasure
import io.rudolph.netatmo.api.common.transform.JacksonTransform


class MeasureDeserializer : JsonDeserializer<Measure>() {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
package io.rudolph.netatmo.oauth2.networkinterceptor

import io.rudolph.netatmo.api.common.transform.JacksonTransform
import io.rudolph.netatmo.oauth2.TokenStorage
import io.rudolph.netatmo.oauth2.errorbuilder
import io.rudolph.netatmo.oauth2.logger
import io.rudolph.netatmo.oauth2.model.AuthResponse
import io.rudolph.netatmo.oauth2.proceed
import io.rudolph.netatmo.api.common.transform.JacksonTransform
import okhttp3.FormBody
import okhttp3.Interceptor
import okhttp3.Request
Expand Down

0 comments on commit bfbd066

Please sign in to comment.