getTopPeers method
Get Top Peers.
ID: 973478b6
.
Implementation
Future<Result<ContactsTopPeersBase>> getTopPeers({
required bool correspondents,
required bool botsPm,
required bool botsInline,
required bool phoneCalls,
required bool forwardUsers,
required bool forwardChats,
required bool groups,
required bool channels,
required int offset,
required int limit,
required int hash,
}) async {
// Preparing the request.
final request = ContactsGetTopPeers(
correspondents: correspondents,
botsPm: botsPm,
botsInline: botsInline,
phoneCalls: phoneCalls,
forwardUsers: forwardUsers,
forwardChats: forwardChats,
groups: groups,
channels: channels,
offset: offset,
limit: limit,
hash: hash,
);
// Invoke and wait for response.
final response = await _c.invoke(request);
// Return the result.
return response._to<ContactsTopPeersBase>();
}