mirror of
https://github.com/InsanusMokrassar/TelegramBotAPI.git
synced 2025-09-03 07:09:23 +00:00
add get user profile photos extensions
This commit is contained in:
@@ -1,5 +1,6 @@
|
|||||||
package com.github.insanusmokrassar.TelegramBotAPI.requests.get
|
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.requests.abstracts.SimpleRequest
|
||||||
import com.github.insanusmokrassar.TelegramBotAPI.types.*
|
import com.github.insanusmokrassar.TelegramBotAPI.types.*
|
||||||
import kotlinx.serialization.*
|
import kotlinx.serialization.*
|
||||||
@@ -28,3 +29,19 @@ data class GetUserProfilePhotos(
|
|||||||
override val requestSerializer: SerializationStrategy<*>
|
override val requestSerializer: SerializationStrategy<*>
|
||||||
get() = serializer()
|
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)
|
||||||
|
Reference in New Issue
Block a user