Update docs

This commit is contained in:
Daniil Gentili 2020-10-18 14:51:27 +02:00
parent 0510e69e08
commit 0750b98a98
Signed by: danog
GPG Key ID: 8C1BE3B34B230CA7
16 changed files with 223 additions and 110 deletions

View File

@ -117,7 +117,7 @@ Main API wrapper for MadelineProto.
* `getMimeFromFile(string $file): string` * `getMimeFromFile(string $file): string`
* `getPropicInfo(mixed $messageMedia): \Amp\Promise<array>` * `getPropicInfo(mixed $messageMedia): \Amp\Promise<array>`
* `getPsrLogger()` * `getPsrLogger()`
* `getPwrChat(mixed $id): \Amp\Promise<array> Chat object` * `getPwrChat(mixed $id): \Amp\Promise Chat object`
* `getSecretChat(array|int $chat): mixed` * `getSecretChat(array|int $chat): mixed`
* `getSelf(): array|bool` * `getSelf(): array|bool`
* `getSettings(): mixed` * `getSettings(): mixed`
@ -1329,7 +1329,8 @@ Return value: Info object
Fully typed return value: Fully typed return value:
``` ```
\Generator<int|mixed, \Amp\Promise|\Amp\Promise<string>|array, mixed, array{InputPeer: array{_: string, user_id?: mixed, access_hash?: mixed, min?: mixed, chat_id?: mixed, channel_id?: mixed}, Peer: array{_: string, user_id?: mixed, chat_id?: mixed, channel_id?: mixed}, DialogPeer: array{_: string, peer: array{_: string, user_id?: mixed, chat_id?: mixed, channel_id?: mixed}}, NotifyPeer: array{_: string, peer: array{_: string, user_id?: mixed, chat_id?: mixed, channel_id?: mixed}}, InputDialogPeer: array{_: string, peer: array{_: string, user_id?: mixed, access_hash?: mixed, min?: mixed, chat_id?: mixed, channel_id?: mixed}}, InputNotifyPeer: array{_: string, peer: array{_: string, user_id?: mixed, access_hash?: mixed, min?: mixed, chat_id?: mixed, channel_id?: mixed}}, bot_api_id: int|string, user_id?: int, chat_id?: int, channel_id?: int, InputUser?: array{_: string, user_id?: int, access_hash?: mixed, min?: bool}, InputChannel?: array{_: string, channel_id: int, access_hash: mixed, min: bool}, type: string}> \Generator<int|mixed, \Amp\Promise|\Amp\Promise<string>|array, mixed, array{TConstructor: \array
InputPeer: array{_: string, user_id?: mixed, access_hash?: mixed, min?: mixed, chat_id?: mixed, channel_id?: mixed}, Peer: array{_: string, user_id?: mixed, chat_id?: mixed, channel_id?: mixed}, DialogPeer: array{_: string, peer: array{_: string, user_id?: mixed, chat_id?: mixed, channel_id?: mixed}}, NotifyPeer: array{_: string, peer: array{_: string, user_id?: mixed, chat_id?: mixed, channel_id?: mixed}}, InputDialogPeer: array{_: string, peer: array{_: string, user_id?: mixed, access_hash?: mixed, min?: mixed, chat_id?: mixed, channel_id?: mixed}}, InputNotifyPeer: array{_: string, peer: array{_: string, user_id?: mixed, access_hash?: mixed, min?: mixed, chat_id?: mixed, channel_id?: mixed}}, bot_api_id: int|string, user_id?: int, chat_id?: int, channel_id?: int, InputUser?: array{_: string, user_id?: int, access_hash?: mixed, min?: bool}, InputChannel?: array{_: string, channel_id: int, access_hash: mixed, min: bool}, type: string}>
``` ```
#### See also: #### See also:
* [https://docs.madelineproto.xyz/Info.html](https://docs.madelineproto.xyz/Info.html) * [https://docs.madelineproto.xyz/Info.html](https://docs.madelineproto.xyz/Info.html)
@ -1431,7 +1432,7 @@ Get PSR logger.
### `getPwrChat(mixed $id): \Amp\Promise<array> Chat object` ### `getPwrChat(mixed $id): \Amp\Promise Chat object`
Get full info about peer (including full list of channel members), returns a Chat object. Get full info about peer (including full list of channel members), returns a Chat object.

View File

@ -96,7 +96,7 @@ Event handler.
* `getMimeFromFile(string $file): string` * `getMimeFromFile(string $file): string`
* `getPropicInfo(mixed $messageMedia): \Amp\Promise<array>` * `getPropicInfo(mixed $messageMedia): \Amp\Promise<array>`
* `getPsrLogger()` * `getPsrLogger()`
* `getPwrChat(mixed $id): \Amp\Promise<array> Chat object` * `getPwrChat(mixed $id): \Amp\Promise Chat object`
* `getSecretChat(array|int $chat): mixed` * `getSecretChat(array|int $chat): mixed`
* `getSelf(): array|bool` * `getSelf(): array|bool`
* `getSettings(): mixed` * `getSettings(): mixed`
@ -1287,7 +1287,8 @@ Return value: Info object
Fully typed return value: Fully typed return value:
``` ```
\Generator<int|mixed, \Amp\Promise|\Amp\Promise<string>|array, mixed, array{InputPeer: array{_: string, user_id?: mixed, access_hash?: mixed, min?: mixed, chat_id?: mixed, channel_id?: mixed}, Peer: array{_: string, user_id?: mixed, chat_id?: mixed, channel_id?: mixed}, DialogPeer: array{_: string, peer: array{_: string, user_id?: mixed, chat_id?: mixed, channel_id?: mixed}}, NotifyPeer: array{_: string, peer: array{_: string, user_id?: mixed, chat_id?: mixed, channel_id?: mixed}}, InputDialogPeer: array{_: string, peer: array{_: string, user_id?: mixed, access_hash?: mixed, min?: mixed, chat_id?: mixed, channel_id?: mixed}}, InputNotifyPeer: array{_: string, peer: array{_: string, user_id?: mixed, access_hash?: mixed, min?: mixed, chat_id?: mixed, channel_id?: mixed}}, bot_api_id: int|string, user_id?: int, chat_id?: int, channel_id?: int, InputUser?: array{_: string, user_id?: int, access_hash?: mixed, min?: bool}, InputChannel?: array{_: string, channel_id: int, access_hash: mixed, min: bool}, type: string}> \Generator<int|mixed, \Amp\Promise|\Amp\Promise<string>|array, mixed, array{TConstructor: \array
InputPeer: array{_: string, user_id?: mixed, access_hash?: mixed, min?: mixed, chat_id?: mixed, channel_id?: mixed}, Peer: array{_: string, user_id?: mixed, chat_id?: mixed, channel_id?: mixed}, DialogPeer: array{_: string, peer: array{_: string, user_id?: mixed, chat_id?: mixed, channel_id?: mixed}}, NotifyPeer: array{_: string, peer: array{_: string, user_id?: mixed, chat_id?: mixed, channel_id?: mixed}}, InputDialogPeer: array{_: string, peer: array{_: string, user_id?: mixed, access_hash?: mixed, min?: mixed, chat_id?: mixed, channel_id?: mixed}}, InputNotifyPeer: array{_: string, peer: array{_: string, user_id?: mixed, access_hash?: mixed, min?: mixed, chat_id?: mixed, channel_id?: mixed}}, bot_api_id: int|string, user_id?: int, chat_id?: int, channel_id?: int, InputUser?: array{_: string, user_id?: int, access_hash?: mixed, min?: bool}, InputChannel?: array{_: string, channel_id: int, access_hash: mixed, min: bool}, type: string}>
``` ```
#### See also: #### See also:
* [https://docs.madelineproto.xyz/Info.html](https://docs.madelineproto.xyz/Info.html) * [https://docs.madelineproto.xyz/Info.html](https://docs.madelineproto.xyz/Info.html)
@ -1389,7 +1390,7 @@ Get PSR logger.
### `getPwrChat(mixed $id): \Amp\Promise<array> Chat object` ### `getPwrChat(mixed $id): \Amp\Promise Chat object`
Get full info about peer (including full list of channel members), returns a Chat object. Get full info about peer (including full list of channel members), returns a Chat object.

View File

@ -116,7 +116,7 @@ Main API wrapper for MadelineProto.
* `getMimeFromFile(string $file): string` * `getMimeFromFile(string $file): string`
* `getPropicInfo(mixed $messageMedia): \Amp\Promise<array>` * `getPropicInfo(mixed $messageMedia): \Amp\Promise<array>`
* `getPsrLogger()` * `getPsrLogger()`
* `getPwrChat(mixed $id): \Amp\Promise<array> Chat object` * `getPwrChat(mixed $id): \Amp\Promise Chat object`
* `getSecretChat(array|int $chat): mixed` * `getSecretChat(array|int $chat): mixed`
* `getSelf(): array|bool` * `getSelf(): array|bool`
* `getSettings(): mixed` * `getSettings(): mixed`
@ -1328,7 +1328,8 @@ Return value: Info object
Fully typed return value: Fully typed return value:
``` ```
\Generator<int|mixed, \Amp\Promise|\Amp\Promise<string>|array, mixed, array{InputPeer: array{_: string, user_id?: mixed, access_hash?: mixed, min?: mixed, chat_id?: mixed, channel_id?: mixed}, Peer: array{_: string, user_id?: mixed, chat_id?: mixed, channel_id?: mixed}, DialogPeer: array{_: string, peer: array{_: string, user_id?: mixed, chat_id?: mixed, channel_id?: mixed}}, NotifyPeer: array{_: string, peer: array{_: string, user_id?: mixed, chat_id?: mixed, channel_id?: mixed}}, InputDialogPeer: array{_: string, peer: array{_: string, user_id?: mixed, access_hash?: mixed, min?: mixed, chat_id?: mixed, channel_id?: mixed}}, InputNotifyPeer: array{_: string, peer: array{_: string, user_id?: mixed, access_hash?: mixed, min?: mixed, chat_id?: mixed, channel_id?: mixed}}, bot_api_id: int|string, user_id?: int, chat_id?: int, channel_id?: int, InputUser?: array{_: string, user_id?: int, access_hash?: mixed, min?: bool}, InputChannel?: array{_: string, channel_id: int, access_hash: mixed, min: bool}, type: string}> \Generator<int|mixed, \Amp\Promise|\Amp\Promise<string>|array, mixed, array{TConstructor: \array
InputPeer: array{_: string, user_id?: mixed, access_hash?: mixed, min?: mixed, chat_id?: mixed, channel_id?: mixed}, Peer: array{_: string, user_id?: mixed, chat_id?: mixed, channel_id?: mixed}, DialogPeer: array{_: string, peer: array{_: string, user_id?: mixed, chat_id?: mixed, channel_id?: mixed}}, NotifyPeer: array{_: string, peer: array{_: string, user_id?: mixed, chat_id?: mixed, channel_id?: mixed}}, InputDialogPeer: array{_: string, peer: array{_: string, user_id?: mixed, access_hash?: mixed, min?: mixed, chat_id?: mixed, channel_id?: mixed}}, InputNotifyPeer: array{_: string, peer: array{_: string, user_id?: mixed, access_hash?: mixed, min?: mixed, chat_id?: mixed, channel_id?: mixed}}, bot_api_id: int|string, user_id?: int, chat_id?: int, channel_id?: int, InputUser?: array{_: string, user_id?: int, access_hash?: mixed, min?: bool}, InputChannel?: array{_: string, channel_id: int, access_hash: mixed, min: bool}, type: string}>
``` ```
#### See also: #### See also:
* [https://docs.madelineproto.xyz/Info.html](https://docs.madelineproto.xyz/Info.html) * [https://docs.madelineproto.xyz/Info.html](https://docs.madelineproto.xyz/Info.html)
@ -1430,7 +1431,7 @@ Get PSR logger.
### `getPwrChat(mixed $id): \Amp\Promise<array> Chat object` ### `getPwrChat(mixed $id): \Amp\Promise Chat object`
Get full info about peer (including full list of channel members), returns a Chat object. Get full info about peer (including full list of channel members), returns a Chat object.

View File

@ -174,7 +174,7 @@ Parameters:
#### See also: #### See also:
* [`\danog\MadelineProto\Connection`: Connection class.](./Connection.md) * `\danog\MadelineProto\Connection`
@ -189,7 +189,7 @@ Parameters:
#### See also: #### See also:
* [`\danog\MadelineProto\Connection`: Connection class.](./Connection.md) * `\danog\MadelineProto\Connection`
@ -209,7 +209,7 @@ Fully typed return value:
``` ```
#### See also: #### See also:
* `\Amp\Promise` * `\Amp\Promise`
* [`\danog\MadelineProto\Connection`: Connection class.](./Connection.md) * `\danog\MadelineProto\Connection`
* `\Generator` * `\Generator`

View File

@ -321,7 +321,7 @@ Get connection for authorization.
#### See also: #### See also:
* [`\danog\MadelineProto\Connection`: Connection class.](./Connection.md) * `\danog\MadelineProto\Connection`
@ -347,7 +347,7 @@ Fully typed return value:
``` ```
#### See also: #### See also:
* `\Amp\Promise` * `\Amp\Promise`
* [`\danog\MadelineProto\Connection`: Connection class.](./Connection.md) * `\danog\MadelineProto\Connection`
* `\Generator` * `\Generator`
@ -363,7 +363,7 @@ Parameters:
#### See also: #### See also:
* [`\danog\MadelineProto\Connection`: Connection class.](./Connection.md) * `\danog\MadelineProto\Connection`

View File

@ -95,7 +95,7 @@ Event handler.
* `getMimeFromFile(string $file): string` * `getMimeFromFile(string $file): string`
* `getPropicInfo(mixed $messageMedia): \Amp\Promise<array>` * `getPropicInfo(mixed $messageMedia): \Amp\Promise<array>`
* `getPsrLogger()` * `getPsrLogger()`
* `getPwrChat(mixed $id): \Amp\Promise<array> Chat object` * `getPwrChat(mixed $id): \Amp\Promise Chat object`
* `getSecretChat(array|int $chat): mixed` * `getSecretChat(array|int $chat): mixed`
* `getSelf(): array|bool` * `getSelf(): array|bool`
* `getSettings(): mixed` * `getSettings(): mixed`
@ -1286,7 +1286,8 @@ Return value: Info object
Fully typed return value: Fully typed return value:
``` ```
\Generator<int|mixed, \Amp\Promise|\Amp\Promise<string>|array, mixed, array{InputPeer: array{_: string, user_id?: mixed, access_hash?: mixed, min?: mixed, chat_id?: mixed, channel_id?: mixed}, Peer: array{_: string, user_id?: mixed, chat_id?: mixed, channel_id?: mixed}, DialogPeer: array{_: string, peer: array{_: string, user_id?: mixed, chat_id?: mixed, channel_id?: mixed}}, NotifyPeer: array{_: string, peer: array{_: string, user_id?: mixed, chat_id?: mixed, channel_id?: mixed}}, InputDialogPeer: array{_: string, peer: array{_: string, user_id?: mixed, access_hash?: mixed, min?: mixed, chat_id?: mixed, channel_id?: mixed}}, InputNotifyPeer: array{_: string, peer: array{_: string, user_id?: mixed, access_hash?: mixed, min?: mixed, chat_id?: mixed, channel_id?: mixed}}, bot_api_id: int|string, user_id?: int, chat_id?: int, channel_id?: int, InputUser?: array{_: string, user_id?: int, access_hash?: mixed, min?: bool}, InputChannel?: array{_: string, channel_id: int, access_hash: mixed, min: bool}, type: string}> \Generator<int|mixed, \Amp\Promise|\Amp\Promise<string>|array, mixed, array{TConstructor: \array
InputPeer: array{_: string, user_id?: mixed, access_hash?: mixed, min?: mixed, chat_id?: mixed, channel_id?: mixed}, Peer: array{_: string, user_id?: mixed, chat_id?: mixed, channel_id?: mixed}, DialogPeer: array{_: string, peer: array{_: string, user_id?: mixed, chat_id?: mixed, channel_id?: mixed}}, NotifyPeer: array{_: string, peer: array{_: string, user_id?: mixed, chat_id?: mixed, channel_id?: mixed}}, InputDialogPeer: array{_: string, peer: array{_: string, user_id?: mixed, access_hash?: mixed, min?: mixed, chat_id?: mixed, channel_id?: mixed}}, InputNotifyPeer: array{_: string, peer: array{_: string, user_id?: mixed, access_hash?: mixed, min?: mixed, chat_id?: mixed, channel_id?: mixed}}, bot_api_id: int|string, user_id?: int, chat_id?: int, channel_id?: int, InputUser?: array{_: string, user_id?: int, access_hash?: mixed, min?: bool}, InputChannel?: array{_: string, channel_id: int, access_hash: mixed, min: bool}, type: string}>
``` ```
#### See also: #### See also:
* [https://docs.madelineproto.xyz/Info.html](https://docs.madelineproto.xyz/Info.html) * [https://docs.madelineproto.xyz/Info.html](https://docs.madelineproto.xyz/Info.html)
@ -1388,7 +1389,7 @@ Get PSR logger.
### `getPwrChat(mixed $id): \Amp\Promise<array> Chat object` ### `getPwrChat(mixed $id): \Amp\Promise Chat object`
Get full info about peer (including full list of channel members), returns a Chat object. Get full info about peer (including full list of channel members), returns a Chat object.

View File

@ -16,8 +16,8 @@ Manages acknowledgement of messages.
## Method list: ## Method list:
* `ackOutgoingMessageId(string|int $message_id): bool` * `ackOutgoingMessageId(string|int $message_id): bool`
* `gotResponseForOutgoingMessageId(string|int $message_id): bool` * `gotResponseForOutgoingMessage(\danog\MadelineProto\MTProto\OutgoingMessage $message): void`
* `ackIncomingMessageId(string|int $message_id): bool` * `ackIncomingMessage(\danog\MadelineProto\MTProto\IncomingMessage $message): void`
* `hasPendingCalls(): bool` * `hasPendingCalls(): bool`
* `getPendingCalls(): array` * `getPendingCalls(): array`
@ -32,23 +32,33 @@ Parameters:
### `gotResponseForOutgoingMessageId(string|int $message_id): bool` ### `gotResponseForOutgoingMessage(\danog\MadelineProto\MTProto\OutgoingMessage $message): void`
We have gotten response for outgoing message ID. We have gotten a response for an outgoing message.
Parameters: Parameters:
* `$message_id`: `string|int` Message ID * `$message`: `\danog\MadelineProto\MTProto\OutgoingMessage` Message
#### See also:
* `\danog\MadelineProto\MTProto\OutgoingMessage`
### `ackIncomingMessageId(string|int $message_id): bool`
### `ackIncomingMessage(\danog\MadelineProto\MTProto\IncomingMessage $message): void`
Acknowledge incoming message ID. Acknowledge incoming message ID.
Parameters: Parameters:
* `$message_id`: `string|int` Message ID * `$message`: `\danog\MadelineProto\MTProto\IncomingMessage` Message
#### See also:
* `\danog\MadelineProto\MTProto\IncomingMessage`

View File

@ -19,6 +19,7 @@ Manages message ids.
* `checkMessageId(string $newMessageId, array $aargs): void` * `checkMessageId(string $newMessageId, array $aargs): void`
* `generateMessageId(): string` * `generateMessageId(): string`
* `getMaxId(bool $incoming): mixed` * `getMaxId(bool $incoming): mixed`
* `toString(string $messageId): string`
## Methods: ## Methods:
### `createInstance(\danog\MadelineProto\Connection $session): self` ### `createInstance(\danog\MadelineProto\Connection $session): self`
@ -31,7 +32,7 @@ Parameters:
#### See also: #### See also:
* [`\danog\MadelineProto\Connection`: Connection class.](../Connection.md) * `\danog\MadelineProto\Connection`
@ -63,5 +64,15 @@ Parameters:
### `toString(string $messageId): string`
Get readable representation of message ID.
Parameters:
* `$messageId`: `string`
--- ---
Generated by [danog/phpdoc](https://phpdoc.daniil.it) Generated by [danog/phpdoc](https://phpdoc.daniil.it)

View File

@ -20,6 +20,7 @@ Manages message ids.
* `getMaxId(bool $incoming): mixed` * `getMaxId(bool $incoming): mixed`
* `reset(): void` * `reset(): void`
* `createInstance(\danog\MadelineProto\Connection $session): self` * `createInstance(\danog\MadelineProto\Connection $session): self`
* `toString(string $messageId): string`
## Methods: ## Methods:
### `checkMessageId(string $newMessageId, array $aargs): void` ### `checkMessageId(string $newMessageId, array $aargs): void`
@ -65,10 +66,20 @@ Parameters:
#### See also: #### See also:
* [`\danog\MadelineProto\Connection`: Connection class.](../Connection.md) * `\danog\MadelineProto\Connection`
### `toString(string $messageId): string`
Get readable representation of message ID.
Parameters:
* `$messageId`: `string`
--- ---
Generated by [danog/phpdoc](https://phpdoc.daniil.it) Generated by [danog/phpdoc](https://phpdoc.daniil.it)

View File

@ -19,6 +19,7 @@ Manages message ids.
* `generateMessageId(): string` * `generateMessageId(): string`
* `getMaxId(bool $incoming): mixed` * `getMaxId(bool $incoming): mixed`
* `createInstance(\danog\MadelineProto\Connection $session): self` * `createInstance(\danog\MadelineProto\Connection $session): self`
* `toString(string $messageId): string`
## Methods: ## Methods:
### `checkMessageId(string $newMessageId, array $aargs): void` ### `checkMessageId(string $newMessageId, array $aargs): void`
@ -58,10 +59,20 @@ Parameters:
#### See also: #### See also:
* [`\danog\MadelineProto\Connection`: Connection class.](../Connection.md) * `\danog\MadelineProto\Connection`
### `toString(string $messageId): string`
Get readable representation of message ID.
Parameters:
* `$messageId`: `string`
--- ---
Generated by [danog/phpdoc](https://phpdoc.daniil.it) Generated by [danog/phpdoc](https://phpdoc.daniil.it)

View File

@ -15,22 +15,74 @@ Manages responses.
## Method list: ## Method list:
* `sendMsgsStateInfo(string|int $req_msg_id, array $msg_ids): \Generator` * `onNewMsgDetailedInfo(array $content): void`
* `onMsgDetailedInfo(array $content): void`
* `onMsgResendReq(array $content, string $current_msg_id): void`
* `onMsgResendAnsReq(array $content, string $current_msg_id): void`
* `onMsgsAllInfo(array $content): void`
* `sendMsgsStateInfo(array $msg_ids, string|int $req_msg_id): void`
## Methods: ## Methods:
### `sendMsgsStateInfo(string|int $req_msg_id, array $msg_ids): \Generator` ### `onNewMsgDetailedInfo(array $content): void`
Called when receiving a new_msg_detailed_info.
Parameters:
* `$content`: `array`
### `onMsgDetailedInfo(array $content): void`
Called when receiving a msg_detailed_info.
Parameters:
* `$content`: `array`
### `onMsgResendReq(array $content, string $current_msg_id): void`
Called when receiving a msg_resend_req.
Parameters:
* `$content`: `array`
* `$current_msg_id`: `string`
### `onMsgResendAnsReq(array $content, string $current_msg_id): void`
Called when receiving a msg_resend_ans_req.
Parameters:
* `$content`: `array`
* `$current_msg_id`: `string`
### `onMsgsAllInfo(array $content): void`
Called when receiving a msgs_all_info.
Parameters:
* `$content`: `array`
### `sendMsgsStateInfo(array $msg_ids, string|int $req_msg_id): void`
Send state info for message IDs. Send state info for message IDs.
Parameters: Parameters:
* `$req_msg_id`: `string|int` Message ID of msgs_state_req that initiated this
* `$msg_ids`: `array` Message IDs to send info about * `$msg_ids`: `array` Message IDs to send info about
* `$req_msg_id`: `string|int` Message ID of msgs_state_req that initiated this
#### See also:
* `\Generator`

View File

@ -13,33 +13,5 @@ Manages responses.
## Method list:
* `handleReject(array $request, \Throwable $data): void`
* `handleResponse(): void`
## Methods:
### `handleReject(array $request, \Throwable $data): void`
Reject request with exception.
Parameters:
* `$request`: `array` Request
* `$data`: `\Throwable` Exception
#### See also:
* `\Throwable`
### `handleResponse(): void`
--- ---
Generated by [danog/phpdoc](https://phpdoc.daniil.it) Generated by [danog/phpdoc](https://phpdoc.daniil.it)

View File

@ -19,17 +19,20 @@ Manages MTProto session-specific data.
* `createSession(): void` * `createSession(): void`
* `backupSession(): array` * `backupSession(): array`
* `ackOutgoingMessageId(string|int $message_id): bool` * `ackOutgoingMessageId(string|int $message_id): bool`
* `gotResponseForOutgoingMessageId(string|int $message_id): bool` * `gotResponseForOutgoingMessage(\danog\MadelineProto\MTProto\OutgoingMessage $message): void`
* `ackIncomingMessageId(string|int $message_id): bool` * `ackIncomingMessage(\danog\MadelineProto\MTProto\IncomingMessage $message): void`
* `hasPendingCalls(): bool` * `hasPendingCalls(): bool`
* `getPendingCalls(): array` * `getPendingCalls(): array`
* `handleReject(array $request, \Throwable $data): void`
* `handleResponse(): void`
* `methodRecall(string $watcherId, array $args): void` * `methodRecall(string $watcherId, array $args): void`
* `methodCallAsyncRead(string $method, array|\Generator $args, array $aargs): \Generator` * `methodCallAsyncRead(string $method, array|\Generator $args, array $aargs): \Generator`
* `methodCallAsyncWrite(string $method, array|\Generator $args, array $aargs): \Generator` * `methodCallAsyncWrite(string $method, array|\Generator $args, array $aargs): \Generator`
* `objectCall(string $object, array $args, array $aargs): \Generator` * `objectCall(string $object, array $args, array $aargs): \Generator`
* `sendMsgsStateInfo(string|int $req_msg_id, array $msg_ids): \Generator` * `onNewMsgDetailedInfo(array $content): void`
* `onMsgDetailedInfo(array $content): void`
* `onMsgResendReq(array $content, string $current_msg_id): void`
* `onMsgResendAnsReq(array $content, string $current_msg_id): void`
* `onMsgsAllInfo(array $content): void`
* `sendMsgsStateInfo(array $msg_ids, string|int $req_msg_id): void`
## Methods: ## Methods:
### `resetSession(): void` ### `resetSession(): void`
@ -60,23 +63,33 @@ Parameters:
### `gotResponseForOutgoingMessageId(string|int $message_id): bool` ### `gotResponseForOutgoingMessage(\danog\MadelineProto\MTProto\OutgoingMessage $message): void`
We have gotten response for outgoing message ID. We have gotten a response for an outgoing message.
Parameters: Parameters:
* `$message_id`: `string|int` Message ID * `$message`: `\danog\MadelineProto\MTProto\OutgoingMessage` Message
#### See also:
* `\danog\MadelineProto\MTProto\OutgoingMessage`
### `ackIncomingMessageId(string|int $message_id): bool`
### `ackIncomingMessage(\danog\MadelineProto\MTProto\IncomingMessage $message): void`
Acknowledge incoming message ID. Acknowledge incoming message ID.
Parameters: Parameters:
* `$message_id`: `string|int` Message ID * `$message`: `\danog\MadelineProto\MTProto\IncomingMessage` Message
#### See also:
* `\danog\MadelineProto\MTProto\IncomingMessage`
@ -92,28 +105,6 @@ Get all pending calls (also clear pending state requests).
### `handleReject(array $request, \Throwable $data): void`
Reject request with exception.
Parameters:
* `$request`: `array` Request
* `$data`: `\Throwable` Exception
#### See also:
* `\Throwable`
### `handleResponse(): void`
### `methodRecall(string $watcherId, array $args): void` ### `methodRecall(string $watcherId, array $args): void`
Recall method. Recall method.
@ -184,19 +175,66 @@ Parameters:
### `sendMsgsStateInfo(string|int $req_msg_id, array $msg_ids): \Generator` ### `onNewMsgDetailedInfo(array $content): void`
Called when receiving a new_msg_detailed_info.
Parameters:
* `$content`: `array`
### `onMsgDetailedInfo(array $content): void`
Called when receiving a msg_detailed_info.
Parameters:
* `$content`: `array`
### `onMsgResendReq(array $content, string $current_msg_id): void`
Called when receiving a msg_resend_req.
Parameters:
* `$content`: `array`
* `$current_msg_id`: `string`
### `onMsgResendAnsReq(array $content, string $current_msg_id): void`
Called when receiving a msg_resend_ans_req.
Parameters:
* `$content`: `array`
* `$current_msg_id`: `string`
### `onMsgsAllInfo(array $content): void`
Called when receiving a msgs_all_info.
Parameters:
* `$content`: `array`
### `sendMsgsStateInfo(array $msg_ids, string|int $req_msg_id): void`
Send state info for message IDs. Send state info for message IDs.
Parameters: Parameters:
* `$req_msg_id`: `string|int` Message ID of msgs_state_req that initiated this
* `$msg_ids`: `array` Message IDs to send info about * `$msg_ids`: `array` Message IDs to send info about
* `$req_msg_id`: `string|int` Message ID of msgs_state_req that initiated this
#### See also:
* `\Generator`

View File

@ -25,7 +25,7 @@ Manages peers.
* `getInfo(mixed $id, bool $recursive): \Generator Info object` * `getInfo(mixed $id, bool $recursive): \Generator Info object`
* `fullChatLastUpdated(mixed $id): \Generator<int>` * `fullChatLastUpdated(mixed $id): \Generator<int>`
* `getFullInfo(mixed $id): \Generator FullInfo object` * `getFullInfo(mixed $id): \Generator FullInfo object`
* `getPwrChat(mixed $id): \Generator<array> Chat object` * `getPwrChat(mixed $id): \Generator Chat object`
* `resolveUsername(string $username): \Generator` * `resolveUsername(string $username): \Generator`
## Methods: ## Methods:
@ -128,7 +128,8 @@ Return value: Info object
Fully typed return value: Fully typed return value:
``` ```
\Generator<int|mixed, \Amp\Promise|\Amp\Promise<string>|array, mixed, array{InputPeer: array{_: string, user_id?: mixed, access_hash?: mixed, min?: mixed, chat_id?: mixed, channel_id?: mixed}, Peer: array{_: string, user_id?: mixed, chat_id?: mixed, channel_id?: mixed}, DialogPeer: array{_: string, peer: array{_: string, user_id?: mixed, chat_id?: mixed, channel_id?: mixed}}, NotifyPeer: array{_: string, peer: array{_: string, user_id?: mixed, chat_id?: mixed, channel_id?: mixed}}, InputDialogPeer: array{_: string, peer: array{_: string, user_id?: mixed, access_hash?: mixed, min?: mixed, chat_id?: mixed, channel_id?: mixed}}, InputNotifyPeer: array{_: string, peer: array{_: string, user_id?: mixed, access_hash?: mixed, min?: mixed, chat_id?: mixed, channel_id?: mixed}}, bot_api_id: int|string, user_id?: int, chat_id?: int, channel_id?: int, InputUser?: array{_: string, user_id?: int, access_hash?: mixed, min?: bool}, InputChannel?: array{_: string, channel_id: int, access_hash: mixed, min: bool}, type: string}> \Generator<int|mixed, \Amp\Promise|\Amp\Promise<string>|array, mixed, array{TConstructor: \array
InputPeer: array{_: string, user_id?: mixed, access_hash?: mixed, min?: mixed, chat_id?: mixed, channel_id?: mixed}, Peer: array{_: string, user_id?: mixed, chat_id?: mixed, channel_id?: mixed}, DialogPeer: array{_: string, peer: array{_: string, user_id?: mixed, chat_id?: mixed, channel_id?: mixed}}, NotifyPeer: array{_: string, peer: array{_: string, user_id?: mixed, chat_id?: mixed, channel_id?: mixed}}, InputDialogPeer: array{_: string, peer: array{_: string, user_id?: mixed, access_hash?: mixed, min?: mixed, chat_id?: mixed, channel_id?: mixed}}, InputNotifyPeer: array{_: string, peer: array{_: string, user_id?: mixed, access_hash?: mixed, min?: mixed, chat_id?: mixed, channel_id?: mixed}}, bot_api_id: int|string, user_id?: int, chat_id?: int, channel_id?: int, InputUser?: array{_: string, user_id?: int, access_hash?: mixed, min?: bool}, InputChannel?: array{_: string, channel_id: int, access_hash: mixed, min: bool}, type: string}>
``` ```
#### See also: #### See also:
* [https://docs.madelineproto.xyz/Info.html](https://docs.madelineproto.xyz/Info.html) * [https://docs.madelineproto.xyz/Info.html](https://docs.madelineproto.xyz/Info.html)
@ -176,7 +177,7 @@ Fully typed return value:
### `getPwrChat(mixed $id): \Generator<array> Chat object` ### `getPwrChat(mixed $id): \Generator Chat object`
Get full info about peer (including full list of channel members), returns a Chat object. Get full info about peer (including full list of channel members), returns a Chat object.

View File

@ -26,7 +26,7 @@ TL serialization.
* `serializeObject(array $type, mixed $object, string $ctx, int $layer): \Generator` * `serializeObject(array $type, mixed $object, string $ctx, int $layer): \Generator`
* `serializeMethod(string $method, mixed $arguments): \Generator` * `serializeMethod(string $method, mixed $arguments): \Generator`
* `getLength(\resource|string $stream, array $type): int` * `getLength(\resource|string $stream, array $type): int`
* `deserialize(string|\resource $stream, array $type): \Generator<mixed>` * `deserialize(string|\resource $stream, array $type): array`
## Methods: ## Methods:
### `getSecretLayer(): int` ### `getSecretLayer(): int`
@ -177,7 +177,7 @@ Parameters:
### `deserialize(string|\resource $stream, array $type): \Generator<mixed>` ### `deserialize(string|\resource $stream, array $type): array`
Deserialize TL object. Deserialize TL object.
@ -187,9 +187,13 @@ Parameters:
* `$type`: `array` Type identifier * `$type`: `array` Type identifier
Fully typed return value:
```
array{0: mixed, 1: \Amp\Promise}
```
#### See also: #### See also:
* `\resource` * `\resource`
* `\Generator` * `\Amp\Promise`

View File

@ -40,7 +40,6 @@ PHP implementation of telegram's MTProto protocol.
## Classes ## Classes
* [\danog\MadelineProto\API: Main API wrapper for MadelineProto.](danog/MadelineProto/API.md) * [\danog\MadelineProto\API: Main API wrapper for MadelineProto.](danog/MadelineProto/API.md)
* [\danog\MadelineProto\Connection: Connection class.](danog/MadelineProto/Connection.md)
* [\danog\MadelineProto\Coroutine: Creates a promise from a generator function yielding promises.](danog/MadelineProto/Coroutine.md) * [\danog\MadelineProto\Coroutine: Creates a promise from a generator function yielding promises.](danog/MadelineProto/Coroutine.md)
* [\danog\MadelineProto\DataCenter: Manages datacenters.](danog/MadelineProto/DataCenter.md) * [\danog\MadelineProto\DataCenter: Manages datacenters.](danog/MadelineProto/DataCenter.md)
* [\danog\MadelineProto\DataCenterConnection: Datacenter connection.](danog/MadelineProto/DataCenterConnection.md) * [\danog\MadelineProto\DataCenterConnection: Datacenter connection.](danog/MadelineProto/DataCenterConnection.md)