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