Last active
March 27, 2019 14:31
-
-
Save sdoward/77555de85d9b1529fec2a426dd857628 to your computer and use it in GitHub Desktop.
HomeCard Api Response
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sealed class HomeCard { | |
data class Campaign(val campaignId: String, | |
val imageUrl: String, | |
val videoUrl: String?, | |
val mapUrl: String, | |
val title: String, | |
val progress: Int, | |
val footer: Footer) : HomeCard() | |
data class TheTable(val imageUrl: String, | |
val videoUrl: String?, | |
val title: String, | |
val subTitle: String, | |
val footer: Footer) : HomeCard() | |
data class Impact(val numberOfMeals: Long, | |
val numberOfUsers: Long) : HomeCard() | |
} | |
sealed class Footer { | |
data class Simple(val icon: String, | |
val text: String) : Footer() | |
data class Friends(val friends: List<String>) : Footer() | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"homeCards": [ | |
{ | |
"type": "impact", | |
"numberOfMeals": "38,000,000", | |
"numberOfUsers": "26,000" | |
}, | |
{ | |
"type": "campaign", | |
"id": "syria", | |
"imageUrl": "www.sharethemeal/com/syria.jpg", | |
"videoUrl": "www.sharethemeal/com/syria.mp4", | |
"mapUrl": "www.sharethemeal/com/map.jpg", | |
"title": "Syria", | |
"progress": "15", | |
"footer": { | |
"type": "simple", | |
"icon": "www.sharethemeal/com/comeicon.jpg", | |
"text": "help children now" | |
} | |
}, | |
{ | |
"type": "theTable", | |
"videoUrl": "www.sharethemeal/com/syria.mp4", | |
"imageUrl": "www.sharethemeal.com/syria.jpg", | |
"title": "Subscribe for monthly etc", | |
"subTitle": "monthly giving", | |
"footer": { | |
"type": "friends", | |
"friends": ["Alex","Arun","Matthias"] | |
} | |
} | |
] | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Some additional comments:
// general
// overview homecard
// campaign homecards