File tree Expand file tree Collapse file tree 5 files changed +61
-3
lines changed
src/commonMain/kotlin/net/pearx/kpastebin/model Expand file tree Collapse file tree 5 files changed +61
-3
lines changed Original file line number Diff line number Diff line change 1
1
package net.pearx.kpastebin.model
2
2
3
- public enum class AccountType
4
- {
3
+ /* *
4
+ * The list of Pastebin account types
5
+ */
6
+ public enum class AccountType {
7
+ /* * Free basic account */
5
8
NORMAL ,
9
+
10
+ /* * Paid pro account */
6
11
PRO ;
7
12
}
Original file line number Diff line number Diff line change 1
1
package net.pearx.kpastebin.model
2
2
3
+ /* *
4
+ * The list of possible Pastebin paste expire durations
5
+ */
3
6
public enum class ExpireDate (internal val code : String ) {
7
+ /* * Paste will never expire */
4
8
NEVER (" N" ),
9
+
10
+ /* * Paste will expire in 10 minutes after publication */
5
11
TEN_MINUTES (" 10M" ),
12
+
13
+ /* * Paste will expire in a hour after publication */
6
14
ONE_HOUR (" 1H" ),
15
+
16
+ /* * Paste will expire in a day after publication */
7
17
ONE_DAY (" 1D" ),
18
+
19
+ /* * Paste will expire in a week after publication */
8
20
ONE_WEEK (" 1W" ),
21
+
22
+ /* * Paste will expire in two weeks after publication */
9
23
TWO_WEEEKS (" 2W" ),
24
+
25
+ /* * Paste will expire in a month after publication */
10
26
ONE_MONTH (" 1M" ),
27
+
28
+ /* * Paste will expire in six months after publication */
11
29
SIX_MONTHS (" 6M" ),
30
+
31
+ /* * Paste will expire in a year after publication */
12
32
ONE_YEAR (" 1Y" );
13
33
14
34
internal companion object {
Original file line number Diff line number Diff line change @@ -3,17 +3,30 @@ package net.pearx.kpastebin.model
3
3
import net.pearx.kpastebin.internal.XML_PARENT_REGEX
4
4
import net.pearx.kpastebin.internal.XML_PROPERTY_REGEX
5
5
6
+ /* *
7
+ * A detailed Pastebin paste information
8
+ */
6
9
public data class PasteDetails (
10
+ /* * Paste key */
7
11
val key : String ,
12
+ /* * Paste publication date */
8
13
val date : Int ,
14
+ /* * Paste title */
9
15
val title : String ,
16
+ /* * Paste size in bytes */
10
17
val size : Int ,
18
+ /* * Paste expiration date */ // todo
11
19
val expireDate : Int ,
20
+ /* * Paste privacy status */
12
21
val privacy : Privacy ,
22
+ /* * Paste syntax highlighting language in a user-readable format (e.g., Kotlin or C#) */
13
23
val formatLong : String ,
24
+ /* * Paste syntax highlighting language in a short format (e.g. kotlin or csharp) */
14
25
val formatShort : String ,
26
+ /* * Paste URL */
15
27
val url : String ,
16
- val hist : Int
28
+ /* * Paste views count */
29
+ val hits : Int
17
30
) {
18
31
internal companion object {
19
32
fun parseList (input : String ): List <PasteDetails > {
Original file line number Diff line number Diff line change 1
1
package net.pearx.kpastebin.model
2
2
3
+ /* *
4
+ * The list of possible Pastebin paste privacy states
5
+ */
3
6
public enum class Privacy {
7
+ /* * Paste is visible for all users */
4
8
PUBLIC ,
9
+
10
+ /* * Paste is invisible for others unless you share your paste link */
5
11
UNLISTED ,
12
+
13
+ /* * Paste is visible only for you */
6
14
PRIVATE ;
7
15
}
Original file line number Diff line number Diff line change @@ -3,15 +3,27 @@ package net.pearx.kpastebin.model
3
3
import net.pearx.kpastebin.internal.XML_PARENT_REGEX
4
4
import net.pearx.kpastebin.internal.XML_PROPERTY_REGEX
5
5
6
+ /* *
7
+ * A detailed Pastebin user information
8
+ */
6
9
public data class UserDetails (
10
+ /* * Full user name */
7
11
val name : String ,
12
+ /* * Default paste syntax highlighting language for this user in a short format (e.g., kotlin or csharp) */
8
13
val defaultFormatShort : String ,
14
+ /* * Default paste expiration duration for this user */
9
15
val defaultExpiration : ExpireDate ,
16
+ /* * User avatar URL */
10
17
val avatarUrl : String ,
18
+ /* * Default paste privacy status for this user */
11
19
val defaultPrivacy : Privacy ,
20
+ /* * User website */
12
21
val website : String ,
22
+ /* * User E-Mail */
13
23
val email : String ,
24
+ /* * User location */
14
25
val location : String ,
26
+ /* * User account type */
15
27
val accountType : AccountType
16
28
) {
17
29
internal companion object {
You can’t perform that action at this time.
0 commit comments