java在td中怎么用if,java – 如何在tdlib中使用getChats

方法“getchats”返回聊天列表.我不知道如何使用这种方法

getchats有3个参数:

offset_order,offset_chat_id,limit

限制是服务器发送到我的应用程序的最大聊天数.

什么是offset_order和offset_chat_id?

我只能找到关于这种方法的简短文档

Returns list of chats in the right order, chats are sorted by (order, chat_id) in decreasing order. For example, to get list of chats from the beginning, the offset_order should be equal 2^63 - 1

@offset_order Chat order to return chats from

@offset_chat_id Chat identifier to return chats from

@limit Maximum number of chats to be returned

最佳答案 (谷歌翻译)

answer官方技术支持:

Chats sorted in descending order a pair (offsetOrder, offsetChatId). offsetOrder – a parameter for sorting of chats, controlled library. When Order equality, chat to sort in descending order of ChatId. The first request to get a list from the beginning, you need to transfer very large offsetOrder, for example, 2 ^ 63 – 1.

if offsetOrder is 2 ^ 63 – 1, offsetChatId does not matter, you can pass 0. Request new GetChats (9223372036854775807L, 0, 10) should return the first 10 conversations.

It is necessary to transmit and chat.order chat.id last returned to the GetChats chat to receive next chats. It is also worth remembering that the order of chats can change, so you need to keep these values ​​at the time of obtaining the result GetChats.

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值