test(api/rest): add basic endpoint tests
This commit is contained in:
parent
c7fb2817fc
commit
46218aa3c7
9 changed files with 253 additions and 8 deletions
|
|
@ -24,7 +24,14 @@ internal data class PlatformProps(
|
|||
internal expect val platformSuperProps: PlatformProps
|
||||
|
||||
object ApiConstants {
|
||||
val superProps = Base64.encode(Json.encodeToString(SuperProperties()).encodeToByteArray())
|
||||
@OptIn(ExperimentalSerializationApi::class)
|
||||
val json = Json {
|
||||
namingStrategy = JsonNamingStrategy.SnakeCase
|
||||
ignoreUnknownKeys = true
|
||||
encodeDefaults = true
|
||||
}
|
||||
|
||||
val superProps = Base64.encode(json.encodeToString(SuperProperties()).encodeToByteArray())
|
||||
val baseHeaders = mapOf(
|
||||
"X-Debug-Options" to "bugReporterEnabled",
|
||||
"X-Discord-Locale" to "en-US",
|
||||
|
|
@ -34,13 +41,6 @@ object ApiConstants {
|
|||
const val userAgent = "Discord-Android/311020;RNA"
|
||||
const val gatewayUserAgent = "okhttp/4.12.0"
|
||||
|
||||
@OptIn(ExperimentalSerializationApi::class)
|
||||
val json = Json {
|
||||
namingStrategy = JsonNamingStrategy.SnakeCase
|
||||
ignoreUnknownKeys = true
|
||||
encodeDefaults = true
|
||||
}
|
||||
|
||||
// TODO: Desktop uses separate properties
|
||||
@Suppress("PropertyName")
|
||||
@Serializable
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue