mirror of
https://github.com/Shabinder/SpotiFlyer.git
synced 2024-12-22 20:57:54 +01:00
Serializers Support
This commit is contained in:
parent
6f5ce7fbe3
commit
934ed040af
@ -1,12 +1,15 @@
|
||||
package models.github
|
||||
|
||||
import kotlinx.serialization.Serializable
|
||||
|
||||
@Serializable
|
||||
data class Asset(
|
||||
val browser_download_url: String,
|
||||
val content_type: String,
|
||||
val created_at: String,
|
||||
val download_count: Int,
|
||||
val id: Int,
|
||||
val label: Any,
|
||||
// val label: Any,
|
||||
val name: String,
|
||||
val node_id: String,
|
||||
val size: Int,
|
||||
|
@ -1,5 +1,8 @@
|
||||
package models.github
|
||||
|
||||
import kotlinx.serialization.Serializable
|
||||
|
||||
@Serializable
|
||||
data class Author(
|
||||
val avatar_url: String,
|
||||
val events_url: String,
|
||||
|
@ -1,5 +1,8 @@
|
||||
package models.github
|
||||
|
||||
import kotlinx.serialization.Serializable
|
||||
|
||||
@Serializable
|
||||
data class GithubFileContent(
|
||||
val decryptedContent: String,
|
||||
val sha: String
|
||||
|
@ -1,5 +1,8 @@
|
||||
package models.github
|
||||
|
||||
import kotlinx.serialization.Serializable
|
||||
|
||||
@Serializable
|
||||
data class GithubReleaseInfoItem(
|
||||
val assets: List<Asset>,
|
||||
val assets_url: String,
|
||||
@ -13,7 +16,7 @@ data class GithubReleaseInfoItem(
|
||||
val node_id: String,
|
||||
val prerelease: Boolean,
|
||||
val published_at: String,
|
||||
val reactions: Reactions,
|
||||
val reactions: Reactions? = null,
|
||||
val tag_name: String,
|
||||
val tarball_url: String,
|
||||
val target_commitish: String,
|
||||
|
@ -1,3 +1,3 @@
|
||||
package models.github
|
||||
|
||||
class GithubReleasesInfo : ArrayList<GithubReleaseInfoItem>()
|
||||
typealias GithubReleasesInfo = ArrayList<GithubReleaseInfoItem>
|
@ -1,7 +1,9 @@
|
||||
package models.github
|
||||
|
||||
import kotlinx.serialization.json.JsonNames
|
||||
import kotlinx.serialization.Serializable
|
||||
|
||||
@Serializable
|
||||
data class Reactions(
|
||||
@JsonNames("+1") val upVotes: Int = 0,
|
||||
@JsonNames("-1") val downVotes: Int = 0,
|
||||
|
@ -1,5 +1,8 @@
|
||||
package models.github
|
||||
|
||||
import kotlinx.serialization.Serializable
|
||||
|
||||
@Serializable
|
||||
data class Uploader(
|
||||
val avatar_url: String,
|
||||
val events_url: String,
|
||||
|
Loading…
Reference in New Issue
Block a user