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

removing of deprecations

This commit is contained in:
InsanusMokrassar 2020-02-23 20:23:33 +06:00
parent a51e68be04
commit f8a312acb3
47 changed files with 7 additions and 1798 deletions

View File

@ -1,5 +1,11 @@
# TelegramBotAPI changelog
## 0.24.0
* `TelegramBotAPI`:
* All suspend functions for `RequestsExecutor` was removed (due to replacement into
[TelegramBotAPI extensions project](TelegramBotAPI-extensions-api/README.md))
## 0.23.0 TelegramBotAPI 4.6
* `Poll` now is sealed class

View File

@ -23,26 +23,3 @@ data class DeleteMessage(
override val requestSerializer: SerializationStrategy<*>
get() = serializer()
}
@Deprecated("Deprecated due to extracting into separated library")
suspend fun RequestsExecutor.deleteMessage(
chatId: ChatIdentifier,
messageId: MessageIdentifier
) = execute(
DeleteMessage(chatId, messageId)
)
@Deprecated("Deprecated due to extracting into separated library")
suspend fun RequestsExecutor.deleteMessage(
chat: Chat,
messageId: MessageIdentifier
) = deleteMessage(chat.id, messageId)
@Deprecated("Deprecated due to extracting into separated library")
suspend fun RequestsExecutor.deleteMessage(
message: Message
) = deleteMessage(message.chat, message.messageId)
suspend fun Message.delete(
requestsExecutor: RequestsExecutor
) = requestsExecutor.deleteMessage(this)

View File

@ -31,51 +31,3 @@ data class ForwardMessage(
override val requestSerializer: SerializationStrategy<*>
get() = serializer()
}
@Deprecated("Deprecated due to extracting into separated library")
suspend fun RequestsExecutor.forwardMessage(
fromChatId: ChatIdentifier,
toChatId: ChatIdentifier,
messageId: MessageIdentifier,
disableNotification: Boolean = false
) = execute(
ForwardMessage(fromChatId, toChatId, messageId, disableNotification)
)
@Deprecated("Deprecated due to extracting into separated library")
suspend fun RequestsExecutor.forwardMessage(
fromChat: Chat,
toChatId: ChatIdentifier,
messageId: MessageIdentifier,
disableNotification: Boolean = false
) = forwardMessage(fromChat.id, toChatId, messageId, disableNotification)
@Deprecated("Deprecated due to extracting into separated library")
suspend fun RequestsExecutor.forwardMessage(
fromChatId: ChatIdentifier,
toChat: Chat,
messageId: MessageIdentifier,
disableNotification: Boolean = false
) = forwardMessage(fromChatId, toChat.id, messageId, disableNotification)
@Deprecated("Deprecated due to extracting into separated library")
suspend fun RequestsExecutor.forwardMessage(
fromChat: Chat,
toChat: Chat,
messageId: MessageIdentifier,
disableNotification: Boolean = false
) = forwardMessage(fromChat.id, toChat.id, messageId, disableNotification)
@Deprecated("Deprecated due to extracting into separated library")
suspend fun RequestsExecutor.forwardMessage(
toChatId: ChatIdentifier,
message: Message,
disableNotification: Boolean = false
) = forwardMessage(message.chat, toChatId, message.messageId, disableNotification)
@Deprecated("Deprecated due to extracting into separated library")
suspend fun RequestsExecutor.forwardMessage(
toChat: Chat,
message: Message,
disableNotification: Boolean = false
) = forwardMessage(message.chat, toChat, message.messageId, disableNotification)

View File

@ -13,6 +13,3 @@ class GetMe : SimpleRequest<ExtendedBot> {
override val requestSerializer: SerializationStrategy<*>
get() = serializer()
}
@Deprecated("Deprecated due to extracting into separated library")
suspend fun RequestsExecutor.getMe() = execute(GetMe())

View File

@ -28,25 +28,3 @@ data class GetUpdates(
override val requestSerializer: SerializationStrategy<*>
get() = serializer()
}
@Deprecated("Deprecated due to extracting into separated library")
suspend fun RequestsExecutor.getUpdates(
offset: UpdateIdentifier? = null,
limit: Int? = null,
timeout: Int? = null,
allowed_updates: List<String>? = ALL_UPDATES_LIST
) = execute(
GetUpdates(
offset, limit, timeout, allowed_updates
)
)
@Deprecated("Deprecated due to extracting into separated library")
suspend fun RequestsExecutor.getUpdates(
lastUpdate: Update,
limit: Int? = null,
timeout: Int? = null,
allowed_updates: List<String>? = ALL_UPDATES_LIST
) = getUpdates(
lastUpdate.updateId + 1, limit, timeout, allowed_updates
)

View File

@ -1,140 +0,0 @@
package com.github.insanusmokrassar.TelegramBotAPI.requests
import com.github.insanusmokrassar.TelegramBotAPI.bot.RequestsExecutor
import com.github.insanusmokrassar.TelegramBotAPI.requests.edit.LiveLocation.editLiveLocation
import com.github.insanusmokrassar.TelegramBotAPI.requests.edit.LiveLocation.stopLiveLocation
import com.github.insanusmokrassar.TelegramBotAPI.requests.send.SendLocation
import com.github.insanusmokrassar.TelegramBotAPI.types.*
import com.github.insanusmokrassar.TelegramBotAPI.types.buttons.InlineKeyboardMarkup
import com.github.insanusmokrassar.TelegramBotAPI.types.buttons.KeyboardMarkup
import com.github.insanusmokrassar.TelegramBotAPI.types.chat.abstracts.Chat
import com.github.insanusmokrassar.TelegramBotAPI.types.message.abstracts.ContentMessage
import com.github.insanusmokrassar.TelegramBotAPI.types.message.content.LocationContent
import com.soywiz.klock.DateTime
import com.soywiz.klock.TimeSpan
import io.ktor.utils.io.core.Closeable
import kotlinx.coroutines.CoroutineScope
import kotlinx.coroutines.launch
import kotlin.math.ceil
private val livePeriodDelayMillis = (livePeriodLimit.last - 60L) * 1000L
@Deprecated("Deprecated due to extracting into separated library")
class LiveLocation internal constructor(
private val requestsExecutor: RequestsExecutor,
scope: CoroutineScope,
autoCloseTimeDelay: Double,
initMessage: ContentMessage<LocationContent>
) : Closeable {
private val doWhenClose = {
scope.launch {
requestsExecutor.stopLiveLocation(message)
}
}
private val autoCloseTime = DateTime.now() + TimeSpan(autoCloseTimeDelay)
val leftUntilCloseMillis: TimeSpan
get() = autoCloseTime - DateTime.now()
var isClosed: Boolean = false
private set
get() = field || leftUntilCloseMillis.millisecondsLong < 0L
private var message: ContentMessage<LocationContent> = initMessage
val lastLocation: Location
get() = message.content.location
suspend fun updateLocation(
location: Location,
replyMarkup: InlineKeyboardMarkup? = null
): Location {
if (!isClosed) {
message = requestsExecutor.editLiveLocation(
message,
location,
replyMarkup
)
return lastLocation
} else {
error("LiveLocation is closed")
}
}
override fun close() {
if (isClosed) {
return
}
isClosed = true
doWhenClose()
}
}
@Deprecated("Deprecated due to extracting into separated library")
suspend fun RequestsExecutor.startLiveLocation(
scope: CoroutineScope,
chatId: ChatIdentifier,
latitude: Double,
longitude: Double,
liveTimeMillis: Long = livePeriodDelayMillis,
disableNotification: Boolean = false,
replyToMessageId: MessageIdentifier? = null,
replyMarkup: KeyboardMarkup? = null
): LiveLocation {
val liveTimeAsDouble = liveTimeMillis.toDouble()
val locationMessage = execute(
SendLocation(
chatId,
latitude,
longitude,
ceil(liveTimeAsDouble / 1000).toLong(),
disableNotification,
replyToMessageId,
replyMarkup
)
)
return LiveLocation(
this,
scope,
liveTimeAsDouble,
locationMessage
)
}
@Deprecated("Deprecated due to extracting into separated library")
suspend fun RequestsExecutor.startLiveLocation(
scope: CoroutineScope,
chat: Chat,
latitude: Double,
longitude: Double,
liveTimeMillis: Long = livePeriodDelayMillis,
disableNotification: Boolean = false,
replyToMessageId: MessageIdentifier? = null,
replyMarkup: KeyboardMarkup? = null
): LiveLocation = startLiveLocation(
scope, chat.id, latitude, longitude, liveTimeMillis, disableNotification, replyToMessageId, replyMarkup
)
@Deprecated("Deprecated due to extracting into separated library")
suspend fun RequestsExecutor.startLiveLocation(
scope: CoroutineScope,
chatId: ChatId,
location: Location,
liveTimeMillis: Long = livePeriodDelayMillis,
disableNotification: Boolean = false,
replyToMessageId: MessageIdentifier? = null,
replyMarkup: KeyboardMarkup? = null
): LiveLocation = startLiveLocation(
scope, chatId, location.latitude, location.longitude, liveTimeMillis, disableNotification, replyToMessageId, replyMarkup
)
@Deprecated("Deprecated due to extracting into separated library")
suspend fun RequestsExecutor.startLiveLocation(
scope: CoroutineScope,
chat: Chat,
location: Location,
liveTimeMillis: Long = livePeriodDelayMillis,
disableNotification: Boolean = false,
replyToMessageId: MessageIdentifier? = null,
replyMarkup: KeyboardMarkup? = null
): LiveLocation = startLiveLocation(
scope, chat.id, location.latitude, location.longitude, liveTimeMillis, disableNotification, replyToMessageId, replyMarkup
)

View File

@ -26,33 +26,3 @@ data class StopPoll(
override val requestSerializer: SerializationStrategy<*>
get() = serializer()
}
@Deprecated("Deprecated due to extracting into separated library")
suspend fun RequestsExecutor.stopPoll(
chatId: ChatIdentifier,
messageId: MessageIdentifier,
replyMarkup: InlineKeyboardMarkup? = null
) = execute(
StopPoll(chatId, messageId, replyMarkup)
)
@Deprecated("Deprecated due to extracting into separated library")
suspend fun RequestsExecutor.stopPoll(
chat: Chat,
messageId: MessageIdentifier,
replyMarkup: InlineKeyboardMarkup? = null
) = stopPoll(chat.id, messageId, replyMarkup)
@Deprecated("Deprecated due to extracting into separated library")
suspend fun RequestsExecutor.stopPoll(
chatId: ChatId,
message: Message,
replyMarkup: InlineKeyboardMarkup? = null
) = stopPoll(chatId, message.messageId, replyMarkup)
@Deprecated("Deprecated due to extracting into separated library")
suspend fun RequestsExecutor.stopPoll(
chat: Chat,
message: Message,
replyMarkup: InlineKeyboardMarkup? = null
) = stopPoll(chat.id, message.messageId, replyMarkup)

View File

@ -33,21 +33,3 @@ fun CallbackQuery.createAnswer(
url: String? = null,
cachedTimeSeconds: Int? = null
): AnswerCallbackQuery = AnswerCallbackQuery(id, text, showAlert, url, cachedTimeSeconds)
@Deprecated("Deprecated due to extracting into separated library")
suspend fun RequestsExecutor.answerCallbackQuery(
callbackQueryId: CallbackQueryIdentifier,
text: String? = null,
showAlert: Boolean? = null,
url: String? = null,
cachedTimeSeconds: Int? = null
) = execute(AnswerCallbackQuery(callbackQueryId, text, showAlert, url, cachedTimeSeconds))
@Deprecated("Deprecated due to extracting into separated library")
suspend fun RequestsExecutor.answerCallbackQuery(
callbackQuery: CallbackQuery,
text: String? = null,
showAlert: Boolean? = null,
url: String? = null,
cachedTimeSeconds: Int? = null
) = answerCallbackQuery(callbackQuery.id, text, showAlert, url, cachedTimeSeconds)

View File

@ -52,30 +52,6 @@ fun InlineQuery.createAnswer(
switchPmParameter
)
@Deprecated("Deprecated due to extracting into separated library")
suspend fun RequestsExecutor.answerInlineQuery(
inlineQueryID: InlineQueryIdentifier,
results: List<InlineQueryResult> = emptyList(),
cachedTime: Int? = null,
isPersonal: Boolean? = null,
nextOffset: String? = null,
switchPmText: String? = null,
switchPmParameter: String? = null
) = execute(
AnswerInlineQuery(inlineQueryID, results, cachedTime, isPersonal, nextOffset, switchPmText, switchPmParameter)
)
@Deprecated("Deprecated due to extracting into separated library")
suspend fun RequestsExecutor.answerInlineQuery(
inlineQuery: InlineQuery,
results: List<InlineQueryResult> = emptyList(),
cachedTime: Int? = null,
isPersonal: Boolean? = null,
nextOffset: String? = null,
switchPmText: String? = null,
switchPmParameter: String? = null
) = answerInlineQuery(inlineQuery.id, results, cachedTime, isPersonal, nextOffset, switchPmText, switchPmParameter)
internal object InlineQueryAnswersResultsSerializer: KSerializer<List<InlineQueryResult>> by ArrayListSerializer(
InlineQueryResultSerializer
)

View File

@ -41,23 +41,3 @@ fun PreCheckoutQuery.createAnswerError(
id,
error
)
@Deprecated("Deprecated due to extracting into separated library")
suspend fun RequestsExecutor.answerPreCheckoutQueryOk(
id: PreCheckoutQueryId
) = execute(AnswerPreCheckoutQueryOk(id))
@Deprecated("Deprecated due to extracting into separated library")
suspend fun RequestsExecutor.answerPreCheckoutQueryOk(
preCheckoutQuery: PreCheckoutQuery
) = answerPreCheckoutQueryOk(preCheckoutQuery.id)
@Deprecated("Deprecated due to extracting into separated library")
suspend fun RequestsExecutor.answerPreCheckoutQueryError(
id: PreCheckoutQueryId,
error: String
) = execute(AnswerPreCheckoutQueryError(id, error))
@Deprecated("Deprecated due to extracting into separated library")
suspend fun RequestsExecutor.answerPreCheckoutQueryError(
preCheckoutQuery: PreCheckoutQuery,
error: String
) = answerPreCheckoutQueryError(preCheckoutQuery.id, error)

View File

@ -52,27 +52,3 @@ fun ShippingQuery.createAnswerError(
id,
error
)
@Deprecated("Deprecated due to extracting into separated library")
suspend fun RequestsExecutor.answerShippingQueryOk(
id: ShippingQueryIdentifier,
shippingOptions: List<ShippingOption>
) = execute(AnswerShippingQueryOk(id, shippingOptions))
@Deprecated("Deprecated due to extracting into separated library")
suspend fun RequestsExecutor.answerShippingQueryOk(
shippingQuery: ShippingQuery,
shippingOptions: List<ShippingOption>
) = answerShippingQueryOk(shippingQuery.id, shippingOptions)
@Deprecated("Deprecated due to extracting into separated library")
suspend fun RequestsExecutor.answerShippingQueryError(
id: ShippingQueryIdentifier,
error: String
) = execute(AnswerShippingQueryError(id, error))
@Deprecated("Deprecated due to extracting into separated library")
suspend fun RequestsExecutor.answerShippingQueryError(
shippingQuery: ShippingQuery,
error: String
) = answerShippingQueryError(shippingQuery.id, error)

View File

@ -20,13 +20,3 @@ data class ExportChatInviteLink(
override val requestSerializer: SerializationStrategy<*>
get() = serializer()
}
@Deprecated("Deprecated due to extracting into separated library")
suspend fun RequestsExecutor.exportChatInviteLink(
chatId: ChatIdentifier
) = execute(ExportChatInviteLink(chatId))
@Deprecated("Deprecated due to extracting into separated library")
suspend fun RequestsExecutor.exportChatInviteLink(
chat: PublicChat
) = exportChatInviteLink(chat.id)

View File

@ -20,13 +20,3 @@ data class LeaveChat(
override val requestSerializer: SerializationStrategy<*>
get() = serializer()
}
@Deprecated("Deprecated due to extracting into separated library")
suspend fun RequestsExecutor.leaveChat(
chatId: ChatIdentifier
) = execute(LeaveChat(chatId))
@Deprecated("Deprecated due to extracting into separated library")
suspend fun RequestsExecutor.leaveChat(
chat: PublicChat
) = leaveChat(chat.id)

View File

@ -23,31 +23,3 @@ data class KickChatMember(
override val requestSerializer: SerializationStrategy<*>
get() = serializer()
}
@Deprecated("Deprecated due to extracting into separated library")
suspend fun RequestsExecutor.kickChatMember(
chatId: ChatIdentifier,
userId: UserId,
untilDate: TelegramDate? = null
) = execute(KickChatMember(chatId, userId, untilDate))
@Deprecated("Deprecated due to extracting into separated library")
suspend fun RequestsExecutor.kickChatMember(
chat: PublicChat,
userId: UserId,
untilDate: TelegramDate? = null
) = kickChatMember(chat.id, userId, untilDate)
@Deprecated("Deprecated due to extracting into separated library")
suspend fun RequestsExecutor.kickChatMember(
chatId: ChatId,
user: User,
untilDate: TelegramDate? = null
) = kickChatMember(chatId, user.id, untilDate)
@Deprecated("Deprecated due to extracting into separated library")
suspend fun RequestsExecutor.kickChatMember(
chat: PublicChat,
user: User,
untilDate: TelegramDate? = null
) = kickChatMember(chat.id, user.id, untilDate)

View File

@ -39,113 +39,3 @@ data class PromoteChatMember(
override val requestSerializer: SerializationStrategy<*>
get() = serializer()
}
@Deprecated("Deprecated due to extracting into separated library")
suspend fun RequestsExecutor.promoteChatMember(
chatId: ChatIdentifier,
userId: UserId,
untilDate: TelegramDate? = null,
canChangeInfo: Boolean? = null,
canPostMessages: Boolean? = null,
canEditMessages: Boolean? = null,
canDeleteMessages: Boolean? = null,
canInviteUsers: Boolean? = null,
canRestrictMembers: Boolean? = null,
canPinMessages: Boolean? = null,
canPromoteMembers: Boolean? = null
) = execute(
PromoteChatMember(
chatId,
userId,
untilDate,
canChangeInfo,
canPostMessages,
canEditMessages,
canDeleteMessages,
canInviteUsers,
canRestrictMembers,
canPinMessages,
canPromoteMembers
)
)
@Deprecated("Deprecated due to extracting into separated library")
suspend fun RequestsExecutor.promoteChatMember(
chat: PublicChat,
userId: UserId,
untilDate: TelegramDate? = null,
canChangeInfo: Boolean? = null,
canPostMessages: Boolean? = null,
canEditMessages: Boolean? = null,
canDeleteMessages: Boolean? = null,
canInviteUsers: Boolean? = null,
canRestrictMembers: Boolean? = null,
canPinMessages: Boolean? = null,
canPromoteMembers: Boolean? = null
) = promoteChatMember(
chat.id,
userId,
untilDate,
canChangeInfo,
canPostMessages,
canEditMessages,
canDeleteMessages,
canInviteUsers,
canRestrictMembers,
canPinMessages,
canPromoteMembers
)
@Deprecated("Deprecated due to extracting into separated library")
suspend fun RequestsExecutor.promoteChatMember(
chatId: ChatId,
user: User,
untilDate: TelegramDate? = null,
canChangeInfo: Boolean? = null,
canPostMessages: Boolean? = null,
canEditMessages: Boolean? = null,
canDeleteMessages: Boolean? = null,
canInviteUsers: Boolean? = null,
canRestrictMembers: Boolean? = null,
canPinMessages: Boolean? = null,
canPromoteMembers: Boolean? = null
) = promoteChatMember(
chatId,
user.id,
untilDate,
canChangeInfo,
canPostMessages,
canEditMessages,
canDeleteMessages,
canInviteUsers,
canRestrictMembers,
canPinMessages,
canPromoteMembers
)
@Deprecated("Deprecated due to extracting into separated library")
suspend fun RequestsExecutor.promoteChatMember(
chat: PublicChat,
user: User,
untilDate: TelegramDate? = null,
canChangeInfo: Boolean? = null,
canPostMessages: Boolean? = null,
canEditMessages: Boolean? = null,
canDeleteMessages: Boolean? = null,
canInviteUsers: Boolean? = null,
canRestrictMembers: Boolean? = null,
canPinMessages: Boolean? = null,
canPromoteMembers: Boolean? = null
) = promoteChatMember(
chat.id,
user.id,
untilDate,
canChangeInfo,
canPostMessages,
canEditMessages,
canDeleteMessages,
canInviteUsers,
canRestrictMembers,
canPinMessages,
canPromoteMembers
)

View File

@ -20,28 +20,3 @@ data class UnbanChatMember(
override val requestSerializer: SerializationStrategy<*>
get() = serializer()
}
@Deprecated("Deprecated due to extracting into separated library")
suspend fun RequestsExecutor.unbanChatMember(
chatId: ChatIdentifier,
userId: UserId
) = execute(UnbanChatMember(chatId, userId))
@Deprecated("Deprecated due to extracting into separated library")
suspend fun RequestsExecutor.unbanChatMember(
chat: PublicChat,
userId: UserId
) = unbanChatMember(chat.id, userId)
@Deprecated("Deprecated due to extracting into separated library")
suspend fun RequestsExecutor.unbanChatMember(
chatId: ChatId,
user: User
) = unbanChatMember(chatId, user.id)
@Deprecated("Deprecated due to extracting into separated library")
suspend fun RequestsExecutor.unbanChatMember(
chat: PublicChat,
user: User
) = unbanChatMember(chat.id, user.id)

View File

@ -20,13 +20,3 @@ data class DeleteChatPhoto(
override val requestSerializer: SerializationStrategy<*>
get() = serializer()
}
@Deprecated("Deprecated due to extracting into separated library")
suspend fun RequestsExecutor.deleteChatPhoto(
chatId: ChatIdentifier
) = execute(DeleteChatPhoto(chatId))
@Deprecated("Deprecated due to extracting into separated library")
suspend fun RequestsExecutor.deleteChatPhoto(
chat: PublicChat
) = deleteChatPhoto(chat.id)

View File

@ -24,27 +24,3 @@ data class PinChatMessage (
override val requestSerializer: SerializationStrategy<*>
get() = serializer()
}
@Deprecated("Deprecated due to extracting into separated library")
suspend fun RequestsExecutor.pinChatMessage(
chatId: ChatIdentifier,
messageId: MessageIdentifier,
disableNotification: Boolean = false
) = execute(PinChatMessage(chatId, messageId, disableNotification))
@Deprecated("Deprecated due to extracting into separated library")
suspend fun RequestsExecutor.pinChatMessage(
chat: PublicChat,
messageId: MessageIdentifier,
disableNotification: Boolean = false
) = pinChatMessage(chat.id, messageId, disableNotification)
@Deprecated("Deprecated due to extracting into separated library")
suspend fun RequestsExecutor.pinChatMessage(
message: Message,
disableNotification: Boolean = false
) = if (message.chat is PublicChat) {
pinChatMessage(message.chat.id, message.messageId, disableNotification)
} else {
error("It is possible to pin messages only in non one-to-one chats")
}

View File

@ -27,15 +27,3 @@ data class SetChatTitle (
override val requestSerializer: SerializationStrategy<*>
get() = serializer()
}
@Deprecated("Deprecated due to extracting into separated library")
suspend fun RequestsExecutor.setChatTitle(
chatId: ChatIdentifier,
title: String
) = execute(SetChatTitle(chatId, title))
@Deprecated("Deprecated due to extracting into separated library")
suspend fun RequestsExecutor.setChatTitle(
chat: PublicChat,
title: String
) = setChatTitle(chat.id, title)

View File

@ -20,13 +20,3 @@ data class UnpinChatMessage(
override val requestSerializer: SerializationStrategy<*>
get() = serializer()
}
@Deprecated("Deprecated due to extracting into separated library")
suspend fun RequestsExecutor.unpinChatMessage(
chatId: ChatIdentifier
) = execute(UnpinChatMessage(chatId))
@Deprecated("Deprecated due to extracting into separated library")
suspend fun RequestsExecutor.unpinChatMessage(
chat: PublicChat
) = unpinChatMessage(chat.id)

View File

@ -20,13 +20,3 @@ data class DeleteChatStickerSet(
override val requestSerializer: SerializationStrategy<*>
get() = serializer()
}
@Deprecated("Deprecated due to extracting into separated library")
suspend fun RequestsExecutor.deleteChatStickerSet(
chatId: ChatIdentifier
) = execute(DeleteChatStickerSet(chatId))
@Deprecated("Deprecated due to extracting into separated library")
suspend fun RequestsExecutor.deleteChatStickerSet(
chat: SupergroupChat
) = deleteChatStickerSet(chat.id)

View File

@ -21,15 +21,3 @@ data class SetChatStickerSet(
override val requestSerializer: SerializationStrategy<*>
get() = serializer()
}
@Deprecated("Deprecated due to extracting into separated library")
suspend fun RequestsExecutor.setChatStickerSet(
chatId: ChatIdentifier,
stickerSetName: StickerSetName
) = execute(SetChatStickerSet(chatId, stickerSetName))
@Deprecated("Deprecated due to extracting into separated library")
suspend fun RequestsExecutor.setChatStickerSet(
chat: SupergroupChat,
stickerSetName: StickerSetName
) = setChatStickerSet(chat.id, stickerSetName)

View File

@ -31,60 +31,3 @@ data class EditChatMessageLiveLocation(
override val requestSerializer: SerializationStrategy<*>
get() = serializer()
}
@Deprecated("Deprecated due to extracting into separated library")
suspend fun RequestsExecutor.editLiveLocation(
chatId: ChatIdentifier,
messageId: MessageIdentifier,
latitude: Double,
longitude: Double,
replyMarkup: InlineKeyboardMarkup? = null
) = execute(
EditChatMessageLiveLocation(
chatId, messageId, latitude, longitude, replyMarkup
)
)
@Deprecated("Deprecated due to extracting into separated library")
suspend fun RequestsExecutor.editLiveLocation(
chat: Chat,
messageId: MessageIdentifier,
latitude: Double,
longitude: Double,
replyMarkup: InlineKeyboardMarkup? = null
) = editLiveLocation(chat.id, messageId, latitude, longitude, replyMarkup)
@Deprecated("Deprecated due to extracting into separated library")
suspend fun RequestsExecutor.editLiveLocation(
message: ContentMessage<LocationContent>,
latitude: Double,
longitude: Double,
replyMarkup: InlineKeyboardMarkup? = null
) = editLiveLocation(message.chat, message.messageId, latitude, longitude, replyMarkup)
@Deprecated("Deprecated due to extracting into separated library")
suspend fun RequestsExecutor.editLiveLocation(
chatId: ChatIdentifier,
messageId: MessageIdentifier,
location: Location,
replyMarkup: InlineKeyboardMarkup? = null
) = execute(
EditChatMessageLiveLocation(
chatId, messageId, location.latitude, location.longitude, replyMarkup
)
)
@Deprecated("Deprecated due to extracting into separated library")
suspend fun RequestsExecutor.editLiveLocation(
chat: Chat,
messageId: MessageIdentifier,
location: Location,
replyMarkup: InlineKeyboardMarkup? = null
) = editLiveLocation(chat.id, messageId, location.latitude, location.longitude, replyMarkup)
@Deprecated("Deprecated due to extracting into separated library")
suspend fun RequestsExecutor.editLiveLocation(
message: ContentMessage<LocationContent>,
location: Location,
replyMarkup: InlineKeyboardMarkup? = null
) = editLiveLocation(message.chat, message.messageId, location.latitude, location.longitude, replyMarkup)

View File

@ -21,21 +21,3 @@ data class EditInlineMessageLiveLocation(
override val requestSerializer: SerializationStrategy<*>
get() = serializer()
}
@Deprecated("Deprecated due to extracting into separated library")
suspend fun RequestsExecutor.editLiveLocation(
inlineMessageId: InlineMessageIdentifier,
latitude: Double,
longitude: Double,
replyMarkup: InlineKeyboardMarkup? = null
) = execute(
EditInlineMessageLiveLocation(
inlineMessageId, latitude, longitude, replyMarkup
)
)
@Deprecated("Deprecated due to extracting into separated library")
suspend fun RequestsExecutor.editLiveLocation(
inlineMessageId: InlineMessageIdentifier,
location: Location,
replyMarkup: InlineKeyboardMarkup? = null
) = editLiveLocation(inlineMessageId, location.latitude, location.longitude, replyMarkup)

View File

@ -28,28 +28,3 @@ data class StopChatMessageLiveLocation(
override val requestSerializer: SerializationStrategy<*>
get() = serializer()
}
@Deprecated("Deprecated due to extracting into separated library")
suspend fun RequestsExecutor.stopLiveLocation(
chatId: ChatIdentifier,
messageId: MessageIdentifier,
replyMarkup: InlineKeyboardMarkup? = null
) = execute(
StopChatMessageLiveLocation(
chatId, messageId, replyMarkup
)
)
@Deprecated("Deprecated due to extracting into separated library")
suspend fun RequestsExecutor.stopLiveLocation(
chat: Chat,
messageId: MessageIdentifier,
replyMarkup: InlineKeyboardMarkup? = null
) = stopLiveLocation(chat.id, messageId, replyMarkup)
@Deprecated("Deprecated due to extracting into separated library")
suspend fun RequestsExecutor.stopLiveLocation(
message: ContentMessage<LocationContent>,
replyMarkup: InlineKeyboardMarkup? = null
) = stopLiveLocation(message.chat, message.messageId, replyMarkup)

View File

@ -18,13 +18,3 @@ data class StopInlineMessageLiveLocation(
override val requestSerializer: SerializationStrategy<*>
get() = serializer()
}
@Deprecated("Deprecated due to extracting into separated library")
suspend fun RequestsExecutor.stopLiveLocation(
inlineMessageId: InlineMessageIdentifier,
replyMarkup: InlineKeyboardMarkup? = null
) = execute(
StopInlineMessageLiveLocation(
inlineMessageId, replyMarkup
)
)

View File

@ -30,26 +30,3 @@ data class EditChatMessageReplyMarkup(
override val requestSerializer: SerializationStrategy<*>
get() = serializer()
}
@Deprecated("Deprecated due to extracting into separated library")
suspend fun RequestsExecutor.editMessageReplyMarkup(
chatId: ChatIdentifier,
messageId: MessageIdentifier,
replyMarkup: InlineKeyboardMarkup? = null
) = execute(
EditChatMessageReplyMarkup(chatId, messageId, replyMarkup)
)
@Deprecated("Deprecated due to extracting into separated library")
suspend fun RequestsExecutor.editMessageReplyMarkup(
chat: Chat,
messageId: MessageIdentifier,
replyMarkup: InlineKeyboardMarkup? = null
) = editMessageReplyMarkup(chat.id, messageId, replyMarkup)
@Deprecated("Deprecated due to extracting into separated library")
suspend fun RequestsExecutor.editMessageReplyMarkup(
message: Message,
replyMarkup: InlineKeyboardMarkup? = null
) = editMessageReplyMarkup(message.chat.id, message.messageId, replyMarkup)

View File

@ -18,9 +18,3 @@ data class EditInlineMessageReplyMarkup(
override val requestSerializer: SerializationStrategy<*>
get() = serializer()
}
@Deprecated("Deprecated due to extracting into separated library")
suspend fun RequestsExecutor.editMessageReplyMarkup(
inlineMessageId: InlineMessageIdentifier,
replyMarkup: InlineKeyboardMarkup? = null
) = execute(EditInlineMessageReplyMarkup(inlineMessageId, replyMarkup))

View File

@ -26,12 +26,3 @@ data class EditInlineMessageText(
override val requestSerializer: SerializationStrategy<*>
get() = serializer()
}
@Deprecated("Deprecated due to extracting into separated library")
suspend fun RequestsExecutor.editMessageText(
inlineMessageId: InlineMessageIdentifier,
text: String,
parseMode: ParseMode? = null,
disableWebPagePreview: Boolean? = null,
replyMarkup: InlineKeyboardMarkup? = null
) = execute(EditInlineMessageText(inlineMessageId, text, parseMode, disableWebPagePreview, replyMarkup))

View File

@ -21,56 +21,3 @@ data class GetGameHighScoresByChat (
override val requestSerializer: SerializationStrategy<*>
get() = serializer()
}
@Deprecated("Deprecated due to extracting into separated library")
suspend fun RequestsExecutor.getGameScore(
userId: UserId,
chatId: ChatId,
messageId: MessageIdentifier
) = execute(
GetGameHighScoresByChat(userId, chatId, messageId)
)
@Deprecated("Deprecated due to extracting into separated library")
suspend fun RequestsExecutor.getGameScore(
user: CommonUser,
chatId: ChatId,
messageId: MessageIdentifier
) = getGameScore(
user.id, chatId, messageId
)
@Deprecated("Deprecated due to extracting into separated library")
suspend fun RequestsExecutor.getGameScore(
userId: UserId,
chat: Chat,
messageId: MessageIdentifier
) = getGameScore(
userId, chat.id, messageId
)
@Deprecated("Deprecated due to extracting into separated library")
suspend fun RequestsExecutor.getGameScore(
user: CommonUser,
chat: Chat,
messageId: MessageIdentifier
) = getGameScore(
user.id, chat.id, messageId
)
@Deprecated("Deprecated due to extracting into separated library")
suspend fun RequestsExecutor.getGameScore(
userId: UserId,
message: ContentMessage<GameContent>
) = getGameScore(
userId, message.chat.id, message.messageId
)
@Deprecated("Deprecated due to extracting into separated library")
suspend fun RequestsExecutor.getGameScore(
user: CommonUser,
message: ContentMessage<GameContent>
) = getGameScore(
user.id, message.chat.id, message.messageId
)

View File

@ -16,19 +16,3 @@ data class GetGameHighScoresByInlineMessageId (
override val requestSerializer: SerializationStrategy<*>
get() = serializer()
}
@Deprecated("Deprecated due to extracting into separated library")
suspend fun RequestsExecutor.getGameScore(
userId: UserId,
inlineMessageId: InlineMessageIdentifier
) = execute(
GetGameHighScoresByInlineMessageId(
userId, inlineMessageId
)
)
@Deprecated("Deprecated due to extracting into separated library")
suspend fun RequestsExecutor.getGameScore(
user: CommonUser,
inlineMessageId: InlineMessageIdentifier
) = getGameScore(user.id, inlineMessageId)

View File

@ -27,74 +27,3 @@ data class SetGameScoreByChatId (
override val requestSerializer: SerializationStrategy<*>
get() = serializer()
}
@Deprecated("Deprecated due to extracting into separated library")
suspend fun RequestsExecutor.setGameScore(
userId: UserId,
score: Long,
chatId: ChatId,
messageId: MessageIdentifier,
force: Boolean = false,
disableEditMessage: Boolean = false
) = execute(
SetGameScoreByChatId(userId, score, chatId, messageId, force, disableEditMessage)
)
@Deprecated("Deprecated due to extracting into separated library")
suspend fun RequestsExecutor.setGameScore(
user: CommonUser,
score: Long,
chatId: ChatId,
messageId: MessageIdentifier,
force: Boolean = false,
disableEditMessage: Boolean = false
) = setGameScore(
user.id, score, chatId, messageId, force, disableEditMessage
)
@Deprecated("Deprecated due to extracting into separated library")
suspend fun RequestsExecutor.setGameScore(
userId: UserId,
score: Long,
chat: Chat,
messageId: MessageIdentifier,
force: Boolean = false,
disableEditMessage: Boolean = false
) = setGameScore(
userId, score, chat.id, messageId, force, disableEditMessage
)
@Deprecated("Deprecated due to extracting into separated library")
suspend fun RequestsExecutor.setGameScore(
user: CommonUser,
score: Long,
chat: Chat,
messageId: MessageIdentifier,
force: Boolean = false,
disableEditMessage: Boolean = false
) = setGameScore(
user.id, score, chat.id, messageId, force, disableEditMessage
)
@Deprecated("Deprecated due to extracting into separated library")
suspend fun RequestsExecutor.setGameScore(
userId: UserId,
score: Long,
message: ContentMessage<GameContent>,
force: Boolean = false,
disableEditMessage: Boolean = false
) = setGameScore(
userId, score, message.chat.id, message.messageId, force, disableEditMessage
)
@Deprecated("Deprecated due to extracting into separated library")
suspend fun RequestsExecutor.setGameScore(
user: CommonUser,
score: Long,
message: ContentMessage<GameContent>,
force: Boolean = false,
disableEditMessage: Boolean = false
) = setGameScore(
user.id, score, message.chat.id, message.messageId, force, disableEditMessage
)

View File

@ -22,25 +22,3 @@ data class SetGameScoreByInlineMessageId (
override val requestSerializer: SerializationStrategy<*>
get() = serializer()
}
@Deprecated("Deprecated due to extracting into separated library")
suspend fun RequestsExecutor.setGameScore(
userId: UserId,
score: Long,
inlineMessageId: InlineMessageIdentifier,
force: Boolean = false,
disableEditMessage: Boolean = false
) = execute(
SetGameScoreByInlineMessageId(
userId, score, inlineMessageId, force, disableEditMessage
)
)
@Deprecated("Deprecated due to extracting into separated library")
suspend fun RequestsExecutor.setGameScore(
user: CommonUser,
score: Long,
inlineMessageId: InlineMessageIdentifier,
force: Boolean = false,
disableEditMessage: Boolean = false
) = setGameScore(user.id, score, inlineMessageId, force, disableEditMessage)

View File

@ -24,121 +24,3 @@ data class SendAction(
override val requestSerializer: SerializationStrategy<*>
get() = serializer()
}
@Deprecated("Deprecated due to extracting into separated library")
suspend fun RequestsExecutor.sendBotAction(
chatId: ChatIdentifier,
action: BotAction
) = execute(
SendAction(chatId, action)
)
@Deprecated("Deprecated due to extracting into separated library")
suspend fun RequestsExecutor.sendBotAction(
chat: Chat,
action: BotAction
) = sendBotAction(chat.id, action)
@Deprecated("Deprecated due to extracting into separated library")
suspend fun RequestsExecutor.sendActionTyping(
chatId: ChatIdentifier
) = sendBotAction(chatId, TypingAction)
@Deprecated("Deprecated due to extracting into separated library")
suspend fun RequestsExecutor.sendActionUploadPhoto(
chatId: ChatIdentifier
) = sendBotAction(chatId, UploadPhotoAction)
@Deprecated("Deprecated due to extracting into separated library")
suspend fun RequestsExecutor.sendActionRecordVideo(
chatId: ChatIdentifier
) = sendBotAction(chatId, RecordVideoAction)
@Deprecated("Deprecated due to extracting into separated library")
suspend fun RequestsExecutor.sendActionUploadVideo(
chatId: ChatIdentifier
) = sendBotAction(chatId, UploadVideoAction)
@Deprecated("Deprecated due to extracting into separated library")
suspend fun RequestsExecutor.sendActionRecordAudio(
chatId: ChatIdentifier
) = sendBotAction(chatId, RecordAudioAction)
@Deprecated("Deprecated due to extracting into separated library")
suspend fun RequestsExecutor.sendActionUploadAudio(
chatId: ChatIdentifier
) = sendBotAction(chatId, UploadAudioAction)
@Deprecated("Deprecated due to extracting into separated library")
suspend fun RequestsExecutor.sendActionUploadDocument(
chatId: ChatIdentifier
) = sendBotAction(chatId, UploadDocumentAction)
@Deprecated("Deprecated due to extracting into separated library")
suspend fun RequestsExecutor.sendActionFindLocation(
chatId: ChatIdentifier
) = sendBotAction(chatId, FindLocationAction)
@Deprecated("Deprecated due to extracting into separated library")
suspend fun RequestsExecutor.sendActionRecordVideoNote(
chatId: ChatIdentifier
) = sendBotAction(chatId, RecordVideoNoteAction)
@Deprecated("Deprecated due to extracting into separated library")
suspend fun RequestsExecutor.sendActionUploadVideoNote(
chatId: ChatIdentifier
) = sendBotAction(chatId, UploadVideoNoteAction)
@Deprecated("Deprecated due to extracting into separated library")
suspend fun RequestsExecutor.sendActionTyping(
chat: Chat
) = sendBotAction(chat, TypingAction)
@Deprecated("Deprecated due to extracting into separated library")
suspend fun RequestsExecutor.sendActionUploadPhoto(
chat: Chat
) = sendBotAction(chat, UploadPhotoAction)
@Deprecated("Deprecated due to extracting into separated library")
suspend fun RequestsExecutor.sendActionRecordVideo(
chat: Chat
) = sendBotAction(chat, RecordVideoAction)
@Deprecated("Deprecated due to extracting into separated library")
suspend fun RequestsExecutor.sendActionUploadVideo(
chat: Chat
) = sendBotAction(chat, UploadVideoAction)
@Deprecated("Deprecated due to extracting into separated library")
suspend fun RequestsExecutor.sendActionRecordAudio(
chat: Chat
) = sendBotAction(chat, RecordAudioAction)
@Deprecated("Deprecated due to extracting into separated library")
suspend fun RequestsExecutor.sendActionUploadAudio(
chat: Chat
) = sendBotAction(chat, UploadAudioAction)
@Deprecated("Deprecated due to extracting into separated library")
suspend fun RequestsExecutor.sendActionUploadDocument(
chat: Chat
) = sendBotAction(chat, UploadDocumentAction)
@Deprecated("Deprecated due to extracting into separated library")
suspend fun RequestsExecutor.sendActionFindLocation(
chat: Chat
) = sendBotAction(chat, FindLocationAction)
@Deprecated("Deprecated due to extracting into separated library")
suspend fun RequestsExecutor.sendActionRecordVideoNote(
chat: Chat
) = sendBotAction(chat, RecordVideoNoteAction)
@Deprecated("Deprecated due to extracting into separated library")
suspend fun RequestsExecutor.sendActionUploadVideoNote(
chat: Chat
) = sendBotAction(chat, UploadVideoNoteAction)

View File

@ -68,55 +68,3 @@ fun Contact.toRequest(
replyToMessageId,
replyMarkup
)
@Deprecated("Deprecated due to extracting into separated library")
suspend fun RequestsExecutor.sendContact(
chatId: ChatIdentifier,
phoneNumber: String,
firstName: String,
lastName: String? = null,
disableNotification: Boolean = false,
replyToMessageId: MessageIdentifier? = null,
replyMarkup: KeyboardMarkup? = null
) = execute(
SendContact(
chatId, phoneNumber, firstName, lastName, disableNotification, replyToMessageId, replyMarkup
)
)
@Deprecated("Deprecated due to extracting into separated library")
suspend fun RequestsExecutor.sendContact(
chatId: ChatIdentifier,
contact: Contact,
disableNotification: Boolean = false,
replyToMessageId: MessageIdentifier? = null,
replyMarkup: KeyboardMarkup? = null
) = execute(
SendContact(
chatId, contact, disableNotification, replyToMessageId, replyMarkup
)
)
@Deprecated("Deprecated due to extracting into separated library")
suspend fun RequestsExecutor.sendContact(
chat: Chat,
phoneNumber: String,
firstName: String,
lastName: String? = null,
disableNotification: Boolean = false,
replyToMessageId: MessageIdentifier? = null,
replyMarkup: KeyboardMarkup? = null
) = sendContact(
chat.id, phoneNumber, firstName, lastName, disableNotification, replyToMessageId, replyMarkup
)
@Deprecated("Deprecated due to extracting into separated library")
suspend fun RequestsExecutor.sendContact(
chat: Chat,
contact: Contact,
disableNotification: Boolean = false,
replyToMessageId: MessageIdentifier? = null,
replyMarkup: KeyboardMarkup? = null
) = sendContact(
chat.id, contact, disableNotification, replyToMessageId, replyMarkup
)

View File

@ -49,71 +49,3 @@ data class SendLocation(
}
}
}
@Deprecated("Deprecated due to extracting into separated library")
suspend fun RequestsExecutor.sendLocation(
chatId: ChatIdentifier,
latitude: Double,
longitude: Double,
disableNotification: Boolean = false,
replyToMessageId: MessageIdentifier? = null,
replyMarkup: KeyboardMarkup? = null
) = execute(
SendLocation(
chatId,
latitude,
longitude,
disableNotification = disableNotification,
replyToMessageId = replyToMessageId,
replyMarkup = replyMarkup
)
)
@Deprecated("Deprecated due to extracting into separated library")
suspend fun RequestsExecutor.sendLocation(
chatId: ChatIdentifier,
location: Location,
disableNotification: Boolean = false,
replyToMessageId: MessageIdentifier? = null,
replyMarkup: KeyboardMarkup? = null
) = sendLocation(
chatId,
location.latitude,
location.longitude,
disableNotification,
replyToMessageId,
replyMarkup
)
@Deprecated("Deprecated due to extracting into separated library")
suspend fun RequestsExecutor.sendLocation(
chat: Chat,
latitude: Double,
longitude: Double,
disableNotification: Boolean = false,
replyToMessageId: MessageIdentifier? = null,
replyMarkup: KeyboardMarkup? = null
) = sendLocation(
chat.id,
latitude,
longitude,
disableNotification,
replyToMessageId,
replyMarkup
)
@Deprecated("Deprecated due to extracting into separated library")
suspend fun RequestsExecutor.sendLocation(
chat: Chat,
location: Location,
disableNotification: Boolean = false,
replyToMessageId: MessageIdentifier? = null,
replyMarkup: KeyboardMarkup? = null
) = sendLocation(
chat.id,
location.latitude,
location.longitude,
disableNotification,
replyToMessageId,
replyMarkup
)

View File

@ -49,60 +49,3 @@ data class SendTextMessage(
override val requestSerializer: SerializationStrategy<*>
get() = serializer()
}
@Deprecated(
"This declaration is deprecated due violation of common naming rules",
ReplaceWith(
"SendTextMessage"
)
)
typealias SendMessage = SendTextMessage
@Deprecated("Deprecated due to extracting into separated library")
suspend fun RequestsExecutor.sendMessage(
chatId: ChatIdentifier,
text: String,
parseMode: ParseMode? = null,
disableWebPagePreview: Boolean? = null,
disableNotification: Boolean = false,
replyToMessageId: MessageIdentifier? = null,
replyMarkup: KeyboardMarkup? = null
) = execute(
SendTextMessage(chatId, text, parseMode, disableWebPagePreview, disableNotification, replyToMessageId, replyMarkup)
)
@Deprecated("Deprecated due to extracting into separated library")
suspend fun RequestsExecutor.sendTextMessage(
chatId: ChatIdentifier,
text: String,
parseMode: ParseMode? = null,
disableWebPagePreview: Boolean? = null,
disableNotification: Boolean = false,
replyToMessageId: MessageIdentifier? = null,
replyMarkup: KeyboardMarkup? = null
) = sendMessage(
chatId, text, parseMode, disableWebPagePreview, disableNotification, replyToMessageId, replyMarkup
)
@Deprecated("Deprecated due to extracting into separated library")
suspend fun RequestsExecutor.sendMessage(
chat: Chat,
text: String,
parseMode: ParseMode? = null,
disableWebPagePreview: Boolean? = null,
disableNotification: Boolean = false,
replyToMessageId: MessageIdentifier? = null,
replyMarkup: KeyboardMarkup? = null
) = sendMessage(chat.id, text, parseMode, disableWebPagePreview, disableNotification, replyToMessageId, replyMarkup)
@Deprecated("Deprecated due to extracting into separated library")
suspend fun RequestsExecutor.sendTextMessage(
chat: Chat,
text: String,
parseMode: ParseMode? = null,
disableWebPagePreview: Boolean? = null,
disableNotification: Boolean = false,
replyToMessageId: MessageIdentifier? = null,
replyMarkup: KeyboardMarkup? = null
) = sendTextMessage(chat.id, text, parseMode, disableWebPagePreview, disableNotification, replyToMessageId, replyMarkup)

View File

@ -35,49 +35,3 @@ data class SendGame (
override val requestSerializer: SerializationStrategy<*>
get() = serializer()
}
@Deprecated("Deprecated due to extracting into separated library")
suspend fun RequestsExecutor.sendGame(
chatId: ChatIdentifier,
gameShortName: String,
disableNotification: Boolean = false,
replyToMessageId: MessageIdentifier? = null,
replyMarkup: KeyboardMarkup? = null
) = execute(
SendGame(
chatId, gameShortName, disableNotification, replyToMessageId, replyMarkup
)
)
@Deprecated("Deprecated due to extracting into separated library")
suspend fun RequestsExecutor.sendGame(
chat: Chat,
gameShortName: String,
disableNotification: Boolean = false,
replyToMessageId: MessageIdentifier? = null,
replyMarkup: KeyboardMarkup? = null
) = sendGame(
chat.id, gameShortName, disableNotification, replyToMessageId, replyMarkup
)
@Deprecated("Deprecated due to extracting into separated library")
suspend fun RequestsExecutor.sendGame(
chatId: ChatIdentifier,
game: Game,
disableNotification: Boolean = false,
replyToMessageId: MessageIdentifier? = null,
replyMarkup: KeyboardMarkup? = null
) = sendGame(
chatId, game.title, disableNotification, replyToMessageId, replyMarkup
)
@Deprecated("Deprecated due to extracting into separated library")
suspend fun RequestsExecutor.sendGame(
chat: Chat,
game: Game,
disableNotification: Boolean = false,
replyToMessageId: MessageIdentifier? = null,
replyMarkup: KeyboardMarkup? = null
) = sendGame(
chat.id, game.title, disableNotification, replyToMessageId, replyMarkup
)

View File

@ -117,145 +117,3 @@ data class SendAudioFiles internal constructor(
audioField to audio,
thumbField to thumb
)
@Deprecated("Deprecated due to extracting into separated library")
suspend fun RequestsExecutor.sendAudio(
chatId: ChatIdentifier,
audio: FileId,
thumb: FileId? = null,
text: String? = null,
parseMode: ParseMode? = null,
duration: Long? = null,
performer: String? = null,
title: String? = null,
disableNotification: Boolean = false,
replyToMessageId: MessageIdentifier? = null,
replyMarkup: KeyboardMarkup? = null
) = execute(
SendAudioData(
chatId,
audio.fileId,
thumb ?.fileId,
text,
parseMode,
duration,
performer,
title,
disableNotification,
replyToMessageId,
replyMarkup
)
)
@Deprecated("Deprecated due to extracting into separated library")
suspend fun RequestsExecutor.sendAudio(
chatId: ChatIdentifier,
audio: AudioFile,
thumb: PhotoSize? = audio.thumb,
text: String? = null,
parseMode: ParseMode? = null,
title: String? = audio.title,
disableNotification: Boolean = false,
replyToMessageId: MessageIdentifier? = null,
replyMarkup: KeyboardMarkup? = null
) = sendAudio(
chatId, audio.fileId, thumb ?.fileId, text, parseMode, audio.duration, audio.performer, title, disableNotification, replyToMessageId, replyMarkup
)
@Deprecated("Deprecated due to extracting into separated library")
suspend fun RequestsExecutor.sendAudio(
chatId: ChatIdentifier,
audio: MultipartFile,
thumb: FileId? = null,
text: String? = null,
parseMode: ParseMode? = null,
duration: Long? = null,
performer: String? = null,
title: String? = null,
disableNotification: Boolean = false,
replyToMessageId: MessageIdentifier? = null,
replyMarkup: KeyboardMarkup? = null
) = execute(
MultipartRequestImpl(
SendAudioData(
chatId, null, thumb ?.fileId, text, parseMode, duration, performer, title, disableNotification, replyToMessageId, replyMarkup
),
SendAudioFiles(audio)
)
)
@Deprecated("Deprecated due to extracting into separated library")
suspend fun RequestsExecutor.sendAudio(
chatId: ChatIdentifier,
audio: MultipartFile,
thumb: MultipartFile? = null,
text: String? = null,
parseMode: ParseMode? = null,
duration: Long? = null,
performer: String? = null,
title: String? = null,
disableNotification: Boolean = false,
replyToMessageId: MessageIdentifier? = null,
replyMarkup: KeyboardMarkup? = null
) = execute(
MultipartRequestImpl(
SendAudioData(
chatId, null, null, text, parseMode, duration, performer, title, disableNotification, replyToMessageId, replyMarkup
),
SendAudioFiles(audio, thumb)
)
)
@Deprecated("Deprecated due to extracting into separated library")
suspend fun RequestsExecutor.sendAudio(
chatId: ChatIdentifier,
audio: FileId,
thumb: MultipartFile,
text: String? = null,
parseMode: ParseMode? = null,
duration: Long? = null,
performer: String? = null,
title: String? = null,
disableNotification: Boolean = false,
replyToMessageId: MessageIdentifier? = null,
replyMarkup: KeyboardMarkup? = null
) = execute(
MultipartRequestImpl(
SendAudioData(
chatId, audio.fileId, null, text, parseMode, duration, performer, title, disableNotification, replyToMessageId, replyMarkup
),
SendAudioFiles(null, thumb)
)
)
@Deprecated("Deprecated due to extracting into separated library")
suspend fun RequestsExecutor.sendAudio(
chatId: ChatIdentifier,
audio: MultipartFile,
thumb: PhotoSize? = null,
text: String? = null,
parseMode: ParseMode? = null,
duration: Long? = null,
performer: String? = null,
title: String? = null,
disableNotification: Boolean = false,
replyToMessageId: MessageIdentifier? = null,
replyMarkup: KeyboardMarkup? = null
) = sendAudio(
chatId, audio, thumb ?.fileId , text, parseMode, duration, performer, title, disableNotification, replyToMessageId, replyMarkup
)
@Deprecated("Deprecated due to extracting into separated library")
suspend fun RequestsExecutor.sendAudio(
chatId: ChatIdentifier,
audio: AudioFile,
thumb: MultipartFile,
text: String? = null,
parseMode: ParseMode? = null,
title: String? = audio.title,
disableNotification: Boolean = false,
replyToMessageId: MessageIdentifier? = null,
replyMarkup: KeyboardMarkup? = null
) = sendAudio(
chatId, audio.fileId, thumb, text, parseMode, audio.duration, audio.performer, title, disableNotification, replyToMessageId, replyMarkup
)

View File

@ -101,125 +101,3 @@ data class SendDocumentFiles internal constructor(
documentField to document,
thumbField to thumb
)
@Deprecated("Deprecated due to extracting into separated library")
suspend fun RequestsExecutor.sendDocument(
chatId: ChatIdentifier,
document: FileId,
thumb: FileId? = null,
text: String? = null,
parseMode: ParseMode? = null,
disableNotification: Boolean = false,
replyToMessageId: MessageIdentifier? = null,
replyMarkup: KeyboardMarkup? = null
) = execute(
SendDocumentData(
chatId,
document.fileId,
thumb ?.fileId,
text,
parseMode,
disableNotification,
replyToMessageId,
replyMarkup
)
)
@Deprecated("Deprecated due to extracting into separated library")
suspend fun RequestsExecutor.sendDocument(
chatId: ChatIdentifier,
document: DocumentFile,
thumb: PhotoSize? = document.thumb,
text: String? = null,
parseMode: ParseMode? = null,
disableNotification: Boolean = false,
replyToMessageId: MessageIdentifier? = null,
replyMarkup: KeyboardMarkup? = null
) = sendDocument(
chatId, document.fileId, thumb ?.fileId, text, parseMode, disableNotification, replyToMessageId, replyMarkup
)
@Deprecated("Deprecated due to extracting into separated library")
suspend fun RequestsExecutor.sendDocument(
chatId: ChatIdentifier,
document: MultipartFile,
thumb: FileId? = null,
text: String? = null,
parseMode: ParseMode? = null,
disableNotification: Boolean = false,
replyToMessageId: MessageIdentifier? = null,
replyMarkup: KeyboardMarkup? = null
) = execute(
MultipartRequestImpl(
SendDocumentData(
chatId, null, thumb ?.fileId, text, parseMode, disableNotification, replyToMessageId, replyMarkup
),
SendDocumentFiles(document)
)
)
@Deprecated("Deprecated due to extracting into separated library")
suspend fun RequestsExecutor.sendDocument(
chatId: ChatIdentifier,
document: MultipartFile,
thumb: MultipartFile? = null,
text: String? = null,
parseMode: ParseMode? = null,
disableNotification: Boolean = false,
replyToMessageId: MessageIdentifier? = null,
replyMarkup: KeyboardMarkup? = null
) = execute(
MultipartRequestImpl(
SendDocumentData(
chatId, null, null, text, parseMode, disableNotification, replyToMessageId, replyMarkup
),
SendDocumentFiles(document, thumb)
)
)
@Deprecated("Deprecated due to extracting into separated library")
suspend fun RequestsExecutor.sendDocument(
chatId: ChatIdentifier,
document: FileId,
thumb: MultipartFile,
text: String? = null,
parseMode: ParseMode? = null,
disableNotification: Boolean = false,
replyToMessageId: MessageIdentifier? = null,
replyMarkup: KeyboardMarkup? = null
) = execute(
MultipartRequestImpl(
SendDocumentData(
chatId, document.fileId, null, text, parseMode, disableNotification, replyToMessageId, replyMarkup
),
SendDocumentFiles(null, thumb)
)
)
@Deprecated("Deprecated due to extracting into separated library")
suspend fun RequestsExecutor.sendDocument(
chatId: ChatIdentifier,
document: MultipartFile,
thumb: PhotoSize? = null,
text: String? = null,
parseMode: ParseMode? = null,
disableNotification: Boolean = false,
replyToMessageId: MessageIdentifier? = null,
replyMarkup: KeyboardMarkup? = null
) = sendDocument(
chatId, document, thumb ?.fileId , text, parseMode, disableNotification, replyToMessageId, replyMarkup
)
@Deprecated("Deprecated due to extracting into separated library")
suspend fun RequestsExecutor.sendDocument(
chatId: ChatIdentifier,
document: DocumentFile,
thumb: MultipartFile,
text: String? = null,
parseMode: ParseMode? = null,
disableNotification: Boolean = false,
replyToMessageId: MessageIdentifier? = null,
replyMarkup: KeyboardMarkup? = null
) = sendDocument(
chatId, document.fileId, thumb, text, parseMode, disableNotification, replyToMessageId, replyMarkup
)

View File

@ -114,137 +114,3 @@ data class SendVideoNoteFiles internal constructor(
videoNoteField to videoNote,
thumbField to thumb
)
@Deprecated("Deprecated due to extracting into separated library")
suspend fun RequestsExecutor.sendVideoNote(
chatId: ChatIdentifier,
videoNote: FileId,
thumb: FileId? = null,
text: String? = null,
parseMode: ParseMode? = null,
duration: Long? = null,
size: Int? = null,
disableNotification: Boolean = false,
replyToMessageId: MessageIdentifier? = null,
replyMarkup: KeyboardMarkup? = null
) = execute(
SendVideoNoteData(
chatId,
videoNote.fileId,
thumb ?.fileId,
text,
parseMode,
duration,
size,
disableNotification,
replyToMessageId,
replyMarkup
)
)
@Deprecated("Deprecated due to extracting into separated library")
suspend fun RequestsExecutor.sendVideoNote(
chatId: ChatIdentifier,
videoNote: VideoFile,
thumb: PhotoSize? = videoNote.thumb,
text: String? = null,
parseMode: ParseMode? = null,
disableNotification: Boolean = false,
replyToMessageId: MessageIdentifier? = null,
replyMarkup: KeyboardMarkup? = null
) = sendVideoNote(
chatId, videoNote.fileId, thumb ?.fileId, text, parseMode, videoNote.duration, videoNote.width, disableNotification, replyToMessageId, replyMarkup
)
@Deprecated("Deprecated due to extracting into separated library")
suspend fun RequestsExecutor.sendVideoNote(
chatId: ChatIdentifier,
videoNote: MultipartFile,
thumb: FileId? = null,
text: String? = null,
parseMode: ParseMode? = null,
duration: Long? = null,
size: Int? = null,
disableNotification: Boolean = false,
replyToMessageId: MessageIdentifier? = null,
replyMarkup: KeyboardMarkup? = null
) = execute(
MultipartRequestImpl(
SendVideoNoteData(
chatId, null, thumb ?.fileId, text, parseMode, duration, size, disableNotification, replyToMessageId, replyMarkup
),
SendVideoNoteFiles(videoNote)
)
)
@Deprecated("Deprecated due to extracting into separated library")
suspend fun RequestsExecutor.sendVideoNote(
chatId: ChatIdentifier,
videoNote: MultipartFile,
thumb: MultipartFile? = null,
text: String? = null,
parseMode: ParseMode? = null,
duration: Long? = null,
size: Int? = null,
disableNotification: Boolean = false,
replyToMessageId: MessageIdentifier? = null,
replyMarkup: KeyboardMarkup? = null
) = execute(
MultipartRequestImpl(
SendVideoNoteData(
chatId, null, null, text, parseMode, duration, size, disableNotification, replyToMessageId, replyMarkup
),
SendVideoNoteFiles(videoNote, thumb)
)
)
@Deprecated("Deprecated due to extracting into separated library")
suspend fun RequestsExecutor.sendVideoNote(
chatId: ChatIdentifier,
videoNote: FileId,
thumb: MultipartFile,
text: String? = null,
parseMode: ParseMode? = null,
duration: Long? = null,
size: Int? = null,
disableNotification: Boolean = false,
replyToMessageId: MessageIdentifier? = null,
replyMarkup: KeyboardMarkup? = null
) = execute(
MultipartRequestImpl(
SendVideoNoteData(
chatId, videoNote.fileId, null, text, parseMode, duration, size, disableNotification, replyToMessageId, replyMarkup
),
SendVideoNoteFiles(null, thumb)
)
)
@Deprecated("Deprecated due to extracting into separated library")
suspend fun RequestsExecutor.sendVideoNote(
chatId: ChatIdentifier,
videoNote: MultipartFile,
thumb: PhotoSize? = null,
text: String? = null,
parseMode: ParseMode? = null,
duration: Long? = null,
size: Int? = null,
disableNotification: Boolean = false,
replyToMessageId: MessageIdentifier? = null,
replyMarkup: KeyboardMarkup? = null
) = sendVideoNote(
chatId, videoNote, thumb ?.fileId , text, parseMode, duration, size, disableNotification, replyToMessageId, replyMarkup
)
@Deprecated("Deprecated due to extracting into separated library")
suspend fun RequestsExecutor.sendVideoNote(
chatId: ChatIdentifier,
videoNote: VideoFile,
thumb: MultipartFile,
text: String? = null,
parseMode: ParseMode? = null,
disableNotification: Boolean = false,
replyToMessageId: MessageIdentifier? = null,
replyMarkup: KeyboardMarkup? = null
) = sendVideoNote(
chatId, videoNote.fileId, thumb, text, parseMode, videoNote.duration, videoNote.width, disableNotification, replyToMessageId, replyMarkup
)

View File

@ -52,56 +52,3 @@ data class CreateNewStickerSet internal constructor(
override fun method(): String = "createNewStickerSet"
}
@Deprecated("Deprecated due to extracting into separated library")
suspend fun RequestsExecutor.createNewStickerSet(
userId: UserId,
name: String,
sticker: FileId,
emojis: String,
containsMasks: Boolean? = null,
maskPosition: MaskPosition? = null
) = execute(
CreateNewStickerSet(userId, name, emojis, sticker, containsMasks, maskPosition)
)
@Deprecated("Deprecated due to extracting into separated library")
suspend fun RequestsExecutor.createNewStickerSet(
userId: UserId,
name: String,
sticker: MultipartFile,
emojis: String,
containsMasks: Boolean? = null,
maskPosition: MaskPosition? = null
) = execute(
CommonMultipartFileRequest(
CreateNewStickerSet(userId, name, emojis, null, containsMasks, maskPosition),
mapOf(pngStickerField to sticker)
)
)
@Deprecated("Deprecated due to extracting into separated library")
suspend fun RequestsExecutor.createNewStickerSet(
user: CommonUser,
name: String,
sticker: FileId,
emojis: String,
containsMasks: Boolean? = null,
maskPosition: MaskPosition? = null
) = createNewStickerSet(
user.id, name, sticker, emojis, containsMasks, maskPosition
)
@Deprecated("Deprecated due to extracting into separated library")
suspend fun RequestsExecutor.createNewStickerSet(
user: CommonUser,
name: String,
sticker: MultipartFile,
emojis: String,
containsMasks: Boolean? = null,
maskPosition: MaskPosition? = null
) = createNewStickerSet(
user.id, name, sticker, emojis, containsMasks, maskPosition
)

View File

@ -19,21 +19,3 @@ data class DeleteStickerFromSet(
override val requestSerializer: SerializationStrategy<*>
get() = serializer()
}
@Deprecated("Deprecated due to extracting into separated library")
suspend fun RequestsExecutor.deleteStickerFromSet(
sticker: FileId
) = execute(
DeleteStickerFromSet(
sticker
)
)
@Deprecated("Deprecated due to extracting into separated library")
suspend fun RequestsExecutor.deleteStickerFromSet(
sticker: Sticker
) = deleteStickerFromSet(
sticker.fileId
)

View File

@ -28,23 +28,3 @@ data class SetStickerPositionInSet(
override val requestSerializer: SerializationStrategy<*>
get() = serializer()
}
@Deprecated("Deprecated due to extracting into separated library")
suspend fun RequestsExecutor.setStickerPositionInSet(
sticker: FileId,
position: Int
) = execute(
SetStickerPositionInSet(
sticker,
position
)
)
@Deprecated("Deprecated due to extracting into separated library")
suspend fun RequestsExecutor.setStickerPositionInSet(
sticker: Sticker,
position: Int
) = setStickerPositionInSet(
sticker.fileId,
position
)

View File

@ -28,20 +28,3 @@ data class UploadStickerFile(
override val resultDeserializer: DeserializationStrategy<File>
get() = File.serializer()
}
@Deprecated("Deprecated due to extracting into separated library")
suspend fun RequestsExecutor.uploadStickerFile(
userId: UserId,
sticker: MultipartFile
) = execute(
UploadStickerFile(userId, sticker)
)
@Deprecated("Deprecated due to extracting into separated library")
suspend fun RequestsExecutor.uploadStickerFile(
user: CommonUser,
sticker: MultipartFile
) = execute(
UploadStickerFile(user.id, sticker)
)

View File

@ -65,30 +65,3 @@ data class SetWebhook internal constructor(
}
}
}
@Deprecated("Deprecated due to extracting into separated library")
suspend fun RequestsExecutor.setWebhookInfo(
url: String,
certificate: FileId,
maxAllowedConnections: Int? = null,
allowedUpdates: List<String>? = null
) = execute(
SetWebhook(
url, certificate.fileId, maxAllowedConnections, allowedUpdates
)
)
@Deprecated("Deprecated due to extracting into separated library")
suspend fun RequestsExecutor.setWebhookInfo(
url: String,
certificate: MultipartFile,
maxAllowedConnections: Int? = null,
allowedUpdates: List<String>? = null
) = execute(
MultipartRequestImpl(
SetWebhook(
url, null, maxAllowedConnections, allowedUpdates
),
mapOf(certificateField to certificate)
)
)

View File

@ -7,6 +7,6 @@ uuid_version=0.0.7
ktor_version=1.3.1
library_group=com.github.insanusmokrassar
library_version=0.23.3
library_version=0.24.0
gradle_bintray_plugin_version=1.8.4