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

add get user profile photos extensions

This commit is contained in:
InsanusMokrassar 2020-02-06 23:08:13 +06:00
parent cc433d4091
commit b4d0ca507b

View File

@ -1,5 +1,6 @@
package com.github.insanusmokrassar.TelegramBotAPI.requests.get
import com.github.insanusmokrassar.TelegramBotAPI.bot.RequestsExecutor
import com.github.insanusmokrassar.TelegramBotAPI.requests.abstracts.SimpleRequest
import com.github.insanusmokrassar.TelegramBotAPI.types.*
import kotlinx.serialization.*
@ -28,3 +29,19 @@ data class GetUserProfilePhotos(
override val requestSerializer: SerializationStrategy<*>
get() = serializer()
}
suspend fun RequestsExecutor.getUserProfilePhotos(
userId: UserId,
offset: Int? = null,
limit: Int? = null
) = execute(
GetUserProfilePhotos(
userId, offset, limit
)
)
suspend fun RequestsExecutor.getUserProfilePhotos(
user: User,
offset: Int? = null,
limit: Int? = null
) = getUserProfilePhotos(user.id, offset, limit)