MadelineProto/src/danog/MadelineProto/InternalDoc.php

5335 lines
156 KiB
PHP
Raw Normal View History

<?php
/**
* This file is automatic generated by build_docs.php file
* and is used only for autocomplete in multiple IDE
* don't modify manually.
*/
2018-02-24 17:54:39 +01:00
namespace danog\MadelineProto;
interface auth
{
/**
2019-09-18 20:46:20 +02:00
* Use phone_login instead
*
2019-09-18 20:46:20 +02:00
* Parameters:
* * `string` **phone_number** - Use phone_login instead
* * `int` **api_id** - Use phone_login instead
* * `string` **api_hash** - Use phone_login instead
* * `CodeSettings` **settings** - You cannot use this method directly, use the phone_login method instead (see https://docs.madelineproto.xyz for more info)
*
* @param array $params Parameters
*
* @return auth.SentCode
*/
2019-09-18 20:46:20 +02:00
public function sendCode($params);
2018-02-24 17:54:39 +01:00
/**
2019-09-18 20:46:20 +02:00
* You cannot use this method directly, use the complete_signup method instead (see https://docs.madelineproto.xyz for more info)
*
* Parameters:
* * `string` **phone_number** - You cannot use this method directly, use the complete_signup method instead (see https://docs.madelineproto.xyz for more info)
* * `string` **phone_code_hash** - You cannot use this method directly, use the complete_signup method instead (see https://docs.madelineproto.xyz for more info)
* * `string` **first_name** - You cannot use this method directly, use the complete_signup method instead (see https://docs.madelineproto.xyz for more info)
* * `string` **last_name** - You cannot use this method directly, use the complete_signup method instead (see https://docs.madelineproto.xyz for more info)
*
* @param array $params Parameters
*
2019-09-18 20:46:20 +02:00
* @return auth.Authorization
*/
2019-09-18 20:46:20 +02:00
public function signUp($params);
2018-02-24 17:54:39 +01:00
/**
2019-09-18 20:46:20 +02:00
* You cannot use this method directly, use the complete_phone_login method instead (see https://docs.madelineproto.xyz for more info)
*
* Parameters:
* * `string` **phone_number** - You cannot use this method directly, use the complete_phone_login method instead (see https://docs.madelineproto.xyz for more info)
* * `string` **phone_code_hash** - You cannot use this method directly, use the complete_phone_login method instead (see https://docs.madelineproto.xyz for more info)
* * `string` **phone_code** - You cannot use this method directly, use the complete_phone_login method instead (see https://docs.madelineproto.xyz for more info)
*
* @param array $params Parameters
*
2019-09-18 20:46:20 +02:00
* @return auth.Authorization
*/
2019-09-18 20:46:20 +02:00
public function signIn($params);
2018-02-24 17:54:39 +01:00
/**
2019-09-18 20:46:20 +02:00
* You cannot use this method directly, use the logout method instead (see https://docs.madelineproto.xyz for more info)
*
* @return bool
*/
public function logOut();
2018-02-24 17:54:39 +01:00
/**
2019-09-18 20:46:20 +02:00
* Delete all logged-in sessions.
*
* @return bool
*/
public function resetAuthorizations();
2018-02-24 17:54:39 +01:00
/**
2019-09-18 20:46:20 +02:00
* You cannot use this method directly, use $MadelineProto->export_authorization() instead, see https://docs.madelineproto.xyz/docs/LOGIN.html
*
* Parameters:
* * `int` **dc_id** - You cannot use this method directly, use $MadelineProto->export_authorization() instead, see https://docs.madelineproto.xyz/docs/LOGIN.html
*
* @param array $params Parameters
*
2019-09-18 20:46:20 +02:00
* @return auth.ExportedAuthorization
*/
2019-09-18 20:46:20 +02:00
public function exportAuthorization($params);
2018-02-24 17:54:39 +01:00
/**
2019-09-18 20:46:20 +02:00
* You cannot use this method directly, use $MadelineProto->import_authorization($authorization) instead, see https://docs.madelineproto.xyz/docs/LOGIN.html
*
2019-09-18 20:46:20 +02:00
* Parameters:
* * `int` **id** - You cannot use this method directly, use $MadelineProto->import_authorization($authorization) instead, see https://docs.madelineproto.xyz/docs/LOGIN.html
* * `bytes` **bytes** - You cannot use this method directly, use $MadelineProto->import_authorization($authorization) instead, see https://docs.madelineproto.xyz/docs/LOGIN.html
*
* @param array $params Parameters
*
* @return auth.Authorization
*/
2019-09-18 20:46:20 +02:00
public function importAuthorization($params);
2018-02-24 17:54:39 +01:00
/**
2019-09-18 20:46:20 +02: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
*
* Parameters:
* * `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
*
* @param array $params Parameters
*
* @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-09-18 20:46:20 +02:00
* You cannot use this method directly, use the bot_login method instead (see https://docs.madelineproto.xyz for more info)
*
* Parameters:
* * `int` **api_id** - You cannot use this method directly, use the bot_login method instead (see https://docs.madelineproto.xyz for more info)
* * `string` **api_hash** - You cannot use this method directly, use the bot_login method instead (see https://docs.madelineproto.xyz for more info)
* * `string` **bot_auth_token** - You cannot use this method directly, use the bot_login method instead (see https://docs.madelineproto.xyz for more info)
*
* @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
/**
2019-09-18 20:46:20 +02:00
* You cannot use this method directly, use the complete_2fa_login method instead (see https://docs.madelineproto.xyz for more info)
2019-06-05 15:38:32 +02:00
*
2019-09-18 20:46:20 +02:00
* Parameters:
* * `InputCheckPasswordSRP` **password** - You cannot use this method directly, use the complete_2fa_login method instead (see https://docs.madelineproto.xyz for more info)
*
* @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-09-18 20:46:20 +02:00
* Send an email to recover the 2FA password
*
* @return auth.PasswordRecovery
2019-06-05 15:38:32 +02:00
*/
public function requestPasswordRecovery();
/**
2019-09-18 20:46:20 +02:00
* Use the code that was emailed to you after running $MadelineProto->auth->requestPasswordRecovery to login to your account
2019-06-05 15:38:32 +02:00
*
2019-09-18 20:46:20 +02:00
* Parameters:
* * `string` **code** - The code that was emailed to you
*
* @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-09-18 20:46:20 +02:00
* Resend the SMS verification code
*
* Parameters:
* * `string` **phone_number** - The phone number
* * `string` **phone_code_hash** - The phone code hash
*
* @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
/**
2019-09-18 20:46:20 +02:00
* Invalidate sent phone code
*
* Parameters:
* * `string` **phone_number** - Phone number
* * `string` **phone_code_hash** - Phone code hash
*
* @param array $params Parameters
*
* @return bool
*/
2019-09-18 20:46:20 +02:00
public function cancelCode($params);
2019-06-05 15:38:32 +02:00
/**
2019-09-18 20:46:20 +02:00
* Delete all temporary authorization keys except the ones provided
*
* Parameters:
* * `[long]` **except_auth_keys** - The temporary authorization keys to keep
*
* @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);
}
2018-02-25 11:17:45 +01:00
interface account
{
/**
2019-09-18 20:46:20 +02:00
* Register device for push notifications
*
* Parameters:
* * `boolean` **no_muted** - Optional: Idk yet
* * `int` **token_type** - Device token type. Possible values: 1 - APNS, 2 - GCM, 3 - MPNS, 4 - Simple Push, 5 - Ubuntu Phone, 6 - Blackberry, and other, see source code of official apps for more info
* * `string` **token** - Device token type. Possible values: 1 - APNS, 2 - GCM, 3 - MPNS, 4 - Simple Push, 5 - Ubuntu Phone,6 - Blackberry, and other, see source code of official apps for more info
* * `Bool` **app_sandbox** - Should the app run in a sandbox?
* * `bytes` **secret** - Secret
* * `[int]` **other_uids** - Other UIDs
*
* @param array $params Parameters
*
* @return bool
*/
2019-09-18 20:46:20 +02:00
public function registerDevice($params);
2018-02-24 17:54:39 +01:00
/**
2019-09-18 20:46:20 +02:00
* Stop sending PUSH notifications to app
*
* Parameters:
* * `int` **token_type** - Device token type. Possible values: 1 - APNS, 2 - GCM, 3 - MPNS, 4 - Simple Push, 5 - Ubuntu Phone,6 - Blackberry, and other, see source code of official apps for more info
* * `string` **token** - Device token type. Possible values: 1 - APNS, 2 - GCM, 3 - MPNS, 4 - Simple Push, 5 - Ubuntu Phone,6 - Blackberry, and other, see source code of official apps for more info
* * `[int]` **other_uids** - Other UIDs
*
* @param array $params Parameters
*
* @return bool
*/
2019-09-18 20:46:20 +02:00
public function unregisterDevice($params);
2018-02-24 17:54:39 +01:00
/**
2019-09-18 20:46:20 +02:00
* Change notification settings
*
* Parameters:
* * `InputNotifyPeer` **peer** - The peers to which the notification settings should be applied
* * `InputPeerNotifySettings` **settings** - Notification settings
*
* @param array $params Parameters
*
* @return bool
*/
2019-09-18 20:46:20 +02:00
public function updateNotifySettings($params);
2018-02-24 17:54:39 +01:00
/**
2019-09-18 20:46:20 +02:00
* Get notification settings
*
* Parameters:
* * `InputNotifyPeer` **peer** - Notification source
*
* @param array $params Parameters
*
* @return PeerNotifySettings
*/
2019-09-18 20:46:20 +02:00
public function getNotifySettings($params);
2018-02-24 17:54:39 +01:00
/**
2019-09-18 20:46:20 +02:00
* Reset all notification settings
*
* @return bool
*/
public function resetNotifySettings();
2018-02-24 17:54:39 +01:00
/**
2019-09-18 20:46:20 +02:00
* Update profile info
*
* Parameters:
* * `string` **first_name** - Optional: The first name
* * `string` **last_name** - Optional: The last name
* * `string` **about** - Optional: The bio/about field
*
* @param array $params Parameters
*
* @return User
*/
2019-09-18 20:46:20 +02:00
public function updateProfile($params);
2018-02-24 17:54:39 +01:00
/**
2019-09-18 20:46:20 +02:00
* Update online status
*
* Parameters:
* * `Bool` **offline** - True to set the status to offline
*
* @param array $params Parameters
*
* @return bool
*/
2019-09-18 20:46:20 +02:00
public function updateStatus($params);
2018-02-24 17:54:39 +01:00
/**
2019-09-18 20:46:20 +02:00
* Returns a list of available wallpapers.
*
* Parameters:
* * `[int]` **hash** - Optional: IDs of previously fetched wallpapers
*
* @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-09-18 20:46:20 +02:00
* Report for spam
*
* Parameters:
* * `InputPeer` **peer** - The peer to report
* * `ReportReason` **reason** - Why are you reporting this peer
*
* @param array $params Parameters
2019-06-05 15:38:32 +02:00
*
* @return bool
*/
2019-09-18 20:46:20 +02:00
public function reportPeer($params);
2018-02-24 17:54:39 +01:00
/**
2019-09-18 20:46:20 +02:00
* Check if this username is available
*
* Parameters:
* * `string` **username** - The username to check
*
* @param array $params Parameters
*
* @return bool
*/
2019-09-18 20:46:20 +02:00
public function checkUsername($params);
2018-02-24 17:54:39 +01:00
/**
2019-09-18 20:46:20 +02:00
* Update this user's username
*
* Parameters:
* * `string` **username** - The new username
*
* @param array $params Parameters
*
* @return User
*/
2019-09-18 20:46:20 +02:00
public function updateUsername($params);
2018-02-24 17:54:39 +01:00
/**
2019-09-18 20:46:20 +02:00
* Get privacy settings
*
* Parameters:
* * `InputPrivacyKey` **key** - Privacy setting key
*
* @param array $params Parameters
*
2019-09-18 20:46:20 +02:00
* @return account.PrivacyRules
*/
2019-09-18 20:46:20 +02:00
public function getPrivacy($params);
2018-02-24 17:54:39 +01:00
/**
2019-09-18 20:46:20 +02:00
* Set privacy settings
*
2019-09-18 20:46:20 +02:00
* Parameters:
* * `InputPrivacyKey` **key** - Privacy setting
* * `[InputPrivacyRule]` **rules** - Privacy settings
*
* @param array $params Parameters
*
* @return account.PrivacyRules
*/
2019-09-18 20:46:20 +02:00
public function setPrivacy($params);
2018-02-24 17:54:39 +01:00
/**
2019-09-18 20:46:20 +02:00
* Delete this account
*
* Parameters:
* * `string` **reason** - Why are you going away? :(
*
* @param array $params Parameters
*
2019-06-05 15:38:32 +02:00
* @return bool
*/
2019-09-18 20:46:20 +02:00
public function deleteAccount($params);
2018-02-24 17:54:39 +01:00
/**
2019-09-18 20:46:20 +02:00
* Get account TTL
*
2019-06-05 15:38:32 +02:00
* @return AccountDaysTTL
*/
2019-06-05 15:38:32 +02:00
public function getAccountTTL();
2018-02-24 17:54:39 +01:00
/**
2019-09-18 20:46:20 +02:00
* Set account TTL
*
* Parameters:
* * `AccountDaysTTL` **ttl** - Time To Live of account
*
* @param array $params Parameters
*
2019-06-05 15:38:32 +02:00
* @return bool
*/
2019-09-18 20:46:20 +02:00
public function setAccountTTL($params);
2018-02-24 17:54:39 +01:00
/**
2019-09-18 20:46:20 +02:00
* Change the phone number
*
* Parameters:
* * `string` **phone_number** - New phone number
* * `CodeSettings` **settings** - Code settings
*
* @param array $params Parameters
*
2019-09-18 20:46:20 +02:00
* @return auth.SentCode
*/
2019-09-18 20:46:20 +02:00
public function sendChangePhoneCode($params);
2018-02-24 17:54:39 +01:00
/**
2019-09-18 20:46:20 +02:00
* Change the phone number associated to this account
*
* Parameters:
* * `string` **phone_number** - Phone number
* * `string` **phone_code_hash** - Phone code hash returned by account.sendChangePhoneCode
* * `string` **phone_code** - The phone code sent by account.sendChangePhoneCode
*
* @param array $params Parameters
*
2019-06-05 15:38:32 +02:00
* @return User
*/
2019-09-18 20:46:20 +02:00
public function changePhone($params);
2018-02-24 17:54:39 +01:00
/**
2019-09-18 20:46:20 +02:00
* Disable all notifications for a certain period
*
* Parameters:
* * `int` **period** - For how long should notifications be disabled
*
* @param array $params Parameters
*
2019-06-05 12:04:36 +02:00
* @return bool
*/
2019-09-18 20:46:20 +02:00
public function updateDeviceLocked($params);
2018-02-24 17:54:39 +01:00
/**
2019-09-18 20:46:20 +02:00
* Get all logged-in authorizations
*
* @return account.Authorizations
*/
2019-06-05 15:38:32 +02:00
public function getAuthorizations();
2018-02-24 17:54:39 +01:00
/**
2019-09-18 20:46:20 +02:00
* Delete a certain session
*
* Parameters:
* * `long` **hash** - The session hash, obtained from $MadelineProto->account->getAuthorizations
*
* @param array $params Parameters
*
2019-06-05 15:38:32 +02:00
* @return bool
*/
2019-09-18 20:46:20 +02:00
public function resetAuthorization($params);
2018-02-24 17:54:39 +01:00
/**
2019-09-18 20:46:20 +02:00
* Get the current password
*
* @return account.Password
*/
2019-06-05 15:38:32 +02:00
public function getPassword();
2018-02-24 17:54:39 +01:00
/**
2019-09-18 20:46:20 +02:00
* Get the current 2FA settings
*
2019-09-18 20:46:20 +02:00
* Parameters:
* * `InputCheckPasswordSRP` **password** - You cannot use this method directly; use $MadelineProto->update_2fa($params), instead (see https://docs.madelineproto.xyz for more info)
*
* @param array $params Parameters
*
* @return account.PasswordSettings
*/
2019-09-18 20:46:20 +02:00
public function getPasswordSettings($params);
2018-02-24 17:54:39 +01:00
/**
2019-09-18 20:46:20 +02:00
* You cannot use this method directly; use $MadelineProto->update_2fa($params), instead (see https://docs.madelineproto.xyz for more info)
*
* Parameters:
* * `InputCheckPasswordSRP` **password** - You cannot use this method directly; use $MadelineProto->update_2fa($params), instead (see https://docs.madelineproto.xyz for more info)
* * `account_PasswordInputSettings` **new_settings** - New 2FA settings
*
* @param array $params Parameters
*
2019-06-05 15:38:32 +02:00
* @return bool
*/
2019-09-18 20:46:20 +02:00
public function updatePasswordSettings($params);
/**
2019-09-18 20:46:20 +02:00
* Send confirmation phone code
*
* Parameters:
* * `string` **hash** - The hash
* * `CodeSettings` **settings** - Code settings
*
* @param array $params Parameters
*
2019-09-18 20:46:20 +02:00
* @return auth.SentCode
*/
2019-09-18 20:46:20 +02:00
public function sendConfirmPhoneCode($params);
/**
2019-09-18 20:46:20 +02:00
* Confirm this phone number is associated to this account, obtain phone_code_hash from sendConfirmPhoneCode
*
* Parameters:
* * `string` **phone_code_hash** - Obtain phone_code_hash from sendConfirmPhoneCode
* * `string` **phone_code** - The code sent by sendConfirmPhoneCode
*
* @param array $params Parameters
*
2019-06-05 15:38:32 +02:00
* @return bool
*/
2019-09-18 20:46:20 +02:00
public function confirmPhone($params);
/**
2019-09-18 20:46:20 +02:00
* Get temporary password for buying products through bots
*
* Parameters:
* * `InputCheckPasswordSRP` **password** - Password
* * `int` **period** - The validity period
*
* @param array $params Parameters
*
2019-09-18 20:46:20 +02:00
* @return account.TmpPassword
*/
2019-09-18 20:46:20 +02:00
public function getTmpPassword($params);
2019-06-05 15:38:32 +02:00
/**
2019-09-18 20:46:20 +02:00
* Get telegram web login authorizations
*
* @return account.WebAuthorizations
2019-06-05 15:38:32 +02:00
*/
public function getWebAuthorizations();
/**
2019-09-18 20:46:20 +02:00
* Delete a certain telegram web login authorization
*
* Parameters:
* * `long` **hash** - The authorization's hash
*
* @param array $params Parameters
*
2019-06-05 15:38:32 +02:00
* @return bool
*/
2019-09-18 20:46:20 +02:00
public function resetWebAuthorization($params);
2019-06-05 15:38:32 +02:00
/**
2019-09-18 20:46:20 +02:00
* Reset all telegram web login authorizations
*
2019-06-05 15:38:32 +02:00
* @return bool
*/
public function resetWebAuthorizations();
/**
2019-09-18 20:46:20 +02:00
* Get all secure telegram passport values
*
* @return _of_SecureValue[]
2019-06-05 15:38:32 +02:00
*/
public function getAllSecureValues();
/**
2019-09-18 20:46:20 +02:00
* Get secure value for telegram passport
*
* Parameters:
* * `[SecureValueType]` **types** - Get telegram passport secure parameters
*
* @param array $params Parameters
*
2019-09-18 20:46:20 +02:00
* @return _of_SecureValue[]
*/
2019-09-18 20:46:20 +02:00
public function getSecureValue($params);
/**
2019-09-18 20:46:20 +02:00
* Save telegram passport secure value
*
* Parameters:
* * `InputSecureValue` **value** - Encrypted value
* * `long` **secure_secret_id** - Secret
*
* @param array $params Parameters
*
2019-06-05 15:38:32 +02:00
* @return SecureValue
*/
2019-09-18 20:46:20 +02:00
public function saveSecureValue($params);
/**
2019-09-18 20:46:20 +02:00
* Delete secure telegram passport value
*
* Parameters:
* * `[SecureValueType]` **types** - The values to delete
*
* @param array $params Parameters
*
2019-06-05 15:38:32 +02:00
* @return bool
*/
2019-09-18 20:46:20 +02:00
public function deleteSecureValue($params);
/**
2019-09-18 20:46:20 +02:00
* Bots only: get telegram passport authorization form
*
* Parameters:
* * `int` **bot_id** - Bot ID
* * `string` **scope** - Scope
* * `string` **public_key** - Bot's public key
*
* @param array $params Parameters
*
2019-09-18 20:46:20 +02:00
* @return account.AuthorizationForm
*/
2019-09-18 20:46:20 +02:00
public function getAuthorizationForm($params);
/**
2019-09-18 20:46:20 +02:00
* Accept telegram passport authorization
*
* Parameters:
* * `int` **bot_id** - Bot ID
* * `string` **scope** - Scope
* * `string` **public_key** - The bot's RSA public key
* * `[SecureValueHash]` **value_hashes** - Hashes of the encrypted credentials
* * `SecureCredentialsEncrypted` **credentials** - Encrypted secure credentials
*
* @param array $params Parameters
*
* @return bool
*/
2019-09-18 20:46:20 +02:00
public function acceptAuthorization($params);
/**
2019-09-18 20:46:20 +02:00
* Send phone verification code
*
2019-09-18 20:46:20 +02:00
* Parameters:
* * `string` **phone_number** - The phone number
* * `CodeSettings` **settings** - Code settings
*
* @param array $params Parameters
*
* @return auth.SentCode
*/
2019-09-18 20:46:20 +02:00
public function sendVerifyPhoneCode($params);
/**
2019-09-18 20:46:20 +02:00
* Verify phone number
*
* Parameters:
* * `string` **phone_number** - The phone number
* * `string` **phone_code_hash** - The phone code hash returned by account.sendVerifyPhoneCode
* * `string` **phone_code** - The phone code type returned by account.sendVerifyPhoneCode
*
* @param array $params Parameters
*
2019-06-05 15:38:32 +02:00
* @return bool
*/
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-09-18 20:46:20 +02:00
* Send email verification code
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
* Parameters:
* * `string` **email** - Email
*
* @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-09-18 20:46:20 +02:00
* Verify email address
*
* Parameters:
* * `string` **email** - The email address
* * `string` **code** - The received code
*
* @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-09-18 20:46:20 +02:00
* Start account exporting session
*
* Parameters:
* * `boolean` **contacts** - Optional: Export contacts?
* * `boolean` **message_users** - Optional: Export users?
* * `boolean` **message_chats** - Optional: Export chats?
* * `boolean` **message_megagroups** - Optional: Export supergroups?
* * `boolean` **message_channels** - Optional: Export channel messages?
* * `boolean` **files** - Optional: Export files?
* * `int` **file_max_size** - Optional: Export only files smaller than this size
*
* @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-09-18 20:46:20 +02:00
* Finish account exporting session
*
* Parameters:
* * `boolean` **success** - Optional: Did the data export succeed?
*
* @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-09-18 20:46:20 +02:00
* Confirm password recovery using email
*
* Parameters:
* * `string` **code** - Code
*
* @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-09-18 20:46:20 +02:00
* Resend password recovery email
*
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-09-18 20:46:20 +02:00
* Cancel password recovery email
*
2019-06-05 15:38:32 +02:00
* @return bool
*/
public function cancelPasswordEmail();
/**
2019-09-18 20:46:20 +02:00
* Contact signup notification setting value
*
2019-06-05 15:38:32 +02:00
* @return bool
*/
public function getContactSignUpNotification();
2019-03-08 14:16:57 +01:00
/**
2019-09-18 20:46:20 +02:00
* Set contact sign up notification
*
* Parameters:
* * `Bool` **silent** - Silent?
*
* @param array $params Parameters
2019-03-08 14:16:57 +01:00
*
2019-06-05 15:38:32 +02:00
* @return bool
*/
2019-09-18 20:46:20 +02:00
public function setContactSignUpNotification($params);
2018-02-24 17:54:39 +01:00
/**
2019-09-18 20:46:20 +02:00
* Get notification exceptions
*
* Parameters:
* * `boolean` **compare_sound** - Optional: Compare sound?
* * `InputNotifyPeer` **peer** - Optional: Peer
*
* @param array $params Parameters
*
2019-06-05 15:38:32 +02:00
* @return Updates
*/
2019-09-18 20:46:20 +02:00
public function getNotifyExceptions($params);
2018-02-24 17:54:39 +01:00
/**
2019-09-18 20:46:20 +02:00
* Get wallpaper info
*
* Parameters:
* * `InputWallPaper` **wallpaper** - Wallpaper
*
* @param array $params Parameters
*
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-09-18 20:46:20 +02:00
* Upload wallpaper
*
* Parameters:
* * `InputFile` **file** - Image
* * `string` **mime_type** - Mime type
* * `WallPaperSettings` **settings** - Wallpaper settings
*
* @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-09-18 20:46:20 +02:00
* Save wallpaper
*
* Parameters:
* * `InputWallPaper` **wallpaper** - The wallpaper to save
* * `Bool` **unsave** - Delete saved wallpaper
* * `WallPaperSettings` **settings** - The wallpaper to save
*
* @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 20:46:20 +02:00
* Install wallpaper
*
* Parameters:
* * `InputWallPaper` **wallpaper** - Wallpaper to install
* * `WallPaperSettings` **settings** - Wallpaper settings
*
* @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-09-18 20:46:20 +02:00
* Reset wallpapers
*
2019-06-05 15:38:32 +02:00
* @return bool
*/
public function resetWallPapers();
/**
2019-09-18 20:46:20 +02:00
* Get autodownload settings
*
* @return account.AutoDownloadSettings
2019-06-05 15:38:32 +02:00
*/
public function getAutoDownloadSettings();
/**
2019-09-18 20:46:20 +02:00
* Save autodownload settings
*
* Parameters:
* * `boolean` **low** - Optional: Low preset
* * `boolean` **high** - Optional: High preset
* * `AutoDownloadSettings` **settings** - Autodownload settings
*
* @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 20:46:20 +02:00
* Upload theme
*
* Parameters:
* * `InputFile` **file** - File
* * `InputFile` **thumb** - Optional: Thumb
* * `string` **file_name** - File name
* * `string` **mime_type** - Mime type
*
* @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 20:46:20 +02:00
* Create a theme
*
* Parameters:
* * `string` **slug** - Unique theme ID
* * `string` **title** - Theme name
* * `InputDocument` **document** - Theme file
*
* @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 20:46:20 +02:00
* Update theme
*
* Parameters:
* * `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
*
* @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-09-18 20:46:20 +02:00
* Save theme
*
* Parameters:
* * `InputTheme` **theme** - Theme to save
* * `Bool` **unsave** - Unsave
*
* @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-09-18 20:46:20 +02:00
* Install theme
*
* Parameters:
* * `boolean` **dark** - Optional: Whether to install the dark version
* * `string` **format** - Optional: Format
* * `InputTheme` **theme** - Optional: Theme to install
*
* @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 20:46:20 +02:00
* Get theme information
*
* Parameters:
* * `string` **format** - Theme format, a string that identifies the theming engines supported by the client
* * `InputTheme` **theme** - Theme
* * `long` **document_id** - Document ID
*
* @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 20:46:20 +02:00
* Get installed themes
2019-09-12 19:08:48 +02:00
*
2019-09-18 20:46:20 +02:00
* Parameters:
* * `string` **format** - Theme format, a string that identifies the theming engines supported by the client
* * `[int]` **hash** - Optional: Hash for pagination
*
* @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);
2019-06-05 15:38:32 +02:00
}
interface users
{
/**
2019-09-18 20:46:20 +02:00
* Get info about users
*
* Parameters:
* * `[InputUser]` **id** - The ids of the users
*
* @param array $params Parameters
2019-06-05 15:38:32 +02:00
*
2019-09-18 20:46:20 +02: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-09-18 20:46:20 +02:00
* You cannot use this method directly, use the get_pwr_chat, get_info, get_full_info methods instead (see https://docs.madelineproto.xyz for more info)
*
* Parameters:
* * `InputUser` **id** - You cannot use this method directly, use the get_pwr_chat, get_info, get_full_info methods instead (see https://docs.madelineproto.xyz for more info)
*
* @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-09-18 20:46:20 +02:00
* Set secure value error for telegram passport
*
* Parameters:
* * `InputUser` **id** - The user ID
* * `[SecureValueError]` **errors** - The errors
*
* @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-09-18 20:46:20 +02:00
* Get contacts by IDs
*
* Parameters:
* * `[int]` **hash** - Optional: Previously fetched IDs
*
* @param array $params Parameters
2019-06-05 15:38:32 +02:00
*
2019-09-18 20:46:20 +02: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-09-18 20:46:20 +02:00
* Get online status of all users
*
* @return _of_ContactStatus[]
2019-06-05 15:38:32 +02:00
*/
public function getStatuses();
/**
2019-09-18 20:46:20 +02:00
* Get all contacts
*
* Parameters:
* * `[int]` **hash** - Optional: User IDs of previously cached contacts
*
* @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-09-18 20:46:20 +02:00
* Add phone number as contact
2019-06-05 15:38:32 +02:00
*
2019-09-18 20:46:20 +02:00
* Parameters:
* * `[InputContact]` **contacts** - The numbers to import
*
* @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-09-18 20:46:20 +02:00
* Delete multiple contacts
*
* Parameters:
* * `[InputUser]` **id** - The contacts to delete
*
* @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-09-18 20:46:20 +02:00
* Delete contacts by phones
*
* Parameters:
* * `[string]` **phones** - Phones
*
* @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-09-18 20:46:20 +02:00
* Block a user
*
* Parameters:
* * `InputUser` **id** - The user to block
*
* @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-09-18 20:46:20 +02:00
* Unblock a user
*
* Parameters:
* * `InputUser` **id** - The user to unblock
*
* @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-09-18 20:46:20 +02:00
* Get blocked users
*
* Parameters:
* * `int` **offset** - Initially 0, then set to the number of blocked contacts previously fetched
* * `int` **limit** - How many blocked contacts to fetch
*
* @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-09-18 20:46:20 +02:00
* Search contacts
2019-06-05 15:38:32 +02:00
*
2019-09-18 20:46:20 +02:00
* Parameters:
* * `string` **q** - The search query
* * `int` **limit** - How many results should be returned
*
* @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-09-18 20:46:20 +02:00
* You cannot use this method directly, use the resolve_username, get_pwr_chat, get_info, get_full_info methods instead (see https://docs.madelineproto.xyz for more info)
*
* Parameters:
* * `string` **username** - You cannot use this method directly, use the resolve_username, get_pwr_chat, get_info, get_full_info methods instead (see https://docs.madelineproto.xyz for more info)
*
* @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-09-18 20:46:20 +02:00
* Get most used chats
*
* Parameters:
* * `boolean` **correspondents** - Optional: Fetch users?
* * `boolean` **bots_pm** - Optional: Fetch bots?
* * `boolean` **bots_inline** - Optional: Fetch inline bots?
* * `boolean` **phone_calls** - Optional: Fetch phone calls?
* * `boolean` **forward_users** - Optional: Forward users?
* * `boolean` **forward_chats** - Optional: Forward chats?
* * `boolean` **groups** - Optional: Fetch groups?
* * `boolean` **channels** - Optional: Fetch channels and supergroups?
* * `int` **offset** - Initially 0, then `$offset += $contacts_TopPeers['categories']['count'];`
* * `int` **limit** - How many results to fetch
* * `[int]` **hash** - Optional: Peer IDs of previously cached peers
*
* @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-09-18 20:46:20 +02:00
* Reset top peer rating for a certain category/peer
*
* Parameters:
* * `TopPeerCategory` **category** - The category
* * `InputPeer` **peer** - The peer
*
* @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-09-18 20:46:20 +02:00
* Reset saved contacts
*
2019-06-05 15:38:32 +02:00
* @return bool
*/
public function resetSaved();
/**
2019-09-18 20:46:20 +02:00
* Get saved contacts
*
* @return _of_SavedContact[]
2019-06-05 15:38:32 +02:00
*/
public function getSaved();
/**
2019-09-18 20:46:20 +02:00
* Toggle top peers
*
* Parameters:
* * `Bool` **enabled** - Enable or disable top peer
*
* @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-09-18 20:46:20 +02:00
* Add contact
*
* Parameters:
* * `boolean` **add_phone_privacy_exception** - Optional: Phone privacy exception?
* * `InputUser` **id** - ID
* * `string` **first_name** - First name
* * `string` **last_name** - Last name
* * `string` **phone** - Phone number
*
* @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-09-18 20:46:20 +02:00
* Accept contact
*
* Parameters:
* * `InputUser` **id** - ID
*
* @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-09-18 20:46:20 +02:00
* Get people nearby (geochats)
*
* Parameters:
* * `InputGeoPoint` **geo_point** - Current location
*
* @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-09-18 20:46:20 +02:00
* Get messages
2019-06-05 15:38:32 +02:00
*
2019-09-18 20:46:20 +02:00
* Parameters:
* * `[InputMessage]` **id** - The IDs of messages to fetch (only for users and normal groups)
*
* @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-09-18 20:46:20 +02:00
* Gets list of chats: you should use $MadelineProto->get_dialogs() instead: https://docs.madelineproto.xyz/docs/DIALOGS.html
*
* Parameters:
* * `boolean` **exclude_pinned** - Optional: Do not fetch pinned chats
* * `int` **folder_id** - Optional: Folder ID
* * `int` **offset_date** - End($res['messages'])['date'];
* * `int` **offset_id** - End($res['messages'])['id'];
* * `InputPeer` **offset_peer** - End($res['dialogs'])['peer'];
* * `int` **limit** - Number of dialogs to fetch
* * `[int]` **hash** - Optional: IDs of previously fetched dialogs
*
* @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-09-18 20:46:20 +02:00
* Get previous messages of a group
*
* Parameters:
* * `InputPeer` **peer** - The chat
* * `int` **offset_id** - The last fetched message ID, initially 0
* * `int` **offset_date** - The date of the last previously fetched message, initially 0
* * `int` **add_offset** - Additional offset, can be 0
* * `int` **limit** - Number of messages to fetch
* * `int` **max_id** - Maximum message ID to fetch
* * `int` **min_id** - Minumum message ID to fetch
* * `[int]` **hash** - Optional: IDs of messages you already fetched
*
* @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-09-18 20:46:20 +02:00
* Search peers or messages
2019-06-05 15:38:32 +02:00
*
2019-09-18 20:46:20 +02:00
* Parameters:
* * `InputPeer` **peer** - Where to search
* * `string` **q** - What to search
* * `InputUser` **from_id** - Optional: Show only messages from a certain user?
* * `MessagesFilter` **filter** - Message filter
* * `int` **min_date** - Minumum date of results to fetch
* * `int` **max_date** - Maximum date of results to fetch
* * `int` **offset_id** - Message ID offset
* * `int` **add_offset** - Additional offset, can be 0
* * `int` **limit** - Number of results to return
* * `int` **max_id** - Maximum message id to return
* * `int` **min_id** - Minumum message id to return
* * `[int]` **hash** - Optional: The IDs of messages you already fetched
*
* @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-09-18 20:46:20 +02:00
* Mark messages as read
*
* Parameters:
* * `InputPeer` **peer** - Where to mark messages as read
* * `int` **max_id** - Maximum message ID to mark as read
*
* @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-09-18 20:46:20 +02:00
* Delete chat history
2019-06-05 15:38:32 +02:00
*
2019-09-18 20:46:20 +02:00
* Parameters:
* * `boolean` **just_clear** - Optional: Only clear it from your side
* * `boolean` **revoke** - Optional: Delete messages for the other user
* * `InputPeer` **peer** - Where to clear it
* * `int` **max_id** - Maximum message id of messages to delete
*
* @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-09-18 20:46:20 +02:00
* Delete messages
*
* Parameters:
* * `boolean` **revoke** - Optional: Delete the messages for everyone?
* * `[int]` **id** - IDs of messages to delete, use channels->deleteMessages for supergroups
*
* @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-09-18 20:46:20 +02:00
* Mark messages as read
*
* Parameters:
* * `int` **max_id** - Maximum message id of messages to mark as read
*
* @param array $params Parameters
2019-06-05 15:38:32 +02:00
*
2019-09-18 20:46:20 +02: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-09-18 20:46:20 +02:00
* Change typing status
*
* Parameters:
* * `InputPeer` **peer** - Where to change typing status
* * `SendMessageAction` **action** - Typing status
*
* @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-09-18 20:46:20 +02:00
* Send a message
*
* Parameters:
* * `boolean` **no_webpage** - Optional: Disable webpage preview?
* * `boolean` **silent** - Optional: Disable notifications?
* * `boolean` **background** - Optional: Disable background notifications?
* * `boolean` **clear_draft** - Optional: Clear the message draft of this chat?
* * `InputPeer` **peer** - The chat where to send this message
* * `int` **reply_to_msg_id** - Optional: Reply to message by ID
* * `string` **message** - The message to send
* * `ReplyMarkup` **reply_markup** - Optional: Keyboards to send
* * `[MessageEntity]` **entities** - Optional: Entities to send (for styled text)
* * `int` **schedule_date** - Optional: Schedule date
*
* @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 20:46:20 +02:00
* Send a media
*
* Parameters:
* * `boolean` **silent** - Optional: Disable notifications?
* * `boolean` **background** - Optional: Disable background notifications?
* * `boolean` **clear_draft** - Optional: Clear the message draft of this chat?
* * `InputPeer` **peer** - Where to send the media
* * `int` **reply_to_msg_id** - Optional: Reply to message by ID
* * `InputMedia` **media** - The media to send
* * `string` **message** - The caption
* * `ReplyMarkup` **reply_markup** - Optional: Keyboards to send
* * `[MessageEntity]` **entities** - Optional: Entities for styled text
* * `int` **schedule_date** - Optional: Schedule date
*
* @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-09-18 20:46:20 +02:00
* Forward messages
*
* Parameters:
* * `boolean` **silent** - Optional: Disable notifications
* * `boolean` **background** - Optional: Disable background notifications
* * `boolean` **with_my_score** - Optional: If forwarding a game, forward your score, too
* * `boolean` **grouped** - Optional: Set to true if forwarding albums
* * `InputPeer` **from_peer** - From where to forward the messages
* * `[int]` **id** - The message IDs
* * `InputPeer` **to_peer** - Where to forward the messages
* * `int` **schedule_date** - Optional: Schedule date
*
* @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-09-18 20:46:20 +02:00
* Report a peer for spam
*
* Parameters:
* * `InputPeer` **peer** - The peer to report
*
* @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-09-18 20:46:20 +02:00
* Get the settings of apeer
*
* Parameters:
* * `InputPeer` **peer** - The peer
*
* @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-09-18 20:46:20 +02:00
* Report a message
*
* Parameters:
* * `InputPeer` **peer** - The user that sent the messages
* * `[int]` **id** - The messages to report
* * `ReportReason` **reason** - The reason why you're sending this report
*
* @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-09-18 20:46:20 +02:00
* Get info about chats
*
* Parameters:
* * `[int]` **id** - The MTProto IDs of chats to fetch info about
*
* @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-09-18 20:46:20 +02:00
* You cannot use this method directly, use the get_pwr_chat, get_info, get_full_info methods instead (see https://docs.madelineproto.xyz for more info)
2019-06-05 15:38:32 +02:00
*
2019-09-18 20:46:20 +02:00
* Parameters:
* * `InputPeer` **chat_id** - You cannot use this method directly, use the get_pwr_chat, get_info, get_full_info methods instead (see https://docs.madelineproto.xyz for more info)
*
* @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-09-18 20:46:20 +02:00
* Edit the title of a normal chat (not supergroup)
*
* Parameters:
* * `InputPeer` **chat_id** - The ID of the chat
* * `string` **title** - The new title
*
* @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-09-18 20:46:20 +02:00
* Edit the photo of a normal chat (not supergroup)
*
* Parameters:
* * `InputPeer` **chat_id** - The ID of the chat
* * `InputChatPhoto` **photo** - The new phto
*
* @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-09-18 20:46:20 +02:00
* Add a user to a normal chat (use channels->inviteToChannel for supergroups)
*
* Parameters:
* * `InputPeer` **chat_id** - The chat where to invite users
* * `InputUser` **user_id** - The user to invite
* * `int` **fwd_limit** - Number of old messages the user will see
*
* @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-09-18 20:46:20 +02:00
* Delete a user from a chat (not supergroup)
*
* Parameters:
* * `InputPeer` **chat_id** - The ID of the chat
* * `InputUser` **user_id** - The user to delete (pass @me to leave the chat)
*
* @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-09-18 20:46:20 +02:00
* Create a chat (not supergroup)
*
* Parameters:
* * `[InputUser]` **users** - The users to add to the chat
* * `string` **title** - The new chat's title
*
* @param array $params Parameters
2019-06-05 15:38:32 +02:00
*
* @return Updates
*/
2019-09-18 20:46:20 +02:00
public function createChat($params);
2018-02-24 17:54:39 +01:00
/**
2019-09-18 20:46:20 +02:00
* You cannot use this method directly, instead use $MadelineProto->get_dh_config();
*
* Parameters:
* * `int` **version** - You cannot use this method directly, instead use $MadelineProto->get_dh_config();
* * `int` **random_length** - You cannot use this method directly, instead use $MadelineProto->get_dh_config();
*
* @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-09-18 20:46:20 +02:00
* You cannot use this method directly, see https://docs.madelineproto.xyz for more info on handling secret chats
*
* Parameters:
* * `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
*
* @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-09-18 20:46:20 +02:00
* You cannot use this method directly, see https://docs.madelineproto.xyz for more info on handling secret chats
*
* Parameters:
* * `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
*
* @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-09-18 20:46:20 +02:00
* You cannot use this method directly, see https://docs.madelineproto.xyz for more info on handling secret chats
*
* Parameters:
* * `int` **chat_id** - You cannot use this method directly, see https://docs.madelineproto.xyz for more info on handling secret chats
*
* @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-09-18 20:46:20 +02:00
* Send typing notification to secret chat
*
* Parameters:
* * `InputEncryptedChat` **peer** - The secret chat where to send the notification
* * `Bool` **typing** - Set to true to enable the notification, false to disable it
*
* @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-09-18 20:46:20 +02:00
* Mark messages as read in secret chats
*
* Parameters:
* * `InputEncryptedChat` **peer** - The secret chat where to mark messages as read
* * `int` **max_date** - Maximum date of messages to mark
*
* @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-09-18 20:46:20 +02:00
* Send message to secret chat
*
* Parameters:
* * `InputEncryptedChat` **peer** - The chat where to send the message
* * `DecryptedMessage` **message** - The message to send
*
* @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-09-18 20:46:20 +02:00
* Send a file to a secret chat
2019-06-05 15:38:32 +02:00
*
2019-09-18 20:46:20 +02:00
* Parameters:
* * `InputEncryptedChat` **peer** - The chat where to send the file
* * `DecryptedMessage` **message** - The message with the file
* * `InputEncryptedFile` **file** - The file (optional)
*
* @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-09-18 20:46:20 +02:00
* Send a service message to a secret chat
*
* Parameters:
* * `InputEncryptedChat` **peer** - The chat where to send the service message
* * `DecryptedMessage` **message** - The service message
*
* @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-09-18 20:46:20 +02:00
* You cannot use this method directly
*
* Parameters:
* * `int` **max_qts** - You cannot use this method directly
*
* @param array $params Parameters
2019-06-05 15:38:32 +02:00
*
2019-09-18 20:46:20 +02: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-09-18 20:46:20 +02:00
* Report for spam a secret chat
*
* Parameters:
* * `InputEncryptedChat` **peer** - The chat to report
*
* @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-09-18 20:46:20 +02:00
* Mark message as read
*
* Parameters:
* * `[int]` **id** - The messages to mark as read (only users and normal chats, not supergroups)
*
* @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-09-18 20:46:20 +02:00
* Get stickers
*
* Parameters:
* * `string` **emoticon** - Search by emoji
* * `[int]` **hash** - Optional: the hash parameter of the previous result of this method
*
* @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-09-18 20:46:20 +02:00
* Get all stickerpacks
2019-06-05 15:38:32 +02:00
*
2019-09-18 20:46:20 +02:00
* Parameters:
* * `[int]` **hash** - Optional: The hash parameter of the previous result of this method
*
* @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-09-18 20:46:20 +02:00
* Get webpage preview
*
* Parameters:
* * `string` **message** - Extract preview from this message
* * `[MessageEntity]` **entities** - Optional: Entities for styled text
*
* @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-09-18 20:46:20 +02:00
* Export chat invite
*
* Parameters:
* * `InputPeer` **peer** - Export invite only for this user
*
* @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-09-18 20:46:20 +02:00
* Check if an invitation link is valid
*
* Parameters:
* * `string` **hash** - The invite link in t.me/joinchat/aflakf format
*
* @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-09-18 20:46:20 +02:00
* Import chat invite
*
* Parameters:
* * `string` **hash** - The invite link in t.me/joinchat/aflakf format
*
* @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-09-18 20:46:20 +02:00
* Get a stickerset
2019-06-05 15:38:32 +02:00
*
2019-09-18 20:46:20 +02:00
* Parameters:
* * `InputStickerSet` **stickerset** - The stickerset to get
*
* @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-09-18 20:46:20 +02:00
* Add a sticker set
*
* Parameters:
* * `InputStickerSet` **stickerset** - The sticker set to add
* * `Bool` **archived** - Archive this set?
*
* @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-09-18 20:46:20 +02:00
* Remove a sticker set
*
* Parameters:
* * `InputStickerSet` **stickerset** - The sticker set to remove
*
* @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-09-18 20:46:20 +02:00
* Start a bot
*
* Parameters:
* * `InputUser` **bot** - The bot's ID or username
* * `InputPeer` **peer** - Where to start the bot (@me or group ID/username)
* * `string` **start_param** - The bot's start parameter
*
* @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-09-18 20:46:20 +02:00
* Get and increase message views
*
* Parameters:
* * `InputPeer` **peer** - The chat where the message is located
* * `[int]` **id** - The IDs messages to get
* * `Bool` **increment** - Increase message views?
*
* @param array $params Parameters
2019-06-05 15:38:32 +02:00
*
2019-09-18 20:46:20 +02: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-09-18 20:46:20 +02:00
* Edit admin permissions
*
* Parameters:
* * `InputPeer` **chat_id** - The chat ID (no supergroups)
* * `InputUser` **user_id** - The user ID
* * `Bool` **is_admin** - Should the user be admin?
*
* @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-09-18 20:46:20 +02:00
* Convert chat to supergroup
*
* Parameters:
* * `InputPeer` **chat_id** - The chat to convert
*
* @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-09-18 20:46:20 +02:00
* Global message search
2019-06-05 15:38:32 +02:00
*
2019-09-18 20:46:20 +02:00
* Parameters:
* * `int` **folder_id** - Optional: Folder ID
* * `string` **q** - The query
* * `int` **offset_rate** - Offset rate
* * `InputPeer` **offset_peer** - 0 or the peer offset
* * `int` **offset_id** - 0 or the message ID offset
* * `int` **limit** - The number of results to return
*
* @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-09-18 20:46:20 +02:00
* Reorder sticker sets
*
* Parameters:
* * `boolean` **masks** - Optional: Reorder masks?
* * `[long]` **order** - The order
*
* @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-09-18 20:46:20 +02:00
* Get document by SHA256 hash
*
* Parameters:
* * `bytes` **sha256** - `hash('sha256', $filename, true);`
* * `int` **size** - The file size
* * `string` **mime_type** - The mime type of the file
*
* @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-09-18 20:46:20 +02:00
* Search gifs
2019-06-05 15:38:32 +02:00
*
2019-09-18 20:46:20 +02:00
* Parameters:
* * `string` **q** - The search query
* * `int` **offset** - The offset
*
* @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-09-18 20:46:20 +02:00
* Get saved gifs
*
* Parameters:
* * `[int]` **hash** - Optional: the hash parameter of the previous result of this method
*
* @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-09-18 20:46:20 +02:00
* Save a GIF
*
* Parameters:
* * `InputDocument` **id** - The GIF to save
* * `Bool` **unsave** - Remove the gif?
*
* @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-09-18 20:46:20 +02:00
* Call inline bot
*
* Parameters:
* * `InputUser` **bot** - The bot to call
* * `InputPeer` **peer** - The chat where to call the bot
* * `InputGeoPoint` **geo_point** - Optional: The current location
* * `string` **query** - The query to send to the bot
* * `string` **offset** - The offset to send to the bot
*
* @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-09-18 20:46:20 +02:00
* Bots only: set the results of an inline query
*
* Parameters:
* * `boolean` **gallery** - Optional: Is this a gallery?
* * `boolean` **private** - Optional: Is this result private (not cached)?
* * `long` **query_id** - Query ID
* * `[InputBotInlineResult]` **results** - Results
* * `int` **cache_time** - Cache time
* * `string` **next_offset** - Optional: The next offset
* * `InlineBotSwitchPM` **switch_pm** - Optional: Switch to PM?
*
* @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-09-18 20:46:20 +02:00
* Send inline bot result obtained with messages.getInlineBotResults to the chat
*
* Parameters:
* * `boolean` **silent** - Optional: Disable notifications?
* * `boolean` **background** - Optional: Disable background notifications?
* * `boolean` **clear_draft** - Optional: Clear the message draft?
* * `boolean` **hide_via** - Optional: Hide "via @bot"
* * `InputPeer` **peer** - Where to send the message
* * `int` **reply_to_msg_id** - Optional: Reply to message by ID
* * `long` **query_id** - The inline query ID
* * `string` **id** - The ID of one of the inline results
* * `int` **schedule_date** - Optional: Schedule date
*
* @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-09-18 20:46:20 +02:00
* Check if about to edit a message or a media caption
*
* Parameters:
* * `InputPeer` **peer** - The chat
* * `int` **id** - The message ID
*
* @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-09-18 20:46:20 +02:00
* Edit a message
*
* Parameters:
* * `boolean` **no_webpage** - Optional: Disable webpage preview
* * `InputPeer` **peer** - The chat
* * `int` **id** - The message ID
* * `string` **message** - Optional: The new message
* * `InputMedia` **media** - Optional: The media to substitute
* * `ReplyMarkup` **reply_markup** - Optional: The new keyboard
* * `[MessageEntity]` **entities** - Optional: The new entities (for styled text)
* * `int` **schedule_date** - Optional: Schedule date
*
* @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-09-18 20:46:20 +02:00
* Edit a sent inline message
*
* Parameters:
* * `boolean` **no_webpage** - Optional: Disable webpage preview
* * `InputBotInlineMessageID` **id** - The message ID
* * `string` **message** - Optional: The new message
* * `InputMedia` **media** - Optional: The media to substitute
* * `ReplyMarkup` **reply_markup** - Optional: The new keyboard
* * `[MessageEntity]` **entities** - Optional: The new entities (for styled text)
*
* @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-09-18 20:46:20 +02:00
* Get the callback answer of a bot (after clicking a button)
*
* Parameters:
* * `boolean` **game** - Optional: Is this a game?
* * `InputPeer` **peer** - The chat
* * `int` **msg_id** - The message ID
* * `bytes` **data** - Optional: The data to send to the bot
*
* @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-09-18 20:46:20 +02:00
* Bots only: set the callback answer (after a button was clicked)
*
* Parameters:
* * `boolean` **alert** - Optional: Is this an alert?
* * `long` **query_id** - The query ID
* * `string` **message** - Optional: The message
* * `string` **url** - Optional: The URL
* * `int` **cache_time** - Cache time
*
* @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-09-18 20:46:20 +02:00
* Get dialog info of peers
*
* Parameters:
* * `[InputDialogPeer]` **peers** - The peers
*
* @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-09-18 20:46:20 +02:00
* Save a message draft
*
* Parameters:
* * `boolean` **no_webpage** - Optional: Disable webpage preview
* * `int` **reply_to_msg_id** - Optional: Reply to message by ID
* * `InputPeer` **peer** - The chat
* * `string` **message** - The message
* * `[MessageEntity]` **entities** - Optional: The entities (for styled text)
*
* @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-09-18 20:46:20 +02:00
* Get all message drafts
*
2019-06-05 15:38:32 +02:00
* @return Updates
*/
public function getAllDrafts();
/**
2019-09-18 20:46:20 +02:00
* Get featured stickers
*
* Parameters:
* * `[int]` **hash** - Optional: the hash parameter of the previous result of this method
*
* @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 20:46:20 +02:00
* Mark new featured stickers as read
*
* Parameters:
* * `[long]` **id** - The stickers to mark as read
*
* @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 20:46:20 +02:00
* Get recent stickers
*
* Parameters:
* * `boolean` **attached** - Optional: Get stickers attached to image?
* * `[int]` **hash** - Optional: IDs the hash parameter of the previous result of this method
*
* @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-09-18 20:46:20 +02:00
* Add a sticker to recent stickers
*
* Parameters:
* * `boolean` **attached** - Optional: Get stickers attached to image?
* * `InputDocument` **id** - The sticker
* * `Bool` **unsave** - Remove the sticker from recent stickers?
*
* @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-09-18 20:46:20 +02:00
* Clear all recent stickers
*
* Parameters:
* * `boolean` **attached** - Optional: Clear recent stickers attached to images?
*
* @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 20:46:20 +02:00
* Get all archived stickers
*
* Parameters:
* * `boolean` **masks** - Optional: Get masks?
* * `long` **offset_id** - Sticker ID offset
* * `int` **limit** - Number of stickers to fetch
*
* @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-09-18 20:46:20 +02:00
* Get masks
2019-06-05 15:38:32 +02:00
*
2019-09-18 20:46:20 +02:00
* Parameters:
* * `[int]` **hash** - Optional: the hash parameter of the previous result of this method
*
* @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-09-18 20:46:20 +02:00
* Get stickers attachable to images
*
* Parameters:
* * `InputStickeredMedia` **media** - The stickered media
*
* @param array $params Parameters
2019-06-05 15:38:32 +02:00
*
2019-09-18 20:46:20 +02: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-09-18 20:46:20 +02:00
* Set the game score
*
* Parameters:
* * `boolean` **edit_message** - Optional: Should the message with the game be edited?
* * `boolean` **force** - Optional: Force setting the game score
* * `InputPeer` **peer** - The chat where the game was sent
* * `int` **id** - The message ID
* * `InputUser` **user_id** - The user that set the score
* * `int` **score** - The score
*
* @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-09-18 20:46:20 +02:00
* Set the game score of an inline message
*
* Parameters:
* * `boolean` **edit_message** - Optional: Should the message with the game be edited?
* * `boolean` **force** - Optional: Force setting the game score
* * `InputBotInlineMessageID` **id** - The ID of the inline message
* * `InputUser` **user_id** - The user that set the score
* * `int` **score** - The score
*
* @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-09-18 20:46:20 +02:00
* Get high scores of a game
*
* Parameters:
* * `InputPeer` **peer** - The chat
* * `int` **id** - The message ID
* * `InputUser` **user_id** - The user that set the high scores
*
* @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-09-18 20:46:20 +02:00
* Get high scores of a game sent in an inline message
*
* Parameters:
* * `InputBotInlineMessageID` **id** - The inline message
* * `InputUser` **user_id** - The user that set the high scores
*
* @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 20:46:20 +02:00
* Get chats in common with a user
2019-06-05 15:38:32 +02:00
*
2019-09-18 20:46:20 +02:00
* Parameters:
* * `InputUser` **user_id** - The user
* * `int` **max_id** - The maximum chat ID to fetch
* * `int` **limit** - Number of results to fetch
*
* @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-09-18 20:46:20 +02:00
* Get all chats (not supergroups or channels)
*
* Parameters:
* * `[int]` **except_ids** - Do not fetch these chats (MTProto id)
*
* @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-09-18 20:46:20 +02:00
* Get webpage preview
*
* Parameters:
* * `string` **url** - URL
* * `[int]` **hash** - Optional: the hash parameter of the previous result of this method
*
* @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-09-18 20:46:20 +02:00
* Pin or unpin dialog
*
* Parameters:
* * `boolean` **pinned** - Optional: Pin or unpin the dialog?
* * `InputDialogPeer` **peer** - The dialog to pin
*
* @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 20:46:20 +02:00
* Reorder pinned dialogs
*
* Parameters:
* * `boolean` **force** - Optional: Force reordering
* * `int` **folder_id** - Folder ID
* * `[InputDialogPeer]` **order** - New order
*
* @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 20:46:20 +02:00
* Get pinned dialogs
2019-06-23 13:08:44 +02:00
*
2019-09-18 20:46:20 +02:00
* Parameters:
* * `int` **folder_id** - Folder ID
*
* @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-09-18 20:46:20 +02:00
* Bots only: set shipping results
*
* Parameters:
* * `long` **query_id** - Query ID
* * `string` **error** - Optional: Error
* * `[ShippingOption]` **shipping_options** - Optional: Shipping options
*
* @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-09-18 20:46:20 +02:00
* Bots only: set precheckout results
*
* Parameters:
* * `boolean` **success** - Optional: Success?
* * `long` **query_id** - Query ID
* * `string` **error** - Optional: Error
*
* @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-09-18 20:46:20 +02:00
* Upload a file without sending it to anyone
*
* Parameters:
* * `InputPeer` **peer** - Nothing
* * `InputMedia` **media** - The media to upload
*
* @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-09-18 20:46:20 +02:00
* Send screenshot notification
*
* Parameters:
* * `InputPeer` **peer** - Where to send the notification
* * `int` **reply_to_msg_id** - Reply to message by ID
*
* @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-09-18 20:46:20 +02:00
* Get favorite stickers
2019-06-05 15:38:32 +02:00
*
2019-09-18 20:46:20 +02:00
* Parameters:
* * `[int]` **hash** - Optional: the hash parameter of the previous result of this method
*
* @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-09-18 20:46:20 +02:00
* Add a sticker to favorites
*
* Parameters:
* * `InputDocument` **id** - The sticker to add to favorites
* * `Bool` **unfave** - Remove it from favorites?
*
* @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-09-18 20:46:20 +02:00
* Get unread mentions
2019-06-05 15:38:32 +02:00
*
2019-09-18 20:46:20 +02:00
* Parameters:
* * `InputPeer` **peer** - The chat where to get unread mentions
* * `int` **offset_id** - The offset
* * `int` **add_offset** - The additional offset
* * `int` **limit** - The number of results to fetch
* * `int` **max_id** - The maximum message ID to fetch
* * `int` **min_id** - The minumum message ID to fetch
*
* @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 20:46:20 +02:00
* Mark mentions as read
*
* Parameters:
* * `InputPeer` **peer** - The chat
*
* @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-09-18 20:46:20 +02:00
* Get recent locations
*
* Parameters:
* * `InputPeer` **peer** - The chat where to search locations
* * `int` **limit** - Number of results to return
* * `[int]` **hash** - Optional: IDs of locations you already fetched
*
* @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-09-18 20:46:20 +02:00
* Send an album
*
* Parameters:
* * `boolean` **silent** - Optional: Disable notifications?
* * `boolean` **background** - Optional: Disable background notification?
* * `boolean` **clear_draft** - Optional: Clear draft?
* * `InputPeer` **peer** - Where to send the album
* * `int` **reply_to_msg_id** - Optional: Reply to message by ID
* * `[InputSingleMedia]` **multi_media** - The album
* * `int` **schedule_date** - Optional: Schedule date
*
* @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-09-18 20:46:20 +02:00
* Upload a secret chat file without sending it to anyone
*
* Parameters:
* * `InputEncryptedChat` **peer** - The chat where to upload the media
* * `InputEncryptedFile` **file** - The file
*
* @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-09-18 20:46:20 +02:00
* Find a sticker set
*
* Parameters:
* * `boolean` **exclude_featured** - Optional: Exclude featured sticker sets from the search?
* * `string` **q** - The search query
* * `[int]` **hash** - Optional: The IDs of stickersets you already fetched
*
* @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-09-18 20:46:20 +02:00
* Get message ranges to fetch
*
* @return _of_MessageRange[]
2019-06-05 15:38:32 +02:00
*/
public function getSplitRanges();
/**
2019-09-18 20:46:20 +02:00
* Mark dialog as unread
*
* Parameters:
* * `boolean` **unread** - Optional: Should it be marked or unmarked as read
* * `InputDialogPeer` **peer** - The dialog to mark as unread
*
* @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-09-18 20:46:20 +02:00
* Get dialogs marked as unread manually
*
* @return _of_DialogPeer[]
2019-06-05 15:38:32 +02:00
*/
public function getDialogUnreadMarks();
/**
2019-09-18 20:46:20 +02:00
* Clear all drafts
*
2019-06-05 15:38:32 +02:00
* @return bool
*/
public function clearAllDrafts();
/**
2019-09-18 20:46:20 +02:00
* Update pinned message
*
* Parameters:
* * `boolean` **silent** - Optional: Silent?
* * `InputPeer` **peer** - Peer
* * `int` **id** - Message ID
*
* @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-09-18 20:46:20 +02:00
* Send vote
*
* Parameters:
* * `InputPeer` **peer** - Peer
* * `int` **msg_id** - Message ID
* * `[bytes]` **options** - Options
*
* @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 20:46:20 +02:00
* Get poll results
*
* Parameters:
* * `InputPeer` **peer** - Peer
* * `int` **msg_id** - Message ID
*
* @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-09-18 20:46:20 +02:00
* Get online users
*
* Parameters:
* * `InputPeer` **peer** - Peer
*
* @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-09-18 20:46:20 +02:00
* Get stats URL
*
* Parameters:
* * `boolean` **dark** - Optional: Dark?
* * `InputPeer` **peer** - Peer
* * `string` **params** - Params
*
* @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-09-18 20:46:20 +02:00
* Edit chat info
*
* Parameters:
* * `InputPeer` **peer** - Chat
* * `string` **about** - Info
*
* @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-09-18 20:46:20 +02:00
* Edit default rights of chat
*
* Parameters:
* * `InputPeer` **peer** - Chat
* * `ChatBannedRights` **banned_rights** - Global chat rights
*
* @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-09-18 20:46:20 +02:00
* Get emoji keywords
*
* Parameters:
* * `string` **lang_code** - Language code
*
* @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-09-18 20:46:20 +02:00
* Get emoji keyword difference
*
* Parameters:
* * `string` **lang_code** - Language code
* * `int` **from_version** - From version
*
* @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-09-18 20:46:20 +02:00
* Get emoji keyword languages
2019-06-23 13:08:44 +02:00
*
2019-09-18 20:46:20 +02:00
* Parameters:
* * `[string]` **lang_codes** - Language codes
*
* @param array $params Parameters
*
* @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-09-18 20:46:20 +02:00
* Get emoji URL
*
* Parameters:
* * `string` **lang_code** - Language code
*
* @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-09-18 20:46:20 +02:00
* Get search counter
2019-06-23 13:08:44 +02:00
*
2019-09-18 20:46:20 +02:00
* Parameters:
* * `InputPeer` **peer** - Peer
* * `[MessagesFilter]` **filters** - Filters
*
* @param array $params Parameters
*
* @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-09-18 20:46:20 +02:00
* Request URL authorization
*
* Parameters:
* * `InputPeer` **peer** - Peer
* * `int` **msg_id** - Message ID
* * `int` **button_id** - Button ID
*
* @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-09-18 20:46:20 +02:00
* Accept URL authorization
*
* Parameters:
* * `boolean` **write_allowed** - Optional: Write allowed?
* * `InputPeer` **peer** - Peer
* * `int` **msg_id** - Message ID
* * `int` **button_id** - Button ID
*
* @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-09-18 20:46:20 +02:00
* Hide peer settings bar
*
* Parameters:
* * `InputPeer` **peer** - Peer
*
* @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-09-18 20:46:20 +02:00
* Get scheduled history
*
* Parameters:
* * `InputPeer` **peer** - Peer
* * `[int]` **hash** - Optional: Hash
*
* @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 20:46:20 +02:00
* Get scheduled messages
*
* Parameters:
* * `InputPeer` **peer** - Peer
* * `[int]` **id** - ID
*
* @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-09-18 20:46:20 +02:00
* Send scheduled messages
*
* Parameters:
* * `InputPeer` **peer** - Peer
* * `[int]` **id** - ID
*
* @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 20:46:20 +02:00
* Delete scheduled messages
*
* Parameters:
* * `InputPeer` **peer** - Peer
* * `[int]` **id** - ID
*
* @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);
2019-06-05 15:38:32 +02:00
}
interface updates
{
/**
2019-09-18 20:46:20 +02:00
* You cannot use this method directly, see https://docs.madelineproto.xyz for more info on handling updates
*
* @return updates.State
2019-06-05 15:38:32 +02:00
*/
public function getState();
/**
2019-09-18 20:46:20 +02: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 20:46:20 +02:00
* Parameters:
* * `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
*
* @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-09-18 20:46:20 +02:00
* You cannot use this method directly, see https://docs.madelineproto.xyz for more info on handling updates
*
* Parameters:
* * `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
*
* @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-09-18 20:46:20 +02:00
* Change the profile photo
*
* Parameters:
* * `InputPhoto` **id** - The photo to use
*
* @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-09-18 20:46:20 +02:00
* Upload profile photo
*
* Parameters:
* * `InputFile` **file** - The photo
*
* @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-09-18 20:46:20 +02:00
* Delete profile photos
*
* Parameters:
* * `[InputPhoto]` **id** - The profile photos to delete
*
* @param array $params Parameters
2019-06-05 15:38:32 +02:00
*
2019-09-18 20:46:20 +02: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-09-18 20:46:20 +02:00
* Get the profile photos of a user
2019-06-05 15:38:32 +02:00
*
2019-09-18 20:46:20 +02:00
* Parameters:
* * `InputUser` **user_id** - The user
* * `int` **offset** - Offset
* * `long` **max_id** - Maximum ID of photo to return
* * `int` **limit** - Number of photos to return
*
* @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-09-18 20:46:20 +02:00
* You cannot use this method directly, use the upload, download_to_stream, download_to_file, download_to_dir methods instead; see https://docs.madelineproto.xyz for more info
*
* Parameters:
* * `long` **file_id** - You cannot use this method directly, use the upload, download_to_stream, download_to_file, download_to_dir methods instead; see https://docs.madelineproto.xyz for more info
* * `int` **file_part** - You cannot use this method directly, use the upload, download_to_stream, download_to_file, download_to_dir methods instead; see https://docs.madelineproto.xyz for more info
* * `bytes` **bytes** - You cannot use this method directly, use the upload, download_to_stream, download_to_file, download_to_dir methods instead; see https://docs.madelineproto.xyz for more info
*
* @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-09-18 20:46:20 +02:00
* You cannot use this method directly, use the upload, download_to_stream, download_to_file, download_to_dir methods instead; see https://docs.madelineproto.xyz for more info
2019-06-05 15:38:32 +02:00
*
2019-09-18 20:46:20 +02:00
* Parameters:
* * `boolean` **precise** - Optional: You cannot use this method directly, use the upload, download_to_stream, download_to_file, download_to_dir methods instead; see https://docs.madelineproto.xyz for more info
* * `InputFileLocation` **location** - You cannot use this method directly, use the upload, download_to_stream, download_to_file, download_to_dir methods instead; see https://docs.madelineproto.xyz for more info
* * `int` **offset** - You cannot use this method directly, use the upload, download_to_stream, download_to_file, download_to_dir methods instead; see https://docs.madelineproto.xyz for more info
* * `int` **limit** - You cannot use this method directly, use the upload, download_to_stream, download_to_file, download_to_dir methods instead; see https://docs.madelineproto.xyz for more info
*
* @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-09-18 20:46:20 +02:00
* You cannot use this method directly, use the upload, download_to_stream, download_to_file, download_to_dir methods instead; see https://docs.madelineproto.xyz for more info
*
* Parameters:
* * `long` **file_id** - You cannot use this method directly, use the upload, download_to_stream, download_to_file, download_to_dir methods instead; see https://docs.madelineproto.xyz for more info
* * `int` **file_part** - You cannot use this method directly, use the upload, download_to_stream, download_to_file, download_to_dir methods instead; see https://docs.madelineproto.xyz for more info
* * `int` **file_total_parts** - You cannot use this method directly, use the upload, download_to_stream, download_to_file, download_to_dir methods instead; see https://docs.madelineproto.xyz for more info
* * `bytes` **bytes** - You cannot use this method directly, use the upload, download_to_stream, download_to_file, download_to_dir methods instead; see https://docs.madelineproto.xyz for more info
*
* @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-09-18 20:46:20 +02:00
* Download a file through telegram
*
* Parameters:
* * `InputWebFileLocation` **location** - The file
* * `int` **offset** - The offset in bytes
* * `int` **limit** - The number of bytes to fetch
*
* @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-09-18 20:46:20 +02:00
* You cannot use this method directly, use the upload, download_to_stream, download_to_file, download_to_dir methods instead; see https://docs.madelineproto.xyz for more info
2019-06-05 15:38:32 +02:00
*
2019-09-18 20:46:20 +02:00
* Parameters:
* * `bytes` **file_token** - You cannot use this method directly, use the upload, download_to_stream, download_to_file, download_to_dir methods instead; see https://docs.madelineproto.xyz for more info
* * `int` **offset** - You cannot use this method directly, use the upload, download_to_stream, download_to_file, download_to_dir methods instead; see https://docs.madelineproto.xyz for more info
* * `int` **limit** - You cannot use this method directly, use the upload, download_to_stream, download_to_file, download_to_dir methods instead; see https://docs.madelineproto.xyz for more info
*
* @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-09-18 20:46:20 +02:00
* You cannot use this method directly, use the upload, download_to_stream, download_to_file, download_to_dir methods instead; see https://docs.madelineproto.xyz for more info
*
* Parameters:
* * `bytes` **file_token** - You cannot use this method directly, use the upload, download_to_stream, download_to_file, download_to_dir methods instead; see https://docs.madelineproto.xyz for more info
* * `bytes` **request_token** - You cannot use this method directly, use the upload, download_to_stream, download_to_file, download_to_dir methods instead; see https://docs.madelineproto.xyz for more info
*
* @param array $params Parameters
2019-06-05 15:38:32 +02:00
*
2019-09-18 20:46:20 +02: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-09-18 20:46:20 +02:00
* You cannot use this method directly, use the upload, download_to_stream, download_to_file, download_to_dir methods instead; see https://docs.madelineproto.xyz for more info
2019-06-05 15:38:32 +02:00
*
2019-09-18 20:46:20 +02:00
* Parameters:
* * `bytes` **file_token** - You cannot use this method directly, use the upload, download_to_stream, download_to_file, download_to_dir methods instead; see https://docs.madelineproto.xyz for more info
* * `int` **offset** - You cannot use this method directly, use the upload, download_to_stream, download_to_file, download_to_dir methods instead; see https://docs.madelineproto.xyz for more info
*
* @param array $params Parameters
*
* @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-09-18 20:46:20 +02:00
* Get file hashes
*
* Parameters:
* * `InputFileLocation` **location** - The file
* * `int` **offset** - Offset
*
* @param array $params Parameters
2019-06-05 15:38:32 +02:00
*
2019-09-18 20:46:20 +02: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-09-18 20:46:20 +02:00
* Get server configuration
*
2019-06-05 15:38:32 +02:00
* @return Config
*/
public function getConfig();
/**
2019-09-18 20:46:20 +02:00
* Get nearest datacenter
*
2019-06-05 15:38:32 +02:00
* @return NearestDc
*/
public function getNearestDc();
/**
2019-09-18 20:46:20 +02:00
* Get info about app updates
*
* Parameters:
* * `string` **source** - Source
*
* @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-09-18 20:46:20 +02:00
* Get invitation text
*
* @return help.InviteText
2019-06-05 15:38:32 +02:00
*/
public function getInviteText();
/**
2019-09-18 20:46:20 +02:00
* Get info of support user
*
* @return help.Support
2019-06-05 15:38:32 +02:00
*/
public function getSupport();
/**
2019-09-18 20:46:20 +02:00
* Get the changelog of this app
*
* Parameters:
* * `string` **prev_app_version** - Previous app version
*
* @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-09-18 20:46:20 +02:00
* Set the update status of webhook
*
* Parameters:
* * `int` **pending_updates_count** - Pending update count
* * `string` **message** - Message
*
* @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-09-18 20:46:20 +02:00
* Get CDN configuration
*
2019-06-05 15:38:32 +02:00
* @return CdnConfig
*/
public function getCdnConfig();
/**
2019-09-18 20:46:20 +02:00
* Get recent t.me URLs
2019-06-05 15:38:32 +02:00
*
2019-09-18 20:46:20 +02:00
* Parameters:
* * `string` **referer** - Referrer
*
* @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-09-18 20:46:20 +02:00
* Get information about the current proxy
*
* @return help.ProxyData
2019-06-05 15:38:32 +02:00
*/
public function getProxyData();
/**
2019-09-18 20:46:20 +02:00
* Get updated TOS
*
* @return help.TermsOfServiceUpdate
2019-06-05 15:38:32 +02:00
*/
public function getTermsOfServiceUpdate();
/**
2019-09-18 20:46:20 +02:00
* Accept telegram's TOS
*
* Parameters:
* * `DataJSON` **id** - TOS
*
* @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-09-18 20:46:20 +02:00
* Get deep link info
*
* Parameters:
* * `string` **path** - Deep link
*
* @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-09-18 20:46:20 +02:00
* Get app config
*
2019-06-05 15:38:32 +02:00
* @return JSONValue
*/
public function getAppConfig();
/**
2019-09-18 20:46:20 +02:00
* Log data for developer of this app
*
* Parameters:
* * `[InputAppEvent]` **events** - Event list
*
* @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-09-18 20:46:20 +02:00
* Get passport config
*
* Parameters:
* * `[int]` **hash** - Optional: Hash
*
* @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-09-18 20:46:20 +02:00
* Get support name
*
* @return help.SupportName
2019-06-05 15:38:32 +02:00
*/
public function getSupportName();
/**
2019-09-18 20:46:20 +02:00
* Get user info
*
* Parameters:
* * `InputUser` **user_id** - User ID
*
* @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-09-18 20:46:20 +02:00
* Edit user info
2019-06-05 15:38:32 +02:00
*
2019-09-18 20:46:20 +02:00
* Parameters:
* * `InputUser` **user_id** - User ID
* * `string` **message** - Message
* * `[MessageEntity]` **entities** - Entities
*
* @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-09-18 20:46:20 +02:00
* Mark channel/supergroup history as read
*
* Parameters:
* * `InputChannel` **channel** - The channel/supergroup
* * `int` **max_id** - Maximum message ID to mark as read
*
* @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-09-18 20:46:20 +02:00
* Delete channel/supergroup messages
*
* Parameters:
* * `InputChannel` **channel** - The channel/supergroup
* * `[int]` **id** - The IDs of messages to delete
*
* @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-09-18 20:46:20 +02:00
* Delete all messages of a user in a channel/supergroup
2019-06-05 15:38:32 +02:00
*
2019-09-18 20:46:20 +02:00
* Parameters:
* * `InputChannel` **channel** - The channel/supergroup
* * `InputUser` **user_id** - The user
*
* @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-09-18 20:46:20 +02:00
* Report a message in a supergroup/channel for spam
*
* Parameters:
* * `InputChannel` **channel** - The channel
* * `InputUser` **user_id** - The user that sent the messages
* * `[int]` **id** - The IDs of messages to report
*
* @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-09-18 20:46:20 +02:00
* Get channel/supergroup messages
*
* Parameters:
* * `InputChannel` **channel** - The channel/supergroup
* * `[InputMessage]` **id** - The message IDs
*
* @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-09-18 20:46:20 +02:00
* Get channel/supergroup participants (you should use `$MadelineProto->get_pwr_chat($id)` instead)
2019-06-05 15:38:32 +02:00
*
2019-09-18 20:46:20 +02:00
* Parameters:
* * `InputChannel` **channel** - The channel
* * `ChannelParticipantsFilter` **filter** - Member filter
* * `int` **offset** - Offset
* * `int` **limit** - Limit
* * `[int]` **hash** - Optional: IDs of previously fetched participants
*
* @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-09-18 20:46:20 +02:00
* Get info about a certain channel/supergroup participant
*
* Parameters:
* * `InputChannel` **channel** - The channel/supergroup
* * `InputUser` **user_id** - The user to fetch info about
*
* @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-09-18 20:46:20 +02:00
* Get info about multiple channels/supergroups
*
* Parameters:
* * `[InputChannel]` **id** - The channel/supergroup MTProto IDs
*
* @param array $params Parameters
*
2019-09-18 20:46:20 +02:00
* @return messages.Chats
*/
2019-09-18 20:46:20 +02:00
public function getChannels($params);
2018-02-24 17:54:39 +01:00
/**
2019-09-18 20:46:20 +02:00
* You cannot use this method directly, use the get_pwr_chat, get_info, get_full_info methods instead (see https://docs.madelineproto.xyz for more info)
*
2019-09-18 20:46:20 +02:00
* Parameters:
* * `InputChannel` **channel** - You cannot use this method directly, use the get_pwr_chat, get_info, get_full_info methods instead (see https://docs.madelineproto.xyz for more info)
*
* @param array $params Parameters
*
* @return messages.ChatFull
*/
2019-09-18 20:46:20 +02:00
public function getFullChannel($params);
2018-02-24 17:54:39 +01:00
/**
2019-09-18 20:46:20 +02:00
* Create channel/supergroup
*
* Parameters:
* * `boolean` **broadcast** - Optional: Set this to true to create a channel
* * `boolean` **megagroup** - Optional: Set this to true to create a supergroup
* * `string` **title** - Supergroup/channel title
* * `string` **about** - About text
* * `InputGeoPoint` **geo_point** - Optional: Geopoint (geochats)
* * `string` **address** - Optional: Physical address (geochats)
*
* @param array $params Parameters
*
2019-06-05 15:38:32 +02:00
* @return Updates
*/
2019-09-18 20:46:20 +02:00
public function createChannel($params);
2018-02-24 17:54:39 +01:00
/**
2019-09-18 20:46:20 +02:00
* Edit admin permissions of a user in a channel/supergroup
*
* Parameters:
* * `InputChannel` **channel** - The channel
* * `InputUser` **user_id** - The user
* * `ChatAdminRights` **admin_rights** - Admin rights
* * `string` **rank** - Admin rank, an arbitrary string
*
* @param array $params Parameters
*
2019-06-05 15:38:32 +02:00
* @return Updates
*/
2019-09-18 20:46:20 +02:00
public function editAdmin($params);
2018-02-24 17:54:39 +01:00
/**
2019-09-18 20:46:20 +02:00
* Edit the title of a supergroup/channel
*
* Parameters:
* * `InputChannel` **channel** - The channel
* * `string` **title** - The new channel/supergroup title
*
* @param array $params Parameters
*
2019-06-05 15:38:32 +02:00
* @return Updates
*/
2019-09-18 20:46:20 +02:00
public function editTitle($params);
2018-02-24 17:54:39 +01:00
/**
2019-09-18 20:46:20 +02:00
* Edit the photo of a supergroup/channel
*
* Parameters:
* * `InputChannel` **channel** - The channel
* * `InputChatPhoto` **photo** - The new photo
*
* @param array $params Parameters
*
2019-06-05 15:38:32 +02:00
* @return Updates
*/
2019-09-18 20:46:20 +02:00
public function editPhoto($params);
2018-02-24 17:54:39 +01:00
/**
2019-09-18 20:46:20 +02:00
* Check if this username is free and can be assigned to a channel/supergroup
*
* Parameters:
* * `InputChannel` **channel** - The channel/supergroup
* * `string` **username** - The new username for this channel/supergroup
*
* @param array $params Parameters
*
* @return bool
*/
2019-09-18 20:46:20 +02:00
public function checkUsername($params);
2018-02-24 17:54:39 +01:00
/**
2019-09-18 20:46:20 +02:00
* Update the username of a supergroup/channel
*
* Parameters:
* * `InputChannel` **channel** - The channel/supergroup
* * `string` **username** - The new username
*
* @param array $params Parameters
*
2019-06-05 12:04:36 +02:00
* @return bool
*/
2019-09-18 20:46:20 +02:00
public function updateUsername($params);
2018-02-24 17:54:39 +01:00
/**
2019-09-18 20:46:20 +02:00
* Join a channel/supergroup
*
* Parameters:
* * `InputChannel` **channel** - The channel/supergroup to join
*
* @param array $params Parameters
*
2019-06-05 15:38:32 +02:00
* @return Updates
*/
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-09-18 20:46:20 +02:00
* Leave a channel/supergroup
*
* Parameters:
* * `InputChannel` **channel** - The channel/supergroup to leave
*
* @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-09-18 20:46:20 +02:00
* Add users to channel/supergroup
*
* Parameters:
* * `InputChannel` **channel** - The channel/supergroup
* * `[InputUser]` **users** - The users to add
*
* @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
/**
2019-09-18 20:46:20 +02:00
* Delete a channel/supergroup
*
* Parameters:
* * `InputChannel` **channel** - The channel/supergroup to delete
*
* @param array $params Parameters
*
2019-06-05 15:38:32 +02:00
* @return Updates
*/
2019-09-18 20:46:20 +02:00
public function deleteChannel($params);
2018-02-24 17:54:39 +01:00
/**
2019-09-18 20:46:20 +02:00
* Get the link of a message in a channel
*
* Parameters:
* * `InputChannel` **channel** - The channel/supergroup
* * `int` **id** - The ID of the message
* * `Bool` **grouped** - Is this an album?
*
* @param array $params Parameters
*
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-09-18 20:46:20 +02:00
* Toggle channel signatures
*
* Parameters:
* * `InputChannel` **channel** - The channel/supergroup
* * `Bool` **enabled** - Enable or disable channel signatures?
*
* @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-09-18 20:46:20 +02:00
* Get all supergroups/channels where you're admin
*
* Parameters:
* * `boolean` **by_location** - Optional: Get channels by location
* * `boolean` **check_limit** - Optional: Check limit
*
* @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-09-18 20:46:20 +02:00
* Kick or ban a user from a channel/supergroup
*
* Parameters:
* * `InputChannel` **channel** - The channel/supergroup
* * `InputUser` **user_id** - The user to kick/ban
* * `ChatBannedRights` **banned_rights** - Banned rights
*
* @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-09-18 20:46:20 +02:00
* Get admin log of a channel/supergroup
2019-06-05 15:38:32 +02:00
*
2019-09-18 20:46:20 +02:00
* Parameters:
* * `InputChannel` **channel** - The channel/supergroup
* * `string` **q** - Search query
* * `ChannelAdminLogEventsFilter` **events_filter** - Optional: Event filter
* * `[InputUser]` **admins** - Optional: Fetch only actions from these admins
* * `long` **max_id** - Maximum message ID to fetch
* * `long` **min_id** - Minimum message ID to fetch
* * `int` **limit** - Number of results to fetch
*
* @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-09-18 20:46:20 +02:00
* Set the supergroup/channel stickerpack
*
* Parameters:
* * `InputChannel` **channel** - The channel/supergoup
* * `InputStickerSet` **stickerset** - The stickerset
*
* @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-09-18 20:46:20 +02:00
* Mark channel/supergroup messages as read
*
* Parameters:
* * `InputChannel` **channel** - The channel
* * `[int]` **id** - List of message IDs
*
* @param array $params Parameters
2019-06-05 15:38:32 +02:00
*
* @return bool
*/
2019-09-18 20:46:20 +02:00
public function readMessageContents($params);
2019-06-05 15:38:32 +02:00
/**
2019-09-18 20:46:20 +02:00
* Delete the history of a supergroup/channel
*
* Parameters:
* * `InputChannel` **channel** - The channel/supergroup
* * `int` **max_id** - Maximum message ID to delete
*
* @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-09-18 20:46:20 +02:00
* Enable or disable hidden history for new channel/supergroup users
*
* Parameters:
* * `InputChannel` **channel** - The channel/supergroup
* * `Bool` **enabled** - Enable or disable hidden history for new channel/supergroup users
*
* @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-09-18 20:46:20 +02:00
* Get all channels you left
*
* Parameters:
* * `int` **offset** - Offset
*
* @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-09-18 20:46:20 +02:00
* Get groups for discussion
*
* @return messages.Chats
2019-06-23 13:08:44 +02:00
*/
public function getGroupsForDiscussion();
/**
2019-09-18 20:46:20 +02:00
* Set discussion group of channel
*
* Parameters:
* * `InputChannel` **broadcast** - The channel
* * `InputChannel` **group** - The group
*
* @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-09-18 20:46:20 +02:00
* Edit creator of channel
*
* Parameters:
* * `InputChannel` **channel** - Channel
* * `InputUser` **user_id** - User ID
* * `InputCheckPasswordSRP` **password** - Password
*
* @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-09-18 20:46:20 +02:00
* Edit location (geochats)
*
* Parameters:
* * `InputChannel` **channel** - Channel
* * `InputGeoPoint` **geo_point** - Geo point
* * `string` **address** - Physical location (geochats)
*
* @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-09-18 20:46:20 +02:00
* Toggle slow mode
*
* Parameters:
* * `InputChannel` **channel** - Supergroup
* * `int` **seconds** - Users will only be able to send one message every `seconds` seconds, `0` to disable the limitation
*
* @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);
}
2018-02-25 11:17:45 +01:00
2019-06-05 15:38:32 +02:00
interface bots
{
/**
2019-09-18 20:46:20 +02:00
* Send a custom request to the bot API
*
* Parameters:
* * `string` **custom_method** - The method to call
* * `DataJSON` **params** - Method parameters
*
* @param array $params Parameters
2019-06-05 15:38:32 +02:00
*
* @return DataJSON
*/
2019-09-18 20:46:20 +02:00
public function sendCustomRequest($params);
2018-02-24 17:54:39 +01:00
/**
2019-09-18 20:46:20 +02:00
* Send webhook request via bot API
*
* Parameters:
* * `long` **query_id** - The query ID
* * `DataJSON` **data** - The parameters
*
* @param array $params Parameters
*
2019-06-05 15:38:32 +02:00
* @return bool
*/
2019-09-18 20:46:20 +02:00
public function answerWebhookJSONQuery($params);
}
2018-02-25 11:17:45 +01:00
2019-06-05 15:38:32 +02:00
interface payments
{
/**
2019-09-18 20:46:20 +02:00
* Get payment form
*
2019-09-18 20:46:20 +02:00
* Parameters:
* * `int` **msg_id** - Message ID
*
* @param array $params Parameters
*
* @return payments.PaymentForm
*/
2019-09-18 20:46:20 +02:00
public function getPaymentForm($params);
2018-02-24 17:54:39 +01:00
/**
2019-09-18 20:46:20 +02:00
* Get payment receipt
*
* Parameters:
* * `int` **msg_id** - The message ID
*
* @param array $params Parameters
*
2019-09-18 20:46:20 +02:00
* @return payments.PaymentReceipt
*/
2019-09-18 20:46:20 +02:00
public function getPaymentReceipt($params);
2018-02-24 17:54:39 +01:00
/**
2019-09-18 20:46:20 +02:00
* Validate requested payment info
*
* Parameters:
* * `boolean` **save** - Optional: Save payment info?
* * `int` **msg_id** - The message ID
* * `PaymentRequestedInfo` **info** - The requested payment info
*
* @param array $params Parameters
*
2019-09-18 20:46:20 +02:00
* @return payments.ValidatedRequestedInfo
*/
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-09-18 20:46:20 +02:00
* Bots only: send payment form
2017-06-30 15:36:33 +02:00
*
2019-09-18 20:46:20 +02:00
* Parameters:
* * `int` **msg_id** - Message ID
* * `string` **requested_info_id** - Optional: ID of requested info
* * `string` **shipping_option_id** - Optional: Shipping option ID
* * `InputPaymentCredentials` **credentials** - Payment credentials
*
* @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-09-18 20:46:20 +02:00
* Get saved payments info
*
* @return payments.SavedInfo
2019-06-05 15:38:32 +02:00
*/
public function getSavedInfo();
/**
2019-09-18 20:46:20 +02:00
* Clear saved payments info
*
* Parameters:
* * `boolean` **credentials** - Optional: Clear credentials?
* * `boolean` **info** - Optional: Clear payment info?
*
* @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);
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
{
/**
2019-09-18 20:46:20 +02:00
* Create stickerset
*
* Parameters:
* * `boolean` **masks** - Optional: Masks?
* * `InputUser` **user_id** - The user ID associated to this stickerset
* * `string` **title** - The stickerset title
* * `string` **short_name** - The stickerset short name
* * `[InputStickerSetItem]` **stickers** - The stickers to add
*
* @param array $params Parameters
*
2019-09-18 20:46:20 +02:00
* @return messages.StickerSet
*/
2019-09-18 20:46:20 +02:00
public function createStickerSet($params);
2018-02-24 17:54:39 +01:00
/**
2019-09-18 20:46:20 +02:00
* Remove sticker from stickerset
*
* Parameters:
* * `InputDocument` **sticker** - The sticker to remove
*
* @param array $params Parameters
*
2019-09-18 20:46:20 +02:00
* @return messages.StickerSet
*/
2019-09-18 20:46:20 +02:00
public function removeStickerFromSet($params);
2018-02-24 17:54:39 +01:00
/**
2019-09-18 20:46:20 +02:00
* Change sticker position in photo
*
2019-09-18 20:46:20 +02:00
* Parameters:
* * `InputDocument` **sticker** - The sticker
* * `int` **position** - New position
*
* @param array $params Parameters
*
* @return messages.StickerSet
*/
2019-09-18 20:46:20 +02:00
public function changeStickerPosition($params);
2019-06-05 15:38:32 +02:00
/**
2019-09-18 20:46:20 +02:00
* Add sticker to stickerset
*
* Parameters:
* * `InputStickerSet` **stickerset** - The stickerset
* * `InputStickerSetItem` **sticker** - The sticker
*
* @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);
}
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-09-18 20:46:20 +02:00
* Get call configuration
*
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-09-18 20:46:20 +02: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 20:46:20 +02:00
* Parameters:
* * `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
*
* @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-09-18 20:46:20 +02:00
* You cannot use this method directly, see https://docs.madelineproto.xyz#calls for more info on handling calls
*
* Parameters:
* * `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
*
* @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-09-18 20:46:20 +02:00
* You cannot use this method directly, see https://docs.madelineproto.xyz#calls for more info on handling calls
*
* Parameters:
* * `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
*
* @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-09-18 20:46:20 +02:00
* Notify server that you received a call (server will refuse all incoming calls until the current call is over)
*
* Parameters:
* * `InputPhoneCall` **peer** - The phone call you received
*
* @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-09-18 20:46:20 +02:00
* You cannot use this method directly, see https://docs.madelineproto.xyz#calls for more info on handling calls
*
* Parameters:
* * `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
*
* @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-09-18 20:46:20 +02:00
* Set phone call rating
*
* Parameters:
* * `boolean` **user_initiative** - Optional: User initiative
* * `InputPhoneCall` **peer** - The phone call
* * `int` **rating** - Rating (1-5 stars)
* * `string` **comment** - An optional comment
*
* @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-09-18 20:46:20 +02:00
* Save call debugging info
*
* Parameters:
* * `InputPhoneCall` **peer** - The call
* * `DataJSON` **debug** - Debugging info
*
* @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-09-18 20:46:20 +02:00
* Get language pack
*
* Parameters:
* * `string` **lang_pack** - Lang pack
* * `string` **lang_code** - Language code
*
* @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-09-18 20:46:20 +02:00
* Get language pack strings
2019-06-05 15:38:32 +02:00
*
2019-09-18 20:46:20 +02:00
* Parameters:
* * `string` **lang_pack** - Lang pack
* * `string` **lang_code** - Language code
* * `[string]` **keys** - Keys
*
* @param array $params Parameters
*
* @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-09-18 20:46:20 +02:00
* Get language pack updates
*
* Parameters:
* * `string` **lang_pack** - Language pack
* * `string` **lang_code** - Lang code
* * `int` **from_version** - Previous version
*
* @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-09-18 20:46:20 +02:00
* Get available languages
2019-06-05 15:38:32 +02:00
*
2019-09-18 20:46:20 +02:00
* Parameters:
* * `string` **lang_pack** - Lang pack
*
* @param array $params Parameters
*
* @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-09-18 20:46:20 +02:00
* Get language
*
* Parameters:
* * `string` **lang_pack** - Lang pack
* * `string` **lang_code** - Lang code
*
* @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-09-18 20:46:20 +02:00
* Edit folder
*
* Parameters:
* * `[InputFolderPeer]` **folder_peers** - New folder peers
*
* @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-09-18 20:46:20 +02:00
* Delete folder
*
* Parameters:
* * `int` **folder_id** - Folder ID
*
* @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
class InternalDoc extends APIFactory
{
public function logger($param, $level = danog\MadelineProto\Logger::NOTICE, $file = null)
{
2019-09-18 21:31:51 +02:00
return $this->__call(__FUNCTION__, [$param, $level, $file]);
2019-09-18 20:46:20 +02:00
}
public function isAltervista()
{
2019-09-18 21:31:51 +02:00
return $this->__call(__FUNCTION__, []);
2019-09-18 20:46:20 +02:00
}
public function isInitingAuthorization()
{
2019-09-18 21:31:51 +02:00
return $this->__call(__FUNCTION__, []);
2019-09-18 20:46:20 +02:00
}
public function getHTTPClient()
{
2019-09-18 21:31:51 +02:00
return $this->__call(__FUNCTION__, []);
2019-09-18 20:46:20 +02:00
}
public function getDNSClient()
{
2019-09-18 21:31:51 +02:00
return $this->__call(__FUNCTION__, []);
2019-09-18 20:46:20 +02:00
}
public function fileGetContents($url): Generator
{
2019-09-18 21:31:51 +02:00
return $this->__call(__FUNCTION__, [$url]);
2019-09-18 20:46:20 +02:00
}
public function a(callable $a, ?string $b = null, $c = null, $d = 2, $e = MTProto::METHOD_BEFORE_CALLBACK): ?string
{
2019-09-18 21:31:51 +02:00
return $this->__call(__FUNCTION__, [$a, $b, $c, $d, $e]);
2019-09-18 20:46:20 +02:00
}
/**
* Get all datacenter connections.
*
* @return array<DataCenterConnection>
*/
public function getDataCenterConnections(): array
{
2019-09-18 21:31:51 +02:00
return $this->__call(__FUNCTION__, []);
2019-09-18 20:46:20 +02:00
}
public function hasAllAuth()
{
2019-09-18 21:31:51 +02:00
return $this->__call(__FUNCTION__, []);
2019-09-18 20:46:20 +02:00
}
public function startLoops()
{
2019-09-18 21:31:51 +02:00
return $this->__call(__FUNCTION__, []);
2019-09-18 20:46:20 +02:00
}
public function stopLoops()
{
2019-09-18 21:31:51 +02:00
return $this->__call(__FUNCTION__, []);
2019-09-18 20:46:20 +02:00
}
public function getSettings($settings, $previousSettings = array (
))
{
2019-09-18 21:31:51 +02:00
return $this->__call(__FUNCTION__, [$settings, $previousSettings]);
2019-09-18 20:46:20 +02:00
}
public function parseSettings($settings)
{
2019-09-18 21:31:51 +02:00
return $this->__call(__FUNCTION__, [$settings]);
2019-09-18 20:46:20 +02:00
}
public function setupLogger()
{
2019-09-18 21:31:51 +02:00
return $this->__call(__FUNCTION__, []);
2019-09-18 20:46:20 +02:00
}
/**
* Reset all MTProto sessions.
*
* @param boolean $de Whether to reset the session ID
* @param boolean $auth_key Whether to reset the auth key
*
* @return void
*/
public function resetMTProtoSession(bool $de = true, bool $auth_key = false)
{
2019-09-18 21:31:51 +02:00
return $this->__call(__FUNCTION__, [$de, $auth_key]);
2019-09-18 20:46:20 +02:00
}
/**
* Check if connected to datacenter using HTTP.
*
* @param string $datacenter DC ID
*
* @return boolean
*/
public function isHttp(string $datacenter)
{
2019-09-18 21:31:51 +02:00
return $this->__call(__FUNCTION__, [$datacenter]);
2019-09-18 20:46:20 +02:00
}
public function connectToAllDcs(bool $reconnectAll = true): Generator
{
2019-09-18 21:31:51 +02:00
return $this->__call(__FUNCTION__, [$reconnectAll]);
2019-09-18 20:46:20 +02:00
}
public function resetSession()
{
2019-09-18 21:31:51 +02:00
return $this->__call(__FUNCTION__, []);
2019-09-18 20:46:20 +02:00
}
public function resetUpdateState()
{
2019-09-18 21:31:51 +02:00
return $this->__call(__FUNCTION__, []);
2019-09-18 20:46:20 +02:00
}
public function startUpdateSystem($anyway = false)
{
2019-09-18 21:31:51 +02:00
return $this->__call(__FUNCTION__, [$anyway]);
2019-09-18 20:46:20 +02:00
}
public function getPhoneConfig($watcherId = null)
{
2019-09-18 21:31:51 +02:00
return $this->__call(__FUNCTION__, [$watcherId]);
2019-09-18 20:46:20 +02:00
}
public function getCdnConfig($datacenter)
{
2019-09-18 21:31:51 +02:00
return $this->__call(__FUNCTION__, [$datacenter]);
2019-09-18 20:46:20 +02:00
}
public function getCachedConfig()
{
2019-09-18 21:31:51 +02:00
return $this->__call(__FUNCTION__, []);
2019-09-18 20:46:20 +02:00
}
public function getConfig($config = array (
), $options = array (
))
{
2019-09-18 21:31:51 +02:00
return $this->__call(__FUNCTION__, [$config, $options]);
2019-09-18 20:46:20 +02:00
}
public function parseConfig()
{
2019-09-18 21:31:51 +02:00
return $this->__call(__FUNCTION__, []);
2019-09-18 20:46:20 +02:00
}
public function parseDcOptions($dc_options)
{
2019-09-18 21:31:51 +02:00
return $this->__call(__FUNCTION__, [$dc_options]);
2019-09-18 20:46:20 +02:00
}
public function getSelf()
{
2019-09-18 21:31:51 +02:00
return $this->__call(__FUNCTION__, []);
2019-09-18 20:46:20 +02:00
}
public function getMethodCallbacks(): array
{
2019-09-18 21:31:51 +02:00
return $this->__call(__FUNCTION__, []);
2019-09-18 20:46:20 +02:00
}
public function getMethodBeforeCallbacks(): array
{
2019-09-18 21:31:51 +02:00
return $this->__call(__FUNCTION__, []);
2019-09-18 20:46:20 +02:00
}
public function getConstructorCallbacks(): array
{
2019-09-18 21:31:51 +02:00
return $this->__call(__FUNCTION__, []);
2019-09-18 20:46:20 +02:00
}
public function getConstructorBeforeCallbacks(): array
{
2019-09-18 21:31:51 +02:00
return $this->__call(__FUNCTION__, []);
2019-09-18 20:46:20 +02:00
}
public function getConstructorSerializeCallbacks(): array
{
2019-09-18 21:31:51 +02:00
return $this->__call(__FUNCTION__, []);
2019-09-18 20:46:20 +02:00
}
public function getTypeMismatchCallbacks(): array
{
2019-09-18 21:31:51 +02:00
return $this->__call(__FUNCTION__, []);
2019-09-18 20:46:20 +02:00
}
/**
* Create authorization key.
*
* @param int $expires_in Expiry date of auth key, -1 for permanent auth key
* @param string $datacenter DC ID
*
* @return \Generator<AuthKey>
*/
public function createAuthKey(int $expires_in, string $datacenter): Generator
{
2019-09-18 21:31:51 +02:00
return $this->__call(__FUNCTION__, [$expires_in, $datacenter]);
2019-09-18 20:46:20 +02:00
}
/**
* Check validity of g_a parameters.
*
* @param BigInteger $g_a
* @param BigInteger $p
*
* @return bool
*/
2019-09-18 21:21:34 +02:00
public function checkG(\phpseclib\Math\BigInteger $g_a, \phpseclib\Math\BigInteger $p): bool
2019-09-18 20:46:20 +02:00
{
2019-09-18 21:31:51 +02:00
return $this->__call(__FUNCTION__, [$g_a, $p]);
2019-09-18 20:46:20 +02:00
}
/**
* Check validity of p and g parameters.
*
* @param BigInteger $p
* @param BigInteger $g
*
* @return boolean
*/
2019-09-18 21:21:34 +02:00
public function checkPG(\phpseclib\Math\BigInteger $p, \phpseclib\Math\BigInteger $g): bool
2019-09-18 20:46:20 +02:00
{
2019-09-18 21:31:51 +02:00
return $this->__call(__FUNCTION__, [$p, $g]);
2019-09-18 20:46:20 +02:00
}
/**
* Get diffie-hellman configuration.
*
* @return \Generator<array>
*/
public function getDhConfig(): Generator
{
2019-09-18 21:31:51 +02:00
return $this->__call(__FUNCTION__, []);
2019-09-18 20:46:20 +02:00
}
/**
* Bind temporary and permanent auth keys.
*
* @param integer $expires_in Date of expiry for binding
* @param string $datacenter DC ID
*
* @return \Generator<bool>
*/
public function bindTempAuthKey(int $expires_in, string $datacenter): Generator
{
2019-09-18 21:31:51 +02:00
return $this->__call(__FUNCTION__, [$expires_in, $datacenter]);
2019-09-18 20:46:20 +02:00
}
/**
* Factorize number asynchronously using the wolfram API.
*
* @param string|integer $what Number to factorize
*
* @return \Generator<string|bool>
*/
public function wolframSingle($what): Generator
{
2019-09-18 21:31:51 +02:00
return $this->__call(__FUNCTION__, [$what]);
2019-09-18 20:46:20 +02:00
}
/**
* Asynchronously create, bind and check auth keys for all DCs.
*
* @return \Generator
*/
public function initAuthorization(): Generator
{
2019-09-18 21:31:51 +02:00
return $this->__call(__FUNCTION__, []);
2019-09-18 20:46:20 +02:00
}
/**
* Init auth keys for single DC.
*
* @param string $id DC ID
* @param DataCenterConnection $socket DC object
*
* @return \Generator
*/
2019-09-18 21:21:34 +02:00
public function initAuthorizationSocket(string $id, \danog\MadelineProto\DataCenterConnection $socket): Generator
2019-09-18 20:46:20 +02:00
{
2019-09-18 21:31:51 +02:00
return $this->__call(__FUNCTION__, [$id, $socket]);
2019-09-18 20:46:20 +02:00
}
/**
* Sync authorization data between DCs.
*
* @param string $id DC ID
*
* @return \Generator
*/
public function syncAuthorization(string $id): Generator
{
2019-09-18 21:31:51 +02:00
return $this->__call(__FUNCTION__, [$id]);
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
*
* @return Promise
*/
public function methodCall(string $method, $args = array (
), array $aargs = array (
'msg_id' => null,
)): Amp\Promise
{
2019-09-18 21:31:51 +02:00
return $this->__call(__FUNCTION__, [$method, $args, $aargs]);
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
*
* @return Promise
*/
public function methodCallWrite(string $method, $args = array (
), array $aargs = array (
'msg_id' => null,
)): Amp\Promise
{
2019-09-18 21:31:51 +02:00
return $this->__call(__FUNCTION__, [$method, $args, $aargs]);
2019-09-18 20:46:20 +02:00
}
public function aesCalculate($msg_key, $auth_key, $to_server = true)
{
2019-09-18 21:31:51 +02:00
return $this->__call(__FUNCTION__, [$msg_key, $auth_key, $to_server]);
2019-09-18 20:46:20 +02:00
}
public function oldAesCalculate($msg_key, $auth_key, $to_server = true)
{
2019-09-18 21:31:51 +02:00
return $this->__call(__FUNCTION__, [$msg_key, $auth_key, $to_server]);
2019-09-18 20:46:20 +02:00
}
public function ctrEncrypt($message, $key, $iv)
{
2019-09-18 21:31:51 +02:00
return $this->__call(__FUNCTION__, [$message, $key, $iv]);
2019-09-18 20:46:20 +02:00
}
public function igeEncrypt($message, $key, $iv)
{
2019-09-18 21:31:51 +02:00
return $this->__call(__FUNCTION__, [$message, $key, $iv]);
2019-09-18 20:46:20 +02:00
}
public function igeDecrypt($message, $key, $iv)
{
2019-09-18 21:31:51 +02:00
return $this->__call(__FUNCTION__, [$message, $key, $iv]);
2019-09-18 20:46:20 +02:00
}
public function toSupergroup($id)
{
2019-09-18 21:31:51 +02:00
return $this->__call(__FUNCTION__, [$id]);
2019-09-18 20:46:20 +02:00
}
public function fromSupergroup($id)
{
2019-09-18 21:31:51 +02:00
return $this->__call(__FUNCTION__, [$id]);
2019-09-18 20:46:20 +02:00
}
public function isSupergroup($id)
{
2019-09-18 21:31:51 +02:00
return $this->__call(__FUNCTION__, [$id]);
2019-09-18 20:46:20 +02:00
}
public function addSupport($support)
{
2019-09-18 21:31:51 +02:00
return $this->__call(__FUNCTION__, [$support]);
2019-09-18 20:46:20 +02:00
}
public function addUser($user)
{
2019-09-18 21:31:51 +02:00
return $this->__call(__FUNCTION__, [$user]);
2019-09-18 20:46:20 +02:00
}
public function addChat($chat)
{
2019-09-18 21:31:51 +02:00
return $this->__call(__FUNCTION__, [$chat]);
2019-09-18 20:46:20 +02:00
}
public function cachePwrChat($id, $full_fetch, $send)
{
2019-09-18 21:31:51 +02:00
return $this->__call(__FUNCTION__, [$id, $full_fetch, $send]);
2019-09-18 20:46:20 +02:00
}
public function peerIsset($id)
{
2019-09-18 21:31:51 +02:00
return $this->__call(__FUNCTION__, [$id]);
2019-09-18 20:46:20 +02:00
}
public function entitiesPeerIsset($entities)
{
2019-09-18 21:31:51 +02:00
return $this->__call(__FUNCTION__, [$entities]);
2019-09-18 20:46:20 +02:00
}
public function fwdPeerIsset($fwd)
{
2019-09-18 21:31:51 +02:00
return $this->__call(__FUNCTION__, [$fwd]);
2019-09-18 20:46:20 +02:00
}
public function getFolderId($id)
{
2019-09-18 21:31:51 +02:00
return $this->__call(__FUNCTION__, [$id]);
2019-09-18 20:46:20 +02:00
}
public function getId($id)
{
2019-09-18 21:31:51 +02:00
return $this->__call(__FUNCTION__, [$id]);
2019-09-18 20:46:20 +02:00
}
public function getInfo($id, $recursive = true)
{
2019-09-18 21:31:51 +02:00
return $this->__call(__FUNCTION__, [$id, $recursive]);
2019-09-18 20:46:20 +02:00
}
public function genAll($constructor, $folder_id = null)
{
2019-09-18 21:31:51 +02:00
return $this->__call(__FUNCTION__, [$constructor, $folder_id]);
2019-09-18 20:46:20 +02:00
}
public function fullChatLastUpdated($id)
{
2019-09-18 21:31:51 +02:00
return $this->__call(__FUNCTION__, [$id]);
2019-09-18 20:46:20 +02:00
}
public function getFullInfo($id)
{
2019-09-18 21:31:51 +02:00
return $this->__call(__FUNCTION__, [$id]);
2019-09-18 20:46:20 +02:00
}
public function getPwrChat($id, $fullfetch = true, $send = true)
{
2019-09-18 21:31:51 +02:00
return $this->__call(__FUNCTION__, [$id, $fullfetch, $send]);
2019-09-18 20:46:20 +02:00
}
public function recurseAlphabetSearchParticipants($channel, $filter, $q, $total_count, &$res)
{
2019-09-18 21:31:51 +02:00
return $this->__call(__FUNCTION__, [$channel, $filter, $q, $total_count, $res]);
2019-09-18 20:46:20 +02:00
}
public function fetchParticipants($channel, $filter, $q, $total_count, &$res)
{
2019-09-18 21:31:51 +02:00
return $this->__call(__FUNCTION__, [$channel, $filter, $q, $total_count, $res]);
2019-09-18 20:46:20 +02:00
}
public function fetchParticipantsCache($channel, $filter, $q, $offset, $limit)
{
2019-09-18 21:31:51 +02:00
return $this->__call(__FUNCTION__, [$channel, $filter, $q, $offset, $limit]);
2019-09-18 20:46:20 +02:00
}
public function storeParticipantsCache($gres, $channel, $filter, $q, $offset, $limit)
{
2019-09-18 21:31:51 +02:00
return $this->__call(__FUNCTION__, [$gres, $channel, $filter, $q, $offset, $limit]);
2019-09-18 20:46:20 +02:00
}
public function getParticipantsHash($channel, $filter, $q, $offset, $limit)
{
2019-09-18 21:31:51 +02:00
return $this->__call(__FUNCTION__, [$channel, $filter, $q, $offset, $limit]);
2019-09-18 20:46:20 +02:00
}
public function storeDb($res, $force = false)
{
2019-09-18 21:31:51 +02:00
return $this->__call(__FUNCTION__, [$res, $force]);
2019-09-18 20:46:20 +02:00
}
public function resolveUsername($username)
{
2019-09-18 21:31:51 +02:00
return $this->__call(__FUNCTION__, [$username]);
2019-09-18 20:46:20 +02:00
}
public function pwrUpdateHandler($update)
{
2019-09-18 21:31:51 +02:00
return $this->__call(__FUNCTION__, [$update]);
2019-09-18 20:46:20 +02:00
}
public function getUpdatesUpdateHandler($update)
{
2019-09-18 21:31:51 +02:00
return $this->__call(__FUNCTION__, [$update]);
2019-09-18 20:46:20 +02:00
}
public function getUpdates($params = array (
))
{
2019-09-18 21:31:51 +02:00
return $this->__call(__FUNCTION__, [$params]);
2019-09-18 20:46:20 +02:00
}
public function waitUpdate()
{
2019-09-18 21:31:51 +02:00
return $this->__call(__FUNCTION__, []);
2019-09-18 20:46:20 +02:00
}
public function signalUpdate()
{
2019-09-18 21:31:51 +02:00
return $this->__call(__FUNCTION__, []);
2019-09-18 20:46:20 +02:00
}
public function checkMsgId($message)
{
2019-09-18 21:31:51 +02:00
return $this->__call(__FUNCTION__, [$message]);
2019-09-18 20:46:20 +02:00
}
public function loadUpdateState()
{
2019-09-18 21:31:51 +02:00
return $this->__call(__FUNCTION__, []);
2019-09-18 20:46:20 +02:00
}
public function loadChannelState($channelId = null, $init = array (
))
{
2019-09-18 21:31:51 +02:00
return $this->__call(__FUNCTION__, [$channelId, $init]);
2019-09-18 20:46:20 +02:00
}
public function getChannelStates()
{
2019-09-18 21:31:51 +02:00
return $this->__call(__FUNCTION__, []);
2019-09-18 20:46:20 +02:00
}
public function getUpdatesState()
{
2019-09-18 21:31:51 +02:00
return $this->__call(__FUNCTION__, []);
2019-09-18 20:46:20 +02:00
}
public function handleUpdates($updates, $actual_updates = null)
{
2019-09-18 21:31:51 +02:00
return $this->__call(__FUNCTION__, [$updates, $actual_updates]);
2019-09-18 20:46:20 +02:00
}
public function saveUpdate($update)
{
2019-09-18 21:31:51 +02:00
return $this->__call(__FUNCTION__, [$update]);
2019-09-18 20:46:20 +02:00
}
public function pwrWebhook($update)
{
2019-09-18 21:31:51 +02:00
return $this->__call(__FUNCTION__, [$update]);
2019-09-18 20:46:20 +02:00
}
public function upload($file, $file_name = '', $cb = null, $encrypted = false)
{
2019-09-18 21:31:51 +02:00
return $this->__call(__FUNCTION__, [$file, $file_name, $cb, $encrypted]);
2019-09-18 20:46:20 +02:00
}
public function uploadFromUrl($url, int $size = 0, string $file_name = '', $cb = null, bool $encrypted = false)
{
2019-09-18 21:31:51 +02:00
return $this->__call(__FUNCTION__, [$url, $size, $file_name, $cb, $encrypted]);
2019-09-18 20:46:20 +02:00
}
public function uploadFromStream($stream, int $size, string $mime, string $file_name = '', $cb = null, bool $encrypted = false)
{
2019-09-18 21:31:51 +02:00
return $this->__call(__FUNCTION__, [$stream, $size, $mime, $file_name, $cb, $encrypted]);
2019-09-18 20:46:20 +02:00
}
public function uploadFromCallable($callable, int $size, string $mime, string $file_name = '', $cb = null, bool $refetchable = true, bool $encrypted = false)
{
2019-09-18 21:31:51 +02:00
return $this->__call(__FUNCTION__, [$callable, $size, $mime, $file_name, $cb, $refetchable, $encrypted]);
2019-09-18 20:46:20 +02:00
}
public function uploadEncrypted($file, $file_name = '', $cb = null)
{
2019-09-18 21:31:51 +02:00
return $this->__call(__FUNCTION__, [$file, $file_name, $cb]);
2019-09-18 20:46:20 +02:00
}
public function uploadFromTgfile($media, $cb = null, $encrypted = false)
{
2019-09-18 21:31:51 +02:00
return $this->__call(__FUNCTION__, [$media, $cb, $encrypted]);
2019-09-18 20:46:20 +02:00
}
public function genAllFile($media)
{
2019-09-18 21:31:51 +02:00
return $this->__call(__FUNCTION__, [$media]);
2019-09-18 20:46:20 +02:00
}
public function getFileInfo($constructor)
{
2019-09-18 21:31:51 +02:00
return $this->__call(__FUNCTION__, [$constructor]);
2019-09-18 20:46:20 +02:00
}
public function getPropicInfo($data)
{
2019-09-18 21:31:51 +02:00
return $this->__call(__FUNCTION__, [$data]);
2019-09-18 20:46:20 +02:00
}
public function getDownloadInfo($message_media)
{
2019-09-18 21:31:51 +02:00
return $this->__call(__FUNCTION__, [$message_media]);
2019-09-18 20:46:20 +02:00
}
public function extractPhotosize($photo)
{
2019-09-18 21:31:51 +02:00
return $this->__call(__FUNCTION__, [$photo]);
2019-09-18 20:46:20 +02:00
}
public function downloadToDir($message_media, $dir, $cb = null)
{
2019-09-18 21:31:51 +02:00
return $this->__call(__FUNCTION__, [$message_media, $dir, $cb]);
2019-09-18 20:46:20 +02:00
}
public function downloadToFile($message_media, $file, $cb = null)
{
2019-09-18 21:31:51 +02:00
return $this->__call(__FUNCTION__, [$message_media, $file, $cb]);
2019-09-18 20:46:20 +02:00
}
public function downloadToStream($message_media, $stream, $cb = null, $offset = 0, $end = -1)
{
2019-09-18 21:31:51 +02:00
return $this->__call(__FUNCTION__, [$message_media, $stream, $cb, $offset, $end]);
2019-09-18 20:46:20 +02:00
}
public function downloadToCallable($message_media, $callable, $cb = null, $parallelize = true, $offset = 0, $end = -1, ?int $part_size = null)
{
2019-09-18 21:31:51 +02:00
return $this->__call(__FUNCTION__, [$message_media, $callable, $cb, $parallelize, $offset, $end, $part_size]);
2019-09-18 20:46:20 +02:00
}
public function acceptSecretChat($params)
{
2019-09-18 21:31:51 +02:00
return $this->__call(__FUNCTION__, [$params]);
2019-09-18 20:46:20 +02:00
}
public function requestSecretChat($user)
{
2019-09-18 21:31:51 +02:00
return $this->__call(__FUNCTION__, [$user]);
2019-09-18 20:46:20 +02:00
}
public function completeSecretChat($params)
{
2019-09-18 21:31:51 +02:00
return $this->__call(__FUNCTION__, [$params]);
2019-09-18 20:46:20 +02:00
}
public function notifyLayer($chat)
{
2019-09-18 21:31:51 +02:00
return $this->__call(__FUNCTION__, [$chat]);
2019-09-18 20:46:20 +02:00
}
public function rekey($chat)
{
2019-09-18 21:31:51 +02:00
return $this->__call(__FUNCTION__, [$chat]);
2019-09-18 20:46:20 +02:00
}
public function acceptRekey($chat, $params)
{
2019-09-18 21:31:51 +02:00
return $this->__call(__FUNCTION__, [$chat, $params]);
2019-09-18 20:46:20 +02:00
}
public function commitRekey($chat, $params)
{
2019-09-18 21:31:51 +02:00
return $this->__call(__FUNCTION__, [$chat, $params]);
2019-09-18 20:46:20 +02:00
}
public function completeRekey($chat, $params)
{
2019-09-18 21:31:51 +02:00
return $this->__call(__FUNCTION__, [$chat, $params]);
2019-09-18 20:46:20 +02:00
}
public function secretChatStatus($chat)
{
2019-09-18 21:31:51 +02:00
return $this->__call(__FUNCTION__, [$chat]);
2019-09-18 20:46:20 +02:00
}
public function getSecretChat($chat)
{
2019-09-18 21:31:51 +02:00
return $this->__call(__FUNCTION__, [$chat]);
2019-09-18 20:46:20 +02:00
}
public function discardSecretChat($chat)
{
2019-09-18 21:31:51 +02:00
return $this->__call(__FUNCTION__, [$chat]);
2019-09-18 20:46:20 +02:00
}
public function encryptSecretMessage($chat_id, $message)
{
2019-09-18 21:31:51 +02:00
return $this->__call(__FUNCTION__, [$chat_id, $message]);
2019-09-18 20:46:20 +02:00
}
public function handleEncryptedUpdate($message, $test = false)
{
2019-09-18 21:31:51 +02:00
return $this->__call(__FUNCTION__, [$message, $test]);
2019-09-18 20:46:20 +02:00
}
2019-09-18 21:21:34 +02:00
public function tryMTProtoV1Decrypt($message_key, $chat_id, $old, $encrypted_data)
2019-09-18 20:46:20 +02:00
{
2019-09-18 21:31:51 +02:00
return $this->__call(__FUNCTION__, [$message_key, $chat_id, $old, $encrypted_data]);
2019-09-18 20:46:20 +02:00
}
2019-09-18 21:21:34 +02:00
public function tryMTProtoV2Decrypt($message_key, $chat_id, $old, $encrypted_data)
2019-09-18 20:46:20 +02:00
{
2019-09-18 21:31:51 +02:00
return $this->__call(__FUNCTION__, [$message_key, $chat_id, $old, $encrypted_data]);
2019-09-18 20:46:20 +02:00
}
public function handleDecryptedUpdate($update)
{
2019-09-18 21:31:51 +02:00
return $this->__call(__FUNCTION__, [$update]);
2019-09-18 20:46:20 +02:00
}
public function checkSecretInSeqNo($chat_id, $seqno)
{
2019-09-18 21:31:51 +02:00
return $this->__call(__FUNCTION__, [$chat_id, $seqno]);
2019-09-18 20:46:20 +02:00
}
public function checkSecretOutSeqNo($chat_id, $seqno)
{
2019-09-18 21:31:51 +02:00
return $this->__call(__FUNCTION__, [$chat_id, $seqno]);
2019-09-18 20:46:20 +02:00
}
public function generateSecretInSeqNo($chat)
{
2019-09-18 21:31:51 +02:00
return $this->__call(__FUNCTION__, [$chat]);
2019-09-18 20:46:20 +02:00
}
public function generateSecretOutSeqNo($chat)
{
2019-09-18 21:31:51 +02:00
return $this->__call(__FUNCTION__, [$chat]);
2019-09-18 20:46:20 +02:00
}
public function constructTl($files, $objects = array (
))
{
2019-09-18 21:31:51 +02:00
return $this->__call(__FUNCTION__, [$files, $objects]);
2019-09-18 20:46:20 +02:00
}
public function getMethodNamespaces()
{
2019-09-18 21:31:51 +02:00
return $this->__call(__FUNCTION__, []);
2019-09-18 20:46:20 +02:00
}
public function getMethodsNamespaced()
{
2019-09-18 21:31:51 +02:00
return $this->__call(__FUNCTION__, []);
2019-09-18 20:46:20 +02:00
}
public function updateCallbacks($objects)
{
2019-09-18 21:31:51 +02:00
return $this->__call(__FUNCTION__, [$objects]);
2019-09-18 20:46:20 +02:00
}
public function deserializeBool($id)
{
2019-09-18 21:31:51 +02:00
return $this->__call(__FUNCTION__, [$id]);
2019-09-18 20:46:20 +02:00
}
public function serializeObject($type, $object, $ctx, $layer = -1)
{
2019-09-18 21:31:51 +02:00
return $this->__call(__FUNCTION__, [$type, $object, $ctx, $layer]);
2019-09-18 20:46:20 +02:00
}
public function serializeMethod($method, $arguments)
{
2019-09-18 21:31:51 +02:00
return $this->__call(__FUNCTION__, [$method, $arguments]);
2019-09-18 20:46:20 +02:00
}
public function serializeParams($tl, $arguments, $ctx, $layer = -1)
{
2019-09-18 21:31:51 +02:00
return $this->__call(__FUNCTION__, [$tl, $arguments, $ctx, $layer]);
2019-09-18 20:46:20 +02:00
}
public function getLength($stream, $type = array (
'type' => '',
))
{
2019-09-18 21:31:51 +02:00
return $this->__call(__FUNCTION__, [$stream, $type]);
2019-09-18 20:46:20 +02:00
}
/**
* :type stream: io.BytesIO object.
*/
public function deserialize($stream, $type = array (
'type' => '',
))
{
2019-09-18 21:31:51 +02:00
return $this->__call(__FUNCTION__, [$stream, $type]);
2019-09-18 20:46:20 +02:00
}
public function htmlEntityDecode($stuff)
{
2019-09-18 21:31:51 +02:00
return $this->__call(__FUNCTION__, [$stuff]);
2019-09-18 20:46:20 +02:00
}
public function mbStrlen($text)
{
2019-09-18 21:31:51 +02:00
return $this->__call(__FUNCTION__, [$text]);
2019-09-18 20:46:20 +02:00
}
public function mbSubstr($text, $offset, $length = null)
{
2019-09-18 21:31:51 +02:00
return $this->__call(__FUNCTION__, [$text, $offset, $length]);
2019-09-18 20:46:20 +02:00
}
public function mbStrSplit($text, $length)
{
2019-09-18 21:31:51 +02:00
return $this->__call(__FUNCTION__, [$text, $length]);
2019-09-18 20:46:20 +02:00
}
public function parseButtons($rows)
{
2019-09-18 21:31:51 +02:00
return $this->__call(__FUNCTION__, [$rows]);
2019-09-18 20:46:20 +02:00
}
public function parseReplyMarkup($markup)
{
2019-09-18 21:31:51 +02:00
return $this->__call(__FUNCTION__, [$markup]);
2019-09-18 20:46:20 +02:00
}
2019-09-18 21:21:34 +02:00
public function MTProtoToBotAPI($data, $sent_arguments = array (
2019-09-18 20:46:20 +02:00
))
{
2019-09-18 21:31:51 +02:00
return $this->__call(__FUNCTION__, [$data, $sent_arguments]);
2019-09-18 20:46:20 +02:00
}
public function botAPIToMTProto($arguments)
{
2019-09-18 21:31:51 +02:00
return $this->__call(__FUNCTION__, [$arguments]);
2019-09-18 20:46:20 +02:00
}
public function parseNode($node, &$entities, &$new_message, &$offset)
{
2019-09-18 21:31:51 +02:00
return $this->__call(__FUNCTION__, [$node, $entities, $new_message, $offset]);
2019-09-18 20:46:20 +02:00
}
public function parseMode($arguments)
{
2019-09-18 21:31:51 +02:00
return $this->__call(__FUNCTION__, [$arguments]);
2019-09-18 20:46:20 +02:00
}
public function splitToChunks($args)
{
2019-09-18 21:31:51 +02:00
return $this->__call(__FUNCTION__, [$args]);
2019-09-18 20:46:20 +02:00
}
public function multipleExplodeKeepDelimiters($delimiters, $string)
{
2019-09-18 21:31:51 +02:00
return $this->__call(__FUNCTION__, [$delimiters, $string]);
2019-09-18 20:46:20 +02:00
}
public function htmlFixtags($text)
{
2019-09-18 21:31:51 +02:00
return $this->__call(__FUNCTION__, [$text]);
2019-09-18 20:46:20 +02:00
}
public function buildRows($button_list)
{
2019-09-18 21:31:51 +02:00
return $this->__call(__FUNCTION__, [$button_list]);
2019-09-18 20:46:20 +02:00
}
public function base64urlDecode($data)
{
2019-09-18 21:31:51 +02:00
return $this->__call(__FUNCTION__, [$data]);
2019-09-18 20:46:20 +02:00
}
public function base64urlEncode($data)
{
2019-09-18 21:31:51 +02:00
return $this->__call(__FUNCTION__, [$data]);
2019-09-18 20:46:20 +02:00
}
public function rleDecode($string)
{
2019-09-18 21:31:51 +02:00
return $this->__call(__FUNCTION__, [$string]);
2019-09-18 20:46:20 +02:00
}
public function rleEncode($string)
{
2019-09-18 21:31:51 +02:00
return $this->__call(__FUNCTION__, [$string]);
2019-09-18 20:46:20 +02:00
}
2019-09-18 21:21:34 +02:00
public function photosizeToBotAPI($photoSize, $photo, $thumbnail = false)
2019-09-18 20:46:20 +02:00
{
2019-09-18 21:31:51 +02:00
return $this->__call(__FUNCTION__, [$photoSize, $photo, $thumbnail]);
2019-09-18 20:46:20 +02:00
}
public function unpackFileId($file_id)
{
2019-09-18 21:31:51 +02:00
return $this->__call(__FUNCTION__, [$file_id]);
2019-09-18 20:46:20 +02:00
}
public function getMimeFromExtension($extension, $default)
{
2019-09-18 21:31:51 +02:00
return $this->__call(__FUNCTION__, [$extension, $default]);
2019-09-18 20:46:20 +02:00
}
public function getExtensionFromMime($mime)
{
2019-09-18 21:31:51 +02:00
return $this->__call(__FUNCTION__, [$mime]);
2019-09-18 20:46:20 +02:00
}
public function getExtensionFromLocation($location, $default)
{
2019-09-18 21:31:51 +02:00
return $this->__call(__FUNCTION__, [$location, $default]);
2019-09-18 20:46:20 +02:00
}
public function getMimeFromFile($file)
{
2019-09-18 21:31:51 +02:00
return $this->__call(__FUNCTION__, [$file]);
2019-09-18 20:46:20 +02:00
}
public function getMimeFromBuffer($buffer)
{
2019-09-18 21:31:51 +02:00
return $this->__call(__FUNCTION__, [$buffer]);
2019-09-18 20:46:20 +02:00
}
public function tdcliToTd(&$params, $key = null)
{
2019-09-18 21:31:51 +02:00
return $this->__call(__FUNCTION__, [$params, $key]);
2019-09-18 20:46:20 +02:00
}
2019-09-18 21:21:34 +02:00
public function tdToMTProto($params)
2019-09-18 20:46:20 +02:00
{
2019-09-18 21:31:51 +02:00
return $this->__call(__FUNCTION__, [$params]);
2019-09-18 20:46:20 +02:00
}
2019-09-18 21:21:34 +02:00
public function MTProtoToTdcli($params)
2019-09-18 20:46:20 +02:00
{
2019-09-18 21:31:51 +02:00
return $this->__call(__FUNCTION__, [$params]);
2019-09-18 20:46:20 +02:00
}
2019-09-18 21:21:34 +02:00
public function MTProtoToTd(&$params)
2019-09-18 20:46:20 +02:00
{
2019-09-18 21:31:51 +02:00
return $this->__call(__FUNCTION__, [$params]);
2019-09-18 20:46:20 +02:00
}
public function tdToTdcli($params)
{
2019-09-18 21:31:51 +02:00
return $this->__call(__FUNCTION__, [$params]);
2019-09-18 20:46:20 +02:00
}
public function genVectorHash($ints)
{
2019-09-18 21:31:51 +02:00
return $this->__call(__FUNCTION__, [$ints]);
2019-09-18 20:46:20 +02:00
}
public function randomInt($modulus = false)
{
2019-09-18 21:31:51 +02:00
return $this->__call(__FUNCTION__, [$modulus]);
2019-09-18 20:46:20 +02:00
}
public function random($length)
{
2019-09-18 21:31:51 +02:00
return $this->__call(__FUNCTION__, [$length]);
2019-09-18 20:46:20 +02:00
}
/**
* posmod(numeric,numeric) : numeric
* Works just like the % (modulus) operator, only returns always a postive number.
*/
public function posmod($a, $b)
{
2019-09-18 21:31:51 +02:00
return $this->__call(__FUNCTION__, [$a, $b]);
2019-09-18 20:46:20 +02:00
}
public function unpackSignedInt($value)
{
2019-09-18 21:31:51 +02:00
return $this->__call(__FUNCTION__, [$value]);
2019-09-18 20:46:20 +02:00
}
public function unpackSignedLong($value)
{
2019-09-18 21:31:51 +02:00
return $this->__call(__FUNCTION__, [$value]);
2019-09-18 20:46:20 +02:00
}
public function unpackSignedLongString($value)
{
2019-09-18 21:31:51 +02:00
return $this->__call(__FUNCTION__, [$value]);
2019-09-18 20:46:20 +02:00
}
public function packSignedInt($value)
{
2019-09-18 21:31:51 +02:00
return $this->__call(__FUNCTION__, [$value]);
2019-09-18 20:46:20 +02:00
}
public function packSignedLong($value)
{
2019-09-18 21:31:51 +02:00
return $this->__call(__FUNCTION__, [$value]);
2019-09-18 20:46:20 +02:00
}
public function packUnsignedInt($value)
{
2019-09-18 21:31:51 +02:00
return $this->__call(__FUNCTION__, [$value]);
2019-09-18 20:46:20 +02:00
}
public function packDouble($value)
{
2019-09-18 21:31:51 +02:00
return $this->__call(__FUNCTION__, [$value]);
2019-09-18 20:46:20 +02:00
}
public function unpackDouble($value)
{
2019-09-18 21:31:51 +02:00
return $this->__call(__FUNCTION__, [$value]);
2019-09-18 20:46:20 +02:00
}
public function wait($promise, $ignoreSignal = false)
{
2019-09-18 21:31:51 +02:00
return $this->__call(__FUNCTION__, [$promise, $ignoreSignal]);
2019-09-18 20:46:20 +02:00
}
public function all($promises)
{
2019-09-18 21:31:51 +02:00
return $this->__call(__FUNCTION__, [$promises]);
2019-09-18 20:46:20 +02:00
}
public function any($promises)
{
2019-09-18 21:31:51 +02:00
return $this->__call(__FUNCTION__, [$promises]);
2019-09-18 20:46:20 +02:00
}
public function some($promises)
{
2019-09-18 21:31:51 +02:00
return $this->__call(__FUNCTION__, [$promises]);
2019-09-18 20:46:20 +02:00
}
public function first($promises)
{
2019-09-18 21:31:51 +02:00
return $this->__call(__FUNCTION__, [$promises]);
2019-09-18 20:46:20 +02:00
}
public function timeout($promise, $timeout)
{
2019-09-18 21:31:51 +02:00
return $this->__call(__FUNCTION__, [$promise, $timeout]);
2019-09-18 20:46:20 +02:00
}
public function call($promise)
{
2019-09-18 21:31:51 +02:00
return $this->__call(__FUNCTION__, [$promise]);
2019-09-18 20:46:20 +02:00
}
public function callFork($promise, $actual = null, $file = '')
{
2019-09-18 21:31:51 +02:00
return $this->__call(__FUNCTION__, [$promise, $actual, $file]);
2019-09-18 20:46:20 +02:00
}
public function callForkDefer($promise)
{
2019-09-18 21:31:51 +02:00
return $this->__call(__FUNCTION__, [$promise]);
2019-09-18 20:46:20 +02:00
}
public function rethrow($e, $file = '')
{
2019-09-18 21:31:51 +02:00
return $this->__call(__FUNCTION__, [$e, $file]);
2019-09-18 20:46:20 +02:00
}
public function after($a, $b)
{
2019-09-18 21:31:51 +02:00
return $this->__call(__FUNCTION__, [$a, $b]);
2019-09-18 20:46:20 +02:00
}
public function flock(string $file, int $operation, $polling)
{
2019-09-18 21:31:51 +02:00
return $this->__call(__FUNCTION__, [$file, $operation, $polling]);
2019-09-18 20:46:20 +02:00
}
public function noCache(int $status, string $message)
{
2019-09-18 21:31:51 +02:00
return $this->__call(__FUNCTION__, [$status, $message]);
2019-09-18 20:46:20 +02:00
}
public function sleep($time)
{
2019-09-18 21:31:51 +02:00
return $this->__call(__FUNCTION__, [$time]);
2019-09-18 20:46:20 +02:00
}
public function readLine($prompt = '')
{
2019-09-18 21:31:51 +02:00
return $this->__call(__FUNCTION__, [$prompt]);
2019-09-18 20:46:20 +02:00
}
public function echo($string)
{
2019-09-18 21:31:51 +02:00
return $this->__call(__FUNCTION__, [$string]);
2019-09-18 20:46:20 +02:00
}
public function isArrayOrAlike($var)
{
2019-09-18 21:31:51 +02:00
return $this->__call(__FUNCTION__, [$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
*
* @param string $input
2019-09-18 21:21:34 +02:00
*
2019-09-18 20:46:20 +02:00
* @return string
*/
public function fromSnakeCase(string $input): string
{
2019-09-18 21:31:51 +02:00
return $this->__call(__FUNCTION__, [$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
*
* @param string $input
2019-09-18 21:21:34 +02:00
*
2019-09-18 20:46:20 +02:00
* @return string
*/
public function fromCamelCase(string $input): string
{
2019-09-18 21:31:51 +02:00
return $this->__call(__FUNCTION__, [$input]);
2019-09-18 20:46:20 +02:00
}
2019-09-18 21:21:34 +02:00
/**
* Create array
*
* @param mixed ...$params Params
*
* @return array
*/
public function arr(...$params): array
{
2019-09-18 21:31:51 +02:00
return $this->__call(__FUNCTION__, Tools::arr(...$params));
2019-09-18 21:21:34 +02:00
}
2019-09-18 20:46:20 +02:00
public function requestCall($user)
{
2019-09-18 21:31:51 +02:00
return $this->__call(__FUNCTION__, [$user]);
2019-09-18 20:46:20 +02:00
}
public function acceptCall($call)
{
2019-09-18 21:31:51 +02:00
return $this->__call(__FUNCTION__, [$call]);
2019-09-18 20:46:20 +02:00
}
public function discardCall($call, $reason, $rating = array (
), $need_debug = true)
{
2019-09-18 21:31:51 +02:00
return $this->__call(__FUNCTION__, [$call, $reason, $rating, $need_debug]);
2019-09-18 20:46:20 +02:00
}
public function confirmCall($params)
{
2019-09-18 21:31:51 +02:00
return $this->__call(__FUNCTION__, [$params]);
2019-09-18 20:46:20 +02:00
}
public function completeCall($params)
{
2019-09-18 21:31:51 +02:00
return $this->__call(__FUNCTION__, [$params]);
2019-09-18 20:46:20 +02:00
}
public function callStatus($id)
{
2019-09-18 21:31:51 +02:00
return $this->__call(__FUNCTION__, [$id]);
2019-09-18 20:46:20 +02:00
}
public function getCall($call)
{
2019-09-18 21:31:51 +02:00
return $this->__call(__FUNCTION__, [$call]);
2019-09-18 20:46:20 +02:00
}
public function checkCalls()
{
2019-09-18 21:31:51 +02:00
return $this->__call(__FUNCTION__, []);
2019-09-18 20:46:20 +02:00
}
public function getDialogs($force = true)
{
2019-09-18 21:31:51 +02:00
return $this->__call(__FUNCTION__, [$force]);
2019-09-18 20:46:20 +02:00
}
public function getFullDialogs($force = true)
{
2019-09-18 21:31:51 +02:00
return $this->__call(__FUNCTION__, [$force]);
2019-09-18 20:46:20 +02:00
}
public function setEventHandler($event_handler)
{
2019-09-18 21:31:51 +02:00
return $this->__call(__FUNCTION__, [$event_handler]);
2019-09-18 20:46:20 +02:00
}
public function getEventHandler()
{
2019-09-18 21:31:51 +02:00
return $this->__call(__FUNCTION__, []);
2019-09-18 20:46:20 +02:00
}
public function eventUpdateHandler($update)
{
2019-09-18 21:31:51 +02:00
return $this->__call(__FUNCTION__, [$update]);
2019-09-18 20:46:20 +02:00
}
public function setWebhook($hook_url, $pem_path = null)
{
2019-09-18 21:31:51 +02:00
return $this->__call(__FUNCTION__, [$hook_url, $pem_path]);
2019-09-18 20:46:20 +02:00
}
public function setCallback($callback)
{
2019-09-18 21:31:51 +02:00
return $this->__call(__FUNCTION__, [$callback]);
2019-09-18 20:46:20 +02:00
}
public function logout()
{
2019-09-18 21:31:51 +02:00
return $this->__call(__FUNCTION__, []);
2019-09-18 20:46:20 +02:00
}
public function botLogin($token)
{
2019-09-18 21:31:51 +02:00
return $this->__call(__FUNCTION__, [$token]);
2019-09-18 20:46:20 +02:00
}
public function phoneLogin($number, $sms_type = 5)
{
2019-09-18 21:31:51 +02:00
return $this->__call(__FUNCTION__, [$number, $sms_type]);
2019-09-18 20:46:20 +02:00
}
public function completePhoneLogin($code)
{
2019-09-18 21:31:51 +02:00
return $this->__call(__FUNCTION__, [$code]);
2019-09-18 20:46:20 +02:00
}
public function importAuthorization($authorization)
{
2019-09-18 21:31:51 +02:00
return $this->__call(__FUNCTION__, [$authorization]);
2019-09-18 20:46:20 +02:00
}
public function exportAuthorization()
{
2019-09-18 21:31:51 +02:00
return $this->__call(__FUNCTION__, []);
2019-09-18 20:46:20 +02:00
}
public function completeSignup($first_name, $last_name)
{
2019-09-18 21:31:51 +02:00
return $this->__call(__FUNCTION__, [$first_name, $last_name]);
2019-09-18 20:46:20 +02:00
}
public function complete2faLogin($password)
{
2019-09-18 21:31:51 +02:00
return $this->__call(__FUNCTION__, [$password]);
2019-09-18 20:46:20 +02:00
}
/**
* Update the 2FA password.
*
* The params array can contain password, new_password, email and hint params.
*
* @param array $params The params
* @return void
*/
public function update2fa(array $params)
{
2019-09-18 21:31:51 +02:00
return $this->__call(__FUNCTION__, [$params]);
2019-09-18 20:46:20 +02:00
}
public function setLoopCallback($callback)
{
2019-09-18 21:31:51 +02:00
return $this->__call(__FUNCTION__, [$callback]);
2019-09-18 20:46:20 +02:00
}
public function loop($max_forks = 0)
{
2019-09-18 21:31:51 +02:00
return $this->__call(__FUNCTION__, [$max_forks]);
2019-09-18 20:46:20 +02:00
}
public function closeConnection($message = 'OK!')
{
2019-09-18 21:31:51 +02:00
return $this->__call(__FUNCTION__, [$message]);
2019-09-18 20:46:20 +02:00
}
public function setNoop()
{
2019-09-18 21:31:51 +02:00
return $this->__call(__FUNCTION__, []);
2019-09-18 20:46:20 +02:00
}
public function noop()
{
2019-09-18 21:31:51 +02:00
return $this->__call(__FUNCTION__, []);
2019-09-18 20:46:20 +02:00
}
public function start()
{
2019-09-18 21:31:51 +02:00
return $this->__call(__FUNCTION__, []);
2019-09-18 20:46:20 +02:00
}
public function webPhoneLogin()
{
2019-09-18 21:31:51 +02:00
return $this->__call(__FUNCTION__, []);
2019-09-18 20:46:20 +02:00
}
public function webCompletePhoneLogin()
{
2019-09-18 21:31:51 +02:00
return $this->__call(__FUNCTION__, []);
2019-09-18 20:46:20 +02:00
}
public function webComplete2faLogin()
{
2019-09-18 21:31:51 +02:00
return $this->__call(__FUNCTION__, []);
2019-09-18 20:46:20 +02:00
}
public function webCompleteSignup()
{
2019-09-18 21:31:51 +02:00
return $this->__call(__FUNCTION__, []);
2019-09-18 20:46:20 +02:00
}
public function webBotLogin()
{
2019-09-18 21:31:51 +02:00
return $this->__call(__FUNCTION__, []);
2019-09-18 20:46:20 +02:00
}
public function webEcho($message = '')
{
2019-09-18 21:31:51 +02:00
return $this->__call(__FUNCTION__, [$message]);
2019-09-18 20:46:20 +02:00
}
public function webEchoTemplate($message, $form)
{
2019-09-18 21:31:51 +02:00
return $this->__call(__FUNCTION__, [$message, $form]);
2019-09-18 20:46:20 +02:00
}
public function getWebTemplate()
{
2019-09-18 21:31:51 +02:00
return $this->__call(__FUNCTION__, []);
2019-09-18 20:46:20 +02:00
}
public function setWebTemplate($template)
{
2019-09-18 21:31:51 +02:00
return $this->__call(__FUNCTION__, [$template]);
2019-09-18 20:46:20 +02:00
}
public function checkTos()
{
2019-09-18 21:31:51 +02:00
return $this->__call(__FUNCTION__, []);
2019-09-18 20:46:20 +02:00
}
public function acceptTos()
{
2019-09-18 21:31:51 +02:00
return $this->__call(__FUNCTION__, []);
2019-09-18 20:46:20 +02:00
}
public function declineTos()
{
2019-09-18 21:31:51 +02:00
return $this->__call(__FUNCTION__, []);
2019-09-18 20:46:20 +02:00
}
}