mirror of
https://github.com/nextcloud/talk-android.git
synced 2024-11-28 09:38:14 +03:00
add API poll details
Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
This commit is contained in:
parent
e605546925
commit
01f18d7eca
2 changed files with 34 additions and 1 deletions
|
@ -59,7 +59,14 @@ data class Poll(
|
||||||
|
|
||||||
@JsonField(name = ["votedSelf"])
|
@JsonField(name = ["votedSelf"])
|
||||||
var votedSelf: ArrayList<Int>? = null,
|
var votedSelf: ArrayList<Int>? = null,
|
||||||
) : Parcelable {
|
|
||||||
|
@JsonField(name = ["numVoters"])
|
||||||
|
var numVoters: Int = 0,
|
||||||
|
|
||||||
|
@JsonField(name = ["details"])
|
||||||
|
var details: ArrayList<PollDetails>? = null,
|
||||||
|
|
||||||
|
) : Parcelable {
|
||||||
// This constructor is added to work with the 'com.bluelinelabs.logansquare.annotation.JsonObject'
|
// This constructor is added to work with the 'com.bluelinelabs.logansquare.annotation.JsonObject'
|
||||||
constructor() : this(0, null, null, null, null, null, null, 0, 0, 0, null)
|
constructor() : this(0, null, null, null, null, null, null, 0, 0, 0, null)
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1,26 @@
|
||||||
|
package com.nextcloud.talk.polls.repositories.model
|
||||||
|
|
||||||
|
import android.os.Parcelable
|
||||||
|
import com.bluelinelabs.logansquare.annotation.JsonField
|
||||||
|
import com.bluelinelabs.logansquare.annotation.JsonObject
|
||||||
|
import kotlinx.android.parcel.Parcelize
|
||||||
|
|
||||||
|
@Parcelize
|
||||||
|
@JsonObject
|
||||||
|
data class PollDetails(
|
||||||
|
@JsonField(name = ["actorType"])
|
||||||
|
var actorType: String? = null,
|
||||||
|
|
||||||
|
@JsonField(name = ["actorId"])
|
||||||
|
var actorId: String? = null,
|
||||||
|
|
||||||
|
@JsonField(name = ["actorDisplayName"])
|
||||||
|
var actorDisplayName: String? = null,
|
||||||
|
|
||||||
|
@JsonField(name = ["optionId"])
|
||||||
|
var optionId: Int? = 0,
|
||||||
|
|
||||||
|
) : Parcelable {
|
||||||
|
// This constructor is added to work with the 'com.bluelinelabs.logansquare.annotation.JsonObject'
|
||||||
|
constructor() : this(null, null, null, 0)
|
||||||
|
}
|
Loading…
Reference in a new issue