Skip to content

Commit 7157866

Browse files
committed
Use ULong for expireDate in PasteDetails class
1 parent 76752f2 commit 7157866

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/commonMain/kotlin/net/pearx/kpastebin/model/PasteDetails.kt

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ import net.pearx.kpastebin.internal.XML_PROPERTY_REGEX
66
/**
77
* A detailed Pastebin paste information.
88
*/
9+
@ExperimentalUnsignedTypes
910
public data class PasteDetails(
1011
/** Paste key. */
1112
val key: String,
@@ -16,7 +17,7 @@ public data class PasteDetails(
1617
/** Paste size in bytes. */
1718
val size: Int,
1819
/** Paste expiration date in Unix time format. */
19-
val expireDate: Int,
20+
val expireDate: ULong,
2021
/** Paste privacy status. */
2122
val privacy: Privacy,
2223
/** Paste syntax highlighting language in a user-readable format (e.g., Kotlin or C#). */
@@ -40,7 +41,7 @@ public data class PasteDetails(
4041
map.getValue("date").toInt(),
4142
map.getValue("title"),
4243
map.getValue("size").toInt(),
43-
map.getValue("expire_date").toInt(),
44+
map.getValue("expire_date").toULong(),
4445
Privacy.values()[map.getValue("private").toInt()],
4546
map.getValue("format_long"),
4647
map.getValue("format_short"),

0 commit comments

Comments
 (0)