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
|
2018-01-04 19:52:25 +01:00
|
|
|
import org.json.JSONObject
|
|
|
|
|
2018-12-01 00:02:18 +01:00
|
|
|
import jp.juggler.util.parseString
|
2018-01-04 19:52:25 +01:00
|
|
|
|
2018-08-20 19:37:42 +02:00
|
|
|
class TootApplication(parser: TootParser, src : JSONObject){
|
|
|
|
val name : String?
|
2018-01-11 10:31:25 +01:00
|
|
|
@Suppress("unused") private val website : String?
|
2018-08-20 19:37:42 +02:00
|
|
|
// val description : String?
|
2018-01-21 13:46:36 +01:00
|
|
|
|
2018-08-20 19:37:42 +02:00
|
|
|
init{
|
|
|
|
if( parser.serviceType==ServiceType.MISSKEY){
|
|
|
|
name = src.parseString("name")
|
|
|
|
website = null
|
|
|
|
// description = src.parseString("description")
|
|
|
|
}else{
|
|
|
|
name = src.parseString("name")
|
|
|
|
website = src.parseString("website")
|
|
|
|
// description = website
|
|
|
|
}
|
|
|
|
}
|
2018-01-04 19:52:25 +01:00
|
|
|
}
|