MadelineProto/src/danog/MadelineProto/InternalDoc.php

5368 lines
154 KiB
PHP

<?php
/**
* This file is automatic generated by build_docs.php file
* and is used only for autocomplete in multiple IDE
* don't modify manually.
*/
namespace danog\MadelineProto;
interface auth
{
/**
* Use phoneLogin instead.
*
* Parameters:
* * `string` **phone_number** - Use phoneLogin instead
* * `int` **api_id** - Use phoneLogin instead
* * `string` **api_hash** - Use phoneLogin instead
* * `CodeSettings` **settings** - You cannot use this method directly, use the phoneLogin method instead (see https://docs.madelineproto.xyz for more info)
*
* @param array $params Parameters
*
* @return auth.SentCode
*/
public function sendCode($params);
/**
* You cannot use this method directly, use the completeSignup method instead (see https://docs.madelineproto.xyz for more info).
*
* Parameters:
* * `string` **phone_number** - You cannot use this method directly, use the completeSignup method instead (see https://docs.madelineproto.xyz for more info)
* * `string` **phone_code_hash** - You cannot use this method directly, use the completeSignup method instead (see https://docs.madelineproto.xyz for more info)
* * `string` **first_name** - You cannot use this method directly, use the completeSignup method instead (see https://docs.madelineproto.xyz for more info)
* * `string` **last_name** - You cannot use this method directly, use the completeSignup method instead (see https://docs.madelineproto.xyz for more info)
*
* @param array $params Parameters
*
* @return auth.Authorization
*/
public function signUp($params);
/**
* You cannot use this method directly, use the completePhoneLogin method instead (see https://docs.madelineproto.xyz for more info).
*
* Parameters:
* * `string` **phone_number** - You cannot use this method directly, use the completePhoneLogin method instead (see https://docs.madelineproto.xyz for more info)
* * `string` **phone_code_hash** - You cannot use this method directly, use the completePhoneLogin method instead (see https://docs.madelineproto.xyz for more info)
* * `string` **phone_code** - You cannot use this method directly, use the completePhoneLogin method instead (see https://docs.madelineproto.xyz for more info)
*
* @param array $params Parameters
*
* @return auth.Authorization
*/
public function signIn($params);
/**
* You cannot use this method directly, use the logout method instead (see https://docs.madelineproto.xyz for more info).
*
* @return bool
*/
public function logOut();
/**
* Delete all logged-in sessions.
*
* @return bool
*/
public function resetAuthorizations();
/**
* You cannot use this method directly, use $MadelineProto->exportAuthorization() instead, see https://docs.madelineproto.xyz/docs/LOGIN.html.
*
* Parameters:
* * `int` **dc_id** - You cannot use this method directly, use $MadelineProto->exportAuthorization() instead, see https://docs.madelineproto.xyz/docs/LOGIN.html
*
* @param array $params Parameters
*
* @return auth.ExportedAuthorization
*/
public function exportAuthorization($params);
/**
* You cannot use this method directly, use $MadelineProto->importAuthorization($authorization) instead, see https://docs.madelineproto.xyz/docs/LOGIN.html.
*
* Parameters:
* * `int` **id** - You cannot use this method directly, use $MadelineProto->importAuthorization($authorization) instead, see https://docs.madelineproto.xyz/docs/LOGIN.html
* * `bytes` **bytes** - You cannot use this method directly, use $MadelineProto->importAuthorization($authorization) instead, see https://docs.madelineproto.xyz/docs/LOGIN.html
*
* @param array $params Parameters
*
* @return auth.Authorization
*/
public function importAuthorization($params);
/**
* 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
*/
public function bindTempAuthKey($params);
/**
* You cannot use this method directly, use the botLogin method instead (see https://docs.madelineproto.xyz for more info).
*
* Parameters:
* * `int` **api_id** - You cannot use this method directly, use the botLogin method instead (see https://docs.madelineproto.xyz for more info)
* * `string` **api_hash** - You cannot use this method directly, use the botLogin method instead (see https://docs.madelineproto.xyz for more info)
* * `string` **bot_auth_token** - You cannot use this method directly, use the botLogin method instead (see https://docs.madelineproto.xyz for more info)
*
* @param array $params Parameters
*
* @return auth.Authorization
*/
public function importBotAuthorization($params);
/**
* You cannot use this method directly, use the complete_2fa_login method instead (see https://docs.madelineproto.xyz for more info).
*
* 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
*/
public function checkPassword($params);
/**
* Send an email to recover the 2FA password.
*
* @return auth.PasswordRecovery
*/
public function requestPasswordRecovery();
/**
* Use the code that was emailed to you after running $MadelineProto->auth->requestPasswordRecovery to login to your account.
*
* Parameters:
* * `string` **code** - The code that was emailed to you
*
* @param array $params Parameters
*
* @return auth.Authorization
*/
public function recoverPassword($params);
/**
* Resend the SMS verification code.
*
* Parameters:
* * `string` **phone_number** - The phone number
* * `string` **phone_code_hash** - The phone code hash
*
* @param array $params Parameters
*
* @return auth.SentCode
*/
public function resendCode($params);
/**
* Invalidate sent phone code.
*
* Parameters:
* * `string` **phone_number** - Phone number
* * `string` **phone_code_hash** - Phone code hash
*
* @param array $params Parameters
*
* @return bool
*/
public function cancelCode($params);
/**
* Delete all temporary authorization keys except the ones provided.
*
* Parameters:
* * `[long]` **except_auth_keys** - The temporary authorization keys to keep
*
* @param array $params Parameters
*
* @return bool
*/
public function dropTempAuthKeys($params);
}
interface account
{
/**
* 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
*/
public function registerDevice($params);
/**
* 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
*/
public function unregisterDevice($params);
/**
* 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
*/
public function updateNotifySettings($params);
/**
* Get notification settings.
*
* Parameters:
* * `InputNotifyPeer` **peer** - Notification source
*
* @param array $params Parameters
*
* @return PeerNotifySettings
*/
public function getNotifySettings($params);
/**
* Reset all notification settings.
*
* @return bool
*/
public function resetNotifySettings();
/**
* 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
*/
public function updateProfile($params);
/**
* Update online status.
*
* Parameters:
* * `Bool` **offline** - True to set the status to offline
*
* @param array $params Parameters
*
* @return bool
*/
public function updateStatus($params);
/**
* Returns a list of available wallpapers.
*
* Parameters:
* * `[int]` **hash** - Optional: IDs of previously fetched wallpapers
*
* @param array $params Parameters
*
* @return account.WallPapers
*/
public function getWallPapers($params);
/**
* Report for spam.
*
* Parameters:
* * `InputPeer` **peer** - The peer to report
* * `ReportReason` **reason** - Why are you reporting this peer
*
* @param array $params Parameters
*
* @return bool
*/
public function reportPeer($params);
/**
* Check if this username is available.
*
* Parameters:
* * `string` **username** - The username to check
*
* @param array $params Parameters
*
* @return bool
*/
public function checkUsername($params);
/**
* Update this user's username.
*
* Parameters:
* * `string` **username** - The new username
*
* @param array $params Parameters
*
* @return User
*/
public function updateUsername($params);
/**
* Get privacy settings.
*
* Parameters:
* * `InputPrivacyKey` **key** - Privacy setting key
*
* @param array $params Parameters
*
* @return account.PrivacyRules
*/
public function getPrivacy($params);
/**
* Set privacy settings.
*
* Parameters:
* * `InputPrivacyKey` **key** - Privacy setting
* * `[InputPrivacyRule]` **rules** - Privacy settings
*
* @param array $params Parameters
*
* @return account.PrivacyRules
*/
public function setPrivacy($params);
/**
* Delete this account.
*
* Parameters:
* * `string` **reason** - Why are you going away? :(
*
* @param array $params Parameters
*
* @return bool
*/
public function deleteAccount($params);
/**
* Get account TTL.
*
* @return AccountDaysTTL
*/
public function getAccountTTL();
/**
* Set account TTL.
*
* Parameters:
* * `AccountDaysTTL` **ttl** - Time To Live of account
*
* @param array $params Parameters
*
* @return bool
*/
public function setAccountTTL($params);
/**
* Change the phone number.
*
* Parameters:
* * `string` **phone_number** - New phone number
* * `CodeSettings` **settings** - Code settings
*
* @param array $params Parameters
*
* @return auth.SentCode
*/
public function sendChangePhoneCode($params);
/**
* 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
*
* @return User
*/
public function changePhone($params);
/**
* Disable all notifications for a certain period.
*
* Parameters:
* * `int` **period** - For how long should notifications be disabled
*
* @param array $params Parameters
*
* @return bool
*/
public function updateDeviceLocked($params);
/**
* Get all logged-in authorizations.
*
* @return account.Authorizations
*/
public function getAuthorizations();
/**
* Delete a certain session.
*
* Parameters:
* * `long` **hash** - The session hash, obtained from $MadelineProto->account->getAuthorizations
*
* @param array $params Parameters
*
* @return bool
*/
public function resetAuthorization($params);
/**
* Get the current password.
*
* @return account.Password
*/
public function getPassword();
/**
* Get the current 2FA settings.
*
* 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
*/
public function getPasswordSettings($params);
/**
* 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
*
* @return bool
*/
public function updatePasswordSettings($params);
/**
* Send confirmation phone code.
*
* Parameters:
* * `string` **hash** - The hash
* * `CodeSettings` **settings** - Code settings
*
* @param array $params Parameters
*
* @return auth.SentCode
*/
public function sendConfirmPhoneCode($params);
/**
* 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
*
* @return bool
*/
public function confirmPhone($params);
/**
* Get temporary password for buying products through bots.
*
* Parameters:
* * `InputCheckPasswordSRP` **password** - Password
* * `int` **period** - The validity period
*
* @param array $params Parameters
*
* @return account.TmpPassword
*/
public function getTmpPassword($params);
/**
* Get telegram web login authorizations.
*
* @return account.WebAuthorizations
*/
public function getWebAuthorizations();
/**
* Delete a certain telegram web login authorization.
*
* Parameters:
* * `long` **hash** - The authorization's hash
*
* @param array $params Parameters
*
* @return bool
*/
public function resetWebAuthorization($params);
/**
* Reset all telegram web login authorizations.
*
* @return bool
*/
public function resetWebAuthorizations();
/**
* Get all secure telegram passport values.
*
* @return _of_SecureValue[]
*/
public function getAllSecureValues();
/**
* Get secure value for telegram passport.
*
* Parameters:
* * `[SecureValueType]` **types** - Get telegram passport secure parameters
*
* @param array $params Parameters
*
* @return _of_SecureValue[]
*/
public function getSecureValue($params);
/**
* Save telegram passport secure value.
*
* Parameters:
* * `InputSecureValue` **value** - Encrypted value
* * `long` **secure_secret_id** - Secret
*
* @param array $params Parameters
*
* @return SecureValue
*/
public function saveSecureValue($params);
/**
* Delete secure telegram passport value.
*
* Parameters:
* * `[SecureValueType]` **types** - The values to delete
*
* @param array $params Parameters
*
* @return bool
*/
public function deleteSecureValue($params);
/**
* 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
*
* @return account.AuthorizationForm
*/
public function getAuthorizationForm($params);
/**
* 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
*/
public function acceptAuthorization($params);
/**
* Send phone verification code.
*
* Parameters:
* * `string` **phone_number** - The phone number
* * `CodeSettings` **settings** - Code settings
*
* @param array $params Parameters
*
* @return auth.SentCode
*/
public function sendVerifyPhoneCode($params);
/**
* 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
*
* @return bool
*/
public function verifyPhone($params);
/**
* Send email verification code.
*
* Parameters:
* * `string` **email** - Email
*
* @param array $params Parameters
*
* @return account.SentEmailCode
*/
public function sendVerifyEmailCode($params);
/**
* Verify email address.
*
* Parameters:
* * `string` **email** - The email address
* * `string` **code** - The received code
*
* @param array $params Parameters
*
* @return bool
*/
public function verifyEmail($params);
/**
* 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
*
* @return account.Takeout
*/
public function initTakeoutSession($params);
/**
* Finish account exporting session.
*
* Parameters:
* * `boolean` **success** - Optional: Did the data export succeed?
*
* @param array $params Parameters
*
* @return bool
*/
public function finishTakeoutSession($params);
/**
* Confirm password recovery using email.
*
* Parameters:
* * `string` **code** - Code
*
* @param array $params Parameters
*
* @return bool
*/
public function confirmPasswordEmail($params);
/**
* Resend password recovery email.
*
* @return bool
*/
public function resendPasswordEmail();
/**
* Cancel password recovery email.
*
* @return bool
*/
public function cancelPasswordEmail();
/**
* Contact signup notification setting value.
*
* @return bool
*/
public function getContactSignUpNotification();
/**
* Set contact sign up notification.
*
* Parameters:
* * `Bool` **silent** - Silent?
*
* @param array $params Parameters
*
* @return bool
*/
public function setContactSignUpNotification($params);
/**
* Get notification exceptions.
*
* Parameters:
* * `boolean` **compare_sound** - Optional: Compare sound?
* * `InputNotifyPeer` **peer** - Optional: Peer
*
* @param array $params Parameters
*
* @return Updates
*/
public function getNotifyExceptions($params);
/**
* Get wallpaper info.
*
* Parameters:
* * `InputWallPaper` **wallpaper** - Wallpaper
*
* @param array $params Parameters
*
* @return WallPaper
*/
public function getWallPaper($params);
/**
* Upload wallpaper.
*
* Parameters:
* * `InputFile` **file** - Image
* * `string` **mime_type** - Mime type
* * `WallPaperSettings` **settings** - Wallpaper settings
*
* @param array $params Parameters
*
* @return WallPaper
*/
public function uploadWallPaper($params);
/**
* Save wallpaper.
*
* Parameters:
* * `InputWallPaper` **wallpaper** - The wallpaper to save
* * `Bool` **unsave** - Delete saved wallpaper
* * `WallPaperSettings` **settings** - The wallpaper to save
*
* @param array $params Parameters
*
* @return bool
*/
public function saveWallPaper($params);
/**
* Install wallpaper.
*
* Parameters:
* * `InputWallPaper` **wallpaper** - Wallpaper to install
* * `WallPaperSettings` **settings** - Wallpaper settings
*
* @param array $params Parameters
*
* @return bool
*/
public function installWallPaper($params);
/**
* Reset wallpapers.
*
* @return bool
*/
public function resetWallPapers();
/**
* Get autodownload settings.
*
* @return account.AutoDownloadSettings
*/
public function getAutoDownloadSettings();
/**
* Save autodownload settings.
*
* Parameters:
* * `boolean` **low** - Optional: Low preset
* * `boolean` **high** - Optional: High preset
* * `AutoDownloadSettings` **settings** - Autodownload settings
*
* @param array $params Parameters
*
* @return bool
*/
public function saveAutoDownloadSettings($params);
/**
* Upload theme.
*
* Parameters:
* * `InputFile` **file** - File
* * `InputFile` **thumb** - Optional: Thumb
* * `string` **file_name** - File name
* * `string` **mime_type** - Mime type
*
* @param array $params Parameters
*
* @return Document
*/
public function uploadTheme($params);
/**
* Create a theme.
*
* Parameters:
* * `string` **slug** - Unique theme ID
* * `string` **title** - Theme name
* * `InputDocument` **document** - Theme file
*
* @param array $params Parameters
*
* @return Theme
*/
public function createTheme($params);
/**
* 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
*
* @return Theme
*/
public function updateTheme($params);
/**
* Save theme.
*
* Parameters:
* * `InputTheme` **theme** - Theme to save
* * `Bool` **unsave** - Unsave
*
* @param array $params Parameters
*
* @return bool
*/
public function saveTheme($params);
/**
* 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
*
* @return bool
*/
public function installTheme($params);
/**
* 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
*
* @return Theme
*/
public function getTheme($params);
/**
* Get installed themes.
*
* 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
*/
public function getThemes($params);
}
interface users
{
/**
* Get info about users.
*
* Parameters:
* * `[InputUser]` **id** - The ids of the users
*
* @param array $params Parameters
*
* @return _of_User[]
*/
public function getUsers($params);
/**
* You cannot use this method directly, use the getPwrChat, getInfo, getFullInfo methods instead (see https://docs.madelineproto.xyz for more info).
*
* Parameters:
* * `InputUser` **id** - You cannot use this method directly, use the getPwrChat, getInfo, getFullInfo methods instead (see https://docs.madelineproto.xyz for more info)
*
* @param array $params Parameters
*
* @return UserFull
*/
public function getFullUser($params);
/**
* Set secure value error for telegram passport.
*
* Parameters:
* * `InputUser` **id** - The user ID
* * `[SecureValueError]` **errors** - The errors
*
* @param array $params Parameters
*
* @return bool
*/
public function setSecureValueErrors($params);
}
interface contacts
{
/**
* Get contacts by IDs.
*
* Parameters:
* * `[int]` **hash** - Optional: Previously fetched IDs
*
* @param array $params Parameters
*
* @return _of_int[]
*/
public function getContactIDs($params);
/**
* Get online status of all users.
*
* @return _of_ContactStatus[]
*/
public function getStatuses();
/**
* Get all contacts.
*
* Parameters:
* * `[int]` **hash** - Optional: User IDs of previously cached contacts
*
* @param array $params Parameters
*
* @return contacts.Contacts
*/
public function getContacts($params);
/**
* Add phone number as contact.
*
* Parameters:
* * `[InputContact]` **contacts** - The numbers to import
*
* @param array $params Parameters
*
* @return contacts.ImportedContacts
*/
public function importContacts($params);
/**
* Delete multiple contacts.
*
* Parameters:
* * `[InputUser]` **id** - The contacts to delete
*
* @param array $params Parameters
*
* @return Updates
*/
public function deleteContacts($params);
/**
* Delete contacts by phones.
*
* Parameters:
* * `[string]` **phones** - Phones
*
* @param array $params Parameters
*
* @return bool
*/
public function deleteByPhones($params);
/**
* Block a user.
*
* Parameters:
* * `InputUser` **id** - The user to block
*
* @param array $params Parameters
*
* @return bool
*/
public function block($params);
/**
* Unblock a user.
*
* Parameters:
* * `InputUser` **id** - The user to unblock
*
* @param array $params Parameters
*
* @return bool
*/
public function unblock($params);
/**
* 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
*
* @return contacts.Blocked
*/
public function getBlocked($params);
/**
* Search contacts.
*
* Parameters:
* * `string` **q** - The search query
* * `int` **limit** - How many results should be returned
*
* @param array $params Parameters
*
* @return contacts.Found
*/
public function search($params);
/**
* You cannot use this method directly, use the resolveUsername, getPwrChat, getInfo, getFullInfo methods instead (see https://docs.madelineproto.xyz for more info).
*
* Parameters:
* * `string` **username** - You cannot use this method directly, use the resolveUsername, getPwrChat, getInfo, getFullInfo methods instead (see https://docs.madelineproto.xyz for more info)
*
* @param array $params Parameters
*
* @return contacts.ResolvedPeer
*/
public function resolveUsername($params);
/**
* 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
*
* @return contacts.TopPeers
*/
public function getTopPeers($params);
/**
* Reset top peer rating for a certain category/peer.
*
* Parameters:
* * `TopPeerCategory` **category** - The category
* * `InputPeer` **peer** - The peer
*
* @param array $params Parameters
*
* @return bool
*/
public function resetTopPeerRating($params);
/**
* Reset saved contacts.
*
* @return bool
*/
public function resetSaved();
/**
* Get saved contacts.
*
* @return _of_SavedContact[]
*/
public function getSaved();
/**
* Toggle top peers.
*
* Parameters:
* * `Bool` **enabled** - Enable or disable top peer
*
* @param array $params Parameters
*
* @return bool
*/
public function toggleTopPeers($params);
/**
* 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
*
* @return Updates
*/
public function addContact($params);
/**
* Accept contact.
*
* Parameters:
* * `InputUser` **id** - ID
*
* @param array $params Parameters
*
* @return Updates
*/
public function acceptContact($params);
/**
* Get people nearby (geochats).
*
* Parameters:
* * `InputGeoPoint` **geo_point** - Current location
*
* @param array $params Parameters
*
* @return Updates
*/
public function getLocated($params);
}
interface messages
{
/**
* Get messages.
*
* Parameters:
* * `[InputMessage]` **id** - The IDs of messages to fetch (only for users and normal groups)
*
* @param array $params Parameters
*
* @return messages.Messages
*/
public function getMessages($params);
/**
* Gets list of chats: you should use $MadelineProto->getDialogs() 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
*
* @return messages.Dialogs
*/
public function getDialogs($params);
/**
* 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
*
* @return messages.Messages
*/
public function getHistory($params);
/**
* Search peers or messages.
*
* 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
*/
public function search($params);
/**
* 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
*
* @return messages.AffectedMessages
*/
public function readHistory($params);
/**
* Delete chat history.
*
* 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
*/
public function deleteHistory($params);
/**
* 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
*
* @return messages.AffectedMessages
*/
public function deleteMessages($params);
/**
* Mark messages as read.
*
* Parameters:
* * `int` **max_id** - Maximum message id of messages to mark as read
*
* @param array $params Parameters
*
* @return _of_ReceivedNotifyMessage[]
*/
public function receivedMessages($params);
/**
* Change typing status.
*
* Parameters:
* * `InputPeer` **peer** - Where to change typing status
* * `SendMessageAction` **action** - Typing status
*
* @param array $params Parameters
*
* @return bool
*/
public function setTyping($params);
/**
* 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
*
* @return Updates
*/
public function sendMessage($params);
/**
* 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
*
* @return Updates
*/
public function sendMedia($params);
/**
* 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
*
* @return Updates
*/
public function forwardMessages($params);
/**
* Report a peer for spam.
*
* Parameters:
* * `InputPeer` **peer** - The peer to report
*
* @param array $params Parameters
*
* @return bool
*/
public function reportSpam($params);
/**
* Get the settings of apeer.
*
* Parameters:
* * `InputPeer` **peer** - The peer
*
* @param array $params Parameters
*
* @return PeerSettings
*/
public function getPeerSettings($params);
/**
* 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
*
* @return bool
*/
public function report($params);
/**
* Get info about chats.
*
* Parameters:
* * `[int]` **id** - The MTProto IDs of chats to fetch info about
*
* @param array $params Parameters
*
* @return messages.Chats
*/
public function getChats($params);
/**
* You cannot use this method directly, use the getPwrChat, getInfo, getFullInfo methods instead (see https://docs.madelineproto.xyz for more info).
*
* Parameters:
* * `InputPeer` **chat_id** - You cannot use this method directly, use the getPwrChat, getInfo, getFullInfo methods instead (see https://docs.madelineproto.xyz for more info)
*
* @param array $params Parameters
*
* @return messages.ChatFull
*/
public function getFullChat($params);
/**
* 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
*
* @return Updates
*/
public function editChatTitle($params);
/**
* 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
*
* @return Updates
*/
public function editChatPhoto($params);
/**
* 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
*
* @return Updates
*/
public function addChatUser($params);
/**
* 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
*
* @return Updates
*/
public function deleteChatUser($params);
/**
* 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
*
* @return Updates
*/
public function createChat($params);
/**
* You cannot use this method directly, instead use $MadelineProto->getDhConfig();.
*
* Parameters:
* * `int` **version** - You cannot use this method directly, instead use $MadelineProto->getDhConfig();
* * `int` **random_length** - You cannot use this method directly, instead use $MadelineProto->getDhConfig();
*
* @param array $params Parameters
*
* @return messages.DhConfig
*/
public function getDhConfig($params);
/**
* 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
*
* @return EncryptedChat
*/
public function requestEncryption($params);
/**
* 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
*
* @return EncryptedChat
*/
public function acceptEncryption($params);
/**
* 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
*
* @return bool
*/
public function discardEncryption($params);
/**
* 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
*
* @return bool
*/
public function setEncryptedTyping($params);
/**
* 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
*
* @return bool
*/
public function readEncryptedHistory($params);
/**
* 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
*
* @return messages.SentEncryptedMessage
*/
public function sendEncrypted($params);
/**
* Send a file to a secret chat.
*
* 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
*/
public function sendEncryptedFile($params);
/**
* 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
*
* @return messages.SentEncryptedMessage
*/
public function sendEncryptedService($params);
/**
* You cannot use this method directly.
*
* Parameters:
* * `int` **max_qts** - You cannot use this method directly
*
* @param array $params Parameters
*
* @return _of_long[]
*/
public function receivedQueue($params);
/**
* Report for spam a secret chat.
*
* Parameters:
* * `InputEncryptedChat` **peer** - The chat to report
*
* @param array $params Parameters
*
* @return bool
*/
public function reportEncryptedSpam($params);
/**
* Mark message as read.
*
* Parameters:
* * `[int]` **id** - The messages to mark as read (only users and normal chats, not supergroups)
*
* @param array $params Parameters
*
* @return messages.AffectedMessages
*/
public function readMessageContents($params);
/**
* 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
*
* @return messages.Stickers
*/
public function getStickers($params);
/**
* Get all stickerpacks.
*
* Parameters:
* * `[int]` **hash** - Optional: The hash parameter of the previous result of this method
*
* @param array $params Parameters
*
* @return messages.AllStickers
*/
public function getAllStickers($params);
/**
* Get webpage preview.
*
* Parameters:
* * `string` **message** - Extract preview from this message
* * `[MessageEntity]` **entities** - Optional: Entities for styled text
*
* @param array $params Parameters
*
* @return MessageMedia
*/
public function getWebPagePreview($params);
/**
* Export chat invite.
*
* Parameters:
* * `InputPeer` **peer** - Export invite only for this user
*
* @param array $params Parameters
*
* @return ExportedChatInvite
*/
public function exportChatInvite($params);
/**
* Check if an invitation link is valid.
*
* Parameters:
* * `string` **hash** - The invite link in t.me/joinchat/aflakf format
*
* @param array $params Parameters
*
* @return ChatInvite
*/
public function checkChatInvite($params);
/**
* Import chat invite.
*
* Parameters:
* * `string` **hash** - The invite link in t.me/joinchat/aflakf format
*
* @param array $params Parameters
*
* @return Updates
*/
public function importChatInvite($params);
/**
* Get a stickerset.
*
* Parameters:
* * `InputStickerSet` **stickerset** - The stickerset to get
*
* @param array $params Parameters
*
* @return messages.StickerSet
*/
public function getStickerSet($params);
/**
* Add a sticker set.
*
* Parameters:
* * `InputStickerSet` **stickerset** - The sticker set to add
* * `Bool` **archived** - Archive this set?
*
* @param array $params Parameters
*
* @return messages.StickerSetInstallResult
*/
public function installStickerSet($params);
/**
* Remove a sticker set.
*
* Parameters:
* * `InputStickerSet` **stickerset** - The sticker set to remove
*
* @param array $params Parameters
*
* @return bool
*/
public function uninstallStickerSet($params);
/**
* 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
*
* @return Updates
*/
public function startBot($params);
/**
* 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
*
* @return _of_int[]
*/
public function getMessagesViews($params);
/**
* 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
*
* @return bool
*/
public function editChatAdmin($params);
/**
* Convert chat to supergroup.
*
* Parameters:
* * `InputPeer` **chat_id** - The chat to convert
*
* @param array $params Parameters
*
* @return Updates
*/
public function migrateChat($params);
/**
* Global message search.
*
* 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
*/
public function searchGlobal($params);
/**
* Reorder sticker sets.
*
* Parameters:
* * `boolean` **masks** - Optional: Reorder masks?
* * `[long]` **order** - The order
*
* @param array $params Parameters
*
* @return bool
*/
public function reorderStickerSets($params);
/**
* 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
*
* @return Document
*/
public function getDocumentByHash($params);
/**
* Search gifs.
*
* Parameters:
* * `string` **q** - The search query
* * `int` **offset** - The offset
*
* @param array $params Parameters
*
* @return messages.FoundGifs
*/
public function searchGifs($params);
/**
* Get saved gifs.
*
* Parameters:
* * `[int]` **hash** - Optional: the hash parameter of the previous result of this method
*
* @param array $params Parameters
*
* @return messages.SavedGifs
*/
public function getSavedGifs($params);
/**
* Save a GIF.
*
* Parameters:
* * `InputDocument` **id** - The GIF to save
* * `Bool` **unsave** - Remove the gif?
*
* @param array $params Parameters
*
* @return bool
*/
public function saveGif($params);
/**
* 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
*
* @return messages.BotResults
*/
public function getInlineBotResults($params);
/**
* 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
*
* @return bool
*/
public function setInlineBotResults($params);
/**
* 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
*
* @return Updates
*/
public function sendInlineBotResult($params);
/**
* 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
*
* @return messages.MessageEditData
*/
public function getMessageEditData($params);
/**
* 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
*
* @return Updates
*/
public function editMessage($params);
/**
* 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
*
* @return bool
*/
public function editInlineBotMessage($params);
/**
* 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
*
* @return messages.BotCallbackAnswer
*/
public function getBotCallbackAnswer($params);
/**
* 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
*
* @return bool
*/
public function setBotCallbackAnswer($params);
/**
* Get dialog info of peers.
*
* Parameters:
* * `[InputDialogPeer]` **peers** - The peers
*
* @param array $params Parameters
*
* @return messages.PeerDialogs
*/
public function getPeerDialogs($params);
/**
* 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
*
* @return bool
*/
public function saveDraft($params);
/**
* Get all message drafts.
*
* @return Updates
*/
public function getAllDrafts();
/**
* Get featured stickers.
*
* Parameters:
* * `[int]` **hash** - Optional: the hash parameter of the previous result of this method
*
* @param array $params Parameters
*
* @return messages.FeaturedStickers
*/
public function getFeaturedStickers($params);
/**
* Mark new featured stickers as read.
*
* Parameters:
* * `[long]` **id** - The stickers to mark as read
*
* @param array $params Parameters
*
* @return bool
*/
public function readFeaturedStickers($params);
/**
* 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
*
* @return messages.RecentStickers
*/
public function getRecentStickers($params);
/**
* 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
*
* @return bool
*/
public function saveRecentSticker($params);
/**
* Clear all recent stickers.
*
* Parameters:
* * `boolean` **attached** - Optional: Clear recent stickers attached to images?
*
* @param array $params Parameters
*
* @return bool
*/
public function clearRecentStickers($params);
/**
* 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
*
* @return messages.ArchivedStickers
*/
public function getArchivedStickers($params);
/**
* Get masks.
*
* Parameters:
* * `[int]` **hash** - Optional: the hash parameter of the previous result of this method
*
* @param array $params Parameters
*
* @return messages.AllStickers
*/
public function getMaskStickers($params);
/**
* Get stickers attachable to images.
*
* Parameters:
* * `InputStickeredMedia` **media** - The stickered media
*
* @param array $params Parameters
*
* @return _of_StickerSetCovered[]
*/
public function getAttachedStickers($params);
/**
* 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
*
* @return Updates
*/
public function setGameScore($params);
/**
* 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
*
* @return bool
*/
public function setInlineGameScore($params);
/**
* 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
*
* @return messages.HighScores
*/
public function getGameHighScores($params);
/**
* 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
*
* @return messages.HighScores
*/
public function getInlineGameHighScores($params);
/**
* Get chats in common with a user.
*
* 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
*/
public function getCommonChats($params);
/**
* Get all chats (not supergroups or channels).
*
* Parameters:
* * `[int]` **except_ids** - Do not fetch these chats (MTProto id)
*
* @param array $params Parameters
*
* @return messages.Chats
*/
public function getAllChats($params);
/**
* Get webpage preview.
*
* Parameters:
* * `string` **url** - URL
* * `[int]` **hash** - Optional: the hash parameter of the previous result of this method
*
* @param array $params Parameters
*
* @return WebPage
*/
public function getWebPage($params);
/**
* Pin or unpin dialog.
*
* Parameters:
* * `boolean` **pinned** - Optional: Pin or unpin the dialog?
* * `InputDialogPeer` **peer** - The dialog to pin
*
* @param array $params Parameters
*
* @return bool
*/
public function toggleDialogPin($params);
/**
* Reorder pinned dialogs.
*
* Parameters:
* * `boolean` **force** - Optional: Force reordering
* * `int` **folder_id** - Folder ID
* * `[InputDialogPeer]` **order** - New order
*
* @param array $params Parameters
*
* @return bool
*/
public function reorderPinnedDialogs($params);
/**
* Get pinned dialogs.
*
* Parameters:
* * `int` **folder_id** - Folder ID
*
* @param array $params Parameters
*
* @return messages.PeerDialogs
*/
public function getPinnedDialogs($params);
/**
* 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
*
* @return bool
*/
public function setBotShippingResults($params);
/**
* Bots only: set precheckout results.
*
* Parameters:
* * `boolean` **success** - Optional: Success?
* * `long` **query_id** - Query ID
* * `string` **error** - Optional: Error
*
* @param array $params Parameters
*
* @return bool
*/
public function setBotPrecheckoutResults($params);
/**
* Upload a file without sending it to anyone.
*
* Parameters:
* * `InputPeer` **peer** - Nothing
* * `InputMedia` **media** - The media to upload
*
* @param array $params Parameters
*
* @return MessageMedia
*/
public function uploadMedia($params);
/**
* 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
*
* @return Updates
*/
public function sendScreenshotNotification($params);
/**
* Get favorite stickers.
*
* Parameters:
* * `[int]` **hash** - Optional: the hash parameter of the previous result of this method
*
* @param array $params Parameters
*
* @return messages.FavedStickers
*/
public function getFavedStickers($params);
/**
* Add a sticker to favorites.
*
* Parameters:
* * `InputDocument` **id** - The sticker to add to favorites
* * `Bool` **unfave** - Remove it from favorites?
*
* @param array $params Parameters
*
* @return bool
*/
public function faveSticker($params);
/**
* Get unread mentions.
*
* 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
*/
public function getUnreadMentions($params);
/**
* Mark mentions as read.
*
* Parameters:
* * `InputPeer` **peer** - The chat
*
* @param array $params Parameters
*
* @return messages.AffectedHistory
*/
public function readMentions($params);
/**
* 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
*
* @return messages.Messages
*/
public function getRecentLocations($params);
/**
* 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
*
* @return Updates
*/
public function sendMultiMedia($params);
/**
* 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
*
* @return EncryptedFile
*/
public function uploadEncryptedFile($params);
/**
* 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
*
* @return messages.FoundStickerSets
*/
public function searchStickerSets($params);
/**
* Get message ranges to fetch.
*
* @return _of_MessageRange[]
*/
public function getSplitRanges();
/**
* 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
*
* @return bool
*/
public function markDialogUnread($params);
/**
* Get dialogs marked as unread manually.
*
* @return _of_DialogPeer[]
*/
public function getDialogUnreadMarks();
/**
* Clear all drafts.
*
* @return bool
*/
public function clearAllDrafts();
/**
* Update pinned message.
*
* Parameters:
* * `boolean` **silent** - Optional: Silent?
* * `InputPeer` **peer** - Peer
* * `int` **id** - Message ID
*
* @param array $params Parameters
*
* @return Updates
*/
public function updatePinnedMessage($params);
/**
* Send vote.
*
* Parameters:
* * `InputPeer` **peer** - Peer
* * `int` **msg_id** - Message ID
* * `[bytes]` **options** - Options
*
* @param array $params Parameters
*
* @return Updates
*/
public function sendVote($params);
/**
* Get poll results.
*
* Parameters:
* * `InputPeer` **peer** - Peer
* * `int` **msg_id** - Message ID
*
* @param array $params Parameters
*
* @return Updates
*/
public function getPollResults($params);
/**
* Get online users.
*
* Parameters:
* * `InputPeer` **peer** - Peer
*
* @param array $params Parameters
*
* @return ChatOnlines
*/
public function getOnlines($params);
/**
* Get stats URL.
*
* Parameters:
* * `boolean` **dark** - Optional: Dark?
* * `InputPeer` **peer** - Peer
* * `string` **params** - Params
*
* @param array $params Parameters
*
* @return StatsURL
*/
public function getStatsURL($params);
/**
* Edit chat info.
*
* Parameters:
* * `InputPeer` **peer** - Chat
* * `string` **about** - Info
*
* @param array $params Parameters
*
* @return bool
*/
public function editChatAbout($params);
/**
* Edit default rights of chat.
*
* Parameters:
* * `InputPeer` **peer** - Chat
* * `ChatBannedRights` **banned_rights** - Global chat rights
*
* @param array $params Parameters
*
* @return Updates
*/
public function editChatDefaultBannedRights($params);
/**
* Get emoji keywords.
*
* Parameters:
* * `string` **lang_code** - Language code
*
* @param array $params Parameters
*
* @return EmojiKeywordsDifference
*/
public function getEmojiKeywords($params);
/**
* Get emoji keyword difference.
*
* Parameters:
* * `string` **lang_code** - Language code
* * `int` **from_version** - From version
*
* @param array $params Parameters
*
* @return EmojiKeywordsDifference
*/
public function getEmojiKeywordsDifference($params);
/**
* Get emoji keyword languages.
*
* Parameters:
* * `[string]` **lang_codes** - Language codes
*
* @param array $params Parameters
*
* @return _of_EmojiLanguage[]
*/
public function getEmojiKeywordsLanguages($params);
/**
* Get emoji URL.
*
* Parameters:
* * `string` **lang_code** - Language code
*
* @param array $params Parameters
*
* @return EmojiURL
*/
public function getEmojiURL($params);
/**
* Get search counter.
*
* Parameters:
* * `InputPeer` **peer** - Peer
* * `[MessagesFilter]` **filters** - Filters
*
* @param array $params Parameters
*
* @return _of_messages.SearchCounter[]
*/
public function getSearchCounters($params);
/**
* Request URL authorization.
*
* Parameters:
* * `InputPeer` **peer** - Peer
* * `int` **msg_id** - Message ID
* * `int` **button_id** - Button ID
*
* @param array $params Parameters
*
* @return UrlAuthResult
*/
public function requestUrlAuth($params);
/**
* 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
*
* @return UrlAuthResult
*/
public function acceptUrlAuth($params);
/**
* Hide peer settings bar.
*
* Parameters:
* * `InputPeer` **peer** - Peer
*
* @param array $params Parameters
*
* @return bool
*/
public function hidePeerSettingsBar($params);
/**
* Get scheduled history.
*
* Parameters:
* * `InputPeer` **peer** - Peer
* * `[int]` **hash** - Optional: Hash
*
* @param array $params Parameters
*
* @return messages.Messages
*/
public function getScheduledHistory($params);
/**
* Get scheduled messages.
*
* Parameters:
* * `InputPeer` **peer** - Peer
* * `[int]` **id** - ID
*
* @param array $params Parameters
*
* @return messages.Messages
*/
public function getScheduledMessages($params);
/**
* Send scheduled messages.
*
* Parameters:
* * `InputPeer` **peer** - Peer
* * `[int]` **id** - ID
*
* @param array $params Parameters
*
* @return Updates
*/
public function sendScheduledMessages($params);
/**
* Delete scheduled messages.
*
* Parameters:
* * `InputPeer` **peer** - Peer
* * `[int]` **id** - ID
*
* @param array $params Parameters
*
* @return Updates
*/
public function deleteScheduledMessages($params);
}
interface updates
{
/**
* You cannot use this method directly, see https://docs.madelineproto.xyz for more info on handling updates.
*
* @return updates.State
*/
public function getState();
/**
* You cannot use this method directly, see https://docs.madelineproto.xyz for more info on handling updates.
*
* 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
*/
public function getDifference($params);
/**
* 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
*
* @return updates.ChannelDifference
*/
public function getChannelDifference($params);
}
interface photos
{
/**
* Change the profile photo.
*
* Parameters:
* * `InputPhoto` **id** - The photo to use
*
* @param array $params Parameters
*
* @return UserProfilePhoto
*/
public function updateProfilePhoto($params);
/**
* Upload profile photo.
*
* Parameters:
* * `InputFile` **file** - The photo
*
* @param array $params Parameters
*
* @return photos.Photo
*/
public function uploadProfilePhoto($params);
/**
* Delete profile photos.
*
* Parameters:
* * `[InputPhoto]` **id** - The profile photos to delete
*
* @param array $params Parameters
*
* @return _of_long[]
*/
public function deletePhotos($params);
/**
* Get the profile photos of a user.
*
* 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
*/
public function getUserPhotos($params);
}
interface upload
{
/**
* You cannot use this method directly, use the upload, downloadToStream, downloadToFile, downloadToDir methods instead; see https://docs.madelineproto.xyz for more info.
*
* Parameters:
* * `long` **file_id** - You cannot use this method directly, use the upload, downloadToStream, downloadToFile, downloadToDir methods instead; see https://docs.madelineproto.xyz for more info
* * `int` **file_part** - You cannot use this method directly, use the upload, downloadToStream, downloadToFile, downloadToDir methods instead; see https://docs.madelineproto.xyz for more info
* * `bytes` **bytes** - You cannot use this method directly, use the upload, downloadToStream, downloadToFile, downloadToDir methods instead; see https://docs.madelineproto.xyz for more info
*
* @param array $params Parameters
*
* @return bool
*/
public function saveFilePart($params);
/**
* You cannot use this method directly, use the upload, downloadToStream, downloadToFile, downloadToDir methods instead; see https://docs.madelineproto.xyz for more info.
*
* Parameters:
* * `boolean` **precise** - Optional: You cannot use this method directly, use the upload, downloadToStream, downloadToFile, downloadToDir methods instead; see https://docs.madelineproto.xyz for more info
* * `InputFileLocation` **location** - You cannot use this method directly, use the upload, downloadToStream, downloadToFile, downloadToDir methods instead; see https://docs.madelineproto.xyz for more info
* * `int` **offset** - You cannot use this method directly, use the upload, downloadToStream, downloadToFile, downloadToDir methods instead; see https://docs.madelineproto.xyz for more info
* * `int` **limit** - You cannot use this method directly, use the upload, downloadToStream, downloadToFile, downloadToDir methods instead; see https://docs.madelineproto.xyz for more info
*
* @param array $params Parameters
*
* @return upload.File
*/
public function getFile($params);
/**
* You cannot use this method directly, use the upload, downloadToStream, downloadToFile, downloadToDir methods instead; see https://docs.madelineproto.xyz for more info.
*
* Parameters:
* * `long` **file_id** - You cannot use this method directly, use the upload, downloadToStream, downloadToFile, downloadToDir methods instead; see https://docs.madelineproto.xyz for more info
* * `int` **file_part** - You cannot use this method directly, use the upload, downloadToStream, downloadToFile, downloadToDir methods instead; see https://docs.madelineproto.xyz for more info
* * `int` **file_total_parts** - You cannot use this method directly, use the upload, downloadToStream, downloadToFile, downloadToDir methods instead; see https://docs.madelineproto.xyz for more info
* * `bytes` **bytes** - You cannot use this method directly, use the upload, downloadToStream, downloadToFile, downloadToDir methods instead; see https://docs.madelineproto.xyz for more info
*
* @param array $params Parameters
*
* @return bool
*/
public function saveBigFilePart($params);
/**
* 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
*
* @return upload.WebFile
*/
public function getWebFile($params);
/**
* You cannot use this method directly, use the upload, downloadToStream, downloadToFile, downloadToDir methods instead; see https://docs.madelineproto.xyz for more info.
*
* Parameters:
* * `bytes` **file_token** - You cannot use this method directly, use the upload, downloadToStream, downloadToFile, downloadToDir methods instead; see https://docs.madelineproto.xyz for more info
* * `int` **offset** - You cannot use this method directly, use the upload, downloadToStream, downloadToFile, downloadToDir methods instead; see https://docs.madelineproto.xyz for more info
* * `int` **limit** - You cannot use this method directly, use the upload, downloadToStream, downloadToFile, downloadToDir methods instead; see https://docs.madelineproto.xyz for more info
*
* @param array $params Parameters
*
* @return upload.CdnFile
*/
public function getCdnFile($params);
/**
* You cannot use this method directly, use the upload, downloadToStream, downloadToFile, downloadToDir methods instead; see https://docs.madelineproto.xyz for more info.
*
* Parameters:
* * `bytes` **file_token** - You cannot use this method directly, use the upload, downloadToStream, downloadToFile, downloadToDir methods instead; see https://docs.madelineproto.xyz for more info
* * `bytes` **request_token** - You cannot use this method directly, use the upload, downloadToStream, downloadToFile, downloadToDir methods instead; see https://docs.madelineproto.xyz for more info
*
* @param array $params Parameters
*
* @return _of_FileHash[]
*/
public function reuploadCdnFile($params);
/**
* You cannot use this method directly, use the upload, downloadToStream, downloadToFile, downloadToDir methods instead; see https://docs.madelineproto.xyz for more info.
*
* Parameters:
* * `bytes` **file_token** - You cannot use this method directly, use the upload, downloadToStream, downloadToFile, downloadToDir methods instead; see https://docs.madelineproto.xyz for more info
* * `int` **offset** - You cannot use this method directly, use the upload, downloadToStream, downloadToFile, downloadToDir methods instead; see https://docs.madelineproto.xyz for more info
*
* @param array $params Parameters
*
* @return _of_FileHash[]
*/
public function getCdnFileHashes($params);
/**
* Get file hashes.
*
* Parameters:
* * `InputFileLocation` **location** - The file
* * `int` **offset** - Offset
*
* @param array $params Parameters
*
* @return _of_FileHash[]
*/
public function getFileHashes($params);
}
interface help
{
/**
* Get server configuration.
*
* @return Config
*/
public function getConfig();
/**
* Get nearest datacenter.
*
* @return NearestDc
*/
public function getNearestDc();
/**
* Get info about app updates.
*
* Parameters:
* * `string` **source** - Source
*
* @param array $params Parameters
*
* @return help.AppUpdate
*/
public function getAppUpdate($params);
/**
* Get invitation text.
*
* @return help.InviteText
*/
public function getInviteText();
/**
* Get info of support user.
*
* @return help.Support
*/
public function getSupport();
/**
* Get the changelog of this app.
*
* Parameters:
* * `string` **prev_app_version** - Previous app version
*
* @param array $params Parameters
*
* @return Updates
*/
public function getAppChangelog($params);
/**
* Set the update status of webhook.
*
* Parameters:
* * `int` **pending_updates_count** - Pending update count
* * `string` **message** - Message
*
* @param array $params Parameters
*
* @return bool
*/
public function setBotUpdatesStatus($params);
/**
* Get CDN configuration.
*
* @return CdnConfig
*/
public function getCdnConfig();
/**
* Get recent t.me URLs.
*
* Parameters:
* * `string` **referer** - Referrer
*
* @param array $params Parameters
*
* @return help.RecentMeUrls
*/
public function getRecentMeUrls($params);
/**
* Get information about the current proxy.
*
* @return help.ProxyData
*/
public function getProxyData();
/**
* Get updated TOS.
*
* @return help.TermsOfServiceUpdate
*/
public function getTermsOfServiceUpdate();
/**
* Accept telegram's TOS.
*
* Parameters:
* * `DataJSON` **id** - TOS
*
* @param array $params Parameters
*
* @return bool
*/
public function acceptTermsOfService($params);
/**
* Get deep link info.
*
* Parameters:
* * `string` **path** - Deep link
*
* @param array $params Parameters
*
* @return help.DeepLinkInfo
*/
public function getDeepLinkInfo($params);
/**
* Get app config.
*
* @return JSONValue
*/
public function getAppConfig();
/**
* Log data for developer of this app.
*
* Parameters:
* * `[InputAppEvent]` **events** - Event list
*
* @param array $params Parameters
*
* @return bool
*/
public function saveAppLog($params);
/**
* Get passport config.
*
* Parameters:
* * `[int]` **hash** - Optional: Hash
*
* @param array $params Parameters
*
* @return help.PassportConfig
*/
public function getPassportConfig($params);
/**
* Get support name.
*
* @return help.SupportName
*/
public function getSupportName();
/**
* Get user info.
*
* Parameters:
* * `InputUser` **user_id** - User ID
*
* @param array $params Parameters
*
* @return help.UserInfo
*/
public function getUserInfo($params);
/**
* Edit user info.
*
* Parameters:
* * `InputUser` **user_id** - User ID
* * `string` **message** - Message
* * `[MessageEntity]` **entities** - Entities
*
* @param array $params Parameters
*
* @return help.UserInfo
*/
public function editUserInfo($params);
}
interface channels
{
/**
* 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
*
* @return bool
*/
public function readHistory($params);
/**
* Delete channel/supergroup messages.
*
* Parameters:
* * `InputChannel` **channel** - The channel/supergroup
* * `[int]` **id** - The IDs of messages to delete
*
* @param array $params Parameters
*
* @return messages.AffectedMessages
*/
public function deleteMessages($params);
/**
* Delete all messages of a user in a channel/supergroup.
*
* Parameters:
* * `InputChannel` **channel** - The channel/supergroup
* * `InputUser` **user_id** - The user
*
* @param array $params Parameters
*
* @return messages.AffectedHistory
*/
public function deleteUserHistory($params);
/**
* 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
*
* @return bool
*/
public function reportSpam($params);
/**
* Get channel/supergroup messages.
*
* Parameters:
* * `InputChannel` **channel** - The channel/supergroup
* * `[InputMessage]` **id** - The message IDs
*
* @param array $params Parameters
*
* @return messages.Messages
*/
public function getMessages($params);
/**
* Get channel/supergroup participants (you should use `$MadelineProto->getPwrChat($id)` instead).
*
* 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
*/
public function getParticipants($params);
/**
* 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
*
* @return channels.ChannelParticipant
*/
public function getParticipant($params);
/**
* Get info about multiple channels/supergroups.
*
* Parameters:
* * `[InputChannel]` **id** - The channel/supergroup MTProto IDs
*
* @param array $params Parameters
*
* @return messages.Chats
*/
public function getChannels($params);
/**
* You cannot use this method directly, use the getPwrChat, getInfo, getFullInfo methods instead (see https://docs.madelineproto.xyz for more info).
*
* Parameters:
* * `InputChannel` **channel** - You cannot use this method directly, use the getPwrChat, getInfo, getFullInfo methods instead (see https://docs.madelineproto.xyz for more info)
*
* @param array $params Parameters
*
* @return messages.ChatFull
*/
public function getFullChannel($params);
/**
* 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
*
* @return Updates
*/
public function createChannel($params);
/**
* 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
*
* @return Updates
*/
public function editAdmin($params);
/**
* Edit the title of a supergroup/channel.
*
* Parameters:
* * `InputChannel` **channel** - The channel
* * `string` **title** - The new channel/supergroup title
*
* @param array $params Parameters
*
* @return Updates
*/
public function editTitle($params);
/**
* Edit the photo of a supergroup/channel.
*
* Parameters:
* * `InputChannel` **channel** - The channel
* * `InputChatPhoto` **photo** - The new photo
*
* @param array $params Parameters
*
* @return Updates
*/
public function editPhoto($params);
/**
* 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
*/
public function checkUsername($params);
/**
* Update the username of a supergroup/channel.
*
* Parameters:
* * `InputChannel` **channel** - The channel/supergroup
* * `string` **username** - The new username
*
* @param array $params Parameters
*
* @return bool
*/
public function updateUsername($params);
/**
* Join a channel/supergroup.
*
* Parameters:
* * `InputChannel` **channel** - The channel/supergroup to join
*
* @param array $params Parameters
*
* @return Updates
*/
public function joinChannel($params);
/**
* Leave a channel/supergroup.
*
* Parameters:
* * `InputChannel` **channel** - The channel/supergroup to leave
*
* @param array $params Parameters
*
* @return Updates
*/
public function leaveChannel($params);
/**
* Add users to channel/supergroup.
*
* Parameters:
* * `InputChannel` **channel** - The channel/supergroup
* * `[InputUser]` **users** - The users to add
*
* @param array $params Parameters
*
* @return Updates
*/
public function inviteToChannel($params);
/**
* Delete a channel/supergroup.
*
* Parameters:
* * `InputChannel` **channel** - The channel/supergroup to delete
*
* @param array $params Parameters
*
* @return Updates
*/
public function deleteChannel($params);
/**
* 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
*
* @return ExportedMessageLink
*/
public function exportMessageLink($params);
/**
* Toggle channel signatures.
*
* Parameters:
* * `InputChannel` **channel** - The channel/supergroup
* * `Bool` **enabled** - Enable or disable channel signatures?
*
* @param array $params Parameters
*
* @return Updates
*/
public function toggleSignatures($params);
/**
* 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
*
* @return messages.Chats
*/
public function getAdminedPublicChannels($params);
/**
* 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
*
* @return Updates
*/
public function editBanned($params);
/**
* Get admin log of a channel/supergroup.
*
* 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
*/
public function getAdminLog($params);
/**
* Set the supergroup/channel stickerpack.
*
* Parameters:
* * `InputChannel` **channel** - The channel/supergoup
* * `InputStickerSet` **stickerset** - The stickerset
*
* @param array $params Parameters
*
* @return bool
*/
public function setStickers($params);
/**
* Mark channel/supergroup messages as read.
*
* Parameters:
* * `InputChannel` **channel** - The channel
* * `[int]` **id** - List of message IDs
*
* @param array $params Parameters
*
* @return bool
*/
public function readMessageContents($params);
/**
* 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
*
* @return bool
*/
public function deleteHistory($params);
/**
* 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
*
* @return Updates
*/
public function togglePreHistoryHidden($params);
/**
* Get all channels you left.
*
* Parameters:
* * `int` **offset** - Offset
*
* @param array $params Parameters
*
* @return messages.Chats
*/
public function getLeftChannels($params);
/**
* Get groups for discussion.
*
* @return messages.Chats
*/
public function getGroupsForDiscussion();
/**
* Set discussion group of channel.
*
* Parameters:
* * `InputChannel` **broadcast** - The channel
* * `InputChannel` **group** - The group
*
* @param array $params Parameters
*
* @return bool
*/
public function setDiscussionGroup($params);
/**
* Edit creator of channel.
*
* Parameters:
* * `InputChannel` **channel** - Channel
* * `InputUser` **user_id** - User ID
* * `InputCheckPasswordSRP` **password** - Password
*
* @param array $params Parameters
*
* @return Updates
*/
public function editCreator($params);
/**
* Edit location (geochats).
*
* Parameters:
* * `InputChannel` **channel** - Channel
* * `InputGeoPoint` **geo_point** - Geo point
* * `string` **address** - Physical location (geochats)
*
* @param array $params Parameters
*
* @return bool
*/
public function editLocation($params);
/**
* 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
*
* @return Updates
*/
public function toggleSlowMode($params);
}
interface bots
{
/**
* Send a custom request to the bot API.
*
* Parameters:
* * `string` **custom_method** - The method to call
* * `DataJSON` **params** - Method parameters
*
* @param array $params Parameters
*
* @return DataJSON
*/
public function sendCustomRequest($params);
/**
* Send webhook request via bot API.
*
* Parameters:
* * `long` **query_id** - The query ID
* * `DataJSON` **data** - The parameters
*
* @param array $params Parameters
*
* @return bool
*/
public function answerWebhookJSONQuery($params);
}
interface payments
{
/**
* Get payment form.
*
* Parameters:
* * `int` **msg_id** - Message ID
*
* @param array $params Parameters
*
* @return payments.PaymentForm
*/
public function getPaymentForm($params);
/**
* Get payment receipt.
*
* Parameters:
* * `int` **msg_id** - The message ID
*
* @param array $params Parameters
*
* @return payments.PaymentReceipt
*/
public function getPaymentReceipt($params);
/**
* 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
*
* @return payments.ValidatedRequestedInfo
*/
public function validateRequestedInfo($params);
/**
* Bots only: send payment form.
*
* 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
*/
public function sendPaymentForm($params);
/**
* Get saved payments info.
*
* @return payments.SavedInfo
*/
public function getSavedInfo();
/**
* Clear saved payments info.
*
* Parameters:
* * `boolean` **credentials** - Optional: Clear credentials?
* * `boolean` **info** - Optional: Clear payment info?
*
* @param array $params Parameters
*
* @return bool
*/
public function clearSavedInfo($params);
}
interface stickers
{
/**
* 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
*
* @return messages.StickerSet
*/
public function createStickerSet($params);
/**
* Remove sticker from stickerset.
*
* Parameters:
* * `InputDocument` **sticker** - The sticker to remove
*
* @param array $params Parameters
*
* @return messages.StickerSet
*/
public function removeStickerFromSet($params);
/**
* Change sticker position in photo.
*
* Parameters:
* * `InputDocument` **sticker** - The sticker
* * `int` **position** - New position
*
* @param array $params Parameters
*
* @return messages.StickerSet
*/
public function changeStickerPosition($params);
/**
* Add sticker to stickerset.
*
* Parameters:
* * `InputStickerSet` **stickerset** - The stickerset
* * `InputStickerSetItem` **sticker** - The sticker
*
* @param array $params Parameters
*
* @return messages.StickerSet
*/
public function addStickerToSet($params);
}
interface phone
{
/**
* Get call configuration.
*
* @return DataJSON
*/
public function getCallConfig();
/**
* 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
* * `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
*/
public function requestCall($params);
/**
* 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
*
* @return phone.PhoneCall
*/
public function acceptCall($params);
/**
* 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
*
* @return phone.PhoneCall
*/
public function confirmCall($params);
/**
* 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
*
* @return bool
*/
public function receivedCall($params);
/**
* 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
*
* @return Updates
*/
public function discardCall($params);
/**
* 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
*
* @return Updates
*/
public function setCallRating($params);
/**
* Save call debugging info.
*
* Parameters:
* * `InputPhoneCall` **peer** - The call
* * `DataJSON` **debug** - Debugging info
*
* @param array $params Parameters
*
* @return bool
*/
public function saveCallDebug($params);
}
interface langpack
{
/**
* Get language pack.
*
* Parameters:
* * `string` **lang_pack** - Lang pack
* * `string` **lang_code** - Language code
*
* @param array $params Parameters
*
* @return LangPackDifference
*/
public function getLangPack($params);
/**
* Get language pack strings.
*
* Parameters:
* * `string` **lang_pack** - Lang pack
* * `string` **lang_code** - Language code
* * `[string]` **keys** - Keys
*
* @param array $params Parameters
*
* @return _of_LangPackString[]
*/
public function getStrings($params);
/**
* Get language pack updates.
*
* Parameters:
* * `string` **lang_pack** - Language pack
* * `string` **lang_code** - Lang code
* * `int` **from_version** - Previous version
*
* @param array $params Parameters
*
* @return LangPackDifference
*/
public function getDifference($params);
/**
* Get available languages.
*
* Parameters:
* * `string` **lang_pack** - Lang pack
*
* @param array $params Parameters
*
* @return _of_LangPackLanguage[]
*/
public function getLanguages($params);
/**
* Get language.
*
* Parameters:
* * `string` **lang_pack** - Lang pack
* * `string` **lang_code** - Lang code
*
* @param array $params Parameters
*
* @return LangPackLanguage
*/
public function getLanguage($params);
}
interface folders
{
/**
* Edit folder.
*
* Parameters:
* * `[InputFolderPeer]` **folder_peers** - New folder peers
*
* @param array $params Parameters
*
* @return Updates
*/
public function editPeerFolders($params);
/**
* Delete folder.
*
* Parameters:
* * `int` **folder_id** - Folder ID
*
* @param array $params Parameters
*
* @return Updates
*/
public function deleteFolder($params);
}
class InternalDoc extends APIFactory
{
public function logger($param, $level = \danog\MadelineProto\Logger::NOTICE, $file = null, array $extra = [])
{
return $this->__call(__FUNCTION__, [$param, $level, $file, $extra]);
}
public function isAltervista(array $extra = [])
{
return $this->__call(__FUNCTION__, [$extra]);
}
public function isInitingAuthorization(array $extra = [])
{
return $this->__call(__FUNCTION__, [$extra]);
}
public function getHTTPClient(array $extra = [])
{
return $this->__call(__FUNCTION__, [$extra]);
}
public function getDNSClient(array $extra = [])
{
return $this->__call(__FUNCTION__, [$extra]);
}
public function fileGetContents($url, array $extra = [])
{
return $this->__call(__FUNCTION__, [$url, $extra]);
}
public function testing(callable $a, ?string $b = null, $c = null, $d = 2, $e = \danog\MadelineProto\MTProto::METHOD_BEFORE_CALLBACK, array $extra = []): ?string
{
return $this->__call(__FUNCTION__, [$a, $b, $c, $d, $e, $extra]);
}
/**
* Get all datacenter connections.
*
* @return array<DataCenterConnection>
*/
public function getDataCenterConnections(array $extra = []): array
{
return $this->__call(__FUNCTION__, [$extra]);
}
public function hasAllAuth(array $extra = [])
{
return $this->__call(__FUNCTION__, [$extra]);
}
public function startLoops(array $extra = [])
{
return $this->__call(__FUNCTION__, [$extra]);
}
public function stopLoops(array $extra = [])
{
return $this->__call(__FUNCTION__, [$extra]);
}
public function getSettings($settings, $previousSettings = [
], array $extra = [])
{
return $this->__call(__FUNCTION__, [$settings, $previousSettings, $extra]);
}
public function parseSettings($settings, array $extra = [])
{
return $this->__call(__FUNCTION__, [$settings, $extra]);
}
public function setupLogger(array $extra = [])
{
return $this->__call(__FUNCTION__, [$extra]);
}
/**
* 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, array $extra = [])
{
return $this->__call(__FUNCTION__, [$de, $auth_key, $extra]);
}
/**
* Check if connected to datacenter using HTTP.
*
* @param string $datacenter DC ID
*
* @return boolean
*/
public function isHttp(string $datacenter, array $extra = [])
{
return $this->__call(__FUNCTION__, [$datacenter, $extra]);
}
public function connectToAllDcs(bool $reconnectAll = true, array $extra = [])
{
return $this->__call(__FUNCTION__, [$reconnectAll, $extra]);
}
public function resetSession(array $extra = [])
{
return $this->__call(__FUNCTION__, [$extra]);
}
public function resetUpdateState(array $extra = [])
{
return $this->__call(__FUNCTION__, [$extra]);
}
public function startUpdateSystem($anyway = false, array $extra = [])
{
return $this->__call(__FUNCTION__, [$anyway, $extra]);
}
public function getPhoneConfig($watcherId = null, array $extra = [])
{
return $this->__call(__FUNCTION__, [$watcherId, $extra]);
}
public function getCdnConfig($datacenter, array $extra = [])
{
return $this->__call(__FUNCTION__, [$datacenter, $extra]);
}
public function getCachedConfig(array $extra = [])
{
return $this->__call(__FUNCTION__, [$extra]);
}
public function getConfig($config = [
], $options = [
], array $extra = [])
{
return $this->__call(__FUNCTION__, [$config, $options, $extra]);
}
public function parseConfig(array $extra = [])
{
return $this->__call(__FUNCTION__, [$extra]);
}
public function parseDcOptions($dc_options, array $extra = [])
{
return $this->__call(__FUNCTION__, [$dc_options, $extra]);
}
public function getSelf(array $extra = [])
{
return $this->__call(__FUNCTION__, [$extra]);
}
public function getMethodCallbacks(array $extra = []): array
{
return $this->__call(__FUNCTION__, [$extra]);
}
public function getMethodBeforeCallbacks(array $extra = []): array
{
return $this->__call(__FUNCTION__, [$extra]);
}
public function getConstructorCallbacks(array $extra = []): array
{
return $this->__call(__FUNCTION__, [$extra]);
}
public function getConstructorBeforeCallbacks(array $extra = []): array
{
return $this->__call(__FUNCTION__, [$extra]);
}
public function getConstructorSerializeCallbacks(array $extra = []): array
{
return $this->__call(__FUNCTION__, [$extra]);
}
public function getTypeMismatchCallbacks(array $extra = []): array
{
return $this->__call(__FUNCTION__, [$extra]);
}
/**
* 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, array $extra = [])
{
return $this->__call(__FUNCTION__, [$expires_in, $datacenter, $extra]);
}
/**
* Check validity of g_a parameters.
*
* @param BigInteger $g_a
* @param BigInteger $p
*
* @return bool
*/
public function checkG(\phpseclib\Math\BigInteger $g_a, \phpseclib\Math\BigInteger $p, array $extra = []): bool
{
return $this->__call(__FUNCTION__, [$g_a, $p, $extra]);
}
/**
* Check validity of p and g parameters.
*
* @param BigInteger $p
* @param BigInteger $g
*
* @return boolean
*/
public function checkPG(\phpseclib\Math\BigInteger $p, \phpseclib\Math\BigInteger $g, array $extra = []): bool
{
return $this->__call(__FUNCTION__, [$p, $g, $extra]);
}
/**
* Get diffie-hellman configuration.
*
* @return \Generator<array>
*/
public function getDhConfig(array $extra = [])
{
return $this->__call(__FUNCTION__, [$extra]);
}
/**
* 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, array $extra = [])
{
return $this->__call(__FUNCTION__, [$expires_in, $datacenter, $extra]);
}
/**
* Factorize number asynchronously using the wolfram API.
*
* @param string|integer $what Number to factorize
*
* @return \Generator<string|bool>
*/
public function wolframSingle($what, array $extra = [])
{
return $this->__call(__FUNCTION__, [$what, $extra]);
}
/**
* Asynchronously create, bind and check auth keys for all DCs.
*
* @return \Generator
*/
public function initAuthorization(array $extra = [])
{
return $this->__call(__FUNCTION__, [$extra]);
}
/**
* Init auth keys for single DC.
*
* @param string $id DC ID
* @param DataCenterConnection $socket DC object
*
* @return \Generator
*/
public function initAuthorizationSocket(string $id, \danog\MadelineProto\DataCenterConnection $socket, array $extra = [])
{
return $this->__call(__FUNCTION__, [$id, $socket, $extra]);
}
/**
* Sync authorization data between DCs.
*
* @param string $id DC ID
*
* @return \Generator
*/
public function syncAuthorization(string $id, array $extra = [])
{
return $this->__call(__FUNCTION__, [$id, $extra]);
}
/**
* Synchronous wrapper for methodCall.
*
* @param string $method Method name
* @param array $args Arguments
* @param array $aargs Additional arguments
*
* @return array
*/
public function methodCall(string $method, $args = [
], array $aargs = [
'msg_id' => null,
], array $extra = [])
{
return $this->__call(__FUNCTION__, [$method, $args, $aargs, $extra]);
}
/**
* 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 methodCallRead(string $method, $args = [
], array $aargs = [
'msg_id' => null,
], array $extra = [])
{
return $this->__call(__FUNCTION__, [$method, $args, $aargs, $extra]);
}
/**
* 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 $aargs = [
'msg_id' => null,
], array $extra = [])
{
return $this->__call(__FUNCTION__, [$method, $args, $aargs, $extra]);
}
public function aesCalculate($msg_key, $auth_key, $to_server = true, array $extra = [])
{
return $this->__call(__FUNCTION__, [$msg_key, $auth_key, $to_server, $extra]);
}
public function oldAesCalculate($msg_key, $auth_key, $to_server = true, array $extra = [])
{
return $this->__call(__FUNCTION__, [$msg_key, $auth_key, $to_server, $extra]);
}
public function ctrEncrypt($message, $key, $iv, array $extra = [])
{
return $this->__call(__FUNCTION__, [$message, $key, $iv, $extra]);
}
public function igeEncrypt($message, $key, $iv, array $extra = [])
{
return $this->__call(__FUNCTION__, [$message, $key, $iv, $extra]);
}
public function igeDecrypt($message, $key, $iv, array $extra = [])
{
return $this->__call(__FUNCTION__, [$message, $key, $iv, $extra]);
}
public function toSupergroup($id, array $extra = [])
{
return $this->__call(__FUNCTION__, [$id, $extra]);
}
public function fromSupergroup($id, array $extra = [])
{
return $this->__call(__FUNCTION__, [$id, $extra]);
}
public function isSupergroup($id, array $extra = [])
{
return $this->__call(__FUNCTION__, [$id, $extra]);
}
public function addSupport($support, array $extra = [])
{
return $this->__call(__FUNCTION__, [$support, $extra]);
}
public function addUser($user, array $extra = [])
{
return $this->__call(__FUNCTION__, [$user, $extra]);
}
public function addChat($chat, array $extra = [])
{
return $this->__call(__FUNCTION__, [$chat, $extra]);
}
public function cachePwrChat($id, $full_fetch, $send, array $extra = [])
{
return $this->__call(__FUNCTION__, [$id, $full_fetch, $send, $extra]);
}
public function peerIsset($id, array $extra = [])
{
return $this->__call(__FUNCTION__, [$id, $extra]);
}
public function entitiesPeerIsset($entities, array $extra = [])
{
return $this->__call(__FUNCTION__, [$entities, $extra]);
}
public function fwdPeerIsset($fwd, array $extra = [])
{
return $this->__call(__FUNCTION__, [$fwd, $extra]);
}
public function getFolderId($id, array $extra = [])
{
return $this->__call(__FUNCTION__, [$id, $extra]);
}
public function getId($id, array $extra = [])
{
return $this->__call(__FUNCTION__, [$id, $extra]);
}
public function getInfo($id, $recursive = true, array $extra = [])
{
return $this->__call(__FUNCTION__, [$id, $recursive, $extra]);
}
public function genAll($constructor, $folder_id = null, array $extra = [])
{
return $this->__call(__FUNCTION__, [$constructor, $folder_id, $extra]);
}
public function fullChatLastUpdated($id, array $extra = [])
{
return $this->__call(__FUNCTION__, [$id, $extra]);
}
public function getFullInfo($id, array $extra = [])
{
return $this->__call(__FUNCTION__, [$id, $extra]);
}
public function getPwrChat($id, $fullfetch = true, $send = true, array $extra = [])
{
return $this->__call(__FUNCTION__, [$id, $fullfetch, $send, $extra]);
}
public function recurseAlphabetSearchParticipants($channel, $filter, $q, $total_count, &$res, array $extra = [])
{
return $this->__call(__FUNCTION__, [$channel, $filter, $q, $total_count, $res, $extra]);
}
public function fetchParticipants($channel, $filter, $q, $total_count, &$res, array $extra = [])
{
return $this->__call(__FUNCTION__, [$channel, $filter, $q, $total_count, $res, $extra]);
}
public function fetchParticipantsCache($channel, $filter, $q, $offset, $limit, array $extra = [])
{
return $this->__call(__FUNCTION__, [$channel, $filter, $q, $offset, $limit, $extra]);
}
public function storeParticipantsCache($gres, $channel, $filter, $q, $offset, $limit, array $extra = [])
{
return $this->__call(__FUNCTION__, [$gres, $channel, $filter, $q, $offset, $limit, $extra]);
}
public function getParticipantsHash($channel, $filter, $q, $offset, $limit, array $extra = [])
{
return $this->__call(__FUNCTION__, [$channel, $filter, $q, $offset, $limit, $extra]);
}
public function storeDb($res, $force = false, array $extra = [])
{
return $this->__call(__FUNCTION__, [$res, $force, $extra]);
}
public function resolveUsername($username, array $extra = [])
{
return $this->__call(__FUNCTION__, [$username, $extra]);
}
public function pwrUpdateHandler($update, array $extra = [])
{
return $this->__call(__FUNCTION__, [$update, $extra]);
}
public function getUpdatesUpdateHandler($update, array $extra = [])
{
return $this->__call(__FUNCTION__, [$update, $extra]);
}
public function getUpdates($params = [
], array $extra = [])
{
return $this->__call(__FUNCTION__, [$params, $extra]);
}
public function waitUpdate(array $extra = [])
{
return $this->__call(__FUNCTION__, [$extra]);
}
public function signalUpdate(array $extra = [])
{
return $this->__call(__FUNCTION__, [$extra]);
}
public function checkMsgId($message, array $extra = [])
{
return $this->__call(__FUNCTION__, [$message, $extra]);
}
public function loadUpdateState(array $extra = [])
{
return $this->__call(__FUNCTION__, [$extra]);
}
public function loadChannelState($channelId = null, $init = [
], array $extra = [])
{
return $this->__call(__FUNCTION__, [$channelId, $init, $extra]);
}
public function getChannelStates(array $extra = [])
{
return $this->__call(__FUNCTION__, [$extra]);
}
public function getUpdatesState(array $extra = [])
{
return $this->__call(__FUNCTION__, [$extra]);
}
public function handleUpdates($updates, $actual_updates = null, array $extra = [])
{
return $this->__call(__FUNCTION__, [$updates, $actual_updates, $extra]);
}
public function saveUpdate($update, array $extra = [])
{
return $this->__call(__FUNCTION__, [$update, $extra]);
}
public function pwrWebhook($update, array $extra = [])
{
return $this->__call(__FUNCTION__, [$update, $extra]);
}
public function upload($file, $file_name = '', $cb = null, $encrypted = false, array $extra = [])
{
return $this->__call(__FUNCTION__, [$file, $file_name, $cb, $encrypted, $extra]);
}
public function uploadFromUrl($url, int $size = 0, string $file_name = '', $cb = null, bool $encrypted = false, array $extra = [])
{
return $this->__call(__FUNCTION__, [$url, $size, $file_name, $cb, $encrypted, $extra]);
}
public function uploadFromStream($stream, int $size, string $mime, string $file_name = '', $cb = null, bool $encrypted = false, array $extra = [])
{
return $this->__call(__FUNCTION__, [$stream, $size, $mime, $file_name, $cb, $encrypted, $extra]);
}
public function uploadFromCallable($callable, int $size, string $mime, string $file_name = '', $cb = null, bool $refetchable = true, bool $encrypted = false, array $extra = [])
{
return $this->__call(__FUNCTION__, [$callable, $size, $mime, $file_name, $cb, $refetchable, $encrypted, $extra]);
}
public function uploadEncrypted($file, $file_name = '', $cb = null, array $extra = [])
{
return $this->__call(__FUNCTION__, [$file, $file_name, $cb, $extra]);
}
public function uploadFromTgfile($media, $cb = null, $encrypted = false, array $extra = [])
{
return $this->__call(__FUNCTION__, [$media, $cb, $encrypted, $extra]);
}
public function genAllFile($media, array $extra = [])
{
return $this->__call(__FUNCTION__, [$media, $extra]);
}
public function getFileInfo($constructor, array $extra = [])
{
return $this->__call(__FUNCTION__, [$constructor, $extra]);
}
public function getPropicInfo($data, array $extra = [])
{
return $this->__call(__FUNCTION__, [$data, $extra]);
}
public function getDownloadInfo($message_media, array $extra = [])
{
return $this->__call(__FUNCTION__, [$message_media, $extra]);
}
public function extractPhotosize($photo, array $extra = [])
{
return $this->__call(__FUNCTION__, [$photo, $extra]);
}
public function downloadToDir($message_media, $dir, $cb = null, array $extra = [])
{
return $this->__call(__FUNCTION__, [$message_media, $dir, $cb, $extra]);
}
public function downloadToFile($message_media, $file, $cb = null, array $extra = [])
{
return $this->__call(__FUNCTION__, [$message_media, $file, $cb, $extra]);
}
public function downloadToStream($message_media, $stream, $cb = null, $offset = 0, $end = -1, array $extra = [])
{
return $this->__call(__FUNCTION__, [$message_media, $stream, $cb, $offset, $end, $extra]);
}
public function downloadToCallable($message_media, $callable, $cb = null, $parallelize = true, $offset = 0, $end = -1, ?int $part_size = null, array $extra = [])
{
return $this->__call(__FUNCTION__, [$message_media, $callable, $cb, $parallelize, $offset, $end, $part_size, $extra]);
}
public function acceptSecretChat($params, array $extra = [])
{
return $this->__call(__FUNCTION__, [$params, $extra]);
}
public function requestSecretChat($user, array $extra = [])
{
return $this->__call(__FUNCTION__, [$user, $extra]);
}
public function completeSecretChat($params, array $extra = [])
{
return $this->__call(__FUNCTION__, [$params, $extra]);
}
public function notifyLayer($chat, array $extra = [])
{
return $this->__call(__FUNCTION__, [$chat, $extra]);
}
public function rekey($chat, array $extra = [])
{
return $this->__call(__FUNCTION__, [$chat, $extra]);
}
public function acceptRekey($chat, $params, array $extra = [])
{
return $this->__call(__FUNCTION__, [$chat, $params, $extra]);
}
public function commitRekey($chat, $params, array $extra = [])
{
return $this->__call(__FUNCTION__, [$chat, $params, $extra]);
}
public function completeRekey($chat, $params, array $extra = [])
{
return $this->__call(__FUNCTION__, [$chat, $params, $extra]);
}
public function secretChatStatus($chat, array $extra = [])
{
return $this->__call(__FUNCTION__, [$chat, $extra]);
}
public function getSecretChat($chat, array $extra = [])
{
return $this->__call(__FUNCTION__, [$chat, $extra]);
}
public function discardSecretChat($chat, array $extra = [])
{
return $this->__call(__FUNCTION__, [$chat, $extra]);
}
public function encryptSecretMessage($chat_id, $message, array $extra = [])
{
return $this->__call(__FUNCTION__, [$chat_id, $message, $extra]);
}
public function handleEncryptedUpdate($message, $test = false, array $extra = [])
{
return $this->__call(__FUNCTION__, [$message, $test, $extra]);
}
public function tryMTProtoV1Decrypt($message_key, $chat_id, $old, $encrypted_data, array $extra = [])
{
return $this->__call(__FUNCTION__, [$message_key, $chat_id, $old, $encrypted_data, $extra]);
}
public function tryMTProtoV2Decrypt($message_key, $chat_id, $old, $encrypted_data, array $extra = [])
{
return $this->__call(__FUNCTION__, [$message_key, $chat_id, $old, $encrypted_data, $extra]);
}
public function handleDecryptedUpdate($update, array $extra = [])
{
return $this->__call(__FUNCTION__, [$update, $extra]);
}
public function checkSecretInSeqNo($chat_id, $seqno, array $extra = [])
{
return $this->__call(__FUNCTION__, [$chat_id, $seqno, $extra]);
}
public function checkSecretOutSeqNo($chat_id, $seqno, array $extra = [])
{
return $this->__call(__FUNCTION__, [$chat_id, $seqno, $extra]);
}
public function generateSecretInSeqNo($chat, array $extra = [])
{
return $this->__call(__FUNCTION__, [$chat, $extra]);
}
public function generateSecretOutSeqNo($chat, array $extra = [])
{
return $this->__call(__FUNCTION__, [$chat, $extra]);
}
public function constructTL($files, $objects = [
], array $extra = [])
{
return $this->__call(__FUNCTION__, [$files, $objects, $extra]);
}
public function getMethodNamespaces(array $extra = [])
{
return $this->__call(__FUNCTION__, [$extra]);
}
public function getMethodsNamespaced(array $extra = [])
{
return $this->__call(__FUNCTION__, [$extra]);
}
public function updateCallbacks($objects, array $extra = [])
{
return $this->__call(__FUNCTION__, [$objects, $extra]);
}
public function deserializeBool($id, array $extra = [])
{
return $this->__call(__FUNCTION__, [$id, $extra]);
}
public function serializeObject($type, $object, $ctx, $layer = -1, array $extra = [])
{
return $this->__call(__FUNCTION__, [$type, $object, $ctx, $layer, $extra]);
}
public function serializeMethod($method, $arguments, array $extra = [])
{
return $this->__call(__FUNCTION__, [$method, $arguments, $extra]);
}
public function serializeParams($tl, $arguments, $ctx, $layer = -1, array $extra = [])
{
return $this->__call(__FUNCTION__, [$tl, $arguments, $ctx, $layer, $extra]);
}
public function getLength($stream, $type = [
'type' => '',
], array $extra = [])
{
return $this->__call(__FUNCTION__, [$stream, $type, $extra]);
}
/**
* :type stream: io.BytesIO object.
*/
public function deserialize($stream, $type = [
'type' => '',
], array $extra = [])
{
return $this->__call(__FUNCTION__, [$stream, $type, $extra]);
}
public function htmlEntityDecode($stuff, array $extra = [])
{
return $this->__call(__FUNCTION__, [$stuff, $extra]);
}
public function mbStrlen($text, array $extra = [])
{
return $this->__call(__FUNCTION__, [$text, $extra]);
}
public function mbSubstr($text, $offset, $length = null, array $extra = [])
{
return $this->__call(__FUNCTION__, [$text, $offset, $length, $extra]);
}
public function mbStrSplit($text, $length, array $extra = [])
{
return $this->__call(__FUNCTION__, [$text, $length, $extra]);
}
public function parseButtons($rows, array $extra = [])
{
return $this->__call(__FUNCTION__, [$rows, $extra]);
}
public function parseReplyMarkup($markup, array $extra = [])
{
return $this->__call(__FUNCTION__, [$markup, $extra]);
}
public function MTProtoToBotAPI($data, $sent_arguments = [
], array $extra = [])
{
return $this->__call(__FUNCTION__, [$data, $sent_arguments, $extra]);
}
public function botAPIToMTProto($arguments, array $extra = [])
{
return $this->__call(__FUNCTION__, [$arguments, $extra]);
}
public function parseNode($node, &$entities, &$new_message, &$offset, array $extra = [])
{
return $this->__call(__FUNCTION__, [$node, $entities, $new_message, $offset, $extra]);
}
public function parseMode($arguments, array $extra = [])
{
return $this->__call(__FUNCTION__, [$arguments, $extra]);
}
public function splitToChunks($args, array $extra = [])
{
return $this->__call(__FUNCTION__, [$args, $extra]);
}
public function multipleExplodeKeepDelimiters($delimiters, $string, array $extra = [])
{
return $this->__call(__FUNCTION__, [$delimiters, $string, $extra]);
}
public function htmlFixtags($text, array $extra = [])
{
return $this->__call(__FUNCTION__, [$text, $extra]);
}
public function buildRows($button_list, array $extra = [])
{
return $this->__call(__FUNCTION__, [$button_list, $extra]);
}
public function base64urlDecode($data, array $extra = [])
{
return $this->__call(__FUNCTION__, [$data, $extra]);
}
public function base64urlEncode($data, array $extra = [])
{
return $this->__call(__FUNCTION__, [$data, $extra]);
}
public function rleDecode($string, array $extra = [])
{
return $this->__call(__FUNCTION__, [$string, $extra]);
}
public function rleEncode($string, array $extra = [])
{
return $this->__call(__FUNCTION__, [$string, $extra]);
}
public function photosizeToBotAPI($photoSize, $photo, $thumbnail = false, array $extra = [])
{
return $this->__call(__FUNCTION__, [$photoSize, $photo, $thumbnail, $extra]);
}
public function unpackFileId($file_id, array $extra = [])
{
return $this->__call(__FUNCTION__, [$file_id, $extra]);
}
public function getMimeFromExtension($extension, $default, array $extra = [])
{
return $this->__call(__FUNCTION__, [$extension, $default, $extra]);
}
public function getExtensionFromMime($mime, array $extra = [])
{
return $this->__call(__FUNCTION__, [$mime, $extra]);
}
public function getExtensionFromLocation($location, $default, array $extra = [])
{
return $this->__call(__FUNCTION__, [$location, $default, $extra]);
}
public function getMimeFromFile($file, array $extra = [])
{
return $this->__call(__FUNCTION__, [$file, $extra]);
}
public function getMimeFromBuffer($buffer, array $extra = [])
{
return $this->__call(__FUNCTION__, [$buffer, $extra]);
}
public function tdcliToTd(&$params, $key = null, array $extra = [])
{
return $this->__call(__FUNCTION__, [$params, $key, $extra]);
}
public function tdToMTProto($params, array $extra = [])
{
return $this->__call(__FUNCTION__, [$params, $extra]);
}
public function MTProtoToTdcli($params, array $extra = [])
{
return $this->__call(__FUNCTION__, [$params, $extra]);
}
public function MTProtoToTd(&$params, array $extra = [])
{
return $this->__call(__FUNCTION__, [$params, $extra]);
}
public function tdToTdcli($params, array $extra = [])
{
return $this->__call(__FUNCTION__, [$params, $extra]);
}
public function genVectorHash($ints, array $extra = [])
{
return $this->__call(__FUNCTION__, [$ints, $extra]);
}
public function randomInt($modulus = false, array $extra = [])
{
return $this->__call(__FUNCTION__, [$modulus, $extra]);
}
public function random($length, array $extra = [])
{
return $this->__call(__FUNCTION__, [$length, $extra]);
}
/**
* posmod(numeric,numeric) : numeric
* Works just like the % (modulus) operator, only returns always a postive number.
*/
public function posmod($a, $b, array $extra = [])
{
return $this->__call(__FUNCTION__, [$a, $b, $extra]);
}
public function unpackSignedInt($value, array $extra = [])
{
return $this->__call(__FUNCTION__, [$value, $extra]);
}
public function unpackSignedLong($value, array $extra = [])
{
return $this->__call(__FUNCTION__, [$value, $extra]);
}
public function unpackSignedLongString($value, array $extra = [])
{
return $this->__call(__FUNCTION__, [$value, $extra]);
}
public function packSignedInt($value, array $extra = [])
{
return $this->__call(__FUNCTION__, [$value, $extra]);
}
public function packSignedLong($value, array $extra = [])
{
return $this->__call(__FUNCTION__, [$value, $extra]);
}
public function packUnsignedInt($value, array $extra = [])
{
return $this->__call(__FUNCTION__, [$value, $extra]);
}
public function packDouble($value, array $extra = [])
{
return $this->__call(__FUNCTION__, [$value, $extra]);
}
public function unpackDouble($value, array $extra = [])
{
return $this->__call(__FUNCTION__, [$value, $extra]);
}
public function wait($promise, $ignoreSignal = false, array $extra = [])
{
return $this->__call(__FUNCTION__, [$promise, $ignoreSignal, $extra]);
}
public function all($promises, array $extra = [])
{
return $this->__call(__FUNCTION__, [$promises, $extra]);
}
public function any($promises, array $extra = [])
{
return $this->__call(__FUNCTION__, [$promises, $extra]);
}
public function some($promises, array $extra = [])
{
return $this->__call(__FUNCTION__, [$promises, $extra]);
}
public function first($promises, array $extra = [])
{
return $this->__call(__FUNCTION__, [$promises, $extra]);
}
public function timeout($promise, $timeout, array $extra = [])
{
return $this->__call(__FUNCTION__, [$promise, $timeout, $extra]);
}
public function call($promise, array $extra = [])
{
return $this->__call(__FUNCTION__, [$promise, $extra]);
}
public function callFork($promise, $actual = null, $file = '', array $extra = [])
{
return $this->__call(__FUNCTION__, [$promise, $actual, $file, $extra]);
}
public function callForkDefer($promise, array $extra = [])
{
return $this->__call(__FUNCTION__, [$promise, $extra]);
}
public function rethrow($e, $file = '', array $extra = [])
{
return $this->__call(__FUNCTION__, [$e, $file, $extra]);
}
public function after($a, $b, array $extra = [])
{
return $this->__call(__FUNCTION__, [$a, $b, $extra]);
}
/**
* Asynchronously lock a file
* Resolves with a callbable that MUST eventually be called in order to release the lock.
*
* @param string $file File to lock
* @param integer $operation Locking mode (see flock)
* @param numeric $polling Polling interval for lock
* @return Promise
*/
public function flock(string $file, int $operation, $polling = 0.1, array $extra = [])
{
return $this->__call(__FUNCTION__, [$file, $operation, $polling, $extra]);
}
public function noCache(int $status, string $message, array $extra = [])
{
return $this->__call(__FUNCTION__, [$status, $message, $extra]);
}
public function flockGenerator(string $file, int $operation, $polling, array $extra = [])
{
return $this->__call(__FUNCTION__, [$file, $operation, $polling, $extra]);
}
public function sleep($time, array $extra = [])
{
return $this->__call(__FUNCTION__, [$time, $extra]);
}
public function readLine($prompt = '', array $extra = [])
{
return $this->__call(__FUNCTION__, [$prompt, $extra]);
}
public function readLineGenerator($prompt = '', array $extra = [])
{
return $this->__call(__FUNCTION__, [$prompt, $extra]);
}
public function echo($string, array $extra = [])
{
return $this->__call(__FUNCTION__, [$string, $extra]);
}
public function isArrayOrAlike($var, array $extra = [])
{
return $this->__call(__FUNCTION__, [$var, $extra]);
}
/**
* Convert to camelCase.
*
* @param string $input
*
* @return string
*/
public function fromSnakeCase(string $input, array $extra = []): string
{
return $this->__call(__FUNCTION__, [$input, $extra]);
}
/**
* Convert to snake_case.
*
* @param string $input
*
* @return string
*/
public function fromCamelCase(string $input, array $extra = []): string
{
return $this->__call(__FUNCTION__, [$input, $extra]);
}
/**
* Create array.
*
* @param mixed ...$params Params
*
* @return array
*/
public function arr(...$params): array
{
return $this->__call(__FUNCTION__, Tools::arr(...$params));
}
public function requestCall($user, array $extra = [])
{
return $this->__call(__FUNCTION__, [$user, $extra]);
}
public function acceptCall($call, array $extra = [])
{
return $this->__call(__FUNCTION__, [$call, $extra]);
}
public function discardCall($call, $reason, $rating = [
], $need_debug = true, array $extra = [])
{
return $this->__call(__FUNCTION__, [$call, $reason, $rating, $need_debug, $extra]);
}
public function confirmCall($params, array $extra = [])
{
return $this->__call(__FUNCTION__, [$params, $extra]);
}
public function completeCall($params, array $extra = [])
{
return $this->__call(__FUNCTION__, [$params, $extra]);
}
public function callStatus($id, array $extra = [])
{
return $this->__call(__FUNCTION__, [$id, $extra]);
}
public function getCall($call, array $extra = [])
{
return $this->__call(__FUNCTION__, [$call, $extra]);
}
public function checkCalls(array $extra = [])
{
return $this->__call(__FUNCTION__, [$extra]);
}
public function getDialogs($force = true, array $extra = [])
{
return $this->__call(__FUNCTION__, [$force, $extra]);
}
public function getFullDialogs($force = true, array $extra = [])
{
return $this->__call(__FUNCTION__, [$force, $extra]);
}
public function setEventHandler($event_handler, array $extra = [])
{
return $this->__call(__FUNCTION__, [$event_handler, $extra]);
}
public function getEventHandler(array $extra = [])
{
return $this->__call(__FUNCTION__, [$extra]);
}
public function eventUpdateHandler($update, array $extra = [])
{
return $this->__call(__FUNCTION__, [$update, $extra]);
}
public function setWebhook($hook_url, $pem_path = null, array $extra = [])
{
return $this->__call(__FUNCTION__, [$hook_url, $pem_path, $extra]);
}
public function setCallback($callback, array $extra = [])
{
return $this->__call(__FUNCTION__, [$callback, $extra]);
}
public function logout(array $extra = [])
{
return $this->__call(__FUNCTION__, [$extra]);
}
public function botLogin($token, array $extra = [])
{
return $this->__call(__FUNCTION__, [$token, $extra]);
}
public function phoneLogin($number, $sms_type = 5, array $extra = [])
{
return $this->__call(__FUNCTION__, [$number, $sms_type, $extra]);
}
public function completePhoneLogin($code, array $extra = [])
{
return $this->__call(__FUNCTION__, [$code, $extra]);
}
public function importAuthorization($authorization, array $extra = [])
{
return $this->__call(__FUNCTION__, [$authorization, $extra]);
}
public function exportAuthorization(array $extra = [])
{
return $this->__call(__FUNCTION__, [$extra]);
}
public function completeSignup($first_name, $last_name, array $extra = [])
{
return $this->__call(__FUNCTION__, [$first_name, $last_name, $extra]);
}
public function complete2faLogin($password, array $extra = [])
{
return $this->__call(__FUNCTION__, [$password, $extra]);
}
/**
* 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, array $extra = [])
{
return $this->__call(__FUNCTION__, [$params, $extra]);
}
public function setLoopCallback($callback, array $extra = [])
{
return $this->__call(__FUNCTION__, [$callback, $extra]);
}
public function loop($max_forks = 0, array $extra = [])
{
return $this->__call(__FUNCTION__, [$max_forks, $extra]);
}
public function closeConnection($message = 'OK!', array $extra = [])
{
return $this->__call(__FUNCTION__, [$message, $extra]);
}
public function setNoop(array $extra = [])
{
return $this->__call(__FUNCTION__, [$extra]);
}
public function noop(array $extra = [])
{
return $this->__call(__FUNCTION__, [$extra]);
}
public function start(array $extra = [])
{
return $this->__call(__FUNCTION__, [$extra]);
}
public function webPhoneLogin(array $extra = [])
{
return $this->__call(__FUNCTION__, [$extra]);
}
public function webCompletePhoneLogin(array $extra = [])
{
return $this->__call(__FUNCTION__, [$extra]);
}
public function webComplete2faLogin(array $extra = [])
{
return $this->__call(__FUNCTION__, [$extra]);
}
public function webCompleteSignup(array $extra = [])
{
return $this->__call(__FUNCTION__, [$extra]);
}
public function webBotLogin(array $extra = [])
{
return $this->__call(__FUNCTION__, [$extra]);
}
public function webEcho($message = '', array $extra = [])
{
return $this->__call(__FUNCTION__, [$message, $extra]);
}
public function webEchoTemplate($message, $form, array $extra = [])
{
return $this->__call(__FUNCTION__, [$message, $form, $extra]);
}
public function getWebTemplate(array $extra = [])
{
return $this->__call(__FUNCTION__, [$extra]);
}
public function setWebTemplate($template, array $extra = [])
{
return $this->__call(__FUNCTION__, [$template, $extra]);
}
public function checkTos(array $extra = [])
{
return $this->__call(__FUNCTION__, [$extra]);
}
public function acceptTos(array $extra = [])
{
return $this->__call(__FUNCTION__, [$extra]);
}
public function declineTos(array $extra = [])
{
return $this->__call(__FUNCTION__, [$extra]);
}
}