getTopPeers method

Future<Result<ContactsTopPeersBase>> getTopPeers({
  1. required bool correspondents,
  2. required bool botsPm,
  3. required bool botsInline,
  4. required bool phoneCalls,
  5. required bool forwardUsers,
  6. required bool forwardChats,
  7. required bool groups,
  8. required bool channels,
  9. required int offset,
  10. required int limit,
  11. required int hash,
})

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>();
}