2018-01-04 19:52:25 +01:00
|
|
|
package jp.juggler.subwaytooter.api.entity
|
|
|
|
|
2018-08-20 19:37:42 +02:00
|
|
|
import jp.juggler.subwaytooter.api.TootParser
|
2020-01-07 09:03:32 +01:00
|
|
|
import jp.juggler.util.JsonObject
|
2018-01-04 19:52:25 +01:00
|
|
|
|
2020-01-07 09:03:32 +01:00
|
|
|
class TootApplication(parser : TootParser, src : JsonObject) {
|
|
|
|
|
2018-08-20 19:37:42 +02:00
|
|
|
val name : String?
|
2018-01-21 13:46:36 +01:00
|
|
|
|
2020-01-07 09:03:32 +01:00
|
|
|
@Suppress("unused")
|
|
|
|
private val website : String?
|
|
|
|
|
|
|
|
// val description : String?
|
|
|
|
|
|
|
|
init {
|
|
|
|
if(parser.serviceType == ServiceType.MISSKEY) {
|
2020-01-08 04:23:45 +01:00
|
|
|
name = src.string("name")
|
2018-08-20 19:37:42 +02:00
|
|
|
website = null
|
2020-01-08 04:23:45 +01:00
|
|
|
// description = src.string("description")
|
2020-01-07 09:03:32 +01:00
|
|
|
} else {
|
2020-01-08 04:23:45 +01:00
|
|
|
name = src.string("name")
|
|
|
|
website = src.string("website")
|
2020-01-07 09:03:32 +01:00
|
|
|
// description = website
|
2018-08-20 19:37:42 +02:00
|
|
|
}
|
|
|
|
}
|
2018-01-04 19:52:25 +01:00
|
|
|
}
|