MadelineProtoDocs/docs/get_dialogs.md

27 lines
447 B
Markdown
Raw Normal View History

2018-04-01 13:19:25 +02:00
---
title: get_dialogs
description: get_dialogs parameters, return type and example
---
## Method: get_dialogs
Gets full list of dialogs
### Return type: Array of [Peer objects](API_docs/types/Peer.md)
### Example:
```php
2019-06-01 17:42:45 +02:00
$MadelineProto = new \danog\MadelineProto\API('session.madeline');
2018-04-01 13:19:25 +02:00
$MadelineProto->start();
2019-06-01 17:42:45 +02:00
$Peers = [yield](ASYNC.html) $MadelineProto->get_dialogs();
2018-04-01 13:19:25 +02:00
```
Or, if you're into Lua:
```lua
2018-04-01 13:19:25 +02:00
Peers = get_dialogs()
```