Skip to content

Commit

Permalink
adding additional properties to FeedItem
Browse files Browse the repository at this point in the history
  • Loading branch information
matgar26 committed Feb 27, 2024
1 parent 78946db commit 0ce3c12
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 2 deletions.
2 changes: 1 addition & 1 deletion sdk/src/main/java/app/knock/client/KnockAPI.kt
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ class KnockAPI(
private val apiBasePath: String
get() = "$hostname/v1"
private val clientVersion: String
get() = "0.1.4"
get() = "0.1.5"

init {
if(hostname != null) {
Expand Down
14 changes: 13 additions & 1 deletion sdk/src/main/java/app/knock/client/KnockFeed.kt
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,13 @@ data class Block(
@JsonIgnoreProperties(ignoreUnknown = true)
data class FeedItem(
@JsonProperty("__cursor") var feedCursor: String,
var clickedAt: ZonedDateTime?,
var activities: List<KnockActivity>?,
var actors: List<KnockUser>,
var blocks: List<Block>,
var data: Map<String, Any> = hashMapOf(),
var id: String,
var insertedAt: ZonedDateTime?,
var clickedAt: ZonedDateTime?,
var interactedAt: ZonedDateTime?,
var linkClickedAt: ZonedDateTime?,
var readAt: ZonedDateTime?,
Expand All @@ -33,6 +35,16 @@ data class FeedItem(
var updatedAt: ZonedDateTime?,
)

@JsonIgnoreProperties(ignoreUnknown = true)
data class KnockActivity(
var id: String,
var actor: KnockUser?,
var recipient: KnockUser?,
var data: Map<String, Any> = hashMapOf(),
var insertedAt: ZonedDateTime?,
var updatedAt: ZonedDateTime?
)

@JsonIgnoreProperties(ignoreUnknown = true)
data class PageInfo(
var before: String? = null,
Expand Down

0 comments on commit 0ce3c12

Please sign in to comment.