forked from umerov1999/Fenrir-for-VK
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Showing
35 changed files
with
397 additions
and
88 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
18 changes: 7 additions & 11 deletions
18
app_fenrir/src/main/kotlin/dev/ragnarok/fenrir/api/model/VKApiNarratives.kt
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,19 @@ | ||
package dev.ragnarok.fenrir.api.model | ||
|
||
import dev.ragnarok.fenrir.api.adapters.NarrativesDtoAdapter | ||
import kotlinx.serialization.SerialName | ||
import dev.ragnarok.fenrir.api.model.interfaces.VKApiAttachment | ||
import kotlinx.serialization.Serializable | ||
|
||
@Serializable(with = NarrativesDtoAdapter::class) | ||
class VKApiNarratives { | ||
@SerialName("id") | ||
class VKApiNarratives : VKApiAttachment { | ||
var id = 0 | ||
|
||
@SerialName("owner_id") | ||
var owner_id = 0L | ||
|
||
@SerialName("title") | ||
var title: String? = null | ||
|
||
@SerialName("story_ids") | ||
var access_key: String? = null | ||
var story_ids: IntArray? = null | ||
|
||
@SerialName("cover") | ||
var cover: String? = null | ||
|
||
override fun getType(): String { | ||
return VKApiAttachment.TYPE_NARRATIVE | ||
} | ||
} |
This file contains 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
This file contains 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
51 changes: 51 additions & 0 deletions
51
app_fenrir/src/main/kotlin/dev/ragnarok/fenrir/db/model/entity/NarrativesDboEntity.kt
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
package dev.ragnarok.fenrir.db.model.entity | ||
|
||
import androidx.annotation.Keep | ||
import kotlinx.serialization.SerialName | ||
import kotlinx.serialization.Serializable | ||
|
||
@Keep | ||
@Serializable | ||
@SerialName("narrative") | ||
class NarrativesDboEntity : DboEntity() { | ||
var id: Int = 0 | ||
var owner_id: Long = 0L | ||
var accessKey: String? = null | ||
private set | ||
var title: String? = null | ||
private set | ||
var cover: String? = null | ||
private set | ||
var stories: IntArray? = null | ||
private set | ||
|
||
fun setId(id: Int): NarrativesDboEntity { | ||
this.id = id | ||
return this | ||
} | ||
|
||
fun setOwnerId(ownerId: Long): NarrativesDboEntity { | ||
owner_id = ownerId | ||
return this | ||
} | ||
|
||
fun setAccessKey(access_key: String?): NarrativesDboEntity { | ||
accessKey = access_key | ||
return this | ||
} | ||
|
||
fun setTitle(title: String?): NarrativesDboEntity { | ||
this.title = title | ||
return this | ||
} | ||
|
||
fun setCover(cover: String?): NarrativesDboEntity { | ||
this.cover = cover | ||
return this | ||
} | ||
|
||
fun setStory_ids(stories: IntArray?): NarrativesDboEntity { | ||
this.stories = stories | ||
return this | ||
} | ||
} |
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Oops, something went wrong.