mirror of
https://github.com/ReVanced/revanced-api.git
synced 2026-01-30 06:31:03 +00:00
feat: Add announcements API
This commit is contained in:
@@ -2,6 +2,7 @@ package app.revanced.api.backend
|
||||
|
||||
import io.ktor.client.*
|
||||
import io.ktor.client.engine.okhttp.*
|
||||
import kotlinx.datetime.LocalDateTime
|
||||
import kotlinx.serialization.Serializable
|
||||
|
||||
/**
|
||||
@@ -89,7 +90,7 @@ abstract class Backend(
|
||||
class BackendRelease(
|
||||
val tag: String,
|
||||
val releaseNote: String,
|
||||
val createdAt: String,
|
||||
val createdAt: LocalDateTime,
|
||||
val assets: Set<BackendAsset>
|
||||
) {
|
||||
/**
|
||||
|
||||
@@ -26,6 +26,8 @@ import kotlinx.coroutines.*
|
||||
import kotlinx.serialization.ExperimentalSerializationApi
|
||||
import kotlinx.serialization.json.Json
|
||||
import kotlinx.serialization.json.JsonNamingStrategy
|
||||
import org.koin.dsl.bind
|
||||
import org.koin.dsl.module
|
||||
|
||||
@OptIn(ExperimentalSerializationApi::class)
|
||||
class GitHubBackend(token: String? = null) : Backend({
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
package app.revanced.api.backend.github.api
|
||||
|
||||
import kotlinx.datetime.LocalDateTime
|
||||
import kotlinx.serialization.SerialName
|
||||
import kotlinx.serialization.Serializable
|
||||
|
||||
@@ -40,7 +41,7 @@ class Response {
|
||||
class GitHubRelease(
|
||||
val tagName: String,
|
||||
val assets: Set<GitHubAsset>,
|
||||
val createdAt: String,
|
||||
val createdAt: LocalDateTime,
|
||||
val body: String
|
||||
) {
|
||||
@Serializable
|
||||
|
||||
Reference in New Issue
Block a user