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
{
/**
2019-12-27 18:26:47 +01:00
* You cannot use this method directly , use the phoneLogin method instead ( see https :// docs . madelineproto . xyz for more info ) .
2017-01-22 17:40:56 +01:00
*
2019-09-18 21:32:24 +02:00
* Parameters :
2019-12-27 18:26:47 +01:00
* * `string` ** phone_number ** - You cannot use this method directly , use the phoneLogin method instead ( see https :// docs . madelineproto . xyz for more info )
* * `int` ** api_id ** - You cannot use this method directly , use the phoneLogin method instead ( see https :// docs . madelineproto . xyz for more info )
* * `string` ** api_hash ** - You cannot use this method directly , use the phoneLogin method instead ( see https :// docs . madelineproto . xyz for more info )
* * `CodeSettings` ** settings ** - You cannot use this method directly , use the phoneLogin method instead ( see https :// docs . madelineproto . xyz for more info )
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
/**
2019-12-27 18:26:47 +01:00
* You cannot use this method directly , use the completeSignup method instead ( see https :// docs . madelineproto . xyz for more info ) .
2019-09-18 20:46:20 +02:00
*
2019-09-18 21:32:24 +02:00
* Parameters :
2019-12-27 18:26:47 +01:00
* * `string` ** phone_number ** - You cannot use this method directly , use the completeSignup method instead ( see https :// docs . madelineproto . xyz for more info )
* * `string` ** phone_code_hash ** - You cannot use this method directly , use the completeSignup method instead ( see https :// docs . madelineproto . xyz for more info )
* * `string` ** first_name ** - You cannot use this method directly , use the completeSignup method instead ( see https :// docs . madelineproto . xyz for more info )
* * `string` ** last_name ** - You cannot use this method directly , use the completeSignup method instead ( see https :// docs . madelineproto . xyz for more info )
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
/**
2019-12-27 18:26:47 +01:00
* You cannot use this method directly , use the completePhoneLogin method instead ( see https :// docs . madelineproto . xyz for more info ) .
2019-09-18 20:46:20 +02:00
*
2019-09-18 21:32:24 +02:00
* Parameters :
2019-12-27 18:26:47 +01:00
* * `string` ** phone_number ** - You cannot use this method directly , use the completePhoneLogin method instead ( see https :// docs . madelineproto . xyz for more info )
* * `string` ** phone_code_hash ** - You cannot use this method directly , use the completePhoneLogin method instead ( see https :// docs . madelineproto . xyz for more info )
* * `string` ** phone_code ** - You cannot use this method directly , use the completePhoneLogin method instead ( see https :// docs . madelineproto . xyz for more info )
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
/**
2019-12-27 18:26:47 +01:00
* You cannot use this method directly , use the logout method instead ( see https :// docs . madelineproto . xyz for more info ) .
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
/**
2019-12-27 18:26:47 +01:00
* You cannot use this method directly , use $MadelineProto -> exportAuthorization () instead , see https :// docs . madelineproto . xyz / docs / LOGIN . html .
2019-09-18 20:46:20 +02:00
*
2019-09-18 21:32:24 +02:00
* Parameters :
2019-12-27 18:26:47 +01:00
* * `int` ** dc_id ** - You cannot use this method directly , use $MadelineProto -> exportAuthorization () instead , see https :// docs . madelineproto . xyz / docs / LOGIN . 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-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
/**
2019-12-27 18:26:47 +01:00
* You cannot use this method directly , use $MadelineProto -> importAuthorization ( $authorization ) instead , see https :// docs . madelineproto . xyz / docs / LOGIN . html .
2017-01-22 17:40:56 +01:00
*
2019-09-18 21:32:24 +02:00
* Parameters :
2019-12-27 18:26:47 +01:00
* * `int` ** id ** - You cannot use this method directly , use $MadelineProto -> importAuthorization ( $authorization ) instead , see https :// docs . madelineproto . xyz / docs / LOGIN . html
* * `bytes` ** bytes ** - You cannot use this method directly , use $MadelineProto -> importAuthorization ( $authorization ) instead , see https :// docs . madelineproto . xyz / docs / LOGIN . html
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
/**
2019-12-27 18:26:47 +01:00
* You cannot use this method directly , instead modify the PFS and default_temp_auth_key_expires_in settings , see https :// docs . madelineproto . xyz / docs / SETTINGS . html for more info .
2019-09-18 20:46:20 +02:00
*
2019-09-18 21:32:24 +02:00
* Parameters :
2019-12-27 18:26:47 +01:00
* * `long` ** perm_auth_key_id ** - You cannot use this method directly , instead modify the PFS and default_temp_auth_key_expires_in settings , see https :// docs . madelineproto . xyz / docs / SETTINGS . html for more info
* * `long` ** nonce ** - You cannot use this method directly , instead modify the PFS and default_temp_auth_key_expires_in settings , see https :// docs . madelineproto . xyz / docs / SETTINGS . html for more info
* * `int` ** expires_at ** - You cannot use this method directly , instead modify the PFS and default_temp_auth_key_expires_in settings , see https :// docs . madelineproto . xyz / docs / SETTINGS . html for more info
* * `bytes` ** encrypted_message ** - You cannot use this method directly , instead modify the PFS and default_temp_auth_key_expires_in settings , see https :// docs . madelineproto . xyz / docs / SETTINGS . html for more info
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
/**
2019-12-27 18:26:47 +01:00
* You cannot use this method directly , use the botLogin method instead ( see https :// docs . madelineproto . xyz for more info ) .
2019-09-18 20:46:20 +02:00
*
2019-09-18 21:32:24 +02:00
* Parameters :
2019-12-27 18:26:47 +01:00
* * `int` ** api_id ** - You cannot use this method directly , use the botLogin method instead ( see https :// docs . madelineproto . xyz for more info )
* * `string` ** api_hash ** - You cannot use this method directly , use the botLogin method instead ( see https :// docs . madelineproto . xyz for more info )
* * `string` ** bot_auth_token ** - You cannot use this method directly , use the botLogin method instead ( see https :// docs . madelineproto . xyz for more info )
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-01-05 17:58:45 +01:00
* You cannot use this method directly , use the complete2falogin method instead ( see https :// docs . madelineproto . xyz for more info ) .
2019-06-05 15:38:32 +02:00
*
2019-09-18 21:32:24 +02:00
* Parameters :
2020-01-05 17:58:45 +01:00
* * `InputCheckPasswordSRP` ** password ** - You cannot use this method directly , use the complete2falogin method instead ( see https :// docs . madelineproto . xyz for more info )
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 :
2019-09-18 20:46:20 +02:00
* * `[long]` ** except_auth_keys ** - The temporary authorization keys to keep
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
/**
*
*
* Parameters :
* * `int` ** api_id ** -
* * `string` ** api_hash ** -
* * `[int]` ** except_ids ** -.
*
* @ param array $params Parameters
*
* @ return auth . LoginToken
*/
public function exportLoginToken ( $params );
/**
*
*
* Parameters :
* * `bytes` ** token ** -.
*
* @ param array $params Parameters
*
* @ return auth . LoginToken
*/
public function importLoginToken ( $params );
/**
*
*
* Parameters :
* * `bytes` ** token ** -.
*
* @ 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
2019-09-18 21:32:24 +02:00
* * `[int]` ** other_uids ** - Other UIDs
*
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
2019-09-18 21:32:24 +02:00
* * `[int]` ** other_uids ** - Other UIDs
*
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 :
2019-09-18 20:46:20 +02:00
* * `[int]` ** hash ** - Optional : IDs of previously fetched wallpapers
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 :
2019-12-27 18:26:47 +01: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 :
2019-12-27 18:26:47 +01: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
2019-09-18 20:46:20 +02:00
* * `[InputPrivacyRule]` ** rules ** - Privacy settings
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-01-05 17:58:45 +01:00
* You cannot use this method directly ; use $MadelineProto -> update2fa ( $params ), instead ( see https :// docs . madelineproto . xyz for more info ) .
2017-03-31 17:35:20 +02:00
*
2019-09-18 21:32:24 +02:00
* Parameters :
2020-01-05 17:58:45 +01:00
* * `InputCheckPasswordSRP` ** password ** - You cannot use this method directly ; use $MadelineProto -> update2fa ( $params ), instead ( see https :// docs . madelineproto . xyz for more info )
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-01-05 17:58:45 +01:00
* You cannot use this method directly ; use $MadelineProto -> update2fa ( $params ), instead ( see https :// docs . madelineproto . xyz for more info ) .
2019-09-18 20:46:20 +02:00
*
2019-09-18 21:32:24 +02:00
* Parameters :
2020-01-05 17:58:45 +01:00
* * `InputCheckPasswordSRP` ** password ** - You cannot use this method directly ; use $MadelineProto -> update2fa ( $params ), instead ( see https :// docs . madelineproto . xyz for more info )
* * `account.PasswordInputSettings` ** new_settings ** - You cannot use this method directly ; use $MadelineProto -> update2fa ( $params ), instead ( see https :// docs . madelineproto . xyz for more info )
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 :
2019-09-18 20:46:20 +02:00
* * `[SecureValueType]` ** types ** - Get telegram passport secure parameters
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 :
2019-09-18 20:46:20 +02:00
* * `[SecureValueType]` ** types ** - The values 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
2019-09-18 20:46:20 +02:00
* * `[SecureValueHash]` ** value_hashes ** - Hashes of the encrypted credentials
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
* * `InputThemeSettings` ** settings ** - Optional :
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
* * `InputThemeSettings` ** settings ** - Optional :
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
2019-09-18 21:32:24 +02:00
* * `[int]` ** hash ** - Optional : Hash for pagination
*
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
/**
*
*
* Parameters :
* * `boolean` ** sensitive_enabled ** - Optional :.
*
* @ param array $params Parameters
*
* @ return bool
*/
public function setContentSettings ( $params );
/**
*
*
* @ return account . ContentSettings
*/
public function getContentSettings ();
/**
*
*
* Parameters :
* * `[InputWallPaper]` ** wallpapers ** -.
*
* @ param array $params Parameters
*
* @ return of WallPaper []
*/
public function getMultiWallPapers ( $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 :
2019-09-18 20:46:20 +02:00
* * `[InputUser]` ** id ** - The ids of the users
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
/**
2019-12-27 18:26:47 +01:00
* You cannot use this method directly , use the getPwrChat , getInfo , getFullInfo methods instead ( see https :// docs . madelineproto . xyz for more info ) .
2019-09-18 20:46:20 +02:00
*
2019-09-18 21:32:24 +02:00
* Parameters :
2019-12-27 18:26:47 +01:00
* * `InputUser` ** id ** - You cannot use this method directly , use the getPwrChat , getInfo , getFullInfo methods instead ( see https :// docs . madelineproto . xyz for more info )
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
2019-09-18 21:32:24 +02:00
* * `[SecureValueError]` ** errors ** - The errors
*
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 :
2019-09-18 20:46:20 +02:00
* * `[int]` ** hash ** - Optional : Previously fetched 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-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 :
2019-09-18 20:46:20 +02:00
* * `[int]` ** hash ** - Optional : User IDs of previously cached contacts
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
*
2019-09-18 21:32:24 +02:00
* Parameters :
2019-09-18 20:46:20 +02:00
* * `[InputContact]` ** contacts ** - The numbers 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 :
2019-09-18 20:46:20 +02:00
* * `[InputUser]` ** id ** - The contacts 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-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 :
2019-09-18 20:46:20 +02:00
* * `[string]` ** phones ** - Phones
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 :
2019-12-27 17:43:29 +01: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 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 :
2019-12-27 17:43:29 +01: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 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
/**
2019-12-27 18:26:47 +01:00
* You cannot use this method directly , use the resolveUsername , getPwrChat , getInfo , getFullInfo methods instead ( see https :// docs . madelineproto . xyz for more info ) .
2019-09-18 20:46:20 +02:00
*
2019-09-18 21:32:24 +02:00
* Parameters :
2019-12-27 18:26:47 +01:00
* * `string` ** username ** - You cannot use this method directly , use the resolveUsername , getPwrChat , getInfo , getFullInfo methods instead ( see https :// docs . madelineproto . xyz for more info )
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 )
2019-09-18 21:32:24 +02:00
* * `[int]` ** hash ** - Optional : Peer IDs of previously cached peers
*
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
*
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-03-06 13:09:52 +01:00
* * `boolean` ** background ** - Optional :
* * `InputGeoPoint` ** geo_point ** - Geolocation
* * `int` ** self_expires ** - Optional :
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 );
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 :
2019-09-18 20:46:20 +02:00
* * `[InputMessage]` ** id ** - The IDs of messages to fetch ( only for users and normal groups )
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
2019-09-18 21:32:24 +02:00
* * `int` ** folder_id ** - Optional : Folder ID
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
2019-09-18 20:46:20 +02:00
* * `[int]` ** hash ** - Optional : IDs of previously fetched dialogs
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
* * `int` ** offset_date ** - Only return messages sent after the specified date
* * `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 **
2019-09-18 21:32:24 +02:00
* * `[int]` ** hash ** - Optional : IDs of messages you already fetched
*
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
* * `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 )
2019-09-18 20:46:20 +02:00
* * `[int]` ** hash ** - Optional : The IDs of messages you already fetched
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
2019-09-18 20:46:20 +02:00
* * `[int]` ** id ** - IDs of messages to delete , use channels -> deleteMessages for 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 . 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 :
2019-12-27 17:43:29 +01:00
* * `InputPeer` ** peer ** - Target user or group
* * `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
2019-09-18 21:32:24 +02:00
* * `[MessageEntity]` ** entities ** - Optional : Entities to send ( 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 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
2019-09-18 21:32:24 +02:00
* * `[MessageEntity]` ** entities ** - Optional : 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
* * `boolean` ** grouped ** - Optional : Whether the specified messages represent an album ( grouped media )
* * `InputPeer` ** from_peer ** - Source of messages
2019-09-18 21:32:24 +02:00
* * `[int]` ** id ** - The message IDs
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
2019-09-18 21:32:24 +02:00
* * `[int]` ** id ** - The 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 :
2019-09-18 20:46:20 +02:00
* * `[int]` ** id ** - The MTProto IDs of chats to fetch 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 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
/**
2019-12-27 18:26:47 +01:00
* You cannot use this method directly , use the getPwrChat , getInfo , getFullInfo methods instead ( see https :// docs . madelineproto . xyz for more info ) .
2019-06-05 15:38:32 +02:00
*
2019-09-18 21:32:24 +02:00
* Parameters :
2019-10-29 22:41:31 +01:00
* * `InputPeer` ** chat_id ** - You cannot use this method directly , use the getPwrChat , getInfo , getFullInfo methods instead ( see https :// docs . madelineproto . xyz for more info )
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 :
2019-09-18 20:46:20 +02:00
* * `InputPeer` ** chat_id ** - The ID of the chat
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 :
2019-09-18 20:46:20 +02:00
* * `InputPeer` ** chat_id ** - The ID of the chat
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 :
* * `InputPeer` ** chat_id ** - The chat where to invite users
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 :
* * `InputPeer` ** chat_id ** - The ID of the chat
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 :
2019-09-18 20:46:20 +02:00
* * `[InputUser]` ** users ** - The users to add to the chat
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
/**
2019-12-27 18:26:47 +01:00
* You cannot use this method directly , instead use $MadelineProto -> getDhConfig (); .
2019-09-18 20:46:20 +02:00
*
2019-09-18 21:32:24 +02:00
* Parameters :
2019-12-27 18:26:47 +01:00
* * `int` ** version ** - You cannot use this method directly , instead use $MadelineProto -> getDhConfig ();
* * `int` ** random_length ** - You cannot use this method directly , instead use $MadelineProto -> getDhConfig ();
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
/**
2019-12-27 18:26:47 +01:00
* You cannot use this method directly , see https :// docs . madelineproto . xyz for more info on handling secret chats .
2019-09-18 20:46:20 +02:00
*
2019-09-18 21:32:24 +02:00
* Parameters :
2019-12-27 18:26:47 +01:00
* * `InputUser` ** user_id ** - You cannot use this method directly , see https :// docs . madelineproto . xyz for more info on handling secret chats
* * `bytes` ** g_a ** - You cannot use this method directly , see https :// docs . madelineproto . xyz for more info on handling secret chats
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
/**
2019-12-27 18:26:47 +01:00
* You cannot use this method directly , see https :// docs . madelineproto . xyz for more info on handling secret chats .
2019-09-18 20:46:20 +02:00
*
2019-09-18 21:32:24 +02:00
* Parameters :
2019-12-27 18:26:47 +01:00
* * `InputEncryptedChat` ** peer ** - You cannot use this method directly , see https :// docs . madelineproto . xyz for more info on handling secret chats
* * `bytes` ** g_b ** - You cannot use this method directly , see https :// docs . madelineproto . xyz for more info on handling secret chats
* * `long` ** key_fingerprint ** - You cannot use this method directly , see https :// docs . madelineproto . xyz for more info on handling secret chats
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
/**
2019-12-27 18:26:47 +01:00
* You cannot use this method directly , see https :// docs . madelineproto . xyz for more info on handling secret chats .
2019-09-18 20:46:20 +02:00
*
2019-09-18 21:32:24 +02:00
* Parameters :
2019-12-27 18:26:47 +01:00
* * `int` ** chat_id ** - You cannot use this method directly , see https :// docs . madelineproto . xyz for more info on handling secret chats
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 :
2019-12-27 17:43:29 +01:00
* * `InputEncryptedChat` ** peer ** - Secret chat ID
2019-09-18 21:32:24 +02:00
* * `DecryptedMessage` ** message ** - The message to send
*
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 :
2019-12-27 17:43:29 +01:00
* * `InputEncryptedChat` ** peer ** - Secret chat ID
2019-09-18 21:32:24 +02:00
* * `DecryptedMessage` ** message ** - The message with the file
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
2019-09-18 21:32:24 +02:00
* * `DecryptedMessage` ** message ** - The service message
*
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
/**
2019-12-27 18:26:47 +01:00
* You cannot use this method directly .
2019-09-18 20:46:20 +02:00
*
2019-09-18 21:32:24 +02:00
* Parameters :
2019-12-27 18:26:47 +01:00
* * `int` ** max_qts ** - You cannot use this method directly
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 :
2019-09-18 20:46:20 +02:00
* * `[int]` ** id ** - The messages to mark as read ( only users and normal chats , not 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 . 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
2019-09-18 20:46:20 +02:00
* * `[int]` ** hash ** - Optional : the hash parameter of the previous result of this method
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 :
2019-09-18 20:46:20 +02:00
* * `[int]` ** hash ** - Optional : The hash parameter of the previous result of this method
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
2019-09-18 20:46:20 +02:00
* * `[MessageEntity]` ** entities ** - Optional : 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 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
2019-09-18 21:32:24 +02:00
* * `[int]` ** id ** - The IDs messages to get
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
*
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 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 :
2019-09-18 20:46:20 +02:00
* * `InputPeer` ** chat_id ** - The chat ID ( no supergroups )
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 :
2019-09-18 20:46:20 +02:00
* * `InputPeer` ** chat_id ** - The chat to convert
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 :
2019-12-27 17:43:29 +01:00
* * `int` ** folder_id ** - Optional : Folder where to search
* * `string` ** q ** - Query
2019-12-28 16:45:00 +01:00
* * `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 )
2019-12-27 17:43:29 +01:00
* * `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
2019-09-18 21:32:24 +02:00
* * `[long]` ** order ** - The order
*
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
* Search for GIFs .
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 ** - Text query
* * `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
*
* @ return messages . FoundGifs
2019-06-05 15:38:32 +02:00
*/
2019-09-18 20:46:20 +02:00
public function searchGifs ( $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 :
2019-09-18 20:46:20 +02:00
* * `[int]` ** hash ** - Optional : the hash parameter of the previous result of this method
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
2019-09-18 21:32:24 +02:00
* * `[InputBotInlineResult]` ** results ** - Results
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
2019-09-18 20:46:20 +02:00
* * `[MessageEntity]` ** entities ** - Optional : The new 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 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
2019-09-18 20:46:20 +02:00
* * `[MessageEntity]` ** entities ** - Optional : The new 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 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 :
2019-12-27 17:43:29 +01: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
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 :
2019-09-18 20:46:20 +02:00
* * `[InputDialogPeer]` ** peers ** - The 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
2019-09-18 20:46:20 +02:00
* * `[MessageEntity]` ** entities ** - Optional : The 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 :
2019-09-18 20:46:20 +02:00
* * `[int]` ** hash ** - Optional : the hash parameter of the previous result of this method
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 :
2019-09-18 20:46:20 +02:00
* * `[long]` ** id ** - The stickers 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
2019-09-18 20:46:20 +02:00
* * `[int]` ** hash ** - Optional : IDs the hash parameter of the previous result of this method
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 :
2019-09-18 20:46:20 +02:00
* * `[int]` ** hash ** - Optional : the hash parameter of the previous result of this method
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 :
2019-09-18 20:46:20 +02:00
* * `[int]` ** except_ids ** - Do not fetch these chats ( MTProto 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 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
2019-09-18 20:46:20 +02:00
* * `[int]` ** hash ** - Optional : the hash parameter of the previous result of this method
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 .
2019-09-18 21:32:24 +02:00
* * `int` ** folder_id ** - Folder ID
* * `[InputDialogPeer]` ** order ** - New order
*
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 :
2019-09-18 20:46:20 +02:00
* * `int` ** folder_id ** - Folder ID
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.
2019-09-18 20:46:20 +02:00
* * `[ShippingOption]` ** shipping_options ** - Optional : 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 :
2019-09-18 20:46:20 +02:00
* * `[int]` ** hash ** - Optional : the hash parameter of the previous result of this method
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 )
2019-09-18 20:46:20 +02:00
* * `[int]` ** hash ** - Optional : IDs of locations you already fetched
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
2019-09-18 21:32:24 +02:00
* * `[InputSingleMedia]` ** multi_media ** - The album
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
2019-09-18 21:32:24 +02:00
* * `[int]` ** hash ** - Optional : The IDs of stickersets you already fetched
*
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
2019-09-18 21:32:24 +02:00
* * `[bytes]` ** options ** - Options
*
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
2019-09-18 20:46:20 +02:00
* * `[MessagesFilter]` ** filters ** - 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
2019-09-18 20:46:20 +02:00
* * `[int]` ** hash ** - Optional : Hash
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
2019-09-18 21:32:24 +02:00
* * `[int]` ** id ** - ID
*
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
2019-09-18 21:32:24 +02:00
* * `[int]` ** id ** - ID
*
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
2019-09-18 21:32:24 +02:00
* * `[int]` ** id ** - ID
*
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
/**
*
*
* Parameters :
* * `InputPeer` ** peer ** -
* * `int` ** id ** -
* * `bytes` ** option ** - Optional :
* * `string` ** offset ** - Optional :
* * `int` ** limit ** -.
*
* @ param array $params Parameters
*
* @ return messages . VotesList
*/
public function getPollVotes ( $params );
/**
*
*
* Parameters :
* * `boolean` ** uninstall ** - Optional :
* * `boolean` ** archive ** - Optional :
* * `boolean` ** unarchive ** - Optional :
* * `[InputStickerSet]` ** stickersets ** -.
*
* @ param array $params Parameters
*
* @ return bool
*/
public function toggleStickerSets ( $params );
2020-04-03 14:10:46 +02:00
/**
*
*
* @ return of DialogFilter []
*/
public function getDialogFilters ();
/**
*
*
* @ return of DialogFilterSuggested []
*/
public function getSuggestedDialogFilters ();
/**
*
*
* Parameters :
* * `int` ** id ** -
* * `DialogFilter` ** filter ** - Optional :.
*
* @ param array $params Parameters
*
* @ return bool
*/
public function updateDialogFilter ( $params );
/**
*
*
* Parameters :
* * `[int]` ** order ** -.
*
* @ param array $params Parameters
*
* @ return bool
*/
public function updateDialogFiltersOrder ( $params );
2019-06-05 15:38:32 +02:00
}
interface updates
{
/**
2019-12-27 18:26:47 +01:00
* You cannot use this method directly , see https :// docs . madelineproto . xyz for more info on handling updates .
2019-09-18 20:46:20 +02:00
*
* @ return updates . State
2019-06-05 15:38:32 +02:00
*/
public function getState ();
/**
2019-12-27 18:26:47 +01:00
* You cannot use this method directly , see https :// docs . madelineproto . xyz for more info on handling updates .
2019-06-05 15:38:32 +02:00
*
2019-09-18 21:32:24 +02:00
* Parameters :
2019-12-27 18:26:47 +01:00
* * `int` ** pts ** - You cannot use this method directly , see https :// docs . madelineproto . xyz for more info on handling updates
* * `int` ** pts_total_limit ** - Optional : You cannot use this method directly , see https :// docs . madelineproto . xyz for more info on handling updates
* * `int` ** date ** - You cannot use this method directly , see https :// docs . madelineproto . xyz for more info on handling updates
* * `int` ** qts ** - You cannot use this method directly , see https :// docs . madelineproto . xyz for more info on handling 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
/**
2019-12-27 18:26:47 +01:00
* You cannot use this method directly , see https :// docs . madelineproto . xyz for more info on handling updates .
2019-09-18 20:46:20 +02:00
*
2019-09-18 21:32:24 +02:00
* Parameters :
2019-12-27 18:26:47 +01:00
* * `boolean` ** force ** - Optional : You cannot use this method directly , see https :// docs . madelineproto . xyz for more info on handling updates
* * `InputChannel` ** channel ** - You cannot use this method directly , see https :// docs . madelineproto . xyz for more info on handling updates
* * `ChannelMessagesFilter` ** filter ** - You cannot use this method directly , see https :// docs . madelineproto . xyz for more info on handling updates
* * `int` ** pts ** - You cannot use this method directly , see https :// docs . madelineproto . xyz for more info on handling updates
* * `int` ** limit ** - You cannot use this method directly , see https :// docs . madelineproto . xyz for more info on handling updates
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
*
* @ return UserProfilePhoto
*/
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 :
2019-12-28 16:45:00 +01:00
* * `InputFile` ** file ** - File saved in parts by means of [ upload . saveFilePart ]( https :// docs . madelineproto . xyz / API_docs / methods / upload . saveFilePart . html ) method
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 :
2019-09-18 20:46:20 +02:00
* * `[InputPhoto]` ** id ** - The profile 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
{
/**
2019-12-27 18:26:47 +01:00
* You cannot use this method directly , use the upload , downloadToStream , downloadToFile , downloadToDir methods instead ; see https :// docs . madelineproto . xyz for more info .
2019-09-18 20:46:20 +02:00
*
2019-09-18 21:32:24 +02:00
* Parameters :
2019-12-27 18:26:47 +01:00
* * `long` ** file_id ** - You cannot use this method directly , use the upload , downloadToStream , downloadToFile , downloadToDir methods instead ; see https :// docs . madelineproto . xyz for more info
* * `int` ** file_part ** - You cannot use this method directly , use the upload , downloadToStream , downloadToFile , downloadToDir methods instead ; see https :// docs . madelineproto . xyz for more info
* * `bytes` ** bytes ** - You cannot use this method directly , use the upload , downloadToStream , downloadToFile , downloadToDir methods instead ; see https :// docs . madelineproto . xyz for more info
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
/**
2019-12-27 18:26:47 +01:00
* You cannot use this method directly , use the upload , downloadToStream , downloadToFile , downloadToDir methods instead ; see https :// docs . madelineproto . xyz for more info .
2019-06-05 15:38:32 +02:00
*
2019-09-18 21:32:24 +02:00
* Parameters :
2020-03-06 13:09:52 +01:00
* * `boolean` ** precise ** - Optional : You cannot use this method directly , use the upload , downloadToStream , downloadToFile , downloadToDir methods instead ; see https :// docs . madelineproto . xyz for more info
* * `boolean` ** cdn_supported ** - Optional :
* * `InputFileLocation` ** location ** - You cannot use this method directly , use the upload , downloadToStream , downloadToFile , downloadToDir methods instead ; see https :// docs . madelineproto . xyz for more info
* * `int` ** offset ** - You cannot use this method directly , use the upload , downloadToStream , downloadToFile , downloadToDir methods instead ; see https :// docs . madelineproto . xyz for more info
* * `int` ** limit ** - You cannot use this method directly , use the upload , downloadToStream , downloadToFile , downloadToDir methods instead ; see https :// docs . madelineproto . xyz for more info
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
/**
2019-12-27 18:26:47 +01:00
* You cannot use this method directly , use the upload , downloadToStream , downloadToFile , downloadToDir methods instead ; see https :// docs . madelineproto . xyz for more info .
2019-09-18 20:46:20 +02:00
*
2019-09-18 21:32:24 +02:00
* Parameters :
2019-12-27 18:26:47 +01:00
* * `long` ** file_id ** - You cannot use this method directly , use the upload , downloadToStream , downloadToFile , downloadToDir methods instead ; see https :// docs . madelineproto . xyz for more info
* * `int` ** file_part ** - You cannot use this method directly , use the upload , downloadToStream , downloadToFile , downloadToDir methods instead ; see https :// docs . madelineproto . xyz for more info
* * `int` ** file_total_parts ** - You cannot use this method directly , use the upload , downloadToStream , downloadToFile , downloadToDir methods instead ; see https :// docs . madelineproto . xyz for more info
* * `bytes` ** bytes ** - You cannot use this method directly , use the upload , downloadToStream , downloadToFile , downloadToDir methods instead ; see https :// docs . madelineproto . xyz for more info
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
/**
2019-12-27 18:26:47 +01:00
* You cannot use this method directly , use the upload , downloadToStream , downloadToFile , downloadToDir methods instead ; see https :// docs . madelineproto . xyz for more info .
2019-06-05 15:38:32 +02:00
*
2019-09-18 21:32:24 +02:00
* Parameters :
2019-12-27 18:26:47 +01:00
* * `bytes` ** file_token ** - You cannot use this method directly , use the upload , downloadToStream , downloadToFile , downloadToDir methods instead ; see https :// docs . madelineproto . xyz for more info
* * `int` ** offset ** - You cannot use this method directly , use the upload , downloadToStream , downloadToFile , downloadToDir methods instead ; see https :// docs . madelineproto . xyz for more info
* * `int` ** limit ** - You cannot use this method directly , use the upload , downloadToStream , downloadToFile , downloadToDir methods instead ; see https :// docs . madelineproto . xyz for more info
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
/**
2019-12-27 18:26:47 +01:00
* You cannot use this method directly , use the upload , downloadToStream , downloadToFile , downloadToDir methods instead ; see https :// docs . madelineproto . xyz for more info .
2019-09-18 20:46:20 +02:00
*
2019-09-18 21:32:24 +02:00
* Parameters :
2019-12-27 18:26:47 +01:00
* * `bytes` ** file_token ** - You cannot use this method directly , use the upload , downloadToStream , downloadToFile , downloadToDir methods instead ; see https :// docs . madelineproto . xyz for more info
* * `bytes` ** request_token ** - You cannot use this method directly , use the upload , downloadToStream , downloadToFile , downloadToDir methods instead ; see https :// docs . madelineproto . xyz for more info
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
/**
2019-12-27 18:26:47 +01:00
* You cannot use this method directly , use the upload , downloadToStream , downloadToFile , downloadToDir methods instead ; see https :// docs . madelineproto . xyz for more info .
2019-06-05 15:38:32 +02:00
*
2019-09-18 21:32:24 +02:00
* Parameters :
2019-12-27 18:26:47 +01:00
* * `bytes` ** file_token ** - You cannot use this method directly , use the upload , downloadToStream , downloadToFile , downloadToDir methods instead ; see https :// docs . madelineproto . xyz for more info
* * `int` ** offset ** - You cannot use this method directly , use the upload , downloadToStream , downloadToFile , downloadToDir methods instead ; see https :// docs . madelineproto . xyz for more info
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
/**
2019-12-27 18:26:47 +01:00
* You cannot use this method directly , use the upload , downloadToStream , downloadToFile , downloadToDir methods instead ; see https :// docs . madelineproto . xyz for more info .
2019-09-18 20:46:20 +02:00
*
2019-09-18 21:32:24 +02:00
* Parameters :
2019-12-27 18:26:47 +01:00
* * `InputFileLocation` ** location ** - You cannot use this method directly , use the upload , downloadToStream , downloadToFile , downloadToDir methods instead ; see https :// docs . madelineproto . xyz for more info
* * `int` ** offset ** - You cannot use this method directly , use the upload , downloadToStream , downloadToFile , downloadToDir methods instead ; see https :// docs . madelineproto . xyz for more info
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
{
/**
2019-12-27 17:43:29 +01:00
* Returns current configuration , icluding 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
/**
2019-12-27 17:43:29 +01:00
* Returns 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 .
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
* Get promotion info of the currently - used MTProxy .
2019-09-18 20:46:20 +02:00
*
* @ return help . ProxyData
2019-06-05 15:38:32 +02:00
*/
public function getProxyData ();
/**
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
/**
2019-12-27 17:43:29 +01:00
* Get app - specific configuration .
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 :
2019-09-18 20:46:20 +02:00
* * `[InputAppEvent]` ** events ** - Event 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 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 :
2019-09-18 20:46:20 +02:00
* * `[int]` ** hash ** - Optional : 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
*
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
2019-09-18 20:46:20 +02:00
* * `[MessageEntity]` ** entities ** - 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 );
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 )
2019-09-18 20:46:20 +02:00
* * `[int]` ** id ** - The 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
2019-09-18 21:32:24 +02:00
* * `[int]` ** id ** - The IDs of messages to report
*
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
2019-09-18 21:32:24 +02:00
* * `[InputMessage]` ** id ** - The message IDs
*
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
/**
2019-12-27 17:43:29 +01:00
* Get the participants of a 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 )
2019-09-18 20:46:20 +02:00
* * `[int]` ** hash ** - Optional : IDs of previously fetched participants
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 :
2019-09-18 20:46:20 +02:00
* * `[InputChannel]` ** id ** - The channel / supergroup MTProto IDs
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
/**
2019-12-27 18:26:47 +01:00
* You cannot use this method directly , use the getPwrChat , getInfo , getFullInfo methods instead ( see https :// docs . madelineproto . xyz for more info ) .
2017-01-22 17:40:56 +01:00
*
2019-09-18 21:32:24 +02:00
* Parameters :
2019-12-27 18:26:47 +01:00
* * `InputChannel` ** channel ** - You cannot use this method directly , use the getPwrChat , getInfo , getFullInfo methods instead ( see https :// docs . madelineproto . xyz for more info )
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
2019-09-18 21:32:24 +02:00
* * `[InputUser]` ** users ** - The users to add
*
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 :
2019-12-27 17:43:29 +01:00
* * `InputChannel` ** channel ** - Channel
* * `int` ** id ** - Message ID
* * `Bool` ** grouped ** - Whether to include other grouped media ( for albums )
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
2019-09-18 20:46:20 +02:00
* * `[InputUser]` ** admins ** - Optional : Fetch only actions 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 )
2019-09-18 20:46:20 +02:00
* * `[int]` ** id ** - List of message 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
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
/**
*
*
* @ 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 );
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
/**
*
*
* Parameters :
* * `string` ** number ** -.
*
* @ 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
* * `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
2019-09-18 21:32:24 +02:00
* * `[InputStickerSetItem]` ** stickers ** - The stickers to add
*
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 );
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
/**
2019-12-27 18:26:47 +01:00
* You cannot use this method directly , see https :// docs . madelineproto . xyz #calls for more info on handling calls.
2019-06-05 15:38:32 +02:00
*
2019-09-18 21:32:24 +02:00
* Parameters :
2019-12-27 18:26:47 +01:00
* * `boolean` ** video ** - Optional : You cannot use this method directly , see https :// docs . madelineproto . xyz #calls for more info on handling calls
* * `InputUser` ** user_id ** - You cannot use this method directly , see https :// docs . madelineproto . xyz #calls for more info on handling calls
* * `bytes` ** g_a_hash ** - You cannot use this method directly , see https :// docs . madelineproto . xyz #calls for more info on handling calls
* * `PhoneCallProtocol` ** protocol ** - You cannot use this method directly , see https :// docs . madelineproto . xyz #calls for more info on handling calls
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
/**
2019-12-27 18:26:47 +01:00
* You cannot use this method directly , see https :// docs . madelineproto . xyz #calls for more info on handling calls.
2019-09-18 20:46:20 +02:00
*
2019-09-18 21:32:24 +02:00
* Parameters :
2019-12-27 18:26:47 +01:00
* * `InputPhoneCall` ** peer ** - You cannot use this method directly , see https :// docs . madelineproto . xyz #calls for more info on handling calls
* * `bytes` ** g_b ** - You cannot use this method directly , see https :// docs . madelineproto . xyz #calls for more info on handling calls
* * `PhoneCallProtocol` ** protocol ** - You cannot use this method directly , see https :// docs . madelineproto . xyz #calls for more info on handling calls
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
/**
2019-12-27 18:26:47 +01:00
* You cannot use this method directly , see https :// docs . madelineproto . xyz #calls for more info on handling calls.
2019-09-18 20:46:20 +02:00
*
2019-09-18 21:32:24 +02:00
* Parameters :
2019-12-27 18:26:47 +01:00
* * `InputPhoneCall` ** peer ** - You cannot use this method directly , see https :// docs . madelineproto . xyz #calls for more info on handling calls
* * `bytes` ** g_a ** - You cannot use this method directly , see https :// docs . madelineproto . xyz #calls for more info on handling calls
* * `long` ** key_fingerprint ** - You cannot use this method directly , see https :// docs . madelineproto . xyz #calls for more info on handling calls
* * `PhoneCallProtocol` ** protocol ** - You cannot use this method directly , see https :// docs . madelineproto . xyz #calls for more info on handling calls
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
/**
2019-12-27 18:26:47 +01:00
* You cannot use this method directly , see https :// docs . madelineproto . xyz #calls for more info on handling calls.
2019-09-18 20:46:20 +02:00
*
2019-09-18 21:32:24 +02:00
* Parameters :
2019-12-27 18:26:47 +01:00
* * `boolean` ** video ** - Optional : You cannot use this method directly , see https :// docs . madelineproto . xyz #calls for more info on handling calls
* * `InputPhoneCall` ** peer ** - You cannot use this method directly , see https :// docs . madelineproto . xyz #calls for more info on handling calls
* * `int` ** duration ** - You cannot use this method directly , see https :// docs . madelineproto . xyz #calls for more info on handling calls
* * `PhoneCallDiscardReason` ** reason ** - You cannot use this method directly , see https :// docs . madelineproto . xyz #calls for more info on handling calls
* * `long` ** connection_id ** - You cannot use this method directly , see https :// docs . madelineproto . xyz #calls for more info on handling calls
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 );
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
2019-09-18 21:32:24 +02:00
* * `[string]` ** keys ** - Keys
*
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
{
/**
2019-12-27 17:43:29 +01:00
* Edit peers in folder .
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
* * `[InputFolderPeer]` ** folder_peers ** - New folder peers
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
/**
2019-12-27 17:43:29 +01:00
* Delete a folder .
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` ** folder_id ** - Folder to delete
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
{
/**
*
*
* Parameters :
* * `boolean` ** dark ** - Optional :
* * `InputChannel` ** channel ** -.
*
* @ param array $params Parameters
*
* @ return stats . BroadcastStats
*/
public function getBroadcastStats ( $params );
/**
*
*
* Parameters :
* * `string` ** token ** -
* * `long` ** x ** - Optional :.
*
* @ param array $params Parameters
*
* @ return StatsGraph
*/
public function loadAsyncGraph ( $params );
}
2019-09-18 20:46:20 +02:00
class InternalDoc extends APIFactory
{
2019-10-31 15:06:25 +01:00
/**
* Cleanup memory and session file .
*
2019-12-28 16:07:09 +01:00
* @ return self
2019-10-31 15:06:25 +01:00
*/
2020-01-19 13:46:49 +01:00
public function cleanup () : \danog\MadelineProto\API
2019-09-18 20:46:20 +02:00
{
2020-01-19 13:46:49 +01:00
$this -> API -> cleanup ();
return $this ;
2019-09-18 20:46:20 +02:00
}
2019-10-31 15:06:25 +01:00
/**
* Logger .
*
* @ param string $param Parameter
* @ param int $level Logging level
* @ param string $file File where the message originated
*
* @ return void
*/
2020-01-19 13:46:49 +01:00
public function logger ( $param , int $level = \danog\MadelineProto\Logger :: NOTICE , string $file = '' ) : void
2019-09-18 20:46:20 +02:00
{
2020-01-19 13:46:49 +01:00
$this -> API -> logger ( $param , $level , $file );
2019-09-18 20:46:20 +02:00
}
2019-10-31 20:48:06 +01:00
/**
* Get TL namespaces .
*
* @ return array
*/
2020-01-19 13:46:49 +01:00
public function getMethodNamespaces () : array
2019-10-31 20:48:06 +01:00
{
2020-01-19 13:46:49 +01:00
return $this -> API -> getMethodNamespaces ();
2019-10-31 20:48:06 +01:00
}
/**
* Get namespaced methods ( method => namespace ) .
*
* @ return array
*/
2020-01-19 13:46:49 +01:00
public function getMethodsNamespaced () : array
2019-10-31 20:48:06 +01:00
{
2020-01-19 13:46:49 +01:00
return $this -> API -> getMethodsNamespaced ();
2019-10-31 20:48:06 +01:00
}
/**
* Get TL serializer .
*
* @ return TL
*/
2020-01-19 13:46:49 +01:00
public function getTL () : \danog\MadelineProto\TL\TL
2019-10-31 20:48:06 +01:00
{
2020-01-19 13:46:49 +01:00
return $this -> API -> getTL ();
2019-10-31 20:48:06 +01:00
}
2019-12-13 15:37:57 +01:00
/**
* Get logger .
*
* @ return Logger
*/
2020-01-19 13:46:49 +01:00
public function getLogger () : \danog\MadelineProto\Logger
2019-12-13 15:37:57 +01:00
{
2020-01-19 13:46:49 +01:00
return $this -> API -> getLogger ();
2019-12-13 15:37:57 +01:00
}
2019-10-31 15:06:25 +01:00
/**
* Get async HTTP client .
*
2020-03-08 17:24:31 +01:00
* @ return \Amp\Http\Client\HttpClient
2019-10-31 15:06:25 +01:00
*/
2020-03-08 17:24:31 +01:00
public function getHTTPClient () : \Amp\Http\Client\HttpClient
2019-09-18 20:46:20 +02:00
{
2020-01-19 13:46:49 +01:00
return $this -> API -> getHTTPClient ();
2019-09-18 20:46:20 +02:00
}
2019-10-31 15:06:25 +01:00
/**
* Get async DNS client .
*
* @ return \Amp\Dns\Resolver
*/
2020-01-19 13:46:49 +01:00
public function getDNSClient () : \Amp\Dns\Resolver
2019-09-18 20:46:20 +02:00
{
2020-01-19 13:46:49 +01:00
return $this -> API -> getDNSClient ();
2019-09-18 20:46:20 +02:00
}
2019-10-31 15:06:25 +01:00
/**
* Get contents of remote file asynchronously .
*
* @ param string $url URL
*
* @ return \Generator < string >
*/
public function fileGetContents ( string $url , array $extra = [])
2019-09-18 20:46:20 +02:00
{
2019-09-18 21:45:08 +02:00
return $this -> __call ( __FUNCTION__ , [ $url , $extra ]);
2019-09-18 20:46:20 +02:00
}
/**
* Get all datacenter connections .
*
* @ return array < DataCenterConnection >
*/
2020-01-19 13:46:49 +01:00
public function getDataCenterConnections () : array
2019-09-18 20:46:20 +02:00
{
2020-01-19 13:46:49 +01:00
return $this -> API -> getDataCenterConnections ();
2019-09-18 20:46:20 +02:00
}
2020-02-25 18:02:32 +01:00
/**
* Parse , update and store settings .
*
* @ param array $settings Settings
* @ param bool $reinit Whether to reinit the instance
*
* @ return void
*/
public function updateSettings ( array $settings , bool $reinit = true , array $extra = [])
{
return $this -> __call ( __FUNCTION__ , [ $settings , $reinit , $extra ]);
}
2020-02-26 18:12:00 +01:00
/**
* Return current settings array .
*
* @ return array
*/
public function getSettings () : array
{
return $this -> API -> getSettings ();
}
2019-10-31 15:06:25 +01:00
/**
* Setup logger .
*
* @ return void
*/
2020-01-19 13:46:49 +01:00
public function setupLogger () : void
2019-09-18 20:46:20 +02:00
{
2020-01-19 13:46:49 +01:00
$this -> API -> setupLogger ();
2019-09-18 20:46:20 +02:00
}
2019-10-31 20:48:06 +01:00
/**
* Checks whether all datacenters are authorized .
*
* @ return boolean
*/
2020-01-19 13:46:49 +01:00
public function hasAllAuth () : bool
2019-10-31 20:48:06 +01:00
{
2020-01-19 13:46:49 +01:00
return $this -> API -> hasAllAuth ();
2019-10-31 20:48:06 +01:00
}
2019-10-31 15:06:25 +01:00
/**
* Connects to all datacenters and if necessary creates authorization keys , binds them and writes client info .
*
* @ param boolean $reconnectAll Whether to reconnect to all DCs
*
* @ return \Generator
*/
2019-09-18 21:49:26 +02:00
public function connectToAllDcs ( bool $reconnectAll = true , array $extra = [])
2019-09-18 20:46:20 +02:00
{
2019-09-18 21:45:08 +02:00
return $this -> __call ( __FUNCTION__ , [ $reconnectAll , $extra ]);
2019-09-18 20:46:20 +02:00
}
2019-10-31 15:06:25 +01:00
/**
* Reset the update state and fetch all updates from the beginning .
*
* @ return void
*/
2020-01-19 13:46:49 +01:00
public function resetUpdateState () : void
2019-09-18 20:46:20 +02:00
{
2020-01-19 13:46:49 +01:00
$this -> API -> resetUpdateState ();
2019-09-18 20:46:20 +02:00
}
2019-10-31 15:06:25 +01:00
/**
* Store RSA keys for CDN datacenters .
*
* @ param string $datacenter DC ID
*
* @ return \Generator
*/
public function getCdnConfig ( string $datacenter , array $extra = [])
2019-09-18 20:46:20 +02:00
{
2019-09-18 21:45:08 +02:00
return $this -> __call ( __FUNCTION__ , [ $datacenter , $extra ]);
2019-09-18 20:46:20 +02:00
}
2019-10-31 15:06:25 +01:00
/**
* Get cached server - side config .
*
* @ return array
*/
2020-01-19 13:46:49 +01:00
public function getCachedConfig () : array
2019-09-18 20:46:20 +02:00
{
2020-01-19 13:46:49 +01:00
return $this -> API -> getCachedConfig ();
2019-09-18 20:46:20 +02:00
}
2019-10-31 15:06:25 +01:00
/**
* Get cached ( or eventually re - fetch ) server - side config .
*
* @ param array $config Current config
* @ param array $options Options for method call
*
* @ return \Generator
*/
public function getConfig ( array $config = [
], array $options = [
2019-09-18 21:45:08 +02:00
], array $extra = [])
2019-09-18 20:46:20 +02:00
{
2019-09-18 21:45:08 +02:00
return $this -> __call ( __FUNCTION__ , [ $config , $options , $extra ]);
2019-09-18 20:46:20 +02:00
}
2019-10-31 15:06:25 +01:00
/**
2020-02-25 18:02:32 +01:00
* Get info about the logged - in user , cached .
2019-10-31 15:06:25 +01:00
*
2020-02-25 18:02:32 +01:00
* @ return array | bool
2019-10-31 15:06:25 +01:00
*/
2019-09-18 21:45:08 +02:00
public function getSelf ( array $extra = [])
2019-09-18 20:46:20 +02:00
{
2019-09-18 21:45:08 +02:00
return $this -> __call ( __FUNCTION__ , [ $extra ]);
2019-09-18 20:46:20 +02:00
}
2020-02-25 18:02:32 +01:00
/**
* Get info about the logged - in user , not cached .
*
* @ return \Generator < array | bool >
*/
public function fullGetSelf ( array $extra = [])
{
return $this -> __call ( __FUNCTION__ , [ $extra ]);
}
2020-02-23 19:28:42 +01:00
/**
* Check if has report peers .
*
* @ return boolean
*/
public function hasReportPeers () : bool
{
return $this -> API -> hasReportPeers ();
}
/**
* Set peer ( s ) where to send errors occurred in the event loop .
*
* @ param int | string $userOrId Username ( s ) or peer ID ( s )
*
* @ return \Generator
*/
public function setReportPeers ( $userOrId , array $extra = [])
{
return $this -> __call ( __FUNCTION__ , [ $userOrId , $extra ]);
}
/**
* Report an error to the previously set peer .
*
* @ param string $message Error to report
*
* @ return \Generator
*/
public function report ( string $message , array $extra = [])
{
return $this -> __call ( __FUNCTION__ , [ $message , $extra ]);
}
2020-02-25 18:02:32 +01:00
/**
* Get full list of MTProto and API methods .
*
* @ return array
*/
public function getAllMethods () : array
{
return $this -> API -> getAllMethods ();
}
2019-09-18 20:46:20 +02:00
/**
* Call method and wait asynchronously for response .
*
* If the $aargs [ 'noResponse' ] is true , will not wait for a response .
*
* @ param string $method Method name
* @ param array $args Arguments
* @ param array $aargs Additional arguments
*
2020-02-07 21:13:49 +01:00
* @ return \Generator
2019-09-18 20:46:20 +02:00
*/
2019-10-31 11:17:22 +01:00
public function methodCall ( string $method , $args = [
2019-09-18 21:32:24 +02:00
], array $aargs = [
2019-09-18 20:46:20 +02:00
'msg_id' => null ,
2019-09-18 21:49:26 +02:00
], array $extra = [])
2019-09-18 20:46:20 +02:00
{
2019-09-18 21:45:08 +02:00
return $this -> __call ( __FUNCTION__ , [ $method , $args , $aargs , $extra ]);
2019-09-18 20:46:20 +02:00
}
/**
* Call method and make sure it is asynchronously sent .
*
* @ param string $method Method name
* @ param array $args Arguments
* @ param array $aargs Additional arguments
*
2020-02-07 21:13:49 +01:00
* @ return \Generator
2019-09-18 20:46:20 +02:00
*/
2019-09-18 21:32:24 +02:00
public function methodCallWrite ( string $method , $args = [
], array $aargs = [
2019-09-18 20:46:20 +02:00
'msg_id' => null ,
2019-09-18 21:49:26 +02:00
], array $extra = [])
2019-09-18 20:46:20 +02:00
{
2019-09-18 21:45:08 +02:00
return $this -> __call ( __FUNCTION__ , [ $method , $args , $aargs , $extra ]);
2019-09-18 20:46:20 +02:00
}
2019-12-27 20:29:22 +01:00
/**
* Convert MTProto channel ID to bot API channel ID .
*
* @ param int $id MTProto channel ID
*
* @ return int
*/
2019-12-28 16:45:00 +01:00
public function toSupergroup ( $id )
2019-09-18 20:46:20 +02:00
{
2019-12-28 16:45:00 +01:00
return $this -> __call ( __FUNCTION__ , [ $id ]);
2019-09-18 20:46:20 +02:00
}
2019-12-27 20:29:22 +01:00
/**
* Convert bot API channel ID to MTProto channel ID .
*
* @ param int $id Bot API channel ID
*
* @ return int
*/
2019-12-28 16:45:00 +01:00
public function fromSupergroup ( $id ) : int
2019-09-18 20:46:20 +02:00
{
2019-12-28 16:45:00 +01:00
return \danog\MadelineProto\MTProto :: fromSupergroup ( $id );
2019-09-18 20:46:20 +02:00
}
2019-12-27 20:29:22 +01:00
/**
* Check whether provided bot API ID is a channel .
*
* @ param int $id Bot API ID
*
* @ return boolean
*/
2019-12-28 16:45:00 +01:00
public function isSupergroup ( $id ) : bool
2019-09-18 20:46:20 +02:00
{
2019-12-28 16:45:00 +01:00
return \danog\MadelineProto\MTProto :: isSupergroup ( $id );
2019-09-18 20:46:20 +02:00
}
2019-12-28 16:07:09 +01:00
/**
* Add user info .
*
* @ param array $user User info
*
* @ return void
*/
2020-01-19 13:46:49 +01:00
public function addUser ( array $user ) : void
2019-09-18 20:46:20 +02:00
{
2020-01-19 13:46:49 +01:00
$this -> API -> addUser ( $user );
2019-09-18 20:46:20 +02:00
}
2019-12-27 20:29:22 +01:00
/**
* Check if peer is present in internal peer database .
*
* @ param mixed $id Peer
*
* @ return \Generator < boolean >
*/
2019-09-18 21:45:08 +02:00
public function peerIsset ( $id , array $extra = [])
2019-09-18 20:46:20 +02:00
{
2019-09-18 21:45:08 +02:00
return $this -> __call ( __FUNCTION__ , [ $id , $extra ]);
2019-09-18 20:46:20 +02:00
}
2019-12-27 20:29:22 +01:00
/**
* Get folder ID from object .
*
* @ param mixed $id Object
*
* @ return ? int
*/
2019-12-28 16:45:00 +01:00
public function getFolderId ( $id ) : ? int
2019-09-18 20:46:20 +02:00
{
2019-12-28 16:45:00 +01:00
return \danog\MadelineProto\MTProto :: getFolderId ( $id );
2019-09-18 20:46:20 +02:00
}
2019-12-27 20:29:22 +01:00
/**
* Get bot API ID from peer object .
*
* @ param mixed $id Peer
*
* @ return int
*/
2019-12-28 17:14:59 +01:00
public function getId ( $id , array $extra = [])
2019-09-18 20:46:20 +02:00
{
2019-12-28 17:14:59 +01:00
return $this -> __call ( __FUNCTION__ , [ $id , $extra ]);
2019-09-18 20:46:20 +02:00
}
2019-12-27 20:29:22 +01:00
/**
* Get info about peer , returns an Info object .
*
* @ param mixed $id Peer
* @ param boolean $recursive Internal
*
* @ see https :// docs . madelineproto . xyz / Info . html
*
* @ return \Generator < array > Info object
*/
2019-09-18 21:45:08 +02:00
public function getInfo ( $id , $recursive = true , array $extra = [])
2019-09-18 20:46:20 +02:00
{
2019-09-18 21:45:08 +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
/**
* When were full info for this chat last cached .
*
* @ param mixed $id Chat ID
*
* @ return integer
*/
2020-01-19 13:46:49 +01:00
public function fullChatLastUpdated ( $id ) : int
2019-09-18 20:46:20 +02:00
{
2020-01-19 13:46:49 +01:00
return $this -> API -> fullChatLastUpdated ( $id );
2019-09-18 20:46:20 +02:00
}
2019-12-27 20:29:22 +01:00
/**
* Get full info about peer , returns an FullInfo object .
*
* @ param mixed $id Peer
*
* @ see https :// docs . madelineproto . xyz / FullInfo . html
*
* @ return \Generator < array > FullInfo object
*/
2019-09-18 21:45:08 +02:00
public function getFullInfo ( $id , array $extra = [])
2019-09-18 20:46:20 +02:00
{
2019-09-18 21:45:08 +02:00
return $this -> __call ( __FUNCTION__ , [ $id , $extra ]);
2019-09-18 20:46:20 +02:00
}
2019-12-27 20:29:22 +01:00
/**
* Get full info about peer ( including full list of channel members ), returns a Chat object .
*
* @ param mixed $id Peer
*
* @ see https :// docs . madelineproto . xyz / Chat . html
*
* @ return \Generator < array > Chat object
*/
2020-02-09 17:29:39 +01:00
public function getPwrChat ( $id , bool $fullfetch = true , bool $send = true , array $extra = [])
2019-09-18 20:46:20 +02:00
{
2019-09-18 21:45:08 +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
/**
* Resolve username ( use getInfo instead ) .
*
* @ param string $username Username
*
* @ return \Generator
*/
public function resolveUsername ( string $username , array $extra = [])
2019-09-18 20:46:20 +02:00
{
2019-09-18 21:45:08 +02:00
return $this -> __call ( __FUNCTION__ , [ $username , $extra ]);
2019-09-18 20:46:20 +02:00
}
2019-12-27 20:29:22 +01:00
/**
* Upload file .
*
* @ param FileCallbackInterface | string | array $file File , URL or Telegram file to upload
2019-12-29 20:32:19 +01:00
* @ param string $fileName File name
2019-12-27 20:29:22 +01:00
* @ param callable $cb Callback ( DEPRECATED , use FileCallbackInterface )
* @ param boolean $encrypted Whether to encrypt file for secret chats
*
2019-12-28 16:07:09 +01:00
* @ return \Generator < array >
2019-12-27 20:29:22 +01:00
*/
2019-12-29 20:32:19 +01:00
public function upload ( $file , string $fileName = '' , $cb = null , bool $encrypted = false , array $extra = [])
2019-09-18 20:46:20 +02:00
{
2019-12-29 20:32:19 +01: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
/**
* Upload file from URL .
*
* @ param string | FileCallbackInterface $url URL of file
* @ param integer $size Size of file
2019-12-29 20:32:19 +01:00
* @ param string $fileName File name
2019-12-27 20:29:22 +01:00
* @ param callable $cb Callback ( DEPRECATED , use FileCallbackInterface )
* @ param boolean $encrypted Whether to encrypt file for secret chats
*
* @ return array
*/
2019-12-29 20:32:19 +01: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
{
2019-12-29 20:32:19 +01:00
return $this -> __call ( __FUNCTION__ , [ $url , $size , $fileName , $cb , $encrypted , $extra ]);
2019-09-18 20:46:20 +02:00
}
2019-12-27 20:29:22 +01:00
/**
* Upload file from stream .
*
2019-12-27 21:24:50 +01:00
* @ param mixed $stream PHP resource or AMPHP async stream
2019-12-27 20:29:22 +01:00
* @ param integer $size File size
* @ param string $mime Mime type
2019-12-29 20:32:19 +01:00
* @ param string $fileName File name
2019-12-27 20:29:22 +01:00
* @ param callable $cb Callback ( DEPRECATED , use FileCallbackInterface )
* @ param boolean $encrypted Whether to encrypt file for secret chats
*
* @ return array
*/
2019-12-29 20:32:19 +01: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
{
2019-12-29 20:32:19 +01:00
return $this -> __call ( __FUNCTION__ , [ $stream , $size , $mime , $fileName , $cb , $encrypted , $extra ]);
2019-09-18 20:46:20 +02:00
}
2019-12-27 20:29:22 +01:00
/**
* Upload file from callable .
*
2019-12-27 21:24:50 +01: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
2019-12-29 20:32:19 +01:00
* @ param string $fileName File name
2019-12-27 21:24:50 +01:00
* @ 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
2019-12-27 20:29:22 +01:00
*
2019-12-28 16:07:09 +01:00
* @ return \Generator < array >
2019-12-27 20:29:22 +01:00
*/
2020-01-19 13:46:49 +01: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
{
2019-12-29 20:32:19 +01: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
/**
* Upload file to secret chat .
*
* @ param FileCallbackInterface | string | array $file File , URL or Telegram file to upload
2019-12-29 20:32:19 +01:00
* @ param string $fileName File name
2019-12-27 20:29:22 +01:00
* @ param callable $cb Callback ( DEPRECATED , use FileCallbackInterface )
*
2019-12-28 16:07:09 +01:00
* @ return \Generator < array >
2019-12-27 20:29:22 +01:00
*/
2019-12-29 20:32:19 +01:00
public function uploadEncrypted ( $file , string $fileName = '' , $cb = null , array $extra = [])
2019-09-18 20:46:20 +02:00
{
2019-12-29 20:32:19 +01: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
/**
* Reupload telegram file .
*
* @ param mixed $media Telegram file
* @ param callable $cb Callback ( DEPRECATED , use FileCallbackInterface )
* @ param boolean $encrypted Whether to encrypt file for secret chats
*
2019-12-28 16:07:09 +01:00
* @ return \Generator < array >
2019-12-27 20:29:22 +01:00
*/
public function uploadFromTgfile ( $media , $cb = null , bool $encrypted = false , array $extra = [])
2019-09-18 20:46:20 +02:00
{
2019-09-18 21:45:08 +02:00
return $this -> __call ( __FUNCTION__ , [ $media , $cb , $encrypted , $extra ]);
2019-09-18 20:46:20 +02:00
}
2019-12-28 16:07:09 +01:00
/**
* Get info about file .
*
* @ param mixed $constructor File ID
*
* @ return \Generator < array >
*/
2019-09-18 21:45:08 +02:00
public function getFileInfo ( $constructor , array $extra = [])
2019-09-18 20:46:20 +02:00
{
2019-09-18 21:45:08 +02:00
return $this -> __call ( __FUNCTION__ , [ $constructor , $extra ]);
2019-09-18 20:46:20 +02:00
}
2019-12-27 20:29:22 +01:00
/**
* Get download info of the propic of a user
* Returns an array with the following structure :.
*
* `$info['ext']` - The file extension
* `$info['name']` - The file name , without the extension
* `$info['mime']` - The file mime type
* `$info['size']` - The file size
*
2020-02-09 17:29:39 +01:00
* @ param mixed $messageMedia File ID
2019-12-27 20:29:22 +01:00
*
* @ return \Generator < array >
*/
2019-09-18 21:45:08 +02:00
public function getPropicInfo ( $data , array $extra = [])
2019-09-18 20:46:20 +02:00
{
2019-09-18 21:45:08 +02:00
return $this -> __call ( __FUNCTION__ , [ $data , $extra ]);
2019-09-18 20:46:20 +02:00
}
2020-02-09 17:29:39 +01:00
/**
* Extract file info from bot API message .
*
* @ param array $info Bot API message object
*
* @ return ? array
*/
public function extractBotAPIFile ( array $info ) : ? array
{
return \danog\MadelineProto\MTProto :: extractBotAPIFile ( $info );
}
2019-12-27 20:29:22 +01:00
/**
* Get download info of file
* Returns an array with the following structure :.
*
* `$info['ext']` - The file extension
* `$info['name']` - The file name , without the extension
* `$info['mime']` - The file mime type
* `$info['size']` - The file size
*
2020-02-09 17:29:39 +01:00
* @ param mixed $messageMedia File ID
2019-12-27 20:29:22 +01:00
*
* @ return \Generator < array >
*/
2020-02-09 17:29:39 +01:00
public function getDownloadInfo ( $messageMedia , array $extra = [])
2019-09-18 20:46:20 +02:00
{
2020-02-09 17:29:39 +01:00
return $this -> __call ( __FUNCTION__ , [ $messageMedia , $extra ]);
}
/**
* Download file to browser .
*
* Supports HEAD requests and content - ranges for parallel and resumed downloads .
*
* @ param array | string $messageMedia File to download
* @ param callable $cb Status callback ( can also use FileCallback )
*
* @ return \Generator
*/
public function downloadToBrowser ( $messageMedia , ? callable $cb = null , array $extra = [])
{
return $this -> __call ( __FUNCTION__ , [ $messageMedia , $cb , $extra ]);
}
/**
* Download file to amphp / http - server response .
*
* Supports HEAD requests and content - ranges for parallel and resumed downloads .
*
* @ param array | string $messageMedia File to download
* @ param ServerRequest $request Request
* @ param callable $cb Status callback ( can also use FileCallback )
*
* @ return \Generator < Response > Returned response
*/
public function downloadToResponse ( $messageMedia , \Amp\Http\Server\Request $request , ? callable $cb = null , array $extra = [])
{
return $this -> __call ( __FUNCTION__ , [ $messageMedia , $request , $cb , $extra ]);
}
/**
* Get explanation for HTTP error .
*
* @ param integer $code HTTP error code
*
* @ return string
*/
public function getExplanation ( int $code ) : string
{
return \danog\MadelineProto\MTProto :: getExplanation ( $code );
2019-09-18 20:46:20 +02:00
}
2019-12-27 20:29:22 +01:00
/**
* Download file to directory .
*
2020-02-09 17:29:39 +01:00
* @ param mixed $messageMedia File to download
2019-12-27 20:29:22 +01:00
* @ param string | FileCallbackInterface $dir Directory where to download the file
* @ param callable $cb Callback ( DEPRECATED , use FileCallbackInterface )
*
* @ return \Generator < string > Downloaded file path
*/
2020-02-09 17:29:39 +01:00
public function downloadToDir ( $messageMedia , $dir , $cb = null , array $extra = [])
2019-09-18 20:46:20 +02:00
{
2020-02-09 17:29:39 +01: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
/**
* Download file .
*
2020-02-09 17:29:39 +01:00
* @ param mixed $messageMedia File to download
2019-12-27 20:29:22 +01:00
* @ param string | FileCallbackInterface $file Downloaded file path
* @ param callable $cb Callback ( DEPRECATED , use FileCallbackInterface )
*
* @ return \Generator < string > Downloaded file path
*/
2020-02-09 17:29:39 +01:00
public function downloadToFile ( $messageMedia , $file , $cb = null , array $extra = [])
2019-09-18 20:46:20 +02:00
{
2020-02-09 17:29:39 +01: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
/**
* Download file to stream .
*
2020-02-09 17:29:39 +01:00
* @ param mixed $messageMedia File to download
2019-12-27 20:29:22 +01:00
* @ 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
*
* @ return \Generator < bool >
*/
2020-02-09 17:29:39 +01: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-02-09 17:29:39 +01: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
/**
* 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 .
*
2020-02-09 17:29:39 +01:00
* @ param mixed $messageMedia File to download
2019-12-27 20:29:22 +01:00
* @ 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
*
* @ return \Generator < bool >
*/
2020-02-09 17:29:39 +01: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-02-09 17:29:39 +01:00
return $this -> __call ( __FUNCTION__ , [ $messageMedia , $callable , $cb , $seekable , $offset , $end , $part_size , $extra ]);
2019-09-18 20:46:20 +02:00
}
2019-10-31 20:48:06 +01:00
/**
* Accept secret chat .
*
* @ param array $params Secret chat ID
*
* @ return \Generator
*/
2019-09-18 21:45:08 +02:00
public function acceptSecretChat ( $params , array $extra = [])
2019-09-18 20:46:20 +02:00
{
2019-09-18 21:45:08 +02:00
return $this -> __call ( __FUNCTION__ , [ $params , $extra ]);
2019-09-18 20:46:20 +02:00
}
2019-10-31 20:48:06 +01:00
/**
* Request secret chat .
*
* @ param mixed $user User to start secret chat with
*
* @ return \Generator
*/
2019-09-18 21:45:08 +02:00
public function requestSecretChat ( $user , array $extra = [])
2019-09-18 20:46:20 +02:00
{
2019-09-18 21:45:08 +02:00
return $this -> __call ( __FUNCTION__ , [ $user , $extra ]);
2019-09-18 20:46:20 +02:00
}
2019-10-31 20:48:06 +01:00
/**
* Rekey secret chat .
*
2019-12-28 17:11:08 +01:00
* @ param int $chat Secret chat to rekey
2019-10-31 20:48:06 +01:00
*
* @ return \Generator
*/
2019-12-28 17:11:08 +01:00
public function rekey ( int $chat , array $extra = [])
2019-09-18 20:46:20 +02:00
{
2019-09-18 21:45:08 +02:00
return $this -> __call ( __FUNCTION__ , [ $chat , $extra ]);
2019-09-18 20:46:20 +02:00
}
2019-10-31 20:48:06 +01:00
/**
* Get secret chat status .
*
* @ param int $chat Chat ID
*
* @ return int One of MTProto :: SECRET_EMPTY , MTProto :: SECRET_REQUESTED , MTProto :: SECRET_READY
*/
2020-01-19 13:46:49 +01:00
public function secretChatStatus ( int $chat ) : int
2019-09-18 20:46:20 +02:00
{
2020-01-19 13:46:49 +01:00
return $this -> API -> secretChatStatus ( $chat );
2019-09-18 20:46:20 +02:00
}
2019-10-31 20:48:06 +01:00
/**
* Get secret chat .
*
* @ param array | int $chat Secret chat ID
*
* @ return array
*/
2020-01-19 13:46:49 +01:00
public function getSecretChat ( $chat ) : array
2019-09-18 20:46:20 +02:00
{
2020-01-19 13:46:49 +01:00
return $this -> API -> getSecretChat ( $chat );
2019-09-18 20:46:20 +02:00
}
2019-10-31 20:48:06 +01:00
/**
* Check whether secret chat exists .
*
* @ param array | int $chat Secret chat ID
*
* @ return boolean
*/
2020-01-19 13:46:49 +01:00
public function hasSecretChat ( $chat ) : bool
2019-09-18 20:46:20 +02:00
{
2020-01-19 13:46:49 +01:00
return $this -> API -> hasSecretChat ( $chat );
2019-09-18 20:46:20 +02:00
}
2019-10-31 20:48:06 +01:00
/**
* Discard secret chat .
*
2019-12-28 17:11:08 +01:00
* @ param int $chat Secret chat ID
2019-10-31 20:48:06 +01:00
*
* @ return \Generator
*/
2019-12-28 17:11:08 +01:00
public function discardSecretChat ( int $chat , array $extra = [])
2019-09-18 20:46:20 +02:00
{
2019-09-18 21:45:08 +02:00
return $this -> __call ( __FUNCTION__ , [ $chat , $extra ]);
2019-09-18 20:46:20 +02:00
}
2019-12-28 16:07:09 +01:00
/**
* Get Telegram UTF - 8 length of string .
*
* @ param string $text Text
*
* @ return int
*/
2019-12-28 16:45:00 +01:00
public function mbStrlen ( string $text ) : int
2019-09-18 20:46:20 +02:00
{
2019-12-28 16:45:00 +01:00
return \danog\MadelineProto\MTProto :: mbStrlen ( $text );
2019-09-18 20:46:20 +02:00
}
2019-12-28 16:07:09 +01:00
/**
* Telegram UTF - 8 multibyte substring .
*
* @ param string $text Text to substring
* @ param integer $offset Offset
* @ param ? int $length Length
*
* @ return string
*/
2019-12-28 16:45:00 +01:00
public function mbSubstr ( string $text , int $offset , $length = null ) : string
2019-09-18 20:46:20 +02:00
{
2019-12-28 16:45:00 +01:00
return \danog\MadelineProto\MTProto :: mbSubstr ( $text , $offset , $length );
2019-09-18 20:46:20 +02:00
}
2019-12-28 16:07:09 +01:00
/**
* Telegram UTF - 8 multibyte split .
*
* @ param string $text Text
* @ param integer $length Length
*
2019-12-28 19:16:02 +01:00
* @ return array
2019-12-28 16:07:09 +01:00
*/
2019-12-28 19:16:02 +01:00
public function mbStrSplit ( string $text , int $length ) : array
2019-09-18 20:46:20 +02:00
{
2019-12-28 16:45:00 +01:00
return \danog\MadelineProto\MTProto :: mbStrSplit ( $text , $length );
2019-09-18 20:46:20 +02:00
}
2019-12-28 16:07:09 +01:00
/**
* Convert MTProto parameters to bot API parameters .
*
2020-02-09 17:29:39 +01:00
* @ param array $data Data
2019-12-28 16:07:09 +01:00
*
* @ return \Generator < array >
*/
2020-02-09 17:29:39 +01:00
public function MTProtoToBotAPI ( array $data , array $extra = [])
2019-09-18 20:46:20 +02:00
{
2020-02-09 17:29:39 +01:00
return $this -> __call ( __FUNCTION__ , [ $data , $extra ]);
2019-09-18 20:46:20 +02:00
}
2019-12-28 16:07:09 +01:00
/**
* Convert bot API parameters to MTProto parameters .
*
* @ param array $arguments Arguments
*
* @ return \Generator < array >
*/
public function botAPIToMTProto ( array $arguments , array $extra = [])
2019-09-18 20:46:20 +02:00
{
2019-09-18 21:45:08 +02:00
return $this -> __call ( __FUNCTION__ , [ $arguments , $extra ]);
2019-09-18 20:46:20 +02:00
}
2019-12-28 16:07:09 +01:00
/**
* Unpack bot API file ID .
*
2020-02-07 21:13:49 +01:00
* @ param string $fileId Bot API file ID
2019-12-28 16:07:09 +01:00
*
* @ return array Unpacked file ID
*/
2020-02-07 21:13:49 +01:00
public function unpackFileId ( string $fileId ) : array
2019-09-18 20:46:20 +02:00
{
2020-02-07 21:13:49 +01:00
return $this -> API -> unpackFileId ( $fileId );
2019-09-18 20:46:20 +02:00
}
2019-12-28 16:07:09 +01:00
/**
* Get mime type from file extension .
*
* @ param string $extension File extension
* @ param string $default Default mime type
*
* @ return string
*/
2019-12-28 16:45:00 +01:00
public function getMimeFromExtension ( string $extension , string $default ) : string
2019-09-18 20:46:20 +02:00
{
2019-12-28 16:45:00 +01:00
return \danog\MadelineProto\MTProto :: getMimeFromExtension ( $extension , $default );
2019-09-18 20:46:20 +02:00
}
2019-12-28 16:07:09 +01:00
/**
* Get extension from mime type .
*
* @ param string $mime MIME type
*
* @ return string
*/
2019-12-28 16:45:00 +01:00
public function getExtensionFromMime ( string $mime ) : string
2019-09-18 20:46:20 +02:00
{
2019-12-28 16:45:00 +01:00
return \danog\MadelineProto\MTProto :: getExtensionFromMime ( $mime );
2019-09-18 20:46:20 +02:00
}
2019-12-28 16:07:09 +01:00
/**
* Get extension from file location .
*
* @ param mixed $location File location
* @ param string $default Default extension
*
* @ return string
*/
2019-12-28 16:45:00 +01:00
public function getExtensionFromLocation ( $location , string $default ) : string
2019-09-18 20:46:20 +02:00
{
2019-12-28 16:45:00 +01:00
return \danog\MadelineProto\MTProto :: getExtensionFromLocation ( $location , $default );
2019-09-18 20:46:20 +02:00
}
2019-12-28 16:07:09 +01:00
/**
* Get mime type of file .
*
* @ param string $file File
*
* @ return string
*/
2019-12-28 16:45:00 +01:00
public function getMimeFromFile ( string $file ) : string
2019-09-18 20:46:20 +02:00
{
2019-12-28 16:45:00 +01:00
return \danog\MadelineProto\MTProto :: getMimeFromFile ( $file );
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
/**
* Convert tdcli parameters to tdcli .
*
* @ param array $params Params
* @ param array $key Key
*
* @ return array
*/
2020-01-19 13:46:49 +01:00
public function tdcliToTd ( & $params , $key = null ) : array
2019-09-18 20:46:20 +02:00
{
2020-01-19 13:46:49 +01:00
return $this -> API -> tdcliToTd ( $params , $key );
2019-09-18 20:46:20 +02:00
}
2019-12-28 16:07:09 +01:00
/**
* Convert TD to MTProto parameters .
*
* @ param array $params Parameters
*
* @ return \Generator < array >
*/
public function tdToMTProto ( array $params , array $extra = [])
2019-09-18 20:46:20 +02:00
{
2019-09-18 21:45:08 +02:00
return $this -> __call ( __FUNCTION__ , [ $params , $extra ]);
2019-09-18 20:46:20 +02:00
}
2019-12-28 16:07:09 +01:00
/**
* MTProto to TDCLI params .
*
* @ param mixed $params Params
*
* @ return \Generator
*/
2019-09-18 21:45:08 +02:00
public function MTProtoToTdcli ( $params , array $extra = [])
2019-09-18 20:46:20 +02:00
{
2019-09-18 21:45:08 +02:00
return $this -> __call ( __FUNCTION__ , [ $params , $extra ]);
2019-09-18 20:46:20 +02:00
}
2019-12-28 16:07:09 +01:00
/**
* MTProto to TD params .
*
* @ param mixed $params Params
*
* @ return \Generator
*/
2019-09-18 21:45:08 +02:00
public function MTProtoToTd ( & $params , array $extra = [])
2019-09-18 20:46:20 +02:00
{
2019-09-18 21:45:08 +02:00
return $this -> __call ( __FUNCTION__ , [ $params , $extra ]);
2019-09-18 20:46:20 +02:00
}
2019-12-28 16:07:09 +01:00
/**
* Convert TD parameters to tdcli .
*
* @ param mixed $params Parameters
*
* @ return mixed
*/
2019-09-18 21:45:08 +02:00
public function tdToTdcli ( $params , array $extra = [])
2019-09-18 20:46:20 +02:00
{
2019-09-18 21:45:08 +02:00
return $this -> __call ( __FUNCTION__ , [ $params , $extra ]);
2019-09-18 20:46:20 +02:00
}
2019-10-31 11:17:22 +01:00
/**
* Generate MTProto vector hash .
*
* @ param array $ints IDs
*
* @ return int Vector hash
*/
2019-12-28 16:45:00 +01:00
public function genVectorHash ( array $ints ) : int
2019-09-18 20:46:20 +02:00
{
2019-12-28 16:45:00 +01:00
return \danog\MadelineProto\MTProto :: genVectorHash ( $ints );
2019-09-18 20:46:20 +02:00
}
2019-10-31 11:17:22 +01:00
/**
* Get random integer .
*
* @ param integer $modulus Modulus
*
* @ return int
*/
2019-12-28 17:11:08 +01:00
public function randomInt ( int $modulus = 0 ) : int
2019-09-18 20:46:20 +02:00
{
2019-12-28 16:45:00 +01:00
return \danog\MadelineProto\MTProto :: randomInt ( $modulus );
2019-09-18 20:46:20 +02:00
}
2019-10-31 11:17:22 +01:00
/**
* Get random string of specified length .
*
* @ param integer $length Length
*
* @ return string Random string
*/
2019-12-28 16:45:00 +01:00
public function random ( int $length ) : string
2019-09-18 20:46:20 +02:00
{
2019-12-28 16:45:00 +01:00
return \danog\MadelineProto\MTProto :: random ( $length );
2019-09-18 20:46:20 +02:00
}
/**
2019-10-31 11:17:22 +01:00
* Positive modulo
2019-09-18 20:46:20 +02:00
* Works just like the % ( modulus ) operator , only returns always a postive number .
2019-10-31 11:17:22 +01:00
*
* @ param int $a A
* @ param int $b B
*
* @ return int Modulo
2019-09-18 20:46:20 +02:00
*/
2019-12-28 16:45:00 +01:00
public function posmod ( int $a , int $b ) : int
2019-09-18 20:46:20 +02:00
{
2019-12-28 16:45:00 +01:00
return \danog\MadelineProto\MTProto :: posmod ( $a , $b );
2019-09-18 20:46:20 +02:00
}
2019-10-31 11:17:22 +01:00
/**
* Unpack base256 signed int .
*
* @ param string $value base256 int
*
* @ return integer
*/
2019-12-28 17:11:08 +01:00
public function unpackSignedInt ( string $value ) : int
2019-09-18 20:46:20 +02:00
{
2019-12-28 16:45:00 +01:00
return \danog\MadelineProto\MTProto :: unpackSignedInt ( $value );
2019-09-18 20:46:20 +02:00
}
2019-10-31 11:17:22 +01:00
/**
* Unpack base256 signed long .
*
* @ param string $value base256 long
*
* @ return integer
*/
2019-12-28 17:11:08 +01:00
public function unpackSignedLong ( string $value ) : int
2019-09-18 20:46:20 +02:00
{
2019-12-28 16:45:00 +01:00
return \danog\MadelineProto\MTProto :: unpackSignedLong ( $value );
2019-09-18 20:46:20 +02:00
}
2019-10-31 11:17:22 +01:00
/**
* Unpack base256 signed long to string .
*
* @ param string $value base256 long
*
* @ return string
*/
2019-12-28 16:45:00 +01:00
public function unpackSignedLongString ( $value ) : string
2019-09-18 20:46:20 +02:00
{
2019-12-28 16:45:00 +01:00
return \danog\MadelineProto\MTProto :: unpackSignedLongString ( $value );
2019-09-18 20:46:20 +02:00
}
2019-10-31 15:06:25 +01:00
/**
* Convert integer to base256 signed int .
*
* @ param integer $value Value to convert
*
* @ return string
*/
2019-12-28 16:45:00 +01:00
public function packSignedInt ( int $value ) : string
2019-09-18 20:46:20 +02:00
{
2019-12-28 16:45:00 +01:00
return \danog\MadelineProto\MTProto :: packSignedInt ( $value );
2019-09-18 20:46:20 +02:00
}
2019-10-31 15:06:25 +01:00
/**
* Convert integer to base256 long .
*
* @ param int $value Value to convert
*
* @ return string
*/
2019-12-28 16:45:00 +01:00
public function packSignedLong ( int $value ) : string
2019-09-18 20:46:20 +02:00
{
2019-12-28 16:45:00 +01:00
return \danog\MadelineProto\MTProto :: packSignedLong ( $value );
2019-09-18 20:46:20 +02:00
}
2019-10-31 15:06:25 +01:00
/**
* Convert value to unsigned base256 int .
*
* @ param int $value Value
*
* @ return string
*/
2019-12-28 16:45:00 +01:00
public function packUnsignedInt ( int $value ) : string
2019-09-18 20:46:20 +02:00
{
2019-12-28 16:45:00 +01:00
return \danog\MadelineProto\MTProto :: packUnsignedInt ( $value );
2019-09-18 20:46:20 +02:00
}
2019-10-31 15:06:25 +01:00
/**
* Convert double to binary version .
*
2019-12-11 16:22:34 +01:00
* @ param float $value Value to convert
2019-10-31 15:06:25 +01:00
*
* @ return string
*/
2019-12-28 16:45:00 +01:00
public function packDouble ( float $value ) : string
2019-09-18 20:46:20 +02:00
{
2019-12-28 16:45:00 +01:00
return \danog\MadelineProto\MTProto :: packDouble ( $value );
2019-09-18 20:46:20 +02:00
}
2019-10-31 15:06:25 +01:00
/**
* Unpack binary double .
*
* @ param string $value Value to unpack
*
2019-12-11 16:22:34 +01:00
* @ return float
2019-10-31 15:06:25 +01:00
*/
2019-12-28 16:45:00 +01:00
public function unpackDouble ( string $value ) : float
2019-09-18 20:46:20 +02:00
{
2019-12-28 16:45:00 +01:00
return \danog\MadelineProto\MTProto :: unpackDouble ( $value );
2019-09-18 20:46:20 +02:00
}
2019-10-31 15:06:25 +01:00
/**
* Synchronously wait for a promise | generator .
*
* @ param \Generator | Promise $promise The promise to wait for
* @ param boolean $ignoreSignal Whether to ignore shutdown signals
*
* @ return mixed
*/
2019-12-28 16:45:00 +01:00
public function wait ( $promise , $ignoreSignal = false )
2019-09-18 20:46:20 +02:00
{
2019-12-28 16:45:00 +01:00
return $this -> __call ( __FUNCTION__ , [ $promise , $ignoreSignal ]);
2019-09-18 20:46:20 +02:00
}
2019-10-31 15:06:25 +01: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 .
*
* @ param array < \Generator | Promise > $promises Promises
*
* @ return Promise
*/
2019-12-28 16:45:00 +01:00
public function all ( array $promises )
2019-09-18 20:46:20 +02:00
{
2019-12-28 16:45:00 +01:00
return $this -> __call ( __FUNCTION__ , [ $promises ]);
2019-09-18 20:46:20 +02:00
}
2019-10-31 15:06:25 +01:00
/**
* Returns a promise that is resolved when all promises are resolved . The returned promise will not fail .
*
* @ param array < Promise | \Generator > $promises Promises
*
* @ return Promise
*/
2019-12-28 16:45:00 +01:00
public function any ( array $promises )
2019-09-18 20:46:20 +02:00
{
2019-12-28 16:45:00 +01:00
return $this -> __call ( __FUNCTION__ , [ $promises ]);
2019-09-18 20:46:20 +02:00
}
2019-10-31 15:06:25 +01: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 .
*
* @ param array < Promise | \Generator > $promises Promises
*
* @ return Promise
*/
2019-12-28 16:45:00 +01:00
public function some ( array $promises )
2019-09-18 20:46:20 +02:00
{
2019-12-28 16:45:00 +01:00
return $this -> __call ( __FUNCTION__ , [ $promises ]);
2019-09-18 20:46:20 +02:00
}
2019-10-31 15:06:25 +01:00
/**
* Returns a promise that succeeds when the first promise succeeds , and fails only if all promises fail .
*
* @ param array < Promise | \Generator > $promises Promises
*
* @ return Promise
*/
2019-12-28 16:45:00 +01:00
public function first ( array $promises )
2019-09-18 20:46:20 +02:00
{
2019-12-28 16:45:00 +01:00
return $this -> __call ( __FUNCTION__ , [ $promises ]);
2019-09-18 20:46:20 +02:00
}
2019-10-31 15:06:25 +01:00
/**
* Create an artificial timeout for any \Generator or Promise .
*
* @ param \Generator | Promise $promise
* @ param integer $timeout
*
* @ return Promise
*/
2019-12-28 16:45:00 +01:00
public function timeout ( $promise , int $timeout )
2019-09-18 20:46:20 +02:00
{
2019-12-28 16:45:00 +01:00
return $this -> __call ( __FUNCTION__ , [ $promise , $timeout ]);
2019-09-18 20:46:20 +02:00
}
2019-10-31 15:06:25 +01:00
/**
* Convert generator , promise or any other value to a promise .
*
* @ param \Generator | Promise | mixed $promise
*
* @ return Promise
*/
2019-12-28 16:45:00 +01:00
public function call ( $promise )
2019-09-18 20:46:20 +02:00
{
2019-12-28 16:45:00 +01:00
return $this -> __call ( __FUNCTION__ , [ $promise ]);
2019-09-18 20:46:20 +02:00
}
2019-10-31 15:06:25 +01:00
/**
* Call promise in background .
*
* @ param \Generator | Promise $promise Promise to resolve
* @ param ? \Generator | Promise $actual Promise to resolve instead of $promise
* @ param string $file File
*
2019-12-11 16:22:34 +01:00
* @ return Promise
2019-10-31 15:06:25 +01:00
*/
2019-12-28 16:45:00 +01:00
public function callFork ( $promise , $actual = null , $file = '' )
2019-09-18 20:46:20 +02:00
{
2019-12-28 16:45:00 +01:00
return $this -> __call ( __FUNCTION__ , [ $promise , $actual , $file ]);
2019-09-18 20:46:20 +02:00
}
2019-10-31 15:06:25 +01:00
/**
* Call promise in background , deferring execution .
*
* @ param \Generator | Promise $promise Promise to resolve
*
* @ return void
*/
2019-12-28 16:45:00 +01:00
public function callForkDefer ( $promise ) : void
2019-09-18 20:46:20 +02:00
{
2019-12-28 16:45:00 +01:00
\danog\MadelineProto\MTProto :: callForkDefer ( $promise );
2019-09-18 20:46:20 +02:00
}
2019-10-31 15:06:25 +01:00
/**
* Rethrow error catched in strand .
*
* @ param \Throwable $e Exception
* @ param string $file File where the strand started
*
* @ return void
*/
2019-12-28 16:45:00 +01:00
public function rethrow ( \Throwable $e , $file = '' ) : void
2019-09-18 20:46:20 +02:00
{
2019-12-28 16:45:00 +01:00
\danog\MadelineProto\MTProto :: rethrow ( $e , $file );
2019-09-18 20:46:20 +02:00
}
2019-10-31 15:06:25 +01:00
/**
* Call promise $b after promise $a .
*
* @ param \Generator | Promise $a Promise A
* @ param \Generator | Promise $b Promise B
*
* @ return Promise
*/
2019-12-28 16:45:00 +01:00
public function after ( $a , $b )
2019-09-18 20:46:20 +02:00
{
2019-12-28 16:45:00 +01:00
return $this -> __call ( __FUNCTION__ , [ $a , $b ]);
2019-09-18 20:46:20 +02:00
}
2019-10-29 22:00:21 +01:00
/**
* Asynchronously lock a file
* Resolves with a callbable that MUST eventually be called in order to release the lock .
*
2019-10-31 11:17:22 +01:00
* @ param string $file File to lock
* @ param integer $operation Locking mode
2019-12-11 16:22:34 +01:00
* @ param float $polling Polling interval
2020-01-31 19:29:43 +01:00
*
2019-10-29 22:00:21 +01:00
* @ return Promise
*/
2019-12-28 16:45:00 +01:00
public function flock ( string $file , int $operation , float $polling = 0.1 )
2019-09-18 20:46:20 +02:00
{
2019-12-28 16:45:00 +01:00
return $this -> __call ( __FUNCTION__ , [ $file , $operation , $polling ]);
2019-09-18 20:46:20 +02:00
}
2019-10-31 11:17:22 +01:00
/**
* Asynchronously sleep .
*
* @ param int $time Number of seconds to sleep for
*
* @ return Promise
*/
2019-12-28 16:45:00 +01:00
public function sleep ( int $time )
2019-09-18 20:46:20 +02:00
{
2019-12-28 16:45:00 +01:00
return $this -> __call ( __FUNCTION__ , [ $time ]);
2019-09-18 20:46:20 +02:00
}
2019-10-31 11:17:22 +01:00
/**
* Asynchronously read line .
*
* @ param string $prompt Prompt
*
* @ return Promise
*/
2019-12-28 16:45:00 +01:00
public function readLine ( string $prompt = '' )
2019-09-18 20:46:20 +02:00
{
2019-12-28 16:45:00 +01:00
return $this -> __call ( __FUNCTION__ , [ $prompt ]);
2019-09-18 20:46:20 +02:00
}
2019-10-31 11:17:22 +01:00
/**
* Asynchronously write to stdout / browser .
*
* @ param string $string Message to echo
*
* @ return Promise
*/
2019-12-28 16:45:00 +01:00
public function echo ( string $string )
2019-09-18 20:46:20 +02:00
{
2019-12-28 16:45:00 +01:00
return $this -> __call ( __FUNCTION__ , [ $string ]);
2019-09-18 20:46:20 +02:00
}
2019-10-31 11:17:22 +01:00
/**
* Check if is array or similar ( traversable && countable && arrayAccess ) .
*
* @ param arraylike $var Value to check
*
* @ return boolean
*/
2019-12-28 16:45:00 +01:00
public function isArrayOrAlike ( $var ) : bool
2019-09-18 20:46:20 +02:00
{
2019-12-28 16:45:00 +01:00
return \danog\MadelineProto\MTProto :: isArrayOrAlike ( $var );
2019-09-18 20:46:20 +02:00
}
/**
2019-09-18 21:21:34 +02:00
* Convert to camelCase .
2019-09-18 20:46:20 +02:00
*
2020-02-25 18:02:32 +01:00
* @ param string $input String
2019-09-18 21:21:34 +02:00
*
2019-09-18 20:46:20 +02:00
* @ return string
*/
2020-02-25 18:02:32 +01:00
public function toCamelCase ( string $input ) : string
2019-09-18 20:46:20 +02:00
{
2020-02-25 18:02:32 +01:00
return \danog\MadelineProto\MTProto :: toCamelCase ( $input );
2019-09-18 20:46:20 +02:00
}
/**
2019-09-18 21:21:34 +02:00
* Convert to snake_case .
2019-09-18 20:46:20 +02:00
*
2020-02-25 18:02:32 +01:00
* @ param string $input String
2019-09-18 21:21:34 +02:00
*
2019-09-18 20:46:20 +02:00
* @ return string
*/
2020-02-25 18:02:32 +01:00
public function toSnakeCase ( string $input ) : string
2019-09-18 20:46:20 +02:00
{
2020-02-25 18:02:32 +01:00
return \danog\MadelineProto\MTProto :: toSnakeCase ( $input );
2019-09-18 20:46:20 +02:00
}
2019-09-18 21:21:34 +02:00
/**
2019-09-18 21:32:24 +02:00
* Create array .
2019-09-18 21:21:34 +02:00
*
* @ param mixed ... $params Params
2019-09-18 21:32:24 +02:00
*
2019-09-18 21:21:34 +02:00
* @ return array
*/
public function arr ( ... $params ) : array
{
2019-12-28 16:45:00 +01:00
return \danog\MadelineProto\MTProto :: arr ( ... $params );
2019-09-18 21:21:34 +02:00
}
2019-10-31 11:17:22 +01:00
/**
* base64URL decode .
*
* @ param string $data Data to decode
*
* @ return string
*/
2019-12-28 16:45:00 +01:00
public function base64urlDecode ( string $data ) : string
2019-10-31 11:17:22 +01:00
{
2019-12-28 16:45:00 +01:00
return \danog\MadelineProto\MTProto :: base64urlDecode ( $data );
2019-10-31 11:17:22 +01:00
}
/**
* Base64URL encode .
*
* @ param string $data Data to encode
*
* @ return string
*/
2019-12-28 16:45:00 +01:00
public function base64urlEncode ( string $data ) : string
2019-10-31 11:17:22 +01:00
{
2019-12-28 16:45:00 +01:00
return \danog\MadelineProto\MTProto :: base64urlEncode ( $data );
2019-10-31 11:17:22 +01:00
}
/**
* null - byte RLE decode .
*
* @ param string $string Data to decode
*
* @ return string
*/
2019-12-28 16:45:00 +01:00
public function rleDecode ( string $string ) : string
2019-10-31 11:17:22 +01:00
{
2019-12-28 16:45:00 +01:00
return \danog\MadelineProto\MTProto :: rleDecode ( $string );
2019-10-31 11:17:22 +01:00
}
/**
* null - byte RLE encode .
*
* @ param string $string Data to encode
*
* @ return string
*/
2019-12-28 16:45:00 +01:00
public function rleEncode ( string $string ) : string
2019-10-31 11:17:22 +01:00
{
2019-12-28 16:45:00 +01:00
return \danog\MadelineProto\MTProto :: rleEncode ( $string );
2019-10-31 11:17:22 +01:00
}
2020-02-23 19:28:42 +01:00
/**
* Inflate stripped photosize to full JPG payload .
*
* @ param string $stripped Stripped photosize
*
* @ return string JPG payload
*/
public function inflateStripped ( string $stripped ) : string
{
return \danog\MadelineProto\MTProto :: inflateStripped ( $stripped );
}
2019-10-31 15:06:25 +01:00
/**
* Get final element of array .
*
* @ param array $what Array
*
* @ return mixed
*/
2019-12-28 16:45:00 +01:00
public function end ( array $what )
2019-10-31 15:06:25 +01:00
{
2019-12-28 16:45:00 +01:00
return $this -> __call ( __FUNCTION__ , [ $what ]);
2019-10-31 15:06:25 +01:00
}
/**
* Escape string for markdown .
*
* @ param string $hwat String to escape
*
* @ return void
*/
2019-12-28 16:45:00 +01:00
public function markdownEscape ( string $hwat ) : string
2019-10-31 15:06:25 +01:00
{
2019-12-28 16:45:00 +01:00
return \danog\MadelineProto\MTProto :: markdownEscape ( $hwat );
2019-10-31 15:06:25 +01:00
}
/**
* Whether this is altervista .
*
* @ return boolean
*/
2019-12-28 16:45:00 +01:00
public function isAltervista () : bool
2019-10-31 15:06:25 +01:00
{
2019-12-28 16:45:00 +01:00
return \danog\MadelineProto\MTProto :: isAltervista ();
2019-10-31 15:06:25 +01:00
}
2019-10-31 20:48:06 +01:00
/**
* Accesses a private variable from an object .
*
* @ param object $obj Object
* @ param string $var Attribute name
*
* @ return mixed
* @ access public
*/
2019-12-28 16:45:00 +01:00
public function getVar ( $obj , string $var )
2019-10-31 20:48:06 +01:00
{
2019-12-28 16:45:00 +01:00
return $this -> __call ( __FUNCTION__ , [ $obj , $var ]);
2019-10-31 20:48:06 +01:00
}
2020-02-26 11:47:30 +01:00
/**
* Sets a private variable in an object .
*
* @ param object $obj Object
* @ param string $var Attribute name
* @ param mixed $val Attribute value
*
* @ return mixed
* @ access public
*/
public function setVar ( $obj , string $var , & $val ) : void
{
\danog\MadelineProto\MTProto :: setVar ( $obj , $var , $val );
}
2019-12-28 16:07:09 +01:00
/**
* Request VoIP call .
*
* @ param mixed $user User
*
* @ return void
*/
2019-09-18 21:45:08 +02:00
public function requestCall ( $user , array $extra = [])
2019-09-18 20:46:20 +02:00
{
2019-09-18 21:45:08 +02:00
return $this -> __call ( __FUNCTION__ , [ $user , $extra ]);
2019-09-18 20:46:20 +02:00
}
2019-12-28 16:07:09 +01:00
/**
* Accept call .
*
* @ param array $call Call
*
* @ return \Generator
*/
2019-12-28 17:11:08 +01:00
public function acceptCall ( array $call , array $extra = [])
2019-09-18 20:46:20 +02:00
{
2019-09-18 21:45:08 +02:00
return $this -> __call ( __FUNCTION__ , [ $call , $extra ]);
2019-09-18 20:46:20 +02:00
}
2019-12-28 16:07:09 +01:00
/**
* Confirm call .
*
* @ param array $params Params
*
* @ return \Generator
*/
2019-12-28 17:11:08 +01:00
public function confirmCall ( array $params , array $extra = [])
2019-09-18 20:46:20 +02:00
{
2019-09-18 21:45:08 +02:00
return $this -> __call ( __FUNCTION__ , [ $params , $extra ]);
2019-09-18 20:46:20 +02:00
}
2019-12-28 16:07:09 +01:00
/**
* Complete call handshake .
*
* @ param array $params Params
*
* @ return \Generator
*/
2019-12-28 17:11:08 +01:00
public function completeCall ( array $params , array $extra = [])
2019-09-18 20:46:20 +02:00
{
2019-09-18 21:45:08 +02:00
return $this -> __call ( __FUNCTION__ , [ $params , $extra ]);
2019-09-18 20:46:20 +02:00
}
2019-12-28 16:07:09 +01:00
/**
* Get call status .
*
2019-12-28 17:11:08 +01:00
* @ param int $id Call ID
2019-12-28 16:07:09 +01:00
*
* @ return integer
*/
2020-01-19 13:46:49 +01:00
public function callStatus ( int $id ) : int
2019-09-18 20:46:20 +02:00
{
2020-01-19 13:46:49 +01:00
return $this -> API -> callStatus ( $id );
2019-09-18 20:46:20 +02:00
}
2019-12-28 16:07:09 +01:00
/**
* Get call info .
*
2019-12-28 17:11:08 +01:00
* @ param int $call Call ID
2019-12-28 16:07:09 +01:00
*
* @ return array
*/
2020-01-19 13:46:49 +01:00
public function getCall ( int $call ) : array
2019-09-18 20:46:20 +02:00
{
2020-01-19 13:46:49 +01:00
return $this -> API -> getCall ( $call );
2019-09-18 20:46:20 +02:00
}
2020-03-06 13:09:52 +01:00
/**
* Discard call .
*
* @ param array $call Call
* @ param string $reason Discard reason
* @ param array $rating Rating
* @ param boolean $need_debug Need debug ?
*
* @ return \Generator
*/
public function discardCall ( array $call , array $reason , array $rating = [
], bool $need_debug = true , array $extra = [])
{
return $this -> __call ( __FUNCTION__ , [ $call , $reason , $rating , $need_debug , $extra ]);
}
2019-12-28 16:07:09 +01:00
/**
* Check state of calls .
*
* @ return void
*/
2020-01-19 13:46:49 +01:00
public function checkCalls () : void
2019-09-18 20:46:20 +02:00
{
2020-01-19 13:46:49 +01:00
$this -> API -> checkCalls ();
2019-09-18 20:46:20 +02:00
}
2019-10-31 20:48:06 +01:00
/**
* Get dialog peers .
*
* @ param boolean $force Whether to refetch all dialogs ignoring cache
*
* @ return \Generator < array < Peer >>
*/
2019-12-28 17:11:08 +01:00
public function getDialogs ( bool $force = true , array $extra = [])
2019-09-18 20:46:20 +02:00
{
2019-09-18 21:45:08 +02:00
return $this -> __call ( __FUNCTION__ , [ $force , $extra ]);
2019-09-18 20:46:20 +02:00
}
2019-10-31 20:48:06 +01:00
/**
* Get full info of all dialogs .
*
* @ param boolean $force Whether to refetch all dialogs ignoring cache
*
* @ return \Generator
*/
2019-12-28 17:11:08 +01:00
public function getFullDialogs ( bool $force = true , array $extra = [])
2019-09-18 20:46:20 +02:00
{
2019-09-18 21:45:08 +02:00
return $this -> __call ( __FUNCTION__ , [ $force , $extra ]);
2019-09-18 20:46:20 +02:00
}
2019-10-31 20:48:06 +01:00
/**
* Set event handler .
*
* @ param string | EventHandler $event_handler Event handler
*
2020-02-26 12:45:30 +01:00
* @ return \Generator
2019-10-31 20:48:06 +01:00
*/
2020-02-26 12:45:30 +01:00
public function setEventHandler ( $event_handler , array $extra = [])
2019-09-18 20:46:20 +02:00
{
2020-02-26 12:45:30 +01:00
return $this -> __call ( __FUNCTION__ , [ $event_handler , $extra ]);
2019-09-18 20:46:20 +02:00
}
2020-02-23 19:28:42 +01:00
/**
* Unset event handler .
*
* @ param bool $disableUpdateHandling Whether to also disable internal update handling ( will cause errors , otherwise will simply use the NOOP handler )
*
* @ return void
*/
public function unsetEventHandler ( bool $disableUpdateHandling = false ) : void
{
$this -> API -> unsetEventHandler ( $disableUpdateHandling );
}
2019-10-31 20:48:06 +01:00
/**
* Get event handler .
*
* @ return EventHandler
*/
2020-01-19 13:46:49 +01:00
public function getEventHandler () : \danog\MadelineProto\EventHandler
2019-09-18 20:46:20 +02:00
{
2020-01-19 13:46:49 +01:00
return $this -> API -> getEventHandler ();
2019-09-18 20:46:20 +02:00
}
2020-02-23 19:28:42 +01:00
/**
* Check if an event handler instance is present .
*
* @ return boolean
*/
public function hasEventHandler () : bool
{
return $this -> API -> hasEventHandler ();
}
2019-12-27 20:29:22 +01:00
/**
* Set webhook update handler .
*
* @ param string $hook_url Webhook URL
* @ param string $pem_path PEM path for self - signed certificate
*
* @ return void
*/
2020-01-19 13:46:49 +01:00
public function setWebhook ( string $hook_url , string $pem_path = '' ) : void
2019-09-18 20:46:20 +02:00
{
2020-01-19 13:46:49 +01:00
$this -> API -> setWebhook ( $hook_url , $pem_path );
2019-09-18 20:46:20 +02:00
}
2019-12-27 20:29:22 +01:00
/**
* Set update handling callback .
*
* @ param callable $callback Callback
*
* @ return void
*/
2020-01-19 13:46:49 +01:00
public function setCallback ( $callback ) : void
2019-09-18 20:46:20 +02:00
{
2020-01-19 13:46:49 +01:00
$this -> API -> setCallback ( $callback );
2019-09-18 20:46:20 +02:00
}
2019-12-28 16:07:09 +01:00
/**
* Log out currently logged in user .
*
* @ return \Generator
*/
2019-09-18 21:45:08 +02:00
public function logout ( array $extra = [])
2019-09-18 20:46:20 +02:00
{
2019-09-18 21:45:08 +02:00
return $this -> __call ( __FUNCTION__ , [ $extra ]);
2019-09-18 20:46:20 +02:00
}
2019-12-28 16:07:09 +01:00
/**
* Login as bot .
*
* @ param string $token Bot token
*
* @ return \Generator
*/
public function botLogin ( string $token , array $extra = [])
2019-09-18 20:46:20 +02:00
{
2019-09-18 21:45:08 +02:00
return $this -> __call ( __FUNCTION__ , [ $token , $extra ]);
2019-09-18 20:46:20 +02:00
}
2019-12-28 16:07:09 +01:00
/**
* Login as user .
*
* @ param string $number Phone number
* @ param integer $sms_type SMS type
*
* @ return \Generator
*/
2019-09-18 21:45:08 +02:00
public function phoneLogin ( $number , $sms_type = 5 , array $extra = [])
2019-09-18 20:46:20 +02:00
{
2019-09-18 21:45:08 +02:00
return $this -> __call ( __FUNCTION__ , [ $number , $sms_type , $extra ]);
2019-09-18 20:46:20 +02:00
}
2019-12-28 16:07:09 +01:00
/**
* Complet user login using login code .
*
* @ param string $code Login code
*
* @ return \Generator
*/
2019-09-18 21:45:08 +02:00
public function completePhoneLogin ( $code , array $extra = [])
2019-09-18 20:46:20 +02:00
{
2019-09-18 21:45:08 +02:00
return $this -> __call ( __FUNCTION__ , [ $code , $extra ]);
2019-09-18 20:46:20 +02:00
}
2019-12-28 16:07:09 +01:00
/**
* Import authorization .
*
* @ param mixed $authorization Authorization info
*
* @ return \Generator
*/
2019-09-18 21:45:08 +02:00
public function importAuthorization ( $authorization , array $extra = [])
2019-09-18 20:46:20 +02:00
{
2019-09-18 21:45:08 +02:00
return $this -> __call ( __FUNCTION__ , [ $authorization , $extra ]);
2019-09-18 20:46:20 +02:00
}
2019-12-28 16:07:09 +01:00
/**
* Export authorization .
*
* @ return \Generator < array >
*/
2019-09-18 21:45:08 +02:00
public function exportAuthorization ( array $extra = [])
2019-09-18 20:46:20 +02:00
{
2019-09-18 21:45:08 +02:00
return $this -> __call ( __FUNCTION__ , [ $extra ]);
2019-09-18 20:46:20 +02:00
}
2019-12-28 16:07:09 +01:00
/**
* Complete signup to Telegram .
*
* @ param string $first_name First name
* @ param string $last_name Last name
*
* @ return \Generator
*/
public function completeSignup ( string $first_name , string $last_name = '' , array $extra = [])
2019-09-18 20:46:20 +02:00
{
2019-09-18 21:45:08 +02:00
return $this -> __call ( __FUNCTION__ , [ $first_name , $last_name , $extra ]);
2019-09-18 20:46:20 +02:00
}
2019-12-28 16:07:09 +01:00
/**
* Complete 2 FA login .
*
* @ param string $password Password
*
* @ return \Generator
*/
public function complete2faLogin ( string $password , array $extra = [])
2019-09-18 20:46:20 +02:00
{
2019-09-18 21:45:08 +02:00
return $this -> __call ( __FUNCTION__ , [ $password , $extra ]);
2019-09-18 20:46:20 +02:00
}
/**
* Update the 2 FA password .
*
* The params array can contain password , new_password , email and hint params .
*
* @ param array $params The params
2019-12-28 16:07:09 +01:00
*
* @ return \Generator
2019-09-18 20:46:20 +02:00
*/
2019-09-18 21:45:08 +02:00
public function update2fa ( array $params , array $extra = [])
2019-09-18 20:46:20 +02:00
{
2019-09-18 21:45:08 +02:00
return $this -> __call ( __FUNCTION__ , [ $params , $extra ]);
2019-09-18 20:46:20 +02:00
}
2019-12-27 20:29:22 +01:00
/**
* Start MadelineProto ' s update handling loop , or run the provided async callable .
*
* @ param callable $callback Async callable to run
*
* @ return mixed
*/
public function loop ( $callback = null , array $extra = [])
2019-09-18 20:46:20 +02:00
{
2019-12-27 20:29:22 +01:00
return $this -> __call ( __FUNCTION__ , [ $callback , $extra ]);
2019-09-18 20:46:20 +02:00
}
2019-12-27 20:29:22 +01:00
/**
2020-01-19 15:44:12 +01:00
* Stop update loop .
*
* @ return void
*/
2020-03-06 13:09:52 +01:00
public function stop ( array $extra = [])
2020-01-19 15:44:12 +01:00
{
2020-03-06 13:09:52 +01:00
return $this -> __call ( __FUNCTION__ , [ $extra ]);
2020-01-19 15:44:12 +01:00
}
2020-02-07 21:13:49 +01:00
/**
2020-02-23 19:28:42 +01:00
* Restart update loop .
2020-02-07 21:13:49 +01:00
*
2020-02-23 19:28:42 +01:00
* @ return void
*/
2020-03-06 13:09:52 +01:00
public function restart ( array $extra = [])
2020-02-23 19:28:42 +01:00
{
2020-03-06 13:09:52 +01:00
return $this -> __call ( __FUNCTION__ , [ $extra ]);
2020-02-23 19:28:42 +01:00
}
/**
* Start MadelineProto ' s update handling loop in background .
2020-02-07 21:13:49 +01:00
*
2020-02-23 19:28:42 +01:00
* @ return Promise
2020-02-07 21:13:49 +01:00
*/
2020-02-23 19:28:42 +01:00
public function loopFork ( array $extra = [])
2020-02-07 21:13:49 +01:00
{
2020-02-23 19:28:42 +01:00
return $this -> __call ( __FUNCTION__ , [ $extra ]);
2020-02-07 21:13:49 +01:00
}
2020-01-19 15:44:12 +01:00
/**
* Close connection with client , connected via web .
2019-12-27 20:29:22 +01:00
*
* @ param string $message Message
*
* @ return void
*/
2020-03-06 13:09:52 +01:00
public function closeConnection ( $message = 'OK!' , array $extra = [])
2019-09-18 20:46:20 +02:00
{
2020-03-06 13:09:52 +01:00
return $this -> __call ( __FUNCTION__ , [ $message , $extra ]);
2019-09-18 20:46:20 +02:00
}
2019-12-27 20:29:22 +01:00
/**
* Set NOOP update handler , ignoring all updates .
*
* @ return void
*/
2020-01-19 13:46:49 +01:00
public function setNoop () : void
2019-09-18 20:46:20 +02:00
{
2020-01-19 13:46:49 +01:00
$this -> API -> setNoop ();
2019-09-18 20:46:20 +02:00
}
2019-12-27 20:29:22 +01:00
/**
* Log in to telegram ( via CLI or web ) .
*
* @ return \Generator
*/
2019-09-18 21:45:08 +02:00
public function start ( array $extra = [])
2019-09-18 20:46:20 +02:00
{
2019-09-18 21:45:08 +02:00
return $this -> __call ( __FUNCTION__ , [ $extra ]);
2019-09-18 20:46:20 +02:00
}
2019-12-27 20:29:22 +01:00
/**
* Get web template .
*
* @ return string
*/
2020-01-19 13:46:49 +01:00
public function getWebTemplate () : string
2019-09-18 20:46:20 +02:00
{
2020-01-19 13:46:49 +01:00
return $this -> API -> getWebTemplate ();
2019-09-18 20:46:20 +02:00
}
2019-12-27 20:29:22 +01:00
/**
* Set web template .
*
* @ param string $template Template
*
* @ return void
*/
2020-01-19 13:46:49 +01:00
public function setWebTemplate ( string $template ) : void
2019-09-18 20:46:20 +02:00
{
2020-01-19 13:46:49 +01:00
$this -> API -> setWebTemplate ( $template );
2019-09-18 20:46:20 +02:00
}
2019-10-31 20:48:06 +01:00
/**
* Check for terms of service update .
*
* @ return \Generator
*/
2019-09-18 21:45:08 +02:00
public function checkTos ( array $extra = [])
2019-09-18 20:46:20 +02:00
{
2019-09-18 21:45:08 +02:00
return $this -> __call ( __FUNCTION__ , [ $extra ]);
2019-09-18 20:46:20 +02:00
}
2019-10-31 20:48:06 +01:00
/**
* Accept terms of service update .
*
* @ return \Generator
*/
2019-09-18 21:45:08 +02:00
public function acceptTos ( array $extra = [])
2019-09-18 20:46:20 +02:00
{
2019-09-18 21:45:08 +02:00
return $this -> __call ( __FUNCTION__ , [ $extra ]);
2019-09-18 20:46:20 +02:00
}
2019-10-31 20:48:06 +01:00
/**
* Decline terms of service update .
*
* THIS WILL DELETE YOUR ACCOUNT !
*
* @ return \Generator
*/
2019-09-18 21:45:08 +02:00
public function declineTos ( array $extra = [])
2019-09-18 20:46:20 +02:00
{
2019-09-18 21:45:08 +02:00
return $this -> __call ( __FUNCTION__ , [ $extra ]);
2019-09-18 20:46:20 +02:00
}
2019-09-18 21:32:24 +02:00
}