mirror of
https://github.com/InsanusMokrassar/TelegramBotAPI.git
synced 2024-11-21 15:53:47 +00:00
add support of getStarTransactions
This commit is contained in:
parent
63a695dcc5
commit
f2e97df44c
@ -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
|
||||
)
|
||||
)
|
@ -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()
|
||||
}
|
Loading…
Reference in New Issue
Block a user