@@ -31,7 +31,6 @@ data class GetAreasItem(
3131 val name : String ,
3232 val type : String ,
3333 val urlAlias : String ,
34- val icon : String? ,
3534 val websiteUrl : String ,
3635)
3736
@@ -249,7 +248,9 @@ class Api(private val httpClient: OkHttpClient, private val url: HttpUrl) {
249248 endsAt = if (! it.has(" ends_at" ) || it.get(" ends_at" ).isJsonNull) null else ZonedDateTime .parse(
250249 it.get(" ends_at" ).asString
251250 ),
252- cronSchedule = if (! it.has(" cron_schedule" ) || it.get(" cron_schedule" ).isJsonNull) null else it.get(" cron_schedule" ).asString,
251+ cronSchedule = if (! it.has(" cron_schedule" ) || it.get(" cron_schedule" ).isJsonNull) null else it.get(
252+ " cron_schedule"
253+ ).asString,
253254 )
254255 }
255256 }
@@ -274,8 +275,6 @@ class Api(private val httpClient: OkHttpClient, private val url: HttpUrl) {
274275 name = it.get(" name" ).asString,
275276 type = it.get(" type" ).asString,
276277 urlAlias = it.get(" url_alias" ).asString,
277- icon = if (! it.has(" icon" ) || it.get(" icon" ).isJsonNull) null else it.get(" icon" ).asString
278- .ifBlank { null },
279278 websiteUrl = it.get(" website_url" ).asString,
280279 )
281280 }
@@ -325,10 +324,16 @@ class Api(private val httpClient: OkHttpClient, private val url: HttpUrl) {
325324 name = body.get(" name" ).asString,
326325 type = body.get(" type" ).asString,
327326 urlAlias = body.get(" url_alias" ).asString,
328- icon = if (! body.has(" icon" ) || body.get(" icon" ).isJsonNull) null else body.get(" icon" ).asString.ifBlank { null },
329- iconWide = if (! body.has(" icon_wide" ) || body.get(" icon_wide" ).isJsonNull) null else body.get(" icon_wide" ).asString.ifBlank { null },
327+ icon = if (! body.has(" icon" ) || body.get(" icon" ).isJsonNull) null else body.get(
328+ " icon"
329+ ).asString.ifBlank { null },
330+ iconWide = if (! body.has(" icon_wide" ) || body.get(" icon_wide" ).isJsonNull) null else body.get(
331+ " icon_wide"
332+ ).asString.ifBlank { null },
330333 websiteUrl = body.get(" website_url" ).asString,
331- description = if (! body.has(" description" ) || body.get(" description" ).isJsonNull) null else body.get(" description" ).asString.ifBlank { null },
334+ description = if (! body.has(" description" ) || body.get(" description" ).isJsonNull) null else body.get(
335+ " description"
336+ ).asString.ifBlank { null },
332337 )
333338 }
334339 }
@@ -340,12 +345,20 @@ class Api(private val httpClient: OkHttpClient, private val url: HttpUrl) {
340345 type = it.get(" type" ).asString,
341346 placeId = it.get(" place_id" ).asLong,
342347 placeName = it.get(" place_name" ).asString,
343- osmUserId = if (! it.has(" osm_user_id" ) || it.get(" osm_user_id" ).isJsonNull) null else it.get(" osm_user_id" ).asLong,
344- osmUserName = if (! it.has(" osm_user_name" ) || it.get(" osm_user_name" ).isJsonNull) null else it.get(" osm_user_name" ).asString.ifBlank { null },
345- osmUserTip = if (! it.has(" osm_user_tip" ) || it.get(" osm_user_tip" ).isJsonNull) null else it.get(" osm_user_tip" ).asString.ifBlank { null },
348+ osmUserId = if (! it.has(" osm_user_id" ) || it.get(" osm_user_id" ).isJsonNull) null else it.get(
349+ " osm_user_id"
350+ ).asLong,
351+ osmUserName = if (! it.has(" osm_user_name" ) || it.get(" osm_user_name" ).isJsonNull) null else it.get(
352+ " osm_user_name"
353+ ).asString.ifBlank { null },
354+ osmUserTip = if (! it.has(" osm_user_tip" ) || it.get(" osm_user_tip" ).isJsonNull) null else it.get(
355+ " osm_user_tip"
356+ ).asString.ifBlank { null },
346357 image = if (! it.has(" image" ) || it.get(" image" ).isJsonNull) null else it.get(" image" ).asString.ifBlank { null },
347358 date = it.get(" date" ).asString,
348- durationDays = if (! it.has(" duration_days" ) || it.get(" duration_days" ).isJsonNull) null else it.get(" duration_days" ).asLong,
359+ durationDays = if (! it.has(" duration_days" ) || it.get(" duration_days" ).isJsonNull) null else it.get(
360+ " duration_days"
361+ ).asLong,
349362 comment = if (! it.has(" comment" ) || it.get(" comment" ).isJsonNull) null else it.get(" comment" ).asString.ifBlank { null },
350363 )
351364 }
0 commit comments