1
0
mirror of https://github.com/InsanusMokrassar/TelegramBotAPI.git synced 2024-12-22 16:47:13 +00:00

add support of getStarTransactions

This commit is contained in:
InsanusMokrassar 2024-06-23 15:16:05 +06:00
parent 63a695dcc5
commit f2e97df44c
2 changed files with 37 additions and 0 deletions

View File

@ -0,0 +1,14 @@
package dev.inmo.tgbotapi.extensions.api.get
import dev.inmo.tgbotapi.bot.TelegramBot
import dev.inmo.tgbotapi.requests.get.GetStarTransactions
suspend fun TelegramBot.getStarTransactions(
offset: Int? = null,
limit: Int? = null,
) = execute(
GetStarTransactions(
offset = offset,
limit = limit
)
)

View File

@ -0,0 +1,23 @@
package dev.inmo.tgbotapi.requests.get
import dev.inmo.tgbotapi.requests.abstracts.SimpleRequest
import dev.inmo.tgbotapi.types.*
import dev.inmo.tgbotapi.types.payments.stars.StarTransactions
import kotlinx.serialization.DeserializationStrategy
import kotlinx.serialization.SerialName
import kotlinx.serialization.Serializable
import kotlinx.serialization.SerializationStrategy
@Serializable
data class GetStarTransactions(
@SerialName(offsetField)
val offset: Int? = null,
@SerialName(limitField)
val limit: Int? = null,
) : SimpleRequest<StarTransactions> {
override fun method(): String = "getStarTransactions"
override val resultDeserializer: DeserializationStrategy<StarTransactions>
get() = StarTransactions.serializer()
override val requestSerializer: SerializationStrategy<*>
get() = serializer()
}