2017-01-22 17:40:56 +01:00
< ? php
/**
* This file is automatic generated by build_docs . php file
* and is used only for autocomplete in multiple IDE
2017-01-25 23:16:22 +01:00
* don ' t modify manually .
2017-01-22 17:40:56 +01:00
*/
2018-02-24 17:54:39 +01:00
2017-01-22 17:40:56 +01:00
namespace danog\MadelineProto ;
interface auth
{
/**
2020-06-16 17:52:55 +02:00
* Send the verification code for login .
2017-01-22 17:40:56 +01:00
*
2019-09-18 21:32:24 +02:00
* Parameters :
2020-06-16 17:52:55 +02:00
* * `string` ** phone_number ** - Phone number in international format
* * `int` ** api_id ** - Application identifier ( see [ App configuration ]( https :// core . telegram . org / myapp ))
* * `string` ** api_hash ** - Application secret hash ( see [ App configuration ]( https :// core . telegram . org / myapp ))
* * `CodeSettings` ** settings ** - Settings for the code type to send
2019-09-18 21:32:24 +02:00
*
2019-09-18 20:46:20 +02:00
* @ param array $params Parameters
*
* @ return auth . SentCode
2017-01-22 17:40:56 +01:00
*/
2019-09-18 20:46:20 +02:00
public function sendCode ( $params );
2018-02-24 17:54:39 +01:00
2017-01-22 17:40:56 +01:00
/**
2020-06-16 17:52:55 +02:00
* Registers a validated phone number in the system .
2019-09-18 20:46:20 +02:00
*
2019-09-18 21:32:24 +02:00
* Parameters :
2020-06-16 17:52:55 +02:00
* * `string` ** phone_number ** - Phone number in the international format
* * `string` ** phone_code_hash ** - SMS - message ID
* * `string` ** first_name ** - New user first name
* * `string` ** last_name ** - New user last name
2019-09-18 21:32:24 +02:00
*
2019-09-18 20:46:20 +02:00
* @ param array $params Parameters
2017-01-22 17:40:56 +01:00
*
2019-09-18 20:46:20 +02:00
* @ return auth . Authorization
2017-01-22 17:40:56 +01:00
*/
2019-09-18 20:46:20 +02:00
public function signUp ( $params );
2018-02-24 17:54:39 +01:00
2017-01-22 17:40:56 +01:00
/**
2020-06-16 17:52:55 +02:00
* Signs in a user with a validated phone number .
2019-09-18 20:46:20 +02:00
*
2019-09-18 21:32:24 +02:00
* Parameters :
2020-06-16 17:52:55 +02:00
* * `string` ** phone_number ** - Phone number in the international format
* * `string` ** phone_code_hash ** - SMS - message ID , obtained from [ auth . sendCode ]( https :// docs . madelineproto . xyz / API_docs / methods / auth . sendCode . html )
* * `string` ** phone_code ** - Valid numerical code from the SMS - message
2019-09-18 21:32:24 +02:00
*
2019-09-18 20:46:20 +02:00
* @ param array $params Parameters
2017-01-22 17:40:56 +01:00
*
2019-09-18 20:46:20 +02:00
* @ return auth . Authorization
2017-01-22 17:40:56 +01:00
*/
2019-09-18 20:46:20 +02:00
public function signIn ( $params );
2018-02-24 17:54:39 +01:00
2017-01-22 17:40:56 +01:00
/**
2020-06-16 17:52:55 +02:00
* Logs out the user .
2019-09-18 20:46:20 +02:00
*
2017-01-22 17:40:56 +01:00
* @ return bool
*/
public function logOut ();
2018-02-24 17:54:39 +01:00
2017-01-22 17:40:56 +01:00
/**
2019-12-27 17:43:29 +01:00
* Terminates all user ' s authorized sessions except for the current one .
2019-12-28 16:45:00 +01:00
*
* After calling this method it is necessary to reregister the current device using the method [ account . registerDevice ]( https :// docs . madelineproto . xyz / API_docs / methods / account . registerDevice . html )
2019-09-18 20:46:20 +02:00
*
2017-01-22 17:40:56 +01:00
* @ return bool
*/
public function resetAuthorizations ();
2018-02-24 17:54:39 +01:00
2017-01-22 17:40:56 +01:00
/**
2020-06-16 17:52:55 +02:00
* Returns data for copying authorization to another data - centre .
2019-09-18 20:46:20 +02:00
*
2019-09-18 21:32:24 +02:00
* Parameters :
2020-06-16 17:52:55 +02:00
* * `int` ** dc_id ** - Number of a target data - centre
2019-09-18 21:32:24 +02:00
*
2019-09-18 20:46:20 +02:00
* @ param array $params Parameters
2017-01-22 17:40:56 +01:00
*
2019-09-18 20:46:20 +02:00
* @ return auth . ExportedAuthorization
2017-01-22 17:40:56 +01:00
*/
2019-09-18 20:46:20 +02:00
public function exportAuthorization ( $params );
2018-02-24 17:54:39 +01:00
2017-01-22 17:40:56 +01:00
/**
2020-06-16 17:52:55 +02:00
* Logs in a user using a key transmitted from his native data - centre .
2017-01-22 17:40:56 +01:00
*
2019-09-18 21:32:24 +02:00
* Parameters :
2020-06-16 17:52:55 +02:00
* * `int` ** id ** - User ID
* * `bytes` ** bytes ** - Authorization key
2019-09-18 21:32:24 +02:00
*
2019-09-18 20:46:20 +02:00
* @ param array $params Parameters
*
* @ return auth . Authorization
2017-01-22 17:40:56 +01:00
*/
2019-09-18 20:46:20 +02:00
public function importAuthorization ( $params );
2018-02-24 17:54:39 +01:00
2017-01-22 17:40:56 +01:00
/**
2020-06-16 17:52:55 +02:00
* Binds a temporary authorization key `temp_auth_key_id` to the permanent authorization key `perm_auth_key_id` . Each permanent key may only be bound to one temporary key at a time , binding a new temporary key overwrites the previous one .
*
* For more information , see [ Perfect Forward Secrecy ]( https :// core . telegram . org / api / pfs ) .
2019-09-18 20:46:20 +02:00
*
2019-09-18 21:32:24 +02:00
* Parameters :
2020-06-16 17:52:55 +02:00
* * `long` ** perm_auth_key_id ** - Permanent auth\_key\_id to bind to
* * `long` ** nonce ** - Random long from [ Binding message contents ]( #binding-message-contents)
* * `int` ** expires_at ** - Unix timestamp to invalidate temporary key , see [ Binding message contents ]( #binding-message-contents)
* * `bytes` ** encrypted_message ** - See [ Generating encrypted\_message ]( #generating-encrypted-message)
2019-09-18 21:32:24 +02:00
*
2019-09-18 20:46:20 +02:00
* @ param array $params Parameters
2017-01-22 17:40:56 +01:00
*
* @ return bool
*/
2019-09-18 20:46:20 +02:00
public function bindTempAuthKey ( $params );
2018-02-24 17:54:39 +01:00
2019-06-05 15:38:32 +02:00
/**
2020-06-16 17:52:55 +02:00
* Login as a bot .
2019-09-18 20:46:20 +02:00
*
2019-09-18 21:32:24 +02:00
* Parameters :
2020-06-16 17:52:55 +02:00
* * `int` ** api_id ** - Application identifier ( see . [ App configuration ]( https :// core . telegram . org / myapp ))
* * `string` ** api_hash ** - Application identifier hash ( see . [ App configuration ]( https :// core . telegram . org / myapp ))
* * `string` ** bot_auth_token ** - Bot token ( see [ bots ]( https :// core . telegram . org / bots ))
2019-09-18 21:32:24 +02:00
*
2019-09-18 20:46:20 +02:00
* @ param array $params Parameters
2019-06-05 15:38:32 +02:00
*
2019-09-18 20:46:20 +02:00
* @ return auth . Authorization
2019-06-05 15:38:32 +02:00
*/
2019-09-18 20:46:20 +02:00
public function importBotAuthorization ( $params );
2019-06-05 15:38:32 +02:00
/**
2020-06-16 17:52:55 +02:00
* Try logging to an account protected by a [ 2 FA password ]( https :// core . telegram . org / api / srp ) .
2019-06-05 15:38:32 +02:00
*
2019-09-18 21:32:24 +02:00
* Parameters :
2020-06-16 17:52:55 +02:00
* * `InputCheckPasswordSRP` ** password ** - The account ' s password ( see [ SRP ]( https :// core . telegram . org / api / srp ))
2019-09-18 21:32:24 +02:00
*
2019-09-18 20:46:20 +02:00
* @ param array $params Parameters
*
* @ return auth . Authorization
2019-06-05 15:38:32 +02:00
*/
2019-09-18 20:46:20 +02:00
public function checkPassword ( $params );
2019-06-05 15:38:32 +02:00
/**
2019-12-27 17:43:29 +01:00
* Request recovery code of a [ 2 FA password ]( https :// core . telegram . org / api / srp ), only for accounts with a [ recovery email configured ]( https :// core . telegram . org / api / srp #email-verification).
2019-09-18 20:46:20 +02:00
*
* @ return auth . PasswordRecovery
2019-06-05 15:38:32 +02:00
*/
public function requestPasswordRecovery ();
/**
2019-12-28 16:45:00 +01:00
* Reset the [ 2 FA password ]( https :// core . telegram . org / api / srp ) using the recovery code sent using [ auth . requestPasswordRecovery ]( https :// docs . madelineproto . xyz / API_docs / methods / auth . requestPasswordRecovery . html ) .
2019-06-05 15:38:32 +02:00
*
2019-09-18 21:32:24 +02:00
* Parameters :
2019-12-27 17:43:29 +01:00
* * `string` ** code ** - Code received via email
2019-09-18 21:32:24 +02:00
*
2019-09-18 20:46:20 +02:00
* @ param array $params Parameters
*
* @ return auth . Authorization
2019-06-05 15:38:32 +02:00
*/
2019-09-18 20:46:20 +02:00
public function recoverPassword ( $params );
2019-06-05 15:38:32 +02:00
/**
2019-12-27 17:43:29 +01:00
* Resend the login code via another medium , the phone code type is determined by the return value of the previous auth . sendCode / auth . resendCode : see [ login ]( https :// core . telegram . org / api / auth ) for more info .
2019-09-18 20:46:20 +02:00
*
2019-09-18 21:32:24 +02:00
* Parameters :
* * `string` ** phone_number ** - The phone number
2019-12-28 16:45:00 +01:00
* * `string` ** phone_code_hash ** - The phone code hash obtained from [ auth . sendCode ]( https :// docs . madelineproto . xyz / API_docs / methods / auth . sendCode . html )
2019-09-18 21:32:24 +02:00
*
2019-09-18 20:46:20 +02:00
* @ param array $params Parameters
2019-06-05 15:38:32 +02:00
*
2019-09-18 20:46:20 +02:00
* @ return auth . SentCode
2019-06-05 15:38:32 +02:00
*/
2019-09-18 20:46:20 +02:00
public function resendCode ( $params );
2019-06-05 15:38:32 +02:00
2017-01-22 17:40:56 +01:00
/**
2019-12-27 17:43:29 +01:00
* Cancel the login verification code .
2019-09-18 20:46:20 +02:00
*
2019-09-18 21:32:24 +02:00
* Parameters :
* * `string` ** phone_number ** - Phone number
2019-12-28 16:45:00 +01:00
* * `string` ** phone_code_hash ** - Phone code hash from [ auth . sendCode ]( https :// docs . madelineproto . xyz / API_docs / methods / auth . sendCode . html )
2019-09-18 21:32:24 +02:00
*
2019-09-18 20:46:20 +02:00
* @ param array $params Parameters
2017-01-22 17:40:56 +01:00
*
* @ return bool
*/
2019-09-18 20:46:20 +02:00
public function cancelCode ( $params );
2019-06-05 15:38:32 +02:00
/**
2019-12-27 17:43:29 +01:00
* Delete all temporary authorization keys ** except for ** the ones specified .
2019-09-18 20:46:20 +02:00
*
2019-09-18 21:32:24 +02:00
* Parameters :
2020-06-16 17:52:55 +02:00
* * `[long]` ** except_auth_keys ** - The auth keys that ** shouldn ' t ** be dropped .
2019-09-18 21:32:24 +02:00
*
2019-09-18 20:46:20 +02:00
* @ param array $params Parameters
2019-06-05 15:38:32 +02:00
*
* @ return bool
*/
2019-09-18 20:46:20 +02:00
public function dropTempAuthKeys ( $params );
2020-03-06 13:09:52 +01:00
/**
2020-06-16 17:52:55 +02:00
* Generate a login token , for [ login via QR code ]( https :// core . telegram . org / api / qr - login ) .
* The generated login token should be encoded using base64url , then shown as a `tg://login?token=base64encodedtoken` URL in the QR code .
2020-03-06 13:09:52 +01:00
*
2020-06-16 17:52:55 +02:00
* For more info , see [ login via QR code ]( https :// core . telegram . org / api / qr - login ) .
2020-03-06 13:09:52 +01:00
*
* Parameters :
2020-06-16 17:52:55 +02:00
* * `int` ** api_id ** - Application identifier ( see . [ App configuration ]( https :// core . telegram . org / myapp ))
* * `string` ** api_hash ** - Application identifier hash ( see . [ App configuration ]( https :// core . telegram . org / myapp ))
* * `[int]` ** except_ids ** - List of already logged - in user IDs , to prevent logging in twice with the same user
2020-03-06 13:09:52 +01:00
*
* @ param array $params Parameters
*
* @ return auth . LoginToken
*/
public function exportLoginToken ( $params );
/**
2020-06-16 17:52:55 +02:00
* Login using a redirected login token , generated in case of DC mismatch during [ QR code login ]( https :// core . telegram . org / api / qr - login ) .
2020-03-06 13:09:52 +01:00
*
2020-06-16 17:52:55 +02:00
* For more info , see [ login via QR code ]( https :// core . telegram . org / api / qr - login ) .
2020-03-06 13:09:52 +01:00
*
* Parameters :
2020-06-16 17:52:55 +02:00
* * `bytes` ** token ** - Login token
2020-03-06 13:09:52 +01:00
*
* @ param array $params Parameters
*
* @ return auth . LoginToken
*/
public function importLoginToken ( $params );
/**
2020-06-16 17:52:55 +02:00
* Accept QR code login token , logging in the app that generated it .
*
* Returns info about the new session .
2020-03-06 13:09:52 +01:00
*
2020-06-16 17:52:55 +02:00
* For more info , see [ login via QR code ]( https :// core . telegram . org / api / qr - login ) .
2020-03-06 13:09:52 +01:00
*
* Parameters :
2020-06-16 17:52:55 +02:00
* * `bytes` ** token ** - Login token embedded in QR code , for more info , see [ login via QR code ]( https :// core . telegram . org / api / qr - login ) .
2020-03-06 13:09:52 +01:00
*
* @ param array $params Parameters
*
* @ return Authorization
*/
public function acceptLoginToken ( $params );
2017-01-22 17:40:56 +01:00
}
2018-02-25 11:17:45 +01:00
2017-01-22 17:40:56 +01:00
interface account
{
/**
2019-12-27 17:43:29 +01:00
* Register device to receive [ PUSH notifications ]( https :// core . telegram . org / api / push - updates ) .
2019-09-18 20:46:20 +02:00
*
2019-09-18 21:32:24 +02:00
* Parameters :
2019-12-27 17:43:29 +01:00
* * `boolean` ** no_muted ** - Optional : Avoid receiving ( silent and invisible background ) notifications . Useful to save battery .
* * `int` ** token_type ** - Device token type .< br >** Possible values **:< br > `1` \ - APNS ( device token for apple push ) < br > `2` \ - FCM ( firebase token for google firebase ) < br > `3` \ - MPNS ( channel URI for microsoft push ) < br > `4` \ - Simple push ( endpoint for firefox ' s simple push API ) < br > `5` \ - Ubuntu phone ( token for ubuntu push ) < br > `6` \ - Blackberry ( token for blackberry push ) < br > `7` \ - Unused < br > `8` \ - WNS ( windows push ) < br > `9` \ - APNS VoIP ( token for apple push VoIP ) < br > `10` \ - Web push ( web push , see below ) < br > `11` \ - MPNS VoIP ( token for microsoft push VoIP ) < br > `12` \ - Tizen ( token for tizen push ) < br >< br > For `10` web push , the token must be a JSON - encoded object containing the keys described in [ PUSH updates ]( https :// core . telegram . org / api / push - updates )
* * `string` ** token ** - Device token
2019-12-28 16:45:00 +01:00
* * `Bool` ** app_sandbox ** - If [( boolTrue )]( https :// docs . madelineproto . xyz / API_docs / constructors / boolTrue . html ) is transmitted , a sandbox - certificate will be used during transmission .
2019-12-27 17:43:29 +01:00
* * `bytes` ** secret ** - For FCM and APNS VoIP , optional encryption key used to encrypt push notifications
2020-06-16 17:52:55 +02:00
* * `[int]` ** other_uids ** - List of user identifiers of other users currently using the client
2019-09-18 21:32:24 +02:00
*
2019-09-18 20:46:20 +02:00
* @ param array $params Parameters
2017-01-22 17:40:56 +01:00
*
* @ return bool
*/
2019-09-18 20:46:20 +02:00
public function registerDevice ( $params );
2018-02-24 17:54:39 +01:00
2017-01-22 17:40:56 +01:00
/**
2019-12-27 17:43:29 +01:00
* Deletes a device by its token , stops sending PUSH - notifications to it .
2019-09-18 20:46:20 +02:00
*
2019-09-18 21:32:24 +02:00
* Parameters :
2019-12-27 17:43:29 +01:00
* * `int` ** token_type ** - Device token type .< br >** Possible values **:< br > `1` \ - APNS ( device token for apple push ) < br > `2` \ - FCM ( firebase token for google firebase ) < br > `3` \ - MPNS ( channel URI for microsoft push ) < br > `4` \ - Simple push ( endpoint for firefox ' s simple push API ) < br > `5` \ - Ubuntu phone ( token for ubuntu push ) < br > `6` \ - Blackberry ( token for blackberry push ) < br > `7` \ - Unused < br > `8` \ - WNS ( windows push ) < br > `9` \ - APNS VoIP ( token for apple push VoIP ) < br > `10` \ - Web push ( web push , see below ) < br > `11` \ - MPNS VoIP ( token for microsoft push VoIP ) < br > `12` \ - Tizen ( token for tizen push ) < br >< br > For `10` web push , the token must be a JSON - encoded object containing the keys described in [ PUSH updates ]( https :// core . telegram . org / api / push - updates )
* * `string` ** token ** - Device token
2020-06-16 17:52:55 +02:00
* * `[int]` ** other_uids ** - List of user identifiers of other users currently using the client
2019-09-18 21:32:24 +02:00
*
2019-09-18 20:46:20 +02:00
* @ param array $params Parameters
2017-01-22 17:40:56 +01:00
*
* @ return bool
*/
2019-09-18 20:46:20 +02:00
public function unregisterDevice ( $params );
2018-02-24 17:54:39 +01:00
2017-01-22 17:40:56 +01:00
/**
2019-12-27 17:43:29 +01:00
* Edits notification settings from a given user / group , from all users / all groups .
2019-09-18 20:46:20 +02:00
*
2019-09-18 21:32:24 +02:00
* Parameters :
2019-12-27 17:43:29 +01:00
* * `InputNotifyPeer` ** peer ** - Notification source
2019-09-18 21:32:24 +02:00
* * `InputPeerNotifySettings` ** settings ** - Notification settings
*
2019-09-18 20:46:20 +02:00
* @ param array $params Parameters
2017-01-22 17:40:56 +01:00
*
* @ return bool
*/
2019-09-18 20:46:20 +02:00
public function updateNotifySettings ( $params );
2018-02-24 17:54:39 +01:00
2017-01-22 17:40:56 +01:00
/**
2019-12-27 17:43:29 +01:00
* Gets current notification settings for a given user / group , from all users / all groups .
2019-09-18 21:32:24 +02:00
*
* Parameters :
* * `InputNotifyPeer` ** peer ** - Notification source
2019-09-18 20:46:20 +02:00
*
* @ param array $params Parameters
2017-01-22 17:40:56 +01:00
*
* @ return PeerNotifySettings
*/
2019-09-18 20:46:20 +02:00
public function getNotifySettings ( $params );
2018-02-24 17:54:39 +01:00
2017-01-22 17:40:56 +01:00
/**
2019-12-27 17:43:29 +01:00
* Resets all notification settings from users and groups .
2019-09-18 20:46:20 +02:00
*
2017-01-22 17:40:56 +01:00
* @ return bool
*/
public function resetNotifySettings ();
2018-02-24 17:54:39 +01:00
2017-01-22 17:40:56 +01:00
/**
2019-12-27 17:43:29 +01:00
* Updates user profile .
2019-09-18 20:46:20 +02:00
*
2019-09-18 21:32:24 +02:00
* Parameters :
2019-12-27 17:43:29 +01:00
* * `string` ** first_name ** - Optional : New user first name
* * `string` ** last_name ** - Optional : New user last name
* * `string` ** about ** - Optional : New bio
2019-09-18 21:32:24 +02:00
*
2019-09-18 20:46:20 +02:00
* @ param array $params Parameters
2017-01-22 17:40:56 +01:00
*
* @ return User
*/
2019-09-18 20:46:20 +02:00
public function updateProfile ( $params );
2018-02-24 17:54:39 +01:00
2017-01-22 17:40:56 +01:00
/**
2019-12-27 17:43:29 +01:00
* Updates online user status .
2019-09-18 20:46:20 +02:00
*
2019-09-18 21:32:24 +02:00
* Parameters :
2019-12-28 16:45:00 +01:00
* * `Bool` ** offline ** - If [( boolTrue )]( https :// docs . madelineproto . xyz / API_docs / constructors / boolTrue . html ) is transmitted , user status will change to [( userStatusOffline )]( https :// docs . madelineproto . xyz / API_docs / constructors / userStatusOffline . html ) .
2019-09-18 21:32:24 +02:00
*
2019-09-18 20:46:20 +02:00
* @ param array $params Parameters
2017-01-22 17:40:56 +01:00
*
* @ return bool
*/
2019-09-18 20:46:20 +02:00
public function updateStatus ( $params );
2018-02-24 17:54:39 +01:00
2017-01-22 17:40:56 +01:00
/**
2019-09-18 20:46:20 +02:00
* Returns a list of available wallpapers .
*
2019-09-18 21:32:24 +02:00
* Parameters :
2020-06-16 17:52:55 +02:00
* * `[int]` ** hash ** - Optional : [ Hash for pagination , for more info click here ]( https :// core . telegram . org / api / offsets #hash-generation)
2019-09-18 21:32:24 +02:00
*
2019-09-18 20:46:20 +02:00
* @ param array $params Parameters
2019-06-05 15:38:32 +02:00
*
2019-09-18 20:46:20 +02:00
* @ return account . WallPapers
2019-06-05 15:38:32 +02:00
*/
2019-09-18 20:46:20 +02:00
public function getWallPapers ( $params );
2019-06-05 15:38:32 +02:00
/**
2019-12-27 17:43:29 +01:00
* Report a peer for violation of telegram ' s Terms of Service .
2019-09-18 20:46:20 +02:00
*
2019-09-18 21:32:24 +02:00
* Parameters :
* * `InputPeer` ** peer ** - The peer to report
2019-12-27 17:43:29 +01:00
* * `ReportReason` ** reason ** - The reason why this peer is being reported
2019-09-18 21:32:24 +02:00
*
2019-09-18 20:46:20 +02:00
* @ param array $params Parameters
2019-06-05 15:38:32 +02:00
*
* @ return bool
2017-01-22 17:40:56 +01:00
*/
2019-09-18 20:46:20 +02:00
public function reportPeer ( $params );
2018-02-24 17:54:39 +01:00
2017-01-22 17:40:56 +01:00
/**
2019-12-27 17:43:29 +01:00
* Validates a username and checks availability .
2019-09-18 20:46:20 +02:00
*
2019-09-18 21:32:24 +02:00
* Parameters :
2020-06-16 17:52:55 +02:00
* * `string` ** username ** - username < br > Accepted characters : A - z ( case - insensitive ), 0 - 9 and underscores .< br > Length : 5 - 32 characters .
2019-09-18 21:32:24 +02:00
*
2019-09-18 20:46:20 +02:00
* @ param array $params Parameters
2017-01-22 17:40:56 +01:00
*
* @ return bool
*/
2019-09-18 20:46:20 +02:00
public function checkUsername ( $params );
2018-02-24 17:54:39 +01:00
2017-01-22 17:40:56 +01:00
/**
2019-12-27 17:43:29 +01:00
* Changes username for the current user .
2019-09-18 20:46:20 +02:00
*
2019-09-18 21:32:24 +02:00
* Parameters :
2020-06-16 17:52:55 +02:00
* * `string` ** username ** - username or empty string if username is to be removed < br > Accepted characters : a - z ( case - insensitive ), 0 - 9 and underscores .< br > Length : 5 - 32 characters .
2019-09-18 21:32:24 +02:00
*
2019-09-18 20:46:20 +02:00
* @ param array $params Parameters
2017-01-22 17:40:56 +01:00
*
* @ return User
*/
2019-09-18 20:46:20 +02:00
public function updateUsername ( $params );
2018-02-24 17:54:39 +01:00
2017-01-22 17:40:56 +01:00
/**
2019-12-27 17:43:29 +01:00
* Get privacy settings of current account .
2019-09-18 20:46:20 +02:00
*
2019-09-18 21:32:24 +02:00
* Parameters :
2019-12-27 17:43:29 +01:00
* * `InputPrivacyKey` ** key ** - Peer category whose privacy settings should be fetched
2019-09-18 21:32:24 +02:00
*
2019-09-18 20:46:20 +02:00
* @ param array $params Parameters
2017-01-22 17:40:56 +01:00
*
2019-09-18 20:46:20 +02:00
* @ return account . PrivacyRules
2017-01-22 17:40:56 +01:00
*/
2019-09-18 20:46:20 +02:00
public function getPrivacy ( $params );
2018-02-24 17:54:39 +01:00
2017-01-22 17:40:56 +01:00
/**
2019-12-27 17:43:29 +01:00
* Change privacy settings of current account .
2017-01-22 17:40:56 +01:00
*
2019-09-18 21:32:24 +02:00
* Parameters :
2019-12-27 17:43:29 +01:00
* * `InputPrivacyKey` ** key ** - Peers to which the privacy rules apply
2020-06-16 17:52:55 +02:00
* * `[InputPrivacyRule]` ** rules ** - New privacy rules
2019-09-18 21:32:24 +02:00
*
2019-09-18 20:46:20 +02:00
* @ param array $params Parameters
*
* @ return account . PrivacyRules
2017-01-22 17:40:56 +01:00
*/
2019-09-18 20:46:20 +02:00
public function setPrivacy ( $params );
2018-02-24 17:54:39 +01:00
2017-01-22 17:40:56 +01:00
/**
2019-12-27 17:43:29 +01:00
* Delete the user ' s account from the telegram servers . Can be used , for example , to delete the account of a user that provided the login code , but forgot the [ 2 FA password and no recovery method is configured ]( https :// core . telegram . org / api / srp ) .
2019-09-18 20:46:20 +02:00
*
2019-09-18 21:32:24 +02:00
* Parameters :
2019-12-27 17:43:29 +01:00
* * `string` ** reason ** - Why is the account being deleted , can be empty
2019-09-18 21:32:24 +02:00
*
2019-09-18 20:46:20 +02:00
* @ param array $params Parameters
2017-01-22 17:40:56 +01:00
*
2019-06-05 15:38:32 +02:00
* @ return bool
2017-01-22 17:40:56 +01:00
*/
2019-09-18 20:46:20 +02:00
public function deleteAccount ( $params );
2018-02-24 17:54:39 +01:00
2017-01-22 17:40:56 +01:00
/**
2019-12-27 17:43:29 +01:00
* Get days to live of account .
2019-09-18 20:46:20 +02:00
*
2019-06-05 15:38:32 +02:00
* @ return AccountDaysTTL
2017-01-22 17:40:56 +01:00
*/
2019-06-05 15:38:32 +02:00
public function getAccountTTL ();
2018-02-24 17:54:39 +01:00
2017-01-22 17:40:56 +01:00
/**
2019-12-27 17:43:29 +01:00
* Set account self - destruction period .
2019-09-18 20:46:20 +02:00
*
2019-09-18 21:32:24 +02:00
* Parameters :
2019-12-27 17:43:29 +01:00
* * `AccountDaysTTL` ** ttl ** - Time to live in days
2019-09-18 21:32:24 +02:00
*
2019-09-18 20:46:20 +02:00
* @ param array $params Parameters
2017-01-22 17:40:56 +01:00
*
2019-06-05 15:38:32 +02:00
* @ return bool
2017-01-22 17:40:56 +01:00
*/
2019-09-18 20:46:20 +02:00
public function setAccountTTL ( $params );
2018-02-24 17:54:39 +01:00
2017-01-22 17:40:56 +01:00
/**
2019-12-27 17:43:29 +01:00
* Verify a new phone number to associate to the current account .
2019-09-18 20:46:20 +02:00
*
2019-09-18 21:32:24 +02:00
* Parameters :
2019-09-18 20:46:20 +02:00
* * `string` ** phone_number ** - New phone number
2019-12-27 17:43:29 +01:00
* * `CodeSettings` ** settings ** - Phone code settings
2019-09-18 21:32:24 +02:00
*
2019-09-18 20:46:20 +02:00
* @ param array $params Parameters
2017-01-22 17:40:56 +01:00
*
2019-09-18 20:46:20 +02:00
* @ return auth . SentCode
2017-01-22 17:40:56 +01:00
*/
2019-09-18 20:46:20 +02:00
public function sendChangePhoneCode ( $params );
2018-02-24 17:54:39 +01:00
2017-01-22 17:40:56 +01:00
/**
2019-12-27 17:43:29 +01:00
* Change the phone number of the current account .
2019-09-18 20:46:20 +02:00
*
2019-09-18 21:32:24 +02:00
* Parameters :
2019-12-27 17:43:29 +01:00
* * `string` ** phone_number ** - New phone number
2019-12-28 16:45:00 +01:00
* * `string` ** phone_code_hash ** - Phone code hash received when calling [ account . sendChangePhoneCode ]( https :// docs . madelineproto . xyz / API_docs / methods / account . sendChangePhoneCode . html )
* * `string` ** phone_code ** - Phone code received when calling [ account . sendChangePhoneCode ]( https :// docs . madelineproto . xyz / API_docs / methods / account . sendChangePhoneCode . html )
2019-09-18 21:32:24 +02:00
*
2019-09-18 20:46:20 +02:00
* @ param array $params Parameters
2017-01-22 17:40:56 +01:00
*
2019-06-05 15:38:32 +02:00
* @ return User
2017-01-22 17:40:56 +01:00
*/
2019-09-18 20:46:20 +02:00
public function changePhone ( $params );
2018-02-24 17:54:39 +01:00
2017-01-22 17:40:56 +01:00
/**
2019-12-27 17:43:29 +01:00
* When client - side passcode lock feature is enabled , will not show message texts in incoming [ PUSH notifications ]( https :// core . telegram . org / api / push - updates ) .
2019-09-18 20:46:20 +02:00
*
2019-09-18 21:32:24 +02:00
* Parameters :
2019-12-27 17:43:29 +01:00
* * `int` ** period ** - Inactivity period after which to start hiding message texts in [ PUSH notifications ]( https :// core . telegram . org / api / push - updates ) .
2019-09-18 21:32:24 +02:00
*
2019-09-18 20:46:20 +02:00
* @ param array $params Parameters
2017-01-22 17:40:56 +01:00
*
2019-06-05 12:04:36 +02:00
* @ return bool
2017-01-22 17:40:56 +01:00
*/
2019-09-18 20:46:20 +02:00
public function updateDeviceLocked ( $params );
2018-02-24 17:54:39 +01:00
2017-01-22 17:40:56 +01:00
/**
2019-12-27 17:43:29 +01:00
* Get logged - in sessions .
2019-09-18 20:46:20 +02:00
*
* @ return account . Authorizations
2017-01-22 17:40:56 +01:00
*/
2019-06-05 15:38:32 +02:00
public function getAuthorizations ();
2018-02-24 17:54:39 +01:00
2017-01-22 17:40:56 +01:00
/**
2019-12-27 17:43:29 +01:00
* Log out an active [ authorized session ]( https :// core . telegram . org / api / auth ) by its hash .
2019-09-18 20:46:20 +02:00
*
2019-09-18 21:32:24 +02:00
* Parameters :
2019-12-27 17:43:29 +01:00
* * `long` ** hash ** - Session hash
2019-09-18 21:32:24 +02:00
*
2019-09-18 20:46:20 +02:00
* @ param array $params Parameters
2017-01-22 17:40:56 +01:00
*
2019-06-05 15:38:32 +02:00
* @ return bool
2017-01-22 17:40:56 +01:00
*/
2019-09-18 20:46:20 +02:00
public function resetAuthorization ( $params );
2018-02-24 17:54:39 +01:00
2017-01-22 17:40:56 +01:00
/**
2019-12-27 17:43:29 +01:00
* Obtain configuration for two - factor authorization with password .
2019-09-18 20:46:20 +02:00
*
* @ return account . Password
2017-01-22 17:40:56 +01:00
*/
2019-06-05 15:38:32 +02:00
public function getPassword ();
2018-02-24 17:54:39 +01:00
2017-03-31 17:35:20 +02:00
/**
2020-06-16 17:52:55 +02:00
* Get private info associated to the password info ( recovery email , telegram [ passport ]( https :// core . telegram . org / passport ) info & amp ; so on ) .
2017-03-31 17:35:20 +02:00
*
2019-09-18 21:32:24 +02:00
* Parameters :
2020-06-16 17:52:55 +02:00
* * `InputCheckPasswordSRP` ** password ** - The password ( see [ SRP ]( https :// core . telegram . org / api / srp ))
2019-09-18 21:32:24 +02:00
*
2019-09-18 20:46:20 +02:00
* @ param array $params Parameters
*
* @ return account . PasswordSettings
2018-02-18 14:18:18 +01:00
*/
2019-09-18 20:46:20 +02:00
public function getPasswordSettings ( $params );
2018-02-24 17:54:39 +01:00
2018-02-18 14:18:18 +01:00
/**
2020-06-16 17:52:55 +02:00
* Set a new 2 FA password .
2019-09-18 20:46:20 +02:00
*
2019-09-18 21:32:24 +02:00
* Parameters :
2020-06-16 17:52:55 +02:00
* * `InputCheckPasswordSRP` ** password ** - The old password ( see [ SRP ]( https :// core . telegram . org / api / srp ))
* * `account.PasswordInputSettings` ** new_settings ** - The new password ( see [ SRP ]( https :// core . telegram . org / api / srp ))
2019-09-18 21:32:24 +02:00
*
2019-09-18 20:46:20 +02:00
* @ param array $params Parameters
2018-02-18 14:18:18 +01:00
*
2019-06-05 15:38:32 +02:00
* @ return bool
2018-06-29 13:50:14 +02:00
*/
2019-09-18 20:46:20 +02:00
public function updatePasswordSettings ( $params );
2018-06-29 13:50:14 +02:00
/**
2019-12-27 17:43:29 +01:00
* Send confirmation code to cancel account deletion , for more info [ click here » ]( https :// core . telegram . org / api / account - deletion ) .
2019-09-18 20:46:20 +02:00
*
2019-09-18 21:32:24 +02:00
* Parameters :
2019-12-27 17:43:29 +01:00
* * `string` ** hash ** - The hash from the service notification , for more info [ click here » ]( https :// core . telegram . org / api / account - deletion )
* * `CodeSettings` ** settings ** - Phone code settings
2019-09-18 21:32:24 +02:00
*
2019-09-18 20:46:20 +02:00
* @ param array $params Parameters
2018-06-29 13:50:14 +02:00
*
2019-09-18 20:46:20 +02:00
* @ return auth . SentCode
2018-06-29 13:50:14 +02:00
*/
2019-09-18 20:46:20 +02:00
public function sendConfirmPhoneCode ( $params );
2018-06-29 13:50:14 +02:00
/**
2019-12-27 17:43:29 +01:00
* Confirm a phone number to cancel account deletion , for more info [ click here » ]( https :// core . telegram . org / api / account - deletion ) .
2019-09-18 20:46:20 +02:00
*
2019-09-18 21:32:24 +02:00
* Parameters :
2019-12-27 17:43:29 +01:00
* * `string` ** phone_code_hash ** - Phone code hash , for more info [ click here » ]( https :// core . telegram . org / api / account - deletion )
* * `string` ** phone_code ** - SMS code , for more info [ click here » ]( https :// core . telegram . org / api / account - deletion )
2019-09-18 21:32:24 +02:00
*
2019-09-18 20:46:20 +02:00
* @ param array $params Parameters
2018-06-29 13:50:14 +02:00
*
2019-06-05 15:38:32 +02:00
* @ return bool
2018-06-29 13:50:14 +02:00
*/
2019-09-18 20:46:20 +02:00
public function confirmPhone ( $params );
2018-06-29 13:50:14 +02:00
/**
2019-12-27 17:43:29 +01:00
* Get temporary payment password .
2019-09-18 20:46:20 +02:00
*
2019-09-18 21:32:24 +02:00
* Parameters :
2019-12-27 17:43:29 +01:00
* * `InputCheckPasswordSRP` ** password ** - SRP password parameters
* * `int` ** period ** - Time during which the temporary password will be valid , in seconds ; should be between 60 and 86400
2019-09-18 21:32:24 +02:00
*
2019-09-18 20:46:20 +02:00
* @ param array $params Parameters
2018-06-29 13:50:14 +02:00
*
2019-09-18 20:46:20 +02:00
* @ return account . TmpPassword
2018-06-29 13:50:14 +02:00
*/
2019-09-18 20:46:20 +02:00
public function getTmpPassword ( $params );
2019-06-05 15:38:32 +02:00
/**
2019-12-27 17:43:29 +01:00
* Get web [ login widget ]( https :// core . telegram . org / widgets / login ) authorizations .
2019-09-18 20:46:20 +02:00
*
* @ return account . WebAuthorizations
2019-06-05 15:38:32 +02:00
*/
public function getWebAuthorizations ();
2018-06-29 13:50:14 +02:00
/**
2019-12-27 17:43:29 +01:00
* Log out an active web [ telegram login ]( https :// core . telegram . org / widgets / login ) session .
2019-09-18 20:46:20 +02:00
*
2019-09-18 21:32:24 +02:00
* Parameters :
2019-12-28 16:45:00 +01:00
* * `long` ** hash ** - [ Session ]( https :// docs . madelineproto . xyz / API_docs / constructors / webAuthorization . html ) hash
2019-09-18 21:32:24 +02:00
*
2019-09-18 20:46:20 +02:00
* @ param array $params Parameters
2018-06-29 13:50:14 +02:00
*
2019-06-05 15:38:32 +02:00
* @ return bool
2018-06-29 13:50:14 +02:00
*/
2019-09-18 20:46:20 +02:00
public function resetWebAuthorization ( $params );
2019-06-05 15:38:32 +02:00
/**
2019-12-27 17:43:29 +01:00
* Reset all active web [ telegram login ]( https :// core . telegram . org / widgets / login ) sessions .
2019-09-18 20:46:20 +02:00
*
2019-06-05 15:38:32 +02:00
* @ return bool
*/
public function resetWebAuthorizations ();
/**
2019-12-27 17:43:29 +01:00
* Get all saved [ Telegram Passport ]( https :// core . telegram . org / passport ) documents , [ for more info see the passport docs » ]( https :// core . telegram . org / passport / encryption #encryption).
2019-09-18 20:46:20 +02:00
*
2019-12-14 16:47:04 +01:00
* @ return of SecureValue []
2019-06-05 15:38:32 +02:00
*/
public function getAllSecureValues ();
2018-06-29 13:50:14 +02:00
/**
2019-12-27 17:43:29 +01:00
* Get saved [ Telegram Passport ]( https :// core . telegram . org / passport ) document , [ for more info see the passport docs » ]( https :// core . telegram . org / passport / encryption #encryption).
2019-09-18 20:46:20 +02:00
*
2019-09-18 21:32:24 +02:00
* Parameters :
2020-06-16 17:52:55 +02:00
* * `[SecureValueType]` ** types ** - Requested value types
2019-09-18 21:32:24 +02:00
*
2019-09-18 20:46:20 +02:00
* @ param array $params Parameters
2018-06-29 13:50:14 +02:00
*
2019-12-14 16:47:04 +01:00
* @ return of SecureValue []
2018-06-29 13:50:14 +02:00
*/
2019-09-18 20:46:20 +02:00
public function getSecureValue ( $params );
2018-06-29 13:50:14 +02:00
/**
2019-12-27 17:43:29 +01:00
* Securely save [ Telegram Passport ]( https :// core . telegram . org / passport ) document , [ for more info see the passport docs » ]( https :// core . telegram . org / passport / encryption #encryption).
2019-09-18 20:46:20 +02:00
*
2019-09-18 21:32:24 +02:00
* Parameters :
2019-12-27 17:43:29 +01:00
* * `InputSecureValue` ** value ** - Secure value , [ for more info see the passport docs » ]( https :// core . telegram . org / passport / encryption #encryption)
* * `long` ** secure_secret_id ** - Passport secret hash , [ for more info see the passport docs » ]( https :// core . telegram . org / passport / encryption #encryption)
2019-09-18 21:32:24 +02:00
*
2019-09-18 20:46:20 +02:00
* @ param array $params Parameters
2018-06-29 13:50:14 +02:00
*
2019-06-05 15:38:32 +02:00
* @ return SecureValue
2018-06-29 13:50:14 +02:00
*/
2019-09-18 20:46:20 +02:00
public function saveSecureValue ( $params );
2018-06-29 13:50:14 +02:00
/**
2019-12-27 17:43:29 +01:00
* Delete stored [ Telegram Passport ]( https :// core . telegram . org / passport ) documents , [ for more info see the passport docs » ]( https :// core . telegram . org / passport / encryption #encryption).
2019-09-18 20:46:20 +02:00
*
2019-09-18 21:32:24 +02:00
* Parameters :
2020-06-16 17:52:55 +02:00
* * `[SecureValueType]` ** types ** - Document types to delete
2019-09-18 21:32:24 +02:00
*
2019-09-18 20:46:20 +02:00
* @ param array $params Parameters
2018-06-29 13:50:14 +02:00
*
2019-06-05 15:38:32 +02:00
* @ return bool
2018-06-29 13:50:14 +02:00
*/
2019-09-18 20:46:20 +02:00
public function deleteSecureValue ( $params );
2018-06-29 13:50:14 +02:00
/**
2019-12-27 17:43:29 +01:00
* Returns a Telegram Passport authorization form for sharing data with a service .
2019-09-18 20:46:20 +02:00
*
2019-09-18 21:32:24 +02:00
* Parameters :
2019-12-27 17:43:29 +01:00
* * `int` ** bot_id ** - User identifier of the service ' s bot
* * `string` ** scope ** - Telegram Passport element types requested by the service
* * `string` ** public_key ** - Service ' s public key
2019-09-18 21:32:24 +02:00
*
2019-09-18 20:46:20 +02:00
* @ param array $params Parameters
2018-06-29 13:50:14 +02:00
*
2019-09-18 20:46:20 +02:00
* @ return account . AuthorizationForm
2018-06-29 13:50:14 +02:00
*/
2019-09-18 20:46:20 +02:00
public function getAuthorizationForm ( $params );
2018-06-29 13:50:14 +02:00
/**
2019-12-27 17:43:29 +01:00
* Sends a Telegram Passport authorization form , effectively sharing data with the service .
2019-09-18 20:46:20 +02:00
*
2019-09-18 21:32:24 +02:00
* Parameters :
* * `int` ** bot_id ** - Bot ID
2019-12-27 17:43:29 +01:00
* * `string` ** scope ** - Telegram Passport element types requested by the service
* * `string` ** public_key ** - Service ' s public key
2020-06-16 17:52:55 +02:00
* * `[SecureValueHash]` ** value_hashes ** - Types of values sent and their hashes
2019-12-27 17:43:29 +01:00
* * `SecureCredentialsEncrypted` ** credentials ** - Encrypted values
2019-09-18 21:32:24 +02:00
*
2019-09-18 20:46:20 +02:00
* @ param array $params Parameters
2018-06-29 13:50:14 +02:00
*
* @ return bool
*/
2019-09-18 20:46:20 +02:00
public function acceptAuthorization ( $params );
2018-06-29 13:50:14 +02:00
/**
2019-12-27 17:43:29 +01:00
* Send the verification phone code for telegram [ passport ]( https :// core . telegram . org / passport ) .
2018-06-29 13:50:14 +02:00
*
2019-09-18 21:32:24 +02:00
* Parameters :
2019-12-27 17:43:29 +01:00
* * `string` ** phone_number ** - The phone number to verify
* * `CodeSettings` ** settings ** - Phone code settings
2019-09-18 21:32:24 +02:00
*
2019-09-18 20:46:20 +02:00
* @ param array $params Parameters
*
* @ return auth . SentCode
2018-06-29 13:50:14 +02:00
*/
2019-09-18 20:46:20 +02:00
public function sendVerifyPhoneCode ( $params );
2018-06-29 13:50:14 +02:00
/**
2019-12-27 17:43:29 +01:00
* Verify a phone number for telegram [ passport ]( https :// core . telegram . org / passport ) .
2019-09-18 20:46:20 +02:00
*
2019-09-18 21:32:24 +02:00
* Parameters :
2019-12-27 17:43:29 +01:00
* * `string` ** phone_number ** - Phone number
2019-12-28 16:45:00 +01:00
* * `string` ** phone_code_hash ** - Phone code hash received from the call to [ account . sendVerifyPhoneCode ]( https :// docs . madelineproto . xyz / API_docs / methods / account . sendVerifyPhoneCode . html )
* * `string` ** phone_code ** - Code received after the call to [ account . sendVerifyPhoneCode ]( https :// docs . madelineproto . xyz / API_docs / methods / account . sendVerifyPhoneCode . html )
2019-09-18 21:32:24 +02:00
*
2019-09-18 20:46:20 +02:00
* @ param array $params Parameters
2018-06-29 13:50:14 +02:00
*
2019-06-05 15:38:32 +02:00
* @ return bool
2018-06-29 13:50:14 +02:00
*/
2019-09-18 20:46:20 +02:00
public function verifyPhone ( $params );
Merge alpha into master (async, huge bugfixes and more) (#546)
* Implement async and lots of bugfixes
* Implement more async
* Implement async, implement bugfixes for the connection module, for the datacenter module, huge bugfixes, huge perfomance improvements, media DCs for https, advanced selecting, custom var_dump, totally rewritten IOLoop and response mechanism, promises, improvements to the TL parser, custom mb_substr
* Apply fixes from StyleCI
* Bugfixes
* Apply fixes from StyleCI
* Bugfixes, implement combined promises
* Apply fixes from StyleCI
* Support passing method arguments as callable
* Starting to write async upload logic
* Apply fixes from StyleCI
* Start implementing async file upload
* Apply fixes from StyleCI
* bugfix
* Apply fixes from StyleCI
* Start rewriting connection module
* Add PHP file docblocks for all classes
* Start working on new async stream API
* Finish writing stream API
* More stream API fixes
* Apply fixes from StyleCI
* Rewrite DataCenter and Connection modules
* Clean up stream API documentation
* Fixes
* Apply fixes from StyleCI
* Add referenced parameter to get length of buffer to read in getReadBuffer API
* Moved all MessageHandler code in the Connection module, added a PHP version warning in the phar
* Start fixing reads
* Fix all protocol stream wrappers
* Apply fixes from StyleCI
* Implement disconnection, and remove end function
* Working async RPC
* Implement async file upload
* Bugfix
* Method recall bugfixes
* Bugfixes
* Trait bugfixes
* Fix FIFO buffer
* Bugfixes and speedtests
* Async logging
* Implement websocket streams
* Implement loop API, signal API, clean closing and start changing layer
* Small magna, websocket and HTTP fixes
* Clean up loop API
* Improved stack traces, 2FA and async
* Login fixes
* Added instructions for manual verification
* Small fixes
* More app info improvements
* More app info improvements
* TL and 2FA fixes
* Update to layer 89
* More bugfixes
* Implement broken media reporting
* Remove debug comments
* PHP 7.2 backwards compatibility
* Bugfixes
* Async key generation
* Some simplifications
* Transport fixes
* Cleanup
* async API
* Performance fixes
* Fixes to async API
* Bugfixes
* Implement one-time async loop
* Authorization and logging fixes
* Update to layer 91
* 7to5 fix
* Null coalesce conversion
* Implement socks5 proxy
* Implement HTTP proxy
* Fixes to HTTP proxy
* MTProxy and socks5 fixes
* Disable PHP 5 conversion
* Proxies have higher priority
* Avoid error handling in vendor
* Override composer dependencies
* Fix travis build
* Final composer fixes
* Proxy logic fixes
* Fix get_updates update handling
* Do not use parallel file driver if not supported
* Refactor loader and implement HTTP fixes
* Suppress errors in loader
* HTTP and authorization fixes
* HTTP fixes
* Improved peer management
* Use HTTP protocol on altervista
* Small bugfixes
* Minor fixes
* Docufix
* Docufix
* Legacy fixes
* Fix message queue
* Avoid updating if using MTProxy
* Improve logs and examples
* Trim final newlines while converting parse mode
* Reimplement noResponse flag
* Async combined event handler and APIFactory fixes
* Actually return config
* Case-insensitive methods
* Bugfix
* Apply fixes from StyleCI (#545)
* MTProxy fixes
* PHP 5 warning
* Improved PHP 5 warning
* Use <br> along with newlines in web logs
* Update docs
2018-12-26 20:51:14 +01:00
/**
2019-12-27 17:43:29 +01:00
* Send the verification email code for telegram [ passport ]( https :// core . telegram . org / passport ) .
Merge alpha into master (async, huge bugfixes and more) (#546)
* Implement async and lots of bugfixes
* Implement more async
* Implement async, implement bugfixes for the connection module, for the datacenter module, huge bugfixes, huge perfomance improvements, media DCs for https, advanced selecting, custom var_dump, totally rewritten IOLoop and response mechanism, promises, improvements to the TL parser, custom mb_substr
* Apply fixes from StyleCI
* Bugfixes
* Apply fixes from StyleCI
* Bugfixes, implement combined promises
* Apply fixes from StyleCI
* Support passing method arguments as callable
* Starting to write async upload logic
* Apply fixes from StyleCI
* Start implementing async file upload
* Apply fixes from StyleCI
* bugfix
* Apply fixes from StyleCI
* Start rewriting connection module
* Add PHP file docblocks for all classes
* Start working on new async stream API
* Finish writing stream API
* More stream API fixes
* Apply fixes from StyleCI
* Rewrite DataCenter and Connection modules
* Clean up stream API documentation
* Fixes
* Apply fixes from StyleCI
* Add referenced parameter to get length of buffer to read in getReadBuffer API
* Moved all MessageHandler code in the Connection module, added a PHP version warning in the phar
* Start fixing reads
* Fix all protocol stream wrappers
* Apply fixes from StyleCI
* Implement disconnection, and remove end function
* Working async RPC
* Implement async file upload
* Bugfix
* Method recall bugfixes
* Bugfixes
* Trait bugfixes
* Fix FIFO buffer
* Bugfixes and speedtests
* Async logging
* Implement websocket streams
* Implement loop API, signal API, clean closing and start changing layer
* Small magna, websocket and HTTP fixes
* Clean up loop API
* Improved stack traces, 2FA and async
* Login fixes
* Added instructions for manual verification
* Small fixes
* More app info improvements
* More app info improvements
* TL and 2FA fixes
* Update to layer 89
* More bugfixes
* Implement broken media reporting
* Remove debug comments
* PHP 7.2 backwards compatibility
* Bugfixes
* Async key generation
* Some simplifications
* Transport fixes
* Cleanup
* async API
* Performance fixes
* Fixes to async API
* Bugfixes
* Implement one-time async loop
* Authorization and logging fixes
* Update to layer 91
* 7to5 fix
* Null coalesce conversion
* Implement socks5 proxy
* Implement HTTP proxy
* Fixes to HTTP proxy
* MTProxy and socks5 fixes
* Disable PHP 5 conversion
* Proxies have higher priority
* Avoid error handling in vendor
* Override composer dependencies
* Fix travis build
* Final composer fixes
* Proxy logic fixes
* Fix get_updates update handling
* Do not use parallel file driver if not supported
* Refactor loader and implement HTTP fixes
* Suppress errors in loader
* HTTP and authorization fixes
* HTTP fixes
* Improved peer management
* Use HTTP protocol on altervista
* Small bugfixes
* Minor fixes
* Docufix
* Docufix
* Legacy fixes
* Fix message queue
* Avoid updating if using MTProxy
* Improve logs and examples
* Trim final newlines while converting parse mode
* Reimplement noResponse flag
* Async combined event handler and APIFactory fixes
* Actually return config
* Case-insensitive methods
* Bugfix
* Apply fixes from StyleCI (#545)
* MTProxy fixes
* PHP 5 warning
* Improved PHP 5 warning
* Use <br> along with newlines in web logs
* Update docs
2018-12-26 20:51:14 +01:00
*
2019-09-18 21:32:24 +02:00
* Parameters :
2019-12-27 17:43:29 +01:00
* * `string` ** email ** - The email where to send the code
2019-09-18 21:32:24 +02:00
*
2019-09-18 20:46:20 +02:00
* @ param array $params Parameters
*
* @ return account . SentEmailCode
Merge alpha into master (async, huge bugfixes and more) (#546)
* Implement async and lots of bugfixes
* Implement more async
* Implement async, implement bugfixes for the connection module, for the datacenter module, huge bugfixes, huge perfomance improvements, media DCs for https, advanced selecting, custom var_dump, totally rewritten IOLoop and response mechanism, promises, improvements to the TL parser, custom mb_substr
* Apply fixes from StyleCI
* Bugfixes
* Apply fixes from StyleCI
* Bugfixes, implement combined promises
* Apply fixes from StyleCI
* Support passing method arguments as callable
* Starting to write async upload logic
* Apply fixes from StyleCI
* Start implementing async file upload
* Apply fixes from StyleCI
* bugfix
* Apply fixes from StyleCI
* Start rewriting connection module
* Add PHP file docblocks for all classes
* Start working on new async stream API
* Finish writing stream API
* More stream API fixes
* Apply fixes from StyleCI
* Rewrite DataCenter and Connection modules
* Clean up stream API documentation
* Fixes
* Apply fixes from StyleCI
* Add referenced parameter to get length of buffer to read in getReadBuffer API
* Moved all MessageHandler code in the Connection module, added a PHP version warning in the phar
* Start fixing reads
* Fix all protocol stream wrappers
* Apply fixes from StyleCI
* Implement disconnection, and remove end function
* Working async RPC
* Implement async file upload
* Bugfix
* Method recall bugfixes
* Bugfixes
* Trait bugfixes
* Fix FIFO buffer
* Bugfixes and speedtests
* Async logging
* Implement websocket streams
* Implement loop API, signal API, clean closing and start changing layer
* Small magna, websocket and HTTP fixes
* Clean up loop API
* Improved stack traces, 2FA and async
* Login fixes
* Added instructions for manual verification
* Small fixes
* More app info improvements
* More app info improvements
* TL and 2FA fixes
* Update to layer 89
* More bugfixes
* Implement broken media reporting
* Remove debug comments
* PHP 7.2 backwards compatibility
* Bugfixes
* Async key generation
* Some simplifications
* Transport fixes
* Cleanup
* async API
* Performance fixes
* Fixes to async API
* Bugfixes
* Implement one-time async loop
* Authorization and logging fixes
* Update to layer 91
* 7to5 fix
* Null coalesce conversion
* Implement socks5 proxy
* Implement HTTP proxy
* Fixes to HTTP proxy
* MTProxy and socks5 fixes
* Disable PHP 5 conversion
* Proxies have higher priority
* Avoid error handling in vendor
* Override composer dependencies
* Fix travis build
* Final composer fixes
* Proxy logic fixes
* Fix get_updates update handling
* Do not use parallel file driver if not supported
* Refactor loader and implement HTTP fixes
* Suppress errors in loader
* HTTP and authorization fixes
* HTTP fixes
* Improved peer management
* Use HTTP protocol on altervista
* Small bugfixes
* Minor fixes
* Docufix
* Docufix
* Legacy fixes
* Fix message queue
* Avoid updating if using MTProxy
* Improve logs and examples
* Trim final newlines while converting parse mode
* Reimplement noResponse flag
* Async combined event handler and APIFactory fixes
* Actually return config
* Case-insensitive methods
* Bugfix
* Apply fixes from StyleCI (#545)
* MTProxy fixes
* PHP 5 warning
* Improved PHP 5 warning
* Use <br> along with newlines in web logs
* Update docs
2018-12-26 20:51:14 +01:00
*/
2019-09-18 20:46:20 +02:00
public function sendVerifyEmailCode ( $params );
Merge alpha into master (async, huge bugfixes and more) (#546)
* Implement async and lots of bugfixes
* Implement more async
* Implement async, implement bugfixes for the connection module, for the datacenter module, huge bugfixes, huge perfomance improvements, media DCs for https, advanced selecting, custom var_dump, totally rewritten IOLoop and response mechanism, promises, improvements to the TL parser, custom mb_substr
* Apply fixes from StyleCI
* Bugfixes
* Apply fixes from StyleCI
* Bugfixes, implement combined promises
* Apply fixes from StyleCI
* Support passing method arguments as callable
* Starting to write async upload logic
* Apply fixes from StyleCI
* Start implementing async file upload
* Apply fixes from StyleCI
* bugfix
* Apply fixes from StyleCI
* Start rewriting connection module
* Add PHP file docblocks for all classes
* Start working on new async stream API
* Finish writing stream API
* More stream API fixes
* Apply fixes from StyleCI
* Rewrite DataCenter and Connection modules
* Clean up stream API documentation
* Fixes
* Apply fixes from StyleCI
* Add referenced parameter to get length of buffer to read in getReadBuffer API
* Moved all MessageHandler code in the Connection module, added a PHP version warning in the phar
* Start fixing reads
* Fix all protocol stream wrappers
* Apply fixes from StyleCI
* Implement disconnection, and remove end function
* Working async RPC
* Implement async file upload
* Bugfix
* Method recall bugfixes
* Bugfixes
* Trait bugfixes
* Fix FIFO buffer
* Bugfixes and speedtests
* Async logging
* Implement websocket streams
* Implement loop API, signal API, clean closing and start changing layer
* Small magna, websocket and HTTP fixes
* Clean up loop API
* Improved stack traces, 2FA and async
* Login fixes
* Added instructions for manual verification
* Small fixes
* More app info improvements
* More app info improvements
* TL and 2FA fixes
* Update to layer 89
* More bugfixes
* Implement broken media reporting
* Remove debug comments
* PHP 7.2 backwards compatibility
* Bugfixes
* Async key generation
* Some simplifications
* Transport fixes
* Cleanup
* async API
* Performance fixes
* Fixes to async API
* Bugfixes
* Implement one-time async loop
* Authorization and logging fixes
* Update to layer 91
* 7to5 fix
* Null coalesce conversion
* Implement socks5 proxy
* Implement HTTP proxy
* Fixes to HTTP proxy
* MTProxy and socks5 fixes
* Disable PHP 5 conversion
* Proxies have higher priority
* Avoid error handling in vendor
* Override composer dependencies
* Fix travis build
* Final composer fixes
* Proxy logic fixes
* Fix get_updates update handling
* Do not use parallel file driver if not supported
* Refactor loader and implement HTTP fixes
* Suppress errors in loader
* HTTP and authorization fixes
* HTTP fixes
* Improved peer management
* Use HTTP protocol on altervista
* Small bugfixes
* Minor fixes
* Docufix
* Docufix
* Legacy fixes
* Fix message queue
* Avoid updating if using MTProxy
* Improve logs and examples
* Trim final newlines while converting parse mode
* Reimplement noResponse flag
* Async combined event handler and APIFactory fixes
* Actually return config
* Case-insensitive methods
* Bugfix
* Apply fixes from StyleCI (#545)
* MTProxy fixes
* PHP 5 warning
* Improved PHP 5 warning
* Use <br> along with newlines in web logs
* Update docs
2018-12-26 20:51:14 +01:00
/**
2019-12-27 17:43:29 +01:00
* Verify an email address for telegram [ passport ]( https :// core . telegram . org / passport ) .
2019-09-18 20:46:20 +02:00
*
2019-09-18 21:32:24 +02:00
* Parameters :
2019-12-27 17:43:29 +01:00
* * `string` ** email ** - The email to verify
* * `string` ** code ** - The verification code that was received
2019-09-18 21:32:24 +02:00
*
2019-09-18 20:46:20 +02:00
* @ param array $params Parameters
Merge alpha into master (async, huge bugfixes and more) (#546)
* Implement async and lots of bugfixes
* Implement more async
* Implement async, implement bugfixes for the connection module, for the datacenter module, huge bugfixes, huge perfomance improvements, media DCs for https, advanced selecting, custom var_dump, totally rewritten IOLoop and response mechanism, promises, improvements to the TL parser, custom mb_substr
* Apply fixes from StyleCI
* Bugfixes
* Apply fixes from StyleCI
* Bugfixes, implement combined promises
* Apply fixes from StyleCI
* Support passing method arguments as callable
* Starting to write async upload logic
* Apply fixes from StyleCI
* Start implementing async file upload
* Apply fixes from StyleCI
* bugfix
* Apply fixes from StyleCI
* Start rewriting connection module
* Add PHP file docblocks for all classes
* Start working on new async stream API
* Finish writing stream API
* More stream API fixes
* Apply fixes from StyleCI
* Rewrite DataCenter and Connection modules
* Clean up stream API documentation
* Fixes
* Apply fixes from StyleCI
* Add referenced parameter to get length of buffer to read in getReadBuffer API
* Moved all MessageHandler code in the Connection module, added a PHP version warning in the phar
* Start fixing reads
* Fix all protocol stream wrappers
* Apply fixes from StyleCI
* Implement disconnection, and remove end function
* Working async RPC
* Implement async file upload
* Bugfix
* Method recall bugfixes
* Bugfixes
* Trait bugfixes
* Fix FIFO buffer
* Bugfixes and speedtests
* Async logging
* Implement websocket streams
* Implement loop API, signal API, clean closing and start changing layer
* Small magna, websocket and HTTP fixes
* Clean up loop API
* Improved stack traces, 2FA and async
* Login fixes
* Added instructions for manual verification
* Small fixes
* More app info improvements
* More app info improvements
* TL and 2FA fixes
* Update to layer 89
* More bugfixes
* Implement broken media reporting
* Remove debug comments
* PHP 7.2 backwards compatibility
* Bugfixes
* Async key generation
* Some simplifications
* Transport fixes
* Cleanup
* async API
* Performance fixes
* Fixes to async API
* Bugfixes
* Implement one-time async loop
* Authorization and logging fixes
* Update to layer 91
* 7to5 fix
* Null coalesce conversion
* Implement socks5 proxy
* Implement HTTP proxy
* Fixes to HTTP proxy
* MTProxy and socks5 fixes
* Disable PHP 5 conversion
* Proxies have higher priority
* Avoid error handling in vendor
* Override composer dependencies
* Fix travis build
* Final composer fixes
* Proxy logic fixes
* Fix get_updates update handling
* Do not use parallel file driver if not supported
* Refactor loader and implement HTTP fixes
* Suppress errors in loader
* HTTP and authorization fixes
* HTTP fixes
* Improved peer management
* Use HTTP protocol on altervista
* Small bugfixes
* Minor fixes
* Docufix
* Docufix
* Legacy fixes
* Fix message queue
* Avoid updating if using MTProxy
* Improve logs and examples
* Trim final newlines while converting parse mode
* Reimplement noResponse flag
* Async combined event handler and APIFactory fixes
* Actually return config
* Case-insensitive methods
* Bugfix
* Apply fixes from StyleCI (#545)
* MTProxy fixes
* PHP 5 warning
* Improved PHP 5 warning
* Use <br> along with newlines in web logs
* Update docs
2018-12-26 20:51:14 +01:00
*
* @ return bool
*/
2019-09-18 20:46:20 +02:00
public function verifyEmail ( $params );
Merge alpha into master (async, huge bugfixes and more) (#546)
* Implement async and lots of bugfixes
* Implement more async
* Implement async, implement bugfixes for the connection module, for the datacenter module, huge bugfixes, huge perfomance improvements, media DCs for https, advanced selecting, custom var_dump, totally rewritten IOLoop and response mechanism, promises, improvements to the TL parser, custom mb_substr
* Apply fixes from StyleCI
* Bugfixes
* Apply fixes from StyleCI
* Bugfixes, implement combined promises
* Apply fixes from StyleCI
* Support passing method arguments as callable
* Starting to write async upload logic
* Apply fixes from StyleCI
* Start implementing async file upload
* Apply fixes from StyleCI
* bugfix
* Apply fixes from StyleCI
* Start rewriting connection module
* Add PHP file docblocks for all classes
* Start working on new async stream API
* Finish writing stream API
* More stream API fixes
* Apply fixes from StyleCI
* Rewrite DataCenter and Connection modules
* Clean up stream API documentation
* Fixes
* Apply fixes from StyleCI
* Add referenced parameter to get length of buffer to read in getReadBuffer API
* Moved all MessageHandler code in the Connection module, added a PHP version warning in the phar
* Start fixing reads
* Fix all protocol stream wrappers
* Apply fixes from StyleCI
* Implement disconnection, and remove end function
* Working async RPC
* Implement async file upload
* Bugfix
* Method recall bugfixes
* Bugfixes
* Trait bugfixes
* Fix FIFO buffer
* Bugfixes and speedtests
* Async logging
* Implement websocket streams
* Implement loop API, signal API, clean closing and start changing layer
* Small magna, websocket and HTTP fixes
* Clean up loop API
* Improved stack traces, 2FA and async
* Login fixes
* Added instructions for manual verification
* Small fixes
* More app info improvements
* More app info improvements
* TL and 2FA fixes
* Update to layer 89
* More bugfixes
* Implement broken media reporting
* Remove debug comments
* PHP 7.2 backwards compatibility
* Bugfixes
* Async key generation
* Some simplifications
* Transport fixes
* Cleanup
* async API
* Performance fixes
* Fixes to async API
* Bugfixes
* Implement one-time async loop
* Authorization and logging fixes
* Update to layer 91
* 7to5 fix
* Null coalesce conversion
* Implement socks5 proxy
* Implement HTTP proxy
* Fixes to HTTP proxy
* MTProxy and socks5 fixes
* Disable PHP 5 conversion
* Proxies have higher priority
* Avoid error handling in vendor
* Override composer dependencies
* Fix travis build
* Final composer fixes
* Proxy logic fixes
* Fix get_updates update handling
* Do not use parallel file driver if not supported
* Refactor loader and implement HTTP fixes
* Suppress errors in loader
* HTTP and authorization fixes
* HTTP fixes
* Improved peer management
* Use HTTP protocol on altervista
* Small bugfixes
* Minor fixes
* Docufix
* Docufix
* Legacy fixes
* Fix message queue
* Avoid updating if using MTProxy
* Improve logs and examples
* Trim final newlines while converting parse mode
* Reimplement noResponse flag
* Async combined event handler and APIFactory fixes
* Actually return config
* Case-insensitive methods
* Bugfix
* Apply fixes from StyleCI (#545)
* MTProxy fixes
* PHP 5 warning
* Improved PHP 5 warning
* Use <br> along with newlines in web logs
* Update docs
2018-12-26 20:51:14 +01:00
/**
2019-12-27 17:43:29 +01:00
* Intialize account takeout session .
2019-09-18 20:46:20 +02:00
*
2019-09-18 21:32:24 +02:00
* Parameters :
2019-12-27 17:43:29 +01:00
* * `boolean` ** contacts ** - Optional : Whether to export contacts
* * `boolean` ** message_users ** - Optional : Whether to export messages in private chats
* * `boolean` ** message_chats ** - Optional : Whether to export messages in [ legacy groups ]( https :// core . telegram . org / api / channel )
* * `boolean` ** message_megagroups ** - Optional : Whether to export messages in [ supergroups ]( https :// core . telegram . org / api / channel )
* * `boolean` ** message_channels ** - Optional : Whether to export messages in [ channels ]( https :// core . telegram . org / api / channel )
* * `boolean` ** files ** - Optional : Whether to export files
* * `int` ** file_max_size ** - Optional : Maximum size of files to export
2019-09-18 21:32:24 +02:00
*
2019-09-18 20:46:20 +02:00
* @ param array $params Parameters
Merge alpha into master (async, huge bugfixes and more) (#546)
* Implement async and lots of bugfixes
* Implement more async
* Implement async, implement bugfixes for the connection module, for the datacenter module, huge bugfixes, huge perfomance improvements, media DCs for https, advanced selecting, custom var_dump, totally rewritten IOLoop and response mechanism, promises, improvements to the TL parser, custom mb_substr
* Apply fixes from StyleCI
* Bugfixes
* Apply fixes from StyleCI
* Bugfixes, implement combined promises
* Apply fixes from StyleCI
* Support passing method arguments as callable
* Starting to write async upload logic
* Apply fixes from StyleCI
* Start implementing async file upload
* Apply fixes from StyleCI
* bugfix
* Apply fixes from StyleCI
* Start rewriting connection module
* Add PHP file docblocks for all classes
* Start working on new async stream API
* Finish writing stream API
* More stream API fixes
* Apply fixes from StyleCI
* Rewrite DataCenter and Connection modules
* Clean up stream API documentation
* Fixes
* Apply fixes from StyleCI
* Add referenced parameter to get length of buffer to read in getReadBuffer API
* Moved all MessageHandler code in the Connection module, added a PHP version warning in the phar
* Start fixing reads
* Fix all protocol stream wrappers
* Apply fixes from StyleCI
* Implement disconnection, and remove end function
* Working async RPC
* Implement async file upload
* Bugfix
* Method recall bugfixes
* Bugfixes
* Trait bugfixes
* Fix FIFO buffer
* Bugfixes and speedtests
* Async logging
* Implement websocket streams
* Implement loop API, signal API, clean closing and start changing layer
* Small magna, websocket and HTTP fixes
* Clean up loop API
* Improved stack traces, 2FA and async
* Login fixes
* Added instructions for manual verification
* Small fixes
* More app info improvements
* More app info improvements
* TL and 2FA fixes
* Update to layer 89
* More bugfixes
* Implement broken media reporting
* Remove debug comments
* PHP 7.2 backwards compatibility
* Bugfixes
* Async key generation
* Some simplifications
* Transport fixes
* Cleanup
* async API
* Performance fixes
* Fixes to async API
* Bugfixes
* Implement one-time async loop
* Authorization and logging fixes
* Update to layer 91
* 7to5 fix
* Null coalesce conversion
* Implement socks5 proxy
* Implement HTTP proxy
* Fixes to HTTP proxy
* MTProxy and socks5 fixes
* Disable PHP 5 conversion
* Proxies have higher priority
* Avoid error handling in vendor
* Override composer dependencies
* Fix travis build
* Final composer fixes
* Proxy logic fixes
* Fix get_updates update handling
* Do not use parallel file driver if not supported
* Refactor loader and implement HTTP fixes
* Suppress errors in loader
* HTTP and authorization fixes
* HTTP fixes
* Improved peer management
* Use HTTP protocol on altervista
* Small bugfixes
* Minor fixes
* Docufix
* Docufix
* Legacy fixes
* Fix message queue
* Avoid updating if using MTProxy
* Improve logs and examples
* Trim final newlines while converting parse mode
* Reimplement noResponse flag
* Async combined event handler and APIFactory fixes
* Actually return config
* Case-insensitive methods
* Bugfix
* Apply fixes from StyleCI (#545)
* MTProxy fixes
* PHP 5 warning
* Improved PHP 5 warning
* Use <br> along with newlines in web logs
* Update docs
2018-12-26 20:51:14 +01:00
*
2019-09-18 20:46:20 +02:00
* @ return account . Takeout
Merge alpha into master (async, huge bugfixes and more) (#546)
* Implement async and lots of bugfixes
* Implement more async
* Implement async, implement bugfixes for the connection module, for the datacenter module, huge bugfixes, huge perfomance improvements, media DCs for https, advanced selecting, custom var_dump, totally rewritten IOLoop and response mechanism, promises, improvements to the TL parser, custom mb_substr
* Apply fixes from StyleCI
* Bugfixes
* Apply fixes from StyleCI
* Bugfixes, implement combined promises
* Apply fixes from StyleCI
* Support passing method arguments as callable
* Starting to write async upload logic
* Apply fixes from StyleCI
* Start implementing async file upload
* Apply fixes from StyleCI
* bugfix
* Apply fixes from StyleCI
* Start rewriting connection module
* Add PHP file docblocks for all classes
* Start working on new async stream API
* Finish writing stream API
* More stream API fixes
* Apply fixes from StyleCI
* Rewrite DataCenter and Connection modules
* Clean up stream API documentation
* Fixes
* Apply fixes from StyleCI
* Add referenced parameter to get length of buffer to read in getReadBuffer API
* Moved all MessageHandler code in the Connection module, added a PHP version warning in the phar
* Start fixing reads
* Fix all protocol stream wrappers
* Apply fixes from StyleCI
* Implement disconnection, and remove end function
* Working async RPC
* Implement async file upload
* Bugfix
* Method recall bugfixes
* Bugfixes
* Trait bugfixes
* Fix FIFO buffer
* Bugfixes and speedtests
* Async logging
* Implement websocket streams
* Implement loop API, signal API, clean closing and start changing layer
* Small magna, websocket and HTTP fixes
* Clean up loop API
* Improved stack traces, 2FA and async
* Login fixes
* Added instructions for manual verification
* Small fixes
* More app info improvements
* More app info improvements
* TL and 2FA fixes
* Update to layer 89
* More bugfixes
* Implement broken media reporting
* Remove debug comments
* PHP 7.2 backwards compatibility
* Bugfixes
* Async key generation
* Some simplifications
* Transport fixes
* Cleanup
* async API
* Performance fixes
* Fixes to async API
* Bugfixes
* Implement one-time async loop
* Authorization and logging fixes
* Update to layer 91
* 7to5 fix
* Null coalesce conversion
* Implement socks5 proxy
* Implement HTTP proxy
* Fixes to HTTP proxy
* MTProxy and socks5 fixes
* Disable PHP 5 conversion
* Proxies have higher priority
* Avoid error handling in vendor
* Override composer dependencies
* Fix travis build
* Final composer fixes
* Proxy logic fixes
* Fix get_updates update handling
* Do not use parallel file driver if not supported
* Refactor loader and implement HTTP fixes
* Suppress errors in loader
* HTTP and authorization fixes
* HTTP fixes
* Improved peer management
* Use HTTP protocol on altervista
* Small bugfixes
* Minor fixes
* Docufix
* Docufix
* Legacy fixes
* Fix message queue
* Avoid updating if using MTProxy
* Improve logs and examples
* Trim final newlines while converting parse mode
* Reimplement noResponse flag
* Async combined event handler and APIFactory fixes
* Actually return config
* Case-insensitive methods
* Bugfix
* Apply fixes from StyleCI (#545)
* MTProxy fixes
* PHP 5 warning
* Improved PHP 5 warning
* Use <br> along with newlines in web logs
* Update docs
2018-12-26 20:51:14 +01:00
*/
2019-09-18 20:46:20 +02:00
public function initTakeoutSession ( $params );
2019-03-08 14:16:57 +01:00
/**
2019-12-27 17:43:29 +01:00
* Finish account takeout session .
2019-09-18 20:46:20 +02:00
*
2019-09-18 21:32:24 +02:00
* Parameters :
2019-12-27 17:43:29 +01:00
* * `boolean` ** success ** - Optional : Data exported successfully
2019-09-18 21:32:24 +02:00
*
2019-09-18 20:46:20 +02:00
* @ param array $params Parameters
2019-03-08 14:16:57 +01:00
*
2019-06-05 15:38:32 +02:00
* @ return bool
2019-03-08 14:16:57 +01:00
*/
2019-09-18 20:46:20 +02:00
public function finishTakeoutSession ( $params );
2019-03-08 14:16:57 +01:00
/**
2019-12-27 17:43:29 +01:00
* Verify an email to use as [ 2 FA recovery method ]( https :// core . telegram . org / api / srp ) .
2019-09-18 20:46:20 +02:00
*
2019-09-18 21:32:24 +02:00
* Parameters :
2019-12-27 17:43:29 +01:00
* * `string` ** code ** - The phone code that was received after [ setting a recovery email ]( https :// core . telegram . org / api / srp #email-verification)
2019-09-18 21:32:24 +02:00
*
2019-09-18 20:46:20 +02:00
* @ param array $params Parameters
2019-03-08 14:16:57 +01:00
*
2019-06-05 15:38:32 +02:00
* @ return bool
2019-03-08 14:16:57 +01:00
*/
2019-09-18 20:46:20 +02:00
public function confirmPasswordEmail ( $params );
2019-03-08 14:16:57 +01:00
/**
2019-12-27 17:43:29 +01:00
* Resend the code to verify an email to use as [ 2 FA recovery method ]( https :// core . telegram . org / api / srp ) .
2019-09-18 20:46:20 +02:00
*
2019-06-05 15:38:32 +02:00
* @ return bool
2019-03-08 14:16:57 +01:00
*/
2019-06-05 15:38:32 +02:00
public function resendPasswordEmail ();
/**
2019-12-27 17:43:29 +01:00
* Cancel the code that was sent to verify an email to use as [ 2 FA recovery method ]( https :// core . telegram . org / api / srp ) .
2019-09-18 20:46:20 +02:00
*
2019-06-05 15:38:32 +02:00
* @ return bool
*/
public function cancelPasswordEmail ();
/**
2019-12-27 17:43:29 +01:00
* Whether the user will receive notifications when contacts sign up .
2019-09-18 20:46:20 +02:00
*
2019-06-05 15:38:32 +02:00
* @ return bool
*/
public function getContactSignUpNotification ();
2019-03-08 14:16:57 +01:00
/**
2019-12-27 17:43:29 +01:00
* Toggle contact sign up notifications .
2019-09-18 20:46:20 +02:00
*
2019-09-18 21:32:24 +02:00
* Parameters :
2019-12-27 17:43:29 +01:00
* * `Bool` ** silent ** - Whether to disable contact sign up notifications
2019-09-18 21:32:24 +02:00
*
2019-09-18 20:46:20 +02:00
* @ param array $params Parameters
2019-03-08 14:16:57 +01:00
*
2019-06-05 15:38:32 +02:00
* @ return bool
2017-01-22 17:40:56 +01:00
*/
2019-09-18 20:46:20 +02:00
public function setContactSignUpNotification ( $params );
2018-02-24 17:54:39 +01:00
2017-01-22 17:40:56 +01:00
/**
2019-12-27 17:43:29 +01:00
* Returns list of chats with non - default notification settings .
2019-09-18 20:46:20 +02:00
*
2019-09-18 21:32:24 +02:00
* Parameters :
2019-12-27 17:43:29 +01:00
* * `boolean` ** compare_sound ** - Optional : If true , chats with non - default sound will also be returned
* * `InputNotifyPeer` ** peer ** - Optional : If specified , only chats of the specified category will be returned
2019-09-18 21:32:24 +02:00
*
2019-09-18 20:46:20 +02:00
* @ param array $params Parameters
2017-01-22 17:40:56 +01:00
*
2019-06-05 15:38:32 +02:00
* @ return Updates
2017-01-22 17:40:56 +01:00
*/
2019-09-18 20:46:20 +02:00
public function getNotifyExceptions ( $params );
2018-02-24 17:54:39 +01:00
2017-01-22 17:40:56 +01:00
/**
2019-12-27 17:43:29 +01:00
* Get info about a certain wallpaper .
2019-09-18 20:46:20 +02:00
*
2019-09-18 21:32:24 +02:00
* Parameters :
2019-12-27 17:43:29 +01:00
* * `InputWallPaper` ** wallpaper ** - The wallpaper to get info about
2019-09-18 21:32:24 +02:00
*
2019-09-18 20:46:20 +02:00
* @ param array $params Parameters
2017-01-22 17:40:56 +01:00
*
2019-06-05 15:38:32 +02:00
* @ return WallPaper
*/
2019-09-18 20:46:20 +02:00
public function getWallPaper ( $params );
2019-06-05 15:38:32 +02:00
/**
2019-12-27 17:43:29 +01:00
* Create and upload a new wallpaper .
2019-09-18 20:46:20 +02:00
*
2019-09-18 21:32:24 +02:00
* Parameters :
2019-12-27 17:43:29 +01:00
* * `InputFile` ** file ** - The JPG / PNG wallpaper
* * `string` ** mime_type ** - MIME type of uploaded wallpaper
2019-09-18 20:46:20 +02:00
* * `WallPaperSettings` ** settings ** - Wallpaper settings
2019-09-18 21:32:24 +02:00
*
2019-09-18 20:46:20 +02:00
* @ param array $params Parameters
2019-06-05 15:38:32 +02:00
*
* @ return WallPaper
*/
2019-09-18 20:46:20 +02:00
public function uploadWallPaper ( $params );
2019-06-05 15:38:32 +02:00
/**
2019-12-27 17:43:29 +01:00
* Install / uninstall wallpaper .
2019-09-18 20:46:20 +02:00
*
2019-09-18 21:32:24 +02:00
* Parameters :
2019-12-27 17:43:29 +01:00
* * `InputWallPaper` ** wallpaper ** - Wallpaper to save
* * `Bool` ** unsave ** - Uninstall wallpaper ?
* * `WallPaperSettings` ** settings ** - Wallpaper settings
2019-09-18 21:32:24 +02:00
*
2019-09-18 20:46:20 +02:00
* @ param array $params Parameters
2019-06-05 15:38:32 +02:00
*
* @ return bool
*/
2019-09-18 20:46:20 +02:00
public function saveWallPaper ( $params );
2019-06-05 15:38:32 +02:00
/**
2019-09-18 21:32:24 +02:00
* Install wallpaper .
2019-09-18 20:46:20 +02:00
*
2019-09-18 21:32:24 +02:00
* Parameters :
2019-09-18 20:46:20 +02:00
* * `InputWallPaper` ** wallpaper ** - Wallpaper to install
2019-09-18 21:32:24 +02:00
* * `WallPaperSettings` ** settings ** - Wallpaper settings
*
2019-09-18 20:46:20 +02:00
* @ param array $params Parameters
2019-06-05 15:38:32 +02:00
*
* @ return bool
*/
2019-09-18 20:46:20 +02:00
public function installWallPaper ( $params );
2019-06-05 15:38:32 +02:00
/**
2019-12-27 17:43:29 +01:00
* Delete installed wallpapers .
2019-09-18 20:46:20 +02:00
*
2019-06-05 15:38:32 +02:00
* @ return bool
*/
public function resetWallPapers ();
/**
2019-12-27 17:43:29 +01:00
* Get media autodownload settings .
2019-09-18 20:46:20 +02:00
*
* @ return account . AutoDownloadSettings
2019-06-05 15:38:32 +02:00
*/
public function getAutoDownloadSettings ();
/**
2019-12-27 17:43:29 +01:00
* Change media autodownload settings .
2019-09-18 20:46:20 +02:00
*
2019-09-18 21:32:24 +02:00
* Parameters :
2019-12-27 17:43:29 +01:00
* * `boolean` ** low ** - Optional : Whether to save settings in the low data usage preset
* * `boolean` ** high ** - Optional : Whether to save settings in the high data usage preset
* * `AutoDownloadSettings` ** settings ** - Media autodownload settings
2019-09-18 21:32:24 +02:00
*
2019-09-18 20:46:20 +02:00
* @ param array $params Parameters
2019-06-05 15:38:32 +02:00
*
* @ return bool
*/
2019-09-18 20:46:20 +02:00
public function saveAutoDownloadSettings ( $params );
2019-09-12 19:08:48 +02:00
/**
2019-09-18 21:32:24 +02:00
* Upload theme .
2019-09-18 20:46:20 +02:00
*
2019-09-18 21:32:24 +02:00
* Parameters :
2019-12-27 17:43:29 +01:00
* * `InputFile` ** file ** - Theme file uploaded as described in [ files » ]( https :// core . telegram . org / api / files )
* * `InputFile` ** thumb ** - Optional : Thumbnail
2019-09-18 21:32:24 +02:00
* * `string` ** file_name ** - File name
2019-12-27 17:43:29 +01:00
* * `string` ** mime_type ** - MIME type , must be `application/x-tgtheme-{format}` , where `format` depends on the client
2019-09-18 21:32:24 +02:00
*
2019-09-18 20:46:20 +02:00
* @ param array $params Parameters
2019-09-12 19:08:48 +02:00
*
* @ return Document
*/
2019-09-18 20:46:20 +02:00
public function uploadTheme ( $params );
2019-09-12 19:08:48 +02:00
/**
2019-09-18 21:32:24 +02:00
* Create a theme .
2019-09-18 20:46:20 +02:00
*
2019-09-18 21:32:24 +02:00
* Parameters :
2020-03-06 13:09:52 +01:00
* * `string` ** slug ** - Unique theme ID
* * `string` ** title ** - Theme name
* * `InputDocument` ** document ** - Optional : Theme file
2020-06-16 17:52:55 +02:00
* * `InputThemeSettings` ** settings ** - Optional : Theme settings
2019-09-18 21:32:24 +02:00
*
2019-09-18 20:46:20 +02:00
* @ param array $params Parameters
2019-09-12 19:08:48 +02:00
*
* @ return Theme
*/
2019-09-18 20:46:20 +02:00
public function createTheme ( $params );
2019-09-12 19:08:48 +02:00
/**
2019-09-18 21:32:24 +02:00
* Update theme .
2019-09-18 20:46:20 +02:00
*
2019-09-18 21:32:24 +02:00
* Parameters :
2020-03-06 13:09:52 +01:00
* * `string` ** format ** - Theme format , a string that identifies the theming engines supported by the client
* * `InputTheme` ** theme ** - Theme to update
* * `string` ** slug ** - Optional : Unique theme ID
* * `string` ** title ** - Optional : Theme name
* * `InputDocument` ** document ** - Optional : Theme file
2020-06-16 17:52:55 +02:00
* * `InputThemeSettings` ** settings ** - Optional : Theme settings
2019-09-18 21:32:24 +02:00
*
2019-09-18 20:46:20 +02:00
* @ param array $params Parameters
2019-09-12 19:08:48 +02:00
*
* @ return Theme
*/
2019-09-18 20:46:20 +02:00
public function updateTheme ( $params );
2019-09-12 19:08:48 +02:00
/**
2019-12-27 17:43:29 +01:00
* Save a theme .
2019-09-18 20:46:20 +02:00
*
2019-09-18 21:32:24 +02:00
* Parameters :
2019-09-18 20:46:20 +02:00
* * `InputTheme` ** theme ** - Theme to save
2019-09-18 21:32:24 +02:00
* * `Bool` ** unsave ** - Unsave
*
2019-09-18 20:46:20 +02:00
* @ param array $params Parameters
2019-09-12 19:08:48 +02:00
*
* @ return bool
*/
2019-09-18 20:46:20 +02:00
public function saveTheme ( $params );
2019-09-12 19:08:48 +02:00
/**
2019-12-27 17:43:29 +01:00
* Install a theme .
2019-09-18 20:46:20 +02:00
*
2019-09-18 21:32:24 +02:00
* Parameters :
2019-09-18 20:46:20 +02:00
* * `boolean` ** dark ** - Optional : Whether to install the dark version
2019-12-27 17:43:29 +01:00
* * `string` ** format ** - Optional : Theme format , a string that identifies the theming engines supported by the client
2019-09-18 21:32:24 +02:00
* * `InputTheme` ** theme ** - Optional : Theme to install
*
2019-09-18 20:46:20 +02:00
* @ param array $params Parameters
2019-09-12 19:08:48 +02:00
*
* @ return bool
*/
2019-09-18 20:46:20 +02:00
public function installTheme ( $params );
2019-09-12 19:08:48 +02:00
/**
2019-09-18 21:32:24 +02:00
* Get theme information .
2019-09-18 20:46:20 +02:00
*
2019-09-18 21:32:24 +02:00
* Parameters :
2019-09-18 20:46:20 +02:00
* * `string` ** format ** - Theme format , a string that identifies the theming engines supported by the client
2019-09-18 21:32:24 +02:00
* * `InputTheme` ** theme ** - Theme
* * `long` ** document_id ** - Document ID
*
2019-09-18 20:46:20 +02:00
* @ param array $params Parameters
2019-09-12 19:08:48 +02:00
*
* @ return Theme
*/
2019-09-18 20:46:20 +02:00
public function getTheme ( $params );
2019-09-12 19:08:48 +02:00
/**
2019-09-18 21:32:24 +02:00
* Get installed themes .
2019-09-12 19:08:48 +02:00
*
2019-09-18 21:32:24 +02:00
* Parameters :
2019-09-18 20:46:20 +02:00
* * `string` ** format ** - Theme format , a string that identifies the theming engines supported by the client
2020-06-16 17:52:55 +02:00
* * `[int]` ** hash ** - Optional : [ Hash for pagination , for more info click here ]( https :// core . telegram . org / api / offsets #hash-generation)
2019-09-18 21:32:24 +02:00
*
2019-09-18 20:46:20 +02:00
* @ param array $params Parameters
*
* @ return account . Themes
2019-09-12 19:08:48 +02:00
*/
2019-09-18 20:46:20 +02:00
public function getThemes ( $params );
2020-03-06 13:09:52 +01:00
/**
2020-06-16 17:52:55 +02:00
* Set sensitive content settings ( for viewing or hiding NSFW content ) .
2020-03-06 13:09:52 +01:00
*
* Parameters :
2020-06-16 17:52:55 +02:00
* * `boolean` ** sensitive_enabled ** - Optional : Enable NSFW content
2020-03-06 13:09:52 +01:00
*
* @ param array $params Parameters
*
* @ return bool
*/
public function setContentSettings ( $params );
/**
2020-06-16 17:52:55 +02:00
* Get sensitive content settings .
2020-03-06 13:09:52 +01:00
*
* @ return account . ContentSettings
*/
public function getContentSettings ();
/**
2020-06-16 17:52:55 +02:00
* Get info about multiple wallpapers .
2020-03-06 13:09:52 +01:00
*
* Parameters :
2020-06-16 17:52:55 +02:00
* * `[InputWallPaper]` ** wallpapers ** - Wallpapers to fetch info about
2020-03-06 13:09:52 +01:00
*
* @ param array $params Parameters
*
* @ return of WallPaper []
*/
public function getMultiWallPapers ( $params );
2020-09-12 12:50:22 +02:00
/**
*
*
* @ return GlobalPrivacySettings
*/
public function getGlobalPrivacySettings ();
/**
*
*
* Parameters :
* * `GlobalPrivacySettings` ** settings ** -.
*
* @ param array $params Parameters
*
* @ return GlobalPrivacySettings
*/
public function setGlobalPrivacySettings ( $params );
2019-06-05 15:38:32 +02:00
}
interface users
{
/**
2019-12-27 17:43:29 +01:00
* Returns basic user info according to their identifiers .
2019-09-18 20:46:20 +02:00
*
2019-09-18 21:32:24 +02:00
* Parameters :
2020-06-16 17:52:55 +02:00
* * `[InputUser]` ** id ** - List of user identifiers
2019-09-18 21:32:24 +02:00
*
2019-09-18 20:46:20 +02:00
* @ param array $params Parameters
2019-06-05 15:38:32 +02:00
*
2019-12-14 16:47:04 +01:00
* @ return of User []
2019-06-05 15:38:32 +02:00
*/
2019-09-18 20:46:20 +02:00
public function getUsers ( $params );
2019-06-05 15:38:32 +02:00
/**
2020-06-16 17:52:55 +02:00
* Returns extended user info by ID .
2019-09-18 20:46:20 +02:00
*
2019-09-18 21:32:24 +02:00
* Parameters :
2020-06-16 17:52:55 +02:00
* * `InputUser` ** id ** - User ID
2019-09-18 21:32:24 +02:00
*
2019-09-18 20:46:20 +02:00
* @ param array $params Parameters
2019-06-05 15:38:32 +02:00
*
* @ return UserFull
*/
2019-09-18 20:46:20 +02:00
public function getFullUser ( $params );
2019-06-05 15:38:32 +02:00
/**
2019-12-27 17:43:29 +01:00
* Notify the user that the sent [ passport ]( https :// core . telegram . org / passport ) data contains some errors The user will not be able to re - submit their Passport data to you until the errors are fixed ( the contents of the field for which you returned the error must change ) .
2019-12-28 16:45:00 +01:00
*
* Use this if the data submitted by the user doesn ' t satisfy the standards your service requires for any reason . For example , if a birthday date seems invalid , a submitted document is blurry , a scan shows evidence of tampering , etc . Supply some details in the error message to make sure the user knows how to correct the issues .
2019-09-18 20:46:20 +02:00
*
2019-09-18 21:32:24 +02:00
* Parameters :
2019-12-27 17:43:29 +01:00
* * `InputUser` ** id ** - The user
2020-06-16 17:52:55 +02:00
* * `[SecureValueError]` ** errors ** - Errors
2019-09-18 21:32:24 +02:00
*
2019-09-18 20:46:20 +02:00
* @ param array $params Parameters
2019-06-05 15:38:32 +02:00
*
* @ return bool
*/
2019-09-18 20:46:20 +02:00
public function setSecureValueErrors ( $params );
2019-06-05 15:38:32 +02:00
}
interface contacts
{
/**
2019-12-27 17:43:29 +01:00
* Get contact by telegram IDs .
2019-09-18 20:46:20 +02:00
*
2019-09-18 21:32:24 +02:00
* Parameters :
2020-06-16 17:52:55 +02:00
* * `[int]` ** hash ** - Optional : [ Hash for pagination , for more info click here ]( https :// core . telegram . org / api / offsets #hash-generation)
2019-09-18 21:32:24 +02:00
*
2019-09-18 20:46:20 +02:00
* @ param array $params Parameters
2019-06-05 15:38:32 +02:00
*
2019-12-14 16:47:04 +01:00
* @ return of int []
2019-06-05 15:38:32 +02:00
*/
2019-09-18 20:46:20 +02:00
public function getContactIDs ( $params );
2019-06-05 15:38:32 +02:00
/**
2019-12-27 17:43:29 +01:00
* Returns the list of contact statuses .
2019-09-18 20:46:20 +02:00
*
2019-12-14 16:47:04 +01:00
* @ return of ContactStatus []
2019-06-05 15:38:32 +02:00
*/
public function getStatuses ();
/**
2019-12-27 17:43:29 +01:00
* Returns the current user ' s contact list .
2019-09-18 20:46:20 +02:00
*
2019-09-18 21:32:24 +02:00
* Parameters :
2020-06-16 17:52:55 +02:00
* * `[int]` ** hash ** - Optional : If there already is a full contact list on the client , a [ hash ]( https :// core . telegram . org / api / offsets #hash-generation) of a the list of contact IDs in ascending order may be passed in this parameter. If the contact set was not changed, [(contacts.contactsNotModified)](https://docs.madelineproto.xyz/API_docs/constructors/contacts.contactsNotModified.html) will be returned.
2019-09-18 21:32:24 +02:00
*
2019-09-18 20:46:20 +02:00
* @ param array $params Parameters
2019-06-05 15:38:32 +02:00
*
2019-09-18 20:46:20 +02:00
* @ return contacts . Contacts
2019-06-05 15:38:32 +02:00
*/
2019-09-18 20:46:20 +02:00
public function getContacts ( $params );
2019-06-05 15:38:32 +02:00
/**
2019-12-27 17:43:29 +01:00
* Imports contacts : saves a full list on the server , adds already registered contacts to the contact list , returns added contacts and their info .
2019-06-05 15:38:32 +02:00
*
2020-06-16 17:52:55 +02:00
* Use [ contacts . addContact ]( https :// docs . madelineproto . xyz / API_docs / methods / contacts . addContact . html ) to add Telegram contacts without actually using their phone number .
*
2019-09-18 21:32:24 +02:00
* Parameters :
2020-06-16 17:52:55 +02:00
* * `[InputContact]` ** contacts ** - List of contacts to import
2019-09-18 21:32:24 +02:00
*
2019-09-18 20:46:20 +02:00
* @ param array $params Parameters
*
* @ return contacts . ImportedContacts
2019-06-05 15:38:32 +02:00
*/
2019-09-18 20:46:20 +02:00
public function importContacts ( $params );
2019-06-05 15:38:32 +02:00
/**
2019-12-27 17:43:29 +01:00
* Deletes several contacts from the list .
2019-09-18 20:46:20 +02:00
*
2019-09-18 21:32:24 +02:00
* Parameters :
2020-06-16 17:52:55 +02:00
* * `[InputUser]` ** id ** - User ID list
2019-09-18 21:32:24 +02:00
*
2019-09-18 20:46:20 +02:00
* @ param array $params Parameters
2019-06-05 15:38:32 +02:00
*
2019-06-24 15:46:38 +02:00
* @ return Updates
2019-06-05 15:38:32 +02:00
*/
2019-09-18 20:46:20 +02:00
public function deleteContacts ( $params );
2019-06-05 15:38:32 +02:00
/**
2019-12-27 17:43:29 +01:00
* Delete contacts by phone number .
2019-09-18 20:46:20 +02:00
*
2019-09-18 21:32:24 +02:00
* Parameters :
2020-06-16 17:52:55 +02:00
* * `[string]` ** phones ** - Phone numbers
2019-09-18 21:32:24 +02:00
*
2019-09-18 20:46:20 +02:00
* @ param array $params Parameters
2019-06-05 15:38:32 +02:00
*
* @ return bool
*/
2019-09-18 20:46:20 +02:00
public function deleteByPhones ( $params );
2019-06-05 15:38:32 +02:00
/**
2019-12-27 17:43:29 +01:00
* Adds the user to the blacklist .
2019-09-18 20:46:20 +02:00
*
2019-09-18 21:32:24 +02:00
* Parameters :
2020-10-01 18:02:54 +02:00
* * `InputPeer` ** id ** -
2019-09-18 21:32:24 +02:00
*
2019-09-18 20:46:20 +02:00
* @ param array $params Parameters
2019-06-05 15:38:32 +02:00
*
* @ return bool
*/
2019-09-18 20:46:20 +02:00
public function block ( $params );
2019-06-05 15:38:32 +02:00
/**
2019-12-27 17:43:29 +01:00
* Deletes the user from the blacklist .
2019-09-18 20:46:20 +02:00
*
2019-09-18 21:32:24 +02:00
* Parameters :
2020-10-01 18:02:54 +02:00
* * `InputPeer` ** id ** -
2019-09-18 21:32:24 +02:00
*
2019-09-18 20:46:20 +02:00
* @ param array $params Parameters
2019-06-05 15:38:32 +02:00
*
* @ return bool
*/
2019-09-18 20:46:20 +02:00
public function unblock ( $params );
2019-06-05 15:38:32 +02:00
/**
2019-12-27 17:43:29 +01:00
* Returns the list of blocked users .
2019-09-18 20:46:20 +02:00
*
2019-09-18 21:32:24 +02:00
* Parameters :
2019-12-27 17:43:29 +01:00
* * `int` ** offset ** - The number of list elements to be skipped
* * `int` ** limit ** - The number of list elements to be returned
2019-09-18 21:32:24 +02:00
*
2019-09-18 20:46:20 +02:00
* @ param array $params Parameters
2019-06-05 15:38:32 +02:00
*
2019-09-18 20:46:20 +02:00
* @ return contacts . Blocked
2019-06-05 15:38:32 +02:00
*/
2019-09-18 20:46:20 +02:00
public function getBlocked ( $params );
2019-06-05 15:38:32 +02:00
/**
2019-12-27 17:43:29 +01:00
* Returns users found by username substring .
2019-06-05 15:38:32 +02:00
*
2019-09-18 21:32:24 +02:00
* Parameters :
2019-12-27 17:43:29 +01:00
* * `string` ** q ** - Target substring
* * `int` ** limit ** - Maximum number of users to be returned
2019-09-18 21:32:24 +02:00
*
2019-09-18 20:46:20 +02:00
* @ param array $params Parameters
*
* @ return contacts . Found
2019-06-05 15:38:32 +02:00
*/
2019-09-18 20:46:20 +02:00
public function search ( $params );
2019-06-05 15:38:32 +02:00
/**
2020-06-16 17:52:55 +02:00
* Resolve a @ username to get peer info .
2019-09-18 20:46:20 +02:00
*
2019-09-18 21:32:24 +02:00
* Parameters :
2020-06-16 17:52:55 +02:00
* * `string` ** username ** - @ username to resolve
2019-09-18 21:32:24 +02:00
*
2019-09-18 20:46:20 +02:00
* @ param array $params Parameters
2019-06-05 15:38:32 +02:00
*
2019-09-18 20:46:20 +02:00
* @ return contacts . ResolvedPeer
2019-06-05 15:38:32 +02:00
*/
2019-09-18 20:46:20 +02:00
public function resolveUsername ( $params );
2019-06-05 15:38:32 +02:00
/**
2019-12-27 17:43:29 +01:00
* Get most used peers .
2019-09-18 20:46:20 +02:00
*
2019-09-18 21:32:24 +02:00
* Parameters :
2019-12-27 17:43:29 +01:00
* * `boolean` ** correspondents ** - Optional : Users we ' ve chatted most frequently with
* * `boolean` ** bots_pm ** - Optional : Most used bots
* * `boolean` ** bots_inline ** - Optional : Most used inline bots
* * `boolean` ** phone_calls ** - Optional : Most frequently called users
* * `boolean` ** forward_users ** - Optional : Users to which the users often forwards messages to
* * `boolean` ** forward_chats ** - Optional : Chats to which the users often forwards messages to
* * `boolean` ** groups ** - Optional : Often - opened groups and supergroups
* * `boolean` ** channels ** - Optional : Most frequently visited channels
* * `int` ** offset ** - Offset for [ pagination ]( https :// core . telegram . org / api / offsets )
* * `int` ** limit ** - Maximum number of results to return , [ see pagination ]( https :// core . telegram . org / api / offsets )
2020-06-16 17:52:55 +02:00
* * `[int]` ** hash ** - Optional : [ Hash for pagination , for more info click here ]( https :// core . telegram . org / api / offsets #hash-generation)
2019-09-18 21:32:24 +02:00
*
2019-09-18 20:46:20 +02:00
* @ param array $params Parameters
2019-06-05 15:38:32 +02:00
*
2019-09-18 20:46:20 +02:00
* @ return contacts . TopPeers
2019-06-05 15:38:32 +02:00
*/
2019-09-18 20:46:20 +02:00
public function getTopPeers ( $params );
2019-06-05 15:38:32 +02:00
/**
2019-12-27 17:43:29 +01:00
* Reset [ rating ]( https :// core . telegram . org / api / top - rating ) of top peer .
2019-09-18 21:32:24 +02:00
*
* Parameters :
2019-12-27 17:43:29 +01:00
* * `TopPeerCategory` ** category ** - Top peer category
* * `InputPeer` ** peer ** - Peer whose rating should be reset
2019-09-18 20:46:20 +02:00
*
* @ param array $params Parameters
2019-06-05 15:38:32 +02:00
*
* @ return bool
*/
2019-09-18 20:46:20 +02:00
public function resetTopPeerRating ( $params );
2019-06-05 15:38:32 +02:00
/**
2019-12-27 17:43:29 +01:00
* Delete saved contacts .
2019-09-18 20:46:20 +02:00
*
2019-06-05 15:38:32 +02:00
* @ return bool
*/
public function resetSaved ();
/**
2019-12-27 17:43:29 +01:00
* Get all contacts .
2019-09-18 20:46:20 +02:00
*
2019-12-14 16:47:04 +01:00
* @ return of SavedContact []
2019-06-05 15:38:32 +02:00
*/
public function getSaved ();
/**
2019-12-27 17:43:29 +01:00
* Enable / disable [ top peers ]( https :// core . telegram . org / api / top - rating ) .
2019-09-18 20:46:20 +02:00
*
2019-09-18 21:32:24 +02:00
* Parameters :
2019-12-27 17:43:29 +01:00
* * `Bool` ** enabled ** - Enable / disable
2019-09-18 21:32:24 +02:00
*
2019-09-18 20:46:20 +02:00
* @ param array $params Parameters
2019-06-05 15:38:32 +02:00
*
* @ return bool
*/
2019-09-18 20:46:20 +02:00
public function toggleTopPeers ( $params );
2019-06-24 15:46:38 +02:00
/**
2019-12-27 17:43:29 +01:00
* Add an existing telegram user as contact .
2019-09-18 20:46:20 +02:00
*
2020-06-16 17:52:55 +02:00
* Use [ contacts . importContacts ]( https :// docs . madelineproto . xyz / API_docs / methods / contacts . importContacts . html ) to add contacts by phone number , without knowing their Telegram ID .
*
2019-09-18 21:32:24 +02:00
* Parameters :
2019-12-27 17:43:29 +01:00
* * `boolean` ** add_phone_privacy_exception ** - Optional : Allow the other user to see our phone number ?
* * `InputUser` ** id ** - Telegram ID of the other user
2019-09-18 21:32:24 +02:00
* * `string` ** first_name ** - First name
* * `string` ** last_name ** - Last name
2019-12-27 17:43:29 +01:00
* * `string` ** phone ** - User ' s phone number
2019-09-18 21:32:24 +02:00
*
2019-09-18 20:46:20 +02:00
* @ param array $params Parameters
2019-06-24 15:46:38 +02:00
*
* @ return Updates
*/
2019-09-18 20:46:20 +02:00
public function addContact ( $params );
2019-06-24 15:46:38 +02:00
/**
2019-12-28 16:45:00 +01:00
* If the [ peer settings ]( https :// docs . madelineproto . xyz / API_docs / constructors / peerSettings . html ) of a new user allow us to add him as contact , add that user as contact .
2019-09-18 20:46:20 +02:00
*
2019-09-18 21:32:24 +02:00
* Parameters :
2019-12-27 17:43:29 +01:00
* * `InputUser` ** id ** - The user to add as contact
2019-09-18 21:32:24 +02:00
*
2019-09-18 20:46:20 +02:00
* @ param array $params Parameters
2019-06-24 15:46:38 +02:00
*
* @ return Updates
*/
2019-09-18 20:46:20 +02:00
public function acceptContact ( $params );
2019-06-24 15:46:38 +02:00
/**
2019-12-27 17:43:29 +01:00
* Get contacts near you .
2019-09-18 20:46:20 +02:00
*
2019-09-18 21:32:24 +02:00
* Parameters :
2020-06-16 17:52:55 +02:00
* * `boolean` ** background ** - Optional : While the geolocation of the current user is public , clients should update it in the background every half - an - hour or so , while setting this flag . < br > Do this only if the new location is more than 1 KM away from the previous one , or if the previous location is unknown .
2020-03-06 13:09:52 +01:00
* * `InputGeoPoint` ** geo_point ** - Geolocation
2020-06-16 17:52:55 +02:00
* * `int` ** self_expires ** - Optional : If set , the geolocation of the current user will be public for the specified number of seconds ; pass 0x7fffffff to disable expiry , 0 to make the current geolocation private ; if the flag isn ' t set , no changes will be applied .
2019-09-18 21:32:24 +02:00
*
2019-09-18 20:46:20 +02:00
* @ param array $params Parameters
2019-06-24 15:46:38 +02:00
*
* @ return Updates
*/
2019-09-18 20:46:20 +02:00
public function getLocated ( $params );
2020-10-01 18:02:54 +02:00
/**
*
*
* Parameters :
* * `boolean` ** delete_message ** - Optional :
* * `boolean` ** delete_history ** - Optional :
* * `boolean` ** report_spam ** - Optional :
* * `int` ** msg_id ** -.
*
* @ param array $params Parameters
*
* @ return Updates
*/
public function blockFromReplies ( $params );
2019-06-05 15:38:32 +02:00
}
interface messages
{
/**
2019-12-27 17:43:29 +01:00
* Returns the list of messages by their IDs .
2019-06-05 15:38:32 +02:00
*
2019-09-18 21:32:24 +02:00
* Parameters :
2020-06-16 17:52:55 +02:00
* * `[InputMessage]` ** id ** - Message ID list
2019-09-18 21:32:24 +02:00
*
2019-09-18 20:46:20 +02:00
* @ param array $params Parameters
*
* @ return messages . Messages
2019-06-05 15:38:32 +02:00
*/
2019-09-18 20:46:20 +02:00
public function getMessages ( $params );
2019-06-05 15:38:32 +02:00
/**
2019-12-27 17:43:29 +01:00
* Returns the current user dialog list .
2019-09-18 20:46:20 +02:00
*
2019-09-18 21:32:24 +02:00
* Parameters :
2019-12-27 17:43:29 +01:00
* * `boolean` ** exclude_pinned ** - Optional : Exclude pinned dialogs
2020-06-16 17:52:55 +02:00
* * `int` ** folder_id ** - Optional : [ Peer folder ID , for more info click here ]( https :// core . telegram . org / api / folders #peer-folders)
2019-12-27 17:43:29 +01:00
* * `int` ** offset_date ** - [ Offsets for pagination , for more info click here ]( https :// core . telegram . org / api / offsets )
* * `int` ** offset_id ** - [ Offsets for pagination , for more info click here ]( https :// core . telegram . org / api / offsets )
* * `InputPeer` ** offset_peer ** - [ Offset peer for pagination ]( https :// core . telegram . org / api / offsets )
* * `int` ** limit ** - Number of list elements to be returned
2020-06-16 17:52:55 +02:00
* * `[int]` ** hash ** - Optional : [ Hash for pagination , for more info click here ]( https :// core . telegram . org / api / offsets #hash-generation)
2019-09-18 21:32:24 +02:00
*
2019-09-18 20:46:20 +02:00
* @ param array $params Parameters
2019-06-05 15:38:32 +02:00
*
2019-09-18 20:46:20 +02:00
* @ return messages . Dialogs
2019-06-05 15:38:32 +02:00
*/
2019-09-18 20:46:20 +02:00
public function getDialogs ( $params );
2019-06-05 15:38:32 +02:00
/**
2019-12-27 17:43:29 +01:00
* Gets back the conversation history with one interlocutor / within a chat .
2019-09-18 20:46:20 +02:00
*
2019-09-18 21:32:24 +02:00
* Parameters :
2019-12-27 17:43:29 +01:00
* * `InputPeer` ** peer ** - Target peer
* * `int` ** offset_id ** - Only return messages starting from the specified message ID
2020-06-16 17:52:55 +02:00
* * `int` ** offset_date ** - Only return messages sent before the specified date
2019-12-27 17:43:29 +01:00
* * `int` ** add_offset ** - Number of list elements to be skipped , negative values are also accepted .
* * `int` ** limit ** - Number of results to return
* * `int` ** max_id ** - If a positive value was transferred , the method will return only messages with IDs less than ** max\_id **
* * `int` ** min_id ** - If a positive value was transferred , the method will return only messages with IDs more than ** min\_id **
2020-06-16 17:52:55 +02:00
* * `[int]` ** hash ** - Optional : [ Result hash ]( https :// core . telegram . org / api / offsets )
2019-09-18 21:32:24 +02:00
*
2019-09-18 20:46:20 +02:00
* @ param array $params Parameters
2019-06-05 15:38:32 +02:00
*
2019-09-18 20:46:20 +02:00
* @ return messages . Messages
2019-06-05 15:38:32 +02:00
*/
2019-09-18 20:46:20 +02:00
public function getHistory ( $params );
2019-06-05 15:38:32 +02:00
/**
2019-12-27 17:43:29 +01:00
* Gets back found messages .
2019-06-05 15:38:32 +02:00
*
2019-09-18 21:32:24 +02:00
* Parameters :
2019-12-28 16:45:00 +01:00
* * `InputPeer` ** peer ** - User or chat , histories with which are searched , or [( inputPeerEmpty )]( https :// docs . madelineproto . xyz / API_docs / constructors / inputPeerEmpty . html ) constructor for global search
2019-12-27 17:43:29 +01:00
* * `string` ** q ** - Text search request
* * `InputUser` ** from_id ** - Optional : Only return messages sent by the specified user ID
2020-10-01 18:02:54 +02:00
* * `int` ** top_msg_id ** - Optional :
2019-12-27 17:43:29 +01:00
* * `MessagesFilter` ** filter ** - Filter to return only specified message types
* * `int` ** min_date ** - If a positive value was transferred , only messages with a sending date bigger than the transferred one will be returned
* * `int` ** max_date ** - If a positive value was transferred , only messages with a sending date smaller than the transferred one will be returned
* * `int` ** offset_id ** - Only return messages starting from the specified message ID
* * `int` ** add_offset ** - [ Additional offset ]( https :// core . telegram . org / api / offsets )
* * `int` ** limit ** - [ Number of results to return ]( https :// core . telegram . org / api / offsets )
* * `int` ** max_id ** - [ Maximum message ID to return ]( https :// core . telegram . org / api / offsets )
* * `int` ** min_id ** - [ Minimum message ID to return ]( https :// core . telegram . org / api / offsets )
2020-06-16 17:52:55 +02:00
* * `[int]` ** hash ** - Optional : [ Hash ]( https :// core . telegram . org / api / offsets )
2019-09-18 21:32:24 +02:00
*
2019-09-18 20:46:20 +02:00
* @ param array $params Parameters
*
* @ return messages . Messages
2019-06-05 15:38:32 +02:00
*/
2019-09-18 20:46:20 +02:00
public function search ( $params );
2019-06-05 15:38:32 +02:00
/**
2019-12-27 17:43:29 +01:00
* Marks message history as read .
2019-09-18 20:46:20 +02:00
*
2019-09-18 21:32:24 +02:00
* Parameters :
2019-12-27 17:43:29 +01:00
* * `InputPeer` ** peer ** - Target user or group
* * `int` ** max_id ** - If a positive value is passed , only messages with identifiers less or equal than the given one will be read
2019-09-18 21:32:24 +02:00
*
2019-09-18 20:46:20 +02:00
* @ param array $params Parameters
2019-06-05 15:38:32 +02:00
*
2019-09-18 20:46:20 +02:00
* @ return messages . AffectedMessages
2019-06-05 15:38:32 +02:00
*/
2019-09-18 20:46:20 +02:00
public function readHistory ( $params );
2019-06-05 15:38:32 +02:00
/**
2019-12-27 17:43:29 +01:00
* Deletes communication history .
2019-06-05 15:38:32 +02:00
*
2019-09-18 21:32:24 +02:00
* Parameters :
2019-12-27 17:43:29 +01:00
* * `boolean` ** just_clear ** - Optional : Just clear history for the current user , without actually removing messages for every chat user
* * `boolean` ** revoke ** - Optional : Whether to delete the message history for all chat participants
* * `InputPeer` ** peer ** - User or chat , communication history of which will be deleted
* * `int` ** max_id ** - Maximum ID of message to delete
2019-09-18 21:32:24 +02:00
*
2019-09-18 20:46:20 +02:00
* @ param array $params Parameters
*
* @ return messages . AffectedHistory
2019-06-05 15:38:32 +02:00
*/
2019-09-18 20:46:20 +02:00
public function deleteHistory ( $params );
2019-06-05 15:38:32 +02:00
/**
2019-12-27 17:43:29 +01:00
* Deletes messages by their identifiers .
2019-09-18 20:46:20 +02:00
*
2019-09-18 21:32:24 +02:00
* Parameters :
2019-12-27 17:43:29 +01:00
* * `boolean` ** revoke ** - Optional : Whether to delete messages for all participants of the chat
2020-06-16 17:52:55 +02:00
* * `[int]` ** id ** - Message ID list
2019-09-18 21:32:24 +02:00
*
2019-09-18 20:46:20 +02:00
* @ param array $params Parameters
2019-06-05 15:38:32 +02:00
*
2019-09-18 20:46:20 +02:00
* @ return messages . AffectedMessages
2019-06-05 15:38:32 +02:00
*/
2019-09-18 20:46:20 +02:00
public function deleteMessages ( $params );
2019-06-05 15:38:32 +02:00
/**
2019-12-27 17:43:29 +01:00
* Confirms receipt of messages by a client , cancels PUSH - notification sending .
2019-09-18 20:46:20 +02:00
*
2019-09-18 21:32:24 +02:00
* Parameters :
2019-12-27 17:43:29 +01:00
* * `int` ** max_id ** - Maximum message ID available in a client .
2019-09-18 21:32:24 +02:00
*
2019-09-18 20:46:20 +02:00
* @ param array $params Parameters
2019-06-05 15:38:32 +02:00
*
2019-12-14 16:47:04 +01:00
* @ return of ReceivedNotifyMessage []
2019-06-05 15:38:32 +02:00
*/
2019-09-18 20:46:20 +02:00
public function receivedMessages ( $params );
2019-06-05 15:38:32 +02:00
/**
2019-12-28 16:45:00 +01:00
* Sends a current user typing event ( see [ SendMessageAction ]( https :// docs . madelineproto . xyz / API_docs / types / SendMessageAction . html ) for all event types ) to a conversation partner or group .
2019-09-18 20:46:20 +02:00
*
2019-09-18 21:32:24 +02:00
* Parameters :
2020-10-01 18:02:54 +02:00
* * `InputPeer` ** peer ** - Target user or group
* * `int` ** top_msg_id ** - Optional :
* * `SendMessageAction` ** action ** - Type of action < br > Parameter added in [ Layer 17 ]( https :// core . telegram . org / api / layers #layer-17).
2019-09-18 21:32:24 +02:00
*
2019-09-18 20:46:20 +02:00
* @ param array $params Parameters
2019-06-05 15:38:32 +02:00
*
* @ return bool
*/
2019-09-18 20:46:20 +02:00
public function setTyping ( $params );
2019-06-05 15:38:32 +02:00
/**
2019-12-27 17:43:29 +01:00
* Sends a message to a chat .
2019-09-18 20:46:20 +02:00
*
2019-09-18 21:32:24 +02:00
* Parameters :
2019-12-27 17:43:29 +01:00
* * `boolean` ** no_webpage ** - Optional : Set this flag to disable generation of the webpage preview
* * `boolean` ** silent ** - Optional : Send this message silently ( no notifications for the receivers )
* * `boolean` ** background ** - Optional : Send this message as background message
* * `boolean` ** clear_draft ** - Optional : Clear the draft field
* * `InputPeer` ** peer ** - The destination where the message will be sent
* * `int` ** reply_to_msg_id ** - Optional : The message ID to which this message will reply to
* * `string` ** message ** - The message
* * `ReplyMarkup` ** reply_markup ** - Optional : Reply markup for sending bot buttons
2020-06-16 17:52:55 +02:00
* * `[MessageEntity]` ** entities ** - Optional : Message [ entities ]( https :// core . telegram . org / api / entities ) for sending styled text
2019-12-27 17:43:29 +01:00
* * `int` ** schedule_date ** - Optional : Scheduled message date for scheduled messages
2019-09-18 21:32:24 +02:00
*
2019-09-18 20:46:20 +02:00
* @ param array $params Parameters
2019-06-05 15:38:32 +02:00
*
* @ return Updates
*/
2019-09-18 20:46:20 +02:00
public function sendMessage ( $params );
2019-06-05 15:38:32 +02:00
/**
2019-09-18 21:32:24 +02:00
* Send a media .
2019-09-18 20:46:20 +02:00
*
2019-09-18 21:32:24 +02:00
* Parameters :
2019-12-27 17:43:29 +01:00
* * `boolean` ** silent ** - Optional : Send message silently ( no notification should be triggered )
* * `boolean` ** background ** - Optional : Send message in background
* * `boolean` ** clear_draft ** - Optional : Clear the draft
* * `InputPeer` ** peer ** - Destination
* * `int` ** reply_to_msg_id ** - Optional : Message ID to which this message should reply to
* * `InputMedia` ** media ** - Attached media
* * `string` ** message ** - Caption
* * `ReplyMarkup` ** reply_markup ** - Optional : Reply markup for bot keyboards
2020-06-16 17:52:55 +02:00
* * `[MessageEntity]` ** entities ** - Optional : Message [ entities ]( https :// core . telegram . org / api / entities ) for styled text
2019-12-27 17:43:29 +01:00
* * `int` ** schedule_date ** - Optional : Scheduled message date for scheduled messages
2019-09-18 21:32:24 +02:00
*
2019-09-18 20:46:20 +02:00
* @ param array $params Parameters
2019-06-05 15:38:32 +02:00
*
* @ return Updates
*/
2019-09-18 20:46:20 +02:00
public function sendMedia ( $params );
2019-06-05 15:38:32 +02:00
/**
2019-12-27 17:43:29 +01:00
* Forwards messages by their IDs .
2019-09-18 20:46:20 +02:00
*
2019-09-18 21:32:24 +02:00
* Parameters :
2019-12-27 17:43:29 +01:00
* * `boolean` ** silent ** - Optional : Whether to send messages silently ( no notification will be triggered on the destination clients )
* * `boolean` ** background ** - Optional : Whether to send the message in background
* * `boolean` ** with_my_score ** - Optional : When forwarding games , whether to include your score in the game
* * `InputPeer` ** from_peer ** - Source of messages
2020-06-16 17:52:55 +02:00
* * `[int]` ** id ** - IDs of messages
2019-12-27 17:43:29 +01:00
* * `InputPeer` ** to_peer ** - Destination peer
* * `int` ** schedule_date ** - Optional : Scheduled message date for scheduled messages
2019-09-18 21:32:24 +02:00
*
2019-09-18 20:46:20 +02:00
* @ param array $params Parameters
2019-06-05 15:38:32 +02:00
*
* @ return Updates
*/
2019-09-18 20:46:20 +02:00
public function forwardMessages ( $params );
2019-06-05 15:38:32 +02:00
/**
2019-12-28 16:45:00 +01:00
* Report a new incoming chat for spam , if the [ peer settings ]( https :// docs . madelineproto . xyz / API_docs / constructors / peerSettings . html ) of the chat allow us to do that .
2019-09-18 20:46:20 +02:00
*
2019-09-18 21:32:24 +02:00
* Parameters :
2019-12-27 17:43:29 +01:00
* * `InputPeer` ** peer ** - Peer to report
2019-09-18 21:32:24 +02:00
*
2019-09-18 20:46:20 +02:00
* @ param array $params Parameters
2019-06-05 15:38:32 +02:00
*
* @ return bool
*/
2019-09-18 20:46:20 +02:00
public function reportSpam ( $params );
2019-06-05 15:38:32 +02:00
/**
2019-12-27 17:43:29 +01:00
* Get peer settings .
2019-09-18 20:46:20 +02:00
*
2019-09-18 21:32:24 +02:00
* Parameters :
2019-09-18 20:46:20 +02:00
* * `InputPeer` ** peer ** - The peer
2019-09-18 21:32:24 +02:00
*
2019-09-18 20:46:20 +02:00
* @ param array $params Parameters
2019-06-05 15:38:32 +02:00
*
* @ return PeerSettings
*/
2019-09-18 20:46:20 +02:00
public function getPeerSettings ( $params );
2019-06-05 15:38:32 +02:00
/**
2019-12-27 17:43:29 +01:00
* Report a message in a chat for violation of telegram ' s Terms of Service .
2019-09-18 20:46:20 +02:00
*
2019-09-18 21:32:24 +02:00
* Parameters :
2019-12-27 17:43:29 +01:00
* * `InputPeer` ** peer ** - Peer
2020-06-16 17:52:55 +02:00
* * `[int]` ** id ** - IDs of messages to report
2019-12-27 17:43:29 +01:00
* * `ReportReason` ** reason ** - Why are these messages being reported
2019-09-18 21:32:24 +02:00
*
2019-09-18 20:46:20 +02:00
* @ param array $params Parameters
2019-06-05 15:38:32 +02:00
*
* @ return bool
*/
2019-09-18 20:46:20 +02:00
public function report ( $params );
2019-06-05 15:38:32 +02:00
/**
2019-12-27 17:43:29 +01:00
* Returns chat basic info on their IDs .
2019-09-18 20:46:20 +02:00
*
2019-09-18 21:32:24 +02:00
* Parameters :
2020-06-16 17:52:55 +02:00
* * `[int]` ** id ** - List of chat IDs
2019-09-18 21:32:24 +02:00
*
2019-09-18 20:46:20 +02:00
* @ param array $params Parameters
2019-06-05 15:38:32 +02:00
*
2019-09-18 20:46:20 +02:00
* @ return messages . Chats
2019-06-05 15:38:32 +02:00
*/
2019-09-18 20:46:20 +02:00
public function getChats ( $params );
2019-06-05 15:38:32 +02:00
/**
2020-06-16 17:52:55 +02:00
* Returns full chat info according to its ID .
2019-06-05 15:38:32 +02:00
*
2019-09-18 21:32:24 +02:00
* Parameters :
2020-06-16 17:52:55 +02:00
* * `InputPeer` ** chat_id ** -
2019-09-18 21:32:24 +02:00
*
2019-09-18 20:46:20 +02:00
* @ param array $params Parameters
*
* @ return messages . ChatFull
2019-06-05 15:38:32 +02:00
*/
2019-09-18 20:46:20 +02:00
public function getFullChat ( $params );
2019-06-05 15:38:32 +02:00
/**
2019-12-27 17:43:29 +01:00
* Chanages chat name and sends a service message on it .
2019-09-18 20:46:20 +02:00
*
2019-09-18 21:32:24 +02:00
* Parameters :
2020-06-16 17:52:55 +02:00
* * `InputPeer` ** chat_id ** -
2019-12-27 17:43:29 +01:00
* * `string` ** title ** - New chat name , different from the old one
2019-09-18 21:32:24 +02:00
*
2019-09-18 20:46:20 +02:00
* @ param array $params Parameters
2019-06-05 15:38:32 +02:00
*
* @ return Updates
*/
2019-09-18 20:46:20 +02:00
public function editChatTitle ( $params );
2019-06-05 15:38:32 +02:00
/**
2019-12-27 17:43:29 +01:00
* Changes chat photo and sends a service message on it .
2019-09-18 20:46:20 +02:00
*
2019-09-18 21:32:24 +02:00
* Parameters :
2020-06-16 17:52:55 +02:00
* * `InputPeer` ** chat_id ** -
2019-12-27 17:43:29 +01:00
* * `InputChatPhoto` ** photo ** - Photo to be set
2019-09-18 21:32:24 +02:00
*
2019-09-18 20:46:20 +02:00
* @ param array $params Parameters
2019-06-05 15:38:32 +02:00
*
* @ return Updates
*/
2019-09-18 20:46:20 +02:00
public function editChatPhoto ( $params );
2019-06-05 15:38:32 +02:00
/**
2019-12-27 17:43:29 +01:00
* Adds a user to a chat and sends a service message on it .
2019-09-18 20:46:20 +02:00
*
2019-09-18 21:32:24 +02:00
* Parameters :
2020-06-16 17:52:55 +02:00
* * `InputPeer` ** chat_id ** -
2019-12-27 17:43:29 +01:00
* * `InputUser` ** user_id ** - User ID to be added
* * `int` ** fwd_limit ** - Number of last messages to be forwarded
2019-09-18 21:32:24 +02:00
*
2019-09-18 20:46:20 +02:00
* @ param array $params Parameters
2019-06-05 15:38:32 +02:00
*
* @ return Updates
*/
2019-09-18 20:46:20 +02:00
public function addChatUser ( $params );
2019-06-05 15:38:32 +02:00
/**
2019-12-27 17:43:29 +01:00
* Deletes a user from a chat and sends a service message on it .
2019-09-18 20:46:20 +02:00
*
2019-09-18 21:32:24 +02:00
* Parameters :
2020-06-16 17:52:55 +02:00
* * `InputPeer` ** chat_id ** -
2019-12-27 17:43:29 +01:00
* * `InputUser` ** user_id ** - User ID to be deleted
2019-09-18 21:32:24 +02:00
*
2019-09-18 20:46:20 +02:00
* @ param array $params Parameters
2019-06-05 15:38:32 +02:00
*
* @ return Updates
*/
2019-09-18 20:46:20 +02:00
public function deleteChatUser ( $params );
2019-06-05 15:38:32 +02:00
/**
2019-12-27 17:43:29 +01:00
* Creates a new chat .
2019-09-18 20:46:20 +02:00
*
2019-09-18 21:32:24 +02:00
* Parameters :
2020-06-16 17:52:55 +02:00
* * `[InputUser]` ** users ** - List of user IDs to be invited
2019-12-27 17:43:29 +01:00
* * `string` ** title ** - Chat name
2019-09-18 21:32:24 +02:00
*
2019-09-18 20:46:20 +02:00
* @ param array $params Parameters
2019-06-05 15:38:32 +02:00
*
* @ return Updates
2017-01-22 17:40:56 +01:00
*/
2019-09-18 20:46:20 +02:00
public function createChat ( $params );
2018-02-24 17:54:39 +01:00
2017-01-22 17:40:56 +01:00
/**
2020-06-16 17:52:55 +02:00
* Returns configuration parameters for Diffie - Hellman key generation . Can also return a random sequence of bytes of required length .
2019-09-18 20:46:20 +02:00
*
2019-09-18 21:32:24 +02:00
* Parameters :
2020-06-16 17:52:55 +02:00
* * `int` ** version ** - Value of the ** version ** parameter from [ messages . dhConfig ]( https :// docs . madelineproto . xyz / API_docs / constructors / messages . dhConfig . html ), avialable at the client
* * `int` ** random_length ** - Length of the required random sequence
2019-09-18 21:32:24 +02:00
*
2019-09-18 20:46:20 +02:00
* @ param array $params Parameters
2019-06-05 15:38:32 +02:00
*
2019-09-18 20:46:20 +02:00
* @ return messages . DhConfig
2019-06-05 15:38:32 +02:00
*/
2019-09-18 20:46:20 +02:00
public function getDhConfig ( $params );
2019-06-05 15:38:32 +02:00
/**
2020-06-16 17:52:55 +02:00
* Sends a request to start a secret chat to the user .
2019-09-18 20:46:20 +02:00
*
2019-09-18 21:32:24 +02:00
* Parameters :
2020-06-16 17:52:55 +02:00
* * `InputUser` ** user_id ** - User ID
* * `bytes` ** g_a ** - `A = g ^ a mod p` , see [ Wikipedia ]( https :// en . wikipedia . org / wiki / Diffie % E2 % 80 % 93 Hellman_key_exchange )
2019-09-18 21:32:24 +02:00
*
2019-09-18 20:46:20 +02:00
* @ param array $params Parameters
2019-06-05 15:38:32 +02:00
*
* @ return EncryptedChat
*/
2019-09-18 20:46:20 +02:00
public function requestEncryption ( $params );
2019-06-05 15:38:32 +02:00
/**
2020-06-16 17:52:55 +02:00
* Confirms creation of a secret chat .
2019-09-18 20:46:20 +02:00
*
2019-09-18 21:32:24 +02:00
* Parameters :
2020-06-16 17:52:55 +02:00
* * `InputEncryptedChat` ** peer ** - Secret chat ID
* * `bytes` ** g_b ** - `B = g ^ b mod p` , see [ Wikipedia ]( https :// en . wikipedia . org / wiki / Diffie % E2 % 80 % 93 Hellman_key_exchange )
* * `long` ** key_fingerprint ** - 64 - bit fingerprint of the received key
2019-09-18 21:32:24 +02:00
*
2019-09-18 20:46:20 +02:00
* @ param array $params Parameters
2019-06-05 15:38:32 +02:00
*
* @ return EncryptedChat
*/
2019-09-18 20:46:20 +02:00
public function acceptEncryption ( $params );
2019-06-05 15:38:32 +02:00
/**
2020-06-16 17:52:55 +02:00
* Cancels a request for creation and / or delete info on secret chat .
2019-09-18 20:46:20 +02:00
*
2019-09-18 21:32:24 +02:00
* Parameters :
2020-06-16 17:52:55 +02:00
* * `int` ** chat_id ** - Secret chat ID
2019-09-18 21:32:24 +02:00
*
2019-09-18 20:46:20 +02:00
* @ param array $params Parameters
2019-06-05 15:38:32 +02:00
*
* @ return bool
*/
2019-09-18 20:46:20 +02:00
public function discardEncryption ( $params );
2019-06-05 15:38:32 +02:00
/**
2019-12-27 17:43:29 +01:00
* Send typing event by the current user to a secret chat .
2019-09-18 20:46:20 +02:00
*
2019-09-18 21:32:24 +02:00
* Parameters :
2019-12-27 17:43:29 +01:00
* * `InputEncryptedChat` ** peer ** - Secret chat ID
2019-12-28 16:45:00 +01:00
* * `Bool` ** typing ** - Typing .< br >** Possible values **:< br > [( boolTrue )]( https :// docs . madelineproto . xyz / API_docs / constructors / boolTrue . html ), if the user started typing and more than ** 5 seconds ** have passed since the last request < br > [( boolFalse )]( https :// docs . madelineproto . xyz / API_docs / constructors / boolFalse . html ), if the user stopped typing
2019-09-18 21:32:24 +02:00
*
2019-09-18 20:46:20 +02:00
* @ param array $params Parameters
2019-06-05 15:38:32 +02:00
*
* @ return bool
*/
2019-09-18 20:46:20 +02:00
public function setEncryptedTyping ( $params );
2019-06-05 15:38:32 +02:00
/**
2019-12-27 17:43:29 +01:00
* Marks message history within a secret chat as read .
2019-09-18 20:46:20 +02:00
*
2019-09-18 21:32:24 +02:00
* Parameters :
2019-12-27 17:43:29 +01:00
* * `InputEncryptedChat` ** peer ** - Secret chat ID
* * `int` ** max_date ** - Maximum date value for received messages in history
2019-09-18 21:32:24 +02:00
*
2019-09-18 20:46:20 +02:00
* @ param array $params Parameters
2019-06-05 15:38:32 +02:00
*
* @ return bool
*/
2019-09-18 20:46:20 +02:00
public function readEncryptedHistory ( $params );
2019-06-05 15:38:32 +02:00
/**
2019-12-27 17:43:29 +01:00
* Sends a text message to a secret chat .
2019-09-18 20:46:20 +02:00
*
2019-09-18 21:32:24 +02:00
* Parameters :
2020-10-01 18:02:54 +02:00
* * `boolean` ** silent ** - Optional :
2019-12-27 17:43:29 +01:00
* * `InputEncryptedChat` ** peer ** - Secret chat ID
2020-06-16 17:52:55 +02:00
* * `DecryptedMessage` ** message ** -
2019-09-18 21:32:24 +02:00
*
2019-09-18 20:46:20 +02:00
* @ param array $params Parameters
2019-06-05 15:38:32 +02:00
*
2019-09-18 20:46:20 +02:00
* @ return messages . SentEncryptedMessage
2019-06-05 15:38:32 +02:00
*/
2019-09-18 20:46:20 +02:00
public function sendEncrypted ( $params );
2019-06-05 15:38:32 +02:00
/**
2019-12-27 17:43:29 +01:00
* Sends a message with a file attachment to a secret chat .
2019-06-05 15:38:32 +02:00
*
2019-09-18 21:32:24 +02:00
* Parameters :
2020-10-01 18:02:54 +02:00
* * `boolean` ** silent ** - Optional :
2019-12-27 17:43:29 +01:00
* * `InputEncryptedChat` ** peer ** - Secret chat ID
2020-06-16 17:52:55 +02:00
* * `DecryptedMessage` ** message ** -
2019-12-27 17:43:29 +01:00
* * `InputEncryptedFile` ** file ** - File attachment for the secret chat
2019-09-18 21:32:24 +02:00
*
2019-09-18 20:46:20 +02:00
* @ param array $params Parameters
*
* @ return messages . SentEncryptedMessage
2019-06-05 15:38:32 +02:00
*/
2019-09-18 20:46:20 +02:00
public function sendEncryptedFile ( $params );
2019-06-05 15:38:32 +02:00
/**
2019-12-27 17:43:29 +01:00
* Sends a service message to a secret chat .
2019-09-18 20:46:20 +02:00
*
2019-09-18 21:32:24 +02:00
* Parameters :
2019-12-27 17:43:29 +01:00
* * `InputEncryptedChat` ** peer ** - Secret chat ID
2020-06-16 17:52:55 +02:00
* * `DecryptedMessage` ** message ** -
2019-09-18 21:32:24 +02:00
*
2019-09-18 20:46:20 +02:00
* @ param array $params Parameters
2019-06-05 15:38:32 +02:00
*
2019-09-18 20:46:20 +02:00
* @ return messages . SentEncryptedMessage
2019-06-05 15:38:32 +02:00
*/
2019-09-18 20:46:20 +02:00
public function sendEncryptedService ( $params );
2019-06-05 15:38:32 +02:00
/**
2020-06-16 17:52:55 +02:00
* Confirms receipt of messages in a secret chat by client , cancels push notifications .
2019-09-18 20:46:20 +02:00
*
2019-09-18 21:32:24 +02:00
* Parameters :
2020-06-16 17:52:55 +02:00
* * `int` ** max_qts ** - Maximum qts value available at the client
2019-09-18 21:32:24 +02:00
*
2019-09-18 20:46:20 +02:00
* @ param array $params Parameters
2019-06-05 15:38:32 +02:00
*
2019-12-14 16:47:04 +01:00
* @ return of long []
2019-06-05 15:38:32 +02:00
*/
2019-09-18 20:46:20 +02:00
public function receivedQueue ( $params );
2019-06-05 15:38:32 +02:00
/**
2019-12-27 17:43:29 +01:00
* Report a secret chat for spam .
2019-09-18 20:46:20 +02:00
*
2019-09-18 21:32:24 +02:00
* Parameters :
2019-12-27 17:43:29 +01:00
* * `InputEncryptedChat` ** peer ** - The secret chat to report
2019-09-18 21:32:24 +02:00
*
2019-09-18 20:46:20 +02:00
* @ param array $params Parameters
2019-06-05 15:38:32 +02:00
*
* @ return bool
*/
2019-09-18 20:46:20 +02:00
public function reportEncryptedSpam ( $params );
2019-06-05 15:38:32 +02:00
/**
2019-12-27 17:43:29 +01:00
* Notifies the sender about the recipient having listened a voice message or watched a video .
2019-09-18 20:46:20 +02:00
*
2019-09-18 21:32:24 +02:00
* Parameters :
2020-06-16 17:52:55 +02:00
* * `[int]` ** id ** - Message ID list
2019-09-18 21:32:24 +02:00
*
2019-09-18 20:46:20 +02:00
* @ param array $params Parameters
2019-06-05 15:38:32 +02:00
*
2019-09-18 20:46:20 +02:00
* @ return messages . AffectedMessages
2019-06-05 15:38:32 +02:00
*/
2019-09-18 20:46:20 +02:00
public function readMessageContents ( $params );
2019-06-05 15:38:32 +02:00
/**
2019-12-27 17:43:29 +01:00
* Get stickers by emoji .
2019-09-18 20:46:20 +02:00
*
2019-09-18 21:32:24 +02:00
* Parameters :
2019-12-27 17:43:29 +01:00
* * `string` ** emoticon ** - The emoji
2020-06-16 17:52:55 +02:00
* * `[int]` ** hash ** - Optional : [ Hash for pagination , for more info click here ]( https :// core . telegram . org / api / offsets #hash-generation)
2019-09-18 21:32:24 +02:00
*
2019-09-18 20:46:20 +02:00
* @ param array $params Parameters
2019-06-05 15:38:32 +02:00
*
2019-09-18 20:46:20 +02:00
* @ return messages . Stickers
2019-06-05 15:38:32 +02:00
*/
2019-09-18 20:46:20 +02:00
public function getStickers ( $params );
2019-06-05 15:38:32 +02:00
/**
2019-12-27 17:43:29 +01:00
* Get all installed stickers .
2019-06-05 15:38:32 +02:00
*
2019-09-18 21:32:24 +02:00
* Parameters :
2020-06-16 17:52:55 +02:00
* * `[int]` ** hash ** - Optional : [ Hash for pagination , for more info click here ]( https :// core . telegram . org / api / offsets #hash-generation)
2019-09-18 21:32:24 +02:00
*
2019-09-18 20:46:20 +02:00
* @ param array $params Parameters
*
* @ return messages . AllStickers
2019-06-05 15:38:32 +02:00
*/
2019-09-18 20:46:20 +02:00
public function getAllStickers ( $params );
2019-06-05 15:38:32 +02:00
/**
2019-12-27 17:43:29 +01:00
* Get preview of webpage .
2019-09-18 20:46:20 +02:00
*
2019-09-18 21:32:24 +02:00
* Parameters :
2019-12-27 17:43:29 +01:00
* * `string` ** message ** - Message from which to extract the preview
2020-06-16 17:52:55 +02:00
* * `[MessageEntity]` ** entities ** - Optional : [ Message entities for styled text ]( https :// core . telegram . org / api / entities )
2019-09-18 21:32:24 +02:00
*
2019-09-18 20:46:20 +02:00
* @ param array $params Parameters
2019-06-05 15:38:32 +02:00
*
* @ return MessageMedia
*/
2019-09-18 20:46:20 +02:00
public function getWebPagePreview ( $params );
2019-06-05 15:38:32 +02:00
/**
2019-12-27 17:43:29 +01:00
* Export an invite link for a chat .
2019-09-18 20:46:20 +02:00
*
2019-09-18 21:32:24 +02:00
* Parameters :
2019-12-27 17:43:29 +01:00
* * `InputPeer` ** peer ** - Chat
2019-09-18 21:32:24 +02:00
*
2019-09-18 20:46:20 +02:00
* @ param array $params Parameters
2019-06-05 15:38:32 +02:00
*
* @ return ExportedChatInvite
*/
2019-09-18 20:46:20 +02:00
public function exportChatInvite ( $params );
2019-06-05 15:38:32 +02:00
/**
2019-12-27 17:43:29 +01:00
* Check the validity of a chat invite link and get basic info about it .
2019-09-18 20:46:20 +02:00
*
2019-09-18 21:32:24 +02:00
* Parameters :
2019-12-27 17:43:29 +01:00
* * `string` ** hash ** - Invite hash in `t.me/joinchat/hash`
2019-09-18 21:32:24 +02:00
*
2019-09-18 20:46:20 +02:00
* @ param array $params Parameters
2019-06-05 15:38:32 +02:00
*
* @ return ChatInvite
*/
2019-09-18 20:46:20 +02:00
public function checkChatInvite ( $params );
2019-06-05 15:38:32 +02:00
/**
2019-12-27 17:43:29 +01:00
* Import a chat invite and join a private chat / supergroup / channel .
2019-09-18 20:46:20 +02:00
*
2019-09-18 21:32:24 +02:00
* Parameters :
2019-12-27 17:43:29 +01:00
* * `string` ** hash ** - `hash` from `t.me/joinchat/hash`
2019-09-18 21:32:24 +02:00
*
2019-09-18 20:46:20 +02:00
* @ param array $params Parameters
2019-06-05 15:38:32 +02:00
*
* @ return Updates
*/
2019-09-18 20:46:20 +02:00
public function importChatInvite ( $params );
2019-06-05 15:38:32 +02:00
/**
2019-12-27 17:43:29 +01:00
* Get info about a stickerset .
2019-06-05 15:38:32 +02:00
*
2019-09-18 21:32:24 +02:00
* Parameters :
2019-12-27 17:43:29 +01:00
* * `InputStickerSet` ** stickerset ** - Stickerset
2019-09-18 21:32:24 +02:00
*
2019-09-18 20:46:20 +02:00
* @ param array $params Parameters
*
* @ return messages . StickerSet
2019-06-05 15:38:32 +02:00
*/
2019-09-18 20:46:20 +02:00
public function getStickerSet ( $params );
2019-06-05 15:38:32 +02:00
/**
2019-12-27 17:43:29 +01:00
* Install a stickerset .
2019-09-18 20:46:20 +02:00
*
2019-09-18 21:32:24 +02:00
* Parameters :
2019-12-27 17:43:29 +01:00
* * `InputStickerSet` ** stickerset ** - Stickerset to install
* * `Bool` ** archived ** - Whether to archive stickerset
2019-09-18 21:32:24 +02:00
*
2019-09-18 20:46:20 +02:00
* @ param array $params Parameters
2019-06-05 15:38:32 +02:00
*
2019-09-18 20:46:20 +02:00
* @ return messages . StickerSetInstallResult
2019-06-05 15:38:32 +02:00
*/
2019-09-18 20:46:20 +02:00
public function installStickerSet ( $params );
2019-06-05 15:38:32 +02:00
/**
2019-12-27 17:43:29 +01:00
* Uninstall a stickerset .
2019-09-18 20:46:20 +02:00
*
2019-09-18 21:32:24 +02:00
* Parameters :
2019-12-27 17:43:29 +01:00
* * `InputStickerSet` ** stickerset ** - The stickerset to uninstall
2019-09-18 21:32:24 +02:00
*
2019-09-18 20:46:20 +02:00
* @ param array $params Parameters
2019-06-05 15:38:32 +02:00
*
* @ return bool
*/
2019-09-18 20:46:20 +02:00
public function uninstallStickerSet ( $params );
2019-06-05 15:38:32 +02:00
/**
2019-12-27 17:43:29 +01:00
* Start a conversation with a bot using a [ deep linking parameter ]( https :// core . telegram . org / bots #deep-linking).
2019-09-18 20:46:20 +02:00
*
2019-09-18 21:32:24 +02:00
* Parameters :
2019-12-27 17:43:29 +01:00
* * `InputUser` ** bot ** - The bot
* * `InputPeer` ** peer ** - The chat where to start the bot , can be the bot ' s private chat or a group
* * `string` ** start_param ** - [ Deep linking parameter ]( https :// core . telegram . org / bots #deep-linking)
2019-09-18 21:32:24 +02:00
*
2019-09-18 20:46:20 +02:00
* @ param array $params Parameters
2019-06-05 15:38:32 +02:00
*
* @ return Updates
*/
2019-09-18 20:46:20 +02:00
public function startBot ( $params );
2019-06-05 15:38:32 +02:00
/**
2019-12-27 17:43:29 +01:00
* Get and increase the view counter of a message sent or forwarded from a [ channel ]( https :// core . telegram . org / api / channel ) .
2019-09-18 20:46:20 +02:00
*
2019-09-18 21:32:24 +02:00
* Parameters :
2019-12-27 17:43:29 +01:00
* * `InputPeer` ** peer ** - Peer where the message was found
2020-06-16 17:52:55 +02:00
* * `[int]` ** id ** - ID of message
2019-12-27 17:43:29 +01:00
* * `Bool` ** increment ** - Whether to mark the message as viewed and increment the view counter
2019-09-18 21:32:24 +02:00
*
2019-09-18 20:46:20 +02:00
* @ param array $params Parameters
2019-06-05 15:38:32 +02:00
*
2020-10-01 18:02:54 +02:00
* @ return messages . MessageViews
2019-06-05 15:38:32 +02:00
*/
2019-09-18 20:46:20 +02:00
public function getMessagesViews ( $params );
2019-06-05 15:38:32 +02:00
/**
2019-12-27 17:43:29 +01:00
* Make a user admin in a [ legacy group ]( https :// core . telegram . org / api / channel ) .
2019-09-18 20:46:20 +02:00
*
2019-09-18 21:32:24 +02:00
* Parameters :
2020-06-16 17:52:55 +02:00
* * `InputPeer` ** chat_id ** -
2019-12-27 17:43:29 +01:00
* * `InputUser` ** user_id ** - The user to make admin
* * `Bool` ** is_admin ** - Whether to make him admin
2019-09-18 21:32:24 +02:00
*
2019-09-18 20:46:20 +02:00
* @ param array $params Parameters
2019-06-05 15:38:32 +02:00
*
* @ return bool
*/
2019-09-18 20:46:20 +02:00
public function editChatAdmin ( $params );
2019-06-05 15:38:32 +02:00
/**
2019-12-27 17:43:29 +01:00
* Turn a [ legacy group into a supergroup ]( https :// core . telegram . org / api / channel ) .
2019-09-18 20:46:20 +02:00
*
2019-09-18 21:32:24 +02:00
* Parameters :
2020-06-16 17:52:55 +02:00
* * `InputPeer` ** chat_id ** -
2019-09-18 21:32:24 +02:00
*
2019-09-18 20:46:20 +02:00
* @ param array $params Parameters
2019-06-05 15:38:32 +02:00
*
* @ return Updates
*/
2019-09-18 20:46:20 +02:00
public function migrateChat ( $params );
2019-06-05 15:38:32 +02:00
/**
2019-12-27 17:43:29 +01:00
* Search for messages and peers globally .
2019-06-05 15:38:32 +02:00
*
2019-09-18 21:32:24 +02:00
* Parameters :
2020-10-01 18:02:54 +02:00
* * `int` ** folder_id ** - Optional : [ Peer folder ID , for more info click here ]( https :// core . telegram . org / api / folders #peer-folders)
* * `string` ** q ** - Query
* * `MessagesFilter` ** filter ** -
* * `int` ** min_date ** -
* * `int` ** max_date ** -
* * `int` ** offset_rate ** - Initially 0 , then set to the [ `next_rate` parameter of messages . messagesSlice ]( https :// docs . madelineproto . xyz / API_docs / constructors / messages . messagesSlice . html )
* * `InputPeer` ** offset_peer ** - [ Offsets for pagination , for more info click here ]( https :// core . telegram . org / api / offsets )
* * `int` ** offset_id ** - [ Offsets for pagination , for more info click here ]( https :// core . telegram . org / api / offsets )
* * `int` ** limit ** - [ Offsets for pagination , for more info click here ]( https :// core . telegram . org / api / offsets )
2019-09-18 21:32:24 +02:00
*
2019-09-18 20:46:20 +02:00
* @ param array $params Parameters
*
* @ return messages . Messages
2019-06-05 15:38:32 +02:00
*/
2019-09-18 20:46:20 +02:00
public function searchGlobal ( $params );
2019-06-05 15:38:32 +02:00
/**
2019-12-27 17:43:29 +01:00
* Reorder installed stickersets .
2019-09-18 20:46:20 +02:00
*
2019-09-18 21:32:24 +02:00
* Parameters :
2019-12-27 17:43:29 +01:00
* * `boolean` ** masks ** - Optional : Reorder mask stickersets
2020-06-16 17:52:55 +02:00
* * `[long]` ** order ** - New stickerset order by stickerset IDs
2019-09-18 21:32:24 +02:00
*
2019-09-18 20:46:20 +02:00
* @ param array $params Parameters
2019-06-05 15:38:32 +02:00
*
* @ return bool
*/
2019-09-18 20:46:20 +02:00
public function reorderStickerSets ( $params );
2019-06-05 15:38:32 +02:00
/**
2019-12-27 17:43:29 +01:00
* Get a document by its SHA256 hash , mainly used for gifs .
2019-09-18 20:46:20 +02:00
*
2019-09-18 21:32:24 +02:00
* Parameters :
2019-12-27 17:43:29 +01:00
* * `bytes` ** sha256 ** - SHA256 of file
* * `int` ** size ** - Size of the file in bytes
* * `string` ** mime_type ** - Mime type
2019-09-18 21:32:24 +02:00
*
2019-09-18 20:46:20 +02:00
* @ param array $params Parameters
2019-06-05 15:38:32 +02:00
*
* @ return Document
*/
2019-09-18 20:46:20 +02:00
public function getDocumentByHash ( $params );
2019-06-05 15:38:32 +02:00
/**
2019-12-27 17:43:29 +01:00
* Get saved GIFs .
2019-09-18 20:46:20 +02:00
*
2019-09-18 21:32:24 +02:00
* Parameters :
2020-06-16 17:52:55 +02:00
* * `[int]` ** hash ** - Optional : [ Hash for pagination , for more info click here ]( https :// core . telegram . org / api / offsets #hash-generation)
2019-09-18 21:32:24 +02:00
*
2019-09-18 20:46:20 +02:00
* @ param array $params Parameters
2019-06-05 15:38:32 +02:00
*
2019-09-18 20:46:20 +02:00
* @ return messages . SavedGifs
2019-06-05 15:38:32 +02:00
*/
2019-09-18 20:46:20 +02:00
public function getSavedGifs ( $params );
2019-06-05 15:38:32 +02:00
/**
2019-12-27 17:43:29 +01:00
* Add GIF to saved gifs list .
2019-09-18 20:46:20 +02:00
*
2019-09-18 21:32:24 +02:00
* Parameters :
2019-12-27 17:43:29 +01:00
* * `InputDocument` ** id ** - GIF to save
* * `Bool` ** unsave ** - Whether to remove GIF from saved gifs list
2019-09-18 21:32:24 +02:00
*
2019-09-18 20:46:20 +02:00
* @ param array $params Parameters
2019-06-05 15:38:32 +02:00
*
* @ return bool
*/
2019-09-18 20:46:20 +02:00
public function saveGif ( $params );
2019-06-05 15:38:32 +02:00
/**
2019-12-27 17:43:29 +01:00
* Query an inline bot .
2019-09-18 20:46:20 +02:00
*
2019-09-18 21:32:24 +02:00
* Parameters :
2019-12-27 17:43:29 +01:00
* * `InputUser` ** bot ** - The bot to query
* * `InputPeer` ** peer ** - The currently opened chat
* * `InputGeoPoint` ** geo_point ** - Optional : The geolocation , if requested
* * `string` ** query ** - The query
* * `string` ** offset ** - The offset within the results , will be passed directly as - is to the bot .
2019-09-18 21:32:24 +02:00
*
2019-09-18 20:46:20 +02:00
* @ param array $params Parameters
2019-06-05 15:38:32 +02:00
*
2019-09-18 20:46:20 +02:00
* @ return messages . BotResults
2019-06-05 15:38:32 +02:00
*/
2019-09-18 20:46:20 +02:00
public function getInlineBotResults ( $params );
2019-06-05 15:38:32 +02:00
/**
2019-12-27 17:43:29 +01:00
* Answer an inline query , for bots only .
2019-09-18 20:46:20 +02:00
*
2019-09-18 21:32:24 +02:00
* Parameters :
2019-12-27 17:43:29 +01:00
* * `boolean` ** gallery ** - Optional : Set this flag if the results are composed of media files
* * `boolean` ** private ** - Optional : Set this flag if results may be cached on the server side only for the user that sent the query . By default , results may be returned to any user who sends the same query
* * `long` ** query_id ** - Unique identifier for the answered query
2020-06-16 17:52:55 +02:00
* * `[InputBotInlineResult]` ** results ** - Vector of results for the inline query
2019-12-27 17:43:29 +01:00
* * `int` ** cache_time ** - The maximum amount of time in seconds that the result of the inline query may be cached on the server . Defaults to 300.
* * `string` ** next_offset ** - Optional : Pass the offset that a client should send in the next query with the same text to receive more results . Pass an empty string if there are no more results or if you don‘ t support pagination . Offset length can’ t exceed 64 bytes .
* * `InlineBotSwitchPM` ** switch_pm ** - Optional : If passed , clients will display a button with specified text that switches the user to a private chat with the bot and sends the bot a start message with a certain parameter .
2019-09-18 21:32:24 +02:00
*
2019-09-18 20:46:20 +02:00
* @ param array $params Parameters
2019-06-05 15:38:32 +02:00
*
* @ return bool
*/
2019-09-18 20:46:20 +02:00
public function setInlineBotResults ( $params );
2019-06-05 15:38:32 +02:00
/**
2019-12-28 16:45:00 +01:00
* Send a result obtained using [ messages . getInlineBotResults ]( https :// docs . madelineproto . xyz / API_docs / methods / messages . getInlineBotResults . html ) .
2019-09-18 20:46:20 +02:00
*
2019-09-18 21:32:24 +02:00
* Parameters :
2019-12-27 17:43:29 +01:00
* * `boolean` ** silent ** - Optional : Whether to send the message silently ( no notification will be triggered on the other client )
* * `boolean` ** background ** - Optional : Whether to send the message in background
* * `boolean` ** clear_draft ** - Optional : Whether to clear the [ draft ]( https :// core . telegram . org / api / drafts )
2019-12-28 16:45:00 +01:00
* * `boolean` ** hide_via ** - Optional : Whether to hide the `via @botname` in the resulting message ( only for bot usernames encountered in the [ config ]( https :// docs . madelineproto . xyz / API_docs / constructors / config . html ))
2019-12-27 17:43:29 +01:00
* * `InputPeer` ** peer ** - Destination
* * `int` ** reply_to_msg_id ** - Optional : ID of the message this message should reply to
2019-12-28 16:45:00 +01:00
* * `long` ** query_id ** - Query ID from [ messages . getInlineBotResults ]( https :// docs . madelineproto . xyz / API_docs / methods / messages . getInlineBotResults . html )
* * `string` ** id ** - Result ID from [ messages . getInlineBotResults ]( https :// docs . madelineproto . xyz / API_docs / methods / messages . getInlineBotResults . html )
2019-12-27 17:43:29 +01:00
* * `int` ** schedule_date ** - Optional : Scheduled message date for scheduled messages
2019-09-18 21:32:24 +02:00
*
2019-09-18 20:46:20 +02:00
* @ param array $params Parameters
2019-06-05 15:38:32 +02:00
*
* @ return Updates
*/
2019-09-18 20:46:20 +02:00
public function sendInlineBotResult ( $params );
2019-06-05 15:38:32 +02:00
/**
2019-12-27 17:43:29 +01:00
* Find out if a media message ' s caption can be edited .
2019-09-18 20:46:20 +02:00
*
2019-09-18 21:32:24 +02:00
* Parameters :
2019-12-27 17:43:29 +01:00
* * `InputPeer` ** peer ** - Peer where the media was sent
* * `int` ** id ** - ID of message
2019-09-18 21:32:24 +02:00
*
2019-09-18 20:46:20 +02:00
* @ param array $params Parameters
2019-06-05 15:38:32 +02:00
*
2019-09-18 20:46:20 +02:00
* @ return messages . MessageEditData
2019-06-05 15:38:32 +02:00
*/
2019-09-18 20:46:20 +02:00
public function getMessageEditData ( $params );
2019-06-05 15:38:32 +02:00
/**
2019-12-27 17:43:29 +01:00
* Edit message .
2019-09-18 20:46:20 +02:00
*
2019-09-18 21:32:24 +02:00
* Parameters :
* * `boolean` ** no_webpage ** - Optional : Disable webpage preview
2019-12-27 17:43:29 +01:00
* * `InputPeer` ** peer ** - Where was the message sent
* * `int` ** id ** - ID of the message to edit
* * `string` ** message ** - Optional : New message
* * `InputMedia` ** media ** - Optional : New attached media
* * `ReplyMarkup` ** reply_markup ** - Optional : Reply markup for inline keyboards
2020-06-16 17:52:55 +02:00
* * `[MessageEntity]` ** entities ** - Optional : [ Message entities for styled text ]( https :// core . telegram . org / api / entities )
2019-12-27 17:43:29 +01:00
* * `int` ** schedule_date ** - Optional : Scheduled message date for scheduled messages
2019-09-18 21:32:24 +02:00
*
2019-09-18 20:46:20 +02:00
* @ param array $params Parameters
2019-06-05 15:38:32 +02:00
*
* @ return Updates
*/
2019-09-18 20:46:20 +02:00
public function editMessage ( $params );
2019-06-05 15:38:32 +02:00
/**
2019-12-27 17:43:29 +01:00
* Edit an inline bot message .
2019-09-18 20:46:20 +02:00
*
2019-09-18 21:32:24 +02:00
* Parameters :
* * `boolean` ** no_webpage ** - Optional : Disable webpage preview
2019-12-27 17:43:29 +01:00
* * `InputBotInlineMessageID` ** id ** - Sent inline message ID
* * `string` ** message ** - Optional : Message
* * `InputMedia` ** media ** - Optional : Media
* * `ReplyMarkup` ** reply_markup ** - Optional : Reply markup for inline keyboards
2020-06-16 17:52:55 +02:00
* * `[MessageEntity]` ** entities ** - Optional : [ Message entities for styled text ]( https :// core . telegram . org / api / entities )
2019-09-18 21:32:24 +02:00
*
2019-09-18 20:46:20 +02:00
* @ param array $params Parameters
2019-06-05 15:38:32 +02:00
*
* @ return bool
*/
2019-09-18 20:46:20 +02:00
public function editInlineBotMessage ( $params );
2019-06-05 15:38:32 +02:00
/**
2019-12-27 17:43:29 +01:00
* Press an inline callback button and get a callback answer from the bot .
2019-09-18 20:46:20 +02:00
*
2019-09-18 21:32:24 +02:00
* Parameters :
2020-10-01 18:02:54 +02:00
* * `boolean` ** game ** - Optional : Whether this is a " play game " button
* * `InputPeer` ** peer ** - Where was the inline keyboard sent
* * `int` ** msg_id ** - ID of the Message with the inline keyboard
* * `bytes` ** data ** - Optional : Callback data
* * `InputCheckPasswordSRP` ** password ** - Optional :
2019-09-18 21:32:24 +02:00
*
2019-09-18 20:46:20 +02:00
* @ param array $params Parameters
2019-06-05 15:38:32 +02:00
*
2019-09-18 20:46:20 +02:00
* @ return messages . BotCallbackAnswer
2019-06-05 15:38:32 +02:00
*/
2019-09-18 20:46:20 +02:00
public function getBotCallbackAnswer ( $params );
2019-06-05 15:38:32 +02:00
/**
2019-12-27 17:43:29 +01:00
* Set the callback answer to a user button press ( bots only ) .
2019-09-18 20:46:20 +02:00
*
2019-09-18 21:32:24 +02:00
* Parameters :
2019-12-27 17:43:29 +01:00
* * `boolean` ** alert ** - Optional : Whether to show the message as a popup instead of a toast notification
* * `long` ** query_id ** - Query ID
* * `string` ** message ** - Optional : Popup to show
* * `string` ** url ** - Optional : URL to open
* * `int` ** cache_time ** - Cache validity
2019-09-18 21:32:24 +02:00
*
2019-09-18 20:46:20 +02:00
* @ param array $params Parameters
2019-06-05 15:38:32 +02:00
*
* @ return bool
*/
2019-09-18 20:46:20 +02:00
public function setBotCallbackAnswer ( $params );
2019-06-05 15:38:32 +02:00
/**
2019-12-27 17:43:29 +01:00
* Get dialog info of specified peers .
2019-09-18 20:46:20 +02:00
*
2019-09-18 21:32:24 +02:00
* Parameters :
2020-06-16 17:52:55 +02:00
* * `[InputDialogPeer]` ** peers ** - Peers
2019-09-18 21:32:24 +02:00
*
2019-09-18 20:46:20 +02:00
* @ param array $params Parameters
2019-06-05 15:38:32 +02:00
*
2019-09-18 20:46:20 +02:00
* @ return messages . PeerDialogs
2019-06-05 15:38:32 +02:00
*/
2019-09-18 20:46:20 +02:00
public function getPeerDialogs ( $params );
2019-06-05 15:38:32 +02:00
/**
2019-12-27 17:43:29 +01:00
* Save a message [ draft ]( https :// core . telegram . org / api / drafts ) associated to a chat .
2019-09-18 20:46:20 +02:00
*
2019-09-18 21:32:24 +02:00
* Parameters :
2019-12-27 17:43:29 +01:00
* * `boolean` ** no_webpage ** - Optional : Disable generation of the webpage preview
* * `int` ** reply_to_msg_id ** - Optional : Message ID the message should reply to
* * `InputPeer` ** peer ** - Destination of the message that should be sent
* * `string` ** message ** - The draft
2020-06-16 17:52:55 +02:00
* * `[MessageEntity]` ** entities ** - Optional : Message [ entities ]( https :// core . telegram . org / api / entities ) for styled text
2019-09-18 21:32:24 +02:00
*
2019-09-18 20:46:20 +02:00
* @ param array $params Parameters
2019-06-05 15:38:32 +02:00
*
* @ return bool
*/
2019-09-18 20:46:20 +02:00
public function saveDraft ( $params );
2019-06-05 15:38:32 +02:00
/**
2019-12-27 17:43:29 +01:00
* Save get all message [ drafts ]( https :// core . telegram . org / api / drafts ) .
2019-09-18 20:46:20 +02:00
*
2019-06-05 15:38:32 +02:00
* @ return Updates
*/
public function getAllDrafts ();
/**
2019-09-18 21:32:24 +02:00
* Get featured stickers .
2019-09-18 20:46:20 +02:00
*
2019-09-18 21:32:24 +02:00
* Parameters :
2020-06-16 17:52:55 +02:00
* * `[int]` ** hash ** - Optional : [ Hash for pagination , for more info click here ]( https :// core . telegram . org / api / offsets #hash-generation)
2019-09-18 21:32:24 +02:00
*
2019-09-18 20:46:20 +02:00
* @ param array $params Parameters
2019-06-05 15:38:32 +02:00
*
2019-09-18 20:46:20 +02:00
* @ return messages . FeaturedStickers
2019-06-05 15:38:32 +02:00
*/
2019-09-18 20:46:20 +02:00
public function getFeaturedStickers ( $params );
2019-06-05 15:38:32 +02:00
/**
2019-09-18 21:32:24 +02:00
* Mark new featured stickers as read .
2019-09-18 20:46:20 +02:00
*
2019-09-18 21:32:24 +02:00
* Parameters :
2020-06-16 17:52:55 +02:00
* * `[long]` ** id ** - IDs of stickersets to mark as read
2019-09-18 21:32:24 +02:00
*
2019-09-18 20:46:20 +02:00
* @ param array $params Parameters
2019-06-05 15:38:32 +02:00
*
* @ return bool
*/
2019-09-18 20:46:20 +02:00
public function readFeaturedStickers ( $params );
2019-06-05 15:38:32 +02:00
/**
2019-09-18 21:32:24 +02:00
* Get recent stickers .
2019-09-18 20:46:20 +02:00
*
2019-09-18 21:32:24 +02:00
* Parameters :
2019-12-27 17:43:29 +01:00
* * `boolean` ** attached ** - Optional : Get stickers recently attached to photo or video files
2020-06-16 17:52:55 +02:00
* * `[int]` ** hash ** - Optional : [ Hash for pagination , for more info click here ]( https :// core . telegram . org / api / offsets #hash-generation)
2019-09-18 21:32:24 +02:00
*
2019-09-18 20:46:20 +02:00
* @ param array $params Parameters
2019-06-05 15:38:32 +02:00
*
2019-09-18 20:46:20 +02:00
* @ return messages . RecentStickers
2019-06-05 15:38:32 +02:00
*/
2019-09-18 20:46:20 +02:00
public function getRecentStickers ( $params );
2019-06-05 15:38:32 +02:00
/**
2019-12-27 17:43:29 +01:00
* Add / remove sticker from recent stickers list .
2019-09-18 20:46:20 +02:00
*
2019-09-18 21:32:24 +02:00
* Parameters :
2019-12-27 17:43:29 +01:00
* * `boolean` ** attached ** - Optional : Whether to add / remove stickers recently attached to photo or video files
* * `InputDocument` ** id ** - Sticker
* * `Bool` ** unsave ** - Whether to save or unsave the sticker
2019-09-18 21:32:24 +02:00
*
2019-09-18 20:46:20 +02:00
* @ param array $params Parameters
2019-06-05 15:38:32 +02:00
*
* @ return bool
*/
2019-09-18 20:46:20 +02:00
public function saveRecentSticker ( $params );
2019-06-05 15:38:32 +02:00
/**
2019-12-27 17:43:29 +01:00
* Clear recent stickers .
2019-09-18 20:46:20 +02:00
*
2019-09-18 21:32:24 +02:00
* Parameters :
2019-12-27 17:43:29 +01:00
* * `boolean` ** attached ** - Optional : Set this flag to clear the list of stickers recently attached to photo or video files
2019-09-18 21:32:24 +02:00
*
2019-09-18 20:46:20 +02:00
* @ param array $params Parameters
2019-06-05 15:38:32 +02:00
*
* @ return bool
*/
2019-09-18 20:46:20 +02:00
public function clearRecentStickers ( $params );
2019-06-05 15:38:32 +02:00
/**
2019-09-18 21:32:24 +02:00
* Get all archived stickers .
2019-09-18 20:46:20 +02:00
*
2019-09-18 21:32:24 +02:00
* Parameters :
2019-12-27 17:43:29 +01:00
* * `boolean` ** masks ** - Optional : Get mask stickers
* * `long` ** offset_id ** - [ Offsets for pagination , for more info click here ]( https :// core . telegram . org / api / offsets )
* * `int` ** limit ** - Maximum number of results to return , [ see pagination ]( https :// core . telegram . org / api / offsets )
2019-09-18 21:32:24 +02:00
*
2019-09-18 20:46:20 +02:00
* @ param array $params Parameters
2019-06-05 15:38:32 +02:00
*
2019-09-18 20:46:20 +02:00
* @ return messages . ArchivedStickers
2019-06-05 15:38:32 +02:00
*/
2019-09-18 20:46:20 +02:00
public function getArchivedStickers ( $params );
2019-06-05 15:38:32 +02:00
/**
2019-12-27 17:43:29 +01:00
* Get installed mask stickers .
2019-06-05 15:38:32 +02:00
*
2019-09-18 21:32:24 +02:00
* Parameters :
2020-06-16 17:52:55 +02:00
* * `[int]` ** hash ** - Optional : [ Hash for pagination , for more info click here ]( https :// core . telegram . org / api / offsets #hash-generation)
2019-09-18 21:32:24 +02:00
*
2019-09-18 20:46:20 +02:00
* @ param array $params Parameters
*
* @ return messages . AllStickers
2019-06-05 15:38:32 +02:00
*/
2019-09-18 20:46:20 +02:00
public function getMaskStickers ( $params );
2019-06-05 15:38:32 +02:00
/**
2019-12-27 17:43:29 +01:00
* Get stickers attached to a photo or video .
2019-09-18 20:46:20 +02:00
*
2019-09-18 21:32:24 +02:00
* Parameters :
2019-12-27 17:43:29 +01:00
* * `InputStickeredMedia` ** media ** - Stickered media
2019-09-18 21:32:24 +02:00
*
2019-09-18 20:46:20 +02:00
* @ param array $params Parameters
2019-06-05 15:38:32 +02:00
*
2019-12-14 16:47:04 +01:00
* @ return of StickerSetCovered []
2019-06-05 15:38:32 +02:00
*/
2019-09-18 20:46:20 +02:00
public function getAttachedStickers ( $params );
2019-06-05 15:38:32 +02:00
/**
2019-12-27 17:43:29 +01:00
* Use this method to set the score of the specified user in a game sent as a normal message ( bots only ) .
2019-09-18 20:46:20 +02:00
*
2019-09-18 21:32:24 +02:00
* Parameters :
2019-12-27 17:43:29 +01:00
* * `boolean` ** edit_message ** - Optional : Set this flag if the game message should be automatically edited to include the current scoreboard
* * `boolean` ** force ** - Optional : Set this flag if the high score is allowed to decrease . This can be useful when fixing mistakes or banning cheaters
* * `InputPeer` ** peer ** - Unique identifier of target chat
* * `int` ** id ** - Identifier of the sent message
* * `InputUser` ** user_id ** - User identifier
* * `int` ** score ** - New score
2019-09-18 21:32:24 +02:00
*
2019-09-18 20:46:20 +02:00
* @ param array $params Parameters
2019-06-05 15:38:32 +02:00
*
* @ return Updates
*/
2019-09-18 20:46:20 +02:00
public function setGameScore ( $params );
2019-06-05 15:38:32 +02:00
/**
2019-12-27 17:43:29 +01:00
* Use this method to set the score of the specified user in a game sent as an inline message ( bots only ) .
2019-09-18 20:46:20 +02:00
*
2019-09-18 21:32:24 +02:00
* Parameters :
2019-12-27 17:43:29 +01:00
* * `boolean` ** edit_message ** - Optional : Set this flag if the game message should be automatically edited to include the current scoreboard
* * `boolean` ** force ** - Optional : Set this flag if the high score is allowed to decrease . This can be useful when fixing mistakes or banning cheaters
* * `InputBotInlineMessageID` ** id ** - ID of the inline message
* * `InputUser` ** user_id ** - User identifier
* * `int` ** score ** - New score
2019-09-18 21:32:24 +02:00
*
2019-09-18 20:46:20 +02:00
* @ param array $params Parameters
2019-06-05 15:38:32 +02:00
*
* @ return bool
*/
2019-09-18 20:46:20 +02:00
public function setInlineGameScore ( $params );
2019-06-05 15:38:32 +02:00
/**
2019-12-27 17:43:29 +01:00
* Get highscores of a game .
2019-09-18 20:46:20 +02:00
*
2019-09-18 21:32:24 +02:00
* Parameters :
2019-12-27 17:43:29 +01:00
* * `InputPeer` ** peer ** - Where was the game sent
* * `int` ** id ** - ID of message with game media attachment
* * `InputUser` ** user_id ** - Get high scores made by a certain user
2019-09-18 21:32:24 +02:00
*
2019-09-18 20:46:20 +02:00
* @ param array $params Parameters
2019-06-05 15:38:32 +02:00
*
2019-09-18 20:46:20 +02:00
* @ return messages . HighScores
2019-06-05 15:38:32 +02:00
*/
2019-09-18 20:46:20 +02:00
public function getGameHighScores ( $params );
2019-06-05 15:38:32 +02:00
/**
2019-12-27 17:43:29 +01:00
* Get highscores of a game sent using an inline bot .
2019-09-18 20:46:20 +02:00
*
2019-09-18 21:32:24 +02:00
* Parameters :
2019-12-27 17:43:29 +01:00
* * `InputBotInlineMessageID` ** id ** - ID of inline message
* * `InputUser` ** user_id ** - Get high scores of a certain user
2019-09-18 21:32:24 +02:00
*
2019-09-18 20:46:20 +02:00
* @ param array $params Parameters
2019-06-05 15:38:32 +02:00
*
2019-09-18 20:46:20 +02:00
* @ return messages . HighScores
2019-06-05 15:38:32 +02:00
*/
2019-09-18 20:46:20 +02:00
public function getInlineGameHighScores ( $params );
2019-06-05 15:38:32 +02:00
/**
2019-09-18 21:32:24 +02:00
* Get chats in common with a user .
2019-06-05 15:38:32 +02:00
*
2019-09-18 21:32:24 +02:00
* Parameters :
2019-12-27 17:43:29 +01:00
* * `InputUser` ** user_id ** - User ID
* * `int` ** max_id ** - Maximum ID of chat to return ( see [ pagination ]( https :// core . telegram . org / api / offsets ))
* * `int` ** limit ** - Maximum number of results to return , [ see pagination ]( https :// core . telegram . org / api / offsets )
2019-09-18 21:32:24 +02:00
*
2019-09-18 20:46:20 +02:00
* @ param array $params Parameters
*
* @ return messages . Chats
2019-06-05 15:38:32 +02:00
*/
2019-09-18 20:46:20 +02:00
public function getCommonChats ( $params );
2019-06-05 15:38:32 +02:00
/**
2019-12-27 17:43:29 +01:00
* Get all chats , channels and supergroups .
2019-09-18 20:46:20 +02:00
*
2019-09-18 21:32:24 +02:00
* Parameters :
2020-06-16 17:52:55 +02:00
* * `[int]` ** except_ids ** - Except these chats / channels / supergroups
2019-09-18 21:32:24 +02:00
*
2019-09-18 20:46:20 +02:00
* @ param array $params Parameters
2019-06-05 15:38:32 +02:00
*
2019-09-18 20:46:20 +02:00
* @ return messages . Chats
2019-06-05 15:38:32 +02:00
*/
2019-09-18 20:46:20 +02:00
public function getAllChats ( $params );
2019-06-05 15:38:32 +02:00
/**
2019-12-27 17:43:29 +01:00
* Get [ instant view ]( https :// instantview . telegram . org ) page .
2019-09-18 20:46:20 +02:00
*
2019-09-18 21:32:24 +02:00
* Parameters :
2019-12-27 17:43:29 +01:00
* * `string` ** url ** - URL of IV page to fetch
2020-06-16 17:52:55 +02:00
* * `[int]` ** hash ** - Optional : [ Hash for pagination , for more info click here ]( https :// core . telegram . org / api / offsets #hash-generation)
2019-09-18 21:32:24 +02:00
*
2019-09-18 20:46:20 +02:00
* @ param array $params Parameters
2019-06-05 15:38:32 +02:00
*
* @ return WebPage
*/
2019-09-18 20:46:20 +02:00
public function getWebPage ( $params );
2019-06-05 15:38:32 +02:00
/**
2019-12-27 17:43:29 +01:00
* Pin / unpin a dialog .
2019-09-18 20:46:20 +02:00
*
2019-09-18 21:32:24 +02:00
* Parameters :
2019-12-27 17:43:29 +01:00
* * `boolean` ** pinned ** - Optional : Whether to pin or unpin the dialog
2019-09-18 21:32:24 +02:00
* * `InputDialogPeer` ** peer ** - The dialog to pin
*
2019-09-18 20:46:20 +02:00
* @ param array $params Parameters
2019-06-05 15:38:32 +02:00
*
* @ return bool
*/
2019-09-18 20:46:20 +02:00
public function toggleDialogPin ( $params );
2019-06-05 15:38:32 +02:00
/**
2019-09-18 21:32:24 +02:00
* Reorder pinned dialogs .
2019-09-18 20:46:20 +02:00
*
2019-09-18 21:32:24 +02:00
* Parameters :
2019-12-27 17:43:29 +01:00
* * `boolean` ** force ** - Optional : If set , dialogs pinned server - side but not present in the `order` field will be unpinned .
2020-06-16 17:52:55 +02:00
* * `int` ** folder_id ** - [ Peer folder ID , for more info click here ]( https :// core . telegram . org / api / folders #peer-folders)
* * `[InputDialogPeer]` ** order ** - New dialog order
2019-09-18 21:32:24 +02:00
*
2019-09-18 20:46:20 +02:00
* @ param array $params Parameters
2019-06-05 15:38:32 +02:00
*
* @ return bool
*/
2019-09-18 20:46:20 +02:00
public function reorderPinnedDialogs ( $params );
2019-06-05 15:38:32 +02:00
/**
2019-09-18 21:32:24 +02:00
* Get pinned dialogs .
2019-06-23 13:08:44 +02:00
*
2019-09-18 21:32:24 +02:00
* Parameters :
2020-06-16 17:52:55 +02:00
* * `int` ** folder_id ** - [ Peer folder ID , for more info click here ]( https :// core . telegram . org / api / folders #peer-folders)
2019-09-18 21:32:24 +02:00
*
2019-09-18 20:46:20 +02:00
* @ param array $params Parameters
*
* @ return messages . PeerDialogs
2019-06-05 15:38:32 +02:00
*/
2019-09-18 20:46:20 +02:00
public function getPinnedDialogs ( $params );
2019-06-05 15:38:32 +02:00
/**
2019-12-28 16:45:00 +01:00
* If you sent an invoice requesting a shipping address and the parameter is\_flexible was specified , the bot will receive an [ updateBotShippingQuery ]( https :// docs . madelineproto . xyz / API_docs / constructors / updateBotShippingQuery . html ) update . Use this method to reply to shipping queries .
2019-09-18 20:46:20 +02:00
*
2019-09-18 21:32:24 +02:00
* Parameters :
2019-12-27 17:43:29 +01:00
* * `long` ** query_id ** - Unique identifier for the query to be answered
* * `string` ** error ** - Optional : Error message in human readable form that explains why it is impossible to complete the order ( e . g . " Sorry, delivery to your desired address is unavailable'). Telegram will display this message to the user.
2020-06-16 17:52:55 +02:00
* * `[ShippingOption]` ** shipping_options ** - Optional : A vector of available shipping options .
2019-09-18 21:32:24 +02:00
*
2019-09-18 20:46:20 +02:00
* @ param array $params Parameters
2019-06-05 15:38:32 +02:00
*
* @ return bool
*/
2019-09-18 20:46:20 +02:00
public function setBotShippingResults ( $params );
2019-06-05 15:38:32 +02:00
/**
2019-12-28 16:45:00 +01:00
* Once the user has confirmed their payment and shipping details , the bot receives an [ updateBotPrecheckoutQuery ]( https :// docs . madelineproto . xyz / API_docs / constructors / updateBotPrecheckoutQuery . html ) update .
* Use this method to respond to such pre - checkout queries .
* ** Note **: Telegram must receive an answer within 10 seconds after the pre - checkout query was sent .
2019-09-18 20:46:20 +02:00
*
2019-09-18 21:32:24 +02:00
* Parameters :
2019-12-27 17:43:29 +01:00
* * `boolean` ** success ** - Optional : Set this flag if everything is alright ( goods are available , etc . ) and the bot is ready to proceed with the order , otherwise do not set it , and set the `error` field , instead
* * `long` ** query_id ** - Unique identifier for the query to be answered
* * `string` ** error ** - Optional : Required if the `success` isn ' t set . Error message in human readable form that explains the reason for failure to proceed with the checkout ( e . g . " Sorry, somebody just bought the last of our amazing black T-shirts while you were busy filling out your payment details. Please choose a different color or garment! " ) . Telegram will display this message to the user .
2019-09-18 21:32:24 +02:00
*
2019-09-18 20:46:20 +02:00
* @ param array $params Parameters
2019-06-05 15:38:32 +02:00
*
* @ return bool
*/
2019-09-18 20:46:20 +02:00
public function setBotPrecheckoutResults ( $params );
2019-06-05 15:38:32 +02:00
/**
2019-12-27 17:43:29 +01:00
* Upload a file and associate it to a chat ( without actually sending it to the chat ) .
2019-09-18 20:46:20 +02:00
*
2019-09-18 21:32:24 +02:00
* Parameters :
2019-12-28 16:45:00 +01:00
* * `InputPeer` ** peer ** - The chat , can be an [ inputPeerEmpty ]( https :// docs . madelineproto . xyz / API_docs / constructors / inputPeerEmpty . html ) for bots
2019-12-27 17:43:29 +01:00
* * `InputMedia` ** media ** - File uploaded in chunks as described in [ files » ]( https :// core . telegram . org / api / files )
2019-09-18 21:32:24 +02:00
*
2019-09-18 20:46:20 +02:00
* @ param array $params Parameters
2019-06-05 15:38:32 +02:00
*
* @ return MessageMedia
*/
2019-09-18 20:46:20 +02:00
public function uploadMedia ( $params );
2019-06-05 15:38:32 +02:00
/**
2019-12-27 17:43:29 +01:00
* Notify the other user in a private chat that a screenshot of the chat was taken .
2019-09-18 20:46:20 +02:00
*
2019-09-18 21:32:24 +02:00
* Parameters :
2019-12-27 17:43:29 +01:00
* * `InputPeer` ** peer ** - Other user
* * `int` ** reply_to_msg_id ** - ID of message that was screenshotted , can be 0
2019-09-18 21:32:24 +02:00
*
2019-09-18 20:46:20 +02:00
* @ param array $params Parameters
2019-06-05 15:38:32 +02:00
*
* @ return Updates
*/
2019-09-18 20:46:20 +02:00
public function sendScreenshotNotification ( $params );
2019-06-05 15:38:32 +02:00
/**
2019-12-27 17:43:29 +01:00
* Get faved stickers .
2019-06-05 15:38:32 +02:00
*
2019-09-18 21:32:24 +02:00
* Parameters :
2020-06-16 17:52:55 +02:00
* * `[int]` ** hash ** - Optional : [ Hash for pagination , for more info click here ]( https :// core . telegram . org / api / offsets #hash-generation)
2019-09-18 21:32:24 +02:00
*
2019-09-18 20:46:20 +02:00
* @ param array $params Parameters
*
* @ return messages . FavedStickers
2019-06-05 15:38:32 +02:00
*/
2019-09-18 20:46:20 +02:00
public function getFavedStickers ( $params );
2019-06-05 15:38:32 +02:00
/**
2019-12-27 17:43:29 +01:00
* Mark a sticker as favorite .
2019-09-18 20:46:20 +02:00
*
2019-09-18 21:32:24 +02:00
* Parameters :
2019-12-27 17:43:29 +01:00
* * `InputDocument` ** id ** - Sticker to mark as favorite
* * `Bool` ** unfave ** - Unfavorite
2019-09-18 21:32:24 +02:00
*
2019-09-18 20:46:20 +02:00
* @ param array $params Parameters
2019-06-05 15:38:32 +02:00
*
* @ return bool
*/
2019-09-18 20:46:20 +02:00
public function faveSticker ( $params );
2019-06-05 15:38:32 +02:00
/**
2019-12-27 17:43:29 +01:00
* Get unread messages where we were mentioned .
2019-06-05 15:38:32 +02:00
*
2019-09-18 21:32:24 +02:00
* Parameters :
2019-12-27 17:43:29 +01:00
* * `InputPeer` ** peer ** - Peer where to look for mentions
* * `int` ** offset_id ** - [ Offsets for pagination , for more info click here ]( https :// core . telegram . org / api / offsets )
* * `int` ** add_offset ** - [ Offsets for pagination , for more info click here ]( https :// core . telegram . org / api / offsets )
* * `int` ** limit ** - Maximum number of results to return , [ see pagination ]( https :// core . telegram . org / api / offsets )
* * `int` ** max_id ** - Maximum message ID to return , [ see pagination ]( https :// core . telegram . org / api / offsets )
* * `int` ** min_id ** - Minimum message ID to return , [ see pagination ]( https :// core . telegram . org / api / offsets )
2019-09-18 21:32:24 +02:00
*
2019-09-18 20:46:20 +02:00
* @ param array $params Parameters
*
* @ return messages . Messages
2019-06-05 15:38:32 +02:00
*/
2019-09-18 20:46:20 +02:00
public function getUnreadMentions ( $params );
2019-06-05 15:38:32 +02:00
/**
2019-09-18 21:32:24 +02:00
* Mark mentions as read .
2019-09-18 20:46:20 +02:00
*
2019-09-18 21:32:24 +02:00
* Parameters :
2019-12-27 17:43:29 +01:00
* * `InputPeer` ** peer ** - Dialog
2019-09-18 21:32:24 +02:00
*
2019-09-18 20:46:20 +02:00
* @ param array $params Parameters
2019-06-05 15:38:32 +02:00
*
2019-09-18 20:46:20 +02:00
* @ return messages . AffectedHistory
2019-06-05 15:38:32 +02:00
*/
2019-09-18 20:46:20 +02:00
public function readMentions ( $params );
2019-06-05 15:38:32 +02:00
/**
2019-12-27 17:43:29 +01:00
* Get live location history of a certain user .
2019-09-18 20:46:20 +02:00
*
2019-09-18 21:32:24 +02:00
* Parameters :
2019-12-27 17:43:29 +01:00
* * `InputPeer` ** peer ** - User
* * `int` ** limit ** - Maximum number of results to return , [ see pagination ]( https :// core . telegram . org / api / offsets )
2020-06-16 17:52:55 +02:00
* * `[int]` ** hash ** - Optional : [ Hash for pagination , for more info click here ]( https :// core . telegram . org / api / offsets #hash-generation)
2019-09-18 21:32:24 +02:00
*
2019-09-18 20:46:20 +02:00
* @ param array $params Parameters
2019-06-05 15:38:32 +02:00
*
2019-09-18 20:46:20 +02:00
* @ return messages . Messages
2019-06-05 15:38:32 +02:00
*/
2019-09-18 20:46:20 +02:00
public function getRecentLocations ( $params );
2019-06-05 15:38:32 +02:00
/**
2019-12-27 17:43:29 +01:00
* Send an album of media .
2019-09-18 20:46:20 +02:00
*
2019-09-18 21:32:24 +02:00
* Parameters :
2019-12-27 17:43:29 +01:00
* * `boolean` ** silent ** - Optional : Whether to send the album silently ( no notification triggered )
* * `boolean` ** background ** - Optional : Send in background ?
* * `boolean` ** clear_draft ** - Optional : Whether to clear [ drafts ]( https :// core . telegram . org / api / drafts )
* * `InputPeer` ** peer ** - The destination chat
* * `int` ** reply_to_msg_id ** - Optional : The message to reply to
2020-06-16 17:52:55 +02:00
* * `[InputSingleMedia]` ** multi_media ** - The medias to send
2019-12-27 17:43:29 +01:00
* * `int` ** schedule_date ** - Optional : Scheduled message date for scheduled messages
2019-09-18 21:32:24 +02:00
*
2019-09-18 20:46:20 +02:00
* @ param array $params Parameters
2019-06-05 15:38:32 +02:00
*
* @ return Updates
*/
2019-09-18 20:46:20 +02:00
public function sendMultiMedia ( $params );
2019-06-05 15:38:32 +02:00
/**
2019-12-27 17:43:29 +01:00
* Upload encrypted file and associate it to a secret chat .
2019-09-18 20:46:20 +02:00
*
2019-09-18 21:32:24 +02:00
* Parameters :
2019-12-27 17:43:29 +01:00
* * `InputEncryptedChat` ** peer ** - The secret chat to associate the file to
2019-09-18 21:32:24 +02:00
* * `InputEncryptedFile` ** file ** - The file
*
2019-09-18 20:46:20 +02:00
* @ param array $params Parameters
2019-06-05 15:38:32 +02:00
*
* @ return EncryptedFile
*/
2019-09-18 20:46:20 +02:00
public function uploadEncryptedFile ( $params );
2019-06-05 15:38:32 +02:00
/**
2019-12-27 17:43:29 +01:00
* Search for stickersets .
2019-09-18 20:46:20 +02:00
*
2019-09-18 21:32:24 +02:00
* Parameters :
2019-12-27 17:43:29 +01:00
* * `boolean` ** exclude_featured ** - Optional : Exclude featured stickersets from results
* * `string` ** q ** - Query string
2020-06-16 17:52:55 +02:00
* * `[int]` ** hash ** - Optional : [ Hash for pagination , for more info click here ]( https :// core . telegram . org / api / offsets #hash-generation)
2019-09-18 21:32:24 +02:00
*
2019-09-18 20:46:20 +02:00
* @ param array $params Parameters
2019-06-05 15:38:32 +02:00
*
2019-09-18 20:46:20 +02:00
* @ return messages . FoundStickerSets
2019-06-05 15:38:32 +02:00
*/
2019-09-18 20:46:20 +02:00
public function searchStickerSets ( $params );
2019-06-05 15:38:32 +02:00
/**
2019-12-27 17:43:29 +01:00
* Get message ranges for saving the user ' s chat history .
2019-09-18 20:46:20 +02:00
*
2019-12-14 16:47:04 +01:00
* @ return of MessageRange []
2019-06-05 15:38:32 +02:00
*/
public function getSplitRanges ();
/**
2019-12-27 17:43:29 +01:00
* Manually mark dialog as unread .
2019-09-18 20:46:20 +02:00
*
2019-09-18 21:32:24 +02:00
* Parameters :
2019-12-27 17:43:29 +01:00
* * `boolean` ** unread ** - Optional : Mark as unread / read
* * `InputDialogPeer` ** peer ** - Dialog
2019-09-18 21:32:24 +02:00
*
2019-09-18 20:46:20 +02:00
* @ param array $params Parameters
2019-06-05 15:38:32 +02:00
*
* @ return bool
*/
2019-09-18 20:46:20 +02:00
public function markDialogUnread ( $params );
2019-06-05 15:38:32 +02:00
/**
2019-12-27 17:43:29 +01:00
* Get dialogs manually marked as unread .
2019-09-18 20:46:20 +02:00
*
2019-12-14 16:47:04 +01:00
* @ return of DialogPeer []
2019-06-05 15:38:32 +02:00
*/
public function getDialogUnreadMarks ();
/**
2019-12-27 17:43:29 +01:00
* Clear all [ drafts ]( https :// core . telegram . org / api / drafts ) .
2019-09-18 20:46:20 +02:00
*
2019-06-05 15:38:32 +02:00
* @ return bool
*/
public function clearAllDrafts ();
/**
2019-12-27 17:43:29 +01:00
* Pin a message .
2019-09-18 20:46:20 +02:00
*
2019-09-18 21:32:24 +02:00
* Parameters :
2019-12-27 17:43:29 +01:00
* * `boolean` ** silent ** - Optional : Pin the message silently , without triggering a notification
* * `InputPeer` ** peer ** - The peer where to pin the message
* * `int` ** id ** - The message to pin , can be 0 to unpin any currently pinned messages
2019-09-18 21:32:24 +02:00
*
2019-09-18 20:46:20 +02:00
* @ param array $params Parameters
2019-06-05 15:38:32 +02:00
*
* @ return Updates
*/
2019-09-18 20:46:20 +02:00
public function updatePinnedMessage ( $params );
2019-06-05 15:38:32 +02:00
/**
2019-12-28 16:45:00 +01:00
* Vote in a [ poll ]( https :// docs . madelineproto . xyz / API_docs / constructors / poll . html ) .
2019-09-18 20:46:20 +02:00
*
2019-09-18 21:32:24 +02:00
* Parameters :
2019-12-27 17:43:29 +01:00
* * `InputPeer` ** peer ** - The chat where the poll was sent
* * `int` ** msg_id ** - The message ID of the poll
2020-06-16 17:52:55 +02:00
* * `[bytes]` ** options ** - The options that were chosen
2019-09-18 21:32:24 +02:00
*
2019-09-18 20:46:20 +02:00
* @ param array $params Parameters
2019-06-05 15:38:32 +02:00
*
* @ return Updates
*/
2019-09-18 20:46:20 +02:00
public function sendVote ( $params );
2019-06-05 15:38:32 +02:00
/**
2019-09-18 21:32:24 +02:00
* Get poll results .
2019-09-18 20:46:20 +02:00
*
2019-09-18 21:32:24 +02:00
* Parameters :
2019-12-27 17:43:29 +01:00
* * `InputPeer` ** peer ** - Peer where the poll was found
* * `int` ** msg_id ** - Message ID of poll message
2019-09-18 21:32:24 +02:00
*
2019-09-18 20:46:20 +02:00
* @ param array $params Parameters
2019-06-05 15:38:32 +02:00
*
* @ return Updates
*/
2019-09-18 20:46:20 +02:00
public function getPollResults ( $params );
2019-06-05 15:38:32 +02:00
/**
2019-12-27 17:43:29 +01:00
* Get count of online users in a chat .
2019-09-18 20:46:20 +02:00
*
2019-09-18 21:32:24 +02:00
* Parameters :
2019-12-27 17:43:29 +01:00
* * `InputPeer` ** peer ** - The chat
2019-09-18 21:32:24 +02:00
*
2019-09-18 20:46:20 +02:00
* @ param array $params Parameters
2019-06-05 15:38:32 +02:00
*
* @ return ChatOnlines
*/
2019-09-18 20:46:20 +02:00
public function getOnlines ( $params );
2019-06-05 15:38:32 +02:00
/**
2019-12-27 17:43:29 +01:00
* Returns URL with the chat statistics . Currently this method can be used only for channels .
2019-09-18 20:46:20 +02:00
*
2019-09-18 21:32:24 +02:00
* Parameters :
2019-12-27 17:43:29 +01:00
* * `boolean` ** dark ** - Optional : Pass true if a URL with the dark theme must be returned
* * `InputPeer` ** peer ** - Chat identifier
* * `string` ** params ** - Parameters from `tg://statsrefresh?params=******` link
2019-09-18 21:32:24 +02:00
*
2019-09-18 20:46:20 +02:00
* @ param array $params Parameters
2019-06-05 15:38:32 +02:00
*
* @ return StatsURL
*/
2019-09-18 20:46:20 +02:00
public function getStatsURL ( $params );
2019-06-05 15:38:32 +02:00
/**
2019-12-27 17:43:29 +01:00
* Edit the description of a [ group / supergroup / channel ]( https :// core . telegram . org / api / channel ) .
2019-09-18 20:46:20 +02:00
*
2019-09-18 21:32:24 +02:00
* Parameters :
2019-12-27 17:43:29 +01:00
* * `InputPeer` ** peer ** - The [ group / supergroup / channel ]( https :// core . telegram . org / api / channel ) .
* * `string` ** about ** - The new description
2019-09-18 21:32:24 +02:00
*
2019-09-18 20:46:20 +02:00
* @ param array $params Parameters
2019-06-05 15:38:32 +02:00
*
* @ return bool
*/
2019-09-18 20:46:20 +02:00
public function editChatAbout ( $params );
2019-06-05 15:38:32 +02:00
/**
2019-12-27 17:43:29 +01:00
* Edit the default banned rights of a [ channel / supergroup / group ]( https :// core . telegram . org / api / channel ) .
2019-09-18 20:46:20 +02:00
*
2019-09-18 21:32:24 +02:00
* Parameters :
2019-12-27 17:43:29 +01:00
* * `InputPeer` ** peer ** - The peer
* * `ChatBannedRights` ** banned_rights ** - The new global rights
2019-09-18 21:32:24 +02:00
*
2019-09-18 20:46:20 +02:00
* @ param array $params Parameters
2019-06-05 15:38:32 +02:00
*
* @ return Updates
*/
2019-09-18 20:46:20 +02:00
public function editChatDefaultBannedRights ( $params );
2019-06-05 15:38:32 +02:00
/**
2019-12-27 17:43:29 +01:00
* Get localized emoji keywords .
2019-09-18 20:46:20 +02:00
*
2019-09-18 21:32:24 +02:00
* Parameters :
2019-09-18 20:46:20 +02:00
* * `string` ** lang_code ** - Language code
2019-09-18 21:32:24 +02:00
*
2019-09-18 20:46:20 +02:00
* @ param array $params Parameters
2019-06-05 15:38:32 +02:00
*
* @ return EmojiKeywordsDifference
*/
2019-09-18 20:46:20 +02:00
public function getEmojiKeywords ( $params );
2019-06-05 15:38:32 +02:00
/**
2019-12-27 17:43:29 +01:00
* Get changed emoji keywords .
2019-09-18 20:46:20 +02:00
*
2019-09-18 21:32:24 +02:00
* Parameters :
2019-09-18 20:46:20 +02:00
* * `string` ** lang_code ** - Language code
2019-12-27 17:43:29 +01:00
* * `int` ** from_version ** - Previous emoji keyword localization version
2019-09-18 21:32:24 +02:00
*
2019-09-18 20:46:20 +02:00
* @ param array $params Parameters
2019-06-05 15:38:32 +02:00
*
* @ return EmojiKeywordsDifference
*/
2019-09-18 20:46:20 +02:00
public function getEmojiKeywordsDifference ( $params );
2019-06-05 15:38:32 +02:00
2019-06-23 13:08:44 +02:00
/**
2019-12-27 17:43:29 +01:00
* Get info about an emoji keyword localization .
2019-06-23 13:08:44 +02:00
*
2019-09-18 21:32:24 +02:00
* Parameters :
2019-09-18 20:46:20 +02:00
* * `[string]` ** lang_codes ** - Language codes
2019-09-18 21:32:24 +02:00
*
2019-09-18 20:46:20 +02:00
* @ param array $params Parameters
*
2019-12-14 16:47:04 +01:00
* @ return of EmojiLanguage []
2019-06-23 13:08:44 +02:00
*/
2019-09-18 20:46:20 +02:00
public function getEmojiKeywordsLanguages ( $params );
2019-06-23 13:08:44 +02:00
2019-06-05 15:38:32 +02:00
/**
2019-12-27 17:43:29 +01:00
* Returns an HTTP URL which can be used to automatically log in into translation platform and suggest new emoji replacements . The URL will be valid for 30 seconds after generation .
2019-09-18 20:46:20 +02:00
*
2019-09-18 21:32:24 +02:00
* Parameters :
2019-12-27 17:43:29 +01:00
* * `string` ** lang_code ** - Language code for which the emoji replacements will be suggested
2019-09-18 21:32:24 +02:00
*
2019-09-18 20:46:20 +02:00
* @ param array $params Parameters
2019-06-05 15:38:32 +02:00
*
* @ return EmojiURL
*/
2019-09-18 20:46:20 +02:00
public function getEmojiURL ( $params );
2019-06-23 13:08:44 +02:00
/**
2019-12-28 16:45:00 +01:00
* Get the number of results that would be found by a [ messages . search ]( https :// docs . madelineproto . xyz / API_docs / methods / messages . search . html ) call with the same parameters .
2019-06-23 13:08:44 +02:00
*
2019-09-18 21:32:24 +02:00
* Parameters :
2019-12-27 17:43:29 +01:00
* * `InputPeer` ** peer ** - Peer where to search
2020-06-16 17:52:55 +02:00
* * `[MessagesFilter]` ** filters ** - Search filters
2019-09-18 21:32:24 +02:00
*
2019-09-18 20:46:20 +02:00
* @ param array $params Parameters
*
2019-12-14 16:47:04 +01:00
* @ return of messages . SearchCounter []
2019-06-23 13:08:44 +02:00
*/
2019-09-18 20:46:20 +02:00
public function getSearchCounters ( $params );
2019-06-23 13:08:44 +02:00
/**
2019-12-27 17:43:29 +01:00
* Get more info about a Seamless Telegram Login authorization request , for more info [ click here » ]( https :// core . telegram . org / api / url - authorization ) .
2019-09-18 20:46:20 +02:00
*
2019-09-18 21:32:24 +02:00
* Parameters :
2019-12-27 17:43:29 +01:00
* * `InputPeer` ** peer ** - Peer where the message is located
* * `int` ** msg_id ** - The message
* * `int` ** button_id ** - The ID of the button with the authorization request
2019-09-18 21:32:24 +02:00
*
2019-09-18 20:46:20 +02:00
* @ param array $params Parameters
2019-06-23 13:08:44 +02:00
*
* @ return UrlAuthResult
*/
2019-09-18 20:46:20 +02:00
public function requestUrlAuth ( $params );
2019-06-23 13:08:44 +02:00
/**
2019-12-27 17:43:29 +01:00
* Use this to accept a Seamless Telegram Login authorization request , for more info [ click here » ]( https :// core . telegram . org / api / url - authorization ) .
2019-09-18 20:46:20 +02:00
*
2019-09-18 21:32:24 +02:00
* Parameters :
2019-12-27 17:43:29 +01:00
* * `boolean` ** write_allowed ** - Optional : Set this flag to allow the bot to send messages to you ( if requested )
* * `InputPeer` ** peer ** - The location of the message
* * `int` ** msg_id ** - Message ID of the message with the login button
* * `int` ** button_id ** - ID of the login button
2019-09-18 21:32:24 +02:00
*
2019-09-18 20:46:20 +02:00
* @ param array $params Parameters
2019-06-23 13:08:44 +02:00
*
* @ return UrlAuthResult
*/
2019-09-18 20:46:20 +02:00
public function acceptUrlAuth ( $params );
2019-06-24 15:46:38 +02:00
/**
2019-12-28 16:45:00 +01:00
* Should be called after the user hides the report spam / add as contact bar of a new chat , effectively prevents the user from executing the actions specified in the [ peer ' s settings ]( https :// docs . madelineproto . xyz / API_docs / constructors / peerSettings . html ) .
2019-09-18 20:46:20 +02:00
*
2019-09-18 21:32:24 +02:00
* Parameters :
2019-09-18 20:46:20 +02:00
* * `InputPeer` ** peer ** - Peer
2019-09-18 21:32:24 +02:00
*
2019-09-18 20:46:20 +02:00
* @ param array $params Parameters
2019-06-24 15:46:38 +02:00
*
* @ return bool
*/
2019-09-18 20:46:20 +02:00
public function hidePeerSettingsBar ( $params );
2019-09-12 19:08:48 +02:00
/**
2019-12-27 17:43:29 +01:00
* Get scheduled messages .
2019-09-18 20:46:20 +02:00
*
2019-09-18 21:32:24 +02:00
* Parameters :
* * `InputPeer` ** peer ** - Peer
2020-06-16 17:52:55 +02:00
* * `[int]` ** hash ** - Optional : [ Hash for pagination , for more info click here ]( https :// core . telegram . org / api / offsets #hash-generation)
2019-09-18 21:32:24 +02:00
*
2019-09-18 20:46:20 +02:00
* @ param array $params Parameters
2019-09-12 19:08:48 +02:00
*
2019-09-18 20:46:20 +02:00
* @ return messages . Messages
2019-09-12 19:08:48 +02:00
*/
2019-09-18 20:46:20 +02:00
public function getScheduledHistory ( $params );
2019-09-12 19:08:48 +02:00
/**
2019-09-18 21:32:24 +02:00
* Get scheduled messages .
2019-09-18 20:46:20 +02:00
*
2019-09-18 21:32:24 +02:00
* Parameters :
2019-09-18 20:46:20 +02:00
* * `InputPeer` ** peer ** - Peer
2020-06-16 17:52:55 +02:00
* * `[int]` ** id ** - IDs of scheduled messages
2019-09-18 21:32:24 +02:00
*
2019-09-18 20:46:20 +02:00
* @ param array $params Parameters
2019-09-12 19:08:48 +02:00
*
2019-09-18 20:46:20 +02:00
* @ return messages . Messages
2019-09-12 19:08:48 +02:00
*/
2019-09-18 20:46:20 +02:00
public function getScheduledMessages ( $params );
2019-09-12 19:08:48 +02:00
/**
2019-12-27 17:43:29 +01:00
* Send scheduled messages right away .
2019-09-18 20:46:20 +02:00
*
2019-09-18 21:32:24 +02:00
* Parameters :
2019-09-18 20:46:20 +02:00
* * `InputPeer` ** peer ** - Peer
2020-06-16 17:52:55 +02:00
* * `[int]` ** id ** - Scheduled message IDs
2019-09-18 21:32:24 +02:00
*
2019-09-18 20:46:20 +02:00
* @ param array $params Parameters
2019-09-12 19:08:48 +02:00
*
* @ return Updates
*/
2019-09-18 20:46:20 +02:00
public function sendScheduledMessages ( $params );
2019-09-12 19:08:48 +02:00
/**
2019-09-18 21:32:24 +02:00
* Delete scheduled messages .
2019-09-18 20:46:20 +02:00
*
2019-09-18 21:32:24 +02:00
* Parameters :
2019-09-18 20:46:20 +02:00
* * `InputPeer` ** peer ** - Peer
2020-06-16 17:52:55 +02:00
* * `[int]` ** id ** - Scheduled message IDs
2019-09-18 21:32:24 +02:00
*
2019-09-18 20:46:20 +02:00
* @ param array $params Parameters
2019-09-12 19:08:48 +02:00
*
* @ return Updates
*/
2019-09-18 20:46:20 +02:00
public function deleteScheduledMessages ( $params );
2020-03-06 13:09:52 +01:00
/**
2020-06-16 17:52:55 +02:00
* Get poll results for non - anonymous polls .
2020-03-06 13:09:52 +01:00
*
* Parameters :
2020-06-16 17:52:55 +02:00
* * `InputPeer` ** peer ** - Chat where the poll was sent
* * `int` ** id ** - Message ID
* * `bytes` ** option ** - Optional : Get only results for the specified poll `option`
* * `string` ** offset ** - Optional : Offset for results , taken from the `next_offset` field of [ messages . votesList ]( https :// docs . madelineproto . xyz / API_docs / constructors / messages . votesList . html ), initially an empty string . < br > Note : if no more results are available , the method call will return an empty `next_offset` ; thus , avoid providing the `next_offset` returned in [ messages . votesList ]( https :// docs . madelineproto . xyz / API_docs / constructors / messages . votesList . html ) if it is empty , to avoid an infinite loop .
* * `int` ** limit ** - Number of results to return
2020-03-06 13:09:52 +01:00
*
* @ param array $params Parameters
*
* @ return messages . VotesList
*/
public function getPollVotes ( $params );
/**
2020-06-16 17:52:55 +02:00
* Apply changes to multiple stickersets .
2020-03-06 13:09:52 +01:00
*
* Parameters :
2020-06-16 17:52:55 +02:00
* * `boolean` ** uninstall ** - Optional : Uninstall the specified stickersets
* * `boolean` ** archive ** - Optional : Archive the specified stickersets
* * `boolean` ** unarchive ** - Optional : Unarchive the specified stickersets
* * `[InputStickerSet]` ** stickersets ** - Stickersets to act upon
2020-03-06 13:09:52 +01:00
*
* @ param array $params Parameters
*
* @ return bool
*/
public function toggleStickerSets ( $params );
2020-04-03 14:10:46 +02:00
/**
2020-06-16 17:52:55 +02:00
* Get [ folders ]( https :// core . telegram . org / api / folders ) .
2020-04-03 14:10:46 +02:00
*
* @ return of DialogFilter []
*/
public function getDialogFilters ();
/**
2020-06-16 17:52:55 +02:00
* Get [ suggested folders ]( https :// core . telegram . org / api / folders ) .
2020-04-03 14:10:46 +02:00
*
* @ return of DialogFilterSuggested []
*/
public function getSuggestedDialogFilters ();
/**
2020-06-16 17:52:55 +02:00
* Update [ folder ]( https :// core . telegram . org / api / folders ) .
2020-04-03 14:10:46 +02:00
*
* Parameters :
2020-06-16 17:52:55 +02:00
* * `int` ** id ** - [ Folder ]( https :// core . telegram . org / api / folders ) ID
* * `DialogFilter` ** filter ** - Optional : [ Folder ]( https :// core . telegram . org / api / folders ) info
2020-04-03 14:10:46 +02:00
*
* @ param array $params Parameters
*
* @ return bool
*/
public function updateDialogFilter ( $params );
/**
2020-06-16 17:52:55 +02:00
* Reorder [ folders ]( https :// core . telegram . org / api / folders ) .
2020-04-03 14:10:46 +02:00
*
* Parameters :
2020-06-16 17:52:55 +02:00
* * `[int]` ** order ** - New [ folder ]( https :// core . telegram . org / api / folders ) order
2020-04-03 14:10:46 +02:00
*
* @ param array $params Parameters
*
* @ return bool
*/
public function updateDialogFiltersOrder ( $params );
2020-06-16 17:52:55 +02:00
/**
* Method for fetching previously featured stickers .
*
* Parameters :
* * `int` ** offset ** - Offset
* * `int` ** limit ** - Maximum number of results to return , [ see pagination ]( https :// core . telegram . org / api / offsets )
* * `[int]` ** hash ** - Optional : [ Hash for pagination , for more info click here ]( https :// core . telegram . org / api / offsets #hash-generation)
*
* @ param array $params Parameters
*
* @ return messages . FeaturedStickers
*/
public function getOldFeaturedStickers ( $params );
2020-10-01 18:02:54 +02:00
/**
*
*
* Parameters :
* * `InputPeer` ** peer ** -
* * `int` ** msg_id ** -
* * `int` ** offset_id ** -
* * `int` ** offset_date ** -
* * `int` ** add_offset ** -
* * `int` ** limit ** -
* * `int` ** max_id ** -
* * `int` ** min_id ** -
* * `[int]` ** hash ** - Optional :.
*
* @ param array $params Parameters
*
* @ return messages . Messages
*/
public function getReplies ( $params );
/**
*
*
* Parameters :
* * `InputPeer` ** peer ** -
* * `int` ** msg_id ** -.
*
* @ param array $params Parameters
*
* @ return messages . DiscussionMessage
*/
public function getDiscussionMessage ( $params );
/**
*
*
* Parameters :
* * `InputPeer` ** peer ** -
* * `int` ** msg_id ** -
* * `int` ** read_max_id ** -.
*
* @ param array $params Parameters
*
* @ return bool
*/
public function readDiscussion ( $params );
2019-06-05 15:38:32 +02:00
}
interface updates
{
/**
2020-06-16 17:52:55 +02:00
* Returns a current state of updates .
2019-09-18 20:46:20 +02:00
*
* @ return updates . State
2019-06-05 15:38:32 +02:00
*/
public function getState ();
/**
2020-06-16 17:52:55 +02:00
* Get new [ updates ]( https :// core . telegram . org / api / updates ) .
2019-06-05 15:38:32 +02:00
*
2019-09-18 21:32:24 +02:00
* Parameters :
2020-06-16 17:52:55 +02:00
* * `int` ** pts ** - PTS , see [ updates ]( https :// core . telegram . org / api / updates ) .
* * `int` ** pts_total_limit ** - Optional : For fast updating : if provided and `pts + pts_total_limit < remote pts` , [ updates . differenceTooLong ]( https :// docs . madelineproto . xyz / API_docs / constructors / updates . differenceTooLong . html ) will be returned .< br > Simply tells the server to not return the difference if it is bigger than `pts_total_limit` < br > If the remote pts is too big ( & gt ; ~ 4000000 ), this field will default to 1000000
* * `int` ** date ** - date , see [ updates ]( https :// core . telegram . org / api / updates ) .
* * `int` ** qts ** - QTS , see [ updates ]( https :// core . telegram . org / api / updates ) .
2019-09-18 21:32:24 +02:00
*
2019-09-18 20:46:20 +02:00
* @ param array $params Parameters
*
* @ return updates . Difference
2019-06-05 15:38:32 +02:00
*/
2019-09-18 20:46:20 +02:00
public function getDifference ( $params );
2019-06-05 15:38:32 +02:00
/**
2020-06-16 17:52:55 +02:00
* Returns the difference between the current state of updates of a certain channel and transmitted .
2019-09-18 20:46:20 +02:00
*
2019-09-18 21:32:24 +02:00
* Parameters :
2020-06-16 17:52:55 +02:00
* * `boolean` ** force ** - Optional : Set to true to skip some possibly unneeded updates and reduce server - side load
* * `InputChannel` ** channel ** - The channel
* * `ChannelMessagesFilter` ** filter ** - Messsage filter
* * `int` ** pts ** - Persistent timestamp ( see [ updates ]( https :// core . telegram . org / api / updates ))
* * `int` ** limit ** - How many updates to fetch , max `100000` < br > Ordinary ( non - bot ) users are supposed to pass `10-100`
2019-09-18 21:32:24 +02:00
*
2019-09-18 20:46:20 +02:00
* @ param array $params Parameters
2019-06-05 15:38:32 +02:00
*
2019-09-18 20:46:20 +02:00
* @ return updates . ChannelDifference
2019-06-05 15:38:32 +02:00
*/
2019-09-18 20:46:20 +02:00
public function getChannelDifference ( $params );
2019-06-05 15:38:32 +02:00
}
interface photos
{
/**
2019-12-27 17:43:29 +01:00
* Installs a previously uploaded photo as a profile photo .
2019-09-18 20:46:20 +02:00
*
2019-09-18 21:32:24 +02:00
* Parameters :
2019-12-27 17:43:29 +01:00
* * `InputPhoto` ** id ** - Input photo
2019-09-18 21:32:24 +02:00
*
2019-09-18 20:46:20 +02:00
* @ param array $params Parameters
2019-06-05 15:38:32 +02:00
*
2020-09-12 12:50:22 +02:00
* @ return photos . Photo
2019-06-05 15:38:32 +02:00
*/
2019-09-18 20:46:20 +02:00
public function updateProfilePhoto ( $params );
2019-06-05 15:38:32 +02:00
/**
2019-12-27 17:43:29 +01:00
* Updates current user profile photo .
2019-09-18 20:46:20 +02:00
*
2019-09-18 21:32:24 +02:00
* Parameters :
2020-09-12 12:50:22 +02:00
* * `InputFile` ** file ** - Optional : File saved in parts by means of [ upload . saveFilePart ]( https :// docs . madelineproto . xyz / API_docs / methods / upload . saveFilePart . html ) method
* * `InputFile` ** video ** - Optional :
* * `double` ** video_start_ts ** - Optional :
2019-09-18 21:32:24 +02:00
*
2019-09-18 20:46:20 +02:00
* @ param array $params Parameters
2019-06-05 15:38:32 +02:00
*
2019-09-18 20:46:20 +02:00
* @ return photos . Photo
2019-06-05 15:38:32 +02:00
*/
2019-09-18 20:46:20 +02:00
public function uploadProfilePhoto ( $params );
2019-06-05 15:38:32 +02:00
/**
2019-12-27 17:43:29 +01:00
* Deletes profile photos .
2019-09-18 20:46:20 +02:00
*
2019-09-18 21:32:24 +02:00
* Parameters :
2020-06-16 17:52:55 +02:00
* * `[InputPhoto]` ** id ** - Input photos to delete
2019-09-18 21:32:24 +02:00
*
2019-09-18 20:46:20 +02:00
* @ param array $params Parameters
2019-06-05 15:38:32 +02:00
*
2019-12-14 16:47:04 +01:00
* @ return of long []
2019-06-05 15:38:32 +02:00
*/
2019-09-18 20:46:20 +02:00
public function deletePhotos ( $params );
2019-06-05 15:38:32 +02:00
/**
2019-12-27 17:43:29 +01:00
* Returns the list of user photos .
2019-06-05 15:38:32 +02:00
*
2019-09-18 21:32:24 +02:00
* Parameters :
2019-12-27 17:43:29 +01:00
* * `InputUser` ** user_id ** - User ID
* * `int` ** offset ** - Number of list elements to be skipped
* * `long` ** max_id ** - If a positive value was transferred , the method will return only photos with IDs less than the set one
* * `int` ** limit ** - Number of list elements to be returned
2019-09-18 21:32:24 +02:00
*
2019-09-18 20:46:20 +02:00
* @ param array $params Parameters
*
* @ return photos . Photos
2019-06-05 15:38:32 +02:00
*/
2019-09-18 20:46:20 +02:00
public function getUserPhotos ( $params );
2019-06-05 15:38:32 +02:00
}
interface upload
{
/**
2020-06-16 17:52:55 +02:00
* Saves a part of file for futher sending to one of the methods .
2019-09-18 20:46:20 +02:00
*
2019-09-18 21:32:24 +02:00
* Parameters :
2020-06-16 17:52:55 +02:00
* * `long` ** file_id ** - Random file identifier created by the client
* * `int` ** file_part ** - Numerical order of a part
* * `bytes` ** bytes ** - Binary data , contend of a part
2019-09-18 21:32:24 +02:00
*
2019-09-18 20:46:20 +02:00
* @ param array $params Parameters
2019-06-05 15:38:32 +02:00
*
* @ return bool
*/
2019-09-18 20:46:20 +02:00
public function saveFilePart ( $params );
2019-06-05 15:38:32 +02:00
/**
2020-06-16 17:52:55 +02:00
* Returns content of a whole file or its part .
2019-06-05 15:38:32 +02:00
*
2019-09-18 21:32:24 +02:00
* Parameters :
2020-06-16 17:52:55 +02:00
* * `boolean` ** precise ** - Optional : Disable some checks on limit and offset values , useful for example to stream videos by keyframes
* * `boolean` ** cdn_supported ** - Optional : Whether the current client supports [ CDN downloads ]( https :// core . telegram . org / cdn )
* * `InputFileLocation` ** location ** - File location
* * `int` ** offset ** - Number of bytes to be skipped
* * `int` ** limit ** - Number of bytes to be returned
2019-09-18 21:32:24 +02:00
*
2019-09-18 20:46:20 +02:00
* @ param array $params Parameters
*
* @ return upload . File
2019-06-05 15:38:32 +02:00
*/
2019-09-18 20:46:20 +02:00
public function getFile ( $params );
2019-06-05 15:38:32 +02:00
/**
2020-06-16 17:52:55 +02:00
* Saves a part of a large file ( over 10 Mb in size ) to be later passed to one of the methods .
2019-09-18 20:46:20 +02:00
*
2019-09-18 21:32:24 +02:00
* Parameters :
2020-06-16 17:52:55 +02:00
* * `long` ** file_id ** - Random file id , created by the client
* * `int` ** file_part ** - Part sequence number
* * `int` ** file_total_parts ** - Total number of parts
* * `bytes` ** bytes ** - Binary data , part contents
2019-09-18 21:32:24 +02:00
*
2019-09-18 20:46:20 +02:00
* @ param array $params Parameters
2019-06-05 15:38:32 +02:00
*
* @ return bool
*/
2019-09-18 20:46:20 +02:00
public function saveBigFilePart ( $params );
2019-06-05 15:38:32 +02:00
/**
2019-12-27 17:43:29 +01:00
* Returns content of an HTTP file or a part , by proxying the request through telegram .
2019-09-18 20:46:20 +02:00
*
2019-09-18 21:32:24 +02:00
* Parameters :
2019-12-27 17:43:29 +01:00
* * `InputWebFileLocation` ** location ** - The file to download
* * `int` ** offset ** - Number of bytes to be skipped
* * `int` ** limit ** - Number of bytes to be returned
2019-09-18 21:32:24 +02:00
*
2019-09-18 20:46:20 +02:00
* @ param array $params Parameters
2019-06-05 15:38:32 +02:00
*
2019-09-18 20:46:20 +02:00
* @ return upload . WebFile
2019-06-05 15:38:32 +02:00
*/
2019-09-18 20:46:20 +02:00
public function getWebFile ( $params );
2019-06-05 15:38:32 +02:00
/**
2020-06-16 17:52:55 +02:00
* Download a [ CDN ]( https :// core . telegram . org / cdn ) file .
2019-06-05 15:38:32 +02:00
*
2019-09-18 21:32:24 +02:00
* Parameters :
2020-06-16 17:52:55 +02:00
* * `bytes` ** file_token ** - File token
* * `int` ** offset ** - Offset of chunk to download
* * `int` ** limit ** - Length of chunk to download
2019-09-18 21:32:24 +02:00
*
2019-09-18 20:46:20 +02:00
* @ param array $params Parameters
*
* @ return upload . CdnFile
2019-06-05 15:38:32 +02:00
*/
2019-09-18 20:46:20 +02:00
public function getCdnFile ( $params );
2019-06-05 15:38:32 +02:00
/**
2020-06-16 17:52:55 +02:00
* Request a reupload of a certain file to a [ CDN DC ]( https :// core . telegram . org / cdn ) .
2019-09-18 20:46:20 +02:00
*
2019-09-18 21:32:24 +02:00
* Parameters :
2020-06-16 17:52:55 +02:00
* * `bytes` ** file_token ** - File token
* * `bytes` ** request_token ** - Request token
2019-09-18 21:32:24 +02:00
*
2019-09-18 20:46:20 +02:00
* @ param array $params Parameters
2019-06-05 15:38:32 +02:00
*
2019-12-14 16:47:04 +01:00
* @ return of FileHash []
2019-06-05 15:38:32 +02:00
*/
2019-09-18 20:46:20 +02:00
public function reuploadCdnFile ( $params );
2019-06-05 15:38:32 +02:00
/**
2020-06-16 17:52:55 +02:00
* Get SHA256 hashes for verifying downloaded [ CDN ]( https :// core . telegram . org / cdn ) files .
2019-06-05 15:38:32 +02:00
*
2019-09-18 21:32:24 +02:00
* Parameters :
2020-06-16 17:52:55 +02:00
* * `bytes` ** file_token ** - File
* * `int` ** offset ** - Offset from which to start getting hashes
2019-09-18 21:32:24 +02:00
*
2019-09-18 20:46:20 +02:00
* @ param array $params Parameters
*
2019-12-14 16:47:04 +01:00
* @ return of FileHash []
2019-06-05 15:38:32 +02:00
*/
2019-09-18 20:46:20 +02:00
public function getCdnFileHashes ( $params );
2019-06-05 15:38:32 +02:00
/**
2020-06-16 17:52:55 +02:00
* Get SHA256 hashes for verifying downloaded files .
2019-09-18 20:46:20 +02:00
*
2019-09-18 21:32:24 +02:00
* Parameters :
2020-06-16 17:52:55 +02:00
* * `InputFileLocation` ** location ** - File
* * `int` ** offset ** - Offset from which to get file hashes
2019-09-18 21:32:24 +02:00
*
2019-09-18 20:46:20 +02:00
* @ param array $params Parameters
2019-06-05 15:38:32 +02:00
*
2019-12-14 16:47:04 +01:00
* @ return of FileHash []
2019-06-05 15:38:32 +02:00
*/
2019-09-18 20:46:20 +02:00
public function getFileHashes ( $params );
2019-06-05 15:38:32 +02:00
}
interface help
{
/**
2020-06-16 17:52:55 +02:00
* Returns current configuration , including data center configuration .
2019-09-18 20:46:20 +02:00
*
2019-06-05 15:38:32 +02:00
* @ return Config
*/
public function getConfig ();
/**
2019-12-27 17:43:29 +01:00
* Returns info on data centre nearest to the user .
2019-09-18 20:46:20 +02:00
*
2019-06-05 15:38:32 +02:00
* @ return NearestDc
*/
public function getNearestDc ();
/**
2019-12-27 17:43:29 +01:00
* Returns information on update availability for the current application .
2019-09-18 20:46:20 +02:00
*
2019-09-18 21:32:24 +02:00
* Parameters :
2019-09-18 20:46:20 +02:00
* * `string` ** source ** - Source
2019-09-18 21:32:24 +02:00
*
2019-09-18 20:46:20 +02:00
* @ param array $params Parameters
2019-06-05 15:38:32 +02:00
*
2019-09-18 20:46:20 +02:00
* @ return help . AppUpdate
2019-06-05 15:38:32 +02:00
*/
2019-09-18 20:46:20 +02:00
public function getAppUpdate ( $params );
2019-06-05 15:38:32 +02:00
/**
2020-06-16 17:52:55 +02:00
* Returns localized text of a text message with an invitation .
2019-09-18 20:46:20 +02:00
*
* @ return help . InviteText
2019-06-05 15:38:32 +02:00
*/
public function getInviteText ();
/**
2019-12-27 17:43:29 +01:00
* Returns the support user for the 'ask a question' feature .
2019-09-18 20:46:20 +02:00
*
* @ return help . Support
2019-06-05 15:38:32 +02:00
*/
public function getSupport ();
/**
2019-12-27 17:43:29 +01:00
* Get changelog of current app .
2020-06-16 17:52:55 +02:00
* Typically , an [ updates ]( https :// docs . madelineproto . xyz / API_docs / constructors / updates . html ) constructor will be returned , containing one or more [ updateServiceNotification ]( https :// docs . madelineproto . xyz / API_docs / constructors / updateServiceNotification . html ) updates with app - specific changelogs .
2019-09-18 20:46:20 +02:00
*
2019-09-18 21:32:24 +02:00
* Parameters :
2019-09-18 20:46:20 +02:00
* * `string` ** prev_app_version ** - Previous app version
2019-09-18 21:32:24 +02:00
*
2019-09-18 20:46:20 +02:00
* @ param array $params Parameters
2019-06-05 15:38:32 +02:00
*
* @ return Updates
*/
2019-09-18 20:46:20 +02:00
public function getAppChangelog ( $params );
2019-06-05 15:38:32 +02:00
/**
2019-12-27 17:43:29 +01:00
* Informs the server about the number of pending bot updates if they haven ' t been processed for a long time ; for bots only .
2019-09-18 20:46:20 +02:00
*
2019-09-18 21:32:24 +02:00
* Parameters :
2019-12-27 17:43:29 +01:00
* * `int` ** pending_updates_count ** - Number of pending updates
* * `string` ** message ** - Error message , if present
2019-09-18 21:32:24 +02:00
*
2019-09-18 20:46:20 +02:00
* @ param array $params Parameters
2019-06-05 15:38:32 +02:00
*
* @ return bool
*/
2019-09-18 20:46:20 +02:00
public function setBotUpdatesStatus ( $params );
2019-06-05 15:38:32 +02:00
/**
2019-12-27 17:43:29 +01:00
* Get configuration for [ CDN ]( https :// core . telegram . org / cdn ) file downloads .
2019-09-18 20:46:20 +02:00
*
2019-06-05 15:38:32 +02:00
* @ return CdnConfig
*/
public function getCdnConfig ();
/**
2019-12-27 17:43:29 +01:00
* Get recently used `t.me` links .
2019-06-05 15:38:32 +02:00
*
2019-09-18 21:32:24 +02:00
* Parameters :
2019-12-27 17:43:29 +01:00
* * `string` ** referer ** - Referer
2019-09-18 21:32:24 +02:00
*
2019-09-18 20:46:20 +02:00
* @ param array $params Parameters
*
* @ return help . RecentMeUrls
2019-06-05 15:38:32 +02:00
*/
2019-09-18 20:46:20 +02:00
public function getRecentMeUrls ( $params );
2019-06-05 15:38:32 +02:00
/**
2019-12-27 17:43:29 +01:00
* Look for updates of telegram ' s terms of service .
2019-09-18 20:46:20 +02:00
*
* @ return help . TermsOfServiceUpdate
2019-06-05 15:38:32 +02:00
*/
public function getTermsOfServiceUpdate ();
/**
2019-12-27 17:43:29 +01:00
* Accept the new terms of service .
2019-09-18 20:46:20 +02:00
*
2019-09-18 21:32:24 +02:00
* Parameters :
2019-12-27 17:43:29 +01:00
* * `DataJSON` ** id ** - ID of terms of service
2019-09-18 21:32:24 +02:00
*
2019-09-18 20:46:20 +02:00
* @ param array $params Parameters
2019-06-05 15:38:32 +02:00
*
* @ return bool
*/
2019-09-18 20:46:20 +02:00
public function acceptTermsOfService ( $params );
2019-06-05 15:38:32 +02:00
/**
2019-12-27 17:43:29 +01:00
* Get info about a `t.me` link .
2019-09-18 20:46:20 +02:00
*
2019-09-18 21:32:24 +02:00
* Parameters :
2019-12-27 17:43:29 +01:00
* * `string` ** path ** - Path in `t.me/path`
2019-09-18 21:32:24 +02:00
*
2019-09-18 20:46:20 +02:00
* @ param array $params Parameters
2019-06-05 15:38:32 +02:00
*
2019-09-18 20:46:20 +02:00
* @ return help . DeepLinkInfo
2019-06-05 15:38:32 +02:00
*/
2019-09-18 20:46:20 +02:00
public function getDeepLinkInfo ( $params );
2019-06-05 15:38:32 +02:00
/**
2020-06-16 17:52:55 +02:00
* Get app - specific configuration , see [ client configuration ]( https :// core . telegram . org / api / config #client-configuration) for more info on the result.
2019-09-18 20:46:20 +02:00
*
2019-06-05 15:38:32 +02:00
* @ return JSONValue
*/
public function getAppConfig ();
/**
2019-12-27 17:43:29 +01:00
* Saves logs of application on the server .
2019-09-18 20:46:20 +02:00
*
2019-09-18 21:32:24 +02:00
* Parameters :
2020-06-16 17:52:55 +02:00
* * `[InputAppEvent]` ** events ** - List of input events
2019-09-18 21:32:24 +02:00
*
2019-09-18 20:46:20 +02:00
* @ param array $params Parameters
2019-06-05 15:38:32 +02:00
*
* @ return bool
*/
2019-09-18 20:46:20 +02:00
public function saveAppLog ( $params );
2019-06-05 15:38:32 +02:00
/**
2019-12-27 17:43:29 +01:00
* Get [ passport ]( https :// core . telegram . org / passport ) configuration .
2019-09-18 20:46:20 +02:00
*
2019-09-18 21:32:24 +02:00
* Parameters :
2020-06-16 17:52:55 +02:00
* * `[int]` ** hash ** - Optional : [ Hash for pagination , for more info click here ]( https :// core . telegram . org / api / offsets #hash-generation)
2019-09-18 21:32:24 +02:00
*
2019-09-18 20:46:20 +02:00
* @ param array $params Parameters
2019-06-05 15:38:32 +02:00
*
2019-09-18 20:46:20 +02:00
* @ return help . PassportConfig
2019-06-05 15:38:32 +02:00
*/
2019-09-18 20:46:20 +02:00
public function getPassportConfig ( $params );
2019-06-05 15:38:32 +02:00
/**
2019-12-27 17:43:29 +01:00
* Get localized name of the telegram support user .
2019-09-18 20:46:20 +02:00
*
* @ return help . SupportName
2019-06-05 15:38:32 +02:00
*/
public function getSupportName ();
/**
2019-12-27 17:43:29 +01:00
* Internal use .
2019-09-18 20:46:20 +02:00
*
2019-09-18 21:32:24 +02:00
* Parameters :
2019-09-18 20:46:20 +02:00
* * `InputUser` ** user_id ** - User ID
2019-09-18 21:32:24 +02:00
*
2019-09-18 20:46:20 +02:00
* @ param array $params Parameters
2019-06-05 15:38:32 +02:00
*
2019-09-18 20:46:20 +02:00
* @ return help . UserInfo
2019-06-05 15:38:32 +02:00
*/
2019-09-18 20:46:20 +02:00
public function getUserInfo ( $params );
2019-06-05 15:38:32 +02:00
/**
2019-12-27 17:43:29 +01:00
* Internal use .
2019-06-05 15:38:32 +02:00
*
2019-09-18 21:32:24 +02:00
* Parameters :
2019-12-27 17:43:29 +01:00
* * `InputUser` ** user_id ** - User
2019-09-18 21:32:24 +02:00
* * `string` ** message ** - Message
2020-06-16 17:52:55 +02:00
* * `[MessageEntity]` ** entities ** - [ Message entities for styled text ]( https :// core . telegram . org / api / entities )
2019-09-18 21:32:24 +02:00
*
2019-09-18 20:46:20 +02:00
* @ param array $params Parameters
*
* @ return help . UserInfo
2019-06-05 15:38:32 +02:00
*/
2019-09-18 20:46:20 +02:00
public function editUserInfo ( $params );
2020-06-16 17:52:55 +02:00
/**
* Get MTProxy / Public Service Announcement information .
*
* @ return help . PromoData
*/
public function getPromoData ();
/**
* Hide MTProxy / Public Service Announcement information .
*
* Parameters :
* * `InputPeer` ** peer ** - Peer to hide
*
* @ param array $params Parameters
*
* @ return bool
*/
public function hidePromoData ( $params );
2020-09-12 12:50:22 +02:00
/**
*
*
* Parameters :
* * `string` ** suggestion ** -.
*
* @ param array $params Parameters
*
* @ return bool
*/
public function dismissSuggestion ( $params );
2020-10-01 18:02:54 +02:00
/**
*
*
* Parameters :
* * `string` ** lang_code ** -
* * `[int]` ** hash ** - Optional :.
*
* @ param array $params Parameters
*
* @ return help . CountriesList
*/
public function getCountriesList ( $params );
2019-06-05 15:38:32 +02:00
}
interface channels
{
/**
2019-12-27 17:43:29 +01:00
* Mark [ channel / supergroup ]( https :// core . telegram . org / api / channel ) history as read .
2019-09-18 20:46:20 +02:00
*
2019-09-18 21:32:24 +02:00
* Parameters :
2019-12-27 17:43:29 +01:00
* * `InputChannel` ** channel ** - [ Channel / supergroup ]( https :// core . telegram . org / api / channel )
* * `int` ** max_id ** - ID of message up to which messages should be marked as read
2019-09-18 21:32:24 +02:00
*
2019-09-18 20:46:20 +02:00
* @ param array $params Parameters
2019-06-05 15:38:32 +02:00
*
* @ return bool
*/
2019-09-18 20:46:20 +02:00
public function readHistory ( $params );
2019-06-05 15:38:32 +02:00
/**
2019-12-27 17:43:29 +01:00
* Delete messages in a [ channel / supergroup ]( https :// core . telegram . org / api / channel ) .
2019-09-18 20:46:20 +02:00
*
2019-09-18 21:32:24 +02:00
* Parameters :
2019-12-27 17:43:29 +01:00
* * `InputChannel` ** channel ** - [ Channel / supergroup ]( https :// core . telegram . org / api / channel )
2020-06-16 17:52:55 +02:00
* * `[int]` ** id ** - IDs of messages to delete
2019-09-18 21:32:24 +02:00
*
2019-09-18 20:46:20 +02:00
* @ param array $params Parameters
2019-06-05 15:38:32 +02:00
*
2019-09-18 20:46:20 +02:00
* @ return messages . AffectedMessages
2019-06-05 15:38:32 +02:00
*/
2019-09-18 20:46:20 +02:00
public function deleteMessages ( $params );
2019-06-05 15:38:32 +02:00
/**
2019-12-27 17:43:29 +01:00
* Delete all messages sent by a certain user in a [ supergroup ]( https :// core . telegram . org / api / channel ) .
2019-06-05 15:38:32 +02:00
*
2019-09-18 21:32:24 +02:00
* Parameters :
2019-12-27 17:43:29 +01:00
* * `InputChannel` ** channel ** - [ Supergroup ]( https :// core . telegram . org / api / channel )
* * `InputUser` ** user_id ** - User whose messages should be deleted
2019-09-18 21:32:24 +02:00
*
2019-09-18 20:46:20 +02:00
* @ param array $params Parameters
*
* @ return messages . AffectedHistory
2019-06-05 15:38:32 +02:00
*/
2019-09-18 20:46:20 +02:00
public function deleteUserHistory ( $params );
2019-06-05 15:38:32 +02:00
/**
2019-12-27 17:43:29 +01:00
* Reports some messages from a user in a supergroup as spam ; requires administrator rights in the supergroup .
2019-09-18 20:46:20 +02:00
*
2019-09-18 21:32:24 +02:00
* Parameters :
2019-12-27 17:43:29 +01:00
* * `InputChannel` ** channel ** - Supergroup
* * `InputUser` ** user_id ** - ID of the user that sent the spam messages
2020-06-16 17:52:55 +02:00
* * `[int]` ** id ** - IDs of spam messages
2019-09-18 21:32:24 +02:00
*
2019-09-18 20:46:20 +02:00
* @ param array $params Parameters
2019-06-05 15:38:32 +02:00
*
* @ return bool
*/
2019-09-18 20:46:20 +02:00
public function reportSpam ( $params );
2019-06-05 15:38:32 +02:00
/**
2019-12-27 17:43:29 +01:00
* Get [ channel / supergroup ]( https :// core . telegram . org / api / channel ) messages .
2019-09-18 20:46:20 +02:00
*
2019-09-18 21:32:24 +02:00
* Parameters :
2019-12-27 17:43:29 +01:00
* * `InputChannel` ** channel ** - Channel / supergroup
2020-06-16 17:52:55 +02:00
* * `[InputMessage]` ** id ** - IDs of messages to get
2019-09-18 21:32:24 +02:00
*
2019-09-18 20:46:20 +02:00
* @ param array $params Parameters
2019-06-05 15:38:32 +02:00
*
2019-09-18 20:46:20 +02:00
* @ return messages . Messages
2019-06-05 15:38:32 +02:00
*/
2019-09-18 20:46:20 +02:00
public function getMessages ( $params );
2019-06-05 15:38:32 +02:00
/**
2020-10-01 20:48:22 +02:00
* Get the participants of a [ supergroup / channel ]( https :// core . telegram . org / api / channel ) .
2019-06-05 15:38:32 +02:00
*
2019-09-18 21:32:24 +02:00
* Parameters :
2019-12-27 17:43:29 +01:00
* * `InputChannel` ** channel ** - Channel
* * `ChannelParticipantsFilter` ** filter ** - Which participant types to fetch
* * `int` ** offset ** - [ Offset ]( https :// core . telegram . org / api / offsets )
* * `int` ** limit ** - [ Limit ]( https :// core . telegram . org / api / offsets )
2020-06-16 17:52:55 +02:00
* * `[int]` ** hash ** - Optional : [ Hash ]( https :// core . telegram . org / api / offsets )
2019-09-18 21:32:24 +02:00
*
2019-09-18 20:46:20 +02:00
* @ param array $params Parameters
*
* @ return channels . ChannelParticipants
2019-06-05 15:38:32 +02:00
*/
2019-09-18 20:46:20 +02:00
public function getParticipants ( $params );
2019-06-05 15:38:32 +02:00
/**
2019-12-27 17:43:29 +01:00
* Get info about a [ channel / supergroup ]( https :// core . telegram . org / api / channel ) participant .
2019-09-18 20:46:20 +02:00
*
2019-09-18 21:32:24 +02:00
* Parameters :
2019-12-27 17:43:29 +01:00
* * `InputChannel` ** channel ** - Channel / supergroup
* * `InputUser` ** user_id ** - ID of participant to get info about
2019-09-18 21:32:24 +02:00
*
2019-09-18 20:46:20 +02:00
* @ param array $params Parameters
2019-06-05 15:38:32 +02:00
*
2019-09-18 20:46:20 +02:00
* @ return channels . ChannelParticipant
2019-06-05 15:38:32 +02:00
*/
2019-09-18 20:46:20 +02:00
public function getParticipant ( $params );
2019-06-05 15:38:32 +02:00
/**
2019-12-27 17:43:29 +01:00
* Get info about [ channels / supergroups ]( https :// core . telegram . org / api / channel ) .
2019-09-18 20:46:20 +02:00
*
2019-09-18 21:32:24 +02:00
* Parameters :
2020-06-16 17:52:55 +02:00
* * `[InputChannel]` ** id ** - IDs of channels / supergroups to get info about
2019-09-18 21:32:24 +02:00
*
2019-09-18 20:46:20 +02:00
* @ param array $params Parameters
2017-01-22 17:40:56 +01:00
*
2019-09-18 20:46:20 +02:00
* @ return messages . Chats
2017-01-22 17:40:56 +01:00
*/
2019-09-18 20:46:20 +02:00
public function getChannels ( $params );
2018-02-24 17:54:39 +01:00
2017-01-22 17:40:56 +01:00
/**
2020-06-16 17:52:55 +02:00
* Get full info about a channel .
2017-01-22 17:40:56 +01:00
*
2019-09-18 21:32:24 +02:00
* Parameters :
2020-06-16 17:52:55 +02:00
* * `InputChannel` ** channel ** - The channel to get info about
2019-09-18 21:32:24 +02:00
*
2019-09-18 20:46:20 +02:00
* @ param array $params Parameters
*
* @ return messages . ChatFull
2017-01-22 17:40:56 +01:00
*/
2019-09-18 20:46:20 +02:00
public function getFullChannel ( $params );
2018-02-24 17:54:39 +01:00
2017-01-22 17:40:56 +01:00
/**
2019-12-27 17:43:29 +01:00
* Create a [ supergroup / channel ]( https :// core . telegram . org / api / channel ) .
2019-09-18 20:46:20 +02:00
*
2019-09-18 21:32:24 +02:00
* Parameters :
2019-12-27 17:43:29 +01:00
* * `boolean` ** broadcast ** - Optional : Whether to create a [ channel ]( https :// core . telegram . org / api / channel )
* * `boolean` ** megagroup ** - Optional : Whether to create a [ supergroup ]( https :// core . telegram . org / api / channel )
* * `string` ** title ** - Channel title
* * `string` ** about ** - Channel description
* * `InputGeoPoint` ** geo_point ** - Optional : Geogroup location
* * `string` ** address ** - Optional : Geogroup address
2019-09-18 21:32:24 +02:00
*
2019-09-18 20:46:20 +02:00
* @ param array $params Parameters
2017-01-22 17:40:56 +01:00
*
2019-06-05 15:38:32 +02:00
* @ return Updates
2017-01-22 17:40:56 +01:00
*/
2019-09-18 20:46:20 +02:00
public function createChannel ( $params );
2018-02-24 17:54:39 +01:00
2017-01-22 17:40:56 +01:00
/**
2019-12-27 17:43:29 +01:00
* Modify the admin rights of a user in a [ supergroup / channel ]( https :// core . telegram . org / api / channel ) .
2019-09-18 20:46:20 +02:00
*
2019-09-18 21:32:24 +02:00
* Parameters :
2019-12-27 17:43:29 +01:00
* * `InputChannel` ** channel ** - The [ supergroup / channel ]( https :// core . telegram . org / api / channel ) .
* * `InputUser` ** user_id ** - The ID of the user whose admin rights should be modified
* * `ChatAdminRights` ** admin_rights ** - The admin rights
* * `string` ** rank ** - Indicates the role ( rank ) of the admin in the group : just an arbitrary string
2019-09-18 21:32:24 +02:00
*
2019-09-18 20:46:20 +02:00
* @ param array $params Parameters
2017-01-22 17:40:56 +01:00
*
2019-06-05 15:38:32 +02:00
* @ return Updates
2017-01-22 17:40:56 +01:00
*/
2019-09-18 20:46:20 +02:00
public function editAdmin ( $params );
2018-02-24 17:54:39 +01:00
2017-01-22 17:40:56 +01:00
/**
2019-12-27 17:43:29 +01:00
* Edit the name of a [ channel / supergroup ]( https :// core . telegram . org / api / channel ) .
2019-09-18 20:46:20 +02:00
*
2019-09-18 21:32:24 +02:00
* Parameters :
2019-12-27 17:43:29 +01:00
* * `InputChannel` ** channel ** - Channel / supergroup
* * `string` ** title ** - New name
2019-09-18 21:32:24 +02:00
*
2019-09-18 20:46:20 +02:00
* @ param array $params Parameters
2017-01-22 17:40:56 +01:00
*
2019-06-05 15:38:32 +02:00
* @ return Updates
2017-01-22 17:40:56 +01:00
*/
2019-09-18 20:46:20 +02:00
public function editTitle ( $params );
2018-02-24 17:54:39 +01:00
2017-01-22 17:40:56 +01:00
/**
2019-12-27 17:43:29 +01:00
* Change the photo of a [ channel / supergroup ]( https :// core . telegram . org / api / channel ) .
2019-09-18 20:46:20 +02:00
*
2019-09-18 21:32:24 +02:00
* Parameters :
2019-12-27 17:43:29 +01:00
* * `InputChannel` ** channel ** - Channel / supergroup whose photo should be edited
* * `InputChatPhoto` ** photo ** - New photo
2019-09-18 21:32:24 +02:00
*
2019-09-18 20:46:20 +02:00
* @ param array $params Parameters
2017-01-22 17:40:56 +01:00
*
2019-06-05 15:38:32 +02:00
* @ return Updates
2017-01-22 17:40:56 +01:00
*/
2019-09-18 20:46:20 +02:00
public function editPhoto ( $params );
2018-02-24 17:54:39 +01:00
2017-01-22 17:40:56 +01:00
/**
2019-12-27 17:43:29 +01:00
* Check if a username is free and can be assigned to a channel / supergroup .
2019-09-18 20:46:20 +02:00
*
2019-09-18 21:32:24 +02:00
* Parameters :
2019-12-27 17:43:29 +01:00
* * `InputChannel` ** channel ** - The [ channel / supergroup ]( https :// core . telegram . org / api / channel ) that will assigned the specified username
* * `string` ** username ** - The username to check
2019-09-18 21:32:24 +02:00
*
2019-09-18 20:46:20 +02:00
* @ param array $params Parameters
2017-01-22 17:40:56 +01:00
*
* @ return bool
*/
2019-09-18 20:46:20 +02:00
public function checkUsername ( $params );
2018-02-24 17:54:39 +01:00
2017-01-22 17:40:56 +01:00
/**
2019-12-27 17:43:29 +01:00
* Change the username of a supergroup / channel .
2019-09-18 20:46:20 +02:00
*
2019-09-18 21:32:24 +02:00
* Parameters :
2019-12-27 17:43:29 +01:00
* * `InputChannel` ** channel ** - Channel
* * `string` ** username ** - New username
2019-09-18 21:32:24 +02:00
*
2019-09-18 20:46:20 +02:00
* @ param array $params Parameters
2017-01-22 17:40:56 +01:00
*
2019-06-05 12:04:36 +02:00
* @ return bool
2017-01-22 17:40:56 +01:00
*/
2019-09-18 20:46:20 +02:00
public function updateUsername ( $params );
2018-02-24 17:54:39 +01:00
2017-01-22 17:40:56 +01:00
/**
2019-09-18 21:32:24 +02:00
* Join a channel / supergroup .
2019-09-18 20:46:20 +02:00
*
2019-09-18 21:32:24 +02:00
* Parameters :
2019-12-27 17:43:29 +01:00
* * `InputChannel` ** channel ** - Channel / supergroup to join
2019-09-18 21:32:24 +02:00
*
2019-09-18 20:46:20 +02:00
* @ param array $params Parameters
2017-01-22 17:40:56 +01:00
*
2019-06-05 15:38:32 +02:00
* @ return Updates
2017-01-22 17:40:56 +01:00
*/
2019-09-18 20:46:20 +02:00
public function joinChannel ( $params );
2018-02-24 17:54:39 +01:00
2017-06-30 15:36:33 +02:00
/**
2019-12-27 17:43:29 +01:00
* Leave a [ channel / supergroup ]( https :// core . telegram . org / api / channel ) .
2019-09-18 20:46:20 +02:00
*
2019-09-18 21:32:24 +02:00
* Parameters :
2019-12-27 17:43:29 +01:00
* * `InputChannel` ** channel ** - [ Channel / supergroup ]( https :// core . telegram . org / api / channel ) to leave
2019-09-18 21:32:24 +02:00
*
2019-09-18 20:46:20 +02:00
* @ param array $params Parameters
2017-06-30 15:36:33 +02:00
*
2019-06-05 15:38:32 +02:00
* @ return Updates
2017-06-30 15:36:33 +02:00
*/
2019-09-18 20:46:20 +02:00
public function leaveChannel ( $params );
2018-02-24 17:54:39 +01:00
2017-06-30 15:36:33 +02:00
/**
2019-12-27 17:43:29 +01:00
* Invite users to a channel / supergroup .
2019-09-18 20:46:20 +02:00
*
2019-09-18 21:32:24 +02:00
* Parameters :
2019-12-27 17:43:29 +01:00
* * `InputChannel` ** channel ** - Channel / supergroup
2020-06-16 17:52:55 +02:00
* * `[InputUser]` ** users ** - Users to invite
2019-09-18 21:32:24 +02:00
*
2019-09-18 20:46:20 +02:00
* @ param array $params Parameters
2017-06-30 15:36:33 +02:00
*
2019-06-05 15:38:32 +02:00
* @ return Updates
2017-06-30 15:36:33 +02:00
*/
2019-09-18 20:46:20 +02:00
public function inviteToChannel ( $params );
2018-02-24 17:54:39 +01:00
2017-08-21 18:22:02 +02:00
/**
2019-12-27 17:43:29 +01:00
* Delete a [ channel / supergroup ]( https :// core . telegram . org / api / channel ) .
2019-09-18 20:46:20 +02:00
*
2019-09-18 21:32:24 +02:00
* Parameters :
2019-12-27 17:43:29 +01:00
* * `InputChannel` ** channel ** - [ Channel / supergroup ]( https :// core . telegram . org / api / channel ) to delete
2019-09-18 21:32:24 +02:00
*
2019-09-18 20:46:20 +02:00
* @ param array $params Parameters
2017-08-21 18:22:02 +02:00
*
2019-06-05 15:38:32 +02:00
* @ return Updates
2017-08-21 18:22:02 +02:00
*/
2019-09-18 20:46:20 +02:00
public function deleteChannel ( $params );
2018-02-24 17:54:39 +01:00
2017-08-21 18:22:02 +02:00
/**
2019-12-27 17:43:29 +01:00
* Get link and embed info of a message in a [ channel / supergroup ]( https :// core . telegram . org / api / channel ) .
2019-09-18 20:46:20 +02:00
*
2019-09-18 21:32:24 +02:00
* Parameters :
2020-10-01 18:02:54 +02:00
* * `boolean` ** grouped ** - Optional :
* * `boolean` ** thread ** - Optional :
2019-12-27 17:43:29 +01:00
* * `InputChannel` ** channel ** - Channel
* * `int` ** id ** - Message ID
2019-09-18 21:32:24 +02:00
*
2019-09-18 20:46:20 +02:00
* @ param array $params Parameters
2017-08-21 18:22:02 +02:00
*
2019-06-05 15:38:32 +02:00
* @ return ExportedMessageLink
*/
2019-09-18 20:46:20 +02:00
public function exportMessageLink ( $params );
2019-06-05 15:38:32 +02:00
/**
2019-12-27 17:43:29 +01:00
* Enable / disable message signatures in channels .
2019-09-18 20:46:20 +02:00
*
2019-09-18 21:32:24 +02:00
* Parameters :
2019-12-27 17:43:29 +01:00
* * `InputChannel` ** channel ** - Channel
* * `Bool` ** enabled ** - Value
2019-09-18 21:32:24 +02:00
*
2019-09-18 20:46:20 +02:00
* @ param array $params Parameters
2019-06-05 15:38:32 +02:00
*
* @ return Updates
*/
2019-09-18 20:46:20 +02:00
public function toggleSignatures ( $params );
2019-06-05 15:38:32 +02:00
/**
2019-12-28 16:45:00 +01:00
* Get [ channels / supergroups / geogroups ]( https :// core . telegram . org / api / channel ) we ' re admin in . Usually called when the user exceeds the [ limit ]( https :// docs . madelineproto . xyz / API_docs / constructors / config . html ) for owned public [ channels / supergroups / geogroups ]( https :// core . telegram . org / api / channel ), and the user is given the choice to remove one of his channels / supergroups / geogroups .
2019-09-18 20:46:20 +02:00
*
2019-09-18 21:32:24 +02:00
* Parameters :
2019-12-27 17:43:29 +01:00
* * `boolean` ** by_location ** - Optional : Get geogroups
2019-12-28 16:45:00 +01:00
* * `boolean` ** check_limit ** - Optional : If set and the user has reached the limit of owned public [ channels / supergroups / geogroups ]( https :// core . telegram . org / api / channel ), instead of returning the channel list one of the specified [ errors ]( #possible-errors) will be returned.<br>Useful to check if a new public channel can indeed be created, even before asking the user to enter a channel username to use in [channels.checkUsername](https://docs.madelineproto.xyz/API_docs/methods/channels.checkUsername.html)/[channels.updateUsername](https://docs.madelineproto.xyz/API_docs/methods/channels.updateUsername.html).
2019-09-18 21:32:24 +02:00
*
2019-09-18 20:46:20 +02:00
* @ param array $params Parameters
2019-06-24 15:46:38 +02:00
*
2019-09-18 20:46:20 +02:00
* @ return messages . Chats
2019-06-05 15:38:32 +02:00
*/
2019-09-18 20:46:20 +02:00
public function getAdminedPublicChannels ( $params );
2019-06-05 15:38:32 +02:00
/**
2019-12-27 17:43:29 +01:00
* Ban / unban / kick a user in a [ supergroup / channel ]( https :// core . telegram . org / api / channel ) .
2019-09-18 20:46:20 +02:00
*
2019-09-18 21:32:24 +02:00
* Parameters :
2019-12-27 17:43:29 +01:00
* * `InputChannel` ** channel ** - The [ supergroup / channel ]( https :// core . telegram . org / api / channel ) .
* * `InputUser` ** user_id ** - The ID of the user whose banned rights should be modified
* * `ChatBannedRights` ** banned_rights ** - The banned rights
2019-09-18 21:32:24 +02:00
*
2019-09-18 20:46:20 +02:00
* @ param array $params Parameters
2019-06-05 15:38:32 +02:00
*
* @ return Updates
*/
2019-09-18 20:46:20 +02:00
public function editBanned ( $params );
2019-06-05 15:38:32 +02:00
/**
2019-12-27 17:43:29 +01:00
* Get the admin log of a [ channel / supergroup ]( https :// core . telegram . org / api / channel ) .
2019-06-05 15:38:32 +02:00
*
2019-09-18 21:32:24 +02:00
* Parameters :
2019-12-27 17:43:29 +01:00
* * `InputChannel` ** channel ** - Channel
* * `string` ** q ** - Search query , can be empty
2019-09-18 21:32:24 +02:00
* * `ChannelAdminLogEventsFilter` ** events_filter ** - Optional : Event filter
2020-06-16 17:52:55 +02:00
* * `[InputUser]` ** admins ** - Optional : Only show events from these admins
2019-12-27 17:43:29 +01:00
* * `long` ** max_id ** - Maximum ID of message to return ( see [ pagination ]( https :// core . telegram . org / api / offsets ))
* * `long` ** min_id ** - Minimum ID of message to return ( see [ pagination ]( https :// core . telegram . org / api / offsets ))
* * `int` ** limit ** - Maximum number of results to return , [ see pagination ]( https :// core . telegram . org / api / offsets )
2019-09-18 21:32:24 +02:00
*
2019-09-18 20:46:20 +02:00
* @ param array $params Parameters
*
* @ return channels . AdminLogResults
2019-06-05 15:38:32 +02:00
*/
2019-09-18 20:46:20 +02:00
public function getAdminLog ( $params );
2019-06-05 15:38:32 +02:00
/**
2019-12-27 17:43:29 +01:00
* Associate a stickerset to the supergroup .
2019-09-18 20:46:20 +02:00
*
2019-09-18 21:32:24 +02:00
* Parameters :
2019-12-27 17:43:29 +01:00
* * `InputChannel` ** channel ** - Supergroup
* * `InputStickerSet` ** stickerset ** - The stickerset to associate
2019-09-18 21:32:24 +02:00
*
2019-09-18 20:46:20 +02:00
* @ param array $params Parameters
2019-06-05 15:38:32 +02:00
*
* @ return bool
*/
2019-09-18 20:46:20 +02:00
public function setStickers ( $params );
2019-06-05 15:38:32 +02:00
/**
2019-12-27 17:43:29 +01:00
* Mark [ channel / supergroup ]( https :// core . telegram . org / api / channel ) message contents as read .
2019-09-18 20:46:20 +02:00
*
2019-09-18 21:32:24 +02:00
* Parameters :
2019-12-27 17:43:29 +01:00
* * `InputChannel` ** channel ** - [ Channel / supergroup ]( https :// core . telegram . org / api / channel )
2020-06-16 17:52:55 +02:00
* * `[int]` ** id ** - IDs of messages whose contents should be marked as read
2019-09-18 21:32:24 +02:00
*
2019-09-18 20:46:20 +02:00
* @ param array $params Parameters
2019-06-05 15:38:32 +02:00
*
* @ return bool
2017-08-21 18:22:02 +02:00
*/
2019-09-18 20:46:20 +02:00
public function readMessageContents ( $params );
2019-06-05 15:38:32 +02:00
/**
2019-12-27 17:43:29 +01:00
* Delete the history of a [ supergroup ]( https :// core . telegram . org / api / channel ) .
2019-09-18 20:46:20 +02:00
*
2019-09-18 21:32:24 +02:00
* Parameters :
2019-12-27 17:43:29 +01:00
* * `InputChannel` ** channel ** - [ Supergroup ]( https :// core . telegram . org / api / channel ) whose history must be deleted
* * `int` ** max_id ** - ID of message ** up to which ** the history must be deleted
2019-09-18 21:32:24 +02:00
*
2019-09-18 20:46:20 +02:00
* @ param array $params Parameters
2019-06-05 15:38:32 +02:00
*
* @ return bool
*/
2019-09-18 20:46:20 +02:00
public function deleteHistory ( $params );
2019-06-05 15:38:32 +02:00
/**
2019-12-27 17:43:29 +01:00
* Hide / unhide message history for new channel / supergroup users .
2019-09-18 20:46:20 +02:00
*
2019-09-18 21:32:24 +02:00
* Parameters :
2019-12-27 17:43:29 +01:00
* * `InputChannel` ** channel ** - Channel / supergroup
* * `Bool` ** enabled ** - Hide / unhide
2019-09-18 21:32:24 +02:00
*
2019-09-18 20:46:20 +02:00
* @ param array $params Parameters
2019-06-05 15:38:32 +02:00
*
* @ return Updates
*/
2019-09-18 20:46:20 +02:00
public function togglePreHistoryHidden ( $params );
2019-06-05 15:38:32 +02:00
/**
2019-12-27 17:43:29 +01:00
* Get a list of [ channels / supergroups ]( https :// core . telegram . org / api / channel ) we left .
2019-09-18 20:46:20 +02:00
*
2019-09-18 21:32:24 +02:00
* Parameters :
2019-12-27 17:43:29 +01:00
* * `int` ** offset ** - Offset for [ pagination ]( https :// core . telegram . org / api / offsets )
2019-09-18 21:32:24 +02:00
*
2019-09-18 20:46:20 +02:00
* @ param array $params Parameters
2019-06-05 15:38:32 +02:00
*
2019-09-18 20:46:20 +02:00
* @ return messages . Chats
2019-06-05 15:38:32 +02:00
*/
2019-09-18 20:46:20 +02:00
public function getLeftChannels ( $params );
2019-06-23 13:08:44 +02:00
/**
2019-12-27 17:43:29 +01:00
* Get all groups that can be used as [ discussion groups ]( https :// telegram . org / blog / privacy - discussions - web - bots ) .
2019-09-18 20:46:20 +02:00
*
* @ return messages . Chats
2019-06-23 13:08:44 +02:00
*/
public function getGroupsForDiscussion ();
/**
2019-12-27 17:43:29 +01:00
* Associate a group to a channel as [ discussion group ]( https :// telegram . org / blog / privacy - discussions - web - bots ) for that channel .
2019-09-18 20:46:20 +02:00
*
2019-09-18 21:32:24 +02:00
* Parameters :
2019-12-27 17:43:29 +01:00
* * `InputChannel` ** broadcast ** - Channel
* * `InputChannel` ** group ** - Discussion group to associate to the channel
2019-09-18 21:32:24 +02:00
*
2019-09-18 20:46:20 +02:00
* @ param array $params Parameters
2019-06-23 13:08:44 +02:00
*
* @ return bool
*/
2019-09-18 20:46:20 +02:00
public function setDiscussionGroup ( $params );
2019-06-24 15:46:38 +02:00
/**
2019-12-27 17:43:29 +01:00
* Transfer channel ownership .
2019-09-18 20:46:20 +02:00
*
2019-09-18 21:32:24 +02:00
* Parameters :
* * `InputChannel` ** channel ** - Channel
2019-12-27 17:43:29 +01:00
* * `InputUser` ** user_id ** - New channel owner
* * `InputCheckPasswordSRP` ** password ** - [ 2 FA password ]( https :// core . telegram . org / api / srp ) of account
2019-09-18 21:32:24 +02:00
*
2019-09-18 20:46:20 +02:00
* @ param array $params Parameters
2019-06-24 15:46:38 +02:00
*
* @ return Updates
*/
2019-09-18 20:46:20 +02:00
public function editCreator ( $params );
2019-06-24 15:46:38 +02:00
/**
2019-12-27 17:43:29 +01:00
* Edit location of geogroup .
2019-09-18 20:46:20 +02:00
*
2019-09-18 21:32:24 +02:00
* Parameters :
2019-12-27 17:43:29 +01:00
* * `InputChannel` ** channel ** - [ Geogroup ]( https :// core . telegram . org / api / channel )
* * `InputGeoPoint` ** geo_point ** - New geolocation
* * `string` ** address ** - Address string
2019-09-18 21:32:24 +02:00
*
2019-09-18 20:46:20 +02:00
* @ param array $params Parameters
2019-06-24 15:46:38 +02:00
*
* @ return bool
*/
2019-09-18 20:46:20 +02:00
public function editLocation ( $params );
2019-08-15 20:33:07 +02:00
/**
2019-12-27 17:43:29 +01:00
* Toggle supergroup slow mode : if enabled , users will only be able to send one message every `seconds` seconds .
2019-09-18 21:32:24 +02:00
*
* Parameters :
2019-12-27 17:43:29 +01:00
* * `InputChannel` ** channel ** - The [ supergroup ]( https :// core . telegram . org / api / channel )
2019-09-18 21:32:24 +02:00
* * `int` ** seconds ** - Users will only be able to send one message every `seconds` seconds , `0` to disable the limitation
2019-09-18 20:46:20 +02:00
*
* @ param array $params Parameters
2019-08-15 20:33:07 +02:00
*
* @ return Updates
*/
2019-09-18 20:46:20 +02:00
public function toggleSlowMode ( $params );
2020-03-06 13:09:52 +01:00
/**
2020-06-16 17:52:55 +02:00
* Get inactive channels and supergroups .
2020-03-06 13:09:52 +01:00
*
* @ return messages . InactiveChats
*/
public function getInactiveChannels ();
2017-01-22 17:40:56 +01:00
}
2018-02-25 11:17:45 +01:00
2019-06-05 15:38:32 +02:00
interface bots
2017-03-31 17:35:20 +02:00
{
/**
2019-12-27 17:43:29 +01:00
* Sends a custom request ; for bots only .
2019-09-18 20:46:20 +02:00
*
2019-09-18 21:32:24 +02:00
* Parameters :
2019-12-27 17:43:29 +01:00
* * `string` ** custom_method ** - The method name
* * `DataJSON` ** params ** - JSON - serialized method parameters
2019-09-18 21:32:24 +02:00
*
2019-09-18 20:46:20 +02:00
* @ param array $params Parameters
2019-06-05 15:38:32 +02:00
*
* @ return DataJSON
2017-03-31 17:35:20 +02:00
*/
2019-09-18 20:46:20 +02:00
public function sendCustomRequest ( $params );
2018-02-24 17:54:39 +01:00
2017-03-31 17:35:20 +02:00
/**
2019-12-27 17:43:29 +01:00
* Answers a custom query ; for bots only .
2019-09-18 20:46:20 +02:00
*
2019-09-18 21:32:24 +02:00
* Parameters :
2019-12-27 17:43:29 +01:00
* * `long` ** query_id ** - Identifier of a custom query
* * `DataJSON` ** data ** - JSON - serialized answer to the query
2019-09-18 21:32:24 +02:00
*
2019-09-18 20:46:20 +02:00
* @ param array $params Parameters
2017-03-31 17:35:20 +02:00
*
2019-06-05 15:38:32 +02:00
* @ return bool
2017-03-31 17:35:20 +02:00
*/
2019-09-18 20:46:20 +02:00
public function answerWebhookJSONQuery ( $params );
2020-06-16 17:52:55 +02:00
/**
* Set bot command list .
*
* Parameters :
* * `[BotCommand]` ** commands ** - Bot commands
*
* @ param array $params Parameters
*
* @ return bool
*/
public function setBotCommands ( $params );
2017-03-31 17:35:20 +02:00
}
2018-02-25 11:17:45 +01:00
2019-06-05 15:38:32 +02:00
interface payments
2017-03-31 17:35:20 +02:00
{
/**
2019-12-27 17:43:29 +01:00
* Get a payment form .
2017-03-31 17:35:20 +02:00
*
2019-09-18 21:32:24 +02:00
* Parameters :
2019-12-27 17:43:29 +01:00
* * `int` ** msg_id ** - Message ID of payment form
2019-09-18 21:32:24 +02:00
*
2019-09-18 20:46:20 +02:00
* @ param array $params Parameters
*
* @ return payments . PaymentForm
2017-03-31 17:35:20 +02:00
*/
2019-09-18 20:46:20 +02:00
public function getPaymentForm ( $params );
2018-02-24 17:54:39 +01:00
2017-03-31 17:35:20 +02:00
/**
2019-09-18 21:32:24 +02:00
* Get payment receipt .
2019-09-18 20:46:20 +02:00
*
2019-09-18 21:32:24 +02:00
* Parameters :
2019-12-27 17:43:29 +01:00
* * `int` ** msg_id ** - Message ID of receipt
2019-09-18 21:32:24 +02:00
*
2019-09-18 20:46:20 +02:00
* @ param array $params Parameters
2017-03-31 17:35:20 +02:00
*
2019-09-18 20:46:20 +02:00
* @ return payments . PaymentReceipt
2017-03-31 17:35:20 +02:00
*/
2019-09-18 20:46:20 +02:00
public function getPaymentReceipt ( $params );
2018-02-24 17:54:39 +01:00
2017-03-31 17:35:20 +02:00
/**
2019-12-27 17:43:29 +01:00
* Submit requested order information for validation .
2019-09-18 20:46:20 +02:00
*
2019-09-18 21:32:24 +02:00
* Parameters :
2019-12-27 17:43:29 +01:00
* * `boolean` ** save ** - Optional : Save order information to re - use it for future orders
* * `int` ** msg_id ** - Message ID of payment form
* * `PaymentRequestedInfo` ** info ** - Requested order information
2019-09-18 21:32:24 +02:00
*
2019-09-18 20:46:20 +02:00
* @ param array $params Parameters
2017-03-31 17:35:20 +02:00
*
2019-09-18 20:46:20 +02:00
* @ return payments . ValidatedRequestedInfo
2017-03-31 17:35:20 +02:00
*/
2019-09-18 20:46:20 +02:00
public function validateRequestedInfo ( $params );
2018-02-25 11:17:45 +01:00
2017-06-30 15:36:33 +02:00
/**
2019-12-27 17:43:29 +01:00
* Send compiled payment form .
2017-06-30 15:36:33 +02:00
*
2019-09-18 21:32:24 +02:00
* Parameters :
2019-12-27 17:43:29 +01:00
* * `int` ** msg_id ** - Message ID of form
2019-12-28 16:45:00 +01:00
* * `string` ** requested_info_id ** - Optional : ID of saved and validated [ order info ]( https :// docs . madelineproto . xyz / API_docs / constructors / payments . validatedRequestedInfo . html )
2019-12-27 17:43:29 +01:00
* * `string` ** shipping_option_id ** - Optional : Chosen shipping option ID
2019-09-18 21:32:24 +02:00
* * `InputPaymentCredentials` ** credentials ** - Payment credentials
*
2019-09-18 20:46:20 +02:00
* @ param array $params Parameters
*
* @ return payments . PaymentResult
2017-06-30 15:36:33 +02:00
*/
2019-09-18 20:46:20 +02:00
public function sendPaymentForm ( $params );
2019-06-05 15:38:32 +02:00
/**
2019-12-27 17:43:29 +01:00
* Get saved payment information .
2019-09-18 20:46:20 +02:00
*
* @ return payments . SavedInfo
2019-06-05 15:38:32 +02:00
*/
public function getSavedInfo ();
/**
2019-12-27 17:43:29 +01:00
* Clear saved payment information .
2019-09-18 20:46:20 +02:00
*
2019-09-18 21:32:24 +02:00
* Parameters :
2019-12-27 17:43:29 +01:00
* * `boolean` ** credentials ** - Optional : Remove saved payment credentials
* * `boolean` ** info ** - Optional : Clear the last order settings saved by the user
2019-09-18 21:32:24 +02:00
*
2019-09-18 20:46:20 +02:00
* @ param array $params Parameters
2019-06-05 15:38:32 +02:00
*
* @ return bool
*/
2019-09-18 20:46:20 +02:00
public function clearSavedInfo ( $params );
2020-03-06 13:09:52 +01:00
/**
2020-06-16 17:52:55 +02:00
* Get info about a credit card .
2020-03-06 13:09:52 +01:00
*
* Parameters :
2020-06-16 17:52:55 +02:00
* * `string` ** number ** - Credit card number
2020-03-06 13:09:52 +01:00
*
* @ param array $params Parameters
*
* @ return payments . BankCardData
*/
public function getBankCardData ( $params );
2017-06-30 15:36:33 +02:00
}
2018-02-25 11:17:45 +01:00
2019-06-05 15:38:32 +02:00
interface stickers
2017-01-25 23:16:22 +01:00
{
2017-03-31 17:35:20 +02:00
/**
2019-12-27 17:43:29 +01:00
* Create a stickerset , bots only .
2019-09-18 20:46:20 +02:00
*
2019-09-18 21:32:24 +02:00
* Parameters :
2019-12-27 17:43:29 +01:00
* * `boolean` ** masks ** - Optional : Whether this is a mask stickerset
2020-06-16 17:52:55 +02:00
* * `boolean` ** animated ** - Optional : Whether this is an animated stickerset
2019-12-27 17:43:29 +01:00
* * `InputUser` ** user_id ** - Stickerset owner
* * `string` ** title ** - Stickerset name , `1-64` chars
* * `string` ** short_name ** - Sticker set name . Can contain only English letters , digits and underscores . Must end with * " *by*<bot username= " " > " </ bot >* ( *< bot_username ></ bot_username >* is case insensitive ); 1 - 64 characters
2020-06-16 17:52:55 +02:00
* * `InputDocument` ** thumb ** - Optional : Thumbnail
* * `[InputStickerSetItem]` ** stickers ** - Stickers
2019-09-18 21:32:24 +02:00
*
2019-09-18 20:46:20 +02:00
* @ param array $params Parameters
2017-03-31 17:35:20 +02:00
*
2019-09-18 20:46:20 +02:00
* @ return messages . StickerSet
2017-03-31 17:35:20 +02:00
*/
2019-09-18 20:46:20 +02:00
public function createStickerSet ( $params );
2018-02-24 17:54:39 +01:00
2017-01-25 23:16:22 +01:00
/**
2019-12-27 17:43:29 +01:00
* Remove a sticker from the set where it belongs , bots only . The sticker set must have been created by the bot .
2019-09-18 20:46:20 +02:00
*
2019-09-18 21:32:24 +02:00
* Parameters :
2019-09-18 20:46:20 +02:00
* * `InputDocument` ** sticker ** - The sticker to remove
2019-09-18 21:32:24 +02:00
*
2019-09-18 20:46:20 +02:00
* @ param array $params Parameters
2017-03-31 17:35:20 +02:00
*
2019-09-18 20:46:20 +02:00
* @ return messages . StickerSet
2017-03-31 17:35:20 +02:00
*/
2019-09-18 20:46:20 +02:00
public function removeStickerFromSet ( $params );
2018-02-24 17:54:39 +01:00
2017-03-31 17:35:20 +02:00
/**
2019-12-27 17:43:29 +01:00
* Changes the absolute position of a sticker in the set to which it belongs ; for bots only . The sticker set must have been created by the bot .
2017-01-25 23:16:22 +01:00
*
2019-09-18 21:32:24 +02:00
* Parameters :
* * `InputDocument` ** sticker ** - The sticker
2019-12-27 17:43:29 +01:00
* * `int` ** position ** - The new position of the sticker , zero - based
2019-09-18 21:32:24 +02:00
*
2019-09-18 20:46:20 +02:00
* @ param array $params Parameters
*
* @ return messages . StickerSet
2017-01-25 23:16:22 +01:00
*/
2019-09-18 20:46:20 +02:00
public function changeStickerPosition ( $params );
2019-06-05 15:38:32 +02:00
/**
2019-12-27 17:43:29 +01:00
* Add a sticker to a stickerset , bots only . The sticker set must have been created by the bot .
2019-09-18 20:46:20 +02:00
*
2019-09-18 21:32:24 +02:00
* Parameters :
2019-09-18 20:46:20 +02:00
* * `InputStickerSet` ** stickerset ** - The stickerset
2019-09-18 21:32:24 +02:00
* * `InputStickerSetItem` ** sticker ** - The sticker
*
2019-09-18 20:46:20 +02:00
* @ param array $params Parameters
2019-06-05 15:38:32 +02:00
*
2019-09-18 20:46:20 +02:00
* @ return messages . StickerSet
2019-06-05 15:38:32 +02:00
*/
2019-09-18 20:46:20 +02:00
public function addStickerToSet ( $params );
2020-06-16 17:52:55 +02:00
/**
* Set stickerset thumbnail .
*
* Parameters :
* * `InputStickerSet` ** stickerset ** - Stickerset
* * `InputDocument` ** thumb ** - Thumbnail
*
* @ param array $params Parameters
*
* @ return messages . StickerSet
*/
public function setStickerSetThumb ( $params );
2017-01-25 23:16:22 +01:00
}
2018-02-25 11:17:45 +01:00
2019-06-05 15:38:32 +02:00
interface phone
2017-06-30 15:36:33 +02:00
{
/**
2019-12-27 17:43:29 +01:00
* Get phone call configuration to be passed to libtgvoip ' s shared config .
2019-09-18 20:46:20 +02:00
*
2019-06-05 15:38:32 +02:00
* @ return DataJSON
2017-06-30 15:36:33 +02:00
*/
2019-06-05 15:38:32 +02:00
public function getCallConfig ();
2018-02-24 17:54:39 +01:00
2017-06-30 15:36:33 +02:00
/**
2020-06-16 17:52:55 +02:00
* Start a telegram phone call .
2019-06-05 15:38:32 +02:00
*
2019-09-18 21:32:24 +02:00
* Parameters :
2020-06-16 17:52:55 +02:00
* * `boolean` ** video ** - Optional : Whether to start a video call
* * `InputUser` ** user_id ** - Destination of the phone call
* * `bytes` ** g_a_hash ** - [ Parameter for E2E encryption key exchange » ]( https :// core . telegram . org / api / end - to - end / voice - calls )
* * `PhoneCallProtocol` ** protocol ** - Phone call settings
2019-09-18 21:32:24 +02:00
*
2019-09-18 20:46:20 +02:00
* @ param array $params Parameters
*
* @ return phone . PhoneCall
2017-06-30 15:36:33 +02:00
*/
2019-09-18 20:46:20 +02:00
public function requestCall ( $params );
2018-02-24 17:54:39 +01:00
2017-06-30 15:36:33 +02:00
/**
2020-06-16 17:52:55 +02:00
* Accept incoming call .
2019-09-18 20:46:20 +02:00
*
2019-09-18 21:32:24 +02:00
* Parameters :
2020-06-16 17:52:55 +02:00
* * `InputPhoneCall` ** peer ** - The call to accept
* * `bytes` ** g_b ** - [ Parameter for E2E encryption key exchange » ]( https :// core . telegram . org / api / end - to - end / voice - calls )
* * `PhoneCallProtocol` ** protocol ** - Phone call settings
2019-09-18 21:32:24 +02:00
*
2019-09-18 20:46:20 +02:00
* @ param array $params Parameters
2017-06-30 15:36:33 +02:00
*
2019-09-18 20:46:20 +02:00
* @ return phone . PhoneCall
2017-06-30 15:36:33 +02:00
*/
2019-09-18 20:46:20 +02:00
public function acceptCall ( $params );
2018-02-24 17:54:39 +01:00
2017-06-30 15:36:33 +02:00
/**
2020-06-16 17:52:55 +02:00
* [ Complete phone call E2E encryption key exchange » ]( https :// core . telegram . org / api / end - to - end / voice - calls ) .
2019-09-18 20:46:20 +02:00
*
2019-09-18 21:32:24 +02:00
* Parameters :
2020-06-16 17:52:55 +02:00
* * `InputPhoneCall` ** peer ** - The phone call
* * `bytes` ** g_a ** - [ Parameter for E2E encryption key exchange » ]( https :// core . telegram . org / api / end - to - end / voice - calls )
* * `long` ** key_fingerprint ** - Key fingerprint
* * `PhoneCallProtocol` ** protocol ** - Phone call settings
2019-09-18 21:32:24 +02:00
*
2019-09-18 20:46:20 +02:00
* @ param array $params Parameters
2019-06-05 15:38:32 +02:00
*
2019-09-18 20:46:20 +02:00
* @ return phone . PhoneCall
2019-06-05 15:38:32 +02:00
*/
2019-09-18 20:46:20 +02:00
public function confirmCall ( $params );
2019-06-05 15:38:32 +02:00
/**
2019-12-27 17:43:29 +01:00
* Optional : notify the server that the user is currently busy in a call : this will automatically refuse all incoming phone calls until the current phone call is ended .
2019-09-18 20:46:20 +02:00
*
2019-09-18 21:32:24 +02:00
* Parameters :
2019-12-27 17:43:29 +01:00
* * `InputPhoneCall` ** peer ** - The phone call we ' re currently in
2019-09-18 21:32:24 +02:00
*
2019-09-18 20:46:20 +02:00
* @ param array $params Parameters
Merge alpha into master (async, huge bugfixes and more) (#546)
* Implement async and lots of bugfixes
* Implement more async
* Implement async, implement bugfixes for the connection module, for the datacenter module, huge bugfixes, huge perfomance improvements, media DCs for https, advanced selecting, custom var_dump, totally rewritten IOLoop and response mechanism, promises, improvements to the TL parser, custom mb_substr
* Apply fixes from StyleCI
* Bugfixes
* Apply fixes from StyleCI
* Bugfixes, implement combined promises
* Apply fixes from StyleCI
* Support passing method arguments as callable
* Starting to write async upload logic
* Apply fixes from StyleCI
* Start implementing async file upload
* Apply fixes from StyleCI
* bugfix
* Apply fixes from StyleCI
* Start rewriting connection module
* Add PHP file docblocks for all classes
* Start working on new async stream API
* Finish writing stream API
* More stream API fixes
* Apply fixes from StyleCI
* Rewrite DataCenter and Connection modules
* Clean up stream API documentation
* Fixes
* Apply fixes from StyleCI
* Add referenced parameter to get length of buffer to read in getReadBuffer API
* Moved all MessageHandler code in the Connection module, added a PHP version warning in the phar
* Start fixing reads
* Fix all protocol stream wrappers
* Apply fixes from StyleCI
* Implement disconnection, and remove end function
* Working async RPC
* Implement async file upload
* Bugfix
* Method recall bugfixes
* Bugfixes
* Trait bugfixes
* Fix FIFO buffer
* Bugfixes and speedtests
* Async logging
* Implement websocket streams
* Implement loop API, signal API, clean closing and start changing layer
* Small magna, websocket and HTTP fixes
* Clean up loop API
* Improved stack traces, 2FA and async
* Login fixes
* Added instructions for manual verification
* Small fixes
* More app info improvements
* More app info improvements
* TL and 2FA fixes
* Update to layer 89
* More bugfixes
* Implement broken media reporting
* Remove debug comments
* PHP 7.2 backwards compatibility
* Bugfixes
* Async key generation
* Some simplifications
* Transport fixes
* Cleanup
* async API
* Performance fixes
* Fixes to async API
* Bugfixes
* Implement one-time async loop
* Authorization and logging fixes
* Update to layer 91
* 7to5 fix
* Null coalesce conversion
* Implement socks5 proxy
* Implement HTTP proxy
* Fixes to HTTP proxy
* MTProxy and socks5 fixes
* Disable PHP 5 conversion
* Proxies have higher priority
* Avoid error handling in vendor
* Override composer dependencies
* Fix travis build
* Final composer fixes
* Proxy logic fixes
* Fix get_updates update handling
* Do not use parallel file driver if not supported
* Refactor loader and implement HTTP fixes
* Suppress errors in loader
* HTTP and authorization fixes
* HTTP fixes
* Improved peer management
* Use HTTP protocol on altervista
* Small bugfixes
* Minor fixes
* Docufix
* Docufix
* Legacy fixes
* Fix message queue
* Avoid updating if using MTProxy
* Improve logs and examples
* Trim final newlines while converting parse mode
* Reimplement noResponse flag
* Async combined event handler and APIFactory fixes
* Actually return config
* Case-insensitive methods
* Bugfix
* Apply fixes from StyleCI (#545)
* MTProxy fixes
* PHP 5 warning
* Improved PHP 5 warning
* Use <br> along with newlines in web logs
* Update docs
2018-12-26 20:51:14 +01:00
*
2019-06-05 12:04:36 +02:00
* @ return bool
2017-06-30 15:36:33 +02:00
*/
2019-09-18 20:46:20 +02:00
public function receivedCall ( $params );
2019-06-05 15:38:32 +02:00
/**
2020-06-16 17:52:55 +02:00
* Refuse or end running call .
2019-09-18 20:46:20 +02:00
*
2019-09-18 21:32:24 +02:00
* Parameters :
2020-06-16 17:52:55 +02:00
* * `boolean` ** video ** - Optional : Whether this is a video call
* * `InputPhoneCall` ** peer ** - The phone call
* * `int` ** duration ** - Call duration
* * `PhoneCallDiscardReason` ** reason ** - Why was the call discarded
* * `long` ** connection_id ** - Preferred libtgvoip relay ID
2019-09-18 21:32:24 +02:00
*
2019-09-18 20:46:20 +02:00
* @ param array $params Parameters
2019-06-05 15:38:32 +02:00
*
* @ return Updates
*/
2019-09-18 20:46:20 +02:00
public function discardCall ( $params );
2019-06-05 15:38:32 +02:00
/**
2019-12-27 17:43:29 +01:00
* Rate a call .
2019-09-18 20:46:20 +02:00
*
2019-09-18 21:32:24 +02:00
* Parameters :
2019-12-27 17:43:29 +01:00
* * `boolean` ** user_initiative ** - Optional : Whether the user decided on their own initiative to rate the call
* * `InputPhoneCall` ** peer ** - The call to rate
* * `int` ** rating ** - Rating in `1-5` stars
* * `string` ** comment ** - An additional comment
2019-09-18 21:32:24 +02:00
*
2019-09-18 20:46:20 +02:00
* @ param array $params Parameters
2019-06-05 15:38:32 +02:00
*
* @ return Updates
*/
2019-09-18 20:46:20 +02:00
public function setCallRating ( $params );
2019-06-05 15:38:32 +02:00
/**
2019-12-27 17:43:29 +01:00
* Send phone call debug data to server .
2019-09-18 20:46:20 +02:00
*
2019-09-18 21:32:24 +02:00
* Parameters :
2019-12-27 17:43:29 +01:00
* * `InputPhoneCall` ** peer ** - Phone call
* * `DataJSON` ** debug ** - Debug statistics obtained from libtgvoip
2019-09-18 21:32:24 +02:00
*
2019-09-18 20:46:20 +02:00
* @ param array $params Parameters
2019-06-05 15:38:32 +02:00
*
* @ return bool
*/
2019-09-18 20:46:20 +02:00
public function saveCallDebug ( $params );
2020-09-12 12:50:22 +02:00
/**
*
*
* Parameters :
* * `InputPhoneCall` ** peer ** -
* * `bytes` ** data ** -.
*
* @ param array $params Parameters
*
* @ return bool
*/
public function sendSignalingData ( $params );
2019-06-05 15:38:32 +02:00
}
Merge alpha into master (async, huge bugfixes and more) (#546)
* Implement async and lots of bugfixes
* Implement more async
* Implement async, implement bugfixes for the connection module, for the datacenter module, huge bugfixes, huge perfomance improvements, media DCs for https, advanced selecting, custom var_dump, totally rewritten IOLoop and response mechanism, promises, improvements to the TL parser, custom mb_substr
* Apply fixes from StyleCI
* Bugfixes
* Apply fixes from StyleCI
* Bugfixes, implement combined promises
* Apply fixes from StyleCI
* Support passing method arguments as callable
* Starting to write async upload logic
* Apply fixes from StyleCI
* Start implementing async file upload
* Apply fixes from StyleCI
* bugfix
* Apply fixes from StyleCI
* Start rewriting connection module
* Add PHP file docblocks for all classes
* Start working on new async stream API
* Finish writing stream API
* More stream API fixes
* Apply fixes from StyleCI
* Rewrite DataCenter and Connection modules
* Clean up stream API documentation
* Fixes
* Apply fixes from StyleCI
* Add referenced parameter to get length of buffer to read in getReadBuffer API
* Moved all MessageHandler code in the Connection module, added a PHP version warning in the phar
* Start fixing reads
* Fix all protocol stream wrappers
* Apply fixes from StyleCI
* Implement disconnection, and remove end function
* Working async RPC
* Implement async file upload
* Bugfix
* Method recall bugfixes
* Bugfixes
* Trait bugfixes
* Fix FIFO buffer
* Bugfixes and speedtests
* Async logging
* Implement websocket streams
* Implement loop API, signal API, clean closing and start changing layer
* Small magna, websocket and HTTP fixes
* Clean up loop API
* Improved stack traces, 2FA and async
* Login fixes
* Added instructions for manual verification
* Small fixes
* More app info improvements
* More app info improvements
* TL and 2FA fixes
* Update to layer 89
* More bugfixes
* Implement broken media reporting
* Remove debug comments
* PHP 7.2 backwards compatibility
* Bugfixes
* Async key generation
* Some simplifications
* Transport fixes
* Cleanup
* async API
* Performance fixes
* Fixes to async API
* Bugfixes
* Implement one-time async loop
* Authorization and logging fixes
* Update to layer 91
* 7to5 fix
* Null coalesce conversion
* Implement socks5 proxy
* Implement HTTP proxy
* Fixes to HTTP proxy
* MTProxy and socks5 fixes
* Disable PHP 5 conversion
* Proxies have higher priority
* Avoid error handling in vendor
* Override composer dependencies
* Fix travis build
* Final composer fixes
* Proxy logic fixes
* Fix get_updates update handling
* Do not use parallel file driver if not supported
* Refactor loader and implement HTTP fixes
* Suppress errors in loader
* HTTP and authorization fixes
* HTTP fixes
* Improved peer management
* Use HTTP protocol on altervista
* Small bugfixes
* Minor fixes
* Docufix
* Docufix
* Legacy fixes
* Fix message queue
* Avoid updating if using MTProxy
* Improve logs and examples
* Trim final newlines while converting parse mode
* Reimplement noResponse flag
* Async combined event handler and APIFactory fixes
* Actually return config
* Case-insensitive methods
* Bugfix
* Apply fixes from StyleCI (#545)
* MTProxy fixes
* PHP 5 warning
* Improved PHP 5 warning
* Use <br> along with newlines in web logs
* Update docs
2018-12-26 20:51:14 +01:00
2019-06-05 15:38:32 +02:00
interface langpack
{
Merge alpha into master (async, huge bugfixes and more) (#546)
* Implement async and lots of bugfixes
* Implement more async
* Implement async, implement bugfixes for the connection module, for the datacenter module, huge bugfixes, huge perfomance improvements, media DCs for https, advanced selecting, custom var_dump, totally rewritten IOLoop and response mechanism, promises, improvements to the TL parser, custom mb_substr
* Apply fixes from StyleCI
* Bugfixes
* Apply fixes from StyleCI
* Bugfixes, implement combined promises
* Apply fixes from StyleCI
* Support passing method arguments as callable
* Starting to write async upload logic
* Apply fixes from StyleCI
* Start implementing async file upload
* Apply fixes from StyleCI
* bugfix
* Apply fixes from StyleCI
* Start rewriting connection module
* Add PHP file docblocks for all classes
* Start working on new async stream API
* Finish writing stream API
* More stream API fixes
* Apply fixes from StyleCI
* Rewrite DataCenter and Connection modules
* Clean up stream API documentation
* Fixes
* Apply fixes from StyleCI
* Add referenced parameter to get length of buffer to read in getReadBuffer API
* Moved all MessageHandler code in the Connection module, added a PHP version warning in the phar
* Start fixing reads
* Fix all protocol stream wrappers
* Apply fixes from StyleCI
* Implement disconnection, and remove end function
* Working async RPC
* Implement async file upload
* Bugfix
* Method recall bugfixes
* Bugfixes
* Trait bugfixes
* Fix FIFO buffer
* Bugfixes and speedtests
* Async logging
* Implement websocket streams
* Implement loop API, signal API, clean closing and start changing layer
* Small magna, websocket and HTTP fixes
* Clean up loop API
* Improved stack traces, 2FA and async
* Login fixes
* Added instructions for manual verification
* Small fixes
* More app info improvements
* More app info improvements
* TL and 2FA fixes
* Update to layer 89
* More bugfixes
* Implement broken media reporting
* Remove debug comments
* PHP 7.2 backwards compatibility
* Bugfixes
* Async key generation
* Some simplifications
* Transport fixes
* Cleanup
* async API
* Performance fixes
* Fixes to async API
* Bugfixes
* Implement one-time async loop
* Authorization and logging fixes
* Update to layer 91
* 7to5 fix
* Null coalesce conversion
* Implement socks5 proxy
* Implement HTTP proxy
* Fixes to HTTP proxy
* MTProxy and socks5 fixes
* Disable PHP 5 conversion
* Proxies have higher priority
* Avoid error handling in vendor
* Override composer dependencies
* Fix travis build
* Final composer fixes
* Proxy logic fixes
* Fix get_updates update handling
* Do not use parallel file driver if not supported
* Refactor loader and implement HTTP fixes
* Suppress errors in loader
* HTTP and authorization fixes
* HTTP fixes
* Improved peer management
* Use HTTP protocol on altervista
* Small bugfixes
* Minor fixes
* Docufix
* Docufix
* Legacy fixes
* Fix message queue
* Avoid updating if using MTProxy
* Improve logs and examples
* Trim final newlines while converting parse mode
* Reimplement noResponse flag
* Async combined event handler and APIFactory fixes
* Actually return config
* Case-insensitive methods
* Bugfix
* Apply fixes from StyleCI (#545)
* MTProxy fixes
* PHP 5 warning
* Improved PHP 5 warning
* Use <br> along with newlines in web logs
* Update docs
2018-12-26 20:51:14 +01:00
/**
2019-12-27 17:43:29 +01:00
* Get localization pack strings .
2019-09-18 20:46:20 +02:00
*
2019-09-18 21:32:24 +02:00
* Parameters :
2019-12-27 17:43:29 +01:00
* * `string` ** lang_pack ** - Language pack name
2019-09-18 20:46:20 +02:00
* * `string` ** lang_code ** - Language code
2019-09-18 21:32:24 +02:00
*
2019-09-18 20:46:20 +02:00
* @ param array $params Parameters
Merge alpha into master (async, huge bugfixes and more) (#546)
* Implement async and lots of bugfixes
* Implement more async
* Implement async, implement bugfixes for the connection module, for the datacenter module, huge bugfixes, huge perfomance improvements, media DCs for https, advanced selecting, custom var_dump, totally rewritten IOLoop and response mechanism, promises, improvements to the TL parser, custom mb_substr
* Apply fixes from StyleCI
* Bugfixes
* Apply fixes from StyleCI
* Bugfixes, implement combined promises
* Apply fixes from StyleCI
* Support passing method arguments as callable
* Starting to write async upload logic
* Apply fixes from StyleCI
* Start implementing async file upload
* Apply fixes from StyleCI
* bugfix
* Apply fixes from StyleCI
* Start rewriting connection module
* Add PHP file docblocks for all classes
* Start working on new async stream API
* Finish writing stream API
* More stream API fixes
* Apply fixes from StyleCI
* Rewrite DataCenter and Connection modules
* Clean up stream API documentation
* Fixes
* Apply fixes from StyleCI
* Add referenced parameter to get length of buffer to read in getReadBuffer API
* Moved all MessageHandler code in the Connection module, added a PHP version warning in the phar
* Start fixing reads
* Fix all protocol stream wrappers
* Apply fixes from StyleCI
* Implement disconnection, and remove end function
* Working async RPC
* Implement async file upload
* Bugfix
* Method recall bugfixes
* Bugfixes
* Trait bugfixes
* Fix FIFO buffer
* Bugfixes and speedtests
* Async logging
* Implement websocket streams
* Implement loop API, signal API, clean closing and start changing layer
* Small magna, websocket and HTTP fixes
* Clean up loop API
* Improved stack traces, 2FA and async
* Login fixes
* Added instructions for manual verification
* Small fixes
* More app info improvements
* More app info improvements
* TL and 2FA fixes
* Update to layer 89
* More bugfixes
* Implement broken media reporting
* Remove debug comments
* PHP 7.2 backwards compatibility
* Bugfixes
* Async key generation
* Some simplifications
* Transport fixes
* Cleanup
* async API
* Performance fixes
* Fixes to async API
* Bugfixes
* Implement one-time async loop
* Authorization and logging fixes
* Update to layer 91
* 7to5 fix
* Null coalesce conversion
* Implement socks5 proxy
* Implement HTTP proxy
* Fixes to HTTP proxy
* MTProxy and socks5 fixes
* Disable PHP 5 conversion
* Proxies have higher priority
* Avoid error handling in vendor
* Override composer dependencies
* Fix travis build
* Final composer fixes
* Proxy logic fixes
* Fix get_updates update handling
* Do not use parallel file driver if not supported
* Refactor loader and implement HTTP fixes
* Suppress errors in loader
* HTTP and authorization fixes
* HTTP fixes
* Improved peer management
* Use HTTP protocol on altervista
* Small bugfixes
* Minor fixes
* Docufix
* Docufix
* Legacy fixes
* Fix message queue
* Avoid updating if using MTProxy
* Improve logs and examples
* Trim final newlines while converting parse mode
* Reimplement noResponse flag
* Async combined event handler and APIFactory fixes
* Actually return config
* Case-insensitive methods
* Bugfix
* Apply fixes from StyleCI (#545)
* MTProxy fixes
* PHP 5 warning
* Improved PHP 5 warning
* Use <br> along with newlines in web logs
* Update docs
2018-12-26 20:51:14 +01:00
*
2019-06-05 15:38:32 +02:00
* @ return LangPackDifference
2019-06-05 12:04:36 +02:00
*/
2019-09-18 20:46:20 +02:00
public function getLangPack ( $params );
2019-06-05 12:04:36 +02:00
/**
2019-12-27 17:43:29 +01:00
* Get strings from a language pack .
2019-06-05 15:38:32 +02:00
*
2019-09-18 21:32:24 +02:00
* Parameters :
2019-12-27 17:43:29 +01:00
* * `string` ** lang_pack ** - Language pack name
2019-09-18 20:46:20 +02:00
* * `string` ** lang_code ** - Language code
2020-06-16 17:52:55 +02:00
* * `[string]` ** keys ** - Strings to get
2019-09-18 21:32:24 +02:00
*
2019-09-18 20:46:20 +02:00
* @ param array $params Parameters
*
2019-12-14 16:47:04 +01:00
* @ return of LangPackString []
Merge alpha into master (async, huge bugfixes and more) (#546)
* Implement async and lots of bugfixes
* Implement more async
* Implement async, implement bugfixes for the connection module, for the datacenter module, huge bugfixes, huge perfomance improvements, media DCs for https, advanced selecting, custom var_dump, totally rewritten IOLoop and response mechanism, promises, improvements to the TL parser, custom mb_substr
* Apply fixes from StyleCI
* Bugfixes
* Apply fixes from StyleCI
* Bugfixes, implement combined promises
* Apply fixes from StyleCI
* Support passing method arguments as callable
* Starting to write async upload logic
* Apply fixes from StyleCI
* Start implementing async file upload
* Apply fixes from StyleCI
* bugfix
* Apply fixes from StyleCI
* Start rewriting connection module
* Add PHP file docblocks for all classes
* Start working on new async stream API
* Finish writing stream API
* More stream API fixes
* Apply fixes from StyleCI
* Rewrite DataCenter and Connection modules
* Clean up stream API documentation
* Fixes
* Apply fixes from StyleCI
* Add referenced parameter to get length of buffer to read in getReadBuffer API
* Moved all MessageHandler code in the Connection module, added a PHP version warning in the phar
* Start fixing reads
* Fix all protocol stream wrappers
* Apply fixes from StyleCI
* Implement disconnection, and remove end function
* Working async RPC
* Implement async file upload
* Bugfix
* Method recall bugfixes
* Bugfixes
* Trait bugfixes
* Fix FIFO buffer
* Bugfixes and speedtests
* Async logging
* Implement websocket streams
* Implement loop API, signal API, clean closing and start changing layer
* Small magna, websocket and HTTP fixes
* Clean up loop API
* Improved stack traces, 2FA and async
* Login fixes
* Added instructions for manual verification
* Small fixes
* More app info improvements
* More app info improvements
* TL and 2FA fixes
* Update to layer 89
* More bugfixes
* Implement broken media reporting
* Remove debug comments
* PHP 7.2 backwards compatibility
* Bugfixes
* Async key generation
* Some simplifications
* Transport fixes
* Cleanup
* async API
* Performance fixes
* Fixes to async API
* Bugfixes
* Implement one-time async loop
* Authorization and logging fixes
* Update to layer 91
* 7to5 fix
* Null coalesce conversion
* Implement socks5 proxy
* Implement HTTP proxy
* Fixes to HTTP proxy
* MTProxy and socks5 fixes
* Disable PHP 5 conversion
* Proxies have higher priority
* Avoid error handling in vendor
* Override composer dependencies
* Fix travis build
* Final composer fixes
* Proxy logic fixes
* Fix get_updates update handling
* Do not use parallel file driver if not supported
* Refactor loader and implement HTTP fixes
* Suppress errors in loader
* HTTP and authorization fixes
* HTTP fixes
* Improved peer management
* Use HTTP protocol on altervista
* Small bugfixes
* Minor fixes
* Docufix
* Docufix
* Legacy fixes
* Fix message queue
* Avoid updating if using MTProxy
* Improve logs and examples
* Trim final newlines while converting parse mode
* Reimplement noResponse flag
* Async combined event handler and APIFactory fixes
* Actually return config
* Case-insensitive methods
* Bugfix
* Apply fixes from StyleCI (#545)
* MTProxy fixes
* PHP 5 warning
* Improved PHP 5 warning
* Use <br> along with newlines in web logs
* Update docs
2018-12-26 20:51:14 +01:00
*/
2019-09-18 20:46:20 +02:00
public function getStrings ( $params );
2019-06-05 15:38:32 +02:00
/**
2019-12-27 17:43:29 +01:00
* Get new strings in languagepack .
2019-09-18 20:46:20 +02:00
*
2019-09-18 21:32:24 +02:00
* Parameters :
* * `string` ** lang_pack ** - Language pack
2019-12-27 17:43:29 +01:00
* * `string` ** lang_code ** - Language code
* * `int` ** from_version ** - Previous localization pack version
2019-09-18 21:32:24 +02:00
*
2019-09-18 20:46:20 +02:00
* @ param array $params Parameters
2019-06-05 15:38:32 +02:00
*
* @ return LangPackDifference
*/
2019-09-18 20:46:20 +02:00
public function getDifference ( $params );
2019-06-05 15:38:32 +02:00
/**
2019-12-27 17:43:29 +01:00
* Get information about all languages in a localization pack .
2019-06-05 15:38:32 +02:00
*
2019-09-18 21:32:24 +02:00
* Parameters :
2019-12-27 17:43:29 +01:00
* * `string` ** lang_pack ** - Language pack
2019-09-18 21:32:24 +02:00
*
2019-09-18 20:46:20 +02:00
* @ param array $params Parameters
*
2019-12-14 16:47:04 +01:00
* @ return of LangPackLanguage []
2019-06-05 15:38:32 +02:00
*/
2019-09-18 20:46:20 +02:00
public function getLanguages ( $params );
2019-06-05 15:38:32 +02:00
/**
2019-12-27 17:43:29 +01:00
* Get information about a language in a localization pack .
2019-09-18 20:46:20 +02:00
*
2019-09-18 21:32:24 +02:00
* Parameters :
2019-12-27 17:43:29 +01:00
* * `string` ** lang_pack ** - Language pack name
* * `string` ** lang_code ** - Language code
2019-09-18 21:32:24 +02:00
*
2019-09-18 20:46:20 +02:00
* @ param array $params Parameters
2019-06-05 15:38:32 +02:00
*
* @ return LangPackLanguage
*/
2019-09-18 20:46:20 +02:00
public function getLanguage ( $params );
2018-02-24 17:54:39 +01:00
}
2019-06-23 13:08:44 +02:00
interface folders
{
/**
2020-06-16 17:52:55 +02:00
* Edit peers in [ peer folder ]( https :// core . telegram . org / api / folders #peer-folders).
2019-09-18 20:46:20 +02:00
*
2019-09-18 21:32:24 +02:00
* Parameters :
2020-06-16 17:52:55 +02:00
* * `[InputFolderPeer]` ** folder_peers ** - New peer list
2019-09-18 21:32:24 +02:00
*
2019-09-18 20:46:20 +02:00
* @ param array $params Parameters
2019-06-23 13:08:44 +02:00
*
* @ return Updates
*/
2019-09-18 20:46:20 +02:00
public function editPeerFolders ( $params );
2019-06-23 13:08:44 +02:00
/**
2020-06-16 17:52:55 +02:00
* Delete a [ peer folder ]( https :// core . telegram . org / api / folders #peer-folders).
2019-09-18 20:46:20 +02:00
*
2019-09-18 21:32:24 +02:00
* Parameters :
2020-06-16 17:52:55 +02:00
* * `int` ** folder_id ** - [ Peer folder ID , for more info click here ]( https :// core . telegram . org / api / folders #peer-folders)
2019-09-18 21:32:24 +02:00
*
2019-09-18 20:46:20 +02:00
* @ param array $params Parameters
2019-06-23 13:08:44 +02:00
*
* @ return Updates
*/
2019-09-18 20:46:20 +02:00
public function deleteFolder ( $params );
2019-06-23 13:08:44 +02:00
}
2019-09-18 20:46:20 +02:00
2020-04-03 14:10:46 +02:00
interface stats
{
/**
2020-06-16 17:52:55 +02:00
* Get [ channel statistics ]( https :// core . telegram . org / api / stats ) .
2020-04-03 14:10:46 +02:00
*
* Parameters :
2020-06-16 17:52:55 +02:00
* * `boolean` ** dark ** - Optional : Whether to enable dark theme for graph colors
* * `InputChannel` ** channel ** - The channel
2020-04-03 14:10:46 +02:00
*
* @ param array $params Parameters
*
* @ return stats . BroadcastStats
*/
public function getBroadcastStats ( $params );
/**
2020-06-16 17:52:55 +02:00
* Load [ channel statistics graph ]( https :// core . telegram . org / api / stats ) asynchronously .
2020-04-03 14:10:46 +02:00
*
* Parameters :
2020-06-16 17:52:55 +02:00
* * `string` ** token ** - Graph token from [ statsGraphAsync ]( https :// docs . madelineproto . xyz / API_docs / constructors / statsGraphAsync . html ) constructor
* * `long` ** x ** - Optional : Zoom value , if required
2020-04-03 14:10:46 +02:00
*
* @ param array $params Parameters
*
* @ return StatsGraph
*/
public function loadAsyncGraph ( $params );
2020-09-12 12:50:22 +02:00
/**
*
*
* Parameters :
* * `boolean` ** dark ** - Optional :
* * `InputChannel` ** channel ** -.
*
* @ param array $params Parameters
*
* @ return stats . MegagroupStats
*/
public function getMegagroupStats ( $params );
2020-10-01 18:02:54 +02:00
/**
*
*
* Parameters :
* * `InputChannel` ** channel ** -
* * `int` ** msg_id ** -
* * `int` ** offset_rate ** -
* * `InputPeer` ** offset_peer ** -
* * `int` ** offset_id ** -
* * `int` ** limit ** -.
*
* @ param array $params Parameters
*
* @ return messages . Messages
*/
public function getMessagePublicForwards ( $params );
/**
*
*
* Parameters :
* * `boolean` ** dark ** - Optional :
* * `InputChannel` ** channel ** -
* * `int` ** msg_id ** -.
*
* @ param array $params Parameters
*
* @ return stats . MessageStats
*/
public function getMessageStats ( $params );
2020-04-03 14:10:46 +02:00
}
2019-09-18 20:46:20 +02:00
class InternalDoc extends APIFactory
{
2019-10-31 15:06:25 +01:00
/**
2020-04-05 15:33:01 +02:00
* Convert MTProto parameters to bot API parameters .
2019-10-31 15:06:25 +01:00
*
2020-04-05 15:33:01 +02:00
* @ param array $data Data
*
* @ return \Generator < array >
2019-10-31 15:06:25 +01:00
*/
2020-04-05 15:33:01 +02:00
public function MTProtoToBotAPI ( array $data , array $extra = [])
2019-09-18 20:46:20 +02:00
{
2020-04-05 15:33:01 +02:00
return $this -> __call ( __FUNCTION__ , [ $data , $extra ]);
2019-09-18 20:46:20 +02:00
}
2019-10-31 15:06:25 +01:00
/**
2020-04-05 15:33:01 +02:00
* MTProto to TD params .
2019-10-31 15:06:25 +01:00
*
2020-04-05 15:33:01 +02:00
* @ param mixed $params Params
2019-10-31 15:06:25 +01:00
*
2020-04-05 15:33:01 +02:00
* @ return \Generator
2019-10-31 15:06:25 +01:00
*/
2020-04-05 15:33:01 +02:00
public function MTProtoToTd ( & $params , array $extra = [])
2019-09-18 20:46:20 +02:00
{
2020-04-05 15:33:01 +02:00
return $this -> __call ( __FUNCTION__ , [ $params , $extra ]);
2019-09-18 20:46:20 +02:00
}
2019-10-31 20:48:06 +01:00
/**
2020-04-05 15:33:01 +02:00
* MTProto to TDCLI params .
2019-10-31 20:48:06 +01:00
*
2020-04-05 15:33:01 +02:00
* @ param mixed $params Params
*
* @ return \Generator
2019-10-31 20:48:06 +01:00
*/
2020-04-05 15:33:01 +02:00
public function MTProtoToTdcli ( $params , array $extra = [])
2019-10-31 20:48:06 +01:00
{
2020-04-05 15:33:01 +02:00
return $this -> __call ( __FUNCTION__ , [ $params , $extra ]);
2019-10-31 20:48:06 +01:00
}
/**
2020-04-05 15:33:01 +02:00
* Accept call .
2019-10-31 20:48:06 +01:00
*
2020-04-05 15:33:01 +02:00
* @ param array $call Call
*
* @ return \Generator
2019-10-31 20:48:06 +01:00
*/
2020-04-05 15:33:01 +02:00
public function acceptCall ( array $call , array $extra = [])
2019-10-31 20:48:06 +01:00
{
2020-04-05 15:33:01 +02:00
return $this -> __call ( __FUNCTION__ , [ $call , $extra ]);
2019-10-31 20:48:06 +01:00
}
/**
2020-04-05 15:33:01 +02:00
* Accept secret chat .
2019-10-31 20:48:06 +01:00
*
2020-04-05 15:33:01 +02:00
* @ param array $params Secret chat ID
*
* @ return \Generator
2019-10-31 20:48:06 +01:00
*/
2020-04-05 15:33:01 +02:00
public function acceptSecretChat ( $params , array $extra = [])
2019-10-31 20:48:06 +01:00
{
2020-04-05 15:33:01 +02:00
return $this -> __call ( __FUNCTION__ , [ $params , $extra ]);
2019-10-31 20:48:06 +01:00
}
2019-12-13 15:37:57 +01:00
/**
2020-04-05 15:33:01 +02:00
* Accept terms of service update .
2019-12-13 15:37:57 +01:00
*
2020-04-05 15:33:01 +02:00
* @ return \Generator
2019-12-13 15:37:57 +01:00
*/
2020-04-05 15:33:01 +02:00
public function acceptTos ( array $extra = [])
2019-12-13 15:37:57 +01:00
{
2020-04-05 15:33:01 +02:00
return $this -> __call ( __FUNCTION__ , [ $extra ]);
2019-12-13 15:37:57 +01:00
}
2019-10-31 15:06:25 +01:00
/**
2020-04-05 15:33:01 +02:00
* Add user info .
2019-10-31 15:06:25 +01:00
*
2020-04-05 15:33:01 +02:00
* @ param array $user User info
*
2020-06-16 17:52:55 +02:00
* @ return \Generator
* @ throws \danog\MadelineProto\Exception
2019-10-31 15:06:25 +01:00
*/
2020-06-16 17:52:55 +02:00
public function addUser ( array $user , array $extra = [])
2019-09-18 20:46:20 +02:00
{
2020-06-16 17:52:55 +02:00
return $this -> __call ( __FUNCTION__ , [ $user , $extra ]);
2019-09-18 20:46:20 +02:00
}
2019-10-31 15:06:25 +01:00
/**
2020-04-05 15:33:01 +02:00
* Call promise $b after promise $a .
2019-10-31 15:06:25 +01:00
*
2020-04-05 15:33:01 +02:00
* @ param \Generator | Promise $a Promise A
* @ param \Generator | Promise $b Promise B
*
2020-06-16 17:52:55 +02:00
* @ psalm - suppress InvalidScope
*
2020-04-05 15:33:01 +02:00
* @ return Promise
2019-10-31 15:06:25 +01:00
*/
2020-04-05 15:33:01 +02:00
public function after ( $a , $b )
2019-09-18 20:46:20 +02:00
{
2020-04-05 15:33:01 +02:00
return \danog\MadelineProto\Tools :: after ( $a , $b );
2019-09-18 20:46:20 +02:00
}
2019-10-31 15:06:25 +01:00
/**
2020-04-05 15:33:01 +02:00
* Returns a promise that succeeds when all promises succeed , and fails if any promise fails .
* Returned promise succeeds with an array of values used to succeed each contained promise , with keys corresponding to the array of promises .
2019-10-31 15:06:25 +01:00
*
2020-04-05 15:33:01 +02:00
* @ param array < \Generator | Promise > $promises Promises
2019-10-31 15:06:25 +01:00
*
2020-04-05 15:33:01 +02:00
* @ return Promise
2019-10-31 15:06:25 +01:00
*/
2020-04-05 15:33:01 +02:00
public function all ( array $promises )
2019-09-18 20:46:20 +02:00
{
2020-04-05 15:33:01 +02:00
return \danog\MadelineProto\Tools :: all ( $promises );
2019-09-18 20:46:20 +02:00
}
/**
2020-04-05 15:33:01 +02:00
* Returns a promise that is resolved when all promises are resolved . The returned promise will not fail .
2019-09-18 20:46:20 +02:00
*
2020-04-05 15:33:01 +02:00
* @ param array < Promise | \Generator > $promises Promises
*
* @ return Promise
2019-09-18 20:46:20 +02:00
*/
2020-04-05 15:33:01 +02:00
public function any ( array $promises )
2019-09-18 20:46:20 +02:00
{
2020-04-05 15:33:01 +02:00
return \danog\MadelineProto\Tools :: any ( $promises );
2019-09-18 20:46:20 +02:00
}
2020-02-25 18:02:32 +01:00
/**
2020-04-05 15:33:01 +02:00
* Create array .
2020-02-25 18:02:32 +01:00
*
2020-04-05 15:33:01 +02:00
* @ param mixed ... $params Params
2020-02-25 18:02:32 +01:00
*
2020-04-05 15:33:01 +02:00
* @ return array
2020-02-25 18:02:32 +01:00
*/
2020-04-05 15:33:01 +02:00
public function arr ( ... $params ) : array
2020-02-25 18:02:32 +01:00
{
2020-04-05 15:33:01 +02:00
return \danog\MadelineProto\Tools :: arr ( ... $params );
2020-02-25 18:02:32 +01:00
}
2020-02-26 18:12:00 +01:00
/**
2020-04-05 15:33:01 +02:00
* base64URL decode .
2020-02-26 18:12:00 +01:00
*
2020-04-05 15:33:01 +02:00
* @ param string $data Data to decode
*
* @ return string
2020-02-26 18:12:00 +01:00
*/
2020-04-05 15:33:01 +02:00
public function base64urlDecode ( string $data ) : string
2020-02-26 18:12:00 +01:00
{
2020-04-05 15:33:01 +02:00
return \danog\MadelineProto\Tools :: base64urlDecode ( $data );
2020-02-26 18:12:00 +01:00
}
2019-10-31 15:06:25 +01:00
/**
2020-04-05 15:33:01 +02:00
* Base64URL encode .
2019-10-31 15:06:25 +01:00
*
2020-04-05 15:33:01 +02:00
* @ param string $data Data to encode
*
* @ return string
2019-10-31 15:06:25 +01:00
*/
2020-04-05 15:33:01 +02:00
public function base64urlEncode ( string $data ) : string
2019-09-18 20:46:20 +02:00
{
2020-04-05 15:33:01 +02:00
return \danog\MadelineProto\Tools :: base64urlEncode ( $data );
2019-09-18 20:46:20 +02:00
}
2019-10-31 20:48:06 +01:00
/**
2020-04-05 15:33:01 +02:00
* Convert bot API parameters to MTProto parameters .
2019-10-31 20:48:06 +01:00
*
2020-04-05 15:33:01 +02:00
* @ param array $arguments Arguments
*
* @ return \Generator < array >
2019-10-31 20:48:06 +01:00
*/
2020-04-05 15:33:01 +02:00
public function botAPIToMTProto ( array $arguments , array $extra = [])
2019-10-31 20:48:06 +01:00
{
2020-04-05 15:33:01 +02:00
return $this -> __call ( __FUNCTION__ , [ $arguments , $extra ]);
2019-10-31 20:48:06 +01:00
}
2019-10-31 15:06:25 +01:00
/**
2020-04-05 15:33:01 +02:00
* Login as bot .
2019-10-31 15:06:25 +01:00
*
2020-04-05 15:33:01 +02:00
* @ param string $token Bot token
2019-10-31 15:06:25 +01:00
*
* @ return \Generator
*/
2020-04-05 15:33:01 +02:00
public function botLogin ( string $token , array $extra = [])
2019-09-18 20:46:20 +02:00
{
2020-04-05 15:33:01 +02:00
return $this -> __call ( __FUNCTION__ , [ $token , $extra ]);
2019-09-18 20:46:20 +02:00
}
2019-10-31 15:06:25 +01:00
/**
2020-04-05 15:33:01 +02:00
* Convert generator , promise or any other value to a promise .
2019-10-31 15:06:25 +01:00
*
2020-04-05 15:33:01 +02:00
* @ param \Generator | Promise | mixed $promise
*
* @ return Promise
2019-10-31 15:06:25 +01:00
*/
2020-04-05 15:33:01 +02:00
public function call ( $promise )
2019-09-18 20:46:20 +02:00
{
2020-04-05 15:33:01 +02:00
return \danog\MadelineProto\Tools :: call ( $promise );
2019-09-18 20:46:20 +02:00
}
2019-10-31 15:06:25 +01:00
/**
2020-04-05 15:33:01 +02:00
* Call promise in background .
2019-10-31 15:06:25 +01:00
*
2020-04-05 15:33:01 +02:00
* @ param \Generator | Promise $promise Promise to resolve
* @ param ? \Generator | Promise $actual Promise to resolve instead of $promise
* @ param string $file File
2019-10-31 15:06:25 +01:00
*
2020-06-16 17:52:55 +02:00
* @ psalm - suppress InvalidScope
*
2020-04-05 15:33:01 +02:00
* @ return Promise | mixed
2019-10-31 15:06:25 +01:00
*/
2020-04-05 15:33:01 +02:00
public function callFork ( $promise , $actual = null , $file = '' )
2019-09-18 20:46:20 +02:00
{
2020-04-05 15:33:01 +02:00
return \danog\MadelineProto\Tools :: callFork ( $promise , $actual , $file );
2019-09-18 20:46:20 +02:00
}
2019-10-31 15:06:25 +01:00
/**
2020-04-05 15:33:01 +02:00
* Call promise in background , deferring execution .
2019-10-31 15:06:25 +01:00
*
2020-04-05 15:33:01 +02:00
* @ param \Generator | Promise $promise Promise to resolve
*
* @ return void
2019-10-31 15:06:25 +01:00
*/
2020-04-05 15:33:01 +02:00
public function callForkDefer ( $promise ) : void
2019-09-18 20:46:20 +02:00
{
2020-04-05 15:33:01 +02:00
\danog\MadelineProto\Tools :: callForkDefer ( $promise );
2019-09-18 20:46:20 +02:00
}
2019-10-31 15:06:25 +01:00
/**
2020-04-05 15:33:01 +02:00
* Get call status .
2019-10-31 15:06:25 +01:00
*
2020-04-05 15:33:01 +02:00
* @ param int $id Call ID
2019-10-31 15:06:25 +01:00
*
2020-04-05 15:33:01 +02:00
* @ return integer
2019-10-31 15:06:25 +01:00
*/
2020-09-12 12:50:22 +02:00
public function callStatus ( $id ) : int
2019-09-18 20:46:20 +02:00
{
2020-04-05 15:33:01 +02:00
return $this -> API -> callStatus ( $id );
2019-09-18 20:46:20 +02:00
}
2019-10-31 15:06:25 +01:00
/**
2020-04-05 15:33:01 +02:00
* Check state of calls .
2019-10-31 15:06:25 +01:00
*
2020-04-05 15:33:01 +02:00
* @ return void
2019-10-31 15:06:25 +01:00
*/
2020-04-05 15:33:01 +02:00
public function checkCalls () : void
2019-09-18 20:46:20 +02:00
{
2020-04-05 15:33:01 +02:00
$this -> API -> checkCalls ();
2019-09-18 20:46:20 +02:00
}
2020-02-25 18:02:32 +01:00
/**
2020-04-05 15:33:01 +02:00
* Check for terms of service update .
2020-02-25 18:02:32 +01:00
*
2020-04-05 15:33:01 +02:00
* @ return \Generator
2020-02-25 18:02:32 +01:00
*/
2020-04-05 15:33:01 +02:00
public function checkTos ( array $extra = [])
2020-02-25 18:02:32 +01:00
{
return $this -> __call ( __FUNCTION__ , [ $extra ]);
}
2020-02-23 19:28:42 +01:00
/**
2020-04-05 15:33:01 +02:00
* Cleanup memory and session file .
2020-02-23 19:28:42 +01:00
*
2020-09-24 20:49:34 +02:00
* @ return void
2020-02-23 19:28:42 +01:00
*/
2020-09-24 20:49:34 +02:00
public function cleanup () : void
2020-02-23 19:28:42 +01:00
{
2020-04-05 15:33:01 +02:00
$this -> API -> cleanup ();
2020-02-23 19:28:42 +01:00
}
/**
2020-04-05 15:33:01 +02:00
* Close connection with client , connected via web .
2020-02-23 19:28:42 +01:00
*
2020-04-05 15:33:01 +02:00
* @ param string $message Message
2020-02-23 19:28:42 +01:00
*
2020-04-05 15:33:01 +02:00
* @ return void
2020-02-23 19:28:42 +01:00
*/
2020-04-05 15:33:01 +02:00
public function closeConnection ( $message = 'OK!' , array $extra = [])
2020-02-23 19:28:42 +01:00
{
2020-04-05 15:33:01 +02:00
return $this -> __call ( __FUNCTION__ , [ $message , $extra ]);
2020-02-23 19:28:42 +01:00
}
/**
2020-04-05 15:33:01 +02:00
* Complete 2 FA login .
2020-02-23 19:28:42 +01:00
*
2020-04-05 15:33:01 +02:00
* @ param string $password Password
2020-02-23 19:28:42 +01:00
*
* @ return \Generator
*/
2020-04-05 15:33:01 +02:00
public function complete2faLogin ( string $password , array $extra = [])
2020-02-23 19:28:42 +01:00
{
2020-04-05 15:33:01 +02:00
return $this -> __call ( __FUNCTION__ , [ $password , $extra ]);
2020-02-23 19:28:42 +01:00
}
2020-02-25 18:02:32 +01:00
/**
2020-04-05 15:33:01 +02:00
* Complete call handshake .
2020-02-25 18:02:32 +01:00
*
2020-04-05 15:33:01 +02:00
* @ param array $params Params
*
* @ return \Generator
2020-02-25 18:02:32 +01:00
*/
2020-04-05 15:33:01 +02:00
public function completeCall ( array $params , array $extra = [])
2020-02-25 18:02:32 +01:00
{
2020-04-05 15:33:01 +02:00
return $this -> __call ( __FUNCTION__ , [ $params , $extra ]);
2020-02-25 18:02:32 +01:00
}
2019-09-18 20:46:20 +02:00
/**
2020-04-05 15:33:01 +02:00
* Complet user login using login code .
2019-09-18 20:46:20 +02:00
*
2020-04-05 15:33:01 +02:00
* @ param string $code Login code
2019-09-18 20:46:20 +02:00
*
2020-02-07 21:13:49 +01:00
* @ return \Generator
2019-09-18 20:46:20 +02:00
*/
2020-04-05 15:33:01 +02:00
public function completePhoneLogin ( $code , array $extra = [])
2019-09-18 20:46:20 +02:00
{
2020-04-05 15:33:01 +02:00
return $this -> __call ( __FUNCTION__ , [ $code , $extra ]);
2019-09-18 20:46:20 +02:00
}
/**
2020-04-05 15:33:01 +02:00
* Complete signup to Telegram .
2019-09-18 20:46:20 +02:00
*
2020-04-05 15:33:01 +02:00
* @ param string $first_name First name
* @ param string $last_name Last name
2019-09-18 20:46:20 +02:00
*
2020-02-07 21:13:49 +01:00
* @ return \Generator
2019-09-18 20:46:20 +02:00
*/
2020-04-05 15:33:01 +02:00
public function completeSignup ( string $first_name , string $last_name = '' , array $extra = [])
2019-09-18 20:46:20 +02:00
{
2020-04-05 15:33:01 +02:00
return $this -> __call ( __FUNCTION__ , [ $first_name , $last_name , $extra ]);
2019-09-18 20:46:20 +02:00
}
2019-12-27 20:29:22 +01:00
/**
2020-04-05 15:33:01 +02:00
* Confirm call .
2019-12-27 20:29:22 +01:00
*
2020-04-05 15:33:01 +02:00
* @ param array $params Params
2019-12-27 20:29:22 +01:00
*
2020-04-05 15:33:01 +02:00
* @ return \Generator
2019-12-27 20:29:22 +01:00
*/
2020-04-05 15:33:01 +02:00
public function confirmCall ( array $params , array $extra = [])
2019-09-18 20:46:20 +02:00
{
2020-04-05 15:33:01 +02:00
return $this -> __call ( __FUNCTION__ , [ $params , $extra ]);
2019-09-18 20:46:20 +02:00
}
2019-12-27 20:29:22 +01:00
/**
2020-04-05 15:33:01 +02:00
* Connects to all datacenters and if necessary creates authorization keys , binds them and writes client info .
2019-12-27 20:29:22 +01:00
*
2020-04-05 15:33:01 +02:00
* @ param boolean $reconnectAll Whether to reconnect to all DCs
2019-12-27 20:29:22 +01:00
*
2020-04-05 15:33:01 +02:00
* @ return \Generator
2019-12-27 20:29:22 +01:00
*/
2020-04-05 15:33:01 +02:00
public function connectToAllDcs ( bool $reconnectAll = true , array $extra = [])
2019-09-18 20:46:20 +02:00
{
2020-04-05 15:33:01 +02:00
return $this -> __call ( __FUNCTION__ , [ $reconnectAll , $extra ]);
2019-09-18 20:46:20 +02:00
}
2019-12-27 20:29:22 +01:00
/**
2020-04-05 15:33:01 +02:00
* Decline terms of service update .
2019-12-27 20:29:22 +01:00
*
2020-04-05 15:33:01 +02:00
* THIS WILL DELETE YOUR ACCOUNT !
2019-12-27 20:29:22 +01:00
*
2020-04-05 15:33:01 +02:00
* @ return \Generator
2019-12-27 20:29:22 +01:00
*/
2020-04-05 15:33:01 +02:00
public function declineTos ( array $extra = [])
2019-09-18 20:46:20 +02:00
{
2020-04-05 15:33:01 +02:00
return $this -> __call ( __FUNCTION__ , [ $extra ]);
2019-09-18 20:46:20 +02:00
}
2019-12-28 16:07:09 +01:00
/**
2020-04-05 15:33:01 +02:00
* Discard call .
2019-12-28 16:07:09 +01:00
*
2020-04-05 15:33:01 +02:00
* @ param array $call Call
* @ param string $reason Discard reason
* @ param array $rating Rating
* @ param boolean $need_debug Need debug ?
2019-12-28 16:07:09 +01:00
*
2020-04-05 15:33:01 +02:00
* @ return \Generator
2019-12-28 16:07:09 +01:00
*/
2020-04-05 15:33:01 +02:00
public function discardCall ( array $call , array $reason , array $rating = [
], bool $need_debug = true , array $extra = [])
2019-09-18 20:46:20 +02:00
{
2020-04-05 15:33:01 +02:00
return $this -> __call ( __FUNCTION__ , [ $call , $reason , $rating , $need_debug , $extra ]);
2019-09-18 20:46:20 +02:00
}
2019-12-27 20:29:22 +01:00
/**
2020-04-05 15:33:01 +02:00
* Discard secret chat .
2019-12-27 20:29:22 +01:00
*
2020-04-05 15:33:01 +02:00
* @ param int $chat Secret chat ID
2019-12-27 20:29:22 +01:00
*
2020-04-05 15:33:01 +02:00
* @ return \Generator
2019-12-27 20:29:22 +01:00
*/
2020-04-05 15:33:01 +02:00
public function discardSecretChat ( int $chat , array $extra = [])
2019-09-18 20:46:20 +02:00
{
2020-04-05 15:33:01 +02:00
return $this -> __call ( __FUNCTION__ , [ $chat , $extra ]);
2019-09-18 20:46:20 +02:00
}
2019-12-27 20:29:22 +01:00
/**
2020-04-05 15:33:01 +02:00
* Download file to browser .
2019-12-27 20:29:22 +01:00
*
2020-04-05 15:33:01 +02:00
* Supports HEAD requests and content - ranges for parallel and resumed downloads .
2019-12-27 20:29:22 +01:00
*
2020-04-05 15:33:01 +02:00
* @ param array | string $messageMedia File to download
* @ param callable $cb Status callback ( can also use FileCallback )
2019-12-27 20:29:22 +01:00
*
2020-04-05 15:33:01 +02:00
* @ return \Generator
2019-12-27 20:29:22 +01:00
*/
2020-04-05 15:33:01 +02:00
public function downloadToBrowser ( $messageMedia , ? callable $cb = null , array $extra = [])
2019-09-18 20:46:20 +02:00
{
2020-04-05 15:33:01 +02:00
return $this -> __call ( __FUNCTION__ , [ $messageMedia , $cb , $extra ]);
2019-09-18 20:46:20 +02:00
}
2019-12-27 20:29:22 +01:00
/**
2020-04-05 15:33:01 +02:00
* Download file to callable .
* The callable must accept two parameters : string $payload , int $offset
* The callable will be called ( possibly out of order , depending on the value of $seekable ) .
* The callable should return the number of written bytes .
2019-12-27 20:29:22 +01:00
*
2020-04-05 15:33:01 +02:00
* @ param mixed $messageMedia File to download
* @ param callable | FileCallbackInterface $callable Chunk callback
* @ param callable $cb Status callback ( DEPRECATED , use FileCallbackInterface )
* @ param bool $seekable Whether the callable can be called out of order
* @ param int $offset Offset where to start downloading
* @ param int $end Offset where to stop downloading ( inclusive )
* @ param int $part_size Size of each chunk
2019-12-27 20:29:22 +01:00
*
2020-04-05 15:33:01 +02:00
* @ return \Generator < bool >
2019-12-27 20:29:22 +01:00
*/
2020-04-05 15:33:01 +02:00
public function downloadToCallable ( $messageMedia , callable $callable , $cb = null , bool $seekable = true , int $offset = 0 , int $end = - 1 , ? int $part_size = null , array $extra = [])
2019-09-18 20:46:20 +02:00
{
2020-04-05 15:33:01 +02:00
return $this -> __call ( __FUNCTION__ , [ $messageMedia , $callable , $cb , $seekable , $offset , $end , $part_size , $extra ]);
2019-09-18 20:46:20 +02:00
}
2019-12-28 16:07:09 +01:00
/**
2020-04-05 15:33:01 +02:00
* Download file to directory .
2019-12-28 16:07:09 +01:00
*
2020-04-05 15:33:01 +02:00
* @ param mixed $messageMedia File to download
* @ param string | FileCallbackInterface $dir Directory where to download the file
* @ param callable $cb Callback ( DEPRECATED , use FileCallbackInterface )
2019-12-28 16:07:09 +01:00
*
2020-04-05 15:33:01 +02:00
* @ return \Generator < string > Downloaded file path
2019-12-28 16:07:09 +01:00
*/
2020-04-05 15:33:01 +02:00
public function downloadToDir ( $messageMedia , $dir , $cb = null , array $extra = [])
2019-09-18 20:46:20 +02:00
{
2020-04-05 15:33:01 +02:00
return $this -> __call ( __FUNCTION__ , [ $messageMedia , $dir , $cb , $extra ]);
2019-09-18 20:46:20 +02:00
}
2019-12-27 20:29:22 +01:00
/**
2020-04-05 15:33:01 +02:00
* Download file .
2019-12-27 20:29:22 +01:00
*
2020-04-05 15:33:01 +02:00
* @ param mixed $messageMedia File to download
* @ param string | FileCallbackInterface $file Downloaded file path
* @ param callable $cb Callback ( DEPRECATED , use FileCallbackInterface )
2019-12-27 20:29:22 +01:00
*
2020-04-05 15:33:01 +02:00
* @ return \Generator < string > Downloaded file path
2019-12-27 20:29:22 +01:00
*/
2020-04-05 15:33:01 +02:00
public function downloadToFile ( $messageMedia , $file , $cb = null , array $extra = [])
2019-09-18 20:46:20 +02:00
{
2020-04-05 15:33:01 +02:00
return $this -> __call ( __FUNCTION__ , [ $messageMedia , $file , $cb , $extra ]);
2019-09-18 20:46:20 +02:00
}
2019-12-27 20:29:22 +01:00
/**
2020-04-05 15:33:01 +02:00
* Download file to amphp / http - server response .
2019-12-27 20:29:22 +01:00
*
2020-04-05 15:33:01 +02:00
* Supports HEAD requests and content - ranges for parallel and resumed downloads .
2019-12-27 20:29:22 +01:00
*
2020-04-05 15:33:01 +02:00
* @ param array | string $messageMedia File to download
* @ param ServerRequest $request Request
* @ param callable $cb Status callback ( can also use FileCallback )
2019-12-27 20:29:22 +01:00
*
2020-04-05 15:33:01 +02:00
* @ return \Generator < Response > Returned response
2019-12-27 20:29:22 +01:00
*/
2020-04-05 15:33:01 +02:00
public function downloadToResponse ( $messageMedia , \Amp\Http\Server\Request $request , ? callable $cb = null , array $extra = [])
2019-09-18 20:46:20 +02:00
{
2020-04-05 15:33:01 +02:00
return $this -> __call ( __FUNCTION__ , [ $messageMedia , $request , $cb , $extra ]);
2019-09-18 20:46:20 +02:00
}
2019-12-28 16:07:09 +01:00
/**
2020-04-05 15:33:01 +02:00
* Download file to stream .
2019-12-28 16:07:09 +01:00
*
2020-04-05 15:33:01 +02:00
* @ param mixed $messageMedia File to download
* @ param mixed | FileCallbackInterface $stream Stream where to download file
* @ param callable $cb Callback ( DEPRECATED , use FileCallbackInterface )
* @ param int $offset Offset where to start downloading
* @ param int $end Offset where to end download
2019-12-28 16:07:09 +01:00
*
2020-04-05 15:33:01 +02:00
* @ return \Generator < bool >
2019-12-28 16:07:09 +01:00
*/
2020-04-05 15:33:01 +02:00
public function downloadToStream ( $messageMedia , $stream , $cb = null , int $offset = 0 , int $end = - 1 , array $extra = [])
2019-09-18 20:46:20 +02:00
{
2020-04-05 15:33:01 +02:00
return $this -> __call ( __FUNCTION__ , [ $messageMedia , $stream , $cb , $offset , $end , $extra ]);
2019-09-18 20:46:20 +02:00
}
2019-12-27 20:29:22 +01:00
/**
2020-04-05 15:33:01 +02:00
* Asynchronously write to stdout / browser .
2019-12-27 20:29:22 +01:00
*
2020-04-05 15:33:01 +02:00
* @ param string $string Message to echo
2019-12-27 20:29:22 +01:00
*
2020-04-05 15:33:01 +02:00
* @ return Promise
2019-12-27 20:29:22 +01:00
*/
2020-04-05 15:33:01 +02:00
public function echo ( string $string )
2019-09-18 20:46:20 +02:00
{
2020-04-05 15:33:01 +02:00
return \danog\MadelineProto\Tools :: echo ( $string );
2019-09-18 20:46:20 +02:00
}
2019-12-27 20:29:22 +01:00
/**
2020-04-05 15:33:01 +02:00
* Get final element of array .
2019-12-27 20:29:22 +01:00
*
2020-04-05 15:33:01 +02:00
* @ param array $what Array
2019-12-27 20:29:22 +01:00
*
2020-04-05 15:33:01 +02:00
* @ return mixed
2019-12-27 20:29:22 +01:00
*/
2020-04-05 15:33:01 +02:00
public function end ( array $what )
2019-09-18 20:46:20 +02:00
{
2020-04-05 15:33:01 +02:00
return \danog\MadelineProto\Tools :: end ( $what );
2019-09-18 20:46:20 +02:00
}
2019-12-27 20:29:22 +01:00
/**
2020-04-05 15:33:01 +02:00
* Export authorization .
2019-12-27 20:29:22 +01:00
*
2020-04-05 15:33:01 +02:00
* @ return \Generator < array >
2019-12-27 20:29:22 +01:00
*/
2020-04-05 15:33:01 +02:00
public function exportAuthorization ( array $extra = [])
2019-09-18 20:46:20 +02:00
{
2020-04-05 15:33:01 +02:00
return $this -> __call ( __FUNCTION__ , [ $extra ]);
2019-09-18 20:46:20 +02:00
}
2019-12-27 20:29:22 +01:00
/**
2020-04-05 15:33:01 +02:00
* Extract file info from bot API message .
2019-12-27 21:24:50 +01:00
*
2020-04-05 15:33:01 +02:00
* @ param array $info Bot API message object
2019-12-27 20:29:22 +01:00
*
2020-04-05 15:33:01 +02:00
* @ return ? array
2019-12-27 20:29:22 +01:00
*/
2020-04-05 15:33:01 +02:00
public function extractBotAPIFile ( array $info ) : ? array
2019-09-18 20:46:20 +02:00
{
2020-04-05 15:33:01 +02:00
return \danog\MadelineProto\MTProto :: extractBotAPIFile ( $info );
2019-09-18 20:46:20 +02:00
}
2019-12-27 20:29:22 +01:00
/**
2020-04-05 15:33:01 +02:00
* Get contents of remote file asynchronously .
2019-12-27 20:29:22 +01:00
*
2020-04-05 15:33:01 +02:00
* @ param string $url URL
2019-12-27 20:29:22 +01:00
*
2020-04-05 15:33:01 +02:00
* @ return \Generator < string >
2019-12-27 20:29:22 +01:00
*/
2020-04-05 15:33:01 +02:00
public function fileGetContents ( string $url , array $extra = [])
2019-09-18 20:46:20 +02:00
{
2020-04-05 15:33:01 +02:00
return $this -> __call ( __FUNCTION__ , [ $url , $extra ]);
2019-09-18 20:46:20 +02:00
}
2019-12-27 20:29:22 +01:00
/**
2020-04-05 15:33:01 +02:00
* Returns a promise that succeeds when the first promise succeeds , and fails only if all promises fail .
2019-12-27 20:29:22 +01:00
*
2020-04-05 15:33:01 +02:00
* @ param array < Promise | \Generator > $promises Promises
2019-12-27 20:29:22 +01:00
*
2020-04-05 15:33:01 +02:00
* @ return Promise
2019-12-27 20:29:22 +01:00
*/
2020-04-05 15:33:01 +02:00
public function first ( array $promises )
2019-09-18 20:46:20 +02:00
{
2020-04-05 15:33:01 +02:00
return \danog\MadelineProto\Tools :: first ( $promises );
2019-09-18 20:46:20 +02:00
}
2019-12-28 16:07:09 +01:00
/**
2020-04-05 15:33:01 +02:00
* Asynchronously lock a file
* Resolves with a callbable that MUST eventually be called in order to release the lock .
2019-12-28 16:07:09 +01:00
*
2020-09-24 20:49:34 +02:00
* @ param string $file File to lock
* @ param integer $operation Locking mode
* @ param float $polling Polling interval
* @ param ? Promise $token Cancellation token
* @ param ? callable $failureCb Failure callback , called only once if the first locking attempt fails .
2019-12-28 16:07:09 +01:00
*
2020-09-24 20:49:34 +02:00
* @ return Promise < ? callable >
2019-12-28 16:07:09 +01:00
*/
2020-09-24 20:49:34 +02:00
public function flock ( string $file , int $operation , float $polling = 0.1 , ? \Amp\Promise $token = null , $failureCb = null )
2019-09-18 20:46:20 +02:00
{
2020-09-24 20:49:34 +02:00
return \danog\MadelineProto\Tools :: flock ( $file , $operation , $polling , $token , $failureCb );
2019-09-18 20:46:20 +02:00
}
2019-12-27 20:29:22 +01:00
/**
2020-04-05 15:33:01 +02:00
* Convert bot API channel ID to MTProto channel ID .
2019-12-27 20:29:22 +01:00
*
2020-04-05 15:33:01 +02:00
* @ param int $id Bot API channel ID
2019-12-27 20:29:22 +01:00
*
2020-04-05 15:33:01 +02:00
* @ return int
2019-12-27 20:29:22 +01:00
*/
2020-04-05 15:33:01 +02:00
public function fromSupergroup ( $id ) : int
2019-09-18 20:46:20 +02:00
{
2020-04-05 15:33:01 +02:00
return \danog\MadelineProto\MTProto :: fromSupergroup ( $id );
2019-09-18 20:46:20 +02:00
}
2020-02-09 17:29:39 +01:00
/**
2020-04-05 15:33:01 +02:00
* When were full info for this chat last cached .
2020-02-09 17:29:39 +01:00
*
2020-04-05 15:33:01 +02:00
* @ param mixed $id Chat ID
2020-02-09 17:29:39 +01:00
*
2020-05-03 03:33:54 +02:00
* @ return \Generator < integer >
2020-02-09 17:29:39 +01:00
*/
2020-06-16 17:52:55 +02:00
public function fullChatLastUpdated ( $id , array $extra = [])
2020-02-09 17:29:39 +01:00
{
2020-06-16 17:52:55 +02:00
return $this -> __call ( __FUNCTION__ , [ $id , $extra ]);
2020-02-09 17:29:39 +01:00
}
2019-12-27 20:29:22 +01:00
/**
2020-04-05 15:33:01 +02:00
* Get info about the logged - in user , not cached .
2019-12-27 20:29:22 +01:00
*
2020-04-05 15:33:01 +02:00
* @ return \Generator < array | bool >
2019-12-27 20:29:22 +01:00
*/
2020-04-05 15:33:01 +02:00
public function fullGetSelf ( array $extra = [])
2019-09-18 20:46:20 +02:00
{
2020-04-05 15:33:01 +02:00
return $this -> __call ( __FUNCTION__ , [ $extra ]);
2020-02-09 17:29:39 +01:00
}
/**
2020-04-05 15:33:01 +02:00
* Generate MTProto vector hash .
2020-02-09 17:29:39 +01:00
*
2020-04-05 15:33:01 +02:00
* @ param array $ints IDs
2020-02-09 17:29:39 +01:00
*
2020-04-05 15:33:01 +02:00
* @ return int Vector hash
2020-02-09 17:29:39 +01:00
*/
2020-04-05 15:33:01 +02:00
public function genVectorHash ( array $ints ) : int
2020-02-09 17:29:39 +01:00
{
2020-04-05 15:33:01 +02:00
return \danog\MadelineProto\Tools :: genVectorHash ( $ints );
2020-02-09 17:29:39 +01:00
}
/**
2020-04-05 15:33:01 +02:00
* Get full list of MTProto and API methods .
2020-02-09 17:29:39 +01:00
*
2020-04-05 15:33:01 +02:00
* @ return array
2020-02-09 17:29:39 +01:00
*/
2020-04-05 15:33:01 +02:00
public function getAllMethods () : array
2020-02-09 17:29:39 +01:00
{
2020-04-05 15:33:01 +02:00
return $this -> API -> getAllMethods ();
2020-02-09 17:29:39 +01:00
}
2020-09-12 12:50:22 +02:00
/**
* Get authorization info .
*
* @ return int
*/
public function getAuthorization () : int
{
return $this -> API -> getAuthorization ();
}
2020-02-09 17:29:39 +01:00
/**
2020-04-05 15:33:01 +02:00
* Get cached server - side config .
2020-02-09 17:29:39 +01:00
*
2020-04-05 15:33:01 +02:00
* @ return array
2020-02-09 17:29:39 +01:00
*/
2020-04-05 15:33:01 +02:00
public function getCachedConfig () : array
2020-02-09 17:29:39 +01:00
{
2020-04-05 15:33:01 +02:00
return $this -> API -> getCachedConfig ();
2019-09-18 20:46:20 +02:00
}
2019-12-27 20:29:22 +01:00
/**
2020-04-05 15:33:01 +02:00
* Get call info .
2019-12-27 20:29:22 +01:00
*
2020-04-05 15:33:01 +02:00
* @ param int $call Call ID
2019-12-27 20:29:22 +01:00
*
2020-04-05 15:33:01 +02:00
* @ return array
2019-12-27 20:29:22 +01:00
*/
2020-09-12 12:50:22 +02:00
public function getCall ( $call ) : array
2019-09-18 20:46:20 +02:00
{
2020-04-05 15:33:01 +02:00
return $this -> API -> getCall ( $call );
2019-09-18 20:46:20 +02:00
}
2019-12-27 20:29:22 +01:00
/**
2020-04-05 15:33:01 +02:00
* Store RSA keys for CDN datacenters .
2019-12-27 20:29:22 +01:00
*
2020-04-05 15:33:01 +02:00
* @ param string $datacenter DC ID
2019-12-27 20:29:22 +01:00
*
2020-04-05 15:33:01 +02:00
* @ return \Generator
2019-12-27 20:29:22 +01:00
*/
2020-04-05 15:33:01 +02:00
public function getCdnConfig ( string $datacenter , array $extra = [])
2019-09-18 20:46:20 +02:00
{
2020-04-05 15:33:01 +02:00
return $this -> __call ( __FUNCTION__ , [ $datacenter , $extra ]);
2019-09-18 20:46:20 +02:00
}
2019-12-27 20:29:22 +01:00
/**
2020-04-05 15:33:01 +02:00
* Get cached ( or eventually re - fetch ) server - side config .
2019-12-27 20:29:22 +01:00
*
2020-04-05 15:33:01 +02:00
* @ param array $config Current config
* @ param array $options Options for method call
2019-12-27 20:29:22 +01:00
*
2020-04-05 15:33:01 +02:00
* @ return \Generator
2019-12-27 20:29:22 +01:00
*/
2020-04-05 15:33:01 +02:00
public function getConfig ( array $config = [
], array $options = [
], array $extra = [])
2019-09-18 20:46:20 +02:00
{
2020-04-05 15:33:01 +02:00
return $this -> __call ( __FUNCTION__ , [ $config , $options , $extra ]);
2019-09-18 20:46:20 +02:00
}
2019-12-27 20:29:22 +01:00
/**
2020-04-05 15:33:01 +02:00
* Get async DNS client .
2019-12-27 20:29:22 +01:00
*
2020-04-05 15:33:01 +02:00
* @ return \Amp\Dns\Resolver
2019-12-27 20:29:22 +01:00
*/
2020-04-05 15:33:01 +02:00
public function getDNSClient () : \Amp\Dns\Resolver
2019-09-18 20:46:20 +02:00
{
2020-04-05 15:33:01 +02:00
return $this -> API -> getDNSClient ();
2019-09-18 20:46:20 +02:00
}
2019-10-31 20:48:06 +01:00
/**
2020-04-05 15:33:01 +02:00
* Get all datacenter connections .
2019-10-31 20:48:06 +01:00
*
2020-04-05 15:33:01 +02:00
* @ return array < DataCenterConnection >
2019-10-31 20:48:06 +01:00
*/
2020-04-05 15:33:01 +02:00
public function getDataCenterConnections () : array
2019-09-18 20:46:20 +02:00
{
2020-04-05 15:33:01 +02:00
return $this -> API -> getDataCenterConnections ();
2019-09-18 20:46:20 +02:00
}
2020-09-12 12:50:22 +02:00
/**
* Get main DC ID .
*
* @ return int
*/
public function getDataCenterId () : int
{
return $this -> API -> getDataCenterId ();
}
2019-10-31 20:48:06 +01:00
/**
2020-04-05 15:33:01 +02:00
* Get dialog peers .
2019-10-31 20:48:06 +01:00
*
2020-04-05 15:33:01 +02:00
* @ param boolean $force Whether to refetch all dialogs ignoring cache
2019-10-31 20:48:06 +01:00
*
2020-04-05 15:33:01 +02:00
* @ return \Generator < array < array >>
2019-10-31 20:48:06 +01:00
*/
2020-04-05 15:33:01 +02:00
public function getDialogs ( bool $force = true , array $extra = [])
2019-09-18 20:46:20 +02:00
{
2020-04-05 15:33:01 +02:00
return $this -> __call ( __FUNCTION__ , [ $force , $extra ]);
2019-09-18 20:46:20 +02:00
}
2019-10-31 20:48:06 +01:00
/**
2020-04-05 15:33:01 +02:00
* Get download info of file
* Returns an array with the following structure :.
2019-10-31 20:48:06 +01:00
*
2020-04-05 15:33:01 +02:00
* `$info['ext']` - The file extension
* `$info['name']` - The file name , without the extension
* `$info['mime']` - The file mime type
* `$info['size']` - The file size
2019-10-31 20:48:06 +01:00
*
2020-04-05 15:33:01 +02:00
* @ param mixed $messageMedia File ID
*
* @ return \Generator < array >
2019-10-31 20:48:06 +01:00
*/
2020-04-05 15:33:01 +02:00
public function getDownloadInfo ( $messageMedia , array $extra = [])
2019-09-18 20:46:20 +02:00
{
2020-04-05 15:33:01 +02:00
return $this -> __call ( __FUNCTION__ , [ $messageMedia , $extra ]);
2019-09-18 20:46:20 +02:00
}
2019-10-31 20:48:06 +01:00
/**
2020-04-05 15:33:01 +02:00
* Get event handler .
2019-10-31 20:48:06 +01:00
*
2020-04-05 15:33:01 +02:00
* @ return EventHandler
2019-10-31 20:48:06 +01:00
*/
2020-04-05 15:33:01 +02:00
public function getEventHandler () : \danog\MadelineProto\EventHandler
2019-09-18 20:46:20 +02:00
{
2020-04-05 15:33:01 +02:00
return $this -> API -> getEventHandler ();
2019-09-18 20:46:20 +02:00
}
2019-10-31 20:48:06 +01:00
/**
2020-04-05 15:33:01 +02:00
* Get extension from file location .
2019-10-31 20:48:06 +01:00
*
2020-04-05 15:33:01 +02:00
* @ param mixed $location File location
* @ param string $default Default extension
2019-10-31 20:48:06 +01:00
*
2020-04-05 15:33:01 +02:00
* @ return string
2019-10-31 20:48:06 +01:00
*/
2020-04-05 15:33:01 +02:00
public function getExtensionFromLocation ( $location , string $default ) : string
2019-09-18 20:46:20 +02:00
{
2020-04-05 15:33:01 +02:00
return \danog\MadelineProto\MTProto :: getExtensionFromLocation ( $location , $default );
2019-09-18 20:46:20 +02:00
}
2019-10-31 20:48:06 +01:00
/**
2020-04-05 15:33:01 +02:00
* Get extension from mime type .
2019-10-31 20:48:06 +01:00
*
2020-04-05 15:33:01 +02:00
* @ param string $mime MIME type
2019-10-31 20:48:06 +01:00
*
2020-04-05 15:33:01 +02:00
* @ return string
2019-10-31 20:48:06 +01:00
*/
2020-04-05 15:33:01 +02:00
public function getExtensionFromMime ( string $mime ) : string
2019-09-18 20:46:20 +02:00
{
2020-04-05 15:33:01 +02:00
return \danog\MadelineProto\MTProto :: getExtensionFromMime ( $mime );
2019-09-18 20:46:20 +02:00
}
2019-12-28 16:07:09 +01:00
/**
2020-04-05 15:33:01 +02:00
* Get info about file .
2019-12-28 16:07:09 +01:00
*
2020-04-05 15:33:01 +02:00
* @ param mixed $constructor File ID
2019-12-28 16:07:09 +01:00
*
2020-04-05 15:33:01 +02:00
* @ return \Generator < array >
2019-12-28 16:07:09 +01:00
*/
2020-04-05 15:33:01 +02:00
public function getFileInfo ( $constructor , array $extra = [])
2019-09-18 20:46:20 +02:00
{
2020-04-05 15:33:01 +02:00
return $this -> __call ( __FUNCTION__ , [ $constructor , $extra ]);
2019-09-18 20:46:20 +02:00
}
2019-12-28 16:07:09 +01:00
/**
2020-04-05 15:33:01 +02:00
* Get folder ID from object .
2019-12-28 16:07:09 +01:00
*
2020-04-05 15:33:01 +02:00
* @ param mixed $id Object
2019-12-28 16:07:09 +01:00
*
2020-04-05 15:33:01 +02:00
* @ return ? int
2019-12-28 16:07:09 +01:00
*/
2020-04-05 15:33:01 +02:00
public function getFolderId ( $id ) : ? int
2019-09-18 20:46:20 +02:00
{
2020-04-05 15:33:01 +02:00
return \danog\MadelineProto\MTProto :: getFolderId ( $id );
2019-09-18 20:46:20 +02:00
}
2019-12-28 16:07:09 +01:00
/**
2020-04-05 15:33:01 +02:00
* Get full info of all dialogs .
2019-12-28 16:07:09 +01:00
*
2020-04-05 15:33:01 +02:00
* @ param boolean $force Whether to refetch all dialogs ignoring cache
2019-12-28 16:07:09 +01:00
*
2020-04-05 15:33:01 +02:00
* @ return \Generator
2019-12-28 16:07:09 +01:00
*/
2020-04-05 15:33:01 +02:00
public function getFullDialogs ( bool $force = true , array $extra = [])
2019-09-18 20:46:20 +02:00
{
2020-04-05 15:33:01 +02:00
return $this -> __call ( __FUNCTION__ , [ $force , $extra ]);
2019-09-18 20:46:20 +02:00
}
2019-12-28 16:07:09 +01:00
/**
2020-04-05 15:33:01 +02:00
* Get full info about peer , returns an FullInfo object .
2019-12-28 16:07:09 +01:00
*
2020-04-05 15:33:01 +02:00
* @ param mixed $id Peer
2019-12-28 16:07:09 +01:00
*
2020-04-05 15:33:01 +02:00
* @ see https :// docs . madelineproto . xyz / FullInfo . html
*
* @ return \Generator < array > FullInfo object
2019-12-28 16:07:09 +01:00
*/
2020-04-05 15:33:01 +02:00
public function getFullInfo ( $id , array $extra = [])
2019-09-18 20:46:20 +02:00
{
2020-04-05 15:33:01 +02:00
return $this -> __call ( __FUNCTION__ , [ $id , $extra ]);
2019-09-18 20:46:20 +02:00
}
2019-12-28 16:07:09 +01:00
/**
2020-04-05 15:33:01 +02:00
* Get async HTTP client .
2019-12-28 16:07:09 +01:00
*
2020-04-05 15:33:01 +02:00
* @ return \Amp\Http\Client\HttpClient
2019-12-28 16:07:09 +01:00
*/
2020-04-05 15:33:01 +02:00
public function getHTTPClient () : \Amp\Http\Client\HttpClient
2019-09-18 20:46:20 +02:00
{
2020-04-05 15:33:01 +02:00
return $this -> API -> getHTTPClient ();
2019-09-18 20:46:20 +02:00
}
2019-12-28 16:07:09 +01:00
/**
2020-04-05 15:33:01 +02:00
* Get bot API ID from peer object .
2019-12-28 16:07:09 +01:00
*
2020-04-05 15:33:01 +02:00
* @ param mixed $id Peer
2019-12-28 16:07:09 +01:00
*
2020-04-05 15:33:01 +02:00
* @ return int
2019-12-28 16:07:09 +01:00
*/
2020-04-05 15:33:01 +02:00
public function getId ( $id , array $extra = [])
2019-09-18 20:46:20 +02:00
{
2020-04-05 15:33:01 +02:00
return $this -> __call ( __FUNCTION__ , [ $id , $extra ]);
2019-09-18 20:46:20 +02:00
}
2019-12-28 16:07:09 +01:00
/**
2020-04-05 15:33:01 +02:00
* Get info about peer , returns an Info object .
2019-12-28 16:07:09 +01:00
*
2020-04-05 15:33:01 +02:00
* @ param mixed $id Peer
* @ param boolean $recursive Internal
2019-12-28 16:07:09 +01:00
*
2020-04-05 15:33:01 +02:00
* @ see https :// docs . madelineproto . xyz / Info . html
*
* @ return \Generator < array > Info object
2019-12-28 16:07:09 +01:00
*/
2020-04-05 15:33:01 +02:00
public function getInfo ( $id , $recursive = true , array $extra = [])
2019-09-18 20:46:20 +02:00
{
2020-04-05 15:33:01 +02:00
return $this -> __call ( __FUNCTION__ , [ $id , $recursive , $extra ]);
2019-09-18 20:46:20 +02:00
}
2019-12-28 16:07:09 +01:00
/**
2020-04-05 15:33:01 +02:00
* Get logger .
2019-12-28 16:07:09 +01:00
*/
2020-04-05 15:33:01 +02:00
public function getLogger () : \danog\MadelineProto\Logger
2019-09-18 20:46:20 +02:00
{
2020-04-05 15:33:01 +02:00
return $this -> API -> getLogger ();
2019-09-18 20:46:20 +02:00
}
2019-12-28 16:07:09 +01:00
/**
2020-04-05 15:33:01 +02:00
* Get TL namespaces .
2019-12-28 16:07:09 +01:00
*
2020-04-05 15:33:01 +02:00
* @ return array
2019-12-28 16:07:09 +01:00
*/
2020-04-05 15:33:01 +02:00
public function getMethodNamespaces () : array
2019-09-18 20:46:20 +02:00
{
2020-04-05 15:33:01 +02:00
return $this -> API -> getMethodNamespaces ();
2019-09-18 20:46:20 +02:00
}
2019-12-28 16:07:09 +01:00
/**
2020-04-05 15:33:01 +02:00
* Get namespaced methods ( method => namespace ) .
2019-12-28 16:07:09 +01:00
*
2020-04-05 15:33:01 +02:00
* @ return array
2019-12-28 16:07:09 +01:00
*/
2020-04-05 15:33:01 +02:00
public function getMethodsNamespaced () : array
2019-09-18 20:46:20 +02:00
{
2020-04-05 15:33:01 +02:00
return $this -> API -> getMethodsNamespaced ();
2019-09-18 20:46:20 +02:00
}
2019-12-28 16:07:09 +01:00
/**
* Get mime type from buffer .
*
* @ param string $buffer Buffer
*
* @ return string
*/
2019-12-28 16:45:00 +01:00
public function getMimeFromBuffer ( string $buffer ) : string
2019-09-18 20:46:20 +02:00
{
2019-12-28 16:45:00 +01:00
return \danog\MadelineProto\MTProto :: getMimeFromBuffer ( $buffer );
2019-09-18 20:46:20 +02:00
}
2019-12-28 16:07:09 +01:00
/**
2020-04-05 15:33:01 +02:00
* Get mime type from file extension .
2019-12-28 16:07:09 +01:00
*
2020-04-05 15:33:01 +02:00
* @ param string $extension File extension
* @ param string $default Default mime type
2019-12-28 16:07:09 +01:00
*
2020-04-05 15:33:01 +02:00
* @ return string
2019-12-28 16:07:09 +01:00
*/
2020-04-05 15:33:01 +02:00
public function getMimeFromExtension ( string $extension , string $default ) : string
2019-09-18 20:46:20 +02:00
{
2020-04-05 15:33:01 +02:00
return \danog\MadelineProto\MTProto :: getMimeFromExtension ( $extension , $default );
2019-09-18 20:46:20 +02:00
}
2019-12-28 16:07:09 +01:00
/**
2020-04-05 15:33:01 +02:00
* Get mime type of file .
2019-12-28 16:07:09 +01:00
*
2020-04-05 15:33:01 +02:00
* @ param string $file File
2019-12-28 16:07:09 +01:00
*
2020-04-05 15:33:01 +02:00
* @ return string
2019-12-28 16:07:09 +01:00
*/
2020-04-05 15:33:01 +02:00
public function getMimeFromFile ( string $file ) : string
2019-09-18 20:46:20 +02:00
{
2020-04-05 15:33:01 +02:00
return \danog\MadelineProto\MTProto :: getMimeFromFile ( $file );
2019-09-18 20:46:20 +02:00
}
2019-12-28 16:07:09 +01:00
/**
2020-04-05 15:33:01 +02:00
* Get download info of the propic of a user
* Returns an array with the following structure :.
2019-12-28 16:07:09 +01:00
*
2020-04-05 15:33:01 +02:00
* `$info['ext']` - The file extension
* `$info['name']` - The file name , without the extension
* `$info['mime']` - The file mime type
* `$info['size']` - The file size
2019-12-28 16:07:09 +01:00
*
2020-04-05 15:33:01 +02:00
* @ param mixed $messageMedia File ID
*
* @ return \Generator < array >
2019-12-28 16:07:09 +01:00
*/
2020-04-05 15:33:01 +02:00
public function getPropicInfo ( $data , array $extra = [])
2019-09-18 20:46:20 +02:00
{
2020-04-05 15:33:01 +02:00
return $this -> __call ( __FUNCTION__ , [ $data , $extra ]);
2019-09-18 20:46:20 +02:00
}
2020-09-26 17:11:41 +02:00
/**
* Get PSR logger .
*/
public function getPsrLogger () : \Psr\Log\LoggerInterface
{
return $this -> API -> getPsrLogger ();
}
2019-12-28 16:07:09 +01:00
/**
2020-04-05 15:33:01 +02:00
* Get full info about peer ( including full list of channel members ), returns a Chat object .
2019-12-28 16:07:09 +01:00
*
2020-04-05 15:33:01 +02:00
* @ param mixed $id Peer
2019-12-28 16:07:09 +01:00
*
2020-04-05 15:33:01 +02:00
* @ see https :// docs . madelineproto . xyz / Chat . html
*
* @ return \Generator < array > Chat object
2019-12-28 16:07:09 +01:00
*/
2020-04-05 15:33:01 +02:00
public function getPwrChat ( $id , bool $fullfetch = true , bool $send = true , array $extra = [])
2019-09-18 20:46:20 +02:00
{
2020-04-05 15:33:01 +02:00
return $this -> __call ( __FUNCTION__ , [ $id , $fullfetch , $send , $extra ]);
2019-09-18 20:46:20 +02:00
}
2019-12-28 16:07:09 +01:00
/**
2020-04-05 15:33:01 +02:00
* Get secret chat .
2019-12-28 16:07:09 +01:00
*
2020-04-05 15:33:01 +02:00
* @ param array | int $chat Secret chat ID
2019-12-28 16:07:09 +01:00
*
2020-04-05 15:33:01 +02:00
* @ return array
2019-12-28 16:07:09 +01:00
*/
2020-04-05 15:33:01 +02:00
public function getSecretChat ( $chat ) : array
2019-09-18 20:46:20 +02:00
{
2020-04-05 15:33:01 +02:00
return $this -> API -> getSecretChat ( $chat );
2019-09-18 20:46:20 +02:00
}
2019-10-31 11:17:22 +01:00
/**
2020-04-05 15:33:01 +02:00
* Get info about the logged - in user , cached .
2019-10-31 11:17:22 +01:00
*
2020-04-05 15:33:01 +02:00
* @ return array | bool
2019-10-31 11:17:22 +01:00
*/
2020-04-05 15:33:01 +02:00
public function getSelf ( array $extra = [])
2019-09-18 20:46:20 +02:00
{
2020-04-05 15:33:01 +02:00
return $this -> __call ( __FUNCTION__ , [ $extra ]);
2019-09-18 20:46:20 +02:00
}
2020-06-16 17:52:55 +02:00
public function getSessionId ( \danog\MadelineProto\MTProto $madelineProto ) : string
{
return \danog\MadelineProto\MTProto :: getSessionId ( $madelineProto );
}
2019-10-31 11:17:22 +01:00
/**
2020-09-24 20:49:34 +02:00
* Return current settings .
2019-10-31 11:17:22 +01:00
*
2020-09-22 11:48:12 +02:00
* @ return Settings
2020-04-05 15:33:01 +02:00
*/
2020-09-24 20:49:34 +02:00
public function getSettings () : \danog\MadelineProto\Settings
2020-04-05 15:33:01 +02:00
{
return $this -> API -> getSettings ();
}
/**
* Get TL serializer .
2019-10-31 11:17:22 +01:00
*
2020-04-05 15:33:01 +02:00
* @ return TL
2019-10-31 11:17:22 +01:00
*/
2020-04-05 15:33:01 +02:00
public function getTL () : \danog\MadelineProto\TL\TL
2019-09-18 20:46:20 +02:00
{
2020-04-05 15:33:01 +02:00
return $this -> API -> getTL ();
2019-09-18 20:46:20 +02:00
}
2019-10-31 11:17:22 +01:00
/**
2020-04-05 15:33:01 +02:00
* Accesses a private variable from an object .
2019-10-31 11:17:22 +01:00
*
2020-04-05 15:33:01 +02:00
* @ param object $obj Object
* @ param string $var Attribute name
2019-10-31 11:17:22 +01:00
*
2020-06-16 17:52:55 +02:00
* @ psalm - suppress InvalidScope
*
2020-04-05 15:33:01 +02:00
* @ return mixed
* @ access public
2019-10-31 11:17:22 +01:00
*/
2020-04-05 15:33:01 +02:00
public function getVar ( $obj , string $var )
2019-09-18 20:46:20 +02:00
{
2020-04-05 15:33:01 +02:00
return \danog\MadelineProto\Tools :: getVar ( $obj , $var );
2019-09-18 20:46:20 +02:00
}
/**
2020-04-05 15:33:01 +02:00
* Get web template .
2019-10-31 11:17:22 +01:00
*
2020-04-05 15:33:01 +02:00
* @ return string
2019-09-18 20:46:20 +02:00
*/
2020-04-05 15:33:01 +02:00
public function getWebTemplate () : string
2019-09-18 20:46:20 +02:00
{
2020-04-05 15:33:01 +02:00
return $this -> API -> getWebTemplate ();
2019-09-18 20:46:20 +02:00
}
2019-10-31 11:17:22 +01:00
/**
2020-04-05 15:33:01 +02:00
* Checks whether all datacenters are authorized .
2019-10-31 11:17:22 +01:00
*
2020-04-05 15:33:01 +02:00
* @ return boolean
2019-10-31 11:17:22 +01:00
*/
2020-04-05 15:33:01 +02:00
public function hasAllAuth () : bool
2019-09-18 20:46:20 +02:00
{
2020-04-05 15:33:01 +02:00
return $this -> API -> hasAllAuth ();
2019-09-18 20:46:20 +02:00
}
2019-10-31 11:17:22 +01:00
/**
2020-04-05 15:33:01 +02:00
* Check if an event handler instance is present .
2019-10-31 11:17:22 +01:00
*
2020-04-05 15:33:01 +02:00
* @ return boolean
2019-10-31 11:17:22 +01:00
*/
2020-04-05 15:33:01 +02:00
public function hasEventHandler () : bool
2019-09-18 20:46:20 +02:00
{
2020-04-05 15:33:01 +02:00
return $this -> API -> hasEventHandler ();
2019-09-18 20:46:20 +02:00
}
2019-10-31 11:17:22 +01:00
/**
2020-04-05 15:33:01 +02:00
* Check if has report peers .
2019-10-31 11:17:22 +01:00
*
2020-04-05 15:33:01 +02:00
* @ return boolean
2019-10-31 11:17:22 +01:00
*/
2020-04-05 15:33:01 +02:00
public function hasReportPeers () : bool
2019-09-18 20:46:20 +02:00
{
2020-04-05 15:33:01 +02:00
return $this -> API -> hasReportPeers ();
2019-09-18 20:46:20 +02:00
}
2019-10-31 15:06:25 +01:00
/**
2020-04-05 15:33:01 +02:00
* Check whether secret chat exists .
2019-10-31 15:06:25 +01:00
*
2020-04-05 15:33:01 +02:00
* @ param array | int $chat Secret chat ID
2019-10-31 15:06:25 +01:00
*
2020-04-05 15:33:01 +02:00
* @ return boolean
2019-10-31 15:06:25 +01:00
*/
2020-04-05 15:33:01 +02:00
public function hasSecretChat ( $chat ) : bool
2019-09-18 20:46:20 +02:00
{
2020-04-05 15:33:01 +02:00
return $this -> API -> hasSecretChat ( $chat );
2019-09-18 20:46:20 +02:00
}
2020-09-24 20:49:34 +02:00
/**
* Checks private property exists in an object .
*
* @ param object $obj Object
* @ param string $var Attribute name
*
* @ psalm - suppress InvalidScope
*
* @ return bool
* @ access public
*/
public function hasVar ( $obj , string $var ) : bool
{
return \danog\MadelineProto\Tools :: hasVar ( $obj , $var );
}
2019-10-31 15:06:25 +01:00
/**
2020-04-05 15:33:01 +02:00
* Import authorization .
2019-10-31 15:06:25 +01:00
*
2020-04-05 15:33:01 +02:00
* @ param mixed $authorization Authorization info
2019-10-31 15:06:25 +01:00
*
2020-04-05 15:33:01 +02:00
* @ return \Generator
2019-10-31 15:06:25 +01:00
*/
2020-04-05 15:33:01 +02:00
public function importAuthorization ( $authorization , array $extra = [])
2019-09-18 20:46:20 +02:00
{
2020-04-05 15:33:01 +02:00
return $this -> __call ( __FUNCTION__ , [ $authorization , $extra ]);
2019-09-18 20:46:20 +02:00
}
2019-10-31 15:06:25 +01:00
/**
2020-04-05 15:33:01 +02:00
* Inflate stripped photosize to full JPG payload .
2019-10-31 15:06:25 +01:00
*
2020-04-05 15:33:01 +02:00
* @ param string $stripped Stripped photosize
2019-10-31 15:06:25 +01:00
*
2020-04-05 15:33:01 +02:00
* @ return string JPG payload
2019-10-31 15:06:25 +01:00
*/
2020-04-05 15:33:01 +02:00
public function inflateStripped ( string $stripped ) : string
2019-09-18 20:46:20 +02:00
{
2020-04-05 15:33:01 +02:00
return \danog\MadelineProto\Tools :: inflateStripped ( $stripped );
2019-09-18 20:46:20 +02:00
}
2020-09-24 20:49:34 +02:00
/**
* Initialize database instance .
*
* @ param MTProto $MadelineProto
* @ param boolean $reset
* @ return \Generator
*/
2020-06-16 17:52:55 +02:00
public function initDb ( \danog\MadelineProto\MTProto $MadelineProto , bool $reset = false , array $extra = [])
{
return $this -> __call ( __FUNCTION__ , [ $MadelineProto , $reset , $extra ]);
}
2020-09-12 12:50:22 +02:00
/**
* Initialize self - restart hack .
*
* @ return void
*/
public function initSelfRestart () : void
{
$this -> API -> initSelfRestart ();
}
2019-10-31 15:06:25 +01:00
/**
2020-04-05 15:33:01 +02:00
* Whether this is altervista .
2019-10-31 15:06:25 +01:00
*
2020-04-05 15:33:01 +02:00
* @ return boolean
2019-10-31 15:06:25 +01:00
*/
2020-04-05 15:33:01 +02:00
public function isAltervista () : bool
2019-09-18 20:46:20 +02:00
{
2020-04-05 15:33:01 +02:00
return \danog\MadelineProto\Tools :: isAltervista ();
2019-09-18 20:46:20 +02:00
}
2019-10-31 15:06:25 +01:00
/**
2020-04-05 15:33:01 +02:00
* Check if is array or similar ( traversable && countable && arrayAccess ) .
2019-10-31 15:06:25 +01:00
*
2020-04-05 15:33:01 +02:00
* @ param mixed $var Value to check
2019-10-31 15:06:25 +01:00
*
2020-04-05 15:33:01 +02:00
* @ return boolean
2019-10-31 15:06:25 +01:00
*/
2020-04-05 15:33:01 +02:00
public function isArrayOrAlike ( $var ) : bool
2019-09-18 20:46:20 +02:00
{
2020-04-05 15:33:01 +02:00
return \danog\MadelineProto\Tools :: isArrayOrAlike ( $var );
2019-09-18 20:46:20 +02:00
}
2020-09-24 23:25:54 +02:00
/**
* Whether we ' re an IPC client instance .
*
* @ return boolean
*/
public function isIpc () : bool
{
return $this -> API -> isIpc ();
}
2019-10-31 15:06:25 +01:00
/**
2020-04-05 15:33:01 +02:00
* Check whether provided bot API ID is a channel .
2019-10-31 15:06:25 +01:00
*
2020-04-05 15:33:01 +02:00
* @ param int $id Bot API ID
2019-10-31 15:06:25 +01:00
*
2020-04-05 15:33:01 +02:00
* @ return boolean
2019-10-31 15:06:25 +01:00
*/
2020-04-05 15:33:01 +02:00
public function isSupergroup ( $id ) : bool
2019-09-18 20:46:20 +02:00
{
2020-04-05 15:33:01 +02:00
return \danog\MadelineProto\MTProto :: isSupergroup ( $id );
2019-09-18 20:46:20 +02:00
}
2019-10-31 15:06:25 +01:00
/**
2020-04-05 15:33:01 +02:00
* Logger .
2019-10-31 15:06:25 +01:00
*
2020-04-05 15:33:01 +02:00
* @ param string $param Parameter
* @ param int $level Logging level
* @ param string $file File where the message originated
2019-10-31 15:06:25 +01:00
*
2020-04-05 15:33:01 +02:00
* @ return void
2019-10-31 15:06:25 +01:00
*/
2020-04-05 15:33:01 +02:00
public function logger ( $param , int $level = \danog\MadelineProto\Logger :: NOTICE , string $file = '' ) : void
2019-09-18 20:46:20 +02:00
{
2020-04-05 15:33:01 +02:00
$this -> API -> logger ( $param , $level , $file );
2019-09-18 20:46:20 +02:00
}
2019-10-31 15:06:25 +01:00
/**
2020-04-05 15:33:01 +02:00
* Log out currently logged in user .
2019-10-31 15:06:25 +01:00
*
2020-04-05 15:33:01 +02:00
* @ return \Generator
2019-10-31 15:06:25 +01:00
*/
2020-04-05 15:33:01 +02:00
public function logout ( array $extra = [])
2019-09-18 20:46:20 +02:00
{
2020-04-05 15:33:01 +02:00
return $this -> __call ( __FUNCTION__ , [ $extra ]);
2019-09-18 20:46:20 +02:00
}
2019-10-31 15:06:25 +01:00
/**
2020-04-05 15:33:01 +02:00
* Start MadelineProto ' s update handling loop , or run the provided async callable .
2019-10-31 15:06:25 +01:00
*
2020-09-24 20:49:34 +02:00
* @ param callable | null $callback Async callable to run
2019-10-31 15:06:25 +01:00
*
2020-04-05 15:33:01 +02:00
* @ return mixed
2019-10-31 15:06:25 +01:00
*/
2020-04-05 15:33:01 +02:00
public function loop ( $callback = null , array $extra = [])
2019-09-18 20:46:20 +02:00
{
2020-04-05 15:33:01 +02:00
return $this -> __call ( __FUNCTION__ , [ $callback , $extra ]);
2019-09-18 20:46:20 +02:00
}
2019-10-31 15:06:25 +01:00
/**
2020-04-05 15:33:01 +02:00
* Start MadelineProto ' s update handling loop in background .
2019-10-31 15:06:25 +01:00
*
* @ return Promise
*/
2020-04-05 15:33:01 +02:00
public function loopFork ( array $extra = [])
2019-09-18 20:46:20 +02:00
{
2020-04-05 15:33:01 +02:00
return $this -> __call ( __FUNCTION__ , [ $extra ]);
2019-09-18 20:46:20 +02:00
}
2019-10-31 15:06:25 +01:00
/**
2020-04-05 15:33:01 +02:00
* Escape string for markdown .
2019-10-31 15:06:25 +01:00
*
2020-04-05 15:33:01 +02:00
* @ param string $hwat String to escape
2019-10-31 15:06:25 +01:00
*
2020-06-16 17:52:55 +02:00
* @ return string
2019-10-31 15:06:25 +01:00
*/
2020-04-05 15:33:01 +02:00
public function markdownEscape ( string $hwat ) : string
2019-09-18 20:46:20 +02:00
{
2020-06-16 17:52:55 +02:00
return \danog\MadelineProto\StrTools :: markdownEscape ( $hwat );
2019-09-18 20:46:20 +02:00
}
2019-10-31 15:06:25 +01:00
/**
2020-04-05 15:33:01 +02:00
* Telegram UTF - 8 multibyte split .
2019-10-31 15:06:25 +01:00
*
2020-04-05 15:33:01 +02:00
* @ param string $text Text
* @ param integer $length Length
2019-10-31 15:06:25 +01:00
*
2020-04-05 15:33:01 +02:00
* @ return array
2019-10-31 15:06:25 +01:00
*/
2020-04-05 15:33:01 +02:00
public function mbStrSplit ( string $text , int $length ) : array
2019-09-18 20:46:20 +02:00
{
2020-04-05 15:33:01 +02:00
return \danog\MadelineProto\MTProto :: mbStrSplit ( $text , $length );
2019-09-18 20:46:20 +02:00
}
2019-10-31 15:06:25 +01:00
/**
2020-04-05 15:33:01 +02:00
* Get Telegram UTF - 8 length of string .
2019-10-31 15:06:25 +01:00
*
2020-04-05 15:33:01 +02:00
* @ param string $text Text
2019-10-31 15:06:25 +01:00
*
2020-04-05 15:33:01 +02:00
* @ return int
2019-10-31 15:06:25 +01:00
*/
2020-04-05 15:33:01 +02:00
public function mbStrlen ( string $text ) : int
2019-09-18 20:46:20 +02:00
{
2020-04-05 15:33:01 +02:00
return \danog\MadelineProto\MTProto :: mbStrlen ( $text );
2019-09-18 20:46:20 +02:00
}
2019-10-31 15:06:25 +01:00
/**
2020-04-05 15:33:01 +02:00
* Telegram UTF - 8 multibyte substring .
2019-10-31 15:06:25 +01:00
*
2020-04-05 15:33:01 +02:00
* @ param string $text Text to substring
* @ param integer $offset Offset
* @ param ? int $length Length
2019-10-31 15:06:25 +01:00
*
2020-04-05 15:33:01 +02:00
* @ return string
2019-10-31 15:06:25 +01:00
*/
2020-04-05 15:33:01 +02:00
public function mbSubstr ( string $text , int $offset , $length = null ) : string
2019-09-18 20:46:20 +02:00
{
2020-04-05 15:33:01 +02:00
return \danog\MadelineProto\MTProto :: mbSubstr ( $text , $offset , $length );
2019-09-18 20:46:20 +02:00
}
2019-10-31 15:06:25 +01:00
/**
2020-04-05 15:33:01 +02:00
* Call method and wait asynchronously for response .
2019-10-31 15:06:25 +01:00
*
2020-04-05 15:33:01 +02:00
* If the $aargs [ 'noResponse' ] is true , will not wait for a response .
2019-10-31 15:06:25 +01:00
*
2020-04-05 15:33:01 +02:00
* @ param string $method Method name
* @ param array $args Arguments
* @ param array $aargs Additional arguments
*
* @ return \Generator
2019-10-31 15:06:25 +01:00
*/
2020-04-05 15:33:01 +02:00
public function methodCall ( string $method , $args = [
], array $aargs = [
'msg_id' => null ,
], array $extra = [])
2019-09-18 20:46:20 +02:00
{
2020-04-05 15:33:01 +02:00
return $this -> __call ( __FUNCTION__ , [ $method , $args , $aargs , $extra ]);
2019-09-18 20:46:20 +02:00
}
2019-10-31 15:06:25 +01:00
/**
2020-04-05 15:33:01 +02:00
* Call method and make sure it is asynchronously sent .
2019-10-31 15:06:25 +01:00
*
2020-04-05 15:33:01 +02:00
* @ param string $method Method name
* @ param array $args Arguments
* @ param array $aargs Additional arguments
2019-10-31 15:06:25 +01:00
*
2020-04-05 15:33:01 +02:00
* @ return \Generator
2019-10-31 15:06:25 +01:00
*/
2020-04-05 15:33:01 +02:00
public function methodCallWrite ( string $method , $args = [
], array $aargs = [
'msg_id' => null ,
], array $extra = [])
2019-09-18 20:46:20 +02:00
{
2020-04-05 15:33:01 +02:00
return $this -> __call ( __FUNCTION__ , [ $method , $args , $aargs , $extra ]);
2019-09-18 20:46:20 +02:00
}
2020-06-16 17:52:55 +02:00
/**
* Escape method name .
*
* @ param string $method Method name
*
* @ return string
*/
public function methodEscape ( string $method ) : string
{
return \danog\MadelineProto\StrTools :: methodEscape ( $method );
}
2019-10-29 22:00:21 +01:00
/**
2020-04-05 15:33:01 +02:00
* Convert double to binary version .
2019-10-29 22:00:21 +01:00
*
2020-04-05 15:33:01 +02:00
* @ param float $value Value to convert
2020-01-31 19:29:43 +01:00
*
2020-04-05 15:33:01 +02:00
* @ return string
2019-10-29 22:00:21 +01:00
*/
2020-04-05 15:33:01 +02:00
public function packDouble ( float $value ) : string
2019-09-18 20:46:20 +02:00
{
2020-04-05 15:33:01 +02:00
return \danog\MadelineProto\Tools :: packDouble ( $value );
2019-09-18 20:46:20 +02:00
}
2019-10-31 11:17:22 +01:00
/**
2020-04-05 15:33:01 +02:00
* Convert integer to base256 signed int .
2019-10-31 11:17:22 +01:00
*
2020-04-05 15:33:01 +02:00
* @ param integer $value Value to convert
2019-10-31 11:17:22 +01:00
*
2020-04-05 15:33:01 +02:00
* @ return string
2019-10-31 11:17:22 +01:00
*/
2020-04-05 15:33:01 +02:00
public function packSignedInt ( int $value ) : string
2019-09-18 20:46:20 +02:00
{
2020-04-05 15:33:01 +02:00
return \danog\MadelineProto\Tools :: packSignedInt ( $value );
2019-09-18 20:46:20 +02:00
}
2019-10-31 11:17:22 +01:00
/**
2020-04-05 15:33:01 +02:00
* Convert integer to base256 long .
2019-10-31 11:17:22 +01:00
*
2020-04-05 15:33:01 +02:00
* @ param int $value Value to convert
2019-10-31 11:17:22 +01:00
*
2020-04-05 15:33:01 +02:00
* @ return string
2019-10-31 11:17:22 +01:00
*/
2020-04-05 15:33:01 +02:00
public function packSignedLong ( int $value ) : string
2019-09-18 20:46:20 +02:00
{
2020-04-05 15:33:01 +02:00
return \danog\MadelineProto\Tools :: packSignedLong ( $value );
2019-09-18 20:46:20 +02:00
}
2019-10-31 11:17:22 +01:00
/**
2020-04-05 15:33:01 +02:00
* Convert value to unsigned base256 int .
2019-10-31 11:17:22 +01:00
*
2020-04-05 15:33:01 +02:00
* @ param int $value Value
2019-10-31 11:17:22 +01:00
*
2020-04-05 15:33:01 +02:00
* @ return string
2019-10-31 11:17:22 +01:00
*/
2020-04-05 15:33:01 +02:00
public function packUnsignedInt ( int $value ) : string
2019-09-18 20:46:20 +02:00
{
2020-04-05 15:33:01 +02:00
return \danog\MadelineProto\Tools :: packUnsignedInt ( $value );
2019-09-18 20:46:20 +02:00
}
2019-10-31 11:17:22 +01:00
/**
2020-04-05 15:33:01 +02:00
* Check if peer is present in internal peer database .
2019-10-31 11:17:22 +01:00
*
2020-04-05 15:33:01 +02:00
* @ param mixed $id Peer
2019-10-31 11:17:22 +01:00
*
2020-04-05 15:33:01 +02:00
* @ return \Generator < boolean >
2019-10-31 11:17:22 +01:00
*/
2020-04-05 15:33:01 +02:00
public function peerIsset ( $id , array $extra = [])
2019-09-18 20:46:20 +02:00
{
2020-04-05 15:33:01 +02:00
return $this -> __call ( __FUNCTION__ , [ $id , $extra ]);
2019-09-18 20:46:20 +02:00
}
/**
2020-04-05 15:33:01 +02:00
* Login as user .
2019-09-18 20:46:20 +02:00
*
2020-04-05 15:33:01 +02:00
* @ param string $number Phone number
* @ param integer $sms_type SMS type
2019-09-18 21:21:34 +02:00
*
2020-04-05 15:33:01 +02:00
* @ return \Generator
2019-09-18 20:46:20 +02:00
*/
2020-04-05 15:33:01 +02:00
public function phoneLogin ( $number , $sms_type = 5 , array $extra = [])
2019-09-18 20:46:20 +02:00
{
2020-04-05 15:33:01 +02:00
return $this -> __call ( __FUNCTION__ , [ $number , $sms_type , $extra ]);
2019-09-18 20:46:20 +02:00
}
/**
2020-04-05 15:33:01 +02:00
* Positive modulo
* Works just like the % ( modulus ) operator , only returns always a postive number .
2019-09-18 20:46:20 +02:00
*
2020-04-05 15:33:01 +02:00
* @ param int $a A
* @ param int $b B
2019-09-18 21:21:34 +02:00
*
2020-04-05 15:33:01 +02:00
* @ return int Modulo
2019-09-18 20:46:20 +02:00
*/
2020-04-05 15:33:01 +02:00
public function posmod ( int $a , int $b ) : int
2019-09-18 20:46:20 +02:00
{
2020-04-05 15:33:01 +02:00
return \danog\MadelineProto\Tools :: posmod ( $a , $b );
2019-09-18 20:46:20 +02:00
}
2019-09-18 21:21:34 +02:00
/**
2020-04-05 15:33:01 +02:00
* Get random string of specified length .
2019-09-18 21:21:34 +02:00
*
2020-04-05 15:33:01 +02:00
* @ param integer $length Length
2019-09-18 21:32:24 +02:00
*
2020-04-05 15:33:01 +02:00
* @ return string Random string
2019-09-18 21:21:34 +02:00
*/
2020-04-05 15:33:01 +02:00
public function random ( int $length ) : string
2019-09-18 21:21:34 +02:00
{
2020-04-05 15:33:01 +02:00
return \danog\MadelineProto\Tools :: random ( $length );
2019-09-18 21:21:34 +02:00
}
2019-10-31 11:17:22 +01:00
/**
2020-04-05 15:33:01 +02:00
* Get random integer .
2019-10-31 11:17:22 +01:00
*
2020-04-05 15:33:01 +02:00
* @ param integer $modulus Modulus
2019-10-31 11:17:22 +01:00
*
2020-04-05 15:33:01 +02:00
* @ return int
2019-10-31 11:17:22 +01:00
*/
2020-04-05 15:33:01 +02:00
public function randomInt ( int $modulus = 0 ) : int
2019-10-31 11:17:22 +01:00
{
2020-04-05 15:33:01 +02:00
return \danog\MadelineProto\Tools :: randomInt ( $modulus );
2019-10-31 11:17:22 +01:00
}
/**
2020-04-05 15:33:01 +02:00
* Asynchronously read line .
2019-10-31 11:17:22 +01:00
*
2020-04-05 15:33:01 +02:00
* @ param string $prompt Prompt
2019-10-31 11:17:22 +01:00
*
2020-06-16 17:52:55 +02:00
* @ return Promise < string >
2019-10-31 11:17:22 +01:00
*/
2020-04-05 15:33:01 +02:00
public function readLine ( string $prompt = '' )
2019-10-31 11:17:22 +01:00
{
2020-04-05 15:33:01 +02:00
return \danog\MadelineProto\Tools :: readLine ( $prompt );
2019-10-31 11:17:22 +01:00
}
/**
2020-04-05 15:33:01 +02:00
* Rekey secret chat .
2019-10-31 11:17:22 +01:00
*
2020-04-05 15:33:01 +02:00
* @ param int $chat Secret chat to rekey
2019-10-31 11:17:22 +01:00
*
2020-04-05 15:33:01 +02:00
* @ return \Generator
2019-10-31 11:17:22 +01:00
*/
2020-04-05 15:33:01 +02:00
public function rekey ( int $chat , array $extra = [])
2019-10-31 11:17:22 +01:00
{
2020-04-05 15:33:01 +02:00
return $this -> __call ( __FUNCTION__ , [ $chat , $extra ]);
2019-10-31 11:17:22 +01:00
}
/**
2020-04-05 15:33:01 +02:00
* Report an error to the previously set peer .
2019-10-31 11:17:22 +01:00
*
2020-09-24 20:49:34 +02:00
* @ param string $message Error to report
* @ param string $parseMode Parse mode
2019-10-31 11:17:22 +01:00
*
2020-04-05 15:33:01 +02:00
* @ return \Generator
2019-10-31 11:17:22 +01:00
*/
2020-09-24 20:49:34 +02:00
public function report ( string $message , string $parseMode = '' , array $extra = [])
2019-10-31 11:17:22 +01:00
{
2020-09-24 20:49:34 +02:00
return $this -> __call ( __FUNCTION__ , [ $message , $parseMode , $extra ]);
2019-10-31 11:17:22 +01:00
}
2020-02-23 19:28:42 +01:00
/**
2020-04-05 15:33:01 +02:00
* Request VoIP call .
2020-02-23 19:28:42 +01:00
*
2020-04-05 15:33:01 +02:00
* @ param mixed $user User
2020-02-23 19:28:42 +01:00
*
2020-04-05 15:33:01 +02:00
* @ return void
2020-02-23 19:28:42 +01:00
*/
2020-04-05 15:33:01 +02:00
public function requestCall ( $user , array $extra = [])
2020-02-23 19:28:42 +01:00
{
2020-04-05 15:33:01 +02:00
return $this -> __call ( __FUNCTION__ , [ $user , $extra ]);
2020-02-23 19:28:42 +01:00
}
2019-10-31 15:06:25 +01:00
/**
2020-04-05 15:33:01 +02:00
* Request secret chat .
2019-10-31 15:06:25 +01:00
*
2020-04-05 15:33:01 +02:00
* @ param mixed $user User to start secret chat with
2019-10-31 15:06:25 +01:00
*
2020-04-05 15:33:01 +02:00
* @ return \Generator
2019-10-31 15:06:25 +01:00
*/
2020-04-05 15:33:01 +02:00
public function requestSecretChat ( $user , array $extra = [])
2019-10-31 15:06:25 +01:00
{
2020-04-05 15:33:01 +02:00
return $this -> __call ( __FUNCTION__ , [ $user , $extra ]);
2019-10-31 15:06:25 +01:00
}
/**
2020-04-05 15:33:01 +02:00
* Reset the update state and fetch all updates from the beginning .
2019-10-31 15:06:25 +01:00
*
* @ return void
*/
2020-04-05 15:33:01 +02:00
public function resetUpdateState () : void
2019-10-31 15:06:25 +01:00
{
2020-04-05 15:33:01 +02:00
$this -> API -> resetUpdateState ();
2019-10-31 15:06:25 +01:00
}
/**
2020-04-05 15:33:01 +02:00
* Resolve username ( use getInfo instead ) .
2019-10-31 15:06:25 +01:00
*
2020-04-05 15:33:01 +02:00
* @ param string $username Username
*
* @ return \Generator
2019-10-31 15:06:25 +01:00
*/
2020-04-05 15:33:01 +02:00
public function resolveUsername ( string $username , array $extra = [])
2019-10-31 15:06:25 +01:00
{
2020-04-05 15:33:01 +02:00
return $this -> __call ( __FUNCTION__ , [ $username , $extra ]);
2019-10-31 15:06:25 +01:00
}
2019-10-31 20:48:06 +01:00
/**
2020-04-05 15:33:01 +02:00
* Restart update loop .
2019-10-31 20:48:06 +01:00
*
2020-04-05 15:33:01 +02:00
* @ return void
2019-10-31 20:48:06 +01:00
*/
2020-04-05 15:33:01 +02:00
public function restart ( array $extra = [])
2019-10-31 20:48:06 +01:00
{
2020-04-05 15:33:01 +02:00
return $this -> __call ( __FUNCTION__ , [ $extra ]);
2019-10-31 20:48:06 +01:00
}
2020-02-26 11:47:30 +01:00
/**
2020-04-05 15:33:01 +02:00
* Rethrow error catched in strand .
2020-02-26 11:47:30 +01:00
*
2020-04-05 15:33:01 +02:00
* @ param \Throwable $e Exception
* @ param string $file File where the strand started
2020-02-26 11:47:30 +01:00
*
2020-06-16 17:52:55 +02:00
* @ psalm - suppress InvalidScope
*
2020-04-05 15:33:01 +02:00
* @ return void
2020-02-26 11:47:30 +01:00
*/
2020-04-05 15:33:01 +02:00
public function rethrow ( \Throwable $e , $file = '' ) : void
2020-02-26 11:47:30 +01:00
{
2020-04-05 15:33:01 +02:00
\danog\MadelineProto\Tools :: rethrow ( $e , $file );
2020-02-26 11:47:30 +01:00
}
2019-12-28 16:07:09 +01:00
/**
2020-04-05 15:33:01 +02:00
* null - byte RLE decode .
2019-12-28 16:07:09 +01:00
*
2020-04-05 15:33:01 +02:00
* @ param string $string Data to decode
2019-12-28 16:07:09 +01:00
*
2020-04-05 15:33:01 +02:00
* @ return string
2019-12-28 16:07:09 +01:00
*/
2020-04-05 15:33:01 +02:00
public function rleDecode ( string $string ) : string
2019-09-18 20:46:20 +02:00
{
2020-04-05 15:33:01 +02:00
return \danog\MadelineProto\Tools :: rleDecode ( $string );
2019-09-18 20:46:20 +02:00
}
2019-12-28 16:07:09 +01:00
/**
2020-04-05 15:33:01 +02:00
* null - byte RLE encode .
2019-12-28 16:07:09 +01:00
*
2020-04-05 15:33:01 +02:00
* @ param string $string Data to encode
2019-12-28 16:07:09 +01:00
*
2020-04-05 15:33:01 +02:00
* @ return string
2019-12-28 16:07:09 +01:00
*/
2020-04-05 15:33:01 +02:00
public function rleEncode ( string $string ) : string
2019-09-18 20:46:20 +02:00
{
2020-04-05 15:33:01 +02:00
return \danog\MadelineProto\Tools :: rleEncode ( $string );
2019-09-18 20:46:20 +02:00
}
2019-12-28 16:07:09 +01:00
/**
2020-04-05 15:33:01 +02:00
* Get secret chat status .
2019-12-28 16:07:09 +01:00
*
2020-04-05 15:33:01 +02:00
* @ param int $chat Chat ID
2019-12-28 16:07:09 +01:00
*
2020-04-05 15:33:01 +02:00
* @ return int One of MTProto :: SECRET_EMPTY , MTProto :: SECRET_REQUESTED , MTProto :: SECRET_READY
2019-12-28 16:07:09 +01:00
*/
2020-04-05 15:33:01 +02:00
public function secretChatStatus ( int $chat ) : int
2019-09-18 20:46:20 +02:00
{
2020-04-05 15:33:01 +02:00
return $this -> API -> secretChatStatus ( $chat );
2019-09-18 20:46:20 +02:00
}
2020-10-01 18:02:54 +02:00
/**
* Serialize all instances .
*
* CALLED ONLY ON SHUTDOWN .
*
* @ return void
*/
public function serializeAll () : void
{
\danog\MadelineProto\MTProto :: serializeAll ();
}
2019-12-28 16:07:09 +01:00
/**
2020-04-05 15:33:01 +02:00
* Set update handling callback .
2019-12-28 16:07:09 +01:00
*
2020-04-05 15:33:01 +02:00
* @ param callable $callback Callback
2019-12-28 16:07:09 +01:00
*
2020-04-05 15:33:01 +02:00
* @ return void
2019-12-28 16:07:09 +01:00
*/
2020-04-05 15:33:01 +02:00
public function setCallback ( $callback ) : void
2019-09-18 20:46:20 +02:00
{
2020-04-05 15:33:01 +02:00
$this -> API -> setCallback ( $callback );
2019-09-18 20:46:20 +02:00
}
2019-12-28 16:07:09 +01:00
/**
2020-04-05 15:33:01 +02:00
* Set event handler .
2019-12-28 16:07:09 +01:00
*
2020-09-24 20:49:34 +02:00
* @ param class - string < EventHandler > $eventHandler Event handler
2019-12-28 16:07:09 +01:00
*
2020-04-05 15:33:01 +02:00
* @ return \Generator
2019-12-28 16:07:09 +01:00
*/
2020-09-24 20:49:34 +02:00
public function setEventHandler ( string $eventHandler , array $extra = [])
2019-09-18 20:46:20 +02:00
{
2020-09-24 20:49:34 +02:00
return $this -> __call ( __FUNCTION__ , [ $eventHandler , $extra ]);
2019-09-18 20:46:20 +02:00
}
2019-12-28 16:07:09 +01:00
/**
2020-04-05 15:33:01 +02:00
* Set NOOP update handler , ignoring all updates .
2019-12-28 16:07:09 +01:00
*
2020-04-05 15:33:01 +02:00
* @ return void
2019-12-28 16:07:09 +01:00
*/
2020-04-05 15:33:01 +02:00
public function setNoop () : void
2019-09-18 20:46:20 +02:00
{
2020-04-05 15:33:01 +02:00
$this -> API -> setNoop ();
2019-09-18 20:46:20 +02:00
}
2020-03-06 13:09:52 +01:00
/**
2020-04-05 15:33:01 +02:00
* Set peer ( s ) where to send errors occurred in the event loop .
2020-03-06 13:09:52 +01:00
*
2020-04-05 15:33:01 +02:00
* @ param int | string $userOrId Username ( s ) or peer ID ( s )
2020-03-06 13:09:52 +01:00
*
* @ return \Generator
*/
2020-04-05 15:33:01 +02:00
public function setReportPeers ( $userOrId , array $extra = [])
2020-03-06 13:09:52 +01:00
{
2020-04-05 15:33:01 +02:00
return $this -> __call ( __FUNCTION__ , [ $userOrId , $extra ]);
2020-03-06 13:09:52 +01:00
}
2019-12-28 16:07:09 +01:00
/**
2020-04-05 15:33:01 +02:00
* Sets a private variable in an object .
2019-12-28 16:07:09 +01:00
*
2020-04-05 15:33:01 +02:00
* @ param object $obj Object
* @ param string $var Attribute name
* @ param mixed $val Attribute value
*
2020-06-16 17:52:55 +02:00
* @ psalm - suppress InvalidScope
*
2020-04-05 15:33:01 +02:00
* @ return mixed
* @ access public
2019-12-28 16:07:09 +01:00
*/
2020-04-05 15:33:01 +02:00
public function setVar ( $obj , string $var , & $val ) : void
2019-09-18 20:46:20 +02:00
{
2020-04-05 15:33:01 +02:00
\danog\MadelineProto\Tools :: setVar ( $obj , $var , $val );
2019-09-18 20:46:20 +02:00
}
2019-10-31 20:48:06 +01:00
/**
2020-04-05 15:33:01 +02:00
* Set web template .
2019-10-31 20:48:06 +01:00
*
2020-04-05 15:33:01 +02:00
* @ param string $template Template
2019-10-31 20:48:06 +01:00
*
2020-04-05 15:33:01 +02:00
* @ return void
2019-10-31 20:48:06 +01:00
*/
2020-04-05 15:33:01 +02:00
public function setWebTemplate ( string $template ) : void
2019-09-18 20:46:20 +02:00
{
2020-04-05 15:33:01 +02:00
$this -> API -> setWebTemplate ( $template );
2019-09-18 20:46:20 +02:00
}
2019-10-31 20:48:06 +01:00
/**
2020-04-05 15:33:01 +02:00
* Set webhook update handler .
2019-10-31 20:48:06 +01:00
*
2020-04-05 15:33:01 +02:00
* @ param string $hook_url Webhook URL
* @ param string $pem_path PEM path for self - signed certificate
2019-10-31 20:48:06 +01:00
*
2020-04-05 15:33:01 +02:00
* @ return void
2019-10-31 20:48:06 +01:00
*/
2020-04-05 15:33:01 +02:00
public function setWebhook ( string $hook_url , string $pem_path = '' ) : void
2019-09-18 20:46:20 +02:00
{
2020-04-05 15:33:01 +02:00
$this -> API -> setWebhook ( $hook_url , $pem_path );
2019-09-18 20:46:20 +02:00
}
2020-09-24 20:49:34 +02:00
/**
* Set API wrapper needed for triggering serialization functions .
*/
public function setWrapper ( \danog\MadelineProto\APIWrapper $wrapper ) : void
{
$this -> API -> setWrapper ( $wrapper );
}
2019-10-31 20:48:06 +01:00
/**
2020-04-05 15:33:01 +02:00
* Setup logger .
2019-10-31 20:48:06 +01:00
*
2020-04-05 15:33:01 +02:00
* @ return void
2019-10-31 20:48:06 +01:00
*/
2020-04-05 15:33:01 +02:00
public function setupLogger () : void
2019-09-18 20:46:20 +02:00
{
2020-04-05 15:33:01 +02:00
$this -> API -> setupLogger ();
2019-09-18 20:46:20 +02:00
}
2020-02-23 19:28:42 +01:00
/**
2020-04-05 15:33:01 +02:00
* Asynchronously sleep .
2020-02-23 19:28:42 +01:00
*
2020-09-24 20:49:34 +02:00
* @ param int | float $time Number of seconds to sleep for
2020-02-23 19:28:42 +01:00
*
2020-04-05 15:33:01 +02:00
* @ return Promise
2020-02-23 19:28:42 +01:00
*/
2020-09-24 20:49:34 +02:00
public function sleep ( $time )
2020-02-23 19:28:42 +01:00
{
2020-04-05 15:33:01 +02:00
return \danog\MadelineProto\Tools :: sleep ( $time );
2020-02-23 19:28:42 +01:00
}
2019-10-31 20:48:06 +01:00
/**
2020-04-05 15:33:01 +02:00
* Resolves with a two - item array delineating successful and failed Promise results .
* The returned promise will only fail if the given number of required promises fail .
2019-10-31 20:48:06 +01:00
*
2020-04-05 15:33:01 +02:00
* @ param array < Promise | \Generator > $promises Promises
*
* @ return Promise
2019-10-31 20:48:06 +01:00
*/
2020-04-05 15:33:01 +02:00
public function some ( array $promises )
2019-09-18 20:46:20 +02:00
{
2020-04-05 15:33:01 +02:00
return \danog\MadelineProto\Tools :: some ( $promises );
2019-09-18 20:46:20 +02:00
}
2020-02-23 19:28:42 +01:00
/**
2020-04-05 15:33:01 +02:00
* Log in to telegram ( via CLI or web ) .
2020-02-23 19:28:42 +01:00
*
2020-04-05 15:33:01 +02:00
* @ return \Generator
2020-02-23 19:28:42 +01:00
*/
2020-04-05 15:33:01 +02:00
public function start ( array $extra = [])
2020-02-23 19:28:42 +01:00
{
2020-04-05 15:33:01 +02:00
return $this -> __call ( __FUNCTION__ , [ $extra ]);
2020-02-23 19:28:42 +01:00
}
2019-12-27 20:29:22 +01:00
/**
2020-04-05 15:33:01 +02:00
* Stop update loop .
2019-12-27 20:29:22 +01:00
*
* @ return void
*/
2020-04-05 15:33:01 +02:00
public function stop ( array $extra = [])
2019-09-18 20:46:20 +02:00
{
2020-04-05 15:33:01 +02:00
return $this -> __call ( __FUNCTION__ , [ $extra ]);
2019-09-18 20:46:20 +02:00
}
2019-12-27 20:29:22 +01:00
/**
2020-04-05 15:33:01 +02:00
* Convert TD to MTProto parameters .
2019-12-27 20:29:22 +01:00
*
2020-04-05 15:33:01 +02:00
* @ param array $params Parameters
2019-12-27 20:29:22 +01:00
*
2020-04-05 15:33:01 +02:00
* @ return \Generator < array >
2019-12-27 20:29:22 +01:00
*/
2020-04-05 15:33:01 +02:00
public function tdToMTProto ( array $params , array $extra = [])
2019-09-18 20:46:20 +02:00
{
2020-04-05 15:33:01 +02:00
return $this -> __call ( __FUNCTION__ , [ $params , $extra ]);
2019-09-18 20:46:20 +02:00
}
2019-12-28 16:07:09 +01:00
/**
2020-04-05 15:33:01 +02:00
* Convert TD parameters to tdcli .
2019-12-28 16:07:09 +01:00
*
2020-04-05 15:33:01 +02:00
* @ param mixed $params Parameters
*
* @ return mixed
2019-12-28 16:07:09 +01:00
*/
2020-04-05 15:33:01 +02:00
public function tdToTdcli ( $params , array $extra = [])
2019-09-18 20:46:20 +02:00
{
2020-04-05 15:33:01 +02:00
return $this -> __call ( __FUNCTION__ , [ $params , $extra ]);
2019-09-18 20:46:20 +02:00
}
2019-12-28 16:07:09 +01:00
/**
2020-04-05 15:33:01 +02:00
* Convert tdcli parameters to tdcli .
2019-12-28 16:07:09 +01:00
*
2020-04-05 15:33:01 +02:00
* @ param array $params Params
* @ param array $key Key
2019-12-28 16:07:09 +01:00
*
2020-04-05 15:33:01 +02:00
* @ return array
2019-12-28 16:07:09 +01:00
*/
2020-04-05 15:33:01 +02:00
public function tdcliToTd ( & $params , $key = null ) : array
2019-09-18 20:46:20 +02:00
{
2020-04-05 15:33:01 +02:00
return $this -> API -> tdcliToTd ( $params , $key );
2019-09-18 20:46:20 +02:00
}
2019-12-28 16:07:09 +01:00
/**
2020-04-05 15:33:01 +02:00
* Create an artificial timeout for any \Generator or Promise .
2019-12-28 16:07:09 +01:00
*
2020-04-05 15:33:01 +02:00
* @ param \Generator | Promise $promise
* @ param integer $timeout
2019-12-28 16:07:09 +01:00
*
2020-04-05 15:33:01 +02:00
* @ return Promise
2019-12-28 16:07:09 +01:00
*/
2020-04-05 15:33:01 +02:00
public function timeout ( $promise , int $timeout )
2019-09-18 20:46:20 +02:00
{
2020-04-05 15:33:01 +02:00
return \danog\MadelineProto\Tools :: timeout ( $promise , $timeout );
2019-09-18 20:46:20 +02:00
}
2020-09-24 20:49:34 +02:00
/**
* Creates an artificial timeout for any `Promise` .
*
* If the promise is resolved before the timeout expires , the result is returned
*
* If the timeout expires before the promise is resolved , a default value is returned
*
* @ template TReturn
*
* @ param Promise < TReturn >| \Generator $promise Promise to which the timeout is applied .
* @ param int $timeout Timeout in milliseconds .
* @ param TReturn $default
*
* @ return Promise < TReturn >
*
* @ throws \TypeError If $promise is not an instance of \Amp\Promise or \React\Promise\PromiseInterface .
*/
public function timeoutWithDefault ( $promise , int $timeout , $default = null )
{
return \danog\MadelineProto\Tools :: timeoutWithDefault ( $promise , $timeout , $default );
}
2019-12-28 16:07:09 +01:00
/**
2020-04-05 15:33:01 +02:00
* Convert to camelCase .
2019-12-28 16:07:09 +01:00
*
2020-04-05 15:33:01 +02:00
* @ param string $input String
2019-12-28 16:07:09 +01:00
*
2020-04-05 15:33:01 +02:00
* @ return string
2019-12-28 16:07:09 +01:00
*/
2020-04-05 15:33:01 +02:00
public function toCamelCase ( string $input ) : string
2019-09-18 20:46:20 +02:00
{
2020-06-16 17:52:55 +02:00
return \danog\MadelineProto\StrTools :: toCamelCase ( $input );
2019-09-18 20:46:20 +02:00
}
2019-12-28 16:07:09 +01:00
/**
2020-04-05 15:33:01 +02:00
* Convert to snake_case .
2019-12-28 16:07:09 +01:00
*
2020-04-05 15:33:01 +02:00
* @ param string $input String
2019-12-28 16:07:09 +01:00
*
2020-04-05 15:33:01 +02:00
* @ return string
2019-12-28 16:07:09 +01:00
*/
2020-04-05 15:33:01 +02:00
public function toSnakeCase ( string $input ) : string
2019-09-18 20:46:20 +02:00
{
2020-06-16 17:52:55 +02:00
return \danog\MadelineProto\StrTools :: toSnakeCase ( $input );
2019-09-18 20:46:20 +02:00
}
2019-12-28 16:07:09 +01:00
/**
2020-04-05 15:33:01 +02:00
* Convert MTProto channel ID to bot API channel ID .
2019-12-28 16:07:09 +01:00
*
2020-04-05 15:33:01 +02:00
* @ param int $id MTProto channel ID
*
* @ return int
2019-12-28 16:07:09 +01:00
*/
2020-04-05 15:33:01 +02:00
public function toSupergroup ( $id )
2019-09-18 20:46:20 +02:00
{
2020-04-05 15:33:01 +02:00
return $this -> __call ( __FUNCTION__ , [ $id ]);
2019-09-18 20:46:20 +02:00
}
2020-06-16 17:52:55 +02:00
/**
* Escape type name .
*
* @ param string $type String to escape
*
* @ return string
*/
public function typeEscape ( string $type ) : string
{
return \danog\MadelineProto\StrTools :: typeEscape ( $type );
}
2019-12-28 16:07:09 +01:00
/**
2020-04-05 15:33:01 +02:00
* Unpack binary double .
2019-12-28 16:07:09 +01:00
*
2020-04-05 15:33:01 +02:00
* @ param string $value Value to unpack
2019-12-28 16:07:09 +01:00
*
2020-04-05 15:33:01 +02:00
* @ return float
2019-12-28 16:07:09 +01:00
*/
2020-04-05 15:33:01 +02:00
public function unpackDouble ( string $value ) : float
2019-09-18 20:46:20 +02:00
{
2020-04-05 15:33:01 +02:00
return \danog\MadelineProto\Tools :: unpackDouble ( $value );
2019-09-18 20:46:20 +02:00
}
2019-12-28 16:07:09 +01:00
/**
2020-04-05 15:33:01 +02:00
* Unpack bot API file ID .
2019-12-28 16:07:09 +01:00
*
2020-04-05 15:33:01 +02:00
* @ param string $fileId Bot API file ID
2019-12-28 16:07:09 +01:00
*
2020-04-05 15:33:01 +02:00
* @ return array Unpacked file ID
2019-12-28 16:07:09 +01:00
*/
2020-04-05 15:33:01 +02:00
public function unpackFileId ( string $fileId ) : array
2019-09-18 20:46:20 +02:00
{
2020-04-05 15:33:01 +02:00
return $this -> API -> unpackFileId ( $fileId );
2019-09-18 20:46:20 +02:00
}
/**
2020-04-05 15:33:01 +02:00
* Unpack base256 signed int .
2019-09-18 20:46:20 +02:00
*
2020-04-05 15:33:01 +02:00
* @ param string $value base256 int
2019-12-28 16:07:09 +01:00
*
2020-04-05 15:33:01 +02:00
* @ return integer
2019-09-18 20:46:20 +02:00
*/
2020-04-05 15:33:01 +02:00
public function unpackSignedInt ( string $value ) : int
2019-09-18 20:46:20 +02:00
{
2020-04-05 15:33:01 +02:00
return \danog\MadelineProto\Tools :: unpackSignedInt ( $value );
2019-09-18 20:46:20 +02:00
}
2019-12-27 20:29:22 +01:00
/**
2020-04-05 15:33:01 +02:00
* Unpack base256 signed long .
2019-12-27 20:29:22 +01:00
*
2020-04-05 15:33:01 +02:00
* @ param string $value base256 long
2019-12-27 20:29:22 +01:00
*
2020-04-05 15:33:01 +02:00
* @ return integer
2019-12-27 20:29:22 +01:00
*/
2020-04-05 15:33:01 +02:00
public function unpackSignedLong ( string $value ) : int
2019-09-18 20:46:20 +02:00
{
2020-04-05 15:33:01 +02:00
return \danog\MadelineProto\Tools :: unpackSignedLong ( $value );
2019-09-18 20:46:20 +02:00
}
2019-12-27 20:29:22 +01:00
/**
2020-04-05 15:33:01 +02:00
* Unpack base256 signed long to string .
2020-01-19 15:44:12 +01:00
*
2020-04-05 15:33:01 +02:00
* @ param string $value base256 long
*
* @ return string
2020-01-19 15:44:12 +01:00
*/
2020-04-05 15:33:01 +02:00
public function unpackSignedLongString ( $value ) : string
2020-01-19 15:44:12 +01:00
{
2020-04-05 15:33:01 +02:00
return \danog\MadelineProto\Tools :: unpackSignedLongString ( $value );
2020-01-19 15:44:12 +01:00
}
2020-02-07 21:13:49 +01:00
/**
2020-04-05 15:33:01 +02:00
* Unset event handler .
*
* @ param bool $disableUpdateHandling Whether to also disable internal update handling ( will cause errors , otherwise will simply use the NOOP handler )
2020-02-07 21:13:49 +01:00
*
2020-02-23 19:28:42 +01:00
* @ return void
*/
2020-04-05 15:33:01 +02:00
public function unsetEventHandler ( bool $disableUpdateHandling = false ) : void
2020-02-23 19:28:42 +01:00
{
2020-04-05 15:33:01 +02:00
$this -> API -> unsetEventHandler ( $disableUpdateHandling );
2020-02-23 19:28:42 +01:00
}
/**
2020-04-05 15:33:01 +02:00
* Update the 2 FA password .
2020-02-07 21:13:49 +01:00
*
2020-04-05 15:33:01 +02:00
* The params array can contain password , new_password , email and hint params .
*
* @ param array $params The params
*
* @ return \Generator
2020-02-07 21:13:49 +01:00
*/
2020-04-05 15:33:01 +02:00
public function update2fa ( array $params , array $extra = [])
2020-02-07 21:13:49 +01:00
{
2020-04-05 15:33:01 +02:00
return $this -> __call ( __FUNCTION__ , [ $params , $extra ]);
2020-02-07 21:13:49 +01:00
}
2020-01-19 15:44:12 +01:00
/**
2020-04-05 15:33:01 +02:00
* Parse , update and store settings .
2019-12-27 20:29:22 +01:00
*
2020-09-26 17:11:41 +02:00
* @ param SettingsAbstract $settings Settings
2019-12-27 20:29:22 +01:00
*
2020-09-24 20:49:34 +02:00
* @ return \Generator
2019-12-27 20:29:22 +01:00
*/
2020-09-26 17:11:41 +02:00
public function updateSettings ( \danog\MadelineProto\SettingsAbstract $settings , array $extra = [])
2019-09-18 20:46:20 +02:00
{
2020-09-26 17:11:41 +02:00
return $this -> __call ( __FUNCTION__ , [ $settings , $extra ]);
2019-09-18 20:46:20 +02:00
}
2019-12-27 20:29:22 +01:00
/**
2020-04-05 15:33:01 +02:00
* Upload file .
2019-12-27 20:29:22 +01:00
*
2020-04-05 15:33:01 +02:00
* @ param FileCallbackInterface | string | array $file File , URL or Telegram file to upload
* @ param string $fileName File name
* @ param callable $cb Callback ( DEPRECATED , use FileCallbackInterface )
* @ param boolean $encrypted Whether to encrypt file for secret chats
*
* @ return \Generator < array >
2019-12-27 20:29:22 +01:00
*/
2020-04-05 15:33:01 +02:00
public function upload ( $file , string $fileName = '' , $cb = null , bool $encrypted = false , array $extra = [])
2019-09-18 20:46:20 +02:00
{
2020-04-05 15:33:01 +02:00
return $this -> __call ( __FUNCTION__ , [ $file , $fileName , $cb , $encrypted , $extra ]);
2019-09-18 20:46:20 +02:00
}
2019-12-27 20:29:22 +01:00
/**
2020-04-05 15:33:01 +02:00
* Upload file to secret chat .
2019-12-27 20:29:22 +01:00
*
2020-04-05 15:33:01 +02:00
* @ param FileCallbackInterface | string | array $file File , URL or Telegram file to upload
* @ param string $fileName File name
* @ param callable $cb Callback ( DEPRECATED , use FileCallbackInterface )
*
* @ return \Generator < array >
2019-12-27 20:29:22 +01:00
*/
2020-04-05 15:33:01 +02:00
public function uploadEncrypted ( $file , string $fileName = '' , $cb = null , array $extra = [])
2019-09-18 20:46:20 +02:00
{
2020-04-05 15:33:01 +02:00
return $this -> __call ( __FUNCTION__ , [ $file , $fileName , $cb , $extra ]);
2019-09-18 20:46:20 +02:00
}
2019-12-27 20:29:22 +01:00
/**
2020-04-05 15:33:01 +02:00
* Upload file from callable .
2019-12-27 20:29:22 +01:00
*
2020-04-05 15:33:01 +02:00
* The callable must accept two parameters : int $offset , int $size
* The callable must return a string with the contest of the file at the specified offset and size .
*
* @ param mixed $callable Callable
* @ param integer $size File size
* @ param string $mime Mime type
* @ param string $fileName File name
* @ param callable $cb Callback ( DEPRECATED , use FileCallbackInterface )
* @ param boolean $seekable Whether chunks can be fetched out of order
* @ param boolean $encrypted Whether to encrypt file for secret chats
*
* @ return \Generator < array >
2019-12-27 20:29:22 +01:00
*/
2020-04-05 15:33:01 +02:00
public function uploadFromCallable ( callable $callable , int $size , string $mime , string $fileName = '' , $cb = null , bool $seekable = true , bool $encrypted = false , array $extra = [])
2019-09-18 20:46:20 +02:00
{
2020-04-05 15:33:01 +02:00
return $this -> __call ( __FUNCTION__ , [ $callable , $size , $mime , $fileName , $cb , $seekable , $encrypted , $extra ]);
2019-09-18 20:46:20 +02:00
}
2019-12-27 20:29:22 +01:00
/**
2020-04-05 15:33:01 +02:00
* Upload file from stream .
2019-12-27 20:29:22 +01:00
*
2020-04-05 15:33:01 +02:00
* @ param mixed $stream PHP resource or AMPHP async stream
* @ param integer $size File size
* @ param string $mime Mime type
* @ param string $fileName File name
* @ param callable $cb Callback ( DEPRECATED , use FileCallbackInterface )
* @ param boolean $encrypted Whether to encrypt file for secret chats
2019-12-27 20:29:22 +01:00
*
2020-04-05 15:33:01 +02:00
* @ return array
2019-12-27 20:29:22 +01:00
*/
2020-04-05 15:33:01 +02:00
public function uploadFromStream ( $stream , int $size , string $mime , string $fileName = '' , $cb = null , bool $encrypted = false , array $extra = [])
2019-09-18 20:46:20 +02:00
{
2020-04-05 15:33:01 +02:00
return $this -> __call ( __FUNCTION__ , [ $stream , $size , $mime , $fileName , $cb , $encrypted , $extra ]);
2019-09-18 20:46:20 +02:00
}
2019-10-31 20:48:06 +01:00
/**
2020-04-05 15:33:01 +02:00
* Reupload telegram file .
2019-10-31 20:48:06 +01:00
*
2020-04-05 15:33:01 +02:00
* @ param mixed $media Telegram file
* @ param callable $cb Callback ( DEPRECATED , use FileCallbackInterface )
* @ param boolean $encrypted Whether to encrypt file for secret chats
*
* @ return \Generator < array >
2019-10-31 20:48:06 +01:00
*/
2020-04-05 15:33:01 +02:00
public function uploadFromTgfile ( $media , $cb = null , bool $encrypted = false , array $extra = [])
2019-09-18 20:46:20 +02:00
{
2020-04-05 15:33:01 +02:00
return $this -> __call ( __FUNCTION__ , [ $media , $cb , $encrypted , $extra ]);
2019-09-18 20:46:20 +02:00
}
2019-10-31 20:48:06 +01:00
/**
2020-04-05 15:33:01 +02:00
* Upload file from URL .
2019-10-31 20:48:06 +01:00
*
2020-04-05 15:33:01 +02:00
* @ param string | FileCallbackInterface $url URL of file
* @ param integer $size Size of file
* @ param string $fileName File name
* @ param callable $cb Callback ( DEPRECATED , use FileCallbackInterface )
* @ param boolean $encrypted Whether to encrypt file for secret chats
*
* @ return array
2019-10-31 20:48:06 +01:00
*/
2020-04-05 15:33:01 +02:00
public function uploadFromUrl ( $url , int $size = 0 , string $fileName = '' , $cb = null , bool $encrypted = false , array $extra = [])
2019-09-18 20:46:20 +02:00
{
2020-04-05 15:33:01 +02:00
return $this -> __call ( __FUNCTION__ , [ $url , $size , $fileName , $cb , $encrypted , $extra ]);
2019-09-18 20:46:20 +02:00
}
2019-10-31 20:48:06 +01:00
/**
2020-04-05 15:33:01 +02:00
* Synchronously wait for a promise | generator .
2019-10-31 20:48:06 +01:00
*
2020-04-05 15:33:01 +02:00
* @ param \Generator | Promise $promise The promise to wait for
* @ param boolean $ignoreSignal Whether to ignore shutdown signals
2019-10-31 20:48:06 +01:00
*
2020-04-05 15:33:01 +02:00
* @ return mixed
2019-10-31 20:48:06 +01:00
*/
2020-04-05 15:33:01 +02:00
public function wait ( $promise , $ignoreSignal = false )
2019-09-18 20:46:20 +02:00
{
2020-04-05 15:33:01 +02:00
return \danog\MadelineProto\Tools :: wait ( $promise , $ignoreSignal );
2019-09-18 20:46:20 +02:00
}
2019-09-18 21:32:24 +02:00
}