Files
gulevsky 613b433cc1 add documentation for cloud functions
commit_hash:91ee6d5933ef8c09be1c4f3fbd72ed7d689931e0
2025-03-27 15:30:01 +03:00

32 lines
491 B
Kotlin

package cloud.divkit
data class Request(
val httpMethod: String?,
val headers: Map<String, String> = mapOf(),
val body: String = ""
)
data class Response(
val statusCode: Int,
val body: String
)
fun handle(request: Request): Response {
return Response(200, card)
}
private const val card = """
{
"log_id": "cloud_divkit",
"states": [
{
"state_id": 0,
"div": {
"type": "text",
"text": "Hello, Username!"
}
}
]
}
"""