diff --git a/build_docs.php b/build_docs.php index 0c30ac8f..a974207e 100755 --- a/build_docs.php +++ b/build_docs.php @@ -13,6 +13,7 @@ If not, see . require 'vendor/autoload.php'; $param = 1; \danog\MadelineProto\Logger::constructor($param); +set_error_handler(['\danog\MadelineProto\Exception', 'ExceptionErrorHandler']); \danog\MadelineProto\Logger::log(['Copying readme...'], \danog\MadelineProto\Logger::NOTICE); diff --git a/docs/API_docs/constructors/index.md b/docs/API_docs/constructors/index.md index 774f6af0..a1eedb7f 100644 --- a/docs/API_docs/constructors/index.md +++ b/docs/API_docs/constructors/index.md @@ -4,9 +4,6 @@ description: List of constructors --- # Constructors [Back to API documentation index](..) - - - ***

[$accountDaysTTL](../constructors/accountDaysTTL.md) = \['days' => [int](../types/int.md), \]; @@ -417,25 +414,25 @@ description: List of constructors

[$document](../constructors/document.md) = \['id' => [long](../types/long.md), 'access_hash' => [long](../types/long.md), 'date' => [int](../types/int.md), 'mime_type' => [string](../types/string.md), 'size' => [int](../types/int.md), 'thumb' => [PhotoSize](../types/PhotoSize.md), 'dc_id' => [int](../types/int.md), 'version' => [int](../types/int.md), 'attributes' => \[[DocumentAttribute](../types/DocumentAttribute.md)\], \]; *** -

[$documentAttributeAnimated\_23](../constructors/documentAttributeAnimated_23.md) = \[\]; +

[$documentAttributeAnimated](../constructors/documentAttributeAnimated.md) = \[\]; ***

[$documentAttributeAudio\_46](../constructors/documentAttributeAudio_46.md) = \['duration' => [int](../types/int.md), 'title' => [string](../types/string.md), 'performer' => [string](../types/string.md), \]; *** -

[$documentAttributeFilename\_23](../constructors/documentAttributeFilename_23.md) = \['file_name' => [string](../types/string.md), \]; +

[$documentAttributeFilename](../constructors/documentAttributeFilename.md) = \['file_name' => [string](../types/string.md), \]; ***

[$documentAttributeHasStickers](../constructors/documentAttributeHasStickers.md) = \[\]; *** -

[$documentAttributeImageSize\_23](../constructors/documentAttributeImageSize_23.md) = \['w' => [int](../types/int.md), 'h' => [int](../types/int.md), \]; +

[$documentAttributeImageSize](../constructors/documentAttributeImageSize.md) = \['w' => [int](../types/int.md), 'h' => [int](../types/int.md), \]; ***

[$documentAttributeSticker\_55](../constructors/documentAttributeSticker_55.md) = \['alt' => [string](../types/string.md), 'stickerset' => [InputStickerSet](../types/InputStickerSet.md), \]; *** -

[$documentAttributeVideo\_66](../constructors/documentAttributeVideo_66.md) = \['round_message' => [Bool](../types/Bool.md), 'duration' => [int](../types/int.md), 'w' => [int](../types/int.md), 'h' => [int](../types/int.md), \]; +

[$documentAttributeVideo](../constructors/documentAttributeVideo.md) = \['round_message' => [Bool](../types/Bool.md), 'duration' => [int](../types/int.md), 'w' => [int](../types/int.md), 'h' => [int](../types/int.md), \]; ***

[$documentEmpty](../constructors/documentEmpty.md) = \['id' => [long](../types/long.md), \]; @@ -480,10 +477,10 @@ description: List of constructors

[$exportedMessageLink](../constructors/exportedMessageLink.md) = \['link' => [string](../types/string.md), \]; *** -

[$fileLocation\_23](../constructors/fileLocation_23.md) = \['dc_id' => [int](../types/int.md), 'volume_id' => [long](../types/long.md), 'local_id' => [int](../types/int.md), 'secret' => [long](../types/long.md), \]; +

[$fileLocation](../constructors/fileLocation.md) = \['dc_id' => [int](../types/int.md), 'volume_id' => [long](../types/long.md), 'local_id' => [int](../types/int.md), 'secret' => [long](../types/long.md), \]; *** -

[$fileLocationUnavailable\_23](../constructors/fileLocationUnavailable_23.md) = \['volume_id' => [long](../types/long.md), 'local_id' => [int](../types/int.md), 'secret' => [long](../types/long.md), \]; +

[$fileLocationUnavailable](../constructors/fileLocationUnavailable.md) = \['volume_id' => [long](../types/long.md), 'local_id' => [int](../types/int.md), 'secret' => [long](../types/long.md), \]; ***

[$foundGif](../constructors/foundGif.md) = \['url' => [string](../types/string.md), 'thumb_url' => [string](../types/string.md), 'content_url' => [string](../types/string.md), 'content_type' => [string](../types/string.md), 'w' => [int](../types/int.md), 'h' => [int](../types/int.md), \]; @@ -508,7 +505,7 @@ description: List of constructors ***

[$help\_appUpdate](../constructors/help_appUpdate.md) = \['id' => [int](../types/int.md), 'critical' => [Bool](../types/Bool.md), 'url' => [string](../types/string.md), 'text' => [string](../types/string.md), \]; -[$help\_configSimple](../constructors/help_configSimple.md) = \['date' => [int](../types/int.md), 'expires' => [int](../types/int.md), 'dc_id' => [int](../types/int.md), 'ip_port_list' => \[[ipPort](../types/ipPort.md)\], \]; +[$help\_configSimple](../constructors/help_configSimple.md) = \['date' => [int](../types/int.md), 'expires' => [int](../types/int.md), 'dc_id' => [int](../types/int.md), 'ip_port_list' => \[[ipPort](../constructors/ipPort.md)\], \]; [$help\_inviteText](../constructors/help_inviteText.md) = \['message' => [string](../types/string.md), \]; @@ -1301,16 +1298,16 @@ description: List of constructors

[$photo](../constructors/photo.md) = \['has_stickers' => [Bool](../types/Bool.md), 'id' => [long](../types/long.md), 'access_hash' => [long](../types/long.md), 'date' => [int](../types/int.md), 'sizes' => \[[PhotoSize](../types/PhotoSize.md)\], \]; *** -

[$photoCachedSize\_23](../constructors/photoCachedSize_23.md) = \['type' => [string](../types/string.md), 'location' => [FileLocation](../types/FileLocation.md), 'w' => [int](../types/int.md), 'h' => [int](../types/int.md), 'bytes' => [bytes](../types/bytes.md), \]; +

[$photoCachedSize](../constructors/photoCachedSize.md) = \['type' => [string](../types/string.md), 'location' => [FileLocation](../types/FileLocation.md), 'w' => [int](../types/int.md), 'h' => [int](../types/int.md), 'bytes' => [bytes](../types/bytes.md), \]; ***

[$photoEmpty](../constructors/photoEmpty.md) = \['id' => [long](../types/long.md), \]; *** -

[$photoSize\_23](../constructors/photoSize_23.md) = \['type' => [string](../types/string.md), 'location' => [FileLocation](../types/FileLocation.md), 'w' => [int](../types/int.md), 'h' => [int](../types/int.md), 'size' => [int](../types/int.md), \]; +

[$photoSize](../constructors/photoSize.md) = \['type' => [string](../types/string.md), 'location' => [FileLocation](../types/FileLocation.md), 'w' => [int](../types/int.md), 'h' => [int](../types/int.md), 'size' => [int](../types/int.md), \]; *** -

[$photoSizeEmpty\_23](../constructors/photoSizeEmpty_23.md) = \['type' => [string](../types/string.md), \]; +

[$photoSizeEmpty](../constructors/photoSizeEmpty.md) = \['type' => [string](../types/string.md), \]; ***

[$photos\_photo](../constructors/photos_photo.md) = \['photo' => [Photo](../types/Photo.md), 'users' => \[[User](../types/User.md)\], \]; @@ -1383,28 +1380,28 @@ description: List of constructors [$rpc\_error](../constructors/rpc_error.md) = \['error_code' => [int](../types/int.md), 'error_message' => [string](../types/string.md), \]; *** -

[$sendMessageCancelAction\_17](../constructors/sendMessageCancelAction_17.md) = \[\]; +

[$sendMessageCancelAction](../constructors/sendMessageCancelAction.md) = \[\]; *** -

[$sendMessageChooseContactAction\_17](../constructors/sendMessageChooseContactAction_17.md) = \[\]; +

[$sendMessageChooseContactAction](../constructors/sendMessageChooseContactAction.md) = \[\]; ***

[$sendMessageGamePlayAction](../constructors/sendMessageGamePlayAction.md) = \[\]; *** -

[$sendMessageGeoLocationAction\_17](../constructors/sendMessageGeoLocationAction_17.md) = \[\]; +

[$sendMessageGeoLocationAction](../constructors/sendMessageGeoLocationAction.md) = \[\]; *** -

[$sendMessageRecordAudioAction\_17](../constructors/sendMessageRecordAudioAction_17.md) = \[\]; +

[$sendMessageRecordAudioAction](../constructors/sendMessageRecordAudioAction.md) = \[\]; ***

[$sendMessageRecordRoundAction](../constructors/sendMessageRecordRoundAction.md) = \[\]; *** -

[$sendMessageRecordVideoAction\_17](../constructors/sendMessageRecordVideoAction_17.md) = \[\]; +

[$sendMessageRecordVideoAction](../constructors/sendMessageRecordVideoAction.md) = \[\]; *** -

[$sendMessageTypingAction\_17](../constructors/sendMessageTypingAction_17.md) = \[\]; +

[$sendMessageTypingAction](../constructors/sendMessageTypingAction.md) = \[\]; ***

[$sendMessageUploadAudioAction\_17](../constructors/sendMessageUploadAudioAction_17.md) = \[\]; diff --git a/docs/API_docs/methods/auth_importBotAuthorization.md b/docs/API_docs/methods/auth_importBotAuthorization.md index 0d8836b6..57521a13 100644 --- a/docs/API_docs/methods/auth_importBotAuthorization.md +++ b/docs/API_docs/methods/auth_importBotAuthorization.md @@ -6,71 +6,8 @@ description: auth.importBotAuthorization parameters, return type and example [Back to methods index](index.md) -*You cannot use this method directly, use the bot_login method instead (see https://daniil.it/MadelineProto for more info)* +**You cannot use this method directly, use the bot_login method instead (see https://daniil.it/MadelineProto for more info)** -### Parameters: - -| Name | Type | Required | -|----------|:-------------:|---------:| -|api\_id|[int](../types/int.md) | Yes| -|api\_hash|[string](../types/string.md) | Yes| -|bot\_auth\_token|[string](../types/string.md) | Yes| - - -### Return type: [auth\_Authorization](../types/auth_Authorization.md) - -### Example: - - -``` -$MadelineProto = new \danog\MadelineProto\API(); -if (isset($token)) { // Login as a bot - $MadelineProto->bot_login($token); -} -if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } - $MadelineProto->complete_phone_login($code); -} - -$auth_Authorization = $MadelineProto->auth->importBotAuthorization(['api_id' => int, 'api_hash' => 'string', 'bot_auth_token' => 'string', ]); -``` - -Or, if you're using the [PWRTelegram HTTP API](https://pwrtelegram.xyz): - -### As a bot: - -POST/GET to `https://api.pwrtelegram.xyz/botTOKEN/madeline` - -Parameters: - -* method - auth.importBotAuthorization -* params - `{"api_id": int, "api_hash": "string", "bot_auth_token": "string", }` - - - -### As a user: - -POST/GET to `https://api.pwrtelegram.xyz/userTOKEN/auth.importBotAuthorization` - -Parameters: - -api_id - Json encoded int -api_hash - Json encoded string -bot_auth_token - Json encoded string - - - -Or, if you're into Lua: - -``` -auth_Authorization = auth.importBotAuthorization({api_id=int, api_hash='string', bot_auth_token='string', }) -``` - diff --git a/docs/API_docs/methods/auth_logOut.md b/docs/API_docs/methods/auth_logOut.md index 12159bab..7d5bb3f7 100644 --- a/docs/API_docs/methods/auth_logOut.md +++ b/docs/API_docs/methods/auth_logOut.md @@ -6,61 +6,8 @@ description: auth.logOut parameters, return type and example [Back to methods index](index.md) -*You cannot use this method directly, use the logout method instead (see https://daniil.it/MadelineProto for more info)* +**You cannot use this method directly, use the logout method instead (see https://daniil.it/MadelineProto for more info)** - - -### Return type: [Bool](../types/Bool.md) - -### Example: - - -``` -$MadelineProto = new \danog\MadelineProto\API(); -if (isset($token)) { // Login as a bot - $MadelineProto->bot_login($token); -} -if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } - $MadelineProto->complete_phone_login($code); -} - -$Bool = $MadelineProto->auth->logOut(); -``` - -Or, if you're using the [PWRTelegram HTTP API](https://pwrtelegram.xyz): - -### As a bot: - -POST/GET to `https://api.pwrtelegram.xyz/botTOKEN/madeline` - -Parameters: - -* method - auth.logOut -* params - `{}` - - - -### As a user: - -POST/GET to `https://api.pwrtelegram.xyz/userTOKEN/auth.logOut` - -Parameters: - - - - -Or, if you're into Lua: - -``` -Bool = auth.logOut({}) -``` - diff --git a/docs/API_docs/methods/auth_sendCode.md b/docs/API_docs/methods/auth_sendCode.md index bda88218..22d1df94 100644 --- a/docs/API_docs/methods/auth_sendCode.md +++ b/docs/API_docs/methods/auth_sendCode.md @@ -6,75 +6,8 @@ description: auth.sendCode parameters, return type and example [Back to methods index](index.md) -*You cannot use this method directly, use the phone_login method instead (see https://daniil.it/MadelineProto for more info)* +**You cannot use this method directly, use the phone_login method instead (see https://daniil.it/MadelineProto for more info)** -### Parameters: - -| Name | Type | Required | -|----------|:-------------:|---------:| -|allow\_flashcall|[Bool](../types/Bool.md) | Optional| -|phone\_number|[string](../types/string.md) | Yes| -|current\_number|[Bool](../types/Bool.md) | Optional| -|api\_id|[int](../types/int.md) | Yes| -|api\_hash|[string](../types/string.md) | Yes| - - -### Return type: [auth\_SentCode](../types/auth_SentCode.md) - -### Example: - - -``` -$MadelineProto = new \danog\MadelineProto\API(); -if (isset($token)) { // Login as a bot - $MadelineProto->bot_login($token); -} -if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } - $MadelineProto->complete_phone_login($code); -} - -$auth_SentCode = $MadelineProto->auth->sendCode(['allow_flashcall' => Bool, 'phone_number' => 'string', 'current_number' => Bool, 'api_id' => int, 'api_hash' => 'string', ]); -``` - -Or, if you're using the [PWRTelegram HTTP API](https://pwrtelegram.xyz): - -### As a bot: - -POST/GET to `https://api.pwrtelegram.xyz/botTOKEN/madeline` - -Parameters: - -* method - auth.sendCode -* params - `{"allow_flashcall": Bool, "phone_number": "string", "current_number": Bool, "api_id": int, "api_hash": "string", }` - - - -### As a user: - -POST/GET to `https://api.pwrtelegram.xyz/userTOKEN/auth.sendCode` - -Parameters: - -allow_flashcall - Json encoded Bool -phone_number - Json encoded string -current_number - Json encoded Bool -api_id - Json encoded int -api_hash - Json encoded string - - - -Or, if you're into Lua: - -``` -auth_SentCode = auth.sendCode({allow_flashcall=Bool, phone_number='string', current_number=Bool, api_id=int, api_hash='string', }) -``` - diff --git a/docs/API_docs/methods/auth_signIn.md b/docs/API_docs/methods/auth_signIn.md index 75c50d70..ab40bb4d 100644 --- a/docs/API_docs/methods/auth_signIn.md +++ b/docs/API_docs/methods/auth_signIn.md @@ -6,71 +6,8 @@ description: auth.signIn parameters, return type and example [Back to methods index](index.md) -*You cannot use this method directly, use the complete_phone_login method instead (see https://daniil.it/MadelineProto for more info)* +**You cannot use this method directly, use the complete_phone_login method instead (see https://daniil.it/MadelineProto for more info)** -### Parameters: - -| Name | Type | Required | -|----------|:-------------:|---------:| -|phone\_number|[string](../types/string.md) | Yes| -|phone\_code\_hash|[string](../types/string.md) | Yes| -|phone\_code|[string](../types/string.md) | Yes| - - -### Return type: [auth\_Authorization](../types/auth_Authorization.md) - -### Example: - - -``` -$MadelineProto = new \danog\MadelineProto\API(); -if (isset($token)) { // Login as a bot - $MadelineProto->bot_login($token); -} -if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } - $MadelineProto->complete_phone_login($code); -} - -$auth_Authorization = $MadelineProto->auth->signIn(['phone_number' => 'string', 'phone_code_hash' => 'string', 'phone_code' => 'string', ]); -``` - -Or, if you're using the [PWRTelegram HTTP API](https://pwrtelegram.xyz): - -### As a bot: - -POST/GET to `https://api.pwrtelegram.xyz/botTOKEN/madeline` - -Parameters: - -* method - auth.signIn -* params - `{"phone_number": "string", "phone_code_hash": "string", "phone_code": "string", }` - - - -### As a user: - -POST/GET to `https://api.pwrtelegram.xyz/userTOKEN/auth.signIn` - -Parameters: - -phone_number - Json encoded string -phone_code_hash - Json encoded string -phone_code - Json encoded string - - - -Or, if you're into Lua: - -``` -auth_Authorization = auth.signIn({phone_number='string', phone_code_hash='string', phone_code='string', }) -``` - diff --git a/docs/API_docs/methods/auth_signUp.md b/docs/API_docs/methods/auth_signUp.md index f2a72b68..042d1191 100644 --- a/docs/API_docs/methods/auth_signUp.md +++ b/docs/API_docs/methods/auth_signUp.md @@ -6,75 +6,8 @@ description: auth.signUp parameters, return type and example [Back to methods index](index.md) -*You cannot use this method directly, use the complete_signup method instead (see https://daniil.it/MadelineProto for more info)* +**You cannot use this method directly, use the complete_signup method instead (see https://daniil.it/MadelineProto for more info)** -### Parameters: - -| Name | Type | Required | -|----------|:-------------:|---------:| -|phone\_number|[string](../types/string.md) | Yes| -|phone\_code\_hash|[string](../types/string.md) | Yes| -|phone\_code|[string](../types/string.md) | Yes| -|first\_name|[string](../types/string.md) | Yes| -|last\_name|[string](../types/string.md) | Yes| - - -### Return type: [auth\_Authorization](../types/auth_Authorization.md) - -### Example: - - -``` -$MadelineProto = new \danog\MadelineProto\API(); -if (isset($token)) { // Login as a bot - $MadelineProto->bot_login($token); -} -if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } - $MadelineProto->complete_phone_login($code); -} - -$auth_Authorization = $MadelineProto->auth->signUp(['phone_number' => 'string', 'phone_code_hash' => 'string', 'phone_code' => 'string', 'first_name' => 'string', 'last_name' => 'string', ]); -``` - -Or, if you're using the [PWRTelegram HTTP API](https://pwrtelegram.xyz): - -### As a bot: - -POST/GET to `https://api.pwrtelegram.xyz/botTOKEN/madeline` - -Parameters: - -* method - auth.signUp -* params - `{"phone_number": "string", "phone_code_hash": "string", "phone_code": "string", "first_name": "string", "last_name": "string", }` - - - -### As a user: - -POST/GET to `https://api.pwrtelegram.xyz/userTOKEN/auth.signUp` - -Parameters: - -phone_number - Json encoded string -phone_code_hash - Json encoded string -phone_code - Json encoded string -first_name - Json encoded string -last_name - Json encoded string - - - -Or, if you're into Lua: - -``` -auth_Authorization = auth.signUp({phone_number='string', phone_code_hash='string', phone_code='string', first_name='string', last_name='string', }) -``` - diff --git a/docs/API_docs/methods/channels_getFullChannel.md b/docs/API_docs/methods/channels_getFullChannel.md index 340efcfe..58dbe057 100644 --- a/docs/API_docs/methods/channels_getFullChannel.md +++ b/docs/API_docs/methods/channels_getFullChannel.md @@ -6,67 +6,8 @@ description: channels.getFullChannel parameters, return type and example [Back to methods index](index.md) -*You cannot use this method directly, use the get_pwr_chat, get_info, get_full_info methods instead (see https://daniil.it/MadelineProto for more info)* +**You cannot use this method directly, use the get_pwr_chat, get_info, get_full_info methods instead (see https://daniil.it/MadelineProto for more info)** -### Parameters: - -| Name | Type | Required | -|----------|:-------------:|---------:| -|channel|[InputChannel](../types/InputChannel.md) | Yes| - - -### Return type: [messages\_ChatFull](../types/messages_ChatFull.md) - -### Example: - - -``` -$MadelineProto = new \danog\MadelineProto\API(); -if (isset($token)) { // Login as a bot - $MadelineProto->bot_login($token); -} -if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } - $MadelineProto->complete_phone_login($code); -} - -$messages_ChatFull = $MadelineProto->channels->getFullChannel(['channel' => InputChannel, ]); -``` - -Or, if you're using the [PWRTelegram HTTP API](https://pwrtelegram.xyz): - -### As a bot: - -POST/GET to `https://api.pwrtelegram.xyz/botTOKEN/madeline` - -Parameters: - -* method - channels.getFullChannel -* params - `{"channel": InputChannel, }` - - - -### As a user: - -POST/GET to `https://api.pwrtelegram.xyz/userTOKEN/channels.getFullChannel` - -Parameters: - -channel - Json encoded InputChannel - - - -Or, if you're into Lua: - -``` -messages_ChatFull = channels.getFullChannel({channel=InputChannel, }) -``` - diff --git a/docs/API_docs/methods/channels_getParticipants.md b/docs/API_docs/methods/channels_getParticipants.md index 4c6e09cc..d84cf09c 100644 --- a/docs/API_docs/methods/channels_getParticipants.md +++ b/docs/API_docs/methods/channels_getParticipants.md @@ -6,73 +6,8 @@ description: channels.getParticipants parameters, return type and example [Back to methods index](index.md) -*You cannot use this method directly, use the get_pwr_chat, get_info, get_full_info methods instead (see https://daniil.it/MadelineProto for more info)* +**You cannot use this method directly, use the get_pwr_chat, get_info, get_full_info methods instead (see https://daniil.it/MadelineProto for more info)** -### Parameters: - -| Name | Type | Required | -|----------|:-------------:|---------:| -|channel|[InputChannel](../types/InputChannel.md) | Yes| -|filter|[ChannelParticipantsFilter](../types/ChannelParticipantsFilter.md) | Yes| -|offset|[int](../types/int.md) | Yes| -|limit|[int](../types/int.md) | Yes| - - -### Return type: [channels\_ChannelParticipants](../types/channels_ChannelParticipants.md) - -### Example: - - -``` -$MadelineProto = new \danog\MadelineProto\API(); -if (isset($token)) { // Login as a bot - $MadelineProto->bot_login($token); -} -if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } - $MadelineProto->complete_phone_login($code); -} - -$channels_ChannelParticipants = $MadelineProto->channels->getParticipants(['channel' => InputChannel, 'filter' => ChannelParticipantsFilter, 'offset' => int, 'limit' => int, ]); -``` - -Or, if you're using the [PWRTelegram HTTP API](https://pwrtelegram.xyz): - -### As a bot: - -POST/GET to `https://api.pwrtelegram.xyz/botTOKEN/madeline` - -Parameters: - -* method - channels.getParticipants -* params - `{"channel": InputChannel, "filter": ChannelParticipantsFilter, "offset": int, "limit": int, }` - - - -### As a user: - -POST/GET to `https://api.pwrtelegram.xyz/userTOKEN/channels.getParticipants` - -Parameters: - -channel - Json encoded InputChannel -filter - Json encoded ChannelParticipantsFilter -offset - Json encoded int -limit - Json encoded int - - - -Or, if you're into Lua: - -``` -channels_ChannelParticipants = channels.getParticipants({channel=InputChannel, filter=ChannelParticipantsFilter, offset=int, limit=int, }) -``` - diff --git a/docs/API_docs/methods/contacts_resolveUsername.md b/docs/API_docs/methods/contacts_resolveUsername.md index 90e72851..b665b382 100644 --- a/docs/API_docs/methods/contacts_resolveUsername.md +++ b/docs/API_docs/methods/contacts_resolveUsername.md @@ -6,67 +6,8 @@ description: contacts.resolveUsername parameters, return type and example [Back to methods index](index.md) -*You cannot use this method directly, use the resolve_username, get_pwr_chat, get_info, get_full_info methods instead (see https://daniil.it/MadelineProto for more info)* +**You cannot use this method directly, use the resolve_username, get_pwr_chat, get_info, get_full_info methods instead (see https://daniil.it/MadelineProto for more info)** -### Parameters: - -| Name | Type | Required | -|----------|:-------------:|---------:| -|username|[string](../types/string.md) | Yes| - - -### Return type: [contacts\_ResolvedPeer](../types/contacts_ResolvedPeer.md) - -### Example: - - -``` -$MadelineProto = new \danog\MadelineProto\API(); -if (isset($token)) { // Login as a bot - $MadelineProto->bot_login($token); -} -if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } - $MadelineProto->complete_phone_login($code); -} - -$contacts_ResolvedPeer = $MadelineProto->contacts->resolveUsername(['username' => 'string', ]); -``` - -Or, if you're using the [PWRTelegram HTTP API](https://pwrtelegram.xyz): - -### As a bot: - -POST/GET to `https://api.pwrtelegram.xyz/botTOKEN/madeline` - -Parameters: - -* method - contacts.resolveUsername -* params - `{"username": "string", }` - - - -### As a user: - -POST/GET to `https://api.pwrtelegram.xyz/userTOKEN/contacts.resolveUsername` - -Parameters: - -username - Json encoded string - - - -Or, if you're into Lua: - -``` -contacts_ResolvedPeer = contacts.resolveUsername({username='string', }) -``` - diff --git a/docs/API_docs/methods/messages_acceptEncryption.md b/docs/API_docs/methods/messages_acceptEncryption.md index 548087b6..243c4c00 100644 --- a/docs/API_docs/methods/messages_acceptEncryption.md +++ b/docs/API_docs/methods/messages_acceptEncryption.md @@ -6,71 +6,8 @@ description: messages.acceptEncryption parameters, return type and example [Back to methods index](index.md) -*You cannot use this method directly, see https://daniil.it/MadelineProto for more info on handling secret chats* +**You cannot use this method directly, see https://daniil.it/MadelineProto for more info on handling secret chats** -### Parameters: - -| Name | Type | Required | -|----------|:-------------:|---------:| -|peer|[InputEncryptedChat](../types/InputEncryptedChat.md) | Yes| -|g\_b|[bytes](../types/bytes.md) | Yes| -|key\_fingerprint|[long](../types/long.md) | Yes| - - -### Return type: [EncryptedChat](../types/EncryptedChat.md) - -### Example: - - -``` -$MadelineProto = new \danog\MadelineProto\API(); -if (isset($token)) { // Login as a bot - $MadelineProto->bot_login($token); -} -if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } - $MadelineProto->complete_phone_login($code); -} - -$EncryptedChat = $MadelineProto->messages->acceptEncryption(['peer' => InputEncryptedChat, 'g_b' => 'bytes', 'key_fingerprint' => long, ]); -``` - -Or, if you're using the [PWRTelegram HTTP API](https://pwrtelegram.xyz): - -### As a bot: - -POST/GET to `https://api.pwrtelegram.xyz/botTOKEN/madeline` - -Parameters: - -* method - messages.acceptEncryption -* params - `{"peer": InputEncryptedChat, "g_b": "bytes", "key_fingerprint": long, }` - - - -### As a user: - -POST/GET to `https://api.pwrtelegram.xyz/userTOKEN/messages.acceptEncryption` - -Parameters: - -peer - Json encoded InputEncryptedChat -g_b - Json encoded bytes -key_fingerprint - Json encoded long - - - -Or, if you're into Lua: - -``` -EncryptedChat = messages.acceptEncryption({peer=InputEncryptedChat, g_b='bytes', key_fingerprint=long, }) -``` - diff --git a/docs/API_docs/methods/messages_discardEncryption.md b/docs/API_docs/methods/messages_discardEncryption.md index 72648e9d..3a9dc58b 100644 --- a/docs/API_docs/methods/messages_discardEncryption.md +++ b/docs/API_docs/methods/messages_discardEncryption.md @@ -6,67 +6,8 @@ description: messages.discardEncryption parameters, return type and example [Back to methods index](index.md) -*You cannot use this method directly, see https://daniil.it/MadelineProto for more info on handling secret chats* +**You cannot use this method directly, see https://daniil.it/MadelineProto for more info on handling secret chats** -### Parameters: - -| Name | Type | Required | -|----------|:-------------:|---------:| -|chat\_id|[int](../types/int.md) | Yes| - - -### Return type: [Bool](../types/Bool.md) - -### Example: - - -``` -$MadelineProto = new \danog\MadelineProto\API(); -if (isset($token)) { // Login as a bot - $MadelineProto->bot_login($token); -} -if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } - $MadelineProto->complete_phone_login($code); -} - -$Bool = $MadelineProto->messages->discardEncryption(['chat_id' => int, ]); -``` - -Or, if you're using the [PWRTelegram HTTP API](https://pwrtelegram.xyz): - -### As a bot: - -POST/GET to `https://api.pwrtelegram.xyz/botTOKEN/madeline` - -Parameters: - -* method - messages.discardEncryption -* params - `{"chat_id": int, }` - - - -### As a user: - -POST/GET to `https://api.pwrtelegram.xyz/userTOKEN/messages.discardEncryption` - -Parameters: - -chat_id - Json encoded int - - - -Or, if you're into Lua: - -``` -Bool = messages.discardEncryption({chat_id=int, }) -``` - diff --git a/docs/API_docs/methods/messages_getFullChat.md b/docs/API_docs/methods/messages_getFullChat.md index 62102b64..ffa9c281 100644 --- a/docs/API_docs/methods/messages_getFullChat.md +++ b/docs/API_docs/methods/messages_getFullChat.md @@ -6,67 +6,8 @@ description: messages.getFullChat parameters, return type and example [Back to methods index](index.md) -*You cannot use this method directly, use the get_pwr_chat, get_info, get_full_info methods instead (see https://daniil.it/MadelineProto for more info)* +**You cannot use this method directly, use the get_pwr_chat, get_info, get_full_info methods instead (see https://daniil.it/MadelineProto for more info)** -### Parameters: - -| Name | Type | Required | -|----------|:-------------:|---------:| -|chat\_id|[InputPeer](../types/InputPeer.md) | Yes| - - -### Return type: [messages\_ChatFull](../types/messages_ChatFull.md) - -### Example: - - -``` -$MadelineProto = new \danog\MadelineProto\API(); -if (isset($token)) { // Login as a bot - $MadelineProto->bot_login($token); -} -if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } - $MadelineProto->complete_phone_login($code); -} - -$messages_ChatFull = $MadelineProto->messages->getFullChat(['chat_id' => InputPeer, ]); -``` - -Or, if you're using the [PWRTelegram HTTP API](https://pwrtelegram.xyz): - -### As a bot: - -POST/GET to `https://api.pwrtelegram.xyz/botTOKEN/madeline` - -Parameters: - -* method - messages.getFullChat -* params - `{"chat_id": InputPeer, }` - - - -### As a user: - -POST/GET to `https://api.pwrtelegram.xyz/userTOKEN/messages.getFullChat` - -Parameters: - -chat_id - Json encoded InputPeer - - - -Or, if you're into Lua: - -``` -messages_ChatFull = messages.getFullChat({chat_id=InputPeer, }) -``` - diff --git a/docs/API_docs/methods/messages_requestEncryption.md b/docs/API_docs/methods/messages_requestEncryption.md index 2fd1f825..c8476667 100644 --- a/docs/API_docs/methods/messages_requestEncryption.md +++ b/docs/API_docs/methods/messages_requestEncryption.md @@ -6,69 +6,8 @@ description: messages.requestEncryption parameters, return type and example [Back to methods index](index.md) -*You cannot use this method directly, see https://daniil.it/MadelineProto for more info on handling secret chats* +**You cannot use this method directly, see https://daniil.it/MadelineProto for more info on handling secret chats** -### Parameters: - -| Name | Type | Required | -|----------|:-------------:|---------:| -|user\_id|[InputUser](../types/InputUser.md) | Yes| -|g\_a|[bytes](../types/bytes.md) | Yes| - - -### Return type: [EncryptedChat](../types/EncryptedChat.md) - -### Example: - - -``` -$MadelineProto = new \danog\MadelineProto\API(); -if (isset($token)) { // Login as a bot - $MadelineProto->bot_login($token); -} -if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } - $MadelineProto->complete_phone_login($code); -} - -$EncryptedChat = $MadelineProto->messages->requestEncryption(['user_id' => InputUser, 'g_a' => 'bytes', ]); -``` - -Or, if you're using the [PWRTelegram HTTP API](https://pwrtelegram.xyz): - -### As a bot: - -POST/GET to `https://api.pwrtelegram.xyz/botTOKEN/madeline` - -Parameters: - -* method - messages.requestEncryption -* params - `{"user_id": InputUser, "g_a": "bytes", }` - - - -### As a user: - -POST/GET to `https://api.pwrtelegram.xyz/userTOKEN/messages.requestEncryption` - -Parameters: - -user_id - Json encoded InputUser -g_a - Json encoded bytes - - - -Or, if you're into Lua: - -``` -EncryptedChat = messages.requestEncryption({user_id=InputUser, g_a='bytes', }) -``` - diff --git a/docs/API_docs/methods/phone_acceptCall.md b/docs/API_docs/methods/phone_acceptCall.md index a3cf68a8..79266f27 100644 --- a/docs/API_docs/methods/phone_acceptCall.md +++ b/docs/API_docs/methods/phone_acceptCall.md @@ -6,71 +6,8 @@ description: phone.acceptCall parameters, return type and example [Back to methods index](index.md) -*You cannot use this method directly, see https://daniil.it/MadelineProto#calls for more info on handling calls* +**You cannot use this method directly, see https://daniil.it/MadelineProto#calls for more info on handling calls** -### Parameters: - -| Name | Type | Required | -|----------|:-------------:|---------:| -|peer|[InputPhoneCall](../types/InputPhoneCall.md) | Yes| -|g\_b|[bytes](../types/bytes.md) | Yes| -|protocol|[PhoneCallProtocol](../types/PhoneCallProtocol.md) | Yes| - - -### Return type: [phone\_PhoneCall](../types/phone_PhoneCall.md) - -### Example: - - -``` -$MadelineProto = new \danog\MadelineProto\API(); -if (isset($token)) { // Login as a bot - $MadelineProto->bot_login($token); -} -if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } - $MadelineProto->complete_phone_login($code); -} - -$phone_PhoneCall = $MadelineProto->phone->acceptCall(['peer' => InputPhoneCall, 'g_b' => 'bytes', 'protocol' => PhoneCallProtocol, ]); -``` - -Or, if you're using the [PWRTelegram HTTP API](https://pwrtelegram.xyz): - -### As a bot: - -POST/GET to `https://api.pwrtelegram.xyz/botTOKEN/madeline` - -Parameters: - -* method - phone.acceptCall -* params - `{"peer": InputPhoneCall, "g_b": "bytes", "protocol": PhoneCallProtocol, }` - - - -### As a user: - -POST/GET to `https://api.pwrtelegram.xyz/userTOKEN/phone.acceptCall` - -Parameters: - -peer - Json encoded InputPhoneCall -g_b - Json encoded bytes -protocol - Json encoded PhoneCallProtocol - - - -Or, if you're into Lua: - -``` -phone_PhoneCall = phone.acceptCall({peer=InputPhoneCall, g_b='bytes', protocol=PhoneCallProtocol, }) -``` - diff --git a/docs/API_docs/methods/phone_confirmCall.md b/docs/API_docs/methods/phone_confirmCall.md index ecec0ffc..69e90751 100644 --- a/docs/API_docs/methods/phone_confirmCall.md +++ b/docs/API_docs/methods/phone_confirmCall.md @@ -6,73 +6,8 @@ description: phone.confirmCall parameters, return type and example [Back to methods index](index.md) -*You cannot use this method directly, see https://daniil.it/MadelineProto#calls for more info on handling calls* +**You cannot use this method directly, see https://daniil.it/MadelineProto#calls for more info on handling calls** -### Parameters: - -| Name | Type | Required | -|----------|:-------------:|---------:| -|peer|[InputPhoneCall](../types/InputPhoneCall.md) | Yes| -|g\_a|[bytes](../types/bytes.md) | Yes| -|key\_fingerprint|[long](../types/long.md) | Yes| -|protocol|[PhoneCallProtocol](../types/PhoneCallProtocol.md) | Yes| - - -### Return type: [phone\_PhoneCall](../types/phone_PhoneCall.md) - -### Example: - - -``` -$MadelineProto = new \danog\MadelineProto\API(); -if (isset($token)) { // Login as a bot - $MadelineProto->bot_login($token); -} -if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } - $MadelineProto->complete_phone_login($code); -} - -$phone_PhoneCall = $MadelineProto->phone->confirmCall(['peer' => InputPhoneCall, 'g_a' => 'bytes', 'key_fingerprint' => long, 'protocol' => PhoneCallProtocol, ]); -``` - -Or, if you're using the [PWRTelegram HTTP API](https://pwrtelegram.xyz): - -### As a bot: - -POST/GET to `https://api.pwrtelegram.xyz/botTOKEN/madeline` - -Parameters: - -* method - phone.confirmCall -* params - `{"peer": InputPhoneCall, "g_a": "bytes", "key_fingerprint": long, "protocol": PhoneCallProtocol, }` - - - -### As a user: - -POST/GET to `https://api.pwrtelegram.xyz/userTOKEN/phone.confirmCall` - -Parameters: - -peer - Json encoded InputPhoneCall -g_a - Json encoded bytes -key_fingerprint - Json encoded long -protocol - Json encoded PhoneCallProtocol - - - -Or, if you're into Lua: - -``` -phone_PhoneCall = phone.confirmCall({peer=InputPhoneCall, g_a='bytes', key_fingerprint=long, protocol=PhoneCallProtocol, }) -``` - diff --git a/docs/API_docs/methods/phone_discardCall.md b/docs/API_docs/methods/phone_discardCall.md index bb6b4cd7..c300e61c 100644 --- a/docs/API_docs/methods/phone_discardCall.md +++ b/docs/API_docs/methods/phone_discardCall.md @@ -6,73 +6,8 @@ description: phone.discardCall parameters, return type and example [Back to methods index](index.md) -*You cannot use this method directly, see https://daniil.it/MadelineProto#calls for more info on handling calls* +**You cannot use this method directly, see https://daniil.it/MadelineProto#calls for more info on handling calls** -### Parameters: - -| Name | Type | Required | -|----------|:-------------:|---------:| -|peer|[InputPhoneCall](../types/InputPhoneCall.md) | Yes| -|duration|[int](../types/int.md) | Yes| -|reason|[PhoneCallDiscardReason](../types/PhoneCallDiscardReason.md) | Yes| -|connection\_id|[long](../types/long.md) | Yes| - - -### Return type: [Updates](../types/Updates.md) - -### Example: - - -``` -$MadelineProto = new \danog\MadelineProto\API(); -if (isset($token)) { // Login as a bot - $MadelineProto->bot_login($token); -} -if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } - $MadelineProto->complete_phone_login($code); -} - -$Updates = $MadelineProto->phone->discardCall(['peer' => InputPhoneCall, 'duration' => int, 'reason' => PhoneCallDiscardReason, 'connection_id' => long, ]); -``` - -Or, if you're using the [PWRTelegram HTTP API](https://pwrtelegram.xyz): - -### As a bot: - -POST/GET to `https://api.pwrtelegram.xyz/botTOKEN/madeline` - -Parameters: - -* method - phone.discardCall -* params - `{"peer": InputPhoneCall, "duration": int, "reason": PhoneCallDiscardReason, "connection_id": long, }` - - - -### As a user: - -POST/GET to `https://api.pwrtelegram.xyz/userTOKEN/phone.discardCall` - -Parameters: - -peer - Json encoded InputPhoneCall -duration - Json encoded int -reason - Json encoded PhoneCallDiscardReason -connection_id - Json encoded long - - - -Or, if you're into Lua: - -``` -Updates = phone.discardCall({peer=InputPhoneCall, duration=int, reason=PhoneCallDiscardReason, connection_id=long, }) -``` - diff --git a/docs/API_docs/methods/phone_requestCall.md b/docs/API_docs/methods/phone_requestCall.md index 7364c886..c8ae48a9 100644 --- a/docs/API_docs/methods/phone_requestCall.md +++ b/docs/API_docs/methods/phone_requestCall.md @@ -6,71 +6,8 @@ description: phone.requestCall parameters, return type and example [Back to methods index](index.md) -*You cannot use this method directly, see https://daniil.it/MadelineProto#calls for more info on handling calls* +**You cannot use this method directly, see https://daniil.it/MadelineProto#calls for more info on handling calls** -### Parameters: - -| Name | Type | Required | -|----------|:-------------:|---------:| -|user\_id|[InputUser](../types/InputUser.md) | Yes| -|g\_a\_hash|[bytes](../types/bytes.md) | Yes| -|protocol|[PhoneCallProtocol](../types/PhoneCallProtocol.md) | Yes| - - -### Return type: [phone\_PhoneCall](../types/phone_PhoneCall.md) - -### Example: - - -``` -$MadelineProto = new \danog\MadelineProto\API(); -if (isset($token)) { // Login as a bot - $MadelineProto->bot_login($token); -} -if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } - $MadelineProto->complete_phone_login($code); -} - -$phone_PhoneCall = $MadelineProto->phone->requestCall(['user_id' => InputUser, 'g_a_hash' => 'bytes', 'protocol' => PhoneCallProtocol, ]); -``` - -Or, if you're using the [PWRTelegram HTTP API](https://pwrtelegram.xyz): - -### As a bot: - -POST/GET to `https://api.pwrtelegram.xyz/botTOKEN/madeline` - -Parameters: - -* method - phone.requestCall -* params - `{"user_id": InputUser, "g_a_hash": "bytes", "protocol": PhoneCallProtocol, }` - - - -### As a user: - -POST/GET to `https://api.pwrtelegram.xyz/userTOKEN/phone.requestCall` - -Parameters: - -user_id - Json encoded InputUser -g_a_hash - Json encoded bytes -protocol - Json encoded PhoneCallProtocol - - - -Or, if you're into Lua: - -``` -phone_PhoneCall = phone.requestCall({user_id=InputUser, g_a_hash='bytes', protocol=PhoneCallProtocol, }) -``` - diff --git a/docs/API_docs/methods/updates_getChannelDifference.md b/docs/API_docs/methods/updates_getChannelDifference.md index d4eff325..2e69d1cd 100644 --- a/docs/API_docs/methods/updates_getChannelDifference.md +++ b/docs/API_docs/methods/updates_getChannelDifference.md @@ -6,75 +6,8 @@ description: updates.getChannelDifference parameters, return type and example [Back to methods index](index.md) -*You cannot use this method directly, see https://daniil.it/MadelineProto for more info on handling updates* +**You cannot use this method directly, see https://daniil.it/MadelineProto for more info on handling updates** -### Parameters: - -| Name | Type | Required | -|----------|:-------------:|---------:| -|force|[Bool](../types/Bool.md) | Optional| -|channel|[InputChannel](../types/InputChannel.md) | Yes| -|filter|[ChannelMessagesFilter](../types/ChannelMessagesFilter.md) | Yes| -|pts|[int](../types/int.md) | Yes| -|limit|[int](../types/int.md) | Yes| - - -### Return type: [updates\_ChannelDifference](../types/updates_ChannelDifference.md) - -### Example: - - -``` -$MadelineProto = new \danog\MadelineProto\API(); -if (isset($token)) { // Login as a bot - $MadelineProto->bot_login($token); -} -if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } - $MadelineProto->complete_phone_login($code); -} - -$updates_ChannelDifference = $MadelineProto->updates->getChannelDifference(['force' => Bool, 'channel' => InputChannel, 'filter' => ChannelMessagesFilter, 'pts' => int, 'limit' => int, ]); -``` - -Or, if you're using the [PWRTelegram HTTP API](https://pwrtelegram.xyz): - -### As a bot: - -POST/GET to `https://api.pwrtelegram.xyz/botTOKEN/madeline` - -Parameters: - -* method - updates.getChannelDifference -* params - `{"force": Bool, "channel": InputChannel, "filter": ChannelMessagesFilter, "pts": int, "limit": int, }` - - - -### As a user: - -POST/GET to `https://api.pwrtelegram.xyz/userTOKEN/updates.getChannelDifference` - -Parameters: - -force - Json encoded Bool -channel - Json encoded InputChannel -filter - Json encoded ChannelMessagesFilter -pts - Json encoded int -limit - Json encoded int - - - -Or, if you're into Lua: - -``` -updates_ChannelDifference = updates.getChannelDifference({force=Bool, channel=InputChannel, filter=ChannelMessagesFilter, pts=int, limit=int, }) -``` - diff --git a/docs/API_docs/methods/updates_getDifference.md b/docs/API_docs/methods/updates_getDifference.md index b50de4bb..9bcee79a 100644 --- a/docs/API_docs/methods/updates_getDifference.md +++ b/docs/API_docs/methods/updates_getDifference.md @@ -6,73 +6,8 @@ description: updates.getDifference parameters, return type and example [Back to methods index](index.md) -*You cannot use this method directly, see https://daniil.it/MadelineProto for more info on handling updates* +**You cannot use this method directly, see https://daniil.it/MadelineProto for more info on handling updates** -### Parameters: - -| Name | Type | Required | -|----------|:-------------:|---------:| -|pts|[int](../types/int.md) | Yes| -|pts\_total\_limit|[int](../types/int.md) | Optional| -|date|[int](../types/int.md) | Yes| -|qts|[int](../types/int.md) | Yes| - - -### Return type: [updates\_Difference](../types/updates_Difference.md) - -### Example: - - -``` -$MadelineProto = new \danog\MadelineProto\API(); -if (isset($token)) { // Login as a bot - $MadelineProto->bot_login($token); -} -if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } - $MadelineProto->complete_phone_login($code); -} - -$updates_Difference = $MadelineProto->updates->getDifference(['pts' => int, 'pts_total_limit' => int, 'date' => int, 'qts' => int, ]); -``` - -Or, if you're using the [PWRTelegram HTTP API](https://pwrtelegram.xyz): - -### As a bot: - -POST/GET to `https://api.pwrtelegram.xyz/botTOKEN/madeline` - -Parameters: - -* method - updates.getDifference -* params - `{"pts": int, "pts_total_limit": int, "date": int, "qts": int, }` - - - -### As a user: - -POST/GET to `https://api.pwrtelegram.xyz/userTOKEN/updates.getDifference` - -Parameters: - -pts - Json encoded int -pts_total_limit - Json encoded int -date - Json encoded int -qts - Json encoded int - - - -Or, if you're into Lua: - -``` -updates_Difference = updates.getDifference({pts=int, pts_total_limit=int, date=int, qts=int, }) -``` - diff --git a/docs/API_docs/methods/updates_getState.md b/docs/API_docs/methods/updates_getState.md index 51f6ae80..fd5955ba 100644 --- a/docs/API_docs/methods/updates_getState.md +++ b/docs/API_docs/methods/updates_getState.md @@ -6,61 +6,8 @@ description: updates.getState parameters, return type and example [Back to methods index](index.md) -*You cannot use this method directly, see https://daniil.it/MadelineProto for more info on handling updates* +**You cannot use this method directly, see https://daniil.it/MadelineProto for more info on handling updates** - - -### Return type: [updates\_State](../types/updates_State.md) - -### Example: - - -``` -$MadelineProto = new \danog\MadelineProto\API(); -if (isset($token)) { // Login as a bot - $MadelineProto->bot_login($token); -} -if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } - $MadelineProto->complete_phone_login($code); -} - -$updates_State = $MadelineProto->updates->getState(); -``` - -Or, if you're using the [PWRTelegram HTTP API](https://pwrtelegram.xyz): - -### As a bot: - -POST/GET to `https://api.pwrtelegram.xyz/botTOKEN/madeline` - -Parameters: - -* method - updates.getState -* params - `{}` - - - -### As a user: - -POST/GET to `https://api.pwrtelegram.xyz/userTOKEN/updates.getState` - -Parameters: - - - - -Or, if you're into Lua: - -``` -updates_State = updates.getState({}) -``` - diff --git a/docs/API_docs/methods/upload_getCdnFile.md b/docs/API_docs/methods/upload_getCdnFile.md index b0a0514b..3a0cd50e 100644 --- a/docs/API_docs/methods/upload_getCdnFile.md +++ b/docs/API_docs/methods/upload_getCdnFile.md @@ -6,71 +6,8 @@ description: upload.getCdnFile parameters, return type and example [Back to methods index](index.md) -*You cannot use this method directly, use the upload, download_to_stream, download_to_file, download_to_dir methods instead; see https://daniil.it/MadelineProto for more info* +**You cannot use this method directly, use the upload, download_to_stream, download_to_file, download_to_dir methods instead; see https://daniil.it/MadelineProto for more info** -### Parameters: - -| Name | Type | Required | -|----------|:-------------:|---------:| -|file\_token|[bytes](../types/bytes.md) | Yes| -|offset|[int](../types/int.md) | Yes| -|limit|[int](../types/int.md) | Yes| - - -### Return type: [upload\_CdnFile](../types/upload_CdnFile.md) - -### Example: - - -``` -$MadelineProto = new \danog\MadelineProto\API(); -if (isset($token)) { // Login as a bot - $MadelineProto->bot_login($token); -} -if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } - $MadelineProto->complete_phone_login($code); -} - -$upload_CdnFile = $MadelineProto->upload->getCdnFile(['file_token' => 'bytes', 'offset' => int, 'limit' => int, ]); -``` - -Or, if you're using the [PWRTelegram HTTP API](https://pwrtelegram.xyz): - -### As a bot: - -POST/GET to `https://api.pwrtelegram.xyz/botTOKEN/madeline` - -Parameters: - -* method - upload.getCdnFile -* params - `{"file_token": "bytes", "offset": int, "limit": int, }` - - - -### As a user: - -POST/GET to `https://api.pwrtelegram.xyz/userTOKEN/upload.getCdnFile` - -Parameters: - -file_token - Json encoded bytes -offset - Json encoded int -limit - Json encoded int - - - -Or, if you're into Lua: - -``` -upload_CdnFile = upload.getCdnFile({file_token='bytes', offset=int, limit=int, }) -``` - diff --git a/docs/API_docs/methods/upload_getCdnFileHashes.md b/docs/API_docs/methods/upload_getCdnFileHashes.md index 4795630f..2ab7792b 100644 --- a/docs/API_docs/methods/upload_getCdnFileHashes.md +++ b/docs/API_docs/methods/upload_getCdnFileHashes.md @@ -6,69 +6,8 @@ description: upload.getCdnFileHashes parameters, return type and example [Back to methods index](index.md) -*You cannot use this method directly, use the upload, download_to_stream, download_to_file, download_to_dir methods instead; see https://daniil.it/MadelineProto for more info* +**You cannot use this method directly, use the upload, download_to_stream, download_to_file, download_to_dir methods instead; see https://daniil.it/MadelineProto for more info** -### Parameters: - -| Name | Type | Required | -|----------|:-------------:|---------:| -|file\_token|[bytes](../types/bytes.md) | Yes| -|offset|[int](../types/int.md) | Yes| - - -### Return type: [Vector\_of\_CdnFileHash](../types/CdnFileHash.md) - -### Example: - - -``` -$MadelineProto = new \danog\MadelineProto\API(); -if (isset($token)) { // Login as a bot - $MadelineProto->bot_login($token); -} -if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } - $MadelineProto->complete_phone_login($code); -} - -$Vector_of_CdnFileHash = $MadelineProto->upload->getCdnFileHashes(['file_token' => 'bytes', 'offset' => int, ]); -``` - -Or, if you're using the [PWRTelegram HTTP API](https://pwrtelegram.xyz): - -### As a bot: - -POST/GET to `https://api.pwrtelegram.xyz/botTOKEN/madeline` - -Parameters: - -* method - upload.getCdnFileHashes -* params - `{"file_token": "bytes", "offset": int, }` - - - -### As a user: - -POST/GET to `https://api.pwrtelegram.xyz/userTOKEN/upload.getCdnFileHashes` - -Parameters: - -file_token - Json encoded bytes -offset - Json encoded int - - - -Or, if you're into Lua: - -``` -Vector_of_CdnFileHash = upload.getCdnFileHashes({file_token='bytes', offset=int, }) -``` - diff --git a/docs/API_docs/methods/upload_getFile.md b/docs/API_docs/methods/upload_getFile.md index a1003003..add7d54e 100644 --- a/docs/API_docs/methods/upload_getFile.md +++ b/docs/API_docs/methods/upload_getFile.md @@ -6,71 +6,8 @@ description: upload.getFile parameters, return type and example [Back to methods index](index.md) -*You cannot use this method directly, use the upload, download_to_stream, download_to_file, download_to_dir methods instead; see https://daniil.it/MadelineProto for more info* +**You cannot use this method directly, use the upload, download_to_stream, download_to_file, download_to_dir methods instead; see https://daniil.it/MadelineProto for more info** -### Parameters: - -| Name | Type | Required | -|----------|:-------------:|---------:| -|location|[InputFileLocation](../types/InputFileLocation.md) | Yes| -|offset|[int](../types/int.md) | Yes| -|limit|[int](../types/int.md) | Yes| - - -### Return type: [upload\_File](../types/upload_File.md) - -### Example: - - -``` -$MadelineProto = new \danog\MadelineProto\API(); -if (isset($token)) { // Login as a bot - $MadelineProto->bot_login($token); -} -if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } - $MadelineProto->complete_phone_login($code); -} - -$upload_File = $MadelineProto->upload->getFile(['location' => InputFileLocation, 'offset' => int, 'limit' => int, ]); -``` - -Or, if you're using the [PWRTelegram HTTP API](https://pwrtelegram.xyz): - -### As a bot: - -POST/GET to `https://api.pwrtelegram.xyz/botTOKEN/madeline` - -Parameters: - -* method - upload.getFile -* params - `{"location": InputFileLocation, "offset": int, "limit": int, }` - - - -### As a user: - -POST/GET to `https://api.pwrtelegram.xyz/userTOKEN/upload.getFile` - -Parameters: - -location - Json encoded InputFileLocation -offset - Json encoded int -limit - Json encoded int - - - -Or, if you're into Lua: - -``` -upload_File = upload.getFile({location=InputFileLocation, offset=int, limit=int, }) -``` - diff --git a/docs/API_docs/methods/upload_reuploadCdnFile.md b/docs/API_docs/methods/upload_reuploadCdnFile.md index 1a75cef9..4c00bbd0 100644 --- a/docs/API_docs/methods/upload_reuploadCdnFile.md +++ b/docs/API_docs/methods/upload_reuploadCdnFile.md @@ -6,69 +6,8 @@ description: upload.reuploadCdnFile parameters, return type and example [Back to methods index](index.md) -*You cannot use this method directly, use the upload, download_to_stream, download_to_file, download_to_dir methods instead; see https://daniil.it/MadelineProto for more info* +**You cannot use this method directly, use the upload, download_to_stream, download_to_file, download_to_dir methods instead; see https://daniil.it/MadelineProto for more info** -### Parameters: - -| Name | Type | Required | -|----------|:-------------:|---------:| -|file\_token|[bytes](../types/bytes.md) | Yes| -|request\_token|[bytes](../types/bytes.md) | Yes| - - -### Return type: [Vector\_of\_CdnFileHash](../types/CdnFileHash.md) - -### Example: - - -``` -$MadelineProto = new \danog\MadelineProto\API(); -if (isset($token)) { // Login as a bot - $MadelineProto->bot_login($token); -} -if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } - $MadelineProto->complete_phone_login($code); -} - -$Vector_of_CdnFileHash = $MadelineProto->upload->reuploadCdnFile(['file_token' => 'bytes', 'request_token' => 'bytes', ]); -``` - -Or, if you're using the [PWRTelegram HTTP API](https://pwrtelegram.xyz): - -### As a bot: - -POST/GET to `https://api.pwrtelegram.xyz/botTOKEN/madeline` - -Parameters: - -* method - upload.reuploadCdnFile -* params - `{"file_token": "bytes", "request_token": "bytes", }` - - - -### As a user: - -POST/GET to `https://api.pwrtelegram.xyz/userTOKEN/upload.reuploadCdnFile` - -Parameters: - -file_token - Json encoded bytes -request_token - Json encoded bytes - - - -Or, if you're into Lua: - -``` -Vector_of_CdnFileHash = upload.reuploadCdnFile({file_token='bytes', request_token='bytes', }) -``` - diff --git a/docs/API_docs/methods/upload_saveBigFilePart.md b/docs/API_docs/methods/upload_saveBigFilePart.md index e5c96d89..b1c3ea28 100644 --- a/docs/API_docs/methods/upload_saveBigFilePart.md +++ b/docs/API_docs/methods/upload_saveBigFilePart.md @@ -6,73 +6,8 @@ description: upload.saveBigFilePart parameters, return type and example [Back to methods index](index.md) -*You cannot use this method directly, use the upload, download_to_stream, download_to_file, download_to_dir methods instead; see https://daniil.it/MadelineProto for more info* +**You cannot use this method directly, use the upload, download_to_stream, download_to_file, download_to_dir methods instead; see https://daniil.it/MadelineProto for more info** -### Parameters: - -| Name | Type | Required | -|----------|:-------------:|---------:| -|file\_id|[long](../types/long.md) | Yes| -|file\_part|[int](../types/int.md) | Yes| -|file\_total\_parts|[int](../types/int.md) | Yes| -|bytes|[bytes](../types/bytes.md) | Yes| - - -### Return type: [Bool](../types/Bool.md) - -### Example: - - -``` -$MadelineProto = new \danog\MadelineProto\API(); -if (isset($token)) { // Login as a bot - $MadelineProto->bot_login($token); -} -if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } - $MadelineProto->complete_phone_login($code); -} - -$Bool = $MadelineProto->upload->saveBigFilePart(['file_id' => long, 'file_part' => int, 'file_total_parts' => int, 'bytes' => 'bytes', ]); -``` - -Or, if you're using the [PWRTelegram HTTP API](https://pwrtelegram.xyz): - -### As a bot: - -POST/GET to `https://api.pwrtelegram.xyz/botTOKEN/madeline` - -Parameters: - -* method - upload.saveBigFilePart -* params - `{"file_id": long, "file_part": int, "file_total_parts": int, "bytes": "bytes", }` - - - -### As a user: - -POST/GET to `https://api.pwrtelegram.xyz/userTOKEN/upload.saveBigFilePart` - -Parameters: - -file_id - Json encoded long -file_part - Json encoded int -file_total_parts - Json encoded int -bytes - Json encoded bytes - - - -Or, if you're into Lua: - -``` -Bool = upload.saveBigFilePart({file_id=long, file_part=int, file_total_parts=int, bytes='bytes', }) -``` - diff --git a/docs/API_docs/methods/upload_saveFilePart.md b/docs/API_docs/methods/upload_saveFilePart.md index 1c16e4b2..c482f321 100644 --- a/docs/API_docs/methods/upload_saveFilePart.md +++ b/docs/API_docs/methods/upload_saveFilePart.md @@ -6,71 +6,8 @@ description: upload.saveFilePart parameters, return type and example [Back to methods index](index.md) -*You cannot use this method directly, use the upload, download_to_stream, download_to_file, download_to_dir methods instead; see https://daniil.it/MadelineProto for more info* +**You cannot use this method directly, use the upload, download_to_stream, download_to_file, download_to_dir methods instead; see https://daniil.it/MadelineProto for more info** -### Parameters: - -| Name | Type | Required | -|----------|:-------------:|---------:| -|file\_id|[long](../types/long.md) | Yes| -|file\_part|[int](../types/int.md) | Yes| -|bytes|[bytes](../types/bytes.md) | Yes| - - -### Return type: [Bool](../types/Bool.md) - -### Example: - - -``` -$MadelineProto = new \danog\MadelineProto\API(); -if (isset($token)) { // Login as a bot - $MadelineProto->bot_login($token); -} -if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } - $MadelineProto->complete_phone_login($code); -} - -$Bool = $MadelineProto->upload->saveFilePart(['file_id' => long, 'file_part' => int, 'bytes' => 'bytes', ]); -``` - -Or, if you're using the [PWRTelegram HTTP API](https://pwrtelegram.xyz): - -### As a bot: - -POST/GET to `https://api.pwrtelegram.xyz/botTOKEN/madeline` - -Parameters: - -* method - upload.saveFilePart -* params - `{"file_id": long, "file_part": int, "bytes": "bytes", }` - - - -### As a user: - -POST/GET to `https://api.pwrtelegram.xyz/userTOKEN/upload.saveFilePart` - -Parameters: - -file_id - Json encoded long -file_part - Json encoded int -bytes - Json encoded bytes - - - -Or, if you're into Lua: - -``` -Bool = upload.saveFilePart({file_id=long, file_part=int, bytes='bytes', }) -``` - diff --git a/docs/API_docs/methods/users_getFullUser.md b/docs/API_docs/methods/users_getFullUser.md index 645ab12e..4ec831ec 100644 --- a/docs/API_docs/methods/users_getFullUser.md +++ b/docs/API_docs/methods/users_getFullUser.md @@ -6,67 +6,8 @@ description: users.getFullUser parameters, return type and example [Back to methods index](index.md) -*You cannot use this method directly, use the get_pwr_chat, get_info, get_full_info methods instead (see https://daniil.it/MadelineProto for more info)* +**You cannot use this method directly, use the get_pwr_chat, get_info, get_full_info methods instead (see https://daniil.it/MadelineProto for more info)** -### Parameters: - -| Name | Type | Required | -|----------|:-------------:|---------:| -|id|[InputUser](../types/InputUser.md) | Yes| - - -### Return type: [UserFull](../types/UserFull.md) - -### Example: - - -``` -$MadelineProto = new \danog\MadelineProto\API(); -if (isset($token)) { // Login as a bot - $MadelineProto->bot_login($token); -} -if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } - $MadelineProto->complete_phone_login($code); -} - -$UserFull = $MadelineProto->users->getFullUser(['id' => InputUser, ]); -``` - -Or, if you're using the [PWRTelegram HTTP API](https://pwrtelegram.xyz): - -### As a bot: - -POST/GET to `https://api.pwrtelegram.xyz/botTOKEN/madeline` - -Parameters: - -* method - users.getFullUser -* params - `{"id": InputUser, }` - - - -### As a user: - -POST/GET to `https://api.pwrtelegram.xyz/userTOKEN/users.getFullUser` - -Parameters: - -id - Json encoded InputUser - - - -Or, if you're into Lua: - -``` -UserFull = users.getFullUser({id=InputUser, }) -``` - diff --git a/docs/API_docs/types/DocumentAttribute.md b/docs/API_docs/types/DocumentAttribute.md index 98e1741b..57778cc6 100644 --- a/docs/API_docs/types/DocumentAttribute.md +++ b/docs/API_docs/types/DocumentAttribute.md @@ -9,37 +9,37 @@ description: constructors and methods of type DocumentAttribute ### Possible values (constructors): -[documentAttributeImageSize](../constructors/documentAttributeImageSize.md) - -[documentAttributeAnimated](../constructors/documentAttributeAnimated.md) - -[documentAttributeSticker](../constructors/documentAttributeSticker.md) - -[documentAttributeVideo](../constructors/documentAttributeVideo.md) - -[documentAttributeAudio](../constructors/documentAttributeAudio.md) - -[documentAttributeFilename](../constructors/documentAttributeFilename.md) - -[documentAttributeHasStickers](../constructors/documentAttributeHasStickers.md) - [documentAttributeImageSize\_23](../constructors/documentAttributeImageSize_23.md) [documentAttributeAnimated\_23](../constructors/documentAttributeAnimated_23.md) +[documentAttributeSticker](../constructors/documentAttributeSticker.md) + +[documentAttributeVideo\_66](../constructors/documentAttributeVideo_66.md) + +[documentAttributeAudio](../constructors/documentAttributeAudio.md) + +[documentAttributeFilename\_23](../constructors/documentAttributeFilename_23.md) + +[documentAttributeHasStickers](../constructors/documentAttributeHasStickers.md) + +[documentAttributeImageSize](../constructors/documentAttributeImageSize.md) + +[documentAttributeAnimated](../constructors/documentAttributeAnimated.md) + [documentAttributeSticker\_23](../constructors/documentAttributeSticker_23.md) [documentAttributeVideo\_23](../constructors/documentAttributeVideo_23.md) [documentAttributeAudio\_23](../constructors/documentAttributeAudio_23.md) -[documentAttributeFilename\_23](../constructors/documentAttributeFilename_23.md) +[documentAttributeFilename](../constructors/documentAttributeFilename.md) [documentAttributeAudio\_46](../constructors/documentAttributeAudio_46.md) [documentAttributeSticker\_55](../constructors/documentAttributeSticker_55.md) -[documentAttributeVideo\_66](../constructors/documentAttributeVideo_66.md) +[documentAttributeVideo](../constructors/documentAttributeVideo.md) diff --git a/docs/API_docs/types/FileLocation.md b/docs/API_docs/types/FileLocation.md index 9aaed2eb..61500d17 100644 --- a/docs/API_docs/types/FileLocation.md +++ b/docs/API_docs/types/FileLocation.md @@ -9,14 +9,14 @@ description: constructors and methods of type FileLocation ### Possible values (constructors): -[fileLocationUnavailable](../constructors/fileLocationUnavailable.md) - -[fileLocation](../constructors/fileLocation.md) - [fileLocationUnavailable\_23](../constructors/fileLocationUnavailable_23.md) [fileLocation\_23](../constructors/fileLocation_23.md) +[fileLocationUnavailable](../constructors/fileLocationUnavailable.md) + +[fileLocation](../constructors/fileLocation.md) + ### Methods that return an object of this type (methods): diff --git a/docs/API_docs/types/PhoneCall.md b/docs/API_docs/types/PhoneCall.md index cb9cc822..668c475e 100644 --- a/docs/API_docs/types/PhoneCall.md +++ b/docs/API_docs/types/PhoneCall.md @@ -146,7 +146,6 @@ The audio configuration is an array structured in the following way: * `playOnHold(array $files)` - Array of audio files encoded in PCM, with the audio input configuration to loop on hold (when the files given with play/then have finished playing). If not called, no data will be played, returns `$this` * `isPlaying()` - Returns true if MadelineProto is still playing the files given with play/then, false if the hold files (or nothing) is being played * `setMicMute(bool $mute)` - Stops/resumes playing files/hold files, returns `$this` -* `setBitrate(int $bitrate)` - Sets maximum outgoing bitrate, and increases the bitrate of the call to the maximum outgoing bitrate (high values increase the quality of the song), returns `$this` * `setOutputFile(string $outputfile)` - Writes incoming audio data to file encoded in PCM, with the audio output configuration, returns `$this` * `unsetOutputFile()` - Stops writing audio data to previously set file, returns `$this` diff --git a/docs/API_docs/types/PhotoSize.md b/docs/API_docs/types/PhotoSize.md index 39424411..47e53d88 100644 --- a/docs/API_docs/types/PhotoSize.md +++ b/docs/API_docs/types/PhotoSize.md @@ -9,18 +9,18 @@ description: constructors and methods of type PhotoSize ### Possible values (constructors): -[photoSizeEmpty](../constructors/photoSizeEmpty.md) - -[photoSize](../constructors/photoSize.md) - -[photoCachedSize](../constructors/photoCachedSize.md) - [photoSizeEmpty\_23](../constructors/photoSizeEmpty_23.md) [photoSize\_23](../constructors/photoSize_23.md) [photoCachedSize\_23](../constructors/photoCachedSize_23.md) +[photoSizeEmpty](../constructors/photoSizeEmpty.md) + +[photoSize](../constructors/photoSize.md) + +[photoCachedSize](../constructors/photoCachedSize.md) + ### Methods that return an object of this type (methods): diff --git a/docs/API_docs/types/SendMessageAction.md b/docs/API_docs/types/SendMessageAction.md index 86b0b3dd..a569167d 100644 --- a/docs/API_docs/types/SendMessageAction.md +++ b/docs/API_docs/types/SendMessageAction.md @@ -11,15 +11,15 @@ Notifies about activity in chat ### Possible values (constructors): -[sendMessageTypingAction](../constructors/sendMessageTypingAction.md) +[sendMessageTypingAction\_17](../constructors/sendMessageTypingAction_17.md) -[sendMessageCancelAction](../constructors/sendMessageCancelAction.md) +[sendMessageCancelAction\_17](../constructors/sendMessageCancelAction_17.md) -[sendMessageRecordVideoAction](../constructors/sendMessageRecordVideoAction.md) +[sendMessageRecordVideoAction\_17](../constructors/sendMessageRecordVideoAction_17.md) [sendMessageUploadVideoAction](../constructors/sendMessageUploadVideoAction.md) -[sendMessageRecordAudioAction](../constructors/sendMessageRecordAudioAction.md) +[sendMessageRecordAudioAction\_17](../constructors/sendMessageRecordAudioAction_17.md) [sendMessageUploadAudioAction](../constructors/sendMessageUploadAudioAction.md) @@ -27,9 +27,9 @@ Notifies about activity in chat [sendMessageUploadDocumentAction](../constructors/sendMessageUploadDocumentAction.md) -[sendMessageGeoLocationAction](../constructors/sendMessageGeoLocationAction.md) +[sendMessageGeoLocationAction\_17](../constructors/sendMessageGeoLocationAction_17.md) -[sendMessageChooseContactAction](../constructors/sendMessageChooseContactAction.md) +[sendMessageChooseContactAction\_17](../constructors/sendMessageChooseContactAction_17.md) [sendMessageGamePlayAction](../constructors/sendMessageGamePlayAction.md) @@ -37,15 +37,15 @@ Notifies about activity in chat [sendMessageUploadRoundAction](../constructors/sendMessageUploadRoundAction.md) -[sendMessageTypingAction\_17](../constructors/sendMessageTypingAction_17.md) +[sendMessageTypingAction](../constructors/sendMessageTypingAction.md) -[sendMessageCancelAction\_17](../constructors/sendMessageCancelAction_17.md) +[sendMessageCancelAction](../constructors/sendMessageCancelAction.md) -[sendMessageRecordVideoAction\_17](../constructors/sendMessageRecordVideoAction_17.md) +[sendMessageRecordVideoAction](../constructors/sendMessageRecordVideoAction.md) [sendMessageUploadVideoAction\_17](../constructors/sendMessageUploadVideoAction_17.md) -[sendMessageRecordAudioAction\_17](../constructors/sendMessageRecordAudioAction_17.md) +[sendMessageRecordAudioAction](../constructors/sendMessageRecordAudioAction.md) [sendMessageUploadAudioAction\_17](../constructors/sendMessageUploadAudioAction_17.md) @@ -53,9 +53,9 @@ Notifies about activity in chat [sendMessageUploadDocumentAction\_17](../constructors/sendMessageUploadDocumentAction_17.md) -[sendMessageGeoLocationAction\_17](../constructors/sendMessageGeoLocationAction_17.md) +[sendMessageGeoLocationAction](../constructors/sendMessageGeoLocationAction.md) -[sendMessageChooseContactAction\_17](../constructors/sendMessageChooseContactAction_17.md) +[sendMessageChooseContactAction](../constructors/sendMessageChooseContactAction.md) diff --git a/docs/MTProto_docs/constructors/index.md b/docs/MTProto_docs/constructors/index.md index d82f667d..946de06b 100644 --- a/docs/MTProto_docs/constructors/index.md +++ b/docs/MTProto_docs/constructors/index.md @@ -4,9 +4,6 @@ description: List of constructors --- # Constructors [Back to API documentation index](..) - - - ***

[$MTmessage](../constructors/MTmessage.md) = \['msg_id' => [long](../types/long.md), 'seqno' => [int](../types/int.md), 'bytes' => [int](../types/int.md), 'body' => [Object](../types/Object.md), \]; diff --git a/docs/TD_docs/constructors/index.md b/docs/TD_docs/constructors/index.md index 36fdaf19..7c3dabae 100644 --- a/docs/TD_docs/constructors/index.md +++ b/docs/TD_docs/constructors/index.md @@ -4,14 +4,11 @@ description: List of constructors --- # Constructors [Back to API documentation index](..) - - - ***

[$accountTtl](../constructors/accountTtl.md) = \['days' => [int](../types/int.md), \]; *** -

[$animation](../constructors/animation.md) = \['width' => [int](../types/int.md), 'height' => [int](../types/int.md), 'file_name' => [string](../types/string.md), 'mime_type' => [string](../types/string.md), 'thumb' => [photoSize](../types/photoSize.md), 'animation' => [file](../types/file.md), \]; +

[$animation](../constructors/animation.md) = \['width' => [int](../types/int.md), 'height' => [int](../types/int.md), 'file_name' => [string](../types/string.md), 'mime_type' => [string](../types/string.md), 'thumb' => [photoSize](../constructors/photoSize.md), 'animation' => [file](../constructors/file.md), \]; ***

[$animations](../constructors/animations.md) = \['animations' => \[[animation](../constructors/animation.md)\], \]; @@ -20,7 +17,7 @@ description: List of constructors

[$apnsDeviceToken](../constructors/apnsDeviceToken.md) = \['token' => [string](../types/string.md), \]; *** -

[$audio](../constructors/audio.md) = \['duration' => [int](../types/int.md), 'title' => [string](../types/string.md), 'performer' => [string](../types/string.md), 'file_name' => [string](../types/string.md), 'mime_type' => [string](../types/string.md), 'album_cover_thumb' => [photoSize](../types/photoSize.md), 'audio' => [file](../types/file.md), \]; +

[$audio](../constructors/audio.md) = \['duration' => [int](../types/int.md), 'title' => [string](../types/string.md), 'performer' => [string](../types/string.md), 'file_name' => [string](../types/string.md), 'mime_type' => [string](../types/string.md), 'album_cover_thumb' => [photoSize](../constructors/photoSize.md), 'audio' => [file](../constructors/file.md), \]; ***

[$authCodeTypeCall](../constructors/authCodeTypeCall.md) = \['length' => [int](../types/int.md), \]; @@ -71,10 +68,10 @@ description: List of constructors

[$channel](../constructors/channel.md) = \['id' => [int](../types/int.md), 'username' => [string](../types/string.md), 'date' => [int](../types/int.md), 'status' => [ChatMemberStatus](../types/ChatMemberStatus.md), 'anyone_can_invite' => [Bool](../types/Bool.md), 'sign_messages' => [Bool](../types/Bool.md), 'is_supergroup' => [Bool](../types/Bool.md), 'is_verified' => [Bool](../types/Bool.md), 'restriction_reason' => [string](../types/string.md), \]; *** -

[$channelChatInfo](../constructors/channelChatInfo.md) = \['channel' => [channel](../types/channel.md), \]; +

[$channelChatInfo](../constructors/channelChatInfo.md) = \['channel' => [channel](../constructors/channel.md), \]; *** -

[$channelFull](../constructors/channelFull.md) = \['channel' => [channel](../types/channel.md), 'about' => [string](../types/string.md), 'member_count' => [int](../types/int.md), 'administrator_count' => [int](../types/int.md), 'kicked_count' => [int](../types/int.md), 'can_get_members' => [Bool](../types/Bool.md), 'can_set_username' => [Bool](../types/Bool.md), 'invite_link' => [string](../types/string.md), 'pinned_message_id' => [long](../types/long.md), 'migrated_from_group_id' => [int](../types/int.md), 'migrated_from_max_message_id' => [long](../types/long.md), \]; +

[$channelFull](../constructors/channelFull.md) = \['channel' => [channel](../constructors/channel.md), 'about' => [string](../types/string.md), 'member_count' => [int](../types/int.md), 'administrator_count' => [int](../types/int.md), 'kicked_count' => [int](../types/int.md), 'can_get_members' => [Bool](../types/Bool.md), 'can_set_username' => [Bool](../types/Bool.md), 'invite_link' => [string](../types/string.md), 'pinned_message_id' => [long](../types/long.md), 'migrated_from_group_id' => [int](../types/int.md), 'migrated_from_max_message_id' => [long](../types/long.md), \]; ***

[$channelMembersAdministrators](../constructors/channelMembersAdministrators.md) = \[\]; @@ -89,19 +86,19 @@ description: List of constructors

[$channelMembersRecent](../constructors/channelMembersRecent.md) = \[\]; *** -

[$channels](../constructors/channels.md) = \['channel_ids' => \[[int](../constructors/int.md)\], \]; +

[$channels](../constructors/channels.md) = \['channel_ids' => \[[int](../types/int.md)\], \]; *** -

[$chat](../constructors/chat.md) = \['id' => [long](../types/long.md), 'title' => [string](../types/string.md), 'photo' => [chatPhoto](../types/chatPhoto.md), 'top_message' => [message](../types/message.md), 'order' => [long](../types/long.md), 'unread_count' => [int](../types/int.md), 'last_read_inbox_message_id' => [long](../types/long.md), 'last_read_outbox_message_id' => [long](../types/long.md), 'notification_settings' => [notificationSettings](../types/notificationSettings.md), 'reply_markup_message_id' => [long](../types/long.md), 'draft_message' => [draftMessage](../types/draftMessage.md), 'type' => [ChatInfo](../types/ChatInfo.md), \]; +

[$chat](../constructors/chat.md) = \['id' => [long](../types/long.md), 'title' => [string](../types/string.md), 'photo' => [chatPhoto](../constructors/chatPhoto.md), 'top_message' => [message](../constructors/message.md), 'order' => [long](../types/long.md), 'unread_count' => [int](../types/int.md), 'last_read_inbox_message_id' => [long](../types/long.md), 'last_read_outbox_message_id' => [long](../types/long.md), 'notification_settings' => [notificationSettings](../constructors/notificationSettings.md), 'reply_markup_message_id' => [long](../types/long.md), 'draft_message' => [draftMessage](../constructors/draftMessage.md), 'type' => [ChatInfo](../types/ChatInfo.md), \]; ***

[$chatInviteLink](../constructors/chatInviteLink.md) = \['invite_link' => [string](../types/string.md), \]; *** -

[$chatInviteLinkInfo](../constructors/chatInviteLinkInfo.md) = \['chat_id' => [long](../types/long.md), 'title' => [string](../types/string.md), 'photo' => [chatPhoto](../types/chatPhoto.md), 'member_count' => [int](../types/int.md), 'members' => \[[user](../constructors/user.md)\], 'is_group' => [Bool](../types/Bool.md), 'is_channel' => [Bool](../types/Bool.md), 'is_public_channel' => [Bool](../types/Bool.md), 'is_supergroup_channel' => [Bool](../types/Bool.md), \]; +

[$chatInviteLinkInfo](../constructors/chatInviteLinkInfo.md) = \['chat_id' => [long](../types/long.md), 'title' => [string](../types/string.md), 'photo' => [chatPhoto](../constructors/chatPhoto.md), 'member_count' => [int](../types/int.md), 'members' => \[[user](../constructors/user.md)\], 'is_group' => [Bool](../types/Bool.md), 'is_channel' => [Bool](../types/Bool.md), 'is_public_channel' => [Bool](../types/Bool.md), 'is_supergroup_channel' => [Bool](../types/Bool.md), \]; *** -

[$chatMember](../constructors/chatMember.md) = \['user_id' => [int](../types/int.md), 'inviter_user_id' => [int](../types/int.md), 'join_date' => [int](../types/int.md), 'status' => [ChatMemberStatus](../types/ChatMemberStatus.md), 'bot_info' => [botInfo](../types/botInfo.md), \]; +

[$chatMember](../constructors/chatMember.md) = \['user_id' => [int](../types/int.md), 'inviter_user_id' => [int](../types/int.md), 'join_date' => [int](../types/int.md), 'status' => [ChatMemberStatus](../types/ChatMemberStatus.md), 'bot_info' => [botInfo](../constructors/botInfo.md), \]; ***

[$chatMemberStatusCreator](../constructors/chatMemberStatusCreator.md) = \[\]; @@ -125,7 +122,7 @@ description: List of constructors

[$chatMembers](../constructors/chatMembers.md) = \['total_count' => [int](../types/int.md), 'members' => \[[chatMember](../constructors/chatMember.md)\], \]; *** -

[$chatPhoto](../constructors/chatPhoto.md) = \['small' => [file](../types/file.md), 'big' => [file](../types/file.md), \]; +

[$chatPhoto](../constructors/chatPhoto.md) = \['small' => [file](../constructors/file.md), 'big' => [file](../constructors/file.md), \]; ***

[$chatReportSpamState](../constructors/chatReportSpamState.md) = \['can_report_spam' => [Bool](../types/Bool.md), \]; @@ -137,10 +134,10 @@ description: List of constructors

[$contact](../constructors/contact.md) = \['phone_number' => [string](../types/string.md), 'first_name' => [string](../types/string.md), 'last_name' => [string](../types/string.md), 'user_id' => [int](../types/int.md), \]; *** -

[$deviceTokenSet](../constructors/deviceTokenSet.md) = \['tokens' => \[[DeviceToken](../constructors/DeviceToken.md)\], \]; +

[$deviceTokenSet](../constructors/deviceTokenSet.md) = \['tokens' => \[[DeviceToken](../types/DeviceToken.md)\], \]; *** -

[$document](../constructors/document.md) = \['file_name' => [string](../types/string.md), 'mime_type' => [string](../types/string.md), 'thumb' => [photoSize](../types/photoSize.md), 'document' => [file](../types/file.md), \]; +

[$document](../constructors/document.md) = \['file_name' => [string](../types/string.md), 'mime_type' => [string](../types/string.md), 'thumb' => [photoSize](../constructors/photoSize.md), 'document' => [file](../constructors/file.md), \]; ***

[$draftMessage](../constructors/draftMessage.md) = \['reply_to_message_id' => [long](../types/long.md), 'input_message_text' => [InputMessageContent](../types/InputMessageContent.md), \]; @@ -152,7 +149,7 @@ description: List of constructors

[$file](../constructors/file.md) = \['id' => [int](../types/int.md), 'persistent_id' => [string](../types/string.md), 'size' => [int](../types/int.md), 'path' => [string](../types/string.md), \]; *** -

[$game](../constructors/game.md) = \['id' => [long](../types/long.md), 'short_name' => [string](../types/string.md), 'title' => [string](../types/string.md), 'text' => [string](../types/string.md), 'text_entities' => \[[MessageEntity](../constructors/MessageEntity.md)\], 'description' => [string](../types/string.md), 'photo' => [photo](../types/photo.md), 'animation' => [animation](../types/animation.md), \]; +

[$game](../constructors/game.md) = \['id' => [long](../types/long.md), 'short_name' => [string](../types/string.md), 'title' => [string](../types/string.md), 'text' => [string](../types/string.md), 'text_entities' => \[[MessageEntity](../types/MessageEntity.md)\], 'description' => [string](../types/string.md), 'photo' => [photo](../constructors/photo.md), 'animation' => [animation](../constructors/animation.md), \]; ***

[$gameHighScore](../constructors/gameHighScore.md) = \['position' => [int](../types/int.md), 'user_id' => [int](../types/int.md), 'score' => [int](../types/int.md), \]; @@ -167,10 +164,10 @@ description: List of constructors

[$group](../constructors/group.md) = \['id' => [int](../types/int.md), 'member_count' => [int](../types/int.md), 'status' => [ChatMemberStatus](../types/ChatMemberStatus.md), 'anyone_can_edit' => [Bool](../types/Bool.md), 'is_active' => [Bool](../types/Bool.md), 'migrated_to_channel_id' => [int](../types/int.md), \]; *** -

[$groupChatInfo](../constructors/groupChatInfo.md) = \['group' => [group](../types/group.md), \]; +

[$groupChatInfo](../constructors/groupChatInfo.md) = \['group' => [group](../constructors/group.md), \]; *** -

[$groupFull](../constructors/groupFull.md) = \['group' => [group](../types/group.md), 'creator_user_id' => [int](../types/int.md), 'members' => \[[chatMember](../constructors/chatMember.md)\], 'invite_link' => [string](../types/string.md), \]; +

[$groupFull](../constructors/groupFull.md) = \['group' => [group](../constructors/group.md), 'creator_user_id' => [int](../types/int.md), 'members' => \[[chatMember](../constructors/chatMember.md)\], 'invite_link' => [string](../types/string.md), \]; ***

[$inlineKeyboardButton](../constructors/inlineKeyboardButton.md) = \['text' => [string](../types/string.md), 'type' => [InlineKeyboardButtonType](../types/InlineKeyboardButtonType.md), \]; @@ -188,43 +185,43 @@ description: List of constructors

[$inlineKeyboardButtonTypeUrl](../constructors/inlineKeyboardButtonTypeUrl.md) = \['url' => [string](../types/string.md), \]; *** -

[$inlineQueryResultAnimation](../constructors/inlineQueryResultAnimation.md) = \['id' => [string](../types/string.md), 'animation' => [animation](../types/animation.md), 'title' => [string](../types/string.md), \]; +

[$inlineQueryResultAnimation](../constructors/inlineQueryResultAnimation.md) = \['id' => [string](../types/string.md), 'animation' => [animation](../constructors/animation.md), 'title' => [string](../types/string.md), \]; ***

[$inlineQueryResultArticle](../constructors/inlineQueryResultArticle.md) = \['id' => [string](../types/string.md), 'url' => [string](../types/string.md), 'hide_url' => [Bool](../types/Bool.md), 'title' => [string](../types/string.md), 'description' => [string](../types/string.md), 'thumb_url' => [string](../types/string.md), 'thumb_width' => [int](../types/int.md), 'thumb_height' => [int](../types/int.md), \]; *** -

[$inlineQueryResultAudio](../constructors/inlineQueryResultAudio.md) = \['id' => [string](../types/string.md), 'audio' => [audio](../types/audio.md), \]; +

[$inlineQueryResultAudio](../constructors/inlineQueryResultAudio.md) = \['id' => [string](../types/string.md), 'audio' => [audio](../constructors/audio.md), \]; *** -

[$inlineQueryResultContact](../constructors/inlineQueryResultContact.md) = \['id' => [string](../types/string.md), 'contact' => [contact](../types/contact.md), 'thumb_url' => [string](../types/string.md), 'thumb_width' => [int](../types/int.md), 'thumb_height' => [int](../types/int.md), \]; +

[$inlineQueryResultContact](../constructors/inlineQueryResultContact.md) = \['id' => [string](../types/string.md), 'contact' => [contact](../constructors/contact.md), 'thumb_url' => [string](../types/string.md), 'thumb_width' => [int](../types/int.md), 'thumb_height' => [int](../types/int.md), \]; *** -

[$inlineQueryResultDocument](../constructors/inlineQueryResultDocument.md) = \['id' => [string](../types/string.md), 'document' => [document](../types/document.md), 'title' => [string](../types/string.md), 'description' => [string](../types/string.md), \]; +

[$inlineQueryResultDocument](../constructors/inlineQueryResultDocument.md) = \['id' => [string](../types/string.md), 'document' => [document](../constructors/document.md), 'title' => [string](../types/string.md), 'description' => [string](../types/string.md), \]; *** -

[$inlineQueryResultGame](../constructors/inlineQueryResultGame.md) = \['id' => [string](../types/string.md), 'game' => [game](../types/game.md), \]; +

[$inlineQueryResultGame](../constructors/inlineQueryResultGame.md) = \['id' => [string](../types/string.md), 'game' => [game](../constructors/game.md), \]; *** -

[$inlineQueryResultLocation](../constructors/inlineQueryResultLocation.md) = \['id' => [string](../types/string.md), 'location' => [location](../types/location.md), 'title' => [string](../types/string.md), 'thumb_url' => [string](../types/string.md), 'thumb_width' => [int](../types/int.md), 'thumb_height' => [int](../types/int.md), \]; +

[$inlineQueryResultLocation](../constructors/inlineQueryResultLocation.md) = \['id' => [string](../types/string.md), 'location' => [location](../constructors/location.md), 'title' => [string](../types/string.md), 'thumb_url' => [string](../types/string.md), 'thumb_width' => [int](../types/int.md), 'thumb_height' => [int](../types/int.md), \]; *** -

[$inlineQueryResultPhoto](../constructors/inlineQueryResultPhoto.md) = \['id' => [string](../types/string.md), 'photo' => [photo](../types/photo.md), 'title' => [string](../types/string.md), 'description' => [string](../types/string.md), \]; +

[$inlineQueryResultPhoto](../constructors/inlineQueryResultPhoto.md) = \['id' => [string](../types/string.md), 'photo' => [photo](../constructors/photo.md), 'title' => [string](../types/string.md), 'description' => [string](../types/string.md), \]; *** -

[$inlineQueryResultSticker](../constructors/inlineQueryResultSticker.md) = \['id' => [string](../types/string.md), 'sticker' => [sticker](../types/sticker.md), \]; +

[$inlineQueryResultSticker](../constructors/inlineQueryResultSticker.md) = \['id' => [string](../types/string.md), 'sticker' => [sticker](../constructors/sticker.md), \]; *** -

[$inlineQueryResultVenue](../constructors/inlineQueryResultVenue.md) = \['id' => [string](../types/string.md), 'venue' => [venue](../types/venue.md), 'thumb_url' => [string](../types/string.md), 'thumb_width' => [int](../types/int.md), 'thumb_height' => [int](../types/int.md), \]; +

[$inlineQueryResultVenue](../constructors/inlineQueryResultVenue.md) = \['id' => [string](../types/string.md), 'venue' => [venue](../constructors/venue.md), 'thumb_url' => [string](../types/string.md), 'thumb_width' => [int](../types/int.md), 'thumb_height' => [int](../types/int.md), \]; *** -

[$inlineQueryResultVideo](../constructors/inlineQueryResultVideo.md) = \['id' => [string](../types/string.md), 'video' => [video](../types/video.md), 'title' => [string](../types/string.md), 'description' => [string](../types/string.md), \]; +

[$inlineQueryResultVideo](../constructors/inlineQueryResultVideo.md) = \['id' => [string](../types/string.md), 'video' => [video](../constructors/video.md), 'title' => [string](../types/string.md), 'description' => [string](../types/string.md), \]; *** -

[$inlineQueryResultVoice](../constructors/inlineQueryResultVoice.md) = \['id' => [string](../types/string.md), 'voice' => [voice](../types/voice.md), 'title' => [string](../types/string.md), \]; +

[$inlineQueryResultVoice](../constructors/inlineQueryResultVoice.md) = \['id' => [string](../types/string.md), 'voice' => [voice](../constructors/voice.md), 'title' => [string](../types/string.md), \]; *** -

[$inlineQueryResults](../constructors/inlineQueryResults.md) = \['inline_query_id' => [long](../types/long.md), 'next_offset' => [string](../types/string.md), 'results' => \[[InlineQueryResult](../constructors/InlineQueryResult.md)\], 'switch_pm_text' => [string](../types/string.md), 'switch_pm_parameter' => [string](../types/string.md), \]; +

[$inlineQueryResults](../constructors/inlineQueryResults.md) = \['inline_query_id' => [long](../types/long.md), 'next_offset' => [string](../types/string.md), 'results' => \[[InlineQueryResult](../types/InlineQueryResult.md)\], 'switch_pm_text' => [string](../types/string.md), 'switch_pm_parameter' => [string](../types/string.md), \]; ***

[$inputFileGenerated](../constructors/inputFileGenerated.md) = \['original_path' => [string](../types/string.md), 'conversion' => [string](../types/string.md), 'expected_size' => [int](../types/int.md), 'should_cache' => [Bool](../types/Bool.md), \]; @@ -251,7 +248,7 @@ description: List of constructors

[$inputInlineQueryResultAudio](../constructors/inputInlineQueryResultAudio.md) = \['id' => [string](../types/string.md), 'title' => [string](../types/string.md), 'performer' => [string](../types/string.md), 'audio_url' => [string](../types/string.md), 'audio_duration' => [int](../types/int.md), 'reply_markup' => [ReplyMarkup](../types/ReplyMarkup.md), 'input_message_content' => [InputMessageContent](../types/InputMessageContent.md), \]; *** -

[$inputInlineQueryResultContact](../constructors/inputInlineQueryResultContact.md) = \['id' => [string](../types/string.md), 'contact' => [contact](../types/contact.md), 'thumb_url' => [string](../types/string.md), 'thumb_width' => [int](../types/int.md), 'thumb_height' => [int](../types/int.md), 'reply_markup' => [ReplyMarkup](../types/ReplyMarkup.md), 'input_message_content' => [InputMessageContent](../types/InputMessageContent.md), \]; +

[$inputInlineQueryResultContact](../constructors/inputInlineQueryResultContact.md) = \['id' => [string](../types/string.md), 'contact' => [contact](../constructors/contact.md), 'thumb_url' => [string](../types/string.md), 'thumb_width' => [int](../types/int.md), 'thumb_height' => [int](../types/int.md), 'reply_markup' => [ReplyMarkup](../types/ReplyMarkup.md), 'input_message_content' => [InputMessageContent](../types/InputMessageContent.md), \]; ***

[$inputInlineQueryResultDocument](../constructors/inputInlineQueryResultDocument.md) = \['id' => [string](../types/string.md), 'title' => [string](../types/string.md), 'description' => [string](../types/string.md), 'document_url' => [string](../types/string.md), 'mime_type' => [string](../types/string.md), 'thumb_url' => [string](../types/string.md), 'thumb_width' => [int](../types/int.md), 'thumb_height' => [int](../types/int.md), 'reply_markup' => [ReplyMarkup](../types/ReplyMarkup.md), 'input_message_content' => [InputMessageContent](../types/InputMessageContent.md), \]; @@ -260,7 +257,7 @@ description: List of constructors

[$inputInlineQueryResultGame](../constructors/inputInlineQueryResultGame.md) = \['id' => [string](../types/string.md), 'game_short_name' => [string](../types/string.md), 'reply_markup' => [ReplyMarkup](../types/ReplyMarkup.md), \]; *** -

[$inputInlineQueryResultLocation](../constructors/inputInlineQueryResultLocation.md) = \['id' => [string](../types/string.md), 'location' => [location](../types/location.md), 'title' => [string](../types/string.md), 'thumb_url' => [string](../types/string.md), 'thumb_width' => [int](../types/int.md), 'thumb_height' => [int](../types/int.md), 'reply_markup' => [ReplyMarkup](../types/ReplyMarkup.md), 'input_message_content' => [InputMessageContent](../types/InputMessageContent.md), \]; +

[$inputInlineQueryResultLocation](../constructors/inputInlineQueryResultLocation.md) = \['id' => [string](../types/string.md), 'location' => [location](../constructors/location.md), 'title' => [string](../types/string.md), 'thumb_url' => [string](../types/string.md), 'thumb_width' => [int](../types/int.md), 'thumb_height' => [int](../types/int.md), 'reply_markup' => [ReplyMarkup](../types/ReplyMarkup.md), 'input_message_content' => [InputMessageContent](../types/InputMessageContent.md), \]; ***

[$inputInlineQueryResultPhoto](../constructors/inputInlineQueryResultPhoto.md) = \['id' => [string](../types/string.md), 'title' => [string](../types/string.md), 'description' => [string](../types/string.md), 'thumb_url' => [string](../types/string.md), 'photo_url' => [string](../types/string.md), 'photo_width' => [int](../types/int.md), 'photo_height' => [int](../types/int.md), 'reply_markup' => [ReplyMarkup](../types/ReplyMarkup.md), 'input_message_content' => [InputMessageContent](../types/InputMessageContent.md), \]; @@ -269,7 +266,7 @@ description: List of constructors

[$inputInlineQueryResultSticker](../constructors/inputInlineQueryResultSticker.md) = \['id' => [string](../types/string.md), 'thumb_url' => [string](../types/string.md), 'sticker_url' => [string](../types/string.md), 'sticker_width' => [int](../types/int.md), 'sticker_height' => [int](../types/int.md), 'reply_markup' => [ReplyMarkup](../types/ReplyMarkup.md), 'input_message_content' => [InputMessageContent](../types/InputMessageContent.md), \]; *** -

[$inputInlineQueryResultVenue](../constructors/inputInlineQueryResultVenue.md) = \['id' => [string](../types/string.md), 'venue' => [venue](../types/venue.md), 'thumb_url' => [string](../types/string.md), 'thumb_width' => [int](../types/int.md), 'thumb_height' => [int](../types/int.md), 'reply_markup' => [ReplyMarkup](../types/ReplyMarkup.md), 'input_message_content' => [InputMessageContent](../types/InputMessageContent.md), \]; +

[$inputInlineQueryResultVenue](../constructors/inputInlineQueryResultVenue.md) = \['id' => [string](../types/string.md), 'venue' => [venue](../constructors/venue.md), 'thumb_url' => [string](../types/string.md), 'thumb_width' => [int](../types/int.md), 'thumb_height' => [int](../types/int.md), 'reply_markup' => [ReplyMarkup](../types/ReplyMarkup.md), 'input_message_content' => [InputMessageContent](../types/InputMessageContent.md), \]; ***

[$inputInlineQueryResultVideo](../constructors/inputInlineQueryResultVideo.md) = \['id' => [string](../types/string.md), 'title' => [string](../types/string.md), 'description' => [string](../types/string.md), 'thumb_url' => [string](../types/string.md), 'video_url' => [string](../types/string.md), 'mime_type' => [string](../types/string.md), 'video_width' => [int](../types/int.md), 'video_height' => [int](../types/int.md), 'video_duration' => [int](../types/int.md), 'reply_markup' => [ReplyMarkup](../types/ReplyMarkup.md), 'input_message_content' => [InputMessageContent](../types/InputMessageContent.md), \]; @@ -284,7 +281,7 @@ description: List of constructors

[$inputMessageAudio](../constructors/inputMessageAudio.md) = \['audio' => [InputFile](../types/InputFile.md), 'album_cover_thumb' => [InputThumb](../types/InputThumb.md), 'duration' => [int](../types/int.md), 'title' => [string](../types/string.md), 'performer' => [string](../types/string.md), 'caption' => [string](../types/string.md), \]; *** -

[$inputMessageContact](../constructors/inputMessageContact.md) = \['contact' => [contact](../types/contact.md), \]; +

[$inputMessageContact](../constructors/inputMessageContact.md) = \['contact' => [contact](../constructors/contact.md), \]; ***

[$inputMessageDocument](../constructors/inputMessageDocument.md) = \['document' => [InputFile](../types/InputFile.md), 'thumb' => [InputThumb](../types/InputThumb.md), 'caption' => [string](../types/string.md), \]; @@ -296,22 +293,22 @@ description: List of constructors

[$inputMessageGame](../constructors/inputMessageGame.md) = \['bot_user_id' => [int](../types/int.md), 'game_short_name' => [string](../types/string.md), \]; *** -

[$inputMessageLocation](../constructors/inputMessageLocation.md) = \['location' => [location](../types/location.md), \]; +

[$inputMessageLocation](../constructors/inputMessageLocation.md) = \['location' => [location](../constructors/location.md), \]; *** -

[$inputMessagePhoto](../constructors/inputMessagePhoto.md) = \['photo' => [InputFile](../types/InputFile.md), 'thumb' => [InputThumb](../types/InputThumb.md), 'added_sticker_file_ids' => \[[int](../constructors/int.md)\], 'width' => [int](../types/int.md), 'height' => [int](../types/int.md), 'caption' => [string](../types/string.md), \]; +

[$inputMessagePhoto](../constructors/inputMessagePhoto.md) = \['photo' => [InputFile](../types/InputFile.md), 'thumb' => [InputThumb](../types/InputThumb.md), 'added_sticker_file_ids' => \[[int](../types/int.md)\], 'width' => [int](../types/int.md), 'height' => [int](../types/int.md), 'caption' => [string](../types/string.md), \]; ***

[$inputMessageSticker](../constructors/inputMessageSticker.md) = \['sticker' => [InputFile](../types/InputFile.md), 'thumb' => [InputThumb](../types/InputThumb.md), 'width' => [int](../types/int.md), 'height' => [int](../types/int.md), \]; *** -

[$inputMessageText](../constructors/inputMessageText.md) = \['text' => [string](../types/string.md), 'disable_web_page_preview' => [Bool](../types/Bool.md), 'clear_draft' => [Bool](../types/Bool.md), 'entities' => \[[MessageEntity](../constructors/MessageEntity.md)\], 'parse_mode' => [TextParseMode](../types/TextParseMode.md), \]; +

[$inputMessageText](../constructors/inputMessageText.md) = \['text' => [string](../types/string.md), 'disable_web_page_preview' => [Bool](../types/Bool.md), 'clear_draft' => [Bool](../types/Bool.md), 'entities' => \[[MessageEntity](../types/MessageEntity.md)\], 'parse_mode' => [TextParseMode](../types/TextParseMode.md), \]; *** -

[$inputMessageVenue](../constructors/inputMessageVenue.md) = \['venue' => [venue](../types/venue.md), \]; +

[$inputMessageVenue](../constructors/inputMessageVenue.md) = \['venue' => [venue](../constructors/venue.md), \]; *** -

[$inputMessageVideo](../constructors/inputMessageVideo.md) = \['video' => [InputFile](../types/InputFile.md), 'thumb' => [InputThumb](../types/InputThumb.md), 'added_sticker_file_ids' => \[[int](../constructors/int.md)\], 'duration' => [int](../types/int.md), 'width' => [int](../types/int.md), 'height' => [int](../types/int.md), 'caption' => [string](../types/string.md), \]; +

[$inputMessageVideo](../constructors/inputMessageVideo.md) = \['video' => [InputFile](../types/InputFile.md), 'thumb' => [InputThumb](../types/InputThumb.md), 'added_sticker_file_ids' => \[[int](../types/int.md)\], 'duration' => [int](../types/int.md), 'width' => [int](../types/int.md), 'height' => [int](../types/int.md), 'caption' => [string](../types/string.md), \]; ***

[$inputMessageVoice](../constructors/inputMessageVoice.md) = \['voice' => [InputFile](../types/InputFile.md), 'duration' => [int](../types/int.md), 'waveform' => [bytes](../types/bytes.md), 'caption' => [string](../types/string.md), \]; @@ -353,10 +350,10 @@ description: List of constructors

[$message](../constructors/message.md) = \['id' => [long](../types/long.md), 'sender_user_id' => [int](../types/int.md), 'chat_id' => [long](../types/long.md), 'send_state' => [MessageSendState](../types/MessageSendState.md), 'can_be_edited' => [Bool](../types/Bool.md), 'can_be_deleted' => [Bool](../types/Bool.md), 'is_post' => [Bool](../types/Bool.md), 'date' => [int](../types/int.md), 'edit_date' => [int](../types/int.md), 'forward_info' => [MessageForwardInfo](../types/MessageForwardInfo.md), 'reply_to_message_id' => [long](../types/long.md), 'ttl' => [int](../types/int.md), 'ttl_expires_in' => [double](../types/double.md), 'via_bot_user_id' => [int](../types/int.md), 'views' => [int](../types/int.md), 'content' => [MessageContent](../types/MessageContent.md), 'reply_markup' => [ReplyMarkup](../types/ReplyMarkup.md), \]; *** -

[$messageAnimation](../constructors/messageAnimation.md) = \['animation' => [animation](../types/animation.md), 'caption' => [string](../types/string.md), \]; +

[$messageAnimation](../constructors/messageAnimation.md) = \['animation' => [animation](../constructors/animation.md), 'caption' => [string](../types/string.md), \]; *** -

[$messageAudio](../constructors/messageAudio.md) = \['audio' => [audio](../types/audio.md), 'caption' => [string](../types/string.md), 'is_listened' => [Bool](../types/Bool.md), \]; +

[$messageAudio](../constructors/messageAudio.md) = \['audio' => [audio](../constructors/audio.md), 'caption' => [string](../types/string.md), 'is_listened' => [Bool](../types/Bool.md), \]; ***

[$messageChannelChatCreate](../constructors/messageChannelChatCreate.md) = \['title' => [string](../types/string.md), \]; @@ -365,13 +362,13 @@ description: List of constructors

[$messageChatAddMembers](../constructors/messageChatAddMembers.md) = \['members' => \[[user](../constructors/user.md)\], \]; *** -

[$messageChatChangePhoto](../constructors/messageChatChangePhoto.md) = \['photo' => [photo](../types/photo.md), \]; +

[$messageChatChangePhoto](../constructors/messageChatChangePhoto.md) = \['photo' => [photo](../constructors/photo.md), \]; ***

[$messageChatChangeTitle](../constructors/messageChatChangeTitle.md) = \['title' => [string](../types/string.md), \]; *** -

[$messageChatDeleteMember](../constructors/messageChatDeleteMember.md) = \['user' => [user](../types/user.md), \]; +

[$messageChatDeleteMember](../constructors/messageChatDeleteMember.md) = \['user' => [user](../constructors/user.md), \]; ***

[$messageChatDeletePhoto](../constructors/messageChatDeletePhoto.md) = \[\]; @@ -389,10 +386,10 @@ description: List of constructors

[$messageChatSetTtl](../constructors/messageChatSetTtl.md) = \['ttl' => [int](../types/int.md), \]; *** -

[$messageContact](../constructors/messageContact.md) = \['contact' => [contact](../types/contact.md), \]; +

[$messageContact](../constructors/messageContact.md) = \['contact' => [contact](../constructors/contact.md), \]; *** -

[$messageDocument](../constructors/messageDocument.md) = \['document' => [document](../types/document.md), 'caption' => [string](../types/string.md), \]; +

[$messageDocument](../constructors/messageDocument.md) = \['document' => [document](../constructors/document.md), 'caption' => [string](../types/string.md), \]; ***

[$messageEntityBold](../constructors/messageEntityBold.md) = \['offset' => [int](../types/int.md), 'length' => [int](../types/int.md), \]; @@ -437,7 +434,7 @@ description: List of constructors

[$messageForwardedPost](../constructors/messageForwardedPost.md) = \['chat_id' => [long](../types/long.md), 'sender_user_id' => [int](../types/int.md), 'date' => [int](../types/int.md), 'message_id' => [long](../types/long.md), \]; *** -

[$messageGame](../constructors/messageGame.md) = \['game' => [game](../types/game.md), \]; +

[$messageGame](../constructors/messageGame.md) = \['game' => [game](../constructors/game.md), \]; ***

[$messageGameScore](../constructors/messageGameScore.md) = \['game_message_id' => [long](../types/long.md), 'game_id' => [long](../types/long.md), 'score' => [int](../types/int.md), \]; @@ -458,10 +455,10 @@ description: List of constructors

[$messageIsSuccessfullySent](../constructors/messageIsSuccessfullySent.md) = \[\]; *** -

[$messageLocation](../constructors/messageLocation.md) = \['location' => [location](../types/location.md), \]; +

[$messageLocation](../constructors/messageLocation.md) = \['location' => [location](../constructors/location.md), \]; *** -

[$messagePhoto](../constructors/messagePhoto.md) = \['photo' => [photo](../types/photo.md), 'caption' => [string](../types/string.md), \]; +

[$messagePhoto](../constructors/messagePhoto.md) = \['photo' => [photo](../constructors/photo.md), 'caption' => [string](../types/string.md), \]; ***

[$messagePinMessage](../constructors/messagePinMessage.md) = \['message_id' => [long](../types/long.md), \]; @@ -470,22 +467,22 @@ description: List of constructors

[$messageScreenshotTaken](../constructors/messageScreenshotTaken.md) = \[\]; *** -

[$messageSticker](../constructors/messageSticker.md) = \['sticker' => [sticker](../types/sticker.md), \]; +

[$messageSticker](../constructors/messageSticker.md) = \['sticker' => [sticker](../constructors/sticker.md), \]; *** -

[$messageText](../constructors/messageText.md) = \['text' => [string](../types/string.md), 'entities' => \[[MessageEntity](../constructors/MessageEntity.md)\], 'web_page' => [webPage](../types/webPage.md), \]; +

[$messageText](../constructors/messageText.md) = \['text' => [string](../types/string.md), 'entities' => \[[MessageEntity](../types/MessageEntity.md)\], 'web_page' => [webPage](../constructors/webPage.md), \]; ***

[$messageUnsupported](../constructors/messageUnsupported.md) = \[\]; *** -

[$messageVenue](../constructors/messageVenue.md) = \['venue' => [venue](../types/venue.md), \]; +

[$messageVenue](../constructors/messageVenue.md) = \['venue' => [venue](../constructors/venue.md), \]; *** -

[$messageVideo](../constructors/messageVideo.md) = \['video' => [video](../types/video.md), 'caption' => [string](../types/string.md), \]; +

[$messageVideo](../constructors/messageVideo.md) = \['video' => [video](../constructors/video.md), 'caption' => [string](../types/string.md), \]; *** -

[$messageVoice](../constructors/messageVoice.md) = \['voice' => [voice](../types/voice.md), 'caption' => [string](../types/string.md), 'is_listened' => [Bool](../types/Bool.md), \]; +

[$messageVoice](../constructors/messageVoice.md) = \['voice' => [voice](../constructors/voice.md), 'caption' => [string](../types/string.md), 'is_listened' => [Bool](../types/Bool.md), \]; ***

[$messages](../constructors/messages.md) = \['total_count' => [int](../types/int.md), 'messages' => \[[message](../constructors/message.md)\], \]; @@ -533,7 +530,7 @@ description: List of constructors

[$photo](../constructors/photo.md) = \['id' => [long](../types/long.md), 'has_stickers' => [Bool](../types/Bool.md), 'sizes' => \[[photoSize](../constructors/photoSize.md)\], \]; *** -

[$photoSize](../constructors/photoSize.md) = \['type' => [string](../types/string.md), 'photo' => [file](../types/file.md), 'width' => [int](../types/int.md), 'height' => [int](../types/int.md), \]; +

[$photoSize](../constructors/photoSize.md) = \['type' => [string](../types/string.md), 'photo' => [file](../constructors/file.md), 'width' => [int](../types/int.md), 'height' => [int](../types/int.md), \]; ***

[$privacyKeyChatInvite](../constructors/privacyKeyChatInvite.md) = \[\]; @@ -548,7 +545,7 @@ description: List of constructors

[$privacyRuleAllowContacts](../constructors/privacyRuleAllowContacts.md) = \[\]; *** -

[$privacyRuleAllowUsers](../constructors/privacyRuleAllowUsers.md) = \['user_ids' => \[[int](../constructors/int.md)\], \]; +

[$privacyRuleAllowUsers](../constructors/privacyRuleAllowUsers.md) = \['user_ids' => \[[int](../types/int.md)\], \]; ***

[$privacyRuleDisallowAll](../constructors/privacyRuleDisallowAll.md) = \[\]; @@ -557,16 +554,16 @@ description: List of constructors

[$privacyRuleDisallowContacts](../constructors/privacyRuleDisallowContacts.md) = \[\]; *** -

[$privacyRuleDisallowUsers](../constructors/privacyRuleDisallowUsers.md) = \['user_ids' => \[[int](../constructors/int.md)\], \]; +

[$privacyRuleDisallowUsers](../constructors/privacyRuleDisallowUsers.md) = \['user_ids' => \[[int](../types/int.md)\], \]; *** -

[$privacyRules](../constructors/privacyRules.md) = \['rules' => \[[PrivacyRule](../constructors/PrivacyRule.md)\], \]; +

[$privacyRules](../constructors/privacyRules.md) = \['rules' => \[[PrivacyRule](../types/PrivacyRule.md)\], \]; *** -

[$privateChatInfo](../constructors/privateChatInfo.md) = \['user' => [user](../types/user.md), \]; +

[$privateChatInfo](../constructors/privateChatInfo.md) = \['user' => [user](../constructors/user.md), \]; *** -

[$profilePhoto](../constructors/profilePhoto.md) = \['id' => [long](../types/long.md), 'small' => [file](../types/file.md), 'big' => [file](../types/file.md), \]; +

[$profilePhoto](../constructors/profilePhoto.md) = \['id' => [long](../types/long.md), 'small' => [file](../constructors/file.md), 'big' => [file](../constructors/file.md), \]; ***

[$recoveryEmail](../constructors/recoveryEmail.md) = \['recovery_email' => [string](../types/string.md), \]; @@ -617,7 +614,7 @@ description: List of constructors

[$secretChat](../constructors/secretChat.md) = \['id' => [int](../types/int.md), 'user_id' => [int](../types/int.md), 'state' => [int](../types/int.md), 'is_outbound' => [Bool](../types/Bool.md), 'ttl' => [int](../types/int.md), 'key_hash' => [bytes](../types/bytes.md), \]; *** -

[$secretChatInfo](../constructors/secretChatInfo.md) = \['secret_chat' => [secretChat](../types/secretChat.md), \]; +

[$secretChatInfo](../constructors/secretChatInfo.md) = \['secret_chat' => [secretChat](../constructors/secretChat.md), \]; ***

[$sendMessageCancelAction](../constructors/sendMessageCancelAction.md) = \[\]; @@ -662,10 +659,10 @@ description: List of constructors

[$simplePushDeviceToken](../constructors/simplePushDeviceToken.md) = \['token' => [string](../types/string.md), \]; *** -

[$sticker](../constructors/sticker.md) = \['set_id' => [long](../types/long.md), 'width' => [int](../types/int.md), 'height' => [int](../types/int.md), 'emoji' => [string](../types/string.md), 'is_mask' => [Bool](../types/Bool.md), 'mask_position' => [maskPosition](../types/maskPosition.md), 'thumb' => [photoSize](../types/photoSize.md), 'sticker' => [file](../types/file.md), \]; +

[$sticker](../constructors/sticker.md) = \['set_id' => [long](../types/long.md), 'width' => [int](../types/int.md), 'height' => [int](../types/int.md), 'emoji' => [string](../types/string.md), 'is_mask' => [Bool](../types/Bool.md), 'mask_position' => [maskPosition](../constructors/maskPosition.md), 'thumb' => [photoSize](../constructors/photoSize.md), 'sticker' => [file](../constructors/file.md), \]; *** -

[$stickerEmojis](../constructors/stickerEmojis.md) = \['emojis' => \[[string](../constructors/string.md)\], \]; +

[$stickerEmojis](../constructors/stickerEmojis.md) = \['emojis' => \[[string](../types/string.md)\], \]; ***

[$stickerSet](../constructors/stickerSet.md) = \['id' => [long](../types/long.md), 'title' => [string](../types/string.md), 'name' => [string](../types/string.md), 'is_installed' => [Bool](../types/Bool.md), 'is_archived' => [Bool](../types/Bool.md), 'is_official' => [Bool](../types/Bool.md), 'is_masks' => [Bool](../types/Bool.md), 'is_viewed' => [Bool](../types/Bool.md), 'stickers' => \[[sticker](../constructors/sticker.md)\], 'emojis' => \[[stickerEmojis](../constructors/stickerEmojis.md)\], \]; @@ -688,13 +685,13 @@ description: List of constructors [$test\_string](../constructors/test_string.md) = \['value' => [string](../types/string.md), \]; -[$test\_vectorInt](../constructors/test_vectorInt.md) = \['value' => \[[int](../constructors/int.md)\], \]; +[$test\_vectorInt](../constructors/test_vectorInt.md) = \['value' => \[[int](../types/int.md)\], \]; -[$test\_vectorIntObject](../constructors/test_vectorIntObject.md) = \['value' => \[[test\_Int](../constructors/test_Int.md)\], \]; +[$test\_vectorIntObject](../constructors/test_vectorIntObject.md) = \['value' => \[[test\_Int](../types/test_Int.md)\], \]; -[$test\_vectorString](../constructors/test_vectorString.md) = \['value' => \[[string](../constructors/string.md)\], \]; +[$test\_vectorString](../constructors/test_vectorString.md) = \['value' => \[[string](../types/string.md)\], \]; -[$test\_vectorStringObject](../constructors/test_vectorStringObject.md) = \['value' => \[[test\_String](../constructors/test_String.md)\], \]; +[$test\_vectorStringObject](../constructors/test_vectorStringObject.md) = \['value' => \[[test\_String](../types/test_String.md)\], \]; ***

[$textParseModeHTML](../constructors/textParseModeHTML.md) = \[\]; @@ -709,22 +706,22 @@ description: List of constructors

[$updateAuthState](../constructors/updateAuthState.md) = \['auth_state' => [AuthState](../types/AuthState.md), \]; *** -

[$updateChannel](../constructors/updateChannel.md) = \['channel' => [channel](../types/channel.md), \]; +

[$updateChannel](../constructors/updateChannel.md) = \['channel' => [channel](../constructors/channel.md), \]; *** -

[$updateChannelFull](../constructors/updateChannelFull.md) = \['channel_full' => [channelFull](../types/channelFull.md), \]; +

[$updateChannelFull](../constructors/updateChannelFull.md) = \['channel_full' => [channelFull](../constructors/channelFull.md), \]; *** -

[$updateChat](../constructors/updateChat.md) = \['chat' => [chat](../types/chat.md), \]; +

[$updateChat](../constructors/updateChat.md) = \['chat' => [chat](../constructors/chat.md), \]; *** -

[$updateChatDraftMessage](../constructors/updateChatDraftMessage.md) = \['chat_id' => [long](../types/long.md), 'draft_message' => [draftMessage](../types/draftMessage.md), \]; +

[$updateChatDraftMessage](../constructors/updateChatDraftMessage.md) = \['chat_id' => [long](../types/long.md), 'draft_message' => [draftMessage](../constructors/draftMessage.md), \]; ***

[$updateChatOrder](../constructors/updateChatOrder.md) = \['chat_id' => [long](../types/long.md), 'order' => [long](../types/long.md), \]; *** -

[$updateChatPhoto](../constructors/updateChatPhoto.md) = \['chat_id' => [long](../types/long.md), 'photo' => [chatPhoto](../types/chatPhoto.md), \]; +

[$updateChatPhoto](../constructors/updateChatPhoto.md) = \['chat_id' => [long](../types/long.md), 'photo' => [chatPhoto](../constructors/chatPhoto.md), \]; ***

[$updateChatReadInbox](../constructors/updateChatReadInbox.md) = \['chat_id' => [long](../types/long.md), 'last_read_inbox_message_id' => [long](../types/long.md), 'unread_count' => [int](../types/int.md), \]; @@ -739,16 +736,16 @@ description: List of constructors

[$updateChatTitle](../constructors/updateChatTitle.md) = \['chat_id' => [long](../types/long.md), 'title' => [string](../types/string.md), \]; *** -

[$updateChatTopMessage](../constructors/updateChatTopMessage.md) = \['chat_id' => [long](../types/long.md), 'top_message' => [message](../types/message.md), \]; +

[$updateChatTopMessage](../constructors/updateChatTopMessage.md) = \['chat_id' => [long](../types/long.md), 'top_message' => [message](../constructors/message.md), \]; *** -

[$updateDeleteMessages](../constructors/updateDeleteMessages.md) = \['chat_id' => [long](../types/long.md), 'message_ids' => \[[long](../constructors/long.md)\], \]; +

[$updateDeleteMessages](../constructors/updateDeleteMessages.md) = \['chat_id' => [long](../types/long.md), 'message_ids' => \[[long](../types/long.md)\], \]; *** -

[$updateFile](../constructors/updateFile.md) = \['file' => [file](../types/file.md), \]; +

[$updateFile](../constructors/updateFile.md) = \['file' => [file](../constructors/file.md), \]; *** -

[$updateFileGenerationFinish](../constructors/updateFileGenerationFinish.md) = \['file' => [file](../types/file.md), \]; +

[$updateFileGenerationFinish](../constructors/updateFileGenerationFinish.md) = \['file' => [file](../constructors/file.md), \]; ***

[$updateFileGenerationProgress](../constructors/updateFileGenerationProgress.md) = \['file_id' => [int](../types/int.md), 'size' => [int](../types/int.md), 'ready' => [int](../types/int.md), \]; @@ -760,7 +757,7 @@ description: List of constructors

[$updateFileProgress](../constructors/updateFileProgress.md) = \['file_id' => [int](../types/int.md), 'size' => [int](../types/int.md), 'ready' => [int](../types/int.md), \]; *** -

[$updateGroup](../constructors/updateGroup.md) = \['group' => [group](../types/group.md), \]; +

[$updateGroup](../constructors/updateGroup.md) = \['group' => [group](../constructors/group.md), \]; ***

[$updateMessageContent](../constructors/updateMessageContent.md) = \['chat_id' => [long](../types/long.md), 'message_id' => [long](../types/long.md), 'new_content' => [MessageContent](../types/MessageContent.md), \]; @@ -772,7 +769,7 @@ description: List of constructors

[$updateMessageSendFailed](../constructors/updateMessageSendFailed.md) = \['chat_id' => [long](../types/long.md), 'message_id' => [long](../types/long.md), 'error_code' => [int](../types/int.md), 'error_message' => [string](../types/string.md), \]; *** -

[$updateMessageSendSucceeded](../constructors/updateMessageSendSucceeded.md) = \['message' => [message](../types/message.md), 'old_message_id' => [long](../types/long.md), \]; +

[$updateMessageSendSucceeded](../constructors/updateMessageSendSucceeded.md) = \['message' => [message](../constructors/message.md), 'old_message_id' => [long](../types/long.md), \]; ***

[$updateMessageViews](../constructors/updateMessageViews.md) = \['chat_id' => [long](../types/long.md), 'message_id' => [long](../types/long.md), 'views' => [int](../types/int.md), \]; @@ -781,46 +778,46 @@ description: List of constructors

[$updateNewCallbackQuery](../constructors/updateNewCallbackQuery.md) = \['id' => [long](../types/long.md), 'sender_user_id' => [int](../types/int.md), 'chat_id' => [long](../types/long.md), 'message_id' => [long](../types/long.md), 'chat_instance' => [long](../types/long.md), 'payload' => [CallbackQueryPayload](../types/CallbackQueryPayload.md), \]; *** -

[$updateNewChosenInlineResult](../constructors/updateNewChosenInlineResult.md) = \['sender_user_id' => [int](../types/int.md), 'user_location' => [location](../types/location.md), 'query' => [string](../types/string.md), 'result_id' => [string](../types/string.md), 'inline_message_id' => [string](../types/string.md), \]; +

[$updateNewChosenInlineResult](../constructors/updateNewChosenInlineResult.md) = \['sender_user_id' => [int](../types/int.md), 'user_location' => [location](../constructors/location.md), 'query' => [string](../types/string.md), 'result_id' => [string](../types/string.md), 'inline_message_id' => [string](../types/string.md), \]; ***

[$updateNewInlineCallbackQuery](../constructors/updateNewInlineCallbackQuery.md) = \['id' => [long](../types/long.md), 'sender_user_id' => [int](../types/int.md), 'inline_message_id' => [string](../types/string.md), 'chat_instance' => [long](../types/long.md), 'payload' => [CallbackQueryPayload](../types/CallbackQueryPayload.md), \]; *** -

[$updateNewInlineQuery](../constructors/updateNewInlineQuery.md) = \['id' => [long](../types/long.md), 'sender_user_id' => [int](../types/int.md), 'user_location' => [location](../types/location.md), 'query' => [string](../types/string.md), 'offset' => [string](../types/string.md), \]; +

[$updateNewInlineQuery](../constructors/updateNewInlineQuery.md) = \['id' => [long](../types/long.md), 'sender_user_id' => [int](../types/int.md), 'user_location' => [location](../constructors/location.md), 'query' => [string](../types/string.md), 'offset' => [string](../types/string.md), \]; *** -

[$updateNewMessage](../constructors/updateNewMessage.md) = \['message' => [message](../types/message.md), 'disable_notification' => [Bool](../types/Bool.md), \]; +

[$updateNewMessage](../constructors/updateNewMessage.md) = \['message' => [message](../constructors/message.md), 'disable_notification' => [Bool](../types/Bool.md), \]; *** -

[$updateNotificationSettings](../constructors/updateNotificationSettings.md) = \['scope' => [NotificationSettingsScope](../types/NotificationSettingsScope.md), 'notification_settings' => [notificationSettings](../types/notificationSettings.md), \]; +

[$updateNotificationSettings](../constructors/updateNotificationSettings.md) = \['scope' => [NotificationSettingsScope](../types/NotificationSettingsScope.md), 'notification_settings' => [notificationSettings](../constructors/notificationSettings.md), \]; ***

[$updateOption](../constructors/updateOption.md) = \['name' => [string](../types/string.md), 'value' => [OptionValue](../types/OptionValue.md), \]; *** -

[$updatePrivacy](../constructors/updatePrivacy.md) = \['key' => [PrivacyKey](../types/PrivacyKey.md), 'rules' => [privacyRules](../types/privacyRules.md), \]; +

[$updatePrivacy](../constructors/updatePrivacy.md) = \['key' => [PrivacyKey](../types/PrivacyKey.md), 'rules' => [privacyRules](../constructors/privacyRules.md), \]; *** -

[$updateRecentStickers](../constructors/updateRecentStickers.md) = \['is_attached' => [Bool](../types/Bool.md), 'sticker_ids' => \[[int](../constructors/int.md)\], \]; +

[$updateRecentStickers](../constructors/updateRecentStickers.md) = \['is_attached' => [Bool](../types/Bool.md), 'sticker_ids' => \[[int](../types/int.md)\], \]; ***

[$updateSavedAnimations](../constructors/updateSavedAnimations.md) = \[\]; *** -

[$updateSecretChat](../constructors/updateSecretChat.md) = \['secret_chat' => [secretChat](../types/secretChat.md), \]; +

[$updateSecretChat](../constructors/updateSecretChat.md) = \['secret_chat' => [secretChat](../constructors/secretChat.md), \]; ***

[$updateServiceNotification](../constructors/updateServiceNotification.md) = \['type' => [string](../types/string.md), 'content' => [MessageContent](../types/MessageContent.md), \]; *** -

[$updateStickerSets](../constructors/updateStickerSets.md) = \['is_masks' => [Bool](../types/Bool.md), 'sticker_set_ids' => \[[long](../constructors/long.md)\], \]; +

[$updateStickerSets](../constructors/updateStickerSets.md) = \['is_masks' => [Bool](../types/Bool.md), 'sticker_set_ids' => \[[long](../types/long.md)\], \]; *** -

[$updateTrendingStickerSets](../constructors/updateTrendingStickerSets.md) = \['sticker_sets' => [stickerSets](../types/stickerSets.md), \]; +

[$updateTrendingStickerSets](../constructors/updateTrendingStickerSets.md) = \['sticker_sets' => [stickerSets](../constructors/stickerSets.md), \]; *** -

[$updateUser](../constructors/updateUser.md) = \['user' => [user](../types/user.md), \]; +

[$updateUser](../constructors/updateUser.md) = \['user' => [user](../constructors/user.md), \]; ***

[$updateUserAction](../constructors/updateUserAction.md) = \['chat_id' => [long](../types/long.md), 'user_id' => [int](../types/int.md), 'action' => [SendMessageAction](../types/SendMessageAction.md), \]; @@ -832,10 +829,10 @@ description: List of constructors

[$updateUserStatus](../constructors/updateUserStatus.md) = \['user_id' => [int](../types/int.md), 'status' => [UserStatus](../types/UserStatus.md), \]; *** -

[$user](../constructors/user.md) = \['id' => [int](../types/int.md), 'first_name' => [string](../types/string.md), 'last_name' => [string](../types/string.md), 'username' => [string](../types/string.md), 'phone_number' => [string](../types/string.md), 'status' => [UserStatus](../types/UserStatus.md), 'profile_photo' => [profilePhoto](../types/profilePhoto.md), 'my_link' => [LinkState](../types/LinkState.md), 'foreign_link' => [LinkState](../types/LinkState.md), 'is_verified' => [Bool](../types/Bool.md), 'restriction_reason' => [string](../types/string.md), 'have_access' => [Bool](../types/Bool.md), 'type' => [UserType](../types/UserType.md), \]; +

[$user](../constructors/user.md) = \['id' => [int](../types/int.md), 'first_name' => [string](../types/string.md), 'last_name' => [string](../types/string.md), 'username' => [string](../types/string.md), 'phone_number' => [string](../types/string.md), 'status' => [UserStatus](../types/UserStatus.md), 'profile_photo' => [profilePhoto](../constructors/profilePhoto.md), 'my_link' => [LinkState](../types/LinkState.md), 'foreign_link' => [LinkState](../types/LinkState.md), 'is_verified' => [Bool](../types/Bool.md), 'restriction_reason' => [string](../types/string.md), 'have_access' => [Bool](../types/Bool.md), 'type' => [UserType](../types/UserType.md), \]; *** -

[$userFull](../constructors/userFull.md) = \['user' => [user](../types/user.md), 'is_blocked' => [Bool](../types/Bool.md), 'about' => [string](../types/string.md), 'common_chat_count' => [int](../types/int.md), 'bot_info' => [botInfo](../types/botInfo.md), \]; +

[$userFull](../constructors/userFull.md) = \['user' => [user](../constructors/user.md), 'is_blocked' => [Bool](../types/Bool.md), 'about' => [string](../types/string.md), 'common_chat_count' => [int](../types/int.md), 'bot_info' => [botInfo](../constructors/botInfo.md), \]; ***

[$userProfilePhotos](../constructors/userProfilePhotos.md) = \['total_count' => [int](../types/int.md), 'photos' => \[[photo](../constructors/photo.md)\], \]; @@ -874,13 +871,13 @@ description: List of constructors

[$users](../constructors/users.md) = \['total_count' => [int](../types/int.md), 'users' => \[[user](../constructors/user.md)\], \]; *** -

[$venue](../constructors/venue.md) = \['location' => [location](../types/location.md), 'title' => [string](../types/string.md), 'address' => [string](../types/string.md), 'provider' => [string](../types/string.md), 'id' => [string](../types/string.md), \]; +

[$venue](../constructors/venue.md) = \['location' => [location](../constructors/location.md), 'title' => [string](../types/string.md), 'address' => [string](../types/string.md), 'provider' => [string](../types/string.md), 'id' => [string](../types/string.md), \]; *** -

[$video](../constructors/video.md) = \['duration' => [int](../types/int.md), 'width' => [int](../types/int.md), 'height' => [int](../types/int.md), 'file_name' => [string](../types/string.md), 'mime_type' => [string](../types/string.md), 'has_stickers' => [Bool](../types/Bool.md), 'thumb' => [photoSize](../types/photoSize.md), 'video' => [file](../types/file.md), \]; +

[$video](../constructors/video.md) = \['duration' => [int](../types/int.md), 'width' => [int](../types/int.md), 'height' => [int](../types/int.md), 'file_name' => [string](../types/string.md), 'mime_type' => [string](../types/string.md), 'has_stickers' => [Bool](../types/Bool.md), 'thumb' => [photoSize](../constructors/photoSize.md), 'video' => [file](../constructors/file.md), \]; *** -

[$voice](../constructors/voice.md) = \['duration' => [int](../types/int.md), 'waveform' => [bytes](../types/bytes.md), 'mime_type' => [string](../types/string.md), 'voice' => [file](../types/file.md), \]; +

[$voice](../constructors/voice.md) = \['duration' => [int](../types/int.md), 'waveform' => [bytes](../types/bytes.md), 'mime_type' => [string](../types/string.md), 'voice' => [file](../constructors/file.md), \]; ***

[$wallpaper](../constructors/wallpaper.md) = \['sizes' => \[[photoSize](../constructors/photoSize.md)\], 'color' => [int](../types/int.md), \]; @@ -889,5 +886,5 @@ description: List of constructors

[$wallpapers](../constructors/wallpapers.md) = \['wallpapers' => \[[wallpaper](../constructors/wallpaper.md)\], \]; *** -

[$webPage](../constructors/webPage.md) = \['url' => [string](../types/string.md), 'display_url' => [string](../types/string.md), 'type' => [string](../types/string.md), 'site_name' => [string](../types/string.md), 'title' => [string](../types/string.md), 'description' => [string](../types/string.md), 'photo' => [photo](../types/photo.md), 'embed_url' => [string](../types/string.md), 'embed_type' => [string](../types/string.md), 'embed_width' => [int](../types/int.md), 'embed_height' => [int](../types/int.md), 'duration' => [int](../types/int.md), 'author' => [string](../types/string.md), 'animation' => [animation](../types/animation.md), 'audio' => [audio](../types/audio.md), 'document' => [document](../types/document.md), 'sticker' => [sticker](../types/sticker.md), 'video' => [video](../types/video.md), 'voice' => [voice](../types/voice.md), \]; +

[$webPage](../constructors/webPage.md) = \['url' => [string](../types/string.md), 'display_url' => [string](../types/string.md), 'type' => [string](../types/string.md), 'site_name' => [string](../types/string.md), 'title' => [string](../types/string.md), 'description' => [string](../types/string.md), 'photo' => [photo](../constructors/photo.md), 'embed_url' => [string](../types/string.md), 'embed_type' => [string](../types/string.md), 'embed_width' => [int](../types/int.md), 'embed_height' => [int](../types/int.md), 'duration' => [int](../types/int.md), 'author' => [string](../types/string.md), 'animation' => [animation](../constructors/animation.md), 'audio' => [audio](../constructors/audio.md), 'document' => [document](../constructors/document.md), 'sticker' => [sticker](../constructors/sticker.md), 'video' => [video](../constructors/video.md), 'voice' => [voice](../constructors/voice.md), \]; diff --git a/docs/TD_docs/methods/index.md b/docs/TD_docs/methods/index.md index e49e9914..665b5288 100644 --- a/docs/TD_docs/methods/index.md +++ b/docs/TD_docs/methods/index.md @@ -11,7 +11,7 @@ description: List of methods

$MadelineProto->[addChatMember](addChatMember.md)(\['chat_id' => [InputPeer](../types/InputPeer.md), 'user_id' => [int](../types/int.md), 'forward_limit' => [int](../types/int.md), \]) === [$Ok](../types/Ok.md) *** -

$MadelineProto->[addChatMembers](addChatMembers.md)(\['chat_id' => [InputPeer](../types/InputPeer.md), 'user_ids' => \[[int](../constructors/int.md)\], \]) === [$Ok](../types/Ok.md) +

$MadelineProto->[addChatMembers](addChatMembers.md)(\['chat_id' => [InputPeer](../types/InputPeer.md), 'user_ids' => \[[int](../types/int.md)\], \]) === [$Ok](../types/Ok.md) ***

$MadelineProto->[addRecentSticker](addRecentSticker.md)(\['is_attached' => [Bool](../types/Bool.md), 'sticker' => [InputFile](../types/InputFile.md), \]) === [$Stickers](../types/Stickers.md) @@ -26,7 +26,7 @@ description: List of methods

$MadelineProto->[answerCallbackQuery](answerCallbackQuery.md)(\['callback_query_id' => [long](../types/long.md), 'text' => [string](../types/string.md), 'show_alert' => [Bool](../types/Bool.md), 'url' => [string](../types/string.md), 'cache_time' => [int](../types/int.md), \]) === [$Ok](../types/Ok.md) *** -

$MadelineProto->[answerInlineQuery](answerInlineQuery.md)(\['inline_query_id' => [long](../types/long.md), 'is_personal' => [Bool](../types/Bool.md), 'results' => \[[InputInlineQueryResult](../constructors/InputInlineQueryResult.md)\], 'cache_time' => [int](../types/int.md), 'next_offset' => [string](../types/string.md), 'switch_pm_text' => [string](../types/string.md), 'switch_pm_parameter' => [string](../types/string.md), \]) === [$Ok](../types/Ok.md) +

$MadelineProto->[answerInlineQuery](answerInlineQuery.md)(\['inline_query_id' => [long](../types/long.md), 'is_personal' => [Bool](../types/Bool.md), 'results' => \[[InputInlineQueryResult](../types/InputInlineQueryResult.md)\], 'cache_time' => [int](../types/int.md), 'next_offset' => [string](../types/string.md), 'switch_pm_text' => [string](../types/string.md), 'switch_pm_parameter' => [string](../types/string.md), \]) === [$Ok](../types/Ok.md) ***

$MadelineProto->[blockUser](blockUser.md)(\['user_id' => [int](../types/int.md), \]) === [$Ok](../types/Ok.md) @@ -38,7 +38,7 @@ description: List of methods

$MadelineProto->[changeAbout](changeAbout.md)(\['about' => [string](../types/string.md), \]) === [$Ok](../types/Ok.md) *** -

$MadelineProto->[changeAccountTtl](changeAccountTtl.md)(\['ttl' => [accountTtl](../types/accountTtl.md), \]) === [$Ok](../types/Ok.md) +

$MadelineProto->[changeAccountTtl](changeAccountTtl.md)(\['ttl' => [accountTtl](../constructors/accountTtl.md), \]) === [$Ok](../types/Ok.md) ***

$MadelineProto->[changeChannelAbout](changeChannelAbout.md)(\['channel_id' => [int](../types/int.md), 'about' => [string](../types/string.md), \]) === [$Ok](../types/Ok.md) @@ -47,7 +47,7 @@ description: List of methods

$MadelineProto->[changeChannelUsername](changeChannelUsername.md)(\['channel_id' => [int](../types/int.md), 'username' => [string](../types/string.md), \]) === [$Ok](../types/Ok.md) *** -

$MadelineProto->[changeChatDraftMessage](changeChatDraftMessage.md)(\['chat_id' => [InputPeer](../types/InputPeer.md), 'draft_message' => [draftMessage](../types/draftMessage.md), \]) === [$Ok](../types/Ok.md) +

$MadelineProto->[changeChatDraftMessage](changeChatDraftMessage.md)(\['chat_id' => [InputPeer](../types/InputPeer.md), 'draft_message' => [draftMessage](../constructors/draftMessage.md), \]) === [$Ok](../types/Ok.md) ***

$MadelineProto->[changeChatMemberStatus](changeChatMemberStatus.md)(\['chat_id' => [InputPeer](../types/InputPeer.md), 'user_id' => [int](../types/int.md), 'status' => [ChatMemberStatus](../types/ChatMemberStatus.md), \]) === [$Ok](../types/Ok.md) @@ -104,7 +104,7 @@ description: List of methods

$MadelineProto->[createNewChannelChat](createNewChannelChat.md)(\['title' => [string](../types/string.md), 'is_supergroup' => [Bool](../types/Bool.md), 'about' => [string](../types/string.md), \]) === [$Chat](../types/Chat.md) *** -

$MadelineProto->[createNewGroupChat](createNewGroupChat.md)(\['user_ids' => \[[int](../constructors/int.md)\], 'title' => [string](../types/string.md), \]) === [$Chat](../types/Chat.md) +

$MadelineProto->[createNewGroupChat](createNewGroupChat.md)(\['user_ids' => \[[int](../types/int.md)\], 'title' => [string](../types/string.md), \]) === [$Chat](../types/Chat.md) ***

$MadelineProto->[createNewSecretChat](createNewSecretChat.md)(\['user_id' => [int](../types/int.md), \]) === [$Chat](../types/Chat.md) @@ -128,10 +128,10 @@ description: List of methods

$MadelineProto->[deleteChatReplyMarkup](deleteChatReplyMarkup.md)(\['chat_id' => [InputPeer](../types/InputPeer.md), 'message_id' => [long](../types/long.md), \]) === [$Ok](../types/Ok.md) *** -

$MadelineProto->[deleteContacts](deleteContacts.md)(\['user_ids' => \[[int](../constructors/int.md)\], \]) === [$Ok](../types/Ok.md) +

$MadelineProto->[deleteContacts](deleteContacts.md)(\['user_ids' => \[[int](../types/int.md)\], \]) === [$Ok](../types/Ok.md) *** -

$MadelineProto->[deleteMessages](deleteMessages.md)(\['chat_id' => [InputPeer](../types/InputPeer.md), 'message_ids' => \[[long](../constructors/long.md)\], \]) === [$Ok](../types/Ok.md) +

$MadelineProto->[deleteMessages](deleteMessages.md)(\['chat_id' => [InputPeer](../types/InputPeer.md), 'message_ids' => \[[long](../types/long.md)\], \]) === [$Ok](../types/Ok.md) ***

$MadelineProto->[deleteMessagesFromUser](deleteMessagesFromUser.md)(\['chat_id' => [InputPeer](../types/InputPeer.md), 'user_id' => [int](../types/int.md), \]) === [$Ok](../types/Ok.md) @@ -179,7 +179,7 @@ description: List of methods

$MadelineProto->[finishFileGeneration](finishFileGeneration.md)(\['generation_id' => [long](../types/long.md), \]) === [$Ok](../types/Ok.md) *** -

$MadelineProto->[forwardMessages](forwardMessages.md)(\['chat_id' => [InputPeer](../types/InputPeer.md), 'from_chat_id' => [long](../types/long.md), 'message_ids' => \[[long](../constructors/long.md)\], 'disable_notification' => [Bool](../types/Bool.md), 'from_background' => [Bool](../types/Bool.md), \]) === [$Messages](../types/Messages.md) +

$MadelineProto->[forwardMessages](forwardMessages.md)(\['chat_id' => [InputPeer](../types/InputPeer.md), 'from_chat_id' => [long](../types/long.md), 'message_ids' => \[[long](../types/long.md)\], 'disable_notification' => [Bool](../types/Bool.md), 'from_background' => [Bool](../types/Bool.md), \]) === [$Messages](../types/Messages.md) ***

$MadelineProto->[getAccountTtl](getAccountTtl.md)(\[\]) === [$AccountTtl](../types/AccountTtl.md) @@ -254,7 +254,7 @@ description: List of methods

$MadelineProto->[getInlineGameHighScores](getInlineGameHighScores.md)(\['inline_message_id' => [string](../types/string.md), 'user_id' => [int](../types/int.md), \]) === [$GameHighScores](../types/GameHighScores.md) *** -

$MadelineProto->[getInlineQueryResults](getInlineQueryResults.md)(\['bot_user_id' => [int](../types/int.md), 'chat_id' => [InputPeer](../types/InputPeer.md), 'user_location' => [location](../types/location.md), 'query' => [string](../types/string.md), 'offset' => [string](../types/string.md), \]) === [$InlineQueryResults](../types/InlineQueryResults.md) +

$MadelineProto->[getInlineQueryResults](getInlineQueryResults.md)(\['bot_user_id' => [int](../types/int.md), 'chat_id' => [InputPeer](../types/InputPeer.md), 'user_location' => [location](../constructors/location.md), 'query' => [string](../types/string.md), 'offset' => [string](../types/string.md), \]) === [$InlineQueryResults](../types/InlineQueryResults.md) ***

$MadelineProto->[getMe](getMe.md)(\[\]) === [$User](../types/User.md) @@ -263,7 +263,7 @@ description: List of methods

$MadelineProto->[getMessage](getMessage.md)(\['chat_id' => [InputPeer](../types/InputPeer.md), 'message_id' => [long](../types/long.md), \]) === [$Message](../types/Message.md) *** -

$MadelineProto->[getMessages](getMessages.md)(\['chat_id' => [InputPeer](../types/InputPeer.md), 'message_ids' => \[[long](../constructors/long.md)\], \]) === [$Messages](../types/Messages.md) +

$MadelineProto->[getMessages](getMessages.md)(\['chat_id' => [InputPeer](../types/InputPeer.md), 'message_ids' => \[[long](../types/long.md)\], \]) === [$Messages](../types/Messages.md) ***

$MadelineProto->[getNotificationSettings](getNotificationSettings.md)(\['scope' => [NotificationSettingsScope](../types/NotificationSettingsScope.md), \]) === [$NotificationSettings](../types/NotificationSettings.md) @@ -353,10 +353,10 @@ description: List of methods

$MadelineProto->[registerDevice](registerDevice.md)(\['device_token' => [DeviceToken](../types/DeviceToken.md), \]) === [$Ok](../types/Ok.md) *** -

$MadelineProto->[reorderStickerSets](reorderStickerSets.md)(\['is_masks' => [Bool](../types/Bool.md), 'sticker_set_ids' => \[[long](../constructors/long.md)\], \]) === [$Ok](../types/Ok.md) +

$MadelineProto->[reorderStickerSets](reorderStickerSets.md)(\['is_masks' => [Bool](../types/Bool.md), 'sticker_set_ids' => \[[long](../types/long.md)\], \]) === [$Ok](../types/Ok.md) *** -

$MadelineProto->[reportChannelSpam](reportChannelSpam.md)(\['channel_id' => [int](../types/int.md), 'user_id' => [int](../types/int.md), 'message_ids' => \[[long](../constructors/long.md)\], \]) === [$Ok](../types/Ok.md) +

$MadelineProto->[reportChannelSpam](reportChannelSpam.md)(\['channel_id' => [int](../types/int.md), 'user_id' => [int](../types/int.md), 'message_ids' => \[[long](../types/long.md)\], \]) === [$Ok](../types/Ok.md) ***

$MadelineProto->[requestAuthPasswordRecovery](requestAuthPasswordRecovery.md)(\[\]) === [$AuthState](../types/AuthState.md) @@ -434,7 +434,7 @@ description: List of methods

$MadelineProto->[setInlineGameScore](setInlineGameScore.md)(\['inline_message_id' => [string](../types/string.md), 'edit_message' => [Bool](../types/Bool.md), 'user_id' => [int](../types/int.md), 'score' => [int](../types/int.md), 'force' => [Bool](../types/Bool.md), \]) === [$Ok](../types/Ok.md) *** -

$MadelineProto->[setNotificationSettings](setNotificationSettings.md)(\['scope' => [NotificationSettingsScope](../types/NotificationSettingsScope.md), 'notification_settings' => [notificationSettings](../types/notificationSettings.md), \]) === [$Ok](../types/Ok.md) +

$MadelineProto->[setNotificationSettings](setNotificationSettings.md)(\['scope' => [NotificationSettingsScope](../types/NotificationSettingsScope.md), 'notification_settings' => [notificationSettings](../constructors/notificationSettings.md), \]) === [$Ok](../types/Ok.md) ***

$MadelineProto->[setOption](setOption.md)(\['name' => [string](../types/string.md), 'value' => [OptionValue](../types/OptionValue.md), \]) === [$Ok](../types/Ok.md) @@ -443,7 +443,7 @@ description: List of methods

$MadelineProto->[setPassword](setPassword.md)(\['old_password' => [string](../types/string.md), 'new_password' => [string](../types/string.md), 'new_hint' => [string](../types/string.md), 'set_recovery_email' => [Bool](../types/Bool.md), 'new_recovery_email' => [string](../types/string.md), \]) === [$PasswordState](../types/PasswordState.md) *** -

$MadelineProto->[setPrivacy](setPrivacy.md)(\['key' => [PrivacyKey](../types/PrivacyKey.md), 'rules' => [privacyRules](../types/privacyRules.md), \]) === [$Ok](../types/Ok.md) +

$MadelineProto->[setPrivacy](setPrivacy.md)(\['key' => [PrivacyKey](../types/PrivacyKey.md), 'rules' => [privacyRules](../constructors/privacyRules.md), \]) === [$Ok](../types/Ok.md) ***

$MadelineProto->[setProfilePhoto](setProfilePhoto.md)(\['photo_path' => [string](../types/string.md), \]) === [$Ok](../types/Ok.md) @@ -497,8 +497,8 @@ $MadelineProto->[test->testNet](test_testNet.md)(\[\]) === [$test\_Empty](../typ

$MadelineProto->[updateStickerSet](updateStickerSet.md)(\['set_id' => [long](../types/long.md), 'is_installed' => [Bool](../types/Bool.md), 'is_archived' => [Bool](../types/Bool.md), \]) === [$Ok](../types/Ok.md) *** -

$MadelineProto->[viewMessages](viewMessages.md)(\['chat_id' => [InputPeer](../types/InputPeer.md), 'message_ids' => \[[long](../constructors/long.md)\], \]) === [$Ok](../types/Ok.md) +

$MadelineProto->[viewMessages](viewMessages.md)(\['chat_id' => [InputPeer](../types/InputPeer.md), 'message_ids' => \[[long](../types/long.md)\], \]) === [$Ok](../types/Ok.md) *** -

$MadelineProto->[viewTrendingStickerSets](viewTrendingStickerSets.md)(\['sticker_set_ids' => \[[long](../constructors/long.md)\], \]) === [$Ok](../types/Ok.md) +

$MadelineProto->[viewTrendingStickerSets](viewTrendingStickerSets.md)(\['sticker_set_ids' => \[[long](../types/long.md)\], \]) === [$Ok](../types/Ok.md) diff --git a/docs/index.md b/docs/index.md index bd32ec1b..e749c1dc 100644 --- a/docs/index.md +++ b/docs/index.md @@ -1,3 +1,7 @@ +--- +title: MadelineProto documentation +description: PHP implementation of telegram's MTProto protocol +--- # MadelineProto [![StyleCI](https://styleci.io/repos/61838413/shield)](https://styleci.io/repos/61838413) [![Build Status](https://travis-ci.org/danog/MadelineProto.svg?branch=master)](https://travis-ci.org/danog/MadelineProto) diff --git a/old_docs/API_docs_v18/constructors/README.md b/old_docs/API_docs_v18/constructors/README.md index b5a89d24..b6d9f023 100644 --- a/old_docs/API_docs_v18/constructors/README.md +++ b/old_docs/API_docs_v18/constructors/README.md @@ -4,9 +4,6 @@ description: List of constructors --- # Constructors [Back to API documentation index](..) - - - ***

[$audio](../constructors/audio.md) = \['id' => [long](../types/long.md), 'access_hash' => [long](../types/long.md), 'user_id' => [int](../types/int.md), 'date' => [int](../types/int.md), 'duration' => [int](../types/int.md), 'mime_type' => [string](../types/string.md), 'size' => [int](../types/int.md), 'dc_id' => [int](../types/int.md), \]; diff --git a/old_docs/API_docs_v18/methods/auth_logOut.md b/old_docs/API_docs_v18/methods/auth_logOut.md index 12159bab..7d5bb3f7 100644 --- a/old_docs/API_docs_v18/methods/auth_logOut.md +++ b/old_docs/API_docs_v18/methods/auth_logOut.md @@ -6,61 +6,8 @@ description: auth.logOut parameters, return type and example [Back to methods index](index.md) -*You cannot use this method directly, use the logout method instead (see https://daniil.it/MadelineProto for more info)* +**You cannot use this method directly, use the logout method instead (see https://daniil.it/MadelineProto for more info)** - - -### Return type: [Bool](../types/Bool.md) - -### Example: - - -``` -$MadelineProto = new \danog\MadelineProto\API(); -if (isset($token)) { // Login as a bot - $MadelineProto->bot_login($token); -} -if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } - $MadelineProto->complete_phone_login($code); -} - -$Bool = $MadelineProto->auth->logOut(); -``` - -Or, if you're using the [PWRTelegram HTTP API](https://pwrtelegram.xyz): - -### As a bot: - -POST/GET to `https://api.pwrtelegram.xyz/botTOKEN/madeline` - -Parameters: - -* method - auth.logOut -* params - `{}` - - - -### As a user: - -POST/GET to `https://api.pwrtelegram.xyz/userTOKEN/auth.logOut` - -Parameters: - - - - -Or, if you're into Lua: - -``` -Bool = auth.logOut({}) -``` - diff --git a/old_docs/API_docs_v18/methods/auth_sendCode.md b/old_docs/API_docs_v18/methods/auth_sendCode.md index 43bc28ee..22d1df94 100644 --- a/old_docs/API_docs_v18/methods/auth_sendCode.md +++ b/old_docs/API_docs_v18/methods/auth_sendCode.md @@ -6,75 +6,8 @@ description: auth.sendCode parameters, return type and example [Back to methods index](index.md) -*You cannot use this method directly, use the phone_login method instead (see https://daniil.it/MadelineProto for more info)* +**You cannot use this method directly, use the phone_login method instead (see https://daniil.it/MadelineProto for more info)** -### Parameters: - -| Name | Type | Required | -|----------|:-------------:|---------:| -|phone\_number|[string](../types/string.md) | Yes| -|sms\_type|[int](../types/int.md) | Yes| -|api\_id|[int](../types/int.md) | Yes| -|api\_hash|[string](../types/string.md) | Yes| -|lang\_code|[string](../types/string.md) | Yes| - - -### Return type: [auth\_SentCode](../types/auth_SentCode.md) - -### Example: - - -``` -$MadelineProto = new \danog\MadelineProto\API(); -if (isset($token)) { // Login as a bot - $MadelineProto->bot_login($token); -} -if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } - $MadelineProto->complete_phone_login($code); -} - -$auth_SentCode = $MadelineProto->auth->sendCode(['phone_number' => 'string', 'sms_type' => int, 'api_id' => int, 'api_hash' => 'string', 'lang_code' => 'string', ]); -``` - -Or, if you're using the [PWRTelegram HTTP API](https://pwrtelegram.xyz): - -### As a bot: - -POST/GET to `https://api.pwrtelegram.xyz/botTOKEN/madeline` - -Parameters: - -* method - auth.sendCode -* params - `{"phone_number": "string", "sms_type": int, "api_id": int, "api_hash": "string", "lang_code": "string", }` - - - -### As a user: - -POST/GET to `https://api.pwrtelegram.xyz/userTOKEN/auth.sendCode` - -Parameters: - -phone_number - Json encoded string -sms_type - Json encoded int -api_id - Json encoded int -api_hash - Json encoded string -lang_code - Json encoded string - - - -Or, if you're into Lua: - -``` -auth_SentCode = auth.sendCode({phone_number='string', sms_type=int, api_id=int, api_hash='string', lang_code='string', }) -``` - diff --git a/old_docs/API_docs_v18/methods/auth_signIn.md b/old_docs/API_docs_v18/methods/auth_signIn.md index 75c50d70..ab40bb4d 100644 --- a/old_docs/API_docs_v18/methods/auth_signIn.md +++ b/old_docs/API_docs_v18/methods/auth_signIn.md @@ -6,71 +6,8 @@ description: auth.signIn parameters, return type and example [Back to methods index](index.md) -*You cannot use this method directly, use the complete_phone_login method instead (see https://daniil.it/MadelineProto for more info)* +**You cannot use this method directly, use the complete_phone_login method instead (see https://daniil.it/MadelineProto for more info)** -### Parameters: - -| Name | Type | Required | -|----------|:-------------:|---------:| -|phone\_number|[string](../types/string.md) | Yes| -|phone\_code\_hash|[string](../types/string.md) | Yes| -|phone\_code|[string](../types/string.md) | Yes| - - -### Return type: [auth\_Authorization](../types/auth_Authorization.md) - -### Example: - - -``` -$MadelineProto = new \danog\MadelineProto\API(); -if (isset($token)) { // Login as a bot - $MadelineProto->bot_login($token); -} -if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } - $MadelineProto->complete_phone_login($code); -} - -$auth_Authorization = $MadelineProto->auth->signIn(['phone_number' => 'string', 'phone_code_hash' => 'string', 'phone_code' => 'string', ]); -``` - -Or, if you're using the [PWRTelegram HTTP API](https://pwrtelegram.xyz): - -### As a bot: - -POST/GET to `https://api.pwrtelegram.xyz/botTOKEN/madeline` - -Parameters: - -* method - auth.signIn -* params - `{"phone_number": "string", "phone_code_hash": "string", "phone_code": "string", }` - - - -### As a user: - -POST/GET to `https://api.pwrtelegram.xyz/userTOKEN/auth.signIn` - -Parameters: - -phone_number - Json encoded string -phone_code_hash - Json encoded string -phone_code - Json encoded string - - - -Or, if you're into Lua: - -``` -auth_Authorization = auth.signIn({phone_number='string', phone_code_hash='string', phone_code='string', }) -``` - diff --git a/old_docs/API_docs_v18/methods/auth_signUp.md b/old_docs/API_docs_v18/methods/auth_signUp.md index f2a72b68..042d1191 100644 --- a/old_docs/API_docs_v18/methods/auth_signUp.md +++ b/old_docs/API_docs_v18/methods/auth_signUp.md @@ -6,75 +6,8 @@ description: auth.signUp parameters, return type and example [Back to methods index](index.md) -*You cannot use this method directly, use the complete_signup method instead (see https://daniil.it/MadelineProto for more info)* +**You cannot use this method directly, use the complete_signup method instead (see https://daniil.it/MadelineProto for more info)** -### Parameters: - -| Name | Type | Required | -|----------|:-------------:|---------:| -|phone\_number|[string](../types/string.md) | Yes| -|phone\_code\_hash|[string](../types/string.md) | Yes| -|phone\_code|[string](../types/string.md) | Yes| -|first\_name|[string](../types/string.md) | Yes| -|last\_name|[string](../types/string.md) | Yes| - - -### Return type: [auth\_Authorization](../types/auth_Authorization.md) - -### Example: - - -``` -$MadelineProto = new \danog\MadelineProto\API(); -if (isset($token)) { // Login as a bot - $MadelineProto->bot_login($token); -} -if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } - $MadelineProto->complete_phone_login($code); -} - -$auth_Authorization = $MadelineProto->auth->signUp(['phone_number' => 'string', 'phone_code_hash' => 'string', 'phone_code' => 'string', 'first_name' => 'string', 'last_name' => 'string', ]); -``` - -Or, if you're using the [PWRTelegram HTTP API](https://pwrtelegram.xyz): - -### As a bot: - -POST/GET to `https://api.pwrtelegram.xyz/botTOKEN/madeline` - -Parameters: - -* method - auth.signUp -* params - `{"phone_number": "string", "phone_code_hash": "string", "phone_code": "string", "first_name": "string", "last_name": "string", }` - - - -### As a user: - -POST/GET to `https://api.pwrtelegram.xyz/userTOKEN/auth.signUp` - -Parameters: - -phone_number - Json encoded string -phone_code_hash - Json encoded string -phone_code - Json encoded string -first_name - Json encoded string -last_name - Json encoded string - - - -Or, if you're into Lua: - -``` -auth_Authorization = auth.signUp({phone_number='string', phone_code_hash='string', phone_code='string', first_name='string', last_name='string', }) -``` - diff --git a/old_docs/API_docs_v18/methods/messages_acceptEncryption.md b/old_docs/API_docs_v18/methods/messages_acceptEncryption.md index 548087b6..243c4c00 100644 --- a/old_docs/API_docs_v18/methods/messages_acceptEncryption.md +++ b/old_docs/API_docs_v18/methods/messages_acceptEncryption.md @@ -6,71 +6,8 @@ description: messages.acceptEncryption parameters, return type and example [Back to methods index](index.md) -*You cannot use this method directly, see https://daniil.it/MadelineProto for more info on handling secret chats* +**You cannot use this method directly, see https://daniil.it/MadelineProto for more info on handling secret chats** -### Parameters: - -| Name | Type | Required | -|----------|:-------------:|---------:| -|peer|[InputEncryptedChat](../types/InputEncryptedChat.md) | Yes| -|g\_b|[bytes](../types/bytes.md) | Yes| -|key\_fingerprint|[long](../types/long.md) | Yes| - - -### Return type: [EncryptedChat](../types/EncryptedChat.md) - -### Example: - - -``` -$MadelineProto = new \danog\MadelineProto\API(); -if (isset($token)) { // Login as a bot - $MadelineProto->bot_login($token); -} -if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } - $MadelineProto->complete_phone_login($code); -} - -$EncryptedChat = $MadelineProto->messages->acceptEncryption(['peer' => InputEncryptedChat, 'g_b' => 'bytes', 'key_fingerprint' => long, ]); -``` - -Or, if you're using the [PWRTelegram HTTP API](https://pwrtelegram.xyz): - -### As a bot: - -POST/GET to `https://api.pwrtelegram.xyz/botTOKEN/madeline` - -Parameters: - -* method - messages.acceptEncryption -* params - `{"peer": InputEncryptedChat, "g_b": "bytes", "key_fingerprint": long, }` - - - -### As a user: - -POST/GET to `https://api.pwrtelegram.xyz/userTOKEN/messages.acceptEncryption` - -Parameters: - -peer - Json encoded InputEncryptedChat -g_b - Json encoded bytes -key_fingerprint - Json encoded long - - - -Or, if you're into Lua: - -``` -EncryptedChat = messages.acceptEncryption({peer=InputEncryptedChat, g_b='bytes', key_fingerprint=long, }) -``` - diff --git a/old_docs/API_docs_v18/methods/messages_discardEncryption.md b/old_docs/API_docs_v18/methods/messages_discardEncryption.md index 72648e9d..3a9dc58b 100644 --- a/old_docs/API_docs_v18/methods/messages_discardEncryption.md +++ b/old_docs/API_docs_v18/methods/messages_discardEncryption.md @@ -6,67 +6,8 @@ description: messages.discardEncryption parameters, return type and example [Back to methods index](index.md) -*You cannot use this method directly, see https://daniil.it/MadelineProto for more info on handling secret chats* +**You cannot use this method directly, see https://daniil.it/MadelineProto for more info on handling secret chats** -### Parameters: - -| Name | Type | Required | -|----------|:-------------:|---------:| -|chat\_id|[int](../types/int.md) | Yes| - - -### Return type: [Bool](../types/Bool.md) - -### Example: - - -``` -$MadelineProto = new \danog\MadelineProto\API(); -if (isset($token)) { // Login as a bot - $MadelineProto->bot_login($token); -} -if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } - $MadelineProto->complete_phone_login($code); -} - -$Bool = $MadelineProto->messages->discardEncryption(['chat_id' => int, ]); -``` - -Or, if you're using the [PWRTelegram HTTP API](https://pwrtelegram.xyz): - -### As a bot: - -POST/GET to `https://api.pwrtelegram.xyz/botTOKEN/madeline` - -Parameters: - -* method - messages.discardEncryption -* params - `{"chat_id": int, }` - - - -### As a user: - -POST/GET to `https://api.pwrtelegram.xyz/userTOKEN/messages.discardEncryption` - -Parameters: - -chat_id - Json encoded int - - - -Or, if you're into Lua: - -``` -Bool = messages.discardEncryption({chat_id=int, }) -``` - diff --git a/old_docs/API_docs_v18/methods/messages_getFullChat.md b/old_docs/API_docs_v18/methods/messages_getFullChat.md index 62102b64..ffa9c281 100644 --- a/old_docs/API_docs_v18/methods/messages_getFullChat.md +++ b/old_docs/API_docs_v18/methods/messages_getFullChat.md @@ -6,67 +6,8 @@ description: messages.getFullChat parameters, return type and example [Back to methods index](index.md) -*You cannot use this method directly, use the get_pwr_chat, get_info, get_full_info methods instead (see https://daniil.it/MadelineProto for more info)* +**You cannot use this method directly, use the get_pwr_chat, get_info, get_full_info methods instead (see https://daniil.it/MadelineProto for more info)** -### Parameters: - -| Name | Type | Required | -|----------|:-------------:|---------:| -|chat\_id|[InputPeer](../types/InputPeer.md) | Yes| - - -### Return type: [messages\_ChatFull](../types/messages_ChatFull.md) - -### Example: - - -``` -$MadelineProto = new \danog\MadelineProto\API(); -if (isset($token)) { // Login as a bot - $MadelineProto->bot_login($token); -} -if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } - $MadelineProto->complete_phone_login($code); -} - -$messages_ChatFull = $MadelineProto->messages->getFullChat(['chat_id' => InputPeer, ]); -``` - -Or, if you're using the [PWRTelegram HTTP API](https://pwrtelegram.xyz): - -### As a bot: - -POST/GET to `https://api.pwrtelegram.xyz/botTOKEN/madeline` - -Parameters: - -* method - messages.getFullChat -* params - `{"chat_id": InputPeer, }` - - - -### As a user: - -POST/GET to `https://api.pwrtelegram.xyz/userTOKEN/messages.getFullChat` - -Parameters: - -chat_id - Json encoded InputPeer - - - -Or, if you're into Lua: - -``` -messages_ChatFull = messages.getFullChat({chat_id=InputPeer, }) -``` - diff --git a/old_docs/API_docs_v18/methods/messages_requestEncryption.md b/old_docs/API_docs_v18/methods/messages_requestEncryption.md index 2fd1f825..c8476667 100644 --- a/old_docs/API_docs_v18/methods/messages_requestEncryption.md +++ b/old_docs/API_docs_v18/methods/messages_requestEncryption.md @@ -6,69 +6,8 @@ description: messages.requestEncryption parameters, return type and example [Back to methods index](index.md) -*You cannot use this method directly, see https://daniil.it/MadelineProto for more info on handling secret chats* +**You cannot use this method directly, see https://daniil.it/MadelineProto for more info on handling secret chats** -### Parameters: - -| Name | Type | Required | -|----------|:-------------:|---------:| -|user\_id|[InputUser](../types/InputUser.md) | Yes| -|g\_a|[bytes](../types/bytes.md) | Yes| - - -### Return type: [EncryptedChat](../types/EncryptedChat.md) - -### Example: - - -``` -$MadelineProto = new \danog\MadelineProto\API(); -if (isset($token)) { // Login as a bot - $MadelineProto->bot_login($token); -} -if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } - $MadelineProto->complete_phone_login($code); -} - -$EncryptedChat = $MadelineProto->messages->requestEncryption(['user_id' => InputUser, 'g_a' => 'bytes', ]); -``` - -Or, if you're using the [PWRTelegram HTTP API](https://pwrtelegram.xyz): - -### As a bot: - -POST/GET to `https://api.pwrtelegram.xyz/botTOKEN/madeline` - -Parameters: - -* method - messages.requestEncryption -* params - `{"user_id": InputUser, "g_a": "bytes", }` - - - -### As a user: - -POST/GET to `https://api.pwrtelegram.xyz/userTOKEN/messages.requestEncryption` - -Parameters: - -user_id - Json encoded InputUser -g_a - Json encoded bytes - - - -Or, if you're into Lua: - -``` -EncryptedChat = messages.requestEncryption({user_id=InputUser, g_a='bytes', }) -``` - diff --git a/old_docs/API_docs_v18/methods/updates_getDifference.md b/old_docs/API_docs_v18/methods/updates_getDifference.md index 53c7b078..9bcee79a 100644 --- a/old_docs/API_docs_v18/methods/updates_getDifference.md +++ b/old_docs/API_docs_v18/methods/updates_getDifference.md @@ -6,71 +6,8 @@ description: updates.getDifference parameters, return type and example [Back to methods index](index.md) -*You cannot use this method directly, see https://daniil.it/MadelineProto for more info on handling updates* +**You cannot use this method directly, see https://daniil.it/MadelineProto for more info on handling updates** -### Parameters: - -| Name | Type | Required | -|----------|:-------------:|---------:| -|pts|[int](../types/int.md) | Yes| -|date|[int](../types/int.md) | Yes| -|qts|[int](../types/int.md) | Yes| - - -### Return type: [updates\_Difference](../types/updates_Difference.md) - -### Example: - - -``` -$MadelineProto = new \danog\MadelineProto\API(); -if (isset($token)) { // Login as a bot - $MadelineProto->bot_login($token); -} -if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } - $MadelineProto->complete_phone_login($code); -} - -$updates_Difference = $MadelineProto->updates->getDifference(['pts' => int, 'date' => int, 'qts' => int, ]); -``` - -Or, if you're using the [PWRTelegram HTTP API](https://pwrtelegram.xyz): - -### As a bot: - -POST/GET to `https://api.pwrtelegram.xyz/botTOKEN/madeline` - -Parameters: - -* method - updates.getDifference -* params - `{"pts": int, "date": int, "qts": int, }` - - - -### As a user: - -POST/GET to `https://api.pwrtelegram.xyz/userTOKEN/updates.getDifference` - -Parameters: - -pts - Json encoded int -date - Json encoded int -qts - Json encoded int - - - -Or, if you're into Lua: - -``` -updates_Difference = updates.getDifference({pts=int, date=int, qts=int, }) -``` - diff --git a/old_docs/API_docs_v18/methods/updates_getState.md b/old_docs/API_docs_v18/methods/updates_getState.md index 51f6ae80..fd5955ba 100644 --- a/old_docs/API_docs_v18/methods/updates_getState.md +++ b/old_docs/API_docs_v18/methods/updates_getState.md @@ -6,61 +6,8 @@ description: updates.getState parameters, return type and example [Back to methods index](index.md) -*You cannot use this method directly, see https://daniil.it/MadelineProto for more info on handling updates* +**You cannot use this method directly, see https://daniil.it/MadelineProto for more info on handling updates** - - -### Return type: [updates\_State](../types/updates_State.md) - -### Example: - - -``` -$MadelineProto = new \danog\MadelineProto\API(); -if (isset($token)) { // Login as a bot - $MadelineProto->bot_login($token); -} -if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } - $MadelineProto->complete_phone_login($code); -} - -$updates_State = $MadelineProto->updates->getState(); -``` - -Or, if you're using the [PWRTelegram HTTP API](https://pwrtelegram.xyz): - -### As a bot: - -POST/GET to `https://api.pwrtelegram.xyz/botTOKEN/madeline` - -Parameters: - -* method - updates.getState -* params - `{}` - - - -### As a user: - -POST/GET to `https://api.pwrtelegram.xyz/userTOKEN/updates.getState` - -Parameters: - - - - -Or, if you're into Lua: - -``` -updates_State = updates.getState({}) -``` - diff --git a/old_docs/API_docs_v18/methods/upload_getFile.md b/old_docs/API_docs_v18/methods/upload_getFile.md index a1003003..add7d54e 100644 --- a/old_docs/API_docs_v18/methods/upload_getFile.md +++ b/old_docs/API_docs_v18/methods/upload_getFile.md @@ -6,71 +6,8 @@ description: upload.getFile parameters, return type and example [Back to methods index](index.md) -*You cannot use this method directly, use the upload, download_to_stream, download_to_file, download_to_dir methods instead; see https://daniil.it/MadelineProto for more info* +**You cannot use this method directly, use the upload, download_to_stream, download_to_file, download_to_dir methods instead; see https://daniil.it/MadelineProto for more info** -### Parameters: - -| Name | Type | Required | -|----------|:-------------:|---------:| -|location|[InputFileLocation](../types/InputFileLocation.md) | Yes| -|offset|[int](../types/int.md) | Yes| -|limit|[int](../types/int.md) | Yes| - - -### Return type: [upload\_File](../types/upload_File.md) - -### Example: - - -``` -$MadelineProto = new \danog\MadelineProto\API(); -if (isset($token)) { // Login as a bot - $MadelineProto->bot_login($token); -} -if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } - $MadelineProto->complete_phone_login($code); -} - -$upload_File = $MadelineProto->upload->getFile(['location' => InputFileLocation, 'offset' => int, 'limit' => int, ]); -``` - -Or, if you're using the [PWRTelegram HTTP API](https://pwrtelegram.xyz): - -### As a bot: - -POST/GET to `https://api.pwrtelegram.xyz/botTOKEN/madeline` - -Parameters: - -* method - upload.getFile -* params - `{"location": InputFileLocation, "offset": int, "limit": int, }` - - - -### As a user: - -POST/GET to `https://api.pwrtelegram.xyz/userTOKEN/upload.getFile` - -Parameters: - -location - Json encoded InputFileLocation -offset - Json encoded int -limit - Json encoded int - - - -Or, if you're into Lua: - -``` -upload_File = upload.getFile({location=InputFileLocation, offset=int, limit=int, }) -``` - diff --git a/old_docs/API_docs_v18/methods/upload_saveBigFilePart.md b/old_docs/API_docs_v18/methods/upload_saveBigFilePart.md index e5c96d89..b1c3ea28 100644 --- a/old_docs/API_docs_v18/methods/upload_saveBigFilePart.md +++ b/old_docs/API_docs_v18/methods/upload_saveBigFilePart.md @@ -6,73 +6,8 @@ description: upload.saveBigFilePart parameters, return type and example [Back to methods index](index.md) -*You cannot use this method directly, use the upload, download_to_stream, download_to_file, download_to_dir methods instead; see https://daniil.it/MadelineProto for more info* +**You cannot use this method directly, use the upload, download_to_stream, download_to_file, download_to_dir methods instead; see https://daniil.it/MadelineProto for more info** -### Parameters: - -| Name | Type | Required | -|----------|:-------------:|---------:| -|file\_id|[long](../types/long.md) | Yes| -|file\_part|[int](../types/int.md) | Yes| -|file\_total\_parts|[int](../types/int.md) | Yes| -|bytes|[bytes](../types/bytes.md) | Yes| - - -### Return type: [Bool](../types/Bool.md) - -### Example: - - -``` -$MadelineProto = new \danog\MadelineProto\API(); -if (isset($token)) { // Login as a bot - $MadelineProto->bot_login($token); -} -if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } - $MadelineProto->complete_phone_login($code); -} - -$Bool = $MadelineProto->upload->saveBigFilePart(['file_id' => long, 'file_part' => int, 'file_total_parts' => int, 'bytes' => 'bytes', ]); -``` - -Or, if you're using the [PWRTelegram HTTP API](https://pwrtelegram.xyz): - -### As a bot: - -POST/GET to `https://api.pwrtelegram.xyz/botTOKEN/madeline` - -Parameters: - -* method - upload.saveBigFilePart -* params - `{"file_id": long, "file_part": int, "file_total_parts": int, "bytes": "bytes", }` - - - -### As a user: - -POST/GET to `https://api.pwrtelegram.xyz/userTOKEN/upload.saveBigFilePart` - -Parameters: - -file_id - Json encoded long -file_part - Json encoded int -file_total_parts - Json encoded int -bytes - Json encoded bytes - - - -Or, if you're into Lua: - -``` -Bool = upload.saveBigFilePart({file_id=long, file_part=int, file_total_parts=int, bytes='bytes', }) -``` - diff --git a/old_docs/API_docs_v18/methods/upload_saveFilePart.md b/old_docs/API_docs_v18/methods/upload_saveFilePart.md index 1c16e4b2..c482f321 100644 --- a/old_docs/API_docs_v18/methods/upload_saveFilePart.md +++ b/old_docs/API_docs_v18/methods/upload_saveFilePart.md @@ -6,71 +6,8 @@ description: upload.saveFilePart parameters, return type and example [Back to methods index](index.md) -*You cannot use this method directly, use the upload, download_to_stream, download_to_file, download_to_dir methods instead; see https://daniil.it/MadelineProto for more info* +**You cannot use this method directly, use the upload, download_to_stream, download_to_file, download_to_dir methods instead; see https://daniil.it/MadelineProto for more info** -### Parameters: - -| Name | Type | Required | -|----------|:-------------:|---------:| -|file\_id|[long](../types/long.md) | Yes| -|file\_part|[int](../types/int.md) | Yes| -|bytes|[bytes](../types/bytes.md) | Yes| - - -### Return type: [Bool](../types/Bool.md) - -### Example: - - -``` -$MadelineProto = new \danog\MadelineProto\API(); -if (isset($token)) { // Login as a bot - $MadelineProto->bot_login($token); -} -if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } - $MadelineProto->complete_phone_login($code); -} - -$Bool = $MadelineProto->upload->saveFilePart(['file_id' => long, 'file_part' => int, 'bytes' => 'bytes', ]); -``` - -Or, if you're using the [PWRTelegram HTTP API](https://pwrtelegram.xyz): - -### As a bot: - -POST/GET to `https://api.pwrtelegram.xyz/botTOKEN/madeline` - -Parameters: - -* method - upload.saveFilePart -* params - `{"file_id": long, "file_part": int, "bytes": "bytes", }` - - - -### As a user: - -POST/GET to `https://api.pwrtelegram.xyz/userTOKEN/upload.saveFilePart` - -Parameters: - -file_id - Json encoded long -file_part - Json encoded int -bytes - Json encoded bytes - - - -Or, if you're into Lua: - -``` -Bool = upload.saveFilePart({file_id=long, file_part=int, bytes='bytes', }) -``` - diff --git a/old_docs/API_docs_v18/methods/users_getFullUser.md b/old_docs/API_docs_v18/methods/users_getFullUser.md index 645ab12e..4ec831ec 100644 --- a/old_docs/API_docs_v18/methods/users_getFullUser.md +++ b/old_docs/API_docs_v18/methods/users_getFullUser.md @@ -6,67 +6,8 @@ description: users.getFullUser parameters, return type and example [Back to methods index](index.md) -*You cannot use this method directly, use the get_pwr_chat, get_info, get_full_info methods instead (see https://daniil.it/MadelineProto for more info)* +**You cannot use this method directly, use the get_pwr_chat, get_info, get_full_info methods instead (see https://daniil.it/MadelineProto for more info)** -### Parameters: - -| Name | Type | Required | -|----------|:-------------:|---------:| -|id|[InputUser](../types/InputUser.md) | Yes| - - -### Return type: [UserFull](../types/UserFull.md) - -### Example: - - -``` -$MadelineProto = new \danog\MadelineProto\API(); -if (isset($token)) { // Login as a bot - $MadelineProto->bot_login($token); -} -if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } - $MadelineProto->complete_phone_login($code); -} - -$UserFull = $MadelineProto->users->getFullUser(['id' => InputUser, ]); -``` - -Or, if you're using the [PWRTelegram HTTP API](https://pwrtelegram.xyz): - -### As a bot: - -POST/GET to `https://api.pwrtelegram.xyz/botTOKEN/madeline` - -Parameters: - -* method - users.getFullUser -* params - `{"id": InputUser, }` - - - -### As a user: - -POST/GET to `https://api.pwrtelegram.xyz/userTOKEN/users.getFullUser` - -Parameters: - -id - Json encoded InputUser - - - -Or, if you're into Lua: - -``` -UserFull = users.getFullUser({id=InputUser, }) -``` - diff --git a/old_docs/API_docs_v23/constructors/README.md b/old_docs/API_docs_v23/constructors/README.md index a45413a7..d01d732c 100644 --- a/old_docs/API_docs_v23/constructors/README.md +++ b/old_docs/API_docs_v23/constructors/README.md @@ -4,9 +4,6 @@ description: List of constructors --- # Constructors [Back to API documentation index](..) - - - ***

[$accountDaysTTL](../constructors/accountDaysTTL.md) = \['days' => [int](../types/int.md), \]; diff --git a/old_docs/API_docs_v23/methods/auth_logOut.md b/old_docs/API_docs_v23/methods/auth_logOut.md index 12159bab..7d5bb3f7 100644 --- a/old_docs/API_docs_v23/methods/auth_logOut.md +++ b/old_docs/API_docs_v23/methods/auth_logOut.md @@ -6,61 +6,8 @@ description: auth.logOut parameters, return type and example [Back to methods index](index.md) -*You cannot use this method directly, use the logout method instead (see https://daniil.it/MadelineProto for more info)* +**You cannot use this method directly, use the logout method instead (see https://daniil.it/MadelineProto for more info)** - - -### Return type: [Bool](../types/Bool.md) - -### Example: - - -``` -$MadelineProto = new \danog\MadelineProto\API(); -if (isset($token)) { // Login as a bot - $MadelineProto->bot_login($token); -} -if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } - $MadelineProto->complete_phone_login($code); -} - -$Bool = $MadelineProto->auth->logOut(); -``` - -Or, if you're using the [PWRTelegram HTTP API](https://pwrtelegram.xyz): - -### As a bot: - -POST/GET to `https://api.pwrtelegram.xyz/botTOKEN/madeline` - -Parameters: - -* method - auth.logOut -* params - `{}` - - - -### As a user: - -POST/GET to `https://api.pwrtelegram.xyz/userTOKEN/auth.logOut` - -Parameters: - - - - -Or, if you're into Lua: - -``` -Bool = auth.logOut({}) -``` - diff --git a/old_docs/API_docs_v23/methods/auth_sendCode.md b/old_docs/API_docs_v23/methods/auth_sendCode.md index 43bc28ee..22d1df94 100644 --- a/old_docs/API_docs_v23/methods/auth_sendCode.md +++ b/old_docs/API_docs_v23/methods/auth_sendCode.md @@ -6,75 +6,8 @@ description: auth.sendCode parameters, return type and example [Back to methods index](index.md) -*You cannot use this method directly, use the phone_login method instead (see https://daniil.it/MadelineProto for more info)* +**You cannot use this method directly, use the phone_login method instead (see https://daniil.it/MadelineProto for more info)** -### Parameters: - -| Name | Type | Required | -|----------|:-------------:|---------:| -|phone\_number|[string](../types/string.md) | Yes| -|sms\_type|[int](../types/int.md) | Yes| -|api\_id|[int](../types/int.md) | Yes| -|api\_hash|[string](../types/string.md) | Yes| -|lang\_code|[string](../types/string.md) | Yes| - - -### Return type: [auth\_SentCode](../types/auth_SentCode.md) - -### Example: - - -``` -$MadelineProto = new \danog\MadelineProto\API(); -if (isset($token)) { // Login as a bot - $MadelineProto->bot_login($token); -} -if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } - $MadelineProto->complete_phone_login($code); -} - -$auth_SentCode = $MadelineProto->auth->sendCode(['phone_number' => 'string', 'sms_type' => int, 'api_id' => int, 'api_hash' => 'string', 'lang_code' => 'string', ]); -``` - -Or, if you're using the [PWRTelegram HTTP API](https://pwrtelegram.xyz): - -### As a bot: - -POST/GET to `https://api.pwrtelegram.xyz/botTOKEN/madeline` - -Parameters: - -* method - auth.sendCode -* params - `{"phone_number": "string", "sms_type": int, "api_id": int, "api_hash": "string", "lang_code": "string", }` - - - -### As a user: - -POST/GET to `https://api.pwrtelegram.xyz/userTOKEN/auth.sendCode` - -Parameters: - -phone_number - Json encoded string -sms_type - Json encoded int -api_id - Json encoded int -api_hash - Json encoded string -lang_code - Json encoded string - - - -Or, if you're into Lua: - -``` -auth_SentCode = auth.sendCode({phone_number='string', sms_type=int, api_id=int, api_hash='string', lang_code='string', }) -``` - diff --git a/old_docs/API_docs_v23/methods/auth_signIn.md b/old_docs/API_docs_v23/methods/auth_signIn.md index 75c50d70..ab40bb4d 100644 --- a/old_docs/API_docs_v23/methods/auth_signIn.md +++ b/old_docs/API_docs_v23/methods/auth_signIn.md @@ -6,71 +6,8 @@ description: auth.signIn parameters, return type and example [Back to methods index](index.md) -*You cannot use this method directly, use the complete_phone_login method instead (see https://daniil.it/MadelineProto for more info)* +**You cannot use this method directly, use the complete_phone_login method instead (see https://daniil.it/MadelineProto for more info)** -### Parameters: - -| Name | Type | Required | -|----------|:-------------:|---------:| -|phone\_number|[string](../types/string.md) | Yes| -|phone\_code\_hash|[string](../types/string.md) | Yes| -|phone\_code|[string](../types/string.md) | Yes| - - -### Return type: [auth\_Authorization](../types/auth_Authorization.md) - -### Example: - - -``` -$MadelineProto = new \danog\MadelineProto\API(); -if (isset($token)) { // Login as a bot - $MadelineProto->bot_login($token); -} -if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } - $MadelineProto->complete_phone_login($code); -} - -$auth_Authorization = $MadelineProto->auth->signIn(['phone_number' => 'string', 'phone_code_hash' => 'string', 'phone_code' => 'string', ]); -``` - -Or, if you're using the [PWRTelegram HTTP API](https://pwrtelegram.xyz): - -### As a bot: - -POST/GET to `https://api.pwrtelegram.xyz/botTOKEN/madeline` - -Parameters: - -* method - auth.signIn -* params - `{"phone_number": "string", "phone_code_hash": "string", "phone_code": "string", }` - - - -### As a user: - -POST/GET to `https://api.pwrtelegram.xyz/userTOKEN/auth.signIn` - -Parameters: - -phone_number - Json encoded string -phone_code_hash - Json encoded string -phone_code - Json encoded string - - - -Or, if you're into Lua: - -``` -auth_Authorization = auth.signIn({phone_number='string', phone_code_hash='string', phone_code='string', }) -``` - diff --git a/old_docs/API_docs_v23/methods/auth_signUp.md b/old_docs/API_docs_v23/methods/auth_signUp.md index f2a72b68..042d1191 100644 --- a/old_docs/API_docs_v23/methods/auth_signUp.md +++ b/old_docs/API_docs_v23/methods/auth_signUp.md @@ -6,75 +6,8 @@ description: auth.signUp parameters, return type and example [Back to methods index](index.md) -*You cannot use this method directly, use the complete_signup method instead (see https://daniil.it/MadelineProto for more info)* +**You cannot use this method directly, use the complete_signup method instead (see https://daniil.it/MadelineProto for more info)** -### Parameters: - -| Name | Type | Required | -|----------|:-------------:|---------:| -|phone\_number|[string](../types/string.md) | Yes| -|phone\_code\_hash|[string](../types/string.md) | Yes| -|phone\_code|[string](../types/string.md) | Yes| -|first\_name|[string](../types/string.md) | Yes| -|last\_name|[string](../types/string.md) | Yes| - - -### Return type: [auth\_Authorization](../types/auth_Authorization.md) - -### Example: - - -``` -$MadelineProto = new \danog\MadelineProto\API(); -if (isset($token)) { // Login as a bot - $MadelineProto->bot_login($token); -} -if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } - $MadelineProto->complete_phone_login($code); -} - -$auth_Authorization = $MadelineProto->auth->signUp(['phone_number' => 'string', 'phone_code_hash' => 'string', 'phone_code' => 'string', 'first_name' => 'string', 'last_name' => 'string', ]); -``` - -Or, if you're using the [PWRTelegram HTTP API](https://pwrtelegram.xyz): - -### As a bot: - -POST/GET to `https://api.pwrtelegram.xyz/botTOKEN/madeline` - -Parameters: - -* method - auth.signUp -* params - `{"phone_number": "string", "phone_code_hash": "string", "phone_code": "string", "first_name": "string", "last_name": "string", }` - - - -### As a user: - -POST/GET to `https://api.pwrtelegram.xyz/userTOKEN/auth.signUp` - -Parameters: - -phone_number - Json encoded string -phone_code_hash - Json encoded string -phone_code - Json encoded string -first_name - Json encoded string -last_name - Json encoded string - - - -Or, if you're into Lua: - -``` -auth_Authorization = auth.signUp({phone_number='string', phone_code_hash='string', phone_code='string', first_name='string', last_name='string', }) -``` - diff --git a/old_docs/API_docs_v23/methods/contacts_resolveUsername.md b/old_docs/API_docs_v23/methods/contacts_resolveUsername.md index 353d1f0c..b665b382 100644 --- a/old_docs/API_docs_v23/methods/contacts_resolveUsername.md +++ b/old_docs/API_docs_v23/methods/contacts_resolveUsername.md @@ -6,67 +6,8 @@ description: contacts.resolveUsername parameters, return type and example [Back to methods index](index.md) -*You cannot use this method directly, use the resolve_username, get_pwr_chat, get_info, get_full_info methods instead (see https://daniil.it/MadelineProto for more info)* +**You cannot use this method directly, use the resolve_username, get_pwr_chat, get_info, get_full_info methods instead (see https://daniil.it/MadelineProto for more info)** -### Parameters: - -| Name | Type | Required | -|----------|:-------------:|---------:| -|username|[string](../types/string.md) | Yes| - - -### Return type: [User](../types/User.md) - -### Example: - - -``` -$MadelineProto = new \danog\MadelineProto\API(); -if (isset($token)) { // Login as a bot - $MadelineProto->bot_login($token); -} -if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } - $MadelineProto->complete_phone_login($code); -} - -$User = $MadelineProto->contacts->resolveUsername(['username' => 'string', ]); -``` - -Or, if you're using the [PWRTelegram HTTP API](https://pwrtelegram.xyz): - -### As a bot: - -POST/GET to `https://api.pwrtelegram.xyz/botTOKEN/madeline` - -Parameters: - -* method - contacts.resolveUsername -* params - `{"username": "string", }` - - - -### As a user: - -POST/GET to `https://api.pwrtelegram.xyz/userTOKEN/contacts.resolveUsername` - -Parameters: - -username - Json encoded string - - - -Or, if you're into Lua: - -``` -User = contacts.resolveUsername({username='string', }) -``` - diff --git a/old_docs/API_docs_v23/methods/messages_acceptEncryption.md b/old_docs/API_docs_v23/methods/messages_acceptEncryption.md index 548087b6..243c4c00 100644 --- a/old_docs/API_docs_v23/methods/messages_acceptEncryption.md +++ b/old_docs/API_docs_v23/methods/messages_acceptEncryption.md @@ -6,71 +6,8 @@ description: messages.acceptEncryption parameters, return type and example [Back to methods index](index.md) -*You cannot use this method directly, see https://daniil.it/MadelineProto for more info on handling secret chats* +**You cannot use this method directly, see https://daniil.it/MadelineProto for more info on handling secret chats** -### Parameters: - -| Name | Type | Required | -|----------|:-------------:|---------:| -|peer|[InputEncryptedChat](../types/InputEncryptedChat.md) | Yes| -|g\_b|[bytes](../types/bytes.md) | Yes| -|key\_fingerprint|[long](../types/long.md) | Yes| - - -### Return type: [EncryptedChat](../types/EncryptedChat.md) - -### Example: - - -``` -$MadelineProto = new \danog\MadelineProto\API(); -if (isset($token)) { // Login as a bot - $MadelineProto->bot_login($token); -} -if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } - $MadelineProto->complete_phone_login($code); -} - -$EncryptedChat = $MadelineProto->messages->acceptEncryption(['peer' => InputEncryptedChat, 'g_b' => 'bytes', 'key_fingerprint' => long, ]); -``` - -Or, if you're using the [PWRTelegram HTTP API](https://pwrtelegram.xyz): - -### As a bot: - -POST/GET to `https://api.pwrtelegram.xyz/botTOKEN/madeline` - -Parameters: - -* method - messages.acceptEncryption -* params - `{"peer": InputEncryptedChat, "g_b": "bytes", "key_fingerprint": long, }` - - - -### As a user: - -POST/GET to `https://api.pwrtelegram.xyz/userTOKEN/messages.acceptEncryption` - -Parameters: - -peer - Json encoded InputEncryptedChat -g_b - Json encoded bytes -key_fingerprint - Json encoded long - - - -Or, if you're into Lua: - -``` -EncryptedChat = messages.acceptEncryption({peer=InputEncryptedChat, g_b='bytes', key_fingerprint=long, }) -``` - diff --git a/old_docs/API_docs_v23/methods/messages_discardEncryption.md b/old_docs/API_docs_v23/methods/messages_discardEncryption.md index 72648e9d..3a9dc58b 100644 --- a/old_docs/API_docs_v23/methods/messages_discardEncryption.md +++ b/old_docs/API_docs_v23/methods/messages_discardEncryption.md @@ -6,67 +6,8 @@ description: messages.discardEncryption parameters, return type and example [Back to methods index](index.md) -*You cannot use this method directly, see https://daniil.it/MadelineProto for more info on handling secret chats* +**You cannot use this method directly, see https://daniil.it/MadelineProto for more info on handling secret chats** -### Parameters: - -| Name | Type | Required | -|----------|:-------------:|---------:| -|chat\_id|[int](../types/int.md) | Yes| - - -### Return type: [Bool](../types/Bool.md) - -### Example: - - -``` -$MadelineProto = new \danog\MadelineProto\API(); -if (isset($token)) { // Login as a bot - $MadelineProto->bot_login($token); -} -if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } - $MadelineProto->complete_phone_login($code); -} - -$Bool = $MadelineProto->messages->discardEncryption(['chat_id' => int, ]); -``` - -Or, if you're using the [PWRTelegram HTTP API](https://pwrtelegram.xyz): - -### As a bot: - -POST/GET to `https://api.pwrtelegram.xyz/botTOKEN/madeline` - -Parameters: - -* method - messages.discardEncryption -* params - `{"chat_id": int, }` - - - -### As a user: - -POST/GET to `https://api.pwrtelegram.xyz/userTOKEN/messages.discardEncryption` - -Parameters: - -chat_id - Json encoded int - - - -Or, if you're into Lua: - -``` -Bool = messages.discardEncryption({chat_id=int, }) -``` - diff --git a/old_docs/API_docs_v23/methods/messages_getFullChat.md b/old_docs/API_docs_v23/methods/messages_getFullChat.md index 62102b64..ffa9c281 100644 --- a/old_docs/API_docs_v23/methods/messages_getFullChat.md +++ b/old_docs/API_docs_v23/methods/messages_getFullChat.md @@ -6,67 +6,8 @@ description: messages.getFullChat parameters, return type and example [Back to methods index](index.md) -*You cannot use this method directly, use the get_pwr_chat, get_info, get_full_info methods instead (see https://daniil.it/MadelineProto for more info)* +**You cannot use this method directly, use the get_pwr_chat, get_info, get_full_info methods instead (see https://daniil.it/MadelineProto for more info)** -### Parameters: - -| Name | Type | Required | -|----------|:-------------:|---------:| -|chat\_id|[InputPeer](../types/InputPeer.md) | Yes| - - -### Return type: [messages\_ChatFull](../types/messages_ChatFull.md) - -### Example: - - -``` -$MadelineProto = new \danog\MadelineProto\API(); -if (isset($token)) { // Login as a bot - $MadelineProto->bot_login($token); -} -if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } - $MadelineProto->complete_phone_login($code); -} - -$messages_ChatFull = $MadelineProto->messages->getFullChat(['chat_id' => InputPeer, ]); -``` - -Or, if you're using the [PWRTelegram HTTP API](https://pwrtelegram.xyz): - -### As a bot: - -POST/GET to `https://api.pwrtelegram.xyz/botTOKEN/madeline` - -Parameters: - -* method - messages.getFullChat -* params - `{"chat_id": InputPeer, }` - - - -### As a user: - -POST/GET to `https://api.pwrtelegram.xyz/userTOKEN/messages.getFullChat` - -Parameters: - -chat_id - Json encoded InputPeer - - - -Or, if you're into Lua: - -``` -messages_ChatFull = messages.getFullChat({chat_id=InputPeer, }) -``` - diff --git a/old_docs/API_docs_v23/methods/messages_requestEncryption.md b/old_docs/API_docs_v23/methods/messages_requestEncryption.md index 2fd1f825..c8476667 100644 --- a/old_docs/API_docs_v23/methods/messages_requestEncryption.md +++ b/old_docs/API_docs_v23/methods/messages_requestEncryption.md @@ -6,69 +6,8 @@ description: messages.requestEncryption parameters, return type and example [Back to methods index](index.md) -*You cannot use this method directly, see https://daniil.it/MadelineProto for more info on handling secret chats* +**You cannot use this method directly, see https://daniil.it/MadelineProto for more info on handling secret chats** -### Parameters: - -| Name | Type | Required | -|----------|:-------------:|---------:| -|user\_id|[InputUser](../types/InputUser.md) | Yes| -|g\_a|[bytes](../types/bytes.md) | Yes| - - -### Return type: [EncryptedChat](../types/EncryptedChat.md) - -### Example: - - -``` -$MadelineProto = new \danog\MadelineProto\API(); -if (isset($token)) { // Login as a bot - $MadelineProto->bot_login($token); -} -if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } - $MadelineProto->complete_phone_login($code); -} - -$EncryptedChat = $MadelineProto->messages->requestEncryption(['user_id' => InputUser, 'g_a' => 'bytes', ]); -``` - -Or, if you're using the [PWRTelegram HTTP API](https://pwrtelegram.xyz): - -### As a bot: - -POST/GET to `https://api.pwrtelegram.xyz/botTOKEN/madeline` - -Parameters: - -* method - messages.requestEncryption -* params - `{"user_id": InputUser, "g_a": "bytes", }` - - - -### As a user: - -POST/GET to `https://api.pwrtelegram.xyz/userTOKEN/messages.requestEncryption` - -Parameters: - -user_id - Json encoded InputUser -g_a - Json encoded bytes - - - -Or, if you're into Lua: - -``` -EncryptedChat = messages.requestEncryption({user_id=InputUser, g_a='bytes', }) -``` - diff --git a/old_docs/API_docs_v23/methods/updates_getDifference.md b/old_docs/API_docs_v23/methods/updates_getDifference.md index 53c7b078..9bcee79a 100644 --- a/old_docs/API_docs_v23/methods/updates_getDifference.md +++ b/old_docs/API_docs_v23/methods/updates_getDifference.md @@ -6,71 +6,8 @@ description: updates.getDifference parameters, return type and example [Back to methods index](index.md) -*You cannot use this method directly, see https://daniil.it/MadelineProto for more info on handling updates* +**You cannot use this method directly, see https://daniil.it/MadelineProto for more info on handling updates** -### Parameters: - -| Name | Type | Required | -|----------|:-------------:|---------:| -|pts|[int](../types/int.md) | Yes| -|date|[int](../types/int.md) | Yes| -|qts|[int](../types/int.md) | Yes| - - -### Return type: [updates\_Difference](../types/updates_Difference.md) - -### Example: - - -``` -$MadelineProto = new \danog\MadelineProto\API(); -if (isset($token)) { // Login as a bot - $MadelineProto->bot_login($token); -} -if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } - $MadelineProto->complete_phone_login($code); -} - -$updates_Difference = $MadelineProto->updates->getDifference(['pts' => int, 'date' => int, 'qts' => int, ]); -``` - -Or, if you're using the [PWRTelegram HTTP API](https://pwrtelegram.xyz): - -### As a bot: - -POST/GET to `https://api.pwrtelegram.xyz/botTOKEN/madeline` - -Parameters: - -* method - updates.getDifference -* params - `{"pts": int, "date": int, "qts": int, }` - - - -### As a user: - -POST/GET to `https://api.pwrtelegram.xyz/userTOKEN/updates.getDifference` - -Parameters: - -pts - Json encoded int -date - Json encoded int -qts - Json encoded int - - - -Or, if you're into Lua: - -``` -updates_Difference = updates.getDifference({pts=int, date=int, qts=int, }) -``` - diff --git a/old_docs/API_docs_v23/methods/updates_getState.md b/old_docs/API_docs_v23/methods/updates_getState.md index 51f6ae80..fd5955ba 100644 --- a/old_docs/API_docs_v23/methods/updates_getState.md +++ b/old_docs/API_docs_v23/methods/updates_getState.md @@ -6,61 +6,8 @@ description: updates.getState parameters, return type and example [Back to methods index](index.md) -*You cannot use this method directly, see https://daniil.it/MadelineProto for more info on handling updates* +**You cannot use this method directly, see https://daniil.it/MadelineProto for more info on handling updates** - - -### Return type: [updates\_State](../types/updates_State.md) - -### Example: - - -``` -$MadelineProto = new \danog\MadelineProto\API(); -if (isset($token)) { // Login as a bot - $MadelineProto->bot_login($token); -} -if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } - $MadelineProto->complete_phone_login($code); -} - -$updates_State = $MadelineProto->updates->getState(); -``` - -Or, if you're using the [PWRTelegram HTTP API](https://pwrtelegram.xyz): - -### As a bot: - -POST/GET to `https://api.pwrtelegram.xyz/botTOKEN/madeline` - -Parameters: - -* method - updates.getState -* params - `{}` - - - -### As a user: - -POST/GET to `https://api.pwrtelegram.xyz/userTOKEN/updates.getState` - -Parameters: - - - - -Or, if you're into Lua: - -``` -updates_State = updates.getState({}) -``` - diff --git a/old_docs/API_docs_v23/methods/upload_getFile.md b/old_docs/API_docs_v23/methods/upload_getFile.md index a1003003..add7d54e 100644 --- a/old_docs/API_docs_v23/methods/upload_getFile.md +++ b/old_docs/API_docs_v23/methods/upload_getFile.md @@ -6,71 +6,8 @@ description: upload.getFile parameters, return type and example [Back to methods index](index.md) -*You cannot use this method directly, use the upload, download_to_stream, download_to_file, download_to_dir methods instead; see https://daniil.it/MadelineProto for more info* +**You cannot use this method directly, use the upload, download_to_stream, download_to_file, download_to_dir methods instead; see https://daniil.it/MadelineProto for more info** -### Parameters: - -| Name | Type | Required | -|----------|:-------------:|---------:| -|location|[InputFileLocation](../types/InputFileLocation.md) | Yes| -|offset|[int](../types/int.md) | Yes| -|limit|[int](../types/int.md) | Yes| - - -### Return type: [upload\_File](../types/upload_File.md) - -### Example: - - -``` -$MadelineProto = new \danog\MadelineProto\API(); -if (isset($token)) { // Login as a bot - $MadelineProto->bot_login($token); -} -if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } - $MadelineProto->complete_phone_login($code); -} - -$upload_File = $MadelineProto->upload->getFile(['location' => InputFileLocation, 'offset' => int, 'limit' => int, ]); -``` - -Or, if you're using the [PWRTelegram HTTP API](https://pwrtelegram.xyz): - -### As a bot: - -POST/GET to `https://api.pwrtelegram.xyz/botTOKEN/madeline` - -Parameters: - -* method - upload.getFile -* params - `{"location": InputFileLocation, "offset": int, "limit": int, }` - - - -### As a user: - -POST/GET to `https://api.pwrtelegram.xyz/userTOKEN/upload.getFile` - -Parameters: - -location - Json encoded InputFileLocation -offset - Json encoded int -limit - Json encoded int - - - -Or, if you're into Lua: - -``` -upload_File = upload.getFile({location=InputFileLocation, offset=int, limit=int, }) -``` - diff --git a/old_docs/API_docs_v23/methods/upload_saveBigFilePart.md b/old_docs/API_docs_v23/methods/upload_saveBigFilePart.md index e5c96d89..b1c3ea28 100644 --- a/old_docs/API_docs_v23/methods/upload_saveBigFilePart.md +++ b/old_docs/API_docs_v23/methods/upload_saveBigFilePart.md @@ -6,73 +6,8 @@ description: upload.saveBigFilePart parameters, return type and example [Back to methods index](index.md) -*You cannot use this method directly, use the upload, download_to_stream, download_to_file, download_to_dir methods instead; see https://daniil.it/MadelineProto for more info* +**You cannot use this method directly, use the upload, download_to_stream, download_to_file, download_to_dir methods instead; see https://daniil.it/MadelineProto for more info** -### Parameters: - -| Name | Type | Required | -|----------|:-------------:|---------:| -|file\_id|[long](../types/long.md) | Yes| -|file\_part|[int](../types/int.md) | Yes| -|file\_total\_parts|[int](../types/int.md) | Yes| -|bytes|[bytes](../types/bytes.md) | Yes| - - -### Return type: [Bool](../types/Bool.md) - -### Example: - - -``` -$MadelineProto = new \danog\MadelineProto\API(); -if (isset($token)) { // Login as a bot - $MadelineProto->bot_login($token); -} -if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } - $MadelineProto->complete_phone_login($code); -} - -$Bool = $MadelineProto->upload->saveBigFilePart(['file_id' => long, 'file_part' => int, 'file_total_parts' => int, 'bytes' => 'bytes', ]); -``` - -Or, if you're using the [PWRTelegram HTTP API](https://pwrtelegram.xyz): - -### As a bot: - -POST/GET to `https://api.pwrtelegram.xyz/botTOKEN/madeline` - -Parameters: - -* method - upload.saveBigFilePart -* params - `{"file_id": long, "file_part": int, "file_total_parts": int, "bytes": "bytes", }` - - - -### As a user: - -POST/GET to `https://api.pwrtelegram.xyz/userTOKEN/upload.saveBigFilePart` - -Parameters: - -file_id - Json encoded long -file_part - Json encoded int -file_total_parts - Json encoded int -bytes - Json encoded bytes - - - -Or, if you're into Lua: - -``` -Bool = upload.saveBigFilePart({file_id=long, file_part=int, file_total_parts=int, bytes='bytes', }) -``` - diff --git a/old_docs/API_docs_v23/methods/upload_saveFilePart.md b/old_docs/API_docs_v23/methods/upload_saveFilePart.md index 1c16e4b2..c482f321 100644 --- a/old_docs/API_docs_v23/methods/upload_saveFilePart.md +++ b/old_docs/API_docs_v23/methods/upload_saveFilePart.md @@ -6,71 +6,8 @@ description: upload.saveFilePart parameters, return type and example [Back to methods index](index.md) -*You cannot use this method directly, use the upload, download_to_stream, download_to_file, download_to_dir methods instead; see https://daniil.it/MadelineProto for more info* +**You cannot use this method directly, use the upload, download_to_stream, download_to_file, download_to_dir methods instead; see https://daniil.it/MadelineProto for more info** -### Parameters: - -| Name | Type | Required | -|----------|:-------------:|---------:| -|file\_id|[long](../types/long.md) | Yes| -|file\_part|[int](../types/int.md) | Yes| -|bytes|[bytes](../types/bytes.md) | Yes| - - -### Return type: [Bool](../types/Bool.md) - -### Example: - - -``` -$MadelineProto = new \danog\MadelineProto\API(); -if (isset($token)) { // Login as a bot - $MadelineProto->bot_login($token); -} -if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } - $MadelineProto->complete_phone_login($code); -} - -$Bool = $MadelineProto->upload->saveFilePart(['file_id' => long, 'file_part' => int, 'bytes' => 'bytes', ]); -``` - -Or, if you're using the [PWRTelegram HTTP API](https://pwrtelegram.xyz): - -### As a bot: - -POST/GET to `https://api.pwrtelegram.xyz/botTOKEN/madeline` - -Parameters: - -* method - upload.saveFilePart -* params - `{"file_id": long, "file_part": int, "bytes": "bytes", }` - - - -### As a user: - -POST/GET to `https://api.pwrtelegram.xyz/userTOKEN/upload.saveFilePart` - -Parameters: - -file_id - Json encoded long -file_part - Json encoded int -bytes - Json encoded bytes - - - -Or, if you're into Lua: - -``` -Bool = upload.saveFilePart({file_id=long, file_part=int, bytes='bytes', }) -``` - diff --git a/old_docs/API_docs_v23/methods/users_getFullUser.md b/old_docs/API_docs_v23/methods/users_getFullUser.md index 645ab12e..4ec831ec 100644 --- a/old_docs/API_docs_v23/methods/users_getFullUser.md +++ b/old_docs/API_docs_v23/methods/users_getFullUser.md @@ -6,67 +6,8 @@ description: users.getFullUser parameters, return type and example [Back to methods index](index.md) -*You cannot use this method directly, use the get_pwr_chat, get_info, get_full_info methods instead (see https://daniil.it/MadelineProto for more info)* +**You cannot use this method directly, use the get_pwr_chat, get_info, get_full_info methods instead (see https://daniil.it/MadelineProto for more info)** -### Parameters: - -| Name | Type | Required | -|----------|:-------------:|---------:| -|id|[InputUser](../types/InputUser.md) | Yes| - - -### Return type: [UserFull](../types/UserFull.md) - -### Example: - - -``` -$MadelineProto = new \danog\MadelineProto\API(); -if (isset($token)) { // Login as a bot - $MadelineProto->bot_login($token); -} -if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } - $MadelineProto->complete_phone_login($code); -} - -$UserFull = $MadelineProto->users->getFullUser(['id' => InputUser, ]); -``` - -Or, if you're using the [PWRTelegram HTTP API](https://pwrtelegram.xyz): - -### As a bot: - -POST/GET to `https://api.pwrtelegram.xyz/botTOKEN/madeline` - -Parameters: - -* method - users.getFullUser -* params - `{"id": InputUser, }` - - - -### As a user: - -POST/GET to `https://api.pwrtelegram.xyz/userTOKEN/users.getFullUser` - -Parameters: - -id - Json encoded InputUser - - - -Or, if you're into Lua: - -``` -UserFull = users.getFullUser({id=InputUser, }) -``` - diff --git a/old_docs/API_docs_v25/constructors/README.md b/old_docs/API_docs_v25/constructors/README.md index 92eb1f19..9b6b2da9 100644 --- a/old_docs/API_docs_v25/constructors/README.md +++ b/old_docs/API_docs_v25/constructors/README.md @@ -4,9 +4,6 @@ description: List of constructors --- # Constructors [Back to API documentation index](..) - - - ***

[$accountDaysTTL](../constructors/accountDaysTTL.md) = \['days' => [int](../types/int.md), \]; diff --git a/old_docs/API_docs_v25/methods/auth_logOut.md b/old_docs/API_docs_v25/methods/auth_logOut.md index 12159bab..7d5bb3f7 100644 --- a/old_docs/API_docs_v25/methods/auth_logOut.md +++ b/old_docs/API_docs_v25/methods/auth_logOut.md @@ -6,61 +6,8 @@ description: auth.logOut parameters, return type and example [Back to methods index](index.md) -*You cannot use this method directly, use the logout method instead (see https://daniil.it/MadelineProto for more info)* +**You cannot use this method directly, use the logout method instead (see https://daniil.it/MadelineProto for more info)** - - -### Return type: [Bool](../types/Bool.md) - -### Example: - - -``` -$MadelineProto = new \danog\MadelineProto\API(); -if (isset($token)) { // Login as a bot - $MadelineProto->bot_login($token); -} -if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } - $MadelineProto->complete_phone_login($code); -} - -$Bool = $MadelineProto->auth->logOut(); -``` - -Or, if you're using the [PWRTelegram HTTP API](https://pwrtelegram.xyz): - -### As a bot: - -POST/GET to `https://api.pwrtelegram.xyz/botTOKEN/madeline` - -Parameters: - -* method - auth.logOut -* params - `{}` - - - -### As a user: - -POST/GET to `https://api.pwrtelegram.xyz/userTOKEN/auth.logOut` - -Parameters: - - - - -Or, if you're into Lua: - -``` -Bool = auth.logOut({}) -``` - diff --git a/old_docs/API_docs_v25/methods/auth_sendCode.md b/old_docs/API_docs_v25/methods/auth_sendCode.md index 43bc28ee..22d1df94 100644 --- a/old_docs/API_docs_v25/methods/auth_sendCode.md +++ b/old_docs/API_docs_v25/methods/auth_sendCode.md @@ -6,75 +6,8 @@ description: auth.sendCode parameters, return type and example [Back to methods index](index.md) -*You cannot use this method directly, use the phone_login method instead (see https://daniil.it/MadelineProto for more info)* +**You cannot use this method directly, use the phone_login method instead (see https://daniil.it/MadelineProto for more info)** -### Parameters: - -| Name | Type | Required | -|----------|:-------------:|---------:| -|phone\_number|[string](../types/string.md) | Yes| -|sms\_type|[int](../types/int.md) | Yes| -|api\_id|[int](../types/int.md) | Yes| -|api\_hash|[string](../types/string.md) | Yes| -|lang\_code|[string](../types/string.md) | Yes| - - -### Return type: [auth\_SentCode](../types/auth_SentCode.md) - -### Example: - - -``` -$MadelineProto = new \danog\MadelineProto\API(); -if (isset($token)) { // Login as a bot - $MadelineProto->bot_login($token); -} -if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } - $MadelineProto->complete_phone_login($code); -} - -$auth_SentCode = $MadelineProto->auth->sendCode(['phone_number' => 'string', 'sms_type' => int, 'api_id' => int, 'api_hash' => 'string', 'lang_code' => 'string', ]); -``` - -Or, if you're using the [PWRTelegram HTTP API](https://pwrtelegram.xyz): - -### As a bot: - -POST/GET to `https://api.pwrtelegram.xyz/botTOKEN/madeline` - -Parameters: - -* method - auth.sendCode -* params - `{"phone_number": "string", "sms_type": int, "api_id": int, "api_hash": "string", "lang_code": "string", }` - - - -### As a user: - -POST/GET to `https://api.pwrtelegram.xyz/userTOKEN/auth.sendCode` - -Parameters: - -phone_number - Json encoded string -sms_type - Json encoded int -api_id - Json encoded int -api_hash - Json encoded string -lang_code - Json encoded string - - - -Or, if you're into Lua: - -``` -auth_SentCode = auth.sendCode({phone_number='string', sms_type=int, api_id=int, api_hash='string', lang_code='string', }) -``` - diff --git a/old_docs/API_docs_v25/methods/auth_signIn.md b/old_docs/API_docs_v25/methods/auth_signIn.md index 75c50d70..ab40bb4d 100644 --- a/old_docs/API_docs_v25/methods/auth_signIn.md +++ b/old_docs/API_docs_v25/methods/auth_signIn.md @@ -6,71 +6,8 @@ description: auth.signIn parameters, return type and example [Back to methods index](index.md) -*You cannot use this method directly, use the complete_phone_login method instead (see https://daniil.it/MadelineProto for more info)* +**You cannot use this method directly, use the complete_phone_login method instead (see https://daniil.it/MadelineProto for more info)** -### Parameters: - -| Name | Type | Required | -|----------|:-------------:|---------:| -|phone\_number|[string](../types/string.md) | Yes| -|phone\_code\_hash|[string](../types/string.md) | Yes| -|phone\_code|[string](../types/string.md) | Yes| - - -### Return type: [auth\_Authorization](../types/auth_Authorization.md) - -### Example: - - -``` -$MadelineProto = new \danog\MadelineProto\API(); -if (isset($token)) { // Login as a bot - $MadelineProto->bot_login($token); -} -if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } - $MadelineProto->complete_phone_login($code); -} - -$auth_Authorization = $MadelineProto->auth->signIn(['phone_number' => 'string', 'phone_code_hash' => 'string', 'phone_code' => 'string', ]); -``` - -Or, if you're using the [PWRTelegram HTTP API](https://pwrtelegram.xyz): - -### As a bot: - -POST/GET to `https://api.pwrtelegram.xyz/botTOKEN/madeline` - -Parameters: - -* method - auth.signIn -* params - `{"phone_number": "string", "phone_code_hash": "string", "phone_code": "string", }` - - - -### As a user: - -POST/GET to `https://api.pwrtelegram.xyz/userTOKEN/auth.signIn` - -Parameters: - -phone_number - Json encoded string -phone_code_hash - Json encoded string -phone_code - Json encoded string - - - -Or, if you're into Lua: - -``` -auth_Authorization = auth.signIn({phone_number='string', phone_code_hash='string', phone_code='string', }) -``` - diff --git a/old_docs/API_docs_v25/methods/auth_signUp.md b/old_docs/API_docs_v25/methods/auth_signUp.md index f2a72b68..042d1191 100644 --- a/old_docs/API_docs_v25/methods/auth_signUp.md +++ b/old_docs/API_docs_v25/methods/auth_signUp.md @@ -6,75 +6,8 @@ description: auth.signUp parameters, return type and example [Back to methods index](index.md) -*You cannot use this method directly, use the complete_signup method instead (see https://daniil.it/MadelineProto for more info)* +**You cannot use this method directly, use the complete_signup method instead (see https://daniil.it/MadelineProto for more info)** -### Parameters: - -| Name | Type | Required | -|----------|:-------------:|---------:| -|phone\_number|[string](../types/string.md) | Yes| -|phone\_code\_hash|[string](../types/string.md) | Yes| -|phone\_code|[string](../types/string.md) | Yes| -|first\_name|[string](../types/string.md) | Yes| -|last\_name|[string](../types/string.md) | Yes| - - -### Return type: [auth\_Authorization](../types/auth_Authorization.md) - -### Example: - - -``` -$MadelineProto = new \danog\MadelineProto\API(); -if (isset($token)) { // Login as a bot - $MadelineProto->bot_login($token); -} -if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } - $MadelineProto->complete_phone_login($code); -} - -$auth_Authorization = $MadelineProto->auth->signUp(['phone_number' => 'string', 'phone_code_hash' => 'string', 'phone_code' => 'string', 'first_name' => 'string', 'last_name' => 'string', ]); -``` - -Or, if you're using the [PWRTelegram HTTP API](https://pwrtelegram.xyz): - -### As a bot: - -POST/GET to `https://api.pwrtelegram.xyz/botTOKEN/madeline` - -Parameters: - -* method - auth.signUp -* params - `{"phone_number": "string", "phone_code_hash": "string", "phone_code": "string", "first_name": "string", "last_name": "string", }` - - - -### As a user: - -POST/GET to `https://api.pwrtelegram.xyz/userTOKEN/auth.signUp` - -Parameters: - -phone_number - Json encoded string -phone_code_hash - Json encoded string -phone_code - Json encoded string -first_name - Json encoded string -last_name - Json encoded string - - - -Or, if you're into Lua: - -``` -auth_Authorization = auth.signUp({phone_number='string', phone_code_hash='string', phone_code='string', first_name='string', last_name='string', }) -``` - diff --git a/old_docs/API_docs_v25/methods/contacts_resolveUsername.md b/old_docs/API_docs_v25/methods/contacts_resolveUsername.md index 353d1f0c..b665b382 100644 --- a/old_docs/API_docs_v25/methods/contacts_resolveUsername.md +++ b/old_docs/API_docs_v25/methods/contacts_resolveUsername.md @@ -6,67 +6,8 @@ description: contacts.resolveUsername parameters, return type and example [Back to methods index](index.md) -*You cannot use this method directly, use the resolve_username, get_pwr_chat, get_info, get_full_info methods instead (see https://daniil.it/MadelineProto for more info)* +**You cannot use this method directly, use the resolve_username, get_pwr_chat, get_info, get_full_info methods instead (see https://daniil.it/MadelineProto for more info)** -### Parameters: - -| Name | Type | Required | -|----------|:-------------:|---------:| -|username|[string](../types/string.md) | Yes| - - -### Return type: [User](../types/User.md) - -### Example: - - -``` -$MadelineProto = new \danog\MadelineProto\API(); -if (isset($token)) { // Login as a bot - $MadelineProto->bot_login($token); -} -if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } - $MadelineProto->complete_phone_login($code); -} - -$User = $MadelineProto->contacts->resolveUsername(['username' => 'string', ]); -``` - -Or, if you're using the [PWRTelegram HTTP API](https://pwrtelegram.xyz): - -### As a bot: - -POST/GET to `https://api.pwrtelegram.xyz/botTOKEN/madeline` - -Parameters: - -* method - contacts.resolveUsername -* params - `{"username": "string", }` - - - -### As a user: - -POST/GET to `https://api.pwrtelegram.xyz/userTOKEN/contacts.resolveUsername` - -Parameters: - -username - Json encoded string - - - -Or, if you're into Lua: - -``` -User = contacts.resolveUsername({username='string', }) -``` - diff --git a/old_docs/API_docs_v25/methods/messages_acceptEncryption.md b/old_docs/API_docs_v25/methods/messages_acceptEncryption.md index 548087b6..243c4c00 100644 --- a/old_docs/API_docs_v25/methods/messages_acceptEncryption.md +++ b/old_docs/API_docs_v25/methods/messages_acceptEncryption.md @@ -6,71 +6,8 @@ description: messages.acceptEncryption parameters, return type and example [Back to methods index](index.md) -*You cannot use this method directly, see https://daniil.it/MadelineProto for more info on handling secret chats* +**You cannot use this method directly, see https://daniil.it/MadelineProto for more info on handling secret chats** -### Parameters: - -| Name | Type | Required | -|----------|:-------------:|---------:| -|peer|[InputEncryptedChat](../types/InputEncryptedChat.md) | Yes| -|g\_b|[bytes](../types/bytes.md) | Yes| -|key\_fingerprint|[long](../types/long.md) | Yes| - - -### Return type: [EncryptedChat](../types/EncryptedChat.md) - -### Example: - - -``` -$MadelineProto = new \danog\MadelineProto\API(); -if (isset($token)) { // Login as a bot - $MadelineProto->bot_login($token); -} -if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } - $MadelineProto->complete_phone_login($code); -} - -$EncryptedChat = $MadelineProto->messages->acceptEncryption(['peer' => InputEncryptedChat, 'g_b' => 'bytes', 'key_fingerprint' => long, ]); -``` - -Or, if you're using the [PWRTelegram HTTP API](https://pwrtelegram.xyz): - -### As a bot: - -POST/GET to `https://api.pwrtelegram.xyz/botTOKEN/madeline` - -Parameters: - -* method - messages.acceptEncryption -* params - `{"peer": InputEncryptedChat, "g_b": "bytes", "key_fingerprint": long, }` - - - -### As a user: - -POST/GET to `https://api.pwrtelegram.xyz/userTOKEN/messages.acceptEncryption` - -Parameters: - -peer - Json encoded InputEncryptedChat -g_b - Json encoded bytes -key_fingerprint - Json encoded long - - - -Or, if you're into Lua: - -``` -EncryptedChat = messages.acceptEncryption({peer=InputEncryptedChat, g_b='bytes', key_fingerprint=long, }) -``` - diff --git a/old_docs/API_docs_v25/methods/messages_discardEncryption.md b/old_docs/API_docs_v25/methods/messages_discardEncryption.md index 72648e9d..3a9dc58b 100644 --- a/old_docs/API_docs_v25/methods/messages_discardEncryption.md +++ b/old_docs/API_docs_v25/methods/messages_discardEncryption.md @@ -6,67 +6,8 @@ description: messages.discardEncryption parameters, return type and example [Back to methods index](index.md) -*You cannot use this method directly, see https://daniil.it/MadelineProto for more info on handling secret chats* +**You cannot use this method directly, see https://daniil.it/MadelineProto for more info on handling secret chats** -### Parameters: - -| Name | Type | Required | -|----------|:-------------:|---------:| -|chat\_id|[int](../types/int.md) | Yes| - - -### Return type: [Bool](../types/Bool.md) - -### Example: - - -``` -$MadelineProto = new \danog\MadelineProto\API(); -if (isset($token)) { // Login as a bot - $MadelineProto->bot_login($token); -} -if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } - $MadelineProto->complete_phone_login($code); -} - -$Bool = $MadelineProto->messages->discardEncryption(['chat_id' => int, ]); -``` - -Or, if you're using the [PWRTelegram HTTP API](https://pwrtelegram.xyz): - -### As a bot: - -POST/GET to `https://api.pwrtelegram.xyz/botTOKEN/madeline` - -Parameters: - -* method - messages.discardEncryption -* params - `{"chat_id": int, }` - - - -### As a user: - -POST/GET to `https://api.pwrtelegram.xyz/userTOKEN/messages.discardEncryption` - -Parameters: - -chat_id - Json encoded int - - - -Or, if you're into Lua: - -``` -Bool = messages.discardEncryption({chat_id=int, }) -``` - diff --git a/old_docs/API_docs_v25/methods/messages_getFullChat.md b/old_docs/API_docs_v25/methods/messages_getFullChat.md index 62102b64..ffa9c281 100644 --- a/old_docs/API_docs_v25/methods/messages_getFullChat.md +++ b/old_docs/API_docs_v25/methods/messages_getFullChat.md @@ -6,67 +6,8 @@ description: messages.getFullChat parameters, return type and example [Back to methods index](index.md) -*You cannot use this method directly, use the get_pwr_chat, get_info, get_full_info methods instead (see https://daniil.it/MadelineProto for more info)* +**You cannot use this method directly, use the get_pwr_chat, get_info, get_full_info methods instead (see https://daniil.it/MadelineProto for more info)** -### Parameters: - -| Name | Type | Required | -|----------|:-------------:|---------:| -|chat\_id|[InputPeer](../types/InputPeer.md) | Yes| - - -### Return type: [messages\_ChatFull](../types/messages_ChatFull.md) - -### Example: - - -``` -$MadelineProto = new \danog\MadelineProto\API(); -if (isset($token)) { // Login as a bot - $MadelineProto->bot_login($token); -} -if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } - $MadelineProto->complete_phone_login($code); -} - -$messages_ChatFull = $MadelineProto->messages->getFullChat(['chat_id' => InputPeer, ]); -``` - -Or, if you're using the [PWRTelegram HTTP API](https://pwrtelegram.xyz): - -### As a bot: - -POST/GET to `https://api.pwrtelegram.xyz/botTOKEN/madeline` - -Parameters: - -* method - messages.getFullChat -* params - `{"chat_id": InputPeer, }` - - - -### As a user: - -POST/GET to `https://api.pwrtelegram.xyz/userTOKEN/messages.getFullChat` - -Parameters: - -chat_id - Json encoded InputPeer - - - -Or, if you're into Lua: - -``` -messages_ChatFull = messages.getFullChat({chat_id=InputPeer, }) -``` - diff --git a/old_docs/API_docs_v25/methods/messages_requestEncryption.md b/old_docs/API_docs_v25/methods/messages_requestEncryption.md index 2fd1f825..c8476667 100644 --- a/old_docs/API_docs_v25/methods/messages_requestEncryption.md +++ b/old_docs/API_docs_v25/methods/messages_requestEncryption.md @@ -6,69 +6,8 @@ description: messages.requestEncryption parameters, return type and example [Back to methods index](index.md) -*You cannot use this method directly, see https://daniil.it/MadelineProto for more info on handling secret chats* +**You cannot use this method directly, see https://daniil.it/MadelineProto for more info on handling secret chats** -### Parameters: - -| Name | Type | Required | -|----------|:-------------:|---------:| -|user\_id|[InputUser](../types/InputUser.md) | Yes| -|g\_a|[bytes](../types/bytes.md) | Yes| - - -### Return type: [EncryptedChat](../types/EncryptedChat.md) - -### Example: - - -``` -$MadelineProto = new \danog\MadelineProto\API(); -if (isset($token)) { // Login as a bot - $MadelineProto->bot_login($token); -} -if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } - $MadelineProto->complete_phone_login($code); -} - -$EncryptedChat = $MadelineProto->messages->requestEncryption(['user_id' => InputUser, 'g_a' => 'bytes', ]); -``` - -Or, if you're using the [PWRTelegram HTTP API](https://pwrtelegram.xyz): - -### As a bot: - -POST/GET to `https://api.pwrtelegram.xyz/botTOKEN/madeline` - -Parameters: - -* method - messages.requestEncryption -* params - `{"user_id": InputUser, "g_a": "bytes", }` - - - -### As a user: - -POST/GET to `https://api.pwrtelegram.xyz/userTOKEN/messages.requestEncryption` - -Parameters: - -user_id - Json encoded InputUser -g_a - Json encoded bytes - - - -Or, if you're into Lua: - -``` -EncryptedChat = messages.requestEncryption({user_id=InputUser, g_a='bytes', }) -``` - diff --git a/old_docs/API_docs_v25/methods/updates_getDifference.md b/old_docs/API_docs_v25/methods/updates_getDifference.md index 53c7b078..9bcee79a 100644 --- a/old_docs/API_docs_v25/methods/updates_getDifference.md +++ b/old_docs/API_docs_v25/methods/updates_getDifference.md @@ -6,71 +6,8 @@ description: updates.getDifference parameters, return type and example [Back to methods index](index.md) -*You cannot use this method directly, see https://daniil.it/MadelineProto for more info on handling updates* +**You cannot use this method directly, see https://daniil.it/MadelineProto for more info on handling updates** -### Parameters: - -| Name | Type | Required | -|----------|:-------------:|---------:| -|pts|[int](../types/int.md) | Yes| -|date|[int](../types/int.md) | Yes| -|qts|[int](../types/int.md) | Yes| - - -### Return type: [updates\_Difference](../types/updates_Difference.md) - -### Example: - - -``` -$MadelineProto = new \danog\MadelineProto\API(); -if (isset($token)) { // Login as a bot - $MadelineProto->bot_login($token); -} -if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } - $MadelineProto->complete_phone_login($code); -} - -$updates_Difference = $MadelineProto->updates->getDifference(['pts' => int, 'date' => int, 'qts' => int, ]); -``` - -Or, if you're using the [PWRTelegram HTTP API](https://pwrtelegram.xyz): - -### As a bot: - -POST/GET to `https://api.pwrtelegram.xyz/botTOKEN/madeline` - -Parameters: - -* method - updates.getDifference -* params - `{"pts": int, "date": int, "qts": int, }` - - - -### As a user: - -POST/GET to `https://api.pwrtelegram.xyz/userTOKEN/updates.getDifference` - -Parameters: - -pts - Json encoded int -date - Json encoded int -qts - Json encoded int - - - -Or, if you're into Lua: - -``` -updates_Difference = updates.getDifference({pts=int, date=int, qts=int, }) -``` - diff --git a/old_docs/API_docs_v25/methods/updates_getState.md b/old_docs/API_docs_v25/methods/updates_getState.md index 51f6ae80..fd5955ba 100644 --- a/old_docs/API_docs_v25/methods/updates_getState.md +++ b/old_docs/API_docs_v25/methods/updates_getState.md @@ -6,61 +6,8 @@ description: updates.getState parameters, return type and example [Back to methods index](index.md) -*You cannot use this method directly, see https://daniil.it/MadelineProto for more info on handling updates* +**You cannot use this method directly, see https://daniil.it/MadelineProto for more info on handling updates** - - -### Return type: [updates\_State](../types/updates_State.md) - -### Example: - - -``` -$MadelineProto = new \danog\MadelineProto\API(); -if (isset($token)) { // Login as a bot - $MadelineProto->bot_login($token); -} -if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } - $MadelineProto->complete_phone_login($code); -} - -$updates_State = $MadelineProto->updates->getState(); -``` - -Or, if you're using the [PWRTelegram HTTP API](https://pwrtelegram.xyz): - -### As a bot: - -POST/GET to `https://api.pwrtelegram.xyz/botTOKEN/madeline` - -Parameters: - -* method - updates.getState -* params - `{}` - - - -### As a user: - -POST/GET to `https://api.pwrtelegram.xyz/userTOKEN/updates.getState` - -Parameters: - - - - -Or, if you're into Lua: - -``` -updates_State = updates.getState({}) -``` - diff --git a/old_docs/API_docs_v25/methods/upload_getFile.md b/old_docs/API_docs_v25/methods/upload_getFile.md index a1003003..add7d54e 100644 --- a/old_docs/API_docs_v25/methods/upload_getFile.md +++ b/old_docs/API_docs_v25/methods/upload_getFile.md @@ -6,71 +6,8 @@ description: upload.getFile parameters, return type and example [Back to methods index](index.md) -*You cannot use this method directly, use the upload, download_to_stream, download_to_file, download_to_dir methods instead; see https://daniil.it/MadelineProto for more info* +**You cannot use this method directly, use the upload, download_to_stream, download_to_file, download_to_dir methods instead; see https://daniil.it/MadelineProto for more info** -### Parameters: - -| Name | Type | Required | -|----------|:-------------:|---------:| -|location|[InputFileLocation](../types/InputFileLocation.md) | Yes| -|offset|[int](../types/int.md) | Yes| -|limit|[int](../types/int.md) | Yes| - - -### Return type: [upload\_File](../types/upload_File.md) - -### Example: - - -``` -$MadelineProto = new \danog\MadelineProto\API(); -if (isset($token)) { // Login as a bot - $MadelineProto->bot_login($token); -} -if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } - $MadelineProto->complete_phone_login($code); -} - -$upload_File = $MadelineProto->upload->getFile(['location' => InputFileLocation, 'offset' => int, 'limit' => int, ]); -``` - -Or, if you're using the [PWRTelegram HTTP API](https://pwrtelegram.xyz): - -### As a bot: - -POST/GET to `https://api.pwrtelegram.xyz/botTOKEN/madeline` - -Parameters: - -* method - upload.getFile -* params - `{"location": InputFileLocation, "offset": int, "limit": int, }` - - - -### As a user: - -POST/GET to `https://api.pwrtelegram.xyz/userTOKEN/upload.getFile` - -Parameters: - -location - Json encoded InputFileLocation -offset - Json encoded int -limit - Json encoded int - - - -Or, if you're into Lua: - -``` -upload_File = upload.getFile({location=InputFileLocation, offset=int, limit=int, }) -``` - diff --git a/old_docs/API_docs_v25/methods/upload_saveBigFilePart.md b/old_docs/API_docs_v25/methods/upload_saveBigFilePart.md index e5c96d89..b1c3ea28 100644 --- a/old_docs/API_docs_v25/methods/upload_saveBigFilePart.md +++ b/old_docs/API_docs_v25/methods/upload_saveBigFilePart.md @@ -6,73 +6,8 @@ description: upload.saveBigFilePart parameters, return type and example [Back to methods index](index.md) -*You cannot use this method directly, use the upload, download_to_stream, download_to_file, download_to_dir methods instead; see https://daniil.it/MadelineProto for more info* +**You cannot use this method directly, use the upload, download_to_stream, download_to_file, download_to_dir methods instead; see https://daniil.it/MadelineProto for more info** -### Parameters: - -| Name | Type | Required | -|----------|:-------------:|---------:| -|file\_id|[long](../types/long.md) | Yes| -|file\_part|[int](../types/int.md) | Yes| -|file\_total\_parts|[int](../types/int.md) | Yes| -|bytes|[bytes](../types/bytes.md) | Yes| - - -### Return type: [Bool](../types/Bool.md) - -### Example: - - -``` -$MadelineProto = new \danog\MadelineProto\API(); -if (isset($token)) { // Login as a bot - $MadelineProto->bot_login($token); -} -if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } - $MadelineProto->complete_phone_login($code); -} - -$Bool = $MadelineProto->upload->saveBigFilePart(['file_id' => long, 'file_part' => int, 'file_total_parts' => int, 'bytes' => 'bytes', ]); -``` - -Or, if you're using the [PWRTelegram HTTP API](https://pwrtelegram.xyz): - -### As a bot: - -POST/GET to `https://api.pwrtelegram.xyz/botTOKEN/madeline` - -Parameters: - -* method - upload.saveBigFilePart -* params - `{"file_id": long, "file_part": int, "file_total_parts": int, "bytes": "bytes", }` - - - -### As a user: - -POST/GET to `https://api.pwrtelegram.xyz/userTOKEN/upload.saveBigFilePart` - -Parameters: - -file_id - Json encoded long -file_part - Json encoded int -file_total_parts - Json encoded int -bytes - Json encoded bytes - - - -Or, if you're into Lua: - -``` -Bool = upload.saveBigFilePart({file_id=long, file_part=int, file_total_parts=int, bytes='bytes', }) -``` - diff --git a/old_docs/API_docs_v25/methods/upload_saveFilePart.md b/old_docs/API_docs_v25/methods/upload_saveFilePart.md index 1c16e4b2..c482f321 100644 --- a/old_docs/API_docs_v25/methods/upload_saveFilePart.md +++ b/old_docs/API_docs_v25/methods/upload_saveFilePart.md @@ -6,71 +6,8 @@ description: upload.saveFilePart parameters, return type and example [Back to methods index](index.md) -*You cannot use this method directly, use the upload, download_to_stream, download_to_file, download_to_dir methods instead; see https://daniil.it/MadelineProto for more info* +**You cannot use this method directly, use the upload, download_to_stream, download_to_file, download_to_dir methods instead; see https://daniil.it/MadelineProto for more info** -### Parameters: - -| Name | Type | Required | -|----------|:-------------:|---------:| -|file\_id|[long](../types/long.md) | Yes| -|file\_part|[int](../types/int.md) | Yes| -|bytes|[bytes](../types/bytes.md) | Yes| - - -### Return type: [Bool](../types/Bool.md) - -### Example: - - -``` -$MadelineProto = new \danog\MadelineProto\API(); -if (isset($token)) { // Login as a bot - $MadelineProto->bot_login($token); -} -if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } - $MadelineProto->complete_phone_login($code); -} - -$Bool = $MadelineProto->upload->saveFilePart(['file_id' => long, 'file_part' => int, 'bytes' => 'bytes', ]); -``` - -Or, if you're using the [PWRTelegram HTTP API](https://pwrtelegram.xyz): - -### As a bot: - -POST/GET to `https://api.pwrtelegram.xyz/botTOKEN/madeline` - -Parameters: - -* method - upload.saveFilePart -* params - `{"file_id": long, "file_part": int, "bytes": "bytes", }` - - - -### As a user: - -POST/GET to `https://api.pwrtelegram.xyz/userTOKEN/upload.saveFilePart` - -Parameters: - -file_id - Json encoded long -file_part - Json encoded int -bytes - Json encoded bytes - - - -Or, if you're into Lua: - -``` -Bool = upload.saveFilePart({file_id=long, file_part=int, bytes='bytes', }) -``` - diff --git a/old_docs/API_docs_v25/methods/users_getFullUser.md b/old_docs/API_docs_v25/methods/users_getFullUser.md index 645ab12e..4ec831ec 100644 --- a/old_docs/API_docs_v25/methods/users_getFullUser.md +++ b/old_docs/API_docs_v25/methods/users_getFullUser.md @@ -6,67 +6,8 @@ description: users.getFullUser parameters, return type and example [Back to methods index](index.md) -*You cannot use this method directly, use the get_pwr_chat, get_info, get_full_info methods instead (see https://daniil.it/MadelineProto for more info)* +**You cannot use this method directly, use the get_pwr_chat, get_info, get_full_info methods instead (see https://daniil.it/MadelineProto for more info)** -### Parameters: - -| Name | Type | Required | -|----------|:-------------:|---------:| -|id|[InputUser](../types/InputUser.md) | Yes| - - -### Return type: [UserFull](../types/UserFull.md) - -### Example: - - -``` -$MadelineProto = new \danog\MadelineProto\API(); -if (isset($token)) { // Login as a bot - $MadelineProto->bot_login($token); -} -if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } - $MadelineProto->complete_phone_login($code); -} - -$UserFull = $MadelineProto->users->getFullUser(['id' => InputUser, ]); -``` - -Or, if you're using the [PWRTelegram HTTP API](https://pwrtelegram.xyz): - -### As a bot: - -POST/GET to `https://api.pwrtelegram.xyz/botTOKEN/madeline` - -Parameters: - -* method - users.getFullUser -* params - `{"id": InputUser, }` - - - -### As a user: - -POST/GET to `https://api.pwrtelegram.xyz/userTOKEN/users.getFullUser` - -Parameters: - -id - Json encoded InputUser - - - -Or, if you're into Lua: - -``` -UserFull = users.getFullUser({id=InputUser, }) -``` - diff --git a/old_docs/API_docs_v27/constructors/README.md b/old_docs/API_docs_v27/constructors/README.md index 018a5c23..09e43b13 100644 --- a/old_docs/API_docs_v27/constructors/README.md +++ b/old_docs/API_docs_v27/constructors/README.md @@ -4,9 +4,6 @@ description: List of constructors --- # Constructors [Back to API documentation index](..) - - - ***

[$accountDaysTTL](../constructors/accountDaysTTL.md) = \['days' => [int](../types/int.md), \]; diff --git a/old_docs/API_docs_v27/methods/auth_logOut.md b/old_docs/API_docs_v27/methods/auth_logOut.md index 12159bab..7d5bb3f7 100644 --- a/old_docs/API_docs_v27/methods/auth_logOut.md +++ b/old_docs/API_docs_v27/methods/auth_logOut.md @@ -6,61 +6,8 @@ description: auth.logOut parameters, return type and example [Back to methods index](index.md) -*You cannot use this method directly, use the logout method instead (see https://daniil.it/MadelineProto for more info)* +**You cannot use this method directly, use the logout method instead (see https://daniil.it/MadelineProto for more info)** - - -### Return type: [Bool](../types/Bool.md) - -### Example: - - -``` -$MadelineProto = new \danog\MadelineProto\API(); -if (isset($token)) { // Login as a bot - $MadelineProto->bot_login($token); -} -if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } - $MadelineProto->complete_phone_login($code); -} - -$Bool = $MadelineProto->auth->logOut(); -``` - -Or, if you're using the [PWRTelegram HTTP API](https://pwrtelegram.xyz): - -### As a bot: - -POST/GET to `https://api.pwrtelegram.xyz/botTOKEN/madeline` - -Parameters: - -* method - auth.logOut -* params - `{}` - - - -### As a user: - -POST/GET to `https://api.pwrtelegram.xyz/userTOKEN/auth.logOut` - -Parameters: - - - - -Or, if you're into Lua: - -``` -Bool = auth.logOut({}) -``` - diff --git a/old_docs/API_docs_v27/methods/auth_sendCode.md b/old_docs/API_docs_v27/methods/auth_sendCode.md index 43bc28ee..22d1df94 100644 --- a/old_docs/API_docs_v27/methods/auth_sendCode.md +++ b/old_docs/API_docs_v27/methods/auth_sendCode.md @@ -6,75 +6,8 @@ description: auth.sendCode parameters, return type and example [Back to methods index](index.md) -*You cannot use this method directly, use the phone_login method instead (see https://daniil.it/MadelineProto for more info)* +**You cannot use this method directly, use the phone_login method instead (see https://daniil.it/MadelineProto for more info)** -### Parameters: - -| Name | Type | Required | -|----------|:-------------:|---------:| -|phone\_number|[string](../types/string.md) | Yes| -|sms\_type|[int](../types/int.md) | Yes| -|api\_id|[int](../types/int.md) | Yes| -|api\_hash|[string](../types/string.md) | Yes| -|lang\_code|[string](../types/string.md) | Yes| - - -### Return type: [auth\_SentCode](../types/auth_SentCode.md) - -### Example: - - -``` -$MadelineProto = new \danog\MadelineProto\API(); -if (isset($token)) { // Login as a bot - $MadelineProto->bot_login($token); -} -if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } - $MadelineProto->complete_phone_login($code); -} - -$auth_SentCode = $MadelineProto->auth->sendCode(['phone_number' => 'string', 'sms_type' => int, 'api_id' => int, 'api_hash' => 'string', 'lang_code' => 'string', ]); -``` - -Or, if you're using the [PWRTelegram HTTP API](https://pwrtelegram.xyz): - -### As a bot: - -POST/GET to `https://api.pwrtelegram.xyz/botTOKEN/madeline` - -Parameters: - -* method - auth.sendCode -* params - `{"phone_number": "string", "sms_type": int, "api_id": int, "api_hash": "string", "lang_code": "string", }` - - - -### As a user: - -POST/GET to `https://api.pwrtelegram.xyz/userTOKEN/auth.sendCode` - -Parameters: - -phone_number - Json encoded string -sms_type - Json encoded int -api_id - Json encoded int -api_hash - Json encoded string -lang_code - Json encoded string - - - -Or, if you're into Lua: - -``` -auth_SentCode = auth.sendCode({phone_number='string', sms_type=int, api_id=int, api_hash='string', lang_code='string', }) -``` - diff --git a/old_docs/API_docs_v27/methods/auth_signIn.md b/old_docs/API_docs_v27/methods/auth_signIn.md index 75c50d70..ab40bb4d 100644 --- a/old_docs/API_docs_v27/methods/auth_signIn.md +++ b/old_docs/API_docs_v27/methods/auth_signIn.md @@ -6,71 +6,8 @@ description: auth.signIn parameters, return type and example [Back to methods index](index.md) -*You cannot use this method directly, use the complete_phone_login method instead (see https://daniil.it/MadelineProto for more info)* +**You cannot use this method directly, use the complete_phone_login method instead (see https://daniil.it/MadelineProto for more info)** -### Parameters: - -| Name | Type | Required | -|----------|:-------------:|---------:| -|phone\_number|[string](../types/string.md) | Yes| -|phone\_code\_hash|[string](../types/string.md) | Yes| -|phone\_code|[string](../types/string.md) | Yes| - - -### Return type: [auth\_Authorization](../types/auth_Authorization.md) - -### Example: - - -``` -$MadelineProto = new \danog\MadelineProto\API(); -if (isset($token)) { // Login as a bot - $MadelineProto->bot_login($token); -} -if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } - $MadelineProto->complete_phone_login($code); -} - -$auth_Authorization = $MadelineProto->auth->signIn(['phone_number' => 'string', 'phone_code_hash' => 'string', 'phone_code' => 'string', ]); -``` - -Or, if you're using the [PWRTelegram HTTP API](https://pwrtelegram.xyz): - -### As a bot: - -POST/GET to `https://api.pwrtelegram.xyz/botTOKEN/madeline` - -Parameters: - -* method - auth.signIn -* params - `{"phone_number": "string", "phone_code_hash": "string", "phone_code": "string", }` - - - -### As a user: - -POST/GET to `https://api.pwrtelegram.xyz/userTOKEN/auth.signIn` - -Parameters: - -phone_number - Json encoded string -phone_code_hash - Json encoded string -phone_code - Json encoded string - - - -Or, if you're into Lua: - -``` -auth_Authorization = auth.signIn({phone_number='string', phone_code_hash='string', phone_code='string', }) -``` - diff --git a/old_docs/API_docs_v27/methods/auth_signUp.md b/old_docs/API_docs_v27/methods/auth_signUp.md index f2a72b68..042d1191 100644 --- a/old_docs/API_docs_v27/methods/auth_signUp.md +++ b/old_docs/API_docs_v27/methods/auth_signUp.md @@ -6,75 +6,8 @@ description: auth.signUp parameters, return type and example [Back to methods index](index.md) -*You cannot use this method directly, use the complete_signup method instead (see https://daniil.it/MadelineProto for more info)* +**You cannot use this method directly, use the complete_signup method instead (see https://daniil.it/MadelineProto for more info)** -### Parameters: - -| Name | Type | Required | -|----------|:-------------:|---------:| -|phone\_number|[string](../types/string.md) | Yes| -|phone\_code\_hash|[string](../types/string.md) | Yes| -|phone\_code|[string](../types/string.md) | Yes| -|first\_name|[string](../types/string.md) | Yes| -|last\_name|[string](../types/string.md) | Yes| - - -### Return type: [auth\_Authorization](../types/auth_Authorization.md) - -### Example: - - -``` -$MadelineProto = new \danog\MadelineProto\API(); -if (isset($token)) { // Login as a bot - $MadelineProto->bot_login($token); -} -if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } - $MadelineProto->complete_phone_login($code); -} - -$auth_Authorization = $MadelineProto->auth->signUp(['phone_number' => 'string', 'phone_code_hash' => 'string', 'phone_code' => 'string', 'first_name' => 'string', 'last_name' => 'string', ]); -``` - -Or, if you're using the [PWRTelegram HTTP API](https://pwrtelegram.xyz): - -### As a bot: - -POST/GET to `https://api.pwrtelegram.xyz/botTOKEN/madeline` - -Parameters: - -* method - auth.signUp -* params - `{"phone_number": "string", "phone_code_hash": "string", "phone_code": "string", "first_name": "string", "last_name": "string", }` - - - -### As a user: - -POST/GET to `https://api.pwrtelegram.xyz/userTOKEN/auth.signUp` - -Parameters: - -phone_number - Json encoded string -phone_code_hash - Json encoded string -phone_code - Json encoded string -first_name - Json encoded string -last_name - Json encoded string - - - -Or, if you're into Lua: - -``` -auth_Authorization = auth.signUp({phone_number='string', phone_code_hash='string', phone_code='string', first_name='string', last_name='string', }) -``` - diff --git a/old_docs/API_docs_v27/methods/contacts_resolveUsername.md b/old_docs/API_docs_v27/methods/contacts_resolveUsername.md index 353d1f0c..b665b382 100644 --- a/old_docs/API_docs_v27/methods/contacts_resolveUsername.md +++ b/old_docs/API_docs_v27/methods/contacts_resolveUsername.md @@ -6,67 +6,8 @@ description: contacts.resolveUsername parameters, return type and example [Back to methods index](index.md) -*You cannot use this method directly, use the resolve_username, get_pwr_chat, get_info, get_full_info methods instead (see https://daniil.it/MadelineProto for more info)* +**You cannot use this method directly, use the resolve_username, get_pwr_chat, get_info, get_full_info methods instead (see https://daniil.it/MadelineProto for more info)** -### Parameters: - -| Name | Type | Required | -|----------|:-------------:|---------:| -|username|[string](../types/string.md) | Yes| - - -### Return type: [User](../types/User.md) - -### Example: - - -``` -$MadelineProto = new \danog\MadelineProto\API(); -if (isset($token)) { // Login as a bot - $MadelineProto->bot_login($token); -} -if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } - $MadelineProto->complete_phone_login($code); -} - -$User = $MadelineProto->contacts->resolveUsername(['username' => 'string', ]); -``` - -Or, if you're using the [PWRTelegram HTTP API](https://pwrtelegram.xyz): - -### As a bot: - -POST/GET to `https://api.pwrtelegram.xyz/botTOKEN/madeline` - -Parameters: - -* method - contacts.resolveUsername -* params - `{"username": "string", }` - - - -### As a user: - -POST/GET to `https://api.pwrtelegram.xyz/userTOKEN/contacts.resolveUsername` - -Parameters: - -username - Json encoded string - - - -Or, if you're into Lua: - -``` -User = contacts.resolveUsername({username='string', }) -``` - diff --git a/old_docs/API_docs_v27/methods/messages_acceptEncryption.md b/old_docs/API_docs_v27/methods/messages_acceptEncryption.md index 548087b6..243c4c00 100644 --- a/old_docs/API_docs_v27/methods/messages_acceptEncryption.md +++ b/old_docs/API_docs_v27/methods/messages_acceptEncryption.md @@ -6,71 +6,8 @@ description: messages.acceptEncryption parameters, return type and example [Back to methods index](index.md) -*You cannot use this method directly, see https://daniil.it/MadelineProto for more info on handling secret chats* +**You cannot use this method directly, see https://daniil.it/MadelineProto for more info on handling secret chats** -### Parameters: - -| Name | Type | Required | -|----------|:-------------:|---------:| -|peer|[InputEncryptedChat](../types/InputEncryptedChat.md) | Yes| -|g\_b|[bytes](../types/bytes.md) | Yes| -|key\_fingerprint|[long](../types/long.md) | Yes| - - -### Return type: [EncryptedChat](../types/EncryptedChat.md) - -### Example: - - -``` -$MadelineProto = new \danog\MadelineProto\API(); -if (isset($token)) { // Login as a bot - $MadelineProto->bot_login($token); -} -if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } - $MadelineProto->complete_phone_login($code); -} - -$EncryptedChat = $MadelineProto->messages->acceptEncryption(['peer' => InputEncryptedChat, 'g_b' => 'bytes', 'key_fingerprint' => long, ]); -``` - -Or, if you're using the [PWRTelegram HTTP API](https://pwrtelegram.xyz): - -### As a bot: - -POST/GET to `https://api.pwrtelegram.xyz/botTOKEN/madeline` - -Parameters: - -* method - messages.acceptEncryption -* params - `{"peer": InputEncryptedChat, "g_b": "bytes", "key_fingerprint": long, }` - - - -### As a user: - -POST/GET to `https://api.pwrtelegram.xyz/userTOKEN/messages.acceptEncryption` - -Parameters: - -peer - Json encoded InputEncryptedChat -g_b - Json encoded bytes -key_fingerprint - Json encoded long - - - -Or, if you're into Lua: - -``` -EncryptedChat = messages.acceptEncryption({peer=InputEncryptedChat, g_b='bytes', key_fingerprint=long, }) -``` - diff --git a/old_docs/API_docs_v27/methods/messages_discardEncryption.md b/old_docs/API_docs_v27/methods/messages_discardEncryption.md index 72648e9d..3a9dc58b 100644 --- a/old_docs/API_docs_v27/methods/messages_discardEncryption.md +++ b/old_docs/API_docs_v27/methods/messages_discardEncryption.md @@ -6,67 +6,8 @@ description: messages.discardEncryption parameters, return type and example [Back to methods index](index.md) -*You cannot use this method directly, see https://daniil.it/MadelineProto for more info on handling secret chats* +**You cannot use this method directly, see https://daniil.it/MadelineProto for more info on handling secret chats** -### Parameters: - -| Name | Type | Required | -|----------|:-------------:|---------:| -|chat\_id|[int](../types/int.md) | Yes| - - -### Return type: [Bool](../types/Bool.md) - -### Example: - - -``` -$MadelineProto = new \danog\MadelineProto\API(); -if (isset($token)) { // Login as a bot - $MadelineProto->bot_login($token); -} -if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } - $MadelineProto->complete_phone_login($code); -} - -$Bool = $MadelineProto->messages->discardEncryption(['chat_id' => int, ]); -``` - -Or, if you're using the [PWRTelegram HTTP API](https://pwrtelegram.xyz): - -### As a bot: - -POST/GET to `https://api.pwrtelegram.xyz/botTOKEN/madeline` - -Parameters: - -* method - messages.discardEncryption -* params - `{"chat_id": int, }` - - - -### As a user: - -POST/GET to `https://api.pwrtelegram.xyz/userTOKEN/messages.discardEncryption` - -Parameters: - -chat_id - Json encoded int - - - -Or, if you're into Lua: - -``` -Bool = messages.discardEncryption({chat_id=int, }) -``` - diff --git a/old_docs/API_docs_v27/methods/messages_getFullChat.md b/old_docs/API_docs_v27/methods/messages_getFullChat.md index 62102b64..ffa9c281 100644 --- a/old_docs/API_docs_v27/methods/messages_getFullChat.md +++ b/old_docs/API_docs_v27/methods/messages_getFullChat.md @@ -6,67 +6,8 @@ description: messages.getFullChat parameters, return type and example [Back to methods index](index.md) -*You cannot use this method directly, use the get_pwr_chat, get_info, get_full_info methods instead (see https://daniil.it/MadelineProto for more info)* +**You cannot use this method directly, use the get_pwr_chat, get_info, get_full_info methods instead (see https://daniil.it/MadelineProto for more info)** -### Parameters: - -| Name | Type | Required | -|----------|:-------------:|---------:| -|chat\_id|[InputPeer](../types/InputPeer.md) | Yes| - - -### Return type: [messages\_ChatFull](../types/messages_ChatFull.md) - -### Example: - - -``` -$MadelineProto = new \danog\MadelineProto\API(); -if (isset($token)) { // Login as a bot - $MadelineProto->bot_login($token); -} -if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } - $MadelineProto->complete_phone_login($code); -} - -$messages_ChatFull = $MadelineProto->messages->getFullChat(['chat_id' => InputPeer, ]); -``` - -Or, if you're using the [PWRTelegram HTTP API](https://pwrtelegram.xyz): - -### As a bot: - -POST/GET to `https://api.pwrtelegram.xyz/botTOKEN/madeline` - -Parameters: - -* method - messages.getFullChat -* params - `{"chat_id": InputPeer, }` - - - -### As a user: - -POST/GET to `https://api.pwrtelegram.xyz/userTOKEN/messages.getFullChat` - -Parameters: - -chat_id - Json encoded InputPeer - - - -Or, if you're into Lua: - -``` -messages_ChatFull = messages.getFullChat({chat_id=InputPeer, }) -``` - diff --git a/old_docs/API_docs_v27/methods/messages_requestEncryption.md b/old_docs/API_docs_v27/methods/messages_requestEncryption.md index 2fd1f825..c8476667 100644 --- a/old_docs/API_docs_v27/methods/messages_requestEncryption.md +++ b/old_docs/API_docs_v27/methods/messages_requestEncryption.md @@ -6,69 +6,8 @@ description: messages.requestEncryption parameters, return type and example [Back to methods index](index.md) -*You cannot use this method directly, see https://daniil.it/MadelineProto for more info on handling secret chats* +**You cannot use this method directly, see https://daniil.it/MadelineProto for more info on handling secret chats** -### Parameters: - -| Name | Type | Required | -|----------|:-------------:|---------:| -|user\_id|[InputUser](../types/InputUser.md) | Yes| -|g\_a|[bytes](../types/bytes.md) | Yes| - - -### Return type: [EncryptedChat](../types/EncryptedChat.md) - -### Example: - - -``` -$MadelineProto = new \danog\MadelineProto\API(); -if (isset($token)) { // Login as a bot - $MadelineProto->bot_login($token); -} -if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } - $MadelineProto->complete_phone_login($code); -} - -$EncryptedChat = $MadelineProto->messages->requestEncryption(['user_id' => InputUser, 'g_a' => 'bytes', ]); -``` - -Or, if you're using the [PWRTelegram HTTP API](https://pwrtelegram.xyz): - -### As a bot: - -POST/GET to `https://api.pwrtelegram.xyz/botTOKEN/madeline` - -Parameters: - -* method - messages.requestEncryption -* params - `{"user_id": InputUser, "g_a": "bytes", }` - - - -### As a user: - -POST/GET to `https://api.pwrtelegram.xyz/userTOKEN/messages.requestEncryption` - -Parameters: - -user_id - Json encoded InputUser -g_a - Json encoded bytes - - - -Or, if you're into Lua: - -``` -EncryptedChat = messages.requestEncryption({user_id=InputUser, g_a='bytes', }) -``` - diff --git a/old_docs/API_docs_v27/methods/updates_getDifference.md b/old_docs/API_docs_v27/methods/updates_getDifference.md index 53c7b078..9bcee79a 100644 --- a/old_docs/API_docs_v27/methods/updates_getDifference.md +++ b/old_docs/API_docs_v27/methods/updates_getDifference.md @@ -6,71 +6,8 @@ description: updates.getDifference parameters, return type and example [Back to methods index](index.md) -*You cannot use this method directly, see https://daniil.it/MadelineProto for more info on handling updates* +**You cannot use this method directly, see https://daniil.it/MadelineProto for more info on handling updates** -### Parameters: - -| Name | Type | Required | -|----------|:-------------:|---------:| -|pts|[int](../types/int.md) | Yes| -|date|[int](../types/int.md) | Yes| -|qts|[int](../types/int.md) | Yes| - - -### Return type: [updates\_Difference](../types/updates_Difference.md) - -### Example: - - -``` -$MadelineProto = new \danog\MadelineProto\API(); -if (isset($token)) { // Login as a bot - $MadelineProto->bot_login($token); -} -if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } - $MadelineProto->complete_phone_login($code); -} - -$updates_Difference = $MadelineProto->updates->getDifference(['pts' => int, 'date' => int, 'qts' => int, ]); -``` - -Or, if you're using the [PWRTelegram HTTP API](https://pwrtelegram.xyz): - -### As a bot: - -POST/GET to `https://api.pwrtelegram.xyz/botTOKEN/madeline` - -Parameters: - -* method - updates.getDifference -* params - `{"pts": int, "date": int, "qts": int, }` - - - -### As a user: - -POST/GET to `https://api.pwrtelegram.xyz/userTOKEN/updates.getDifference` - -Parameters: - -pts - Json encoded int -date - Json encoded int -qts - Json encoded int - - - -Or, if you're into Lua: - -``` -updates_Difference = updates.getDifference({pts=int, date=int, qts=int, }) -``` - diff --git a/old_docs/API_docs_v27/methods/updates_getState.md b/old_docs/API_docs_v27/methods/updates_getState.md index 51f6ae80..fd5955ba 100644 --- a/old_docs/API_docs_v27/methods/updates_getState.md +++ b/old_docs/API_docs_v27/methods/updates_getState.md @@ -6,61 +6,8 @@ description: updates.getState parameters, return type and example [Back to methods index](index.md) -*You cannot use this method directly, see https://daniil.it/MadelineProto for more info on handling updates* +**You cannot use this method directly, see https://daniil.it/MadelineProto for more info on handling updates** - - -### Return type: [updates\_State](../types/updates_State.md) - -### Example: - - -``` -$MadelineProto = new \danog\MadelineProto\API(); -if (isset($token)) { // Login as a bot - $MadelineProto->bot_login($token); -} -if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } - $MadelineProto->complete_phone_login($code); -} - -$updates_State = $MadelineProto->updates->getState(); -``` - -Or, if you're using the [PWRTelegram HTTP API](https://pwrtelegram.xyz): - -### As a bot: - -POST/GET to `https://api.pwrtelegram.xyz/botTOKEN/madeline` - -Parameters: - -* method - updates.getState -* params - `{}` - - - -### As a user: - -POST/GET to `https://api.pwrtelegram.xyz/userTOKEN/updates.getState` - -Parameters: - - - - -Or, if you're into Lua: - -``` -updates_State = updates.getState({}) -``` - diff --git a/old_docs/API_docs_v27/methods/upload_getFile.md b/old_docs/API_docs_v27/methods/upload_getFile.md index a1003003..add7d54e 100644 --- a/old_docs/API_docs_v27/methods/upload_getFile.md +++ b/old_docs/API_docs_v27/methods/upload_getFile.md @@ -6,71 +6,8 @@ description: upload.getFile parameters, return type and example [Back to methods index](index.md) -*You cannot use this method directly, use the upload, download_to_stream, download_to_file, download_to_dir methods instead; see https://daniil.it/MadelineProto for more info* +**You cannot use this method directly, use the upload, download_to_stream, download_to_file, download_to_dir methods instead; see https://daniil.it/MadelineProto for more info** -### Parameters: - -| Name | Type | Required | -|----------|:-------------:|---------:| -|location|[InputFileLocation](../types/InputFileLocation.md) | Yes| -|offset|[int](../types/int.md) | Yes| -|limit|[int](../types/int.md) | Yes| - - -### Return type: [upload\_File](../types/upload_File.md) - -### Example: - - -``` -$MadelineProto = new \danog\MadelineProto\API(); -if (isset($token)) { // Login as a bot - $MadelineProto->bot_login($token); -} -if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } - $MadelineProto->complete_phone_login($code); -} - -$upload_File = $MadelineProto->upload->getFile(['location' => InputFileLocation, 'offset' => int, 'limit' => int, ]); -``` - -Or, if you're using the [PWRTelegram HTTP API](https://pwrtelegram.xyz): - -### As a bot: - -POST/GET to `https://api.pwrtelegram.xyz/botTOKEN/madeline` - -Parameters: - -* method - upload.getFile -* params - `{"location": InputFileLocation, "offset": int, "limit": int, }` - - - -### As a user: - -POST/GET to `https://api.pwrtelegram.xyz/userTOKEN/upload.getFile` - -Parameters: - -location - Json encoded InputFileLocation -offset - Json encoded int -limit - Json encoded int - - - -Or, if you're into Lua: - -``` -upload_File = upload.getFile({location=InputFileLocation, offset=int, limit=int, }) -``` - diff --git a/old_docs/API_docs_v27/methods/upload_saveBigFilePart.md b/old_docs/API_docs_v27/methods/upload_saveBigFilePart.md index e5c96d89..b1c3ea28 100644 --- a/old_docs/API_docs_v27/methods/upload_saveBigFilePart.md +++ b/old_docs/API_docs_v27/methods/upload_saveBigFilePart.md @@ -6,73 +6,8 @@ description: upload.saveBigFilePart parameters, return type and example [Back to methods index](index.md) -*You cannot use this method directly, use the upload, download_to_stream, download_to_file, download_to_dir methods instead; see https://daniil.it/MadelineProto for more info* +**You cannot use this method directly, use the upload, download_to_stream, download_to_file, download_to_dir methods instead; see https://daniil.it/MadelineProto for more info** -### Parameters: - -| Name | Type | Required | -|----------|:-------------:|---------:| -|file\_id|[long](../types/long.md) | Yes| -|file\_part|[int](../types/int.md) | Yes| -|file\_total\_parts|[int](../types/int.md) | Yes| -|bytes|[bytes](../types/bytes.md) | Yes| - - -### Return type: [Bool](../types/Bool.md) - -### Example: - - -``` -$MadelineProto = new \danog\MadelineProto\API(); -if (isset($token)) { // Login as a bot - $MadelineProto->bot_login($token); -} -if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } - $MadelineProto->complete_phone_login($code); -} - -$Bool = $MadelineProto->upload->saveBigFilePart(['file_id' => long, 'file_part' => int, 'file_total_parts' => int, 'bytes' => 'bytes', ]); -``` - -Or, if you're using the [PWRTelegram HTTP API](https://pwrtelegram.xyz): - -### As a bot: - -POST/GET to `https://api.pwrtelegram.xyz/botTOKEN/madeline` - -Parameters: - -* method - upload.saveBigFilePart -* params - `{"file_id": long, "file_part": int, "file_total_parts": int, "bytes": "bytes", }` - - - -### As a user: - -POST/GET to `https://api.pwrtelegram.xyz/userTOKEN/upload.saveBigFilePart` - -Parameters: - -file_id - Json encoded long -file_part - Json encoded int -file_total_parts - Json encoded int -bytes - Json encoded bytes - - - -Or, if you're into Lua: - -``` -Bool = upload.saveBigFilePart({file_id=long, file_part=int, file_total_parts=int, bytes='bytes', }) -``` - diff --git a/old_docs/API_docs_v27/methods/upload_saveFilePart.md b/old_docs/API_docs_v27/methods/upload_saveFilePart.md index 1c16e4b2..c482f321 100644 --- a/old_docs/API_docs_v27/methods/upload_saveFilePart.md +++ b/old_docs/API_docs_v27/methods/upload_saveFilePart.md @@ -6,71 +6,8 @@ description: upload.saveFilePart parameters, return type and example [Back to methods index](index.md) -*You cannot use this method directly, use the upload, download_to_stream, download_to_file, download_to_dir methods instead; see https://daniil.it/MadelineProto for more info* +**You cannot use this method directly, use the upload, download_to_stream, download_to_file, download_to_dir methods instead; see https://daniil.it/MadelineProto for more info** -### Parameters: - -| Name | Type | Required | -|----------|:-------------:|---------:| -|file\_id|[long](../types/long.md) | Yes| -|file\_part|[int](../types/int.md) | Yes| -|bytes|[bytes](../types/bytes.md) | Yes| - - -### Return type: [Bool](../types/Bool.md) - -### Example: - - -``` -$MadelineProto = new \danog\MadelineProto\API(); -if (isset($token)) { // Login as a bot - $MadelineProto->bot_login($token); -} -if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } - $MadelineProto->complete_phone_login($code); -} - -$Bool = $MadelineProto->upload->saveFilePart(['file_id' => long, 'file_part' => int, 'bytes' => 'bytes', ]); -``` - -Or, if you're using the [PWRTelegram HTTP API](https://pwrtelegram.xyz): - -### As a bot: - -POST/GET to `https://api.pwrtelegram.xyz/botTOKEN/madeline` - -Parameters: - -* method - upload.saveFilePart -* params - `{"file_id": long, "file_part": int, "bytes": "bytes", }` - - - -### As a user: - -POST/GET to `https://api.pwrtelegram.xyz/userTOKEN/upload.saveFilePart` - -Parameters: - -file_id - Json encoded long -file_part - Json encoded int -bytes - Json encoded bytes - - - -Or, if you're into Lua: - -``` -Bool = upload.saveFilePart({file_id=long, file_part=int, bytes='bytes', }) -``` - diff --git a/old_docs/API_docs_v27/methods/users_getFullUser.md b/old_docs/API_docs_v27/methods/users_getFullUser.md index 645ab12e..4ec831ec 100644 --- a/old_docs/API_docs_v27/methods/users_getFullUser.md +++ b/old_docs/API_docs_v27/methods/users_getFullUser.md @@ -6,67 +6,8 @@ description: users.getFullUser parameters, return type and example [Back to methods index](index.md) -*You cannot use this method directly, use the get_pwr_chat, get_info, get_full_info methods instead (see https://daniil.it/MadelineProto for more info)* +**You cannot use this method directly, use the get_pwr_chat, get_info, get_full_info methods instead (see https://daniil.it/MadelineProto for more info)** -### Parameters: - -| Name | Type | Required | -|----------|:-------------:|---------:| -|id|[InputUser](../types/InputUser.md) | Yes| - - -### Return type: [UserFull](../types/UserFull.md) - -### Example: - - -``` -$MadelineProto = new \danog\MadelineProto\API(); -if (isset($token)) { // Login as a bot - $MadelineProto->bot_login($token); -} -if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } - $MadelineProto->complete_phone_login($code); -} - -$UserFull = $MadelineProto->users->getFullUser(['id' => InputUser, ]); -``` - -Or, if you're using the [PWRTelegram HTTP API](https://pwrtelegram.xyz): - -### As a bot: - -POST/GET to `https://api.pwrtelegram.xyz/botTOKEN/madeline` - -Parameters: - -* method - users.getFullUser -* params - `{"id": InputUser, }` - - - -### As a user: - -POST/GET to `https://api.pwrtelegram.xyz/userTOKEN/users.getFullUser` - -Parameters: - -id - Json encoded InputUser - - - -Or, if you're into Lua: - -``` -UserFull = users.getFullUser({id=InputUser, }) -``` - diff --git a/old_docs/API_docs_v33/constructors/README.md b/old_docs/API_docs_v33/constructors/README.md index 161eefb9..99fc0cfb 100644 --- a/old_docs/API_docs_v33/constructors/README.md +++ b/old_docs/API_docs_v33/constructors/README.md @@ -4,9 +4,6 @@ description: List of constructors --- # Constructors [Back to API documentation index](..) - - - ***

[$accountDaysTTL](../constructors/accountDaysTTL.md) = \['days' => [int](../types/int.md), \]; diff --git a/old_docs/API_docs_v33/methods/auth_importBotAuthorization.md b/old_docs/API_docs_v33/methods/auth_importBotAuthorization.md index 0d8836b6..57521a13 100644 --- a/old_docs/API_docs_v33/methods/auth_importBotAuthorization.md +++ b/old_docs/API_docs_v33/methods/auth_importBotAuthorization.md @@ -6,71 +6,8 @@ description: auth.importBotAuthorization parameters, return type and example [Back to methods index](index.md) -*You cannot use this method directly, use the bot_login method instead (see https://daniil.it/MadelineProto for more info)* +**You cannot use this method directly, use the bot_login method instead (see https://daniil.it/MadelineProto for more info)** -### Parameters: - -| Name | Type | Required | -|----------|:-------------:|---------:| -|api\_id|[int](../types/int.md) | Yes| -|api\_hash|[string](../types/string.md) | Yes| -|bot\_auth\_token|[string](../types/string.md) | Yes| - - -### Return type: [auth\_Authorization](../types/auth_Authorization.md) - -### Example: - - -``` -$MadelineProto = new \danog\MadelineProto\API(); -if (isset($token)) { // Login as a bot - $MadelineProto->bot_login($token); -} -if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } - $MadelineProto->complete_phone_login($code); -} - -$auth_Authorization = $MadelineProto->auth->importBotAuthorization(['api_id' => int, 'api_hash' => 'string', 'bot_auth_token' => 'string', ]); -``` - -Or, if you're using the [PWRTelegram HTTP API](https://pwrtelegram.xyz): - -### As a bot: - -POST/GET to `https://api.pwrtelegram.xyz/botTOKEN/madeline` - -Parameters: - -* method - auth.importBotAuthorization -* params - `{"api_id": int, "api_hash": "string", "bot_auth_token": "string", }` - - - -### As a user: - -POST/GET to `https://api.pwrtelegram.xyz/userTOKEN/auth.importBotAuthorization` - -Parameters: - -api_id - Json encoded int -api_hash - Json encoded string -bot_auth_token - Json encoded string - - - -Or, if you're into Lua: - -``` -auth_Authorization = auth.importBotAuthorization({api_id=int, api_hash='string', bot_auth_token='string', }) -``` - diff --git a/old_docs/API_docs_v33/methods/auth_logOut.md b/old_docs/API_docs_v33/methods/auth_logOut.md index 12159bab..7d5bb3f7 100644 --- a/old_docs/API_docs_v33/methods/auth_logOut.md +++ b/old_docs/API_docs_v33/methods/auth_logOut.md @@ -6,61 +6,8 @@ description: auth.logOut parameters, return type and example [Back to methods index](index.md) -*You cannot use this method directly, use the logout method instead (see https://daniil.it/MadelineProto for more info)* +**You cannot use this method directly, use the logout method instead (see https://daniil.it/MadelineProto for more info)** - - -### Return type: [Bool](../types/Bool.md) - -### Example: - - -``` -$MadelineProto = new \danog\MadelineProto\API(); -if (isset($token)) { // Login as a bot - $MadelineProto->bot_login($token); -} -if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } - $MadelineProto->complete_phone_login($code); -} - -$Bool = $MadelineProto->auth->logOut(); -``` - -Or, if you're using the [PWRTelegram HTTP API](https://pwrtelegram.xyz): - -### As a bot: - -POST/GET to `https://api.pwrtelegram.xyz/botTOKEN/madeline` - -Parameters: - -* method - auth.logOut -* params - `{}` - - - -### As a user: - -POST/GET to `https://api.pwrtelegram.xyz/userTOKEN/auth.logOut` - -Parameters: - - - - -Or, if you're into Lua: - -``` -Bool = auth.logOut({}) -``` - diff --git a/old_docs/API_docs_v33/methods/auth_sendCode.md b/old_docs/API_docs_v33/methods/auth_sendCode.md index 43bc28ee..22d1df94 100644 --- a/old_docs/API_docs_v33/methods/auth_sendCode.md +++ b/old_docs/API_docs_v33/methods/auth_sendCode.md @@ -6,75 +6,8 @@ description: auth.sendCode parameters, return type and example [Back to methods index](index.md) -*You cannot use this method directly, use the phone_login method instead (see https://daniil.it/MadelineProto for more info)* +**You cannot use this method directly, use the phone_login method instead (see https://daniil.it/MadelineProto for more info)** -### Parameters: - -| Name | Type | Required | -|----------|:-------------:|---------:| -|phone\_number|[string](../types/string.md) | Yes| -|sms\_type|[int](../types/int.md) | Yes| -|api\_id|[int](../types/int.md) | Yes| -|api\_hash|[string](../types/string.md) | Yes| -|lang\_code|[string](../types/string.md) | Yes| - - -### Return type: [auth\_SentCode](../types/auth_SentCode.md) - -### Example: - - -``` -$MadelineProto = new \danog\MadelineProto\API(); -if (isset($token)) { // Login as a bot - $MadelineProto->bot_login($token); -} -if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } - $MadelineProto->complete_phone_login($code); -} - -$auth_SentCode = $MadelineProto->auth->sendCode(['phone_number' => 'string', 'sms_type' => int, 'api_id' => int, 'api_hash' => 'string', 'lang_code' => 'string', ]); -``` - -Or, if you're using the [PWRTelegram HTTP API](https://pwrtelegram.xyz): - -### As a bot: - -POST/GET to `https://api.pwrtelegram.xyz/botTOKEN/madeline` - -Parameters: - -* method - auth.sendCode -* params - `{"phone_number": "string", "sms_type": int, "api_id": int, "api_hash": "string", "lang_code": "string", }` - - - -### As a user: - -POST/GET to `https://api.pwrtelegram.xyz/userTOKEN/auth.sendCode` - -Parameters: - -phone_number - Json encoded string -sms_type - Json encoded int -api_id - Json encoded int -api_hash - Json encoded string -lang_code - Json encoded string - - - -Or, if you're into Lua: - -``` -auth_SentCode = auth.sendCode({phone_number='string', sms_type=int, api_id=int, api_hash='string', lang_code='string', }) -``` - diff --git a/old_docs/API_docs_v33/methods/auth_signIn.md b/old_docs/API_docs_v33/methods/auth_signIn.md index 75c50d70..ab40bb4d 100644 --- a/old_docs/API_docs_v33/methods/auth_signIn.md +++ b/old_docs/API_docs_v33/methods/auth_signIn.md @@ -6,71 +6,8 @@ description: auth.signIn parameters, return type and example [Back to methods index](index.md) -*You cannot use this method directly, use the complete_phone_login method instead (see https://daniil.it/MadelineProto for more info)* +**You cannot use this method directly, use the complete_phone_login method instead (see https://daniil.it/MadelineProto for more info)** -### Parameters: - -| Name | Type | Required | -|----------|:-------------:|---------:| -|phone\_number|[string](../types/string.md) | Yes| -|phone\_code\_hash|[string](../types/string.md) | Yes| -|phone\_code|[string](../types/string.md) | Yes| - - -### Return type: [auth\_Authorization](../types/auth_Authorization.md) - -### Example: - - -``` -$MadelineProto = new \danog\MadelineProto\API(); -if (isset($token)) { // Login as a bot - $MadelineProto->bot_login($token); -} -if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } - $MadelineProto->complete_phone_login($code); -} - -$auth_Authorization = $MadelineProto->auth->signIn(['phone_number' => 'string', 'phone_code_hash' => 'string', 'phone_code' => 'string', ]); -``` - -Or, if you're using the [PWRTelegram HTTP API](https://pwrtelegram.xyz): - -### As a bot: - -POST/GET to `https://api.pwrtelegram.xyz/botTOKEN/madeline` - -Parameters: - -* method - auth.signIn -* params - `{"phone_number": "string", "phone_code_hash": "string", "phone_code": "string", }` - - - -### As a user: - -POST/GET to `https://api.pwrtelegram.xyz/userTOKEN/auth.signIn` - -Parameters: - -phone_number - Json encoded string -phone_code_hash - Json encoded string -phone_code - Json encoded string - - - -Or, if you're into Lua: - -``` -auth_Authorization = auth.signIn({phone_number='string', phone_code_hash='string', phone_code='string', }) -``` - diff --git a/old_docs/API_docs_v33/methods/auth_signUp.md b/old_docs/API_docs_v33/methods/auth_signUp.md index f2a72b68..042d1191 100644 --- a/old_docs/API_docs_v33/methods/auth_signUp.md +++ b/old_docs/API_docs_v33/methods/auth_signUp.md @@ -6,75 +6,8 @@ description: auth.signUp parameters, return type and example [Back to methods index](index.md) -*You cannot use this method directly, use the complete_signup method instead (see https://daniil.it/MadelineProto for more info)* +**You cannot use this method directly, use the complete_signup method instead (see https://daniil.it/MadelineProto for more info)** -### Parameters: - -| Name | Type | Required | -|----------|:-------------:|---------:| -|phone\_number|[string](../types/string.md) | Yes| -|phone\_code\_hash|[string](../types/string.md) | Yes| -|phone\_code|[string](../types/string.md) | Yes| -|first\_name|[string](../types/string.md) | Yes| -|last\_name|[string](../types/string.md) | Yes| - - -### Return type: [auth\_Authorization](../types/auth_Authorization.md) - -### Example: - - -``` -$MadelineProto = new \danog\MadelineProto\API(); -if (isset($token)) { // Login as a bot - $MadelineProto->bot_login($token); -} -if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } - $MadelineProto->complete_phone_login($code); -} - -$auth_Authorization = $MadelineProto->auth->signUp(['phone_number' => 'string', 'phone_code_hash' => 'string', 'phone_code' => 'string', 'first_name' => 'string', 'last_name' => 'string', ]); -``` - -Or, if you're using the [PWRTelegram HTTP API](https://pwrtelegram.xyz): - -### As a bot: - -POST/GET to `https://api.pwrtelegram.xyz/botTOKEN/madeline` - -Parameters: - -* method - auth.signUp -* params - `{"phone_number": "string", "phone_code_hash": "string", "phone_code": "string", "first_name": "string", "last_name": "string", }` - - - -### As a user: - -POST/GET to `https://api.pwrtelegram.xyz/userTOKEN/auth.signUp` - -Parameters: - -phone_number - Json encoded string -phone_code_hash - Json encoded string -phone_code - Json encoded string -first_name - Json encoded string -last_name - Json encoded string - - - -Or, if you're into Lua: - -``` -auth_Authorization = auth.signUp({phone_number='string', phone_code_hash='string', phone_code='string', first_name='string', last_name='string', }) -``` - diff --git a/old_docs/API_docs_v33/methods/contacts_resolveUsername.md b/old_docs/API_docs_v33/methods/contacts_resolveUsername.md index 353d1f0c..b665b382 100644 --- a/old_docs/API_docs_v33/methods/contacts_resolveUsername.md +++ b/old_docs/API_docs_v33/methods/contacts_resolveUsername.md @@ -6,67 +6,8 @@ description: contacts.resolveUsername parameters, return type and example [Back to methods index](index.md) -*You cannot use this method directly, use the resolve_username, get_pwr_chat, get_info, get_full_info methods instead (see https://daniil.it/MadelineProto for more info)* +**You cannot use this method directly, use the resolve_username, get_pwr_chat, get_info, get_full_info methods instead (see https://daniil.it/MadelineProto for more info)** -### Parameters: - -| Name | Type | Required | -|----------|:-------------:|---------:| -|username|[string](../types/string.md) | Yes| - - -### Return type: [User](../types/User.md) - -### Example: - - -``` -$MadelineProto = new \danog\MadelineProto\API(); -if (isset($token)) { // Login as a bot - $MadelineProto->bot_login($token); -} -if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } - $MadelineProto->complete_phone_login($code); -} - -$User = $MadelineProto->contacts->resolveUsername(['username' => 'string', ]); -``` - -Or, if you're using the [PWRTelegram HTTP API](https://pwrtelegram.xyz): - -### As a bot: - -POST/GET to `https://api.pwrtelegram.xyz/botTOKEN/madeline` - -Parameters: - -* method - contacts.resolveUsername -* params - `{"username": "string", }` - - - -### As a user: - -POST/GET to `https://api.pwrtelegram.xyz/userTOKEN/contacts.resolveUsername` - -Parameters: - -username - Json encoded string - - - -Or, if you're into Lua: - -``` -User = contacts.resolveUsername({username='string', }) -``` - diff --git a/old_docs/API_docs_v33/methods/messages_acceptEncryption.md b/old_docs/API_docs_v33/methods/messages_acceptEncryption.md index 548087b6..243c4c00 100644 --- a/old_docs/API_docs_v33/methods/messages_acceptEncryption.md +++ b/old_docs/API_docs_v33/methods/messages_acceptEncryption.md @@ -6,71 +6,8 @@ description: messages.acceptEncryption parameters, return type and example [Back to methods index](index.md) -*You cannot use this method directly, see https://daniil.it/MadelineProto for more info on handling secret chats* +**You cannot use this method directly, see https://daniil.it/MadelineProto for more info on handling secret chats** -### Parameters: - -| Name | Type | Required | -|----------|:-------------:|---------:| -|peer|[InputEncryptedChat](../types/InputEncryptedChat.md) | Yes| -|g\_b|[bytes](../types/bytes.md) | Yes| -|key\_fingerprint|[long](../types/long.md) | Yes| - - -### Return type: [EncryptedChat](../types/EncryptedChat.md) - -### Example: - - -``` -$MadelineProto = new \danog\MadelineProto\API(); -if (isset($token)) { // Login as a bot - $MadelineProto->bot_login($token); -} -if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } - $MadelineProto->complete_phone_login($code); -} - -$EncryptedChat = $MadelineProto->messages->acceptEncryption(['peer' => InputEncryptedChat, 'g_b' => 'bytes', 'key_fingerprint' => long, ]); -``` - -Or, if you're using the [PWRTelegram HTTP API](https://pwrtelegram.xyz): - -### As a bot: - -POST/GET to `https://api.pwrtelegram.xyz/botTOKEN/madeline` - -Parameters: - -* method - messages.acceptEncryption -* params - `{"peer": InputEncryptedChat, "g_b": "bytes", "key_fingerprint": long, }` - - - -### As a user: - -POST/GET to `https://api.pwrtelegram.xyz/userTOKEN/messages.acceptEncryption` - -Parameters: - -peer - Json encoded InputEncryptedChat -g_b - Json encoded bytes -key_fingerprint - Json encoded long - - - -Or, if you're into Lua: - -``` -EncryptedChat = messages.acceptEncryption({peer=InputEncryptedChat, g_b='bytes', key_fingerprint=long, }) -``` - diff --git a/old_docs/API_docs_v33/methods/messages_discardEncryption.md b/old_docs/API_docs_v33/methods/messages_discardEncryption.md index 72648e9d..3a9dc58b 100644 --- a/old_docs/API_docs_v33/methods/messages_discardEncryption.md +++ b/old_docs/API_docs_v33/methods/messages_discardEncryption.md @@ -6,67 +6,8 @@ description: messages.discardEncryption parameters, return type and example [Back to methods index](index.md) -*You cannot use this method directly, see https://daniil.it/MadelineProto for more info on handling secret chats* +**You cannot use this method directly, see https://daniil.it/MadelineProto for more info on handling secret chats** -### Parameters: - -| Name | Type | Required | -|----------|:-------------:|---------:| -|chat\_id|[int](../types/int.md) | Yes| - - -### Return type: [Bool](../types/Bool.md) - -### Example: - - -``` -$MadelineProto = new \danog\MadelineProto\API(); -if (isset($token)) { // Login as a bot - $MadelineProto->bot_login($token); -} -if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } - $MadelineProto->complete_phone_login($code); -} - -$Bool = $MadelineProto->messages->discardEncryption(['chat_id' => int, ]); -``` - -Or, if you're using the [PWRTelegram HTTP API](https://pwrtelegram.xyz): - -### As a bot: - -POST/GET to `https://api.pwrtelegram.xyz/botTOKEN/madeline` - -Parameters: - -* method - messages.discardEncryption -* params - `{"chat_id": int, }` - - - -### As a user: - -POST/GET to `https://api.pwrtelegram.xyz/userTOKEN/messages.discardEncryption` - -Parameters: - -chat_id - Json encoded int - - - -Or, if you're into Lua: - -``` -Bool = messages.discardEncryption({chat_id=int, }) -``` - diff --git a/old_docs/API_docs_v33/methods/messages_getFullChat.md b/old_docs/API_docs_v33/methods/messages_getFullChat.md index 62102b64..ffa9c281 100644 --- a/old_docs/API_docs_v33/methods/messages_getFullChat.md +++ b/old_docs/API_docs_v33/methods/messages_getFullChat.md @@ -6,67 +6,8 @@ description: messages.getFullChat parameters, return type and example [Back to methods index](index.md) -*You cannot use this method directly, use the get_pwr_chat, get_info, get_full_info methods instead (see https://daniil.it/MadelineProto for more info)* +**You cannot use this method directly, use the get_pwr_chat, get_info, get_full_info methods instead (see https://daniil.it/MadelineProto for more info)** -### Parameters: - -| Name | Type | Required | -|----------|:-------------:|---------:| -|chat\_id|[InputPeer](../types/InputPeer.md) | Yes| - - -### Return type: [messages\_ChatFull](../types/messages_ChatFull.md) - -### Example: - - -``` -$MadelineProto = new \danog\MadelineProto\API(); -if (isset($token)) { // Login as a bot - $MadelineProto->bot_login($token); -} -if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } - $MadelineProto->complete_phone_login($code); -} - -$messages_ChatFull = $MadelineProto->messages->getFullChat(['chat_id' => InputPeer, ]); -``` - -Or, if you're using the [PWRTelegram HTTP API](https://pwrtelegram.xyz): - -### As a bot: - -POST/GET to `https://api.pwrtelegram.xyz/botTOKEN/madeline` - -Parameters: - -* method - messages.getFullChat -* params - `{"chat_id": InputPeer, }` - - - -### As a user: - -POST/GET to `https://api.pwrtelegram.xyz/userTOKEN/messages.getFullChat` - -Parameters: - -chat_id - Json encoded InputPeer - - - -Or, if you're into Lua: - -``` -messages_ChatFull = messages.getFullChat({chat_id=InputPeer, }) -``` - diff --git a/old_docs/API_docs_v33/methods/messages_requestEncryption.md b/old_docs/API_docs_v33/methods/messages_requestEncryption.md index 2fd1f825..c8476667 100644 --- a/old_docs/API_docs_v33/methods/messages_requestEncryption.md +++ b/old_docs/API_docs_v33/methods/messages_requestEncryption.md @@ -6,69 +6,8 @@ description: messages.requestEncryption parameters, return type and example [Back to methods index](index.md) -*You cannot use this method directly, see https://daniil.it/MadelineProto for more info on handling secret chats* +**You cannot use this method directly, see https://daniil.it/MadelineProto for more info on handling secret chats** -### Parameters: - -| Name | Type | Required | -|----------|:-------------:|---------:| -|user\_id|[InputUser](../types/InputUser.md) | Yes| -|g\_a|[bytes](../types/bytes.md) | Yes| - - -### Return type: [EncryptedChat](../types/EncryptedChat.md) - -### Example: - - -``` -$MadelineProto = new \danog\MadelineProto\API(); -if (isset($token)) { // Login as a bot - $MadelineProto->bot_login($token); -} -if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } - $MadelineProto->complete_phone_login($code); -} - -$EncryptedChat = $MadelineProto->messages->requestEncryption(['user_id' => InputUser, 'g_a' => 'bytes', ]); -``` - -Or, if you're using the [PWRTelegram HTTP API](https://pwrtelegram.xyz): - -### As a bot: - -POST/GET to `https://api.pwrtelegram.xyz/botTOKEN/madeline` - -Parameters: - -* method - messages.requestEncryption -* params - `{"user_id": InputUser, "g_a": "bytes", }` - - - -### As a user: - -POST/GET to `https://api.pwrtelegram.xyz/userTOKEN/messages.requestEncryption` - -Parameters: - -user_id - Json encoded InputUser -g_a - Json encoded bytes - - - -Or, if you're into Lua: - -``` -EncryptedChat = messages.requestEncryption({user_id=InputUser, g_a='bytes', }) -``` - diff --git a/old_docs/API_docs_v33/methods/updates_getDifference.md b/old_docs/API_docs_v33/methods/updates_getDifference.md index 53c7b078..9bcee79a 100644 --- a/old_docs/API_docs_v33/methods/updates_getDifference.md +++ b/old_docs/API_docs_v33/methods/updates_getDifference.md @@ -6,71 +6,8 @@ description: updates.getDifference parameters, return type and example [Back to methods index](index.md) -*You cannot use this method directly, see https://daniil.it/MadelineProto for more info on handling updates* +**You cannot use this method directly, see https://daniil.it/MadelineProto for more info on handling updates** -### Parameters: - -| Name | Type | Required | -|----------|:-------------:|---------:| -|pts|[int](../types/int.md) | Yes| -|date|[int](../types/int.md) | Yes| -|qts|[int](../types/int.md) | Yes| - - -### Return type: [updates\_Difference](../types/updates_Difference.md) - -### Example: - - -``` -$MadelineProto = new \danog\MadelineProto\API(); -if (isset($token)) { // Login as a bot - $MadelineProto->bot_login($token); -} -if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } - $MadelineProto->complete_phone_login($code); -} - -$updates_Difference = $MadelineProto->updates->getDifference(['pts' => int, 'date' => int, 'qts' => int, ]); -``` - -Or, if you're using the [PWRTelegram HTTP API](https://pwrtelegram.xyz): - -### As a bot: - -POST/GET to `https://api.pwrtelegram.xyz/botTOKEN/madeline` - -Parameters: - -* method - updates.getDifference -* params - `{"pts": int, "date": int, "qts": int, }` - - - -### As a user: - -POST/GET to `https://api.pwrtelegram.xyz/userTOKEN/updates.getDifference` - -Parameters: - -pts - Json encoded int -date - Json encoded int -qts - Json encoded int - - - -Or, if you're into Lua: - -``` -updates_Difference = updates.getDifference({pts=int, date=int, qts=int, }) -``` - diff --git a/old_docs/API_docs_v33/methods/updates_getState.md b/old_docs/API_docs_v33/methods/updates_getState.md index 51f6ae80..fd5955ba 100644 --- a/old_docs/API_docs_v33/methods/updates_getState.md +++ b/old_docs/API_docs_v33/methods/updates_getState.md @@ -6,61 +6,8 @@ description: updates.getState parameters, return type and example [Back to methods index](index.md) -*You cannot use this method directly, see https://daniil.it/MadelineProto for more info on handling updates* +**You cannot use this method directly, see https://daniil.it/MadelineProto for more info on handling updates** - - -### Return type: [updates\_State](../types/updates_State.md) - -### Example: - - -``` -$MadelineProto = new \danog\MadelineProto\API(); -if (isset($token)) { // Login as a bot - $MadelineProto->bot_login($token); -} -if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } - $MadelineProto->complete_phone_login($code); -} - -$updates_State = $MadelineProto->updates->getState(); -``` - -Or, if you're using the [PWRTelegram HTTP API](https://pwrtelegram.xyz): - -### As a bot: - -POST/GET to `https://api.pwrtelegram.xyz/botTOKEN/madeline` - -Parameters: - -* method - updates.getState -* params - `{}` - - - -### As a user: - -POST/GET to `https://api.pwrtelegram.xyz/userTOKEN/updates.getState` - -Parameters: - - - - -Or, if you're into Lua: - -``` -updates_State = updates.getState({}) -``` - diff --git a/old_docs/API_docs_v33/methods/upload_getFile.md b/old_docs/API_docs_v33/methods/upload_getFile.md index a1003003..add7d54e 100644 --- a/old_docs/API_docs_v33/methods/upload_getFile.md +++ b/old_docs/API_docs_v33/methods/upload_getFile.md @@ -6,71 +6,8 @@ description: upload.getFile parameters, return type and example [Back to methods index](index.md) -*You cannot use this method directly, use the upload, download_to_stream, download_to_file, download_to_dir methods instead; see https://daniil.it/MadelineProto for more info* +**You cannot use this method directly, use the upload, download_to_stream, download_to_file, download_to_dir methods instead; see https://daniil.it/MadelineProto for more info** -### Parameters: - -| Name | Type | Required | -|----------|:-------------:|---------:| -|location|[InputFileLocation](../types/InputFileLocation.md) | Yes| -|offset|[int](../types/int.md) | Yes| -|limit|[int](../types/int.md) | Yes| - - -### Return type: [upload\_File](../types/upload_File.md) - -### Example: - - -``` -$MadelineProto = new \danog\MadelineProto\API(); -if (isset($token)) { // Login as a bot - $MadelineProto->bot_login($token); -} -if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } - $MadelineProto->complete_phone_login($code); -} - -$upload_File = $MadelineProto->upload->getFile(['location' => InputFileLocation, 'offset' => int, 'limit' => int, ]); -``` - -Or, if you're using the [PWRTelegram HTTP API](https://pwrtelegram.xyz): - -### As a bot: - -POST/GET to `https://api.pwrtelegram.xyz/botTOKEN/madeline` - -Parameters: - -* method - upload.getFile -* params - `{"location": InputFileLocation, "offset": int, "limit": int, }` - - - -### As a user: - -POST/GET to `https://api.pwrtelegram.xyz/userTOKEN/upload.getFile` - -Parameters: - -location - Json encoded InputFileLocation -offset - Json encoded int -limit - Json encoded int - - - -Or, if you're into Lua: - -``` -upload_File = upload.getFile({location=InputFileLocation, offset=int, limit=int, }) -``` - diff --git a/old_docs/API_docs_v33/methods/upload_saveBigFilePart.md b/old_docs/API_docs_v33/methods/upload_saveBigFilePart.md index e5c96d89..b1c3ea28 100644 --- a/old_docs/API_docs_v33/methods/upload_saveBigFilePart.md +++ b/old_docs/API_docs_v33/methods/upload_saveBigFilePart.md @@ -6,73 +6,8 @@ description: upload.saveBigFilePart parameters, return type and example [Back to methods index](index.md) -*You cannot use this method directly, use the upload, download_to_stream, download_to_file, download_to_dir methods instead; see https://daniil.it/MadelineProto for more info* +**You cannot use this method directly, use the upload, download_to_stream, download_to_file, download_to_dir methods instead; see https://daniil.it/MadelineProto for more info** -### Parameters: - -| Name | Type | Required | -|----------|:-------------:|---------:| -|file\_id|[long](../types/long.md) | Yes| -|file\_part|[int](../types/int.md) | Yes| -|file\_total\_parts|[int](../types/int.md) | Yes| -|bytes|[bytes](../types/bytes.md) | Yes| - - -### Return type: [Bool](../types/Bool.md) - -### Example: - - -``` -$MadelineProto = new \danog\MadelineProto\API(); -if (isset($token)) { // Login as a bot - $MadelineProto->bot_login($token); -} -if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } - $MadelineProto->complete_phone_login($code); -} - -$Bool = $MadelineProto->upload->saveBigFilePart(['file_id' => long, 'file_part' => int, 'file_total_parts' => int, 'bytes' => 'bytes', ]); -``` - -Or, if you're using the [PWRTelegram HTTP API](https://pwrtelegram.xyz): - -### As a bot: - -POST/GET to `https://api.pwrtelegram.xyz/botTOKEN/madeline` - -Parameters: - -* method - upload.saveBigFilePart -* params - `{"file_id": long, "file_part": int, "file_total_parts": int, "bytes": "bytes", }` - - - -### As a user: - -POST/GET to `https://api.pwrtelegram.xyz/userTOKEN/upload.saveBigFilePart` - -Parameters: - -file_id - Json encoded long -file_part - Json encoded int -file_total_parts - Json encoded int -bytes - Json encoded bytes - - - -Or, if you're into Lua: - -``` -Bool = upload.saveBigFilePart({file_id=long, file_part=int, file_total_parts=int, bytes='bytes', }) -``` - diff --git a/old_docs/API_docs_v33/methods/upload_saveFilePart.md b/old_docs/API_docs_v33/methods/upload_saveFilePart.md index 1c16e4b2..c482f321 100644 --- a/old_docs/API_docs_v33/methods/upload_saveFilePart.md +++ b/old_docs/API_docs_v33/methods/upload_saveFilePart.md @@ -6,71 +6,8 @@ description: upload.saveFilePart parameters, return type and example [Back to methods index](index.md) -*You cannot use this method directly, use the upload, download_to_stream, download_to_file, download_to_dir methods instead; see https://daniil.it/MadelineProto for more info* +**You cannot use this method directly, use the upload, download_to_stream, download_to_file, download_to_dir methods instead; see https://daniil.it/MadelineProto for more info** -### Parameters: - -| Name | Type | Required | -|----------|:-------------:|---------:| -|file\_id|[long](../types/long.md) | Yes| -|file\_part|[int](../types/int.md) | Yes| -|bytes|[bytes](../types/bytes.md) | Yes| - - -### Return type: [Bool](../types/Bool.md) - -### Example: - - -``` -$MadelineProto = new \danog\MadelineProto\API(); -if (isset($token)) { // Login as a bot - $MadelineProto->bot_login($token); -} -if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } - $MadelineProto->complete_phone_login($code); -} - -$Bool = $MadelineProto->upload->saveFilePart(['file_id' => long, 'file_part' => int, 'bytes' => 'bytes', ]); -``` - -Or, if you're using the [PWRTelegram HTTP API](https://pwrtelegram.xyz): - -### As a bot: - -POST/GET to `https://api.pwrtelegram.xyz/botTOKEN/madeline` - -Parameters: - -* method - upload.saveFilePart -* params - `{"file_id": long, "file_part": int, "bytes": "bytes", }` - - - -### As a user: - -POST/GET to `https://api.pwrtelegram.xyz/userTOKEN/upload.saveFilePart` - -Parameters: - -file_id - Json encoded long -file_part - Json encoded int -bytes - Json encoded bytes - - - -Or, if you're into Lua: - -``` -Bool = upload.saveFilePart({file_id=long, file_part=int, bytes='bytes', }) -``` - diff --git a/old_docs/API_docs_v33/methods/users_getFullUser.md b/old_docs/API_docs_v33/methods/users_getFullUser.md index 645ab12e..4ec831ec 100644 --- a/old_docs/API_docs_v33/methods/users_getFullUser.md +++ b/old_docs/API_docs_v33/methods/users_getFullUser.md @@ -6,67 +6,8 @@ description: users.getFullUser parameters, return type and example [Back to methods index](index.md) -*You cannot use this method directly, use the get_pwr_chat, get_info, get_full_info methods instead (see https://daniil.it/MadelineProto for more info)* +**You cannot use this method directly, use the get_pwr_chat, get_info, get_full_info methods instead (see https://daniil.it/MadelineProto for more info)** -### Parameters: - -| Name | Type | Required | -|----------|:-------------:|---------:| -|id|[InputUser](../types/InputUser.md) | Yes| - - -### Return type: [UserFull](../types/UserFull.md) - -### Example: - - -``` -$MadelineProto = new \danog\MadelineProto\API(); -if (isset($token)) { // Login as a bot - $MadelineProto->bot_login($token); -} -if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } - $MadelineProto->complete_phone_login($code); -} - -$UserFull = $MadelineProto->users->getFullUser(['id' => InputUser, ]); -``` - -Or, if you're using the [PWRTelegram HTTP API](https://pwrtelegram.xyz): - -### As a bot: - -POST/GET to `https://api.pwrtelegram.xyz/botTOKEN/madeline` - -Parameters: - -* method - users.getFullUser -* params - `{"id": InputUser, }` - - - -### As a user: - -POST/GET to `https://api.pwrtelegram.xyz/userTOKEN/users.getFullUser` - -Parameters: - -id - Json encoded InputUser - - - -Or, if you're into Lua: - -``` -UserFull = users.getFullUser({id=InputUser, }) -``` - diff --git a/old_docs/API_docs_v38/constructors/README.md b/old_docs/API_docs_v38/constructors/README.md index b4d4b6dd..90893bed 100644 --- a/old_docs/API_docs_v38/constructors/README.md +++ b/old_docs/API_docs_v38/constructors/README.md @@ -4,9 +4,6 @@ description: List of constructors --- # Constructors [Back to API documentation index](..) - - - ***

[$accountDaysTTL](../constructors/accountDaysTTL.md) = \['days' => [int](../types/int.md), \]; diff --git a/old_docs/API_docs_v38/methods/auth_importBotAuthorization.md b/old_docs/API_docs_v38/methods/auth_importBotAuthorization.md index 0d8836b6..57521a13 100644 --- a/old_docs/API_docs_v38/methods/auth_importBotAuthorization.md +++ b/old_docs/API_docs_v38/methods/auth_importBotAuthorization.md @@ -6,71 +6,8 @@ description: auth.importBotAuthorization parameters, return type and example [Back to methods index](index.md) -*You cannot use this method directly, use the bot_login method instead (see https://daniil.it/MadelineProto for more info)* +**You cannot use this method directly, use the bot_login method instead (see https://daniil.it/MadelineProto for more info)** -### Parameters: - -| Name | Type | Required | -|----------|:-------------:|---------:| -|api\_id|[int](../types/int.md) | Yes| -|api\_hash|[string](../types/string.md) | Yes| -|bot\_auth\_token|[string](../types/string.md) | Yes| - - -### Return type: [auth\_Authorization](../types/auth_Authorization.md) - -### Example: - - -``` -$MadelineProto = new \danog\MadelineProto\API(); -if (isset($token)) { // Login as a bot - $MadelineProto->bot_login($token); -} -if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } - $MadelineProto->complete_phone_login($code); -} - -$auth_Authorization = $MadelineProto->auth->importBotAuthorization(['api_id' => int, 'api_hash' => 'string', 'bot_auth_token' => 'string', ]); -``` - -Or, if you're using the [PWRTelegram HTTP API](https://pwrtelegram.xyz): - -### As a bot: - -POST/GET to `https://api.pwrtelegram.xyz/botTOKEN/madeline` - -Parameters: - -* method - auth.importBotAuthorization -* params - `{"api_id": int, "api_hash": "string", "bot_auth_token": "string", }` - - - -### As a user: - -POST/GET to `https://api.pwrtelegram.xyz/userTOKEN/auth.importBotAuthorization` - -Parameters: - -api_id - Json encoded int -api_hash - Json encoded string -bot_auth_token - Json encoded string - - - -Or, if you're into Lua: - -``` -auth_Authorization = auth.importBotAuthorization({api_id=int, api_hash='string', bot_auth_token='string', }) -``` - diff --git a/old_docs/API_docs_v38/methods/auth_logOut.md b/old_docs/API_docs_v38/methods/auth_logOut.md index 12159bab..7d5bb3f7 100644 --- a/old_docs/API_docs_v38/methods/auth_logOut.md +++ b/old_docs/API_docs_v38/methods/auth_logOut.md @@ -6,61 +6,8 @@ description: auth.logOut parameters, return type and example [Back to methods index](index.md) -*You cannot use this method directly, use the logout method instead (see https://daniil.it/MadelineProto for more info)* +**You cannot use this method directly, use the logout method instead (see https://daniil.it/MadelineProto for more info)** - - -### Return type: [Bool](../types/Bool.md) - -### Example: - - -``` -$MadelineProto = new \danog\MadelineProto\API(); -if (isset($token)) { // Login as a bot - $MadelineProto->bot_login($token); -} -if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } - $MadelineProto->complete_phone_login($code); -} - -$Bool = $MadelineProto->auth->logOut(); -``` - -Or, if you're using the [PWRTelegram HTTP API](https://pwrtelegram.xyz): - -### As a bot: - -POST/GET to `https://api.pwrtelegram.xyz/botTOKEN/madeline` - -Parameters: - -* method - auth.logOut -* params - `{}` - - - -### As a user: - -POST/GET to `https://api.pwrtelegram.xyz/userTOKEN/auth.logOut` - -Parameters: - - - - -Or, if you're into Lua: - -``` -Bool = auth.logOut({}) -``` - diff --git a/old_docs/API_docs_v38/methods/auth_sendCode.md b/old_docs/API_docs_v38/methods/auth_sendCode.md index 43bc28ee..22d1df94 100644 --- a/old_docs/API_docs_v38/methods/auth_sendCode.md +++ b/old_docs/API_docs_v38/methods/auth_sendCode.md @@ -6,75 +6,8 @@ description: auth.sendCode parameters, return type and example [Back to methods index](index.md) -*You cannot use this method directly, use the phone_login method instead (see https://daniil.it/MadelineProto for more info)* +**You cannot use this method directly, use the phone_login method instead (see https://daniil.it/MadelineProto for more info)** -### Parameters: - -| Name | Type | Required | -|----------|:-------------:|---------:| -|phone\_number|[string](../types/string.md) | Yes| -|sms\_type|[int](../types/int.md) | Yes| -|api\_id|[int](../types/int.md) | Yes| -|api\_hash|[string](../types/string.md) | Yes| -|lang\_code|[string](../types/string.md) | Yes| - - -### Return type: [auth\_SentCode](../types/auth_SentCode.md) - -### Example: - - -``` -$MadelineProto = new \danog\MadelineProto\API(); -if (isset($token)) { // Login as a bot - $MadelineProto->bot_login($token); -} -if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } - $MadelineProto->complete_phone_login($code); -} - -$auth_SentCode = $MadelineProto->auth->sendCode(['phone_number' => 'string', 'sms_type' => int, 'api_id' => int, 'api_hash' => 'string', 'lang_code' => 'string', ]); -``` - -Or, if you're using the [PWRTelegram HTTP API](https://pwrtelegram.xyz): - -### As a bot: - -POST/GET to `https://api.pwrtelegram.xyz/botTOKEN/madeline` - -Parameters: - -* method - auth.sendCode -* params - `{"phone_number": "string", "sms_type": int, "api_id": int, "api_hash": "string", "lang_code": "string", }` - - - -### As a user: - -POST/GET to `https://api.pwrtelegram.xyz/userTOKEN/auth.sendCode` - -Parameters: - -phone_number - Json encoded string -sms_type - Json encoded int -api_id - Json encoded int -api_hash - Json encoded string -lang_code - Json encoded string - - - -Or, if you're into Lua: - -``` -auth_SentCode = auth.sendCode({phone_number='string', sms_type=int, api_id=int, api_hash='string', lang_code='string', }) -``` - diff --git a/old_docs/API_docs_v38/methods/auth_signIn.md b/old_docs/API_docs_v38/methods/auth_signIn.md index 75c50d70..ab40bb4d 100644 --- a/old_docs/API_docs_v38/methods/auth_signIn.md +++ b/old_docs/API_docs_v38/methods/auth_signIn.md @@ -6,71 +6,8 @@ description: auth.signIn parameters, return type and example [Back to methods index](index.md) -*You cannot use this method directly, use the complete_phone_login method instead (see https://daniil.it/MadelineProto for more info)* +**You cannot use this method directly, use the complete_phone_login method instead (see https://daniil.it/MadelineProto for more info)** -### Parameters: - -| Name | Type | Required | -|----------|:-------------:|---------:| -|phone\_number|[string](../types/string.md) | Yes| -|phone\_code\_hash|[string](../types/string.md) | Yes| -|phone\_code|[string](../types/string.md) | Yes| - - -### Return type: [auth\_Authorization](../types/auth_Authorization.md) - -### Example: - - -``` -$MadelineProto = new \danog\MadelineProto\API(); -if (isset($token)) { // Login as a bot - $MadelineProto->bot_login($token); -} -if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } - $MadelineProto->complete_phone_login($code); -} - -$auth_Authorization = $MadelineProto->auth->signIn(['phone_number' => 'string', 'phone_code_hash' => 'string', 'phone_code' => 'string', ]); -``` - -Or, if you're using the [PWRTelegram HTTP API](https://pwrtelegram.xyz): - -### As a bot: - -POST/GET to `https://api.pwrtelegram.xyz/botTOKEN/madeline` - -Parameters: - -* method - auth.signIn -* params - `{"phone_number": "string", "phone_code_hash": "string", "phone_code": "string", }` - - - -### As a user: - -POST/GET to `https://api.pwrtelegram.xyz/userTOKEN/auth.signIn` - -Parameters: - -phone_number - Json encoded string -phone_code_hash - Json encoded string -phone_code - Json encoded string - - - -Or, if you're into Lua: - -``` -auth_Authorization = auth.signIn({phone_number='string', phone_code_hash='string', phone_code='string', }) -``` - diff --git a/old_docs/API_docs_v38/methods/auth_signUp.md b/old_docs/API_docs_v38/methods/auth_signUp.md index f2a72b68..042d1191 100644 --- a/old_docs/API_docs_v38/methods/auth_signUp.md +++ b/old_docs/API_docs_v38/methods/auth_signUp.md @@ -6,75 +6,8 @@ description: auth.signUp parameters, return type and example [Back to methods index](index.md) -*You cannot use this method directly, use the complete_signup method instead (see https://daniil.it/MadelineProto for more info)* +**You cannot use this method directly, use the complete_signup method instead (see https://daniil.it/MadelineProto for more info)** -### Parameters: - -| Name | Type | Required | -|----------|:-------------:|---------:| -|phone\_number|[string](../types/string.md) | Yes| -|phone\_code\_hash|[string](../types/string.md) | Yes| -|phone\_code|[string](../types/string.md) | Yes| -|first\_name|[string](../types/string.md) | Yes| -|last\_name|[string](../types/string.md) | Yes| - - -### Return type: [auth\_Authorization](../types/auth_Authorization.md) - -### Example: - - -``` -$MadelineProto = new \danog\MadelineProto\API(); -if (isset($token)) { // Login as a bot - $MadelineProto->bot_login($token); -} -if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } - $MadelineProto->complete_phone_login($code); -} - -$auth_Authorization = $MadelineProto->auth->signUp(['phone_number' => 'string', 'phone_code_hash' => 'string', 'phone_code' => 'string', 'first_name' => 'string', 'last_name' => 'string', ]); -``` - -Or, if you're using the [PWRTelegram HTTP API](https://pwrtelegram.xyz): - -### As a bot: - -POST/GET to `https://api.pwrtelegram.xyz/botTOKEN/madeline` - -Parameters: - -* method - auth.signUp -* params - `{"phone_number": "string", "phone_code_hash": "string", "phone_code": "string", "first_name": "string", "last_name": "string", }` - - - -### As a user: - -POST/GET to `https://api.pwrtelegram.xyz/userTOKEN/auth.signUp` - -Parameters: - -phone_number - Json encoded string -phone_code_hash - Json encoded string -phone_code - Json encoded string -first_name - Json encoded string -last_name - Json encoded string - - - -Or, if you're into Lua: - -``` -auth_Authorization = auth.signUp({phone_number='string', phone_code_hash='string', phone_code='string', first_name='string', last_name='string', }) -``` - diff --git a/old_docs/API_docs_v38/methods/channels_getFullChannel.md b/old_docs/API_docs_v38/methods/channels_getFullChannel.md index 340efcfe..58dbe057 100644 --- a/old_docs/API_docs_v38/methods/channels_getFullChannel.md +++ b/old_docs/API_docs_v38/methods/channels_getFullChannel.md @@ -6,67 +6,8 @@ description: channels.getFullChannel parameters, return type and example [Back to methods index](index.md) -*You cannot use this method directly, use the get_pwr_chat, get_info, get_full_info methods instead (see https://daniil.it/MadelineProto for more info)* +**You cannot use this method directly, use the get_pwr_chat, get_info, get_full_info methods instead (see https://daniil.it/MadelineProto for more info)** -### Parameters: - -| Name | Type | Required | -|----------|:-------------:|---------:| -|channel|[InputChannel](../types/InputChannel.md) | Yes| - - -### Return type: [messages\_ChatFull](../types/messages_ChatFull.md) - -### Example: - - -``` -$MadelineProto = new \danog\MadelineProto\API(); -if (isset($token)) { // Login as a bot - $MadelineProto->bot_login($token); -} -if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } - $MadelineProto->complete_phone_login($code); -} - -$messages_ChatFull = $MadelineProto->channels->getFullChannel(['channel' => InputChannel, ]); -``` - -Or, if you're using the [PWRTelegram HTTP API](https://pwrtelegram.xyz): - -### As a bot: - -POST/GET to `https://api.pwrtelegram.xyz/botTOKEN/madeline` - -Parameters: - -* method - channels.getFullChannel -* params - `{"channel": InputChannel, }` - - - -### As a user: - -POST/GET to `https://api.pwrtelegram.xyz/userTOKEN/channels.getFullChannel` - -Parameters: - -channel - Json encoded InputChannel - - - -Or, if you're into Lua: - -``` -messages_ChatFull = channels.getFullChannel({channel=InputChannel, }) -``` - diff --git a/old_docs/API_docs_v38/methods/channels_getParticipants.md b/old_docs/API_docs_v38/methods/channels_getParticipants.md index 4c6e09cc..d84cf09c 100644 --- a/old_docs/API_docs_v38/methods/channels_getParticipants.md +++ b/old_docs/API_docs_v38/methods/channels_getParticipants.md @@ -6,73 +6,8 @@ description: channels.getParticipants parameters, return type and example [Back to methods index](index.md) -*You cannot use this method directly, use the get_pwr_chat, get_info, get_full_info methods instead (see https://daniil.it/MadelineProto for more info)* +**You cannot use this method directly, use the get_pwr_chat, get_info, get_full_info methods instead (see https://daniil.it/MadelineProto for more info)** -### Parameters: - -| Name | Type | Required | -|----------|:-------------:|---------:| -|channel|[InputChannel](../types/InputChannel.md) | Yes| -|filter|[ChannelParticipantsFilter](../types/ChannelParticipantsFilter.md) | Yes| -|offset|[int](../types/int.md) | Yes| -|limit|[int](../types/int.md) | Yes| - - -### Return type: [channels\_ChannelParticipants](../types/channels_ChannelParticipants.md) - -### Example: - - -``` -$MadelineProto = new \danog\MadelineProto\API(); -if (isset($token)) { // Login as a bot - $MadelineProto->bot_login($token); -} -if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } - $MadelineProto->complete_phone_login($code); -} - -$channels_ChannelParticipants = $MadelineProto->channels->getParticipants(['channel' => InputChannel, 'filter' => ChannelParticipantsFilter, 'offset' => int, 'limit' => int, ]); -``` - -Or, if you're using the [PWRTelegram HTTP API](https://pwrtelegram.xyz): - -### As a bot: - -POST/GET to `https://api.pwrtelegram.xyz/botTOKEN/madeline` - -Parameters: - -* method - channels.getParticipants -* params - `{"channel": InputChannel, "filter": ChannelParticipantsFilter, "offset": int, "limit": int, }` - - - -### As a user: - -POST/GET to `https://api.pwrtelegram.xyz/userTOKEN/channels.getParticipants` - -Parameters: - -channel - Json encoded InputChannel -filter - Json encoded ChannelParticipantsFilter -offset - Json encoded int -limit - Json encoded int - - - -Or, if you're into Lua: - -``` -channels_ChannelParticipants = channels.getParticipants({channel=InputChannel, filter=ChannelParticipantsFilter, offset=int, limit=int, }) -``` - diff --git a/old_docs/API_docs_v38/methods/contacts_resolveUsername.md b/old_docs/API_docs_v38/methods/contacts_resolveUsername.md index 90e72851..b665b382 100644 --- a/old_docs/API_docs_v38/methods/contacts_resolveUsername.md +++ b/old_docs/API_docs_v38/methods/contacts_resolveUsername.md @@ -6,67 +6,8 @@ description: contacts.resolveUsername parameters, return type and example [Back to methods index](index.md) -*You cannot use this method directly, use the resolve_username, get_pwr_chat, get_info, get_full_info methods instead (see https://daniil.it/MadelineProto for more info)* +**You cannot use this method directly, use the resolve_username, get_pwr_chat, get_info, get_full_info methods instead (see https://daniil.it/MadelineProto for more info)** -### Parameters: - -| Name | Type | Required | -|----------|:-------------:|---------:| -|username|[string](../types/string.md) | Yes| - - -### Return type: [contacts\_ResolvedPeer](../types/contacts_ResolvedPeer.md) - -### Example: - - -``` -$MadelineProto = new \danog\MadelineProto\API(); -if (isset($token)) { // Login as a bot - $MadelineProto->bot_login($token); -} -if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } - $MadelineProto->complete_phone_login($code); -} - -$contacts_ResolvedPeer = $MadelineProto->contacts->resolveUsername(['username' => 'string', ]); -``` - -Or, if you're using the [PWRTelegram HTTP API](https://pwrtelegram.xyz): - -### As a bot: - -POST/GET to `https://api.pwrtelegram.xyz/botTOKEN/madeline` - -Parameters: - -* method - contacts.resolveUsername -* params - `{"username": "string", }` - - - -### As a user: - -POST/GET to `https://api.pwrtelegram.xyz/userTOKEN/contacts.resolveUsername` - -Parameters: - -username - Json encoded string - - - -Or, if you're into Lua: - -``` -contacts_ResolvedPeer = contacts.resolveUsername({username='string', }) -``` - diff --git a/old_docs/API_docs_v38/methods/messages_acceptEncryption.md b/old_docs/API_docs_v38/methods/messages_acceptEncryption.md index 548087b6..243c4c00 100644 --- a/old_docs/API_docs_v38/methods/messages_acceptEncryption.md +++ b/old_docs/API_docs_v38/methods/messages_acceptEncryption.md @@ -6,71 +6,8 @@ description: messages.acceptEncryption parameters, return type and example [Back to methods index](index.md) -*You cannot use this method directly, see https://daniil.it/MadelineProto for more info on handling secret chats* +**You cannot use this method directly, see https://daniil.it/MadelineProto for more info on handling secret chats** -### Parameters: - -| Name | Type | Required | -|----------|:-------------:|---------:| -|peer|[InputEncryptedChat](../types/InputEncryptedChat.md) | Yes| -|g\_b|[bytes](../types/bytes.md) | Yes| -|key\_fingerprint|[long](../types/long.md) | Yes| - - -### Return type: [EncryptedChat](../types/EncryptedChat.md) - -### Example: - - -``` -$MadelineProto = new \danog\MadelineProto\API(); -if (isset($token)) { // Login as a bot - $MadelineProto->bot_login($token); -} -if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } - $MadelineProto->complete_phone_login($code); -} - -$EncryptedChat = $MadelineProto->messages->acceptEncryption(['peer' => InputEncryptedChat, 'g_b' => 'bytes', 'key_fingerprint' => long, ]); -``` - -Or, if you're using the [PWRTelegram HTTP API](https://pwrtelegram.xyz): - -### As a bot: - -POST/GET to `https://api.pwrtelegram.xyz/botTOKEN/madeline` - -Parameters: - -* method - messages.acceptEncryption -* params - `{"peer": InputEncryptedChat, "g_b": "bytes", "key_fingerprint": long, }` - - - -### As a user: - -POST/GET to `https://api.pwrtelegram.xyz/userTOKEN/messages.acceptEncryption` - -Parameters: - -peer - Json encoded InputEncryptedChat -g_b - Json encoded bytes -key_fingerprint - Json encoded long - - - -Or, if you're into Lua: - -``` -EncryptedChat = messages.acceptEncryption({peer=InputEncryptedChat, g_b='bytes', key_fingerprint=long, }) -``` - diff --git a/old_docs/API_docs_v38/methods/messages_discardEncryption.md b/old_docs/API_docs_v38/methods/messages_discardEncryption.md index 72648e9d..3a9dc58b 100644 --- a/old_docs/API_docs_v38/methods/messages_discardEncryption.md +++ b/old_docs/API_docs_v38/methods/messages_discardEncryption.md @@ -6,67 +6,8 @@ description: messages.discardEncryption parameters, return type and example [Back to methods index](index.md) -*You cannot use this method directly, see https://daniil.it/MadelineProto for more info on handling secret chats* +**You cannot use this method directly, see https://daniil.it/MadelineProto for more info on handling secret chats** -### Parameters: - -| Name | Type | Required | -|----------|:-------------:|---------:| -|chat\_id|[int](../types/int.md) | Yes| - - -### Return type: [Bool](../types/Bool.md) - -### Example: - - -``` -$MadelineProto = new \danog\MadelineProto\API(); -if (isset($token)) { // Login as a bot - $MadelineProto->bot_login($token); -} -if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } - $MadelineProto->complete_phone_login($code); -} - -$Bool = $MadelineProto->messages->discardEncryption(['chat_id' => int, ]); -``` - -Or, if you're using the [PWRTelegram HTTP API](https://pwrtelegram.xyz): - -### As a bot: - -POST/GET to `https://api.pwrtelegram.xyz/botTOKEN/madeline` - -Parameters: - -* method - messages.discardEncryption -* params - `{"chat_id": int, }` - - - -### As a user: - -POST/GET to `https://api.pwrtelegram.xyz/userTOKEN/messages.discardEncryption` - -Parameters: - -chat_id - Json encoded int - - - -Or, if you're into Lua: - -``` -Bool = messages.discardEncryption({chat_id=int, }) -``` - diff --git a/old_docs/API_docs_v38/methods/messages_getFullChat.md b/old_docs/API_docs_v38/methods/messages_getFullChat.md index 62102b64..ffa9c281 100644 --- a/old_docs/API_docs_v38/methods/messages_getFullChat.md +++ b/old_docs/API_docs_v38/methods/messages_getFullChat.md @@ -6,67 +6,8 @@ description: messages.getFullChat parameters, return type and example [Back to methods index](index.md) -*You cannot use this method directly, use the get_pwr_chat, get_info, get_full_info methods instead (see https://daniil.it/MadelineProto for more info)* +**You cannot use this method directly, use the get_pwr_chat, get_info, get_full_info methods instead (see https://daniil.it/MadelineProto for more info)** -### Parameters: - -| Name | Type | Required | -|----------|:-------------:|---------:| -|chat\_id|[InputPeer](../types/InputPeer.md) | Yes| - - -### Return type: [messages\_ChatFull](../types/messages_ChatFull.md) - -### Example: - - -``` -$MadelineProto = new \danog\MadelineProto\API(); -if (isset($token)) { // Login as a bot - $MadelineProto->bot_login($token); -} -if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } - $MadelineProto->complete_phone_login($code); -} - -$messages_ChatFull = $MadelineProto->messages->getFullChat(['chat_id' => InputPeer, ]); -``` - -Or, if you're using the [PWRTelegram HTTP API](https://pwrtelegram.xyz): - -### As a bot: - -POST/GET to `https://api.pwrtelegram.xyz/botTOKEN/madeline` - -Parameters: - -* method - messages.getFullChat -* params - `{"chat_id": InputPeer, }` - - - -### As a user: - -POST/GET to `https://api.pwrtelegram.xyz/userTOKEN/messages.getFullChat` - -Parameters: - -chat_id - Json encoded InputPeer - - - -Or, if you're into Lua: - -``` -messages_ChatFull = messages.getFullChat({chat_id=InputPeer, }) -``` - diff --git a/old_docs/API_docs_v38/methods/messages_requestEncryption.md b/old_docs/API_docs_v38/methods/messages_requestEncryption.md index 2fd1f825..c8476667 100644 --- a/old_docs/API_docs_v38/methods/messages_requestEncryption.md +++ b/old_docs/API_docs_v38/methods/messages_requestEncryption.md @@ -6,69 +6,8 @@ description: messages.requestEncryption parameters, return type and example [Back to methods index](index.md) -*You cannot use this method directly, see https://daniil.it/MadelineProto for more info on handling secret chats* +**You cannot use this method directly, see https://daniil.it/MadelineProto for more info on handling secret chats** -### Parameters: - -| Name | Type | Required | -|----------|:-------------:|---------:| -|user\_id|[InputUser](../types/InputUser.md) | Yes| -|g\_a|[bytes](../types/bytes.md) | Yes| - - -### Return type: [EncryptedChat](../types/EncryptedChat.md) - -### Example: - - -``` -$MadelineProto = new \danog\MadelineProto\API(); -if (isset($token)) { // Login as a bot - $MadelineProto->bot_login($token); -} -if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } - $MadelineProto->complete_phone_login($code); -} - -$EncryptedChat = $MadelineProto->messages->requestEncryption(['user_id' => InputUser, 'g_a' => 'bytes', ]); -``` - -Or, if you're using the [PWRTelegram HTTP API](https://pwrtelegram.xyz): - -### As a bot: - -POST/GET to `https://api.pwrtelegram.xyz/botTOKEN/madeline` - -Parameters: - -* method - messages.requestEncryption -* params - `{"user_id": InputUser, "g_a": "bytes", }` - - - -### As a user: - -POST/GET to `https://api.pwrtelegram.xyz/userTOKEN/messages.requestEncryption` - -Parameters: - -user_id - Json encoded InputUser -g_a - Json encoded bytes - - - -Or, if you're into Lua: - -``` -EncryptedChat = messages.requestEncryption({user_id=InputUser, g_a='bytes', }) -``` - diff --git a/old_docs/API_docs_v38/methods/updates_getChannelDifference.md b/old_docs/API_docs_v38/methods/updates_getChannelDifference.md index 51ea7aa5..2e69d1cd 100644 --- a/old_docs/API_docs_v38/methods/updates_getChannelDifference.md +++ b/old_docs/API_docs_v38/methods/updates_getChannelDifference.md @@ -6,73 +6,8 @@ description: updates.getChannelDifference parameters, return type and example [Back to methods index](index.md) -*You cannot use this method directly, see https://daniil.it/MadelineProto for more info on handling updates* +**You cannot use this method directly, see https://daniil.it/MadelineProto for more info on handling updates** -### Parameters: - -| Name | Type | Required | -|----------|:-------------:|---------:| -|channel|[InputChannel](../types/InputChannel.md) | Yes| -|filter|[ChannelMessagesFilter](../types/ChannelMessagesFilter.md) | Yes| -|pts|[int](../types/int.md) | Yes| -|limit|[int](../types/int.md) | Yes| - - -### Return type: [updates\_ChannelDifference](../types/updates_ChannelDifference.md) - -### Example: - - -``` -$MadelineProto = new \danog\MadelineProto\API(); -if (isset($token)) { // Login as a bot - $MadelineProto->bot_login($token); -} -if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } - $MadelineProto->complete_phone_login($code); -} - -$updates_ChannelDifference = $MadelineProto->updates->getChannelDifference(['channel' => InputChannel, 'filter' => ChannelMessagesFilter, 'pts' => int, 'limit' => int, ]); -``` - -Or, if you're using the [PWRTelegram HTTP API](https://pwrtelegram.xyz): - -### As a bot: - -POST/GET to `https://api.pwrtelegram.xyz/botTOKEN/madeline` - -Parameters: - -* method - updates.getChannelDifference -* params - `{"channel": InputChannel, "filter": ChannelMessagesFilter, "pts": int, "limit": int, }` - - - -### As a user: - -POST/GET to `https://api.pwrtelegram.xyz/userTOKEN/updates.getChannelDifference` - -Parameters: - -channel - Json encoded InputChannel -filter - Json encoded ChannelMessagesFilter -pts - Json encoded int -limit - Json encoded int - - - -Or, if you're into Lua: - -``` -updates_ChannelDifference = updates.getChannelDifference({channel=InputChannel, filter=ChannelMessagesFilter, pts=int, limit=int, }) -``` - diff --git a/old_docs/API_docs_v38/methods/updates_getDifference.md b/old_docs/API_docs_v38/methods/updates_getDifference.md index 53c7b078..9bcee79a 100644 --- a/old_docs/API_docs_v38/methods/updates_getDifference.md +++ b/old_docs/API_docs_v38/methods/updates_getDifference.md @@ -6,71 +6,8 @@ description: updates.getDifference parameters, return type and example [Back to methods index](index.md) -*You cannot use this method directly, see https://daniil.it/MadelineProto for more info on handling updates* +**You cannot use this method directly, see https://daniil.it/MadelineProto for more info on handling updates** -### Parameters: - -| Name | Type | Required | -|----------|:-------------:|---------:| -|pts|[int](../types/int.md) | Yes| -|date|[int](../types/int.md) | Yes| -|qts|[int](../types/int.md) | Yes| - - -### Return type: [updates\_Difference](../types/updates_Difference.md) - -### Example: - - -``` -$MadelineProto = new \danog\MadelineProto\API(); -if (isset($token)) { // Login as a bot - $MadelineProto->bot_login($token); -} -if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } - $MadelineProto->complete_phone_login($code); -} - -$updates_Difference = $MadelineProto->updates->getDifference(['pts' => int, 'date' => int, 'qts' => int, ]); -``` - -Or, if you're using the [PWRTelegram HTTP API](https://pwrtelegram.xyz): - -### As a bot: - -POST/GET to `https://api.pwrtelegram.xyz/botTOKEN/madeline` - -Parameters: - -* method - updates.getDifference -* params - `{"pts": int, "date": int, "qts": int, }` - - - -### As a user: - -POST/GET to `https://api.pwrtelegram.xyz/userTOKEN/updates.getDifference` - -Parameters: - -pts - Json encoded int -date - Json encoded int -qts - Json encoded int - - - -Or, if you're into Lua: - -``` -updates_Difference = updates.getDifference({pts=int, date=int, qts=int, }) -``` - diff --git a/old_docs/API_docs_v38/methods/updates_getState.md b/old_docs/API_docs_v38/methods/updates_getState.md index 51f6ae80..fd5955ba 100644 --- a/old_docs/API_docs_v38/methods/updates_getState.md +++ b/old_docs/API_docs_v38/methods/updates_getState.md @@ -6,61 +6,8 @@ description: updates.getState parameters, return type and example [Back to methods index](index.md) -*You cannot use this method directly, see https://daniil.it/MadelineProto for more info on handling updates* +**You cannot use this method directly, see https://daniil.it/MadelineProto for more info on handling updates** - - -### Return type: [updates\_State](../types/updates_State.md) - -### Example: - - -``` -$MadelineProto = new \danog\MadelineProto\API(); -if (isset($token)) { // Login as a bot - $MadelineProto->bot_login($token); -} -if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } - $MadelineProto->complete_phone_login($code); -} - -$updates_State = $MadelineProto->updates->getState(); -``` - -Or, if you're using the [PWRTelegram HTTP API](https://pwrtelegram.xyz): - -### As a bot: - -POST/GET to `https://api.pwrtelegram.xyz/botTOKEN/madeline` - -Parameters: - -* method - updates.getState -* params - `{}` - - - -### As a user: - -POST/GET to `https://api.pwrtelegram.xyz/userTOKEN/updates.getState` - -Parameters: - - - - -Or, if you're into Lua: - -``` -updates_State = updates.getState({}) -``` - diff --git a/old_docs/API_docs_v38/methods/upload_getFile.md b/old_docs/API_docs_v38/methods/upload_getFile.md index a1003003..add7d54e 100644 --- a/old_docs/API_docs_v38/methods/upload_getFile.md +++ b/old_docs/API_docs_v38/methods/upload_getFile.md @@ -6,71 +6,8 @@ description: upload.getFile parameters, return type and example [Back to methods index](index.md) -*You cannot use this method directly, use the upload, download_to_stream, download_to_file, download_to_dir methods instead; see https://daniil.it/MadelineProto for more info* +**You cannot use this method directly, use the upload, download_to_stream, download_to_file, download_to_dir methods instead; see https://daniil.it/MadelineProto for more info** -### Parameters: - -| Name | Type | Required | -|----------|:-------------:|---------:| -|location|[InputFileLocation](../types/InputFileLocation.md) | Yes| -|offset|[int](../types/int.md) | Yes| -|limit|[int](../types/int.md) | Yes| - - -### Return type: [upload\_File](../types/upload_File.md) - -### Example: - - -``` -$MadelineProto = new \danog\MadelineProto\API(); -if (isset($token)) { // Login as a bot - $MadelineProto->bot_login($token); -} -if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } - $MadelineProto->complete_phone_login($code); -} - -$upload_File = $MadelineProto->upload->getFile(['location' => InputFileLocation, 'offset' => int, 'limit' => int, ]); -``` - -Or, if you're using the [PWRTelegram HTTP API](https://pwrtelegram.xyz): - -### As a bot: - -POST/GET to `https://api.pwrtelegram.xyz/botTOKEN/madeline` - -Parameters: - -* method - upload.getFile -* params - `{"location": InputFileLocation, "offset": int, "limit": int, }` - - - -### As a user: - -POST/GET to `https://api.pwrtelegram.xyz/userTOKEN/upload.getFile` - -Parameters: - -location - Json encoded InputFileLocation -offset - Json encoded int -limit - Json encoded int - - - -Or, if you're into Lua: - -``` -upload_File = upload.getFile({location=InputFileLocation, offset=int, limit=int, }) -``` - diff --git a/old_docs/API_docs_v38/methods/upload_saveBigFilePart.md b/old_docs/API_docs_v38/methods/upload_saveBigFilePart.md index e5c96d89..b1c3ea28 100644 --- a/old_docs/API_docs_v38/methods/upload_saveBigFilePart.md +++ b/old_docs/API_docs_v38/methods/upload_saveBigFilePart.md @@ -6,73 +6,8 @@ description: upload.saveBigFilePart parameters, return type and example [Back to methods index](index.md) -*You cannot use this method directly, use the upload, download_to_stream, download_to_file, download_to_dir methods instead; see https://daniil.it/MadelineProto for more info* +**You cannot use this method directly, use the upload, download_to_stream, download_to_file, download_to_dir methods instead; see https://daniil.it/MadelineProto for more info** -### Parameters: - -| Name | Type | Required | -|----------|:-------------:|---------:| -|file\_id|[long](../types/long.md) | Yes| -|file\_part|[int](../types/int.md) | Yes| -|file\_total\_parts|[int](../types/int.md) | Yes| -|bytes|[bytes](../types/bytes.md) | Yes| - - -### Return type: [Bool](../types/Bool.md) - -### Example: - - -``` -$MadelineProto = new \danog\MadelineProto\API(); -if (isset($token)) { // Login as a bot - $MadelineProto->bot_login($token); -} -if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } - $MadelineProto->complete_phone_login($code); -} - -$Bool = $MadelineProto->upload->saveBigFilePart(['file_id' => long, 'file_part' => int, 'file_total_parts' => int, 'bytes' => 'bytes', ]); -``` - -Or, if you're using the [PWRTelegram HTTP API](https://pwrtelegram.xyz): - -### As a bot: - -POST/GET to `https://api.pwrtelegram.xyz/botTOKEN/madeline` - -Parameters: - -* method - upload.saveBigFilePart -* params - `{"file_id": long, "file_part": int, "file_total_parts": int, "bytes": "bytes", }` - - - -### As a user: - -POST/GET to `https://api.pwrtelegram.xyz/userTOKEN/upload.saveBigFilePart` - -Parameters: - -file_id - Json encoded long -file_part - Json encoded int -file_total_parts - Json encoded int -bytes - Json encoded bytes - - - -Or, if you're into Lua: - -``` -Bool = upload.saveBigFilePart({file_id=long, file_part=int, file_total_parts=int, bytes='bytes', }) -``` - diff --git a/old_docs/API_docs_v38/methods/upload_saveFilePart.md b/old_docs/API_docs_v38/methods/upload_saveFilePart.md index 1c16e4b2..c482f321 100644 --- a/old_docs/API_docs_v38/methods/upload_saveFilePart.md +++ b/old_docs/API_docs_v38/methods/upload_saveFilePart.md @@ -6,71 +6,8 @@ description: upload.saveFilePart parameters, return type and example [Back to methods index](index.md) -*You cannot use this method directly, use the upload, download_to_stream, download_to_file, download_to_dir methods instead; see https://daniil.it/MadelineProto for more info* +**You cannot use this method directly, use the upload, download_to_stream, download_to_file, download_to_dir methods instead; see https://daniil.it/MadelineProto for more info** -### Parameters: - -| Name | Type | Required | -|----------|:-------------:|---------:| -|file\_id|[long](../types/long.md) | Yes| -|file\_part|[int](../types/int.md) | Yes| -|bytes|[bytes](../types/bytes.md) | Yes| - - -### Return type: [Bool](../types/Bool.md) - -### Example: - - -``` -$MadelineProto = new \danog\MadelineProto\API(); -if (isset($token)) { // Login as a bot - $MadelineProto->bot_login($token); -} -if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } - $MadelineProto->complete_phone_login($code); -} - -$Bool = $MadelineProto->upload->saveFilePart(['file_id' => long, 'file_part' => int, 'bytes' => 'bytes', ]); -``` - -Or, if you're using the [PWRTelegram HTTP API](https://pwrtelegram.xyz): - -### As a bot: - -POST/GET to `https://api.pwrtelegram.xyz/botTOKEN/madeline` - -Parameters: - -* method - upload.saveFilePart -* params - `{"file_id": long, "file_part": int, "bytes": "bytes", }` - - - -### As a user: - -POST/GET to `https://api.pwrtelegram.xyz/userTOKEN/upload.saveFilePart` - -Parameters: - -file_id - Json encoded long -file_part - Json encoded int -bytes - Json encoded bytes - - - -Or, if you're into Lua: - -``` -Bool = upload.saveFilePart({file_id=long, file_part=int, bytes='bytes', }) -``` - diff --git a/old_docs/API_docs_v38/methods/users_getFullUser.md b/old_docs/API_docs_v38/methods/users_getFullUser.md index 645ab12e..4ec831ec 100644 --- a/old_docs/API_docs_v38/methods/users_getFullUser.md +++ b/old_docs/API_docs_v38/methods/users_getFullUser.md @@ -6,67 +6,8 @@ description: users.getFullUser parameters, return type and example [Back to methods index](index.md) -*You cannot use this method directly, use the get_pwr_chat, get_info, get_full_info methods instead (see https://daniil.it/MadelineProto for more info)* +**You cannot use this method directly, use the get_pwr_chat, get_info, get_full_info methods instead (see https://daniil.it/MadelineProto for more info)** -### Parameters: - -| Name | Type | Required | -|----------|:-------------:|---------:| -|id|[InputUser](../types/InputUser.md) | Yes| - - -### Return type: [UserFull](../types/UserFull.md) - -### Example: - - -``` -$MadelineProto = new \danog\MadelineProto\API(); -if (isset($token)) { // Login as a bot - $MadelineProto->bot_login($token); -} -if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } - $MadelineProto->complete_phone_login($code); -} - -$UserFull = $MadelineProto->users->getFullUser(['id' => InputUser, ]); -``` - -Or, if you're using the [PWRTelegram HTTP API](https://pwrtelegram.xyz): - -### As a bot: - -POST/GET to `https://api.pwrtelegram.xyz/botTOKEN/madeline` - -Parameters: - -* method - users.getFullUser -* params - `{"id": InputUser, }` - - - -### As a user: - -POST/GET to `https://api.pwrtelegram.xyz/userTOKEN/users.getFullUser` - -Parameters: - -id - Json encoded InputUser - - - -Or, if you're into Lua: - -``` -UserFull = users.getFullUser({id=InputUser, }) -``` - diff --git a/old_docs/API_docs_v40/constructors/README.md b/old_docs/API_docs_v40/constructors/README.md index 7334fa3c..980a83f3 100644 --- a/old_docs/API_docs_v40/constructors/README.md +++ b/old_docs/API_docs_v40/constructors/README.md @@ -4,9 +4,6 @@ description: List of constructors --- # Constructors [Back to API documentation index](..) - - - ***

[$accountDaysTTL](../constructors/accountDaysTTL.md) = \['days' => [int](../types/int.md), \]; diff --git a/old_docs/API_docs_v40/methods/auth_importBotAuthorization.md b/old_docs/API_docs_v40/methods/auth_importBotAuthorization.md index 0d8836b6..57521a13 100644 --- a/old_docs/API_docs_v40/methods/auth_importBotAuthorization.md +++ b/old_docs/API_docs_v40/methods/auth_importBotAuthorization.md @@ -6,71 +6,8 @@ description: auth.importBotAuthorization parameters, return type and example [Back to methods index](index.md) -*You cannot use this method directly, use the bot_login method instead (see https://daniil.it/MadelineProto for more info)* +**You cannot use this method directly, use the bot_login method instead (see https://daniil.it/MadelineProto for more info)** -### Parameters: - -| Name | Type | Required | -|----------|:-------------:|---------:| -|api\_id|[int](../types/int.md) | Yes| -|api\_hash|[string](../types/string.md) | Yes| -|bot\_auth\_token|[string](../types/string.md) | Yes| - - -### Return type: [auth\_Authorization](../types/auth_Authorization.md) - -### Example: - - -``` -$MadelineProto = new \danog\MadelineProto\API(); -if (isset($token)) { // Login as a bot - $MadelineProto->bot_login($token); -} -if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } - $MadelineProto->complete_phone_login($code); -} - -$auth_Authorization = $MadelineProto->auth->importBotAuthorization(['api_id' => int, 'api_hash' => 'string', 'bot_auth_token' => 'string', ]); -``` - -Or, if you're using the [PWRTelegram HTTP API](https://pwrtelegram.xyz): - -### As a bot: - -POST/GET to `https://api.pwrtelegram.xyz/botTOKEN/madeline` - -Parameters: - -* method - auth.importBotAuthorization -* params - `{"api_id": int, "api_hash": "string", "bot_auth_token": "string", }` - - - -### As a user: - -POST/GET to `https://api.pwrtelegram.xyz/userTOKEN/auth.importBotAuthorization` - -Parameters: - -api_id - Json encoded int -api_hash - Json encoded string -bot_auth_token - Json encoded string - - - -Or, if you're into Lua: - -``` -auth_Authorization = auth.importBotAuthorization({api_id=int, api_hash='string', bot_auth_token='string', }) -``` - diff --git a/old_docs/API_docs_v40/methods/auth_logOut.md b/old_docs/API_docs_v40/methods/auth_logOut.md index 12159bab..7d5bb3f7 100644 --- a/old_docs/API_docs_v40/methods/auth_logOut.md +++ b/old_docs/API_docs_v40/methods/auth_logOut.md @@ -6,61 +6,8 @@ description: auth.logOut parameters, return type and example [Back to methods index](index.md) -*You cannot use this method directly, use the logout method instead (see https://daniil.it/MadelineProto for more info)* +**You cannot use this method directly, use the logout method instead (see https://daniil.it/MadelineProto for more info)** - - -### Return type: [Bool](../types/Bool.md) - -### Example: - - -``` -$MadelineProto = new \danog\MadelineProto\API(); -if (isset($token)) { // Login as a bot - $MadelineProto->bot_login($token); -} -if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } - $MadelineProto->complete_phone_login($code); -} - -$Bool = $MadelineProto->auth->logOut(); -``` - -Or, if you're using the [PWRTelegram HTTP API](https://pwrtelegram.xyz): - -### As a bot: - -POST/GET to `https://api.pwrtelegram.xyz/botTOKEN/madeline` - -Parameters: - -* method - auth.logOut -* params - `{}` - - - -### As a user: - -POST/GET to `https://api.pwrtelegram.xyz/userTOKEN/auth.logOut` - -Parameters: - - - - -Or, if you're into Lua: - -``` -Bool = auth.logOut({}) -``` - diff --git a/old_docs/API_docs_v40/methods/auth_sendCode.md b/old_docs/API_docs_v40/methods/auth_sendCode.md index 43bc28ee..22d1df94 100644 --- a/old_docs/API_docs_v40/methods/auth_sendCode.md +++ b/old_docs/API_docs_v40/methods/auth_sendCode.md @@ -6,75 +6,8 @@ description: auth.sendCode parameters, return type and example [Back to methods index](index.md) -*You cannot use this method directly, use the phone_login method instead (see https://daniil.it/MadelineProto for more info)* +**You cannot use this method directly, use the phone_login method instead (see https://daniil.it/MadelineProto for more info)** -### Parameters: - -| Name | Type | Required | -|----------|:-------------:|---------:| -|phone\_number|[string](../types/string.md) | Yes| -|sms\_type|[int](../types/int.md) | Yes| -|api\_id|[int](../types/int.md) | Yes| -|api\_hash|[string](../types/string.md) | Yes| -|lang\_code|[string](../types/string.md) | Yes| - - -### Return type: [auth\_SentCode](../types/auth_SentCode.md) - -### Example: - - -``` -$MadelineProto = new \danog\MadelineProto\API(); -if (isset($token)) { // Login as a bot - $MadelineProto->bot_login($token); -} -if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } - $MadelineProto->complete_phone_login($code); -} - -$auth_SentCode = $MadelineProto->auth->sendCode(['phone_number' => 'string', 'sms_type' => int, 'api_id' => int, 'api_hash' => 'string', 'lang_code' => 'string', ]); -``` - -Or, if you're using the [PWRTelegram HTTP API](https://pwrtelegram.xyz): - -### As a bot: - -POST/GET to `https://api.pwrtelegram.xyz/botTOKEN/madeline` - -Parameters: - -* method - auth.sendCode -* params - `{"phone_number": "string", "sms_type": int, "api_id": int, "api_hash": "string", "lang_code": "string", }` - - - -### As a user: - -POST/GET to `https://api.pwrtelegram.xyz/userTOKEN/auth.sendCode` - -Parameters: - -phone_number - Json encoded string -sms_type - Json encoded int -api_id - Json encoded int -api_hash - Json encoded string -lang_code - Json encoded string - - - -Or, if you're into Lua: - -``` -auth_SentCode = auth.sendCode({phone_number='string', sms_type=int, api_id=int, api_hash='string', lang_code='string', }) -``` - diff --git a/old_docs/API_docs_v40/methods/auth_signIn.md b/old_docs/API_docs_v40/methods/auth_signIn.md index 75c50d70..ab40bb4d 100644 --- a/old_docs/API_docs_v40/methods/auth_signIn.md +++ b/old_docs/API_docs_v40/methods/auth_signIn.md @@ -6,71 +6,8 @@ description: auth.signIn parameters, return type and example [Back to methods index](index.md) -*You cannot use this method directly, use the complete_phone_login method instead (see https://daniil.it/MadelineProto for more info)* +**You cannot use this method directly, use the complete_phone_login method instead (see https://daniil.it/MadelineProto for more info)** -### Parameters: - -| Name | Type | Required | -|----------|:-------------:|---------:| -|phone\_number|[string](../types/string.md) | Yes| -|phone\_code\_hash|[string](../types/string.md) | Yes| -|phone\_code|[string](../types/string.md) | Yes| - - -### Return type: [auth\_Authorization](../types/auth_Authorization.md) - -### Example: - - -``` -$MadelineProto = new \danog\MadelineProto\API(); -if (isset($token)) { // Login as a bot - $MadelineProto->bot_login($token); -} -if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } - $MadelineProto->complete_phone_login($code); -} - -$auth_Authorization = $MadelineProto->auth->signIn(['phone_number' => 'string', 'phone_code_hash' => 'string', 'phone_code' => 'string', ]); -``` - -Or, if you're using the [PWRTelegram HTTP API](https://pwrtelegram.xyz): - -### As a bot: - -POST/GET to `https://api.pwrtelegram.xyz/botTOKEN/madeline` - -Parameters: - -* method - auth.signIn -* params - `{"phone_number": "string", "phone_code_hash": "string", "phone_code": "string", }` - - - -### As a user: - -POST/GET to `https://api.pwrtelegram.xyz/userTOKEN/auth.signIn` - -Parameters: - -phone_number - Json encoded string -phone_code_hash - Json encoded string -phone_code - Json encoded string - - - -Or, if you're into Lua: - -``` -auth_Authorization = auth.signIn({phone_number='string', phone_code_hash='string', phone_code='string', }) -``` - diff --git a/old_docs/API_docs_v40/methods/auth_signUp.md b/old_docs/API_docs_v40/methods/auth_signUp.md index f2a72b68..042d1191 100644 --- a/old_docs/API_docs_v40/methods/auth_signUp.md +++ b/old_docs/API_docs_v40/methods/auth_signUp.md @@ -6,75 +6,8 @@ description: auth.signUp parameters, return type and example [Back to methods index](index.md) -*You cannot use this method directly, use the complete_signup method instead (see https://daniil.it/MadelineProto for more info)* +**You cannot use this method directly, use the complete_signup method instead (see https://daniil.it/MadelineProto for more info)** -### Parameters: - -| Name | Type | Required | -|----------|:-------------:|---------:| -|phone\_number|[string](../types/string.md) | Yes| -|phone\_code\_hash|[string](../types/string.md) | Yes| -|phone\_code|[string](../types/string.md) | Yes| -|first\_name|[string](../types/string.md) | Yes| -|last\_name|[string](../types/string.md) | Yes| - - -### Return type: [auth\_Authorization](../types/auth_Authorization.md) - -### Example: - - -``` -$MadelineProto = new \danog\MadelineProto\API(); -if (isset($token)) { // Login as a bot - $MadelineProto->bot_login($token); -} -if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } - $MadelineProto->complete_phone_login($code); -} - -$auth_Authorization = $MadelineProto->auth->signUp(['phone_number' => 'string', 'phone_code_hash' => 'string', 'phone_code' => 'string', 'first_name' => 'string', 'last_name' => 'string', ]); -``` - -Or, if you're using the [PWRTelegram HTTP API](https://pwrtelegram.xyz): - -### As a bot: - -POST/GET to `https://api.pwrtelegram.xyz/botTOKEN/madeline` - -Parameters: - -* method - auth.signUp -* params - `{"phone_number": "string", "phone_code_hash": "string", "phone_code": "string", "first_name": "string", "last_name": "string", }` - - - -### As a user: - -POST/GET to `https://api.pwrtelegram.xyz/userTOKEN/auth.signUp` - -Parameters: - -phone_number - Json encoded string -phone_code_hash - Json encoded string -phone_code - Json encoded string -first_name - Json encoded string -last_name - Json encoded string - - - -Or, if you're into Lua: - -``` -auth_Authorization = auth.signUp({phone_number='string', phone_code_hash='string', phone_code='string', first_name='string', last_name='string', }) -``` - diff --git a/old_docs/API_docs_v40/methods/contacts_resolveUsername.md b/old_docs/API_docs_v40/methods/contacts_resolveUsername.md index 353d1f0c..b665b382 100644 --- a/old_docs/API_docs_v40/methods/contacts_resolveUsername.md +++ b/old_docs/API_docs_v40/methods/contacts_resolveUsername.md @@ -6,67 +6,8 @@ description: contacts.resolveUsername parameters, return type and example [Back to methods index](index.md) -*You cannot use this method directly, use the resolve_username, get_pwr_chat, get_info, get_full_info methods instead (see https://daniil.it/MadelineProto for more info)* +**You cannot use this method directly, use the resolve_username, get_pwr_chat, get_info, get_full_info methods instead (see https://daniil.it/MadelineProto for more info)** -### Parameters: - -| Name | Type | Required | -|----------|:-------------:|---------:| -|username|[string](../types/string.md) | Yes| - - -### Return type: [User](../types/User.md) - -### Example: - - -``` -$MadelineProto = new \danog\MadelineProto\API(); -if (isset($token)) { // Login as a bot - $MadelineProto->bot_login($token); -} -if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } - $MadelineProto->complete_phone_login($code); -} - -$User = $MadelineProto->contacts->resolveUsername(['username' => 'string', ]); -``` - -Or, if you're using the [PWRTelegram HTTP API](https://pwrtelegram.xyz): - -### As a bot: - -POST/GET to `https://api.pwrtelegram.xyz/botTOKEN/madeline` - -Parameters: - -* method - contacts.resolveUsername -* params - `{"username": "string", }` - - - -### As a user: - -POST/GET to `https://api.pwrtelegram.xyz/userTOKEN/contacts.resolveUsername` - -Parameters: - -username - Json encoded string - - - -Or, if you're into Lua: - -``` -User = contacts.resolveUsername({username='string', }) -``` - diff --git a/old_docs/API_docs_v40/methods/messages_acceptEncryption.md b/old_docs/API_docs_v40/methods/messages_acceptEncryption.md index 548087b6..243c4c00 100644 --- a/old_docs/API_docs_v40/methods/messages_acceptEncryption.md +++ b/old_docs/API_docs_v40/methods/messages_acceptEncryption.md @@ -6,71 +6,8 @@ description: messages.acceptEncryption parameters, return type and example [Back to methods index](index.md) -*You cannot use this method directly, see https://daniil.it/MadelineProto for more info on handling secret chats* +**You cannot use this method directly, see https://daniil.it/MadelineProto for more info on handling secret chats** -### Parameters: - -| Name | Type | Required | -|----------|:-------------:|---------:| -|peer|[InputEncryptedChat](../types/InputEncryptedChat.md) | Yes| -|g\_b|[bytes](../types/bytes.md) | Yes| -|key\_fingerprint|[long](../types/long.md) | Yes| - - -### Return type: [EncryptedChat](../types/EncryptedChat.md) - -### Example: - - -``` -$MadelineProto = new \danog\MadelineProto\API(); -if (isset($token)) { // Login as a bot - $MadelineProto->bot_login($token); -} -if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } - $MadelineProto->complete_phone_login($code); -} - -$EncryptedChat = $MadelineProto->messages->acceptEncryption(['peer' => InputEncryptedChat, 'g_b' => 'bytes', 'key_fingerprint' => long, ]); -``` - -Or, if you're using the [PWRTelegram HTTP API](https://pwrtelegram.xyz): - -### As a bot: - -POST/GET to `https://api.pwrtelegram.xyz/botTOKEN/madeline` - -Parameters: - -* method - messages.acceptEncryption -* params - `{"peer": InputEncryptedChat, "g_b": "bytes", "key_fingerprint": long, }` - - - -### As a user: - -POST/GET to `https://api.pwrtelegram.xyz/userTOKEN/messages.acceptEncryption` - -Parameters: - -peer - Json encoded InputEncryptedChat -g_b - Json encoded bytes -key_fingerprint - Json encoded long - - - -Or, if you're into Lua: - -``` -EncryptedChat = messages.acceptEncryption({peer=InputEncryptedChat, g_b='bytes', key_fingerprint=long, }) -``` - diff --git a/old_docs/API_docs_v40/methods/messages_discardEncryption.md b/old_docs/API_docs_v40/methods/messages_discardEncryption.md index 72648e9d..3a9dc58b 100644 --- a/old_docs/API_docs_v40/methods/messages_discardEncryption.md +++ b/old_docs/API_docs_v40/methods/messages_discardEncryption.md @@ -6,67 +6,8 @@ description: messages.discardEncryption parameters, return type and example [Back to methods index](index.md) -*You cannot use this method directly, see https://daniil.it/MadelineProto for more info on handling secret chats* +**You cannot use this method directly, see https://daniil.it/MadelineProto for more info on handling secret chats** -### Parameters: - -| Name | Type | Required | -|----------|:-------------:|---------:| -|chat\_id|[int](../types/int.md) | Yes| - - -### Return type: [Bool](../types/Bool.md) - -### Example: - - -``` -$MadelineProto = new \danog\MadelineProto\API(); -if (isset($token)) { // Login as a bot - $MadelineProto->bot_login($token); -} -if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } - $MadelineProto->complete_phone_login($code); -} - -$Bool = $MadelineProto->messages->discardEncryption(['chat_id' => int, ]); -``` - -Or, if you're using the [PWRTelegram HTTP API](https://pwrtelegram.xyz): - -### As a bot: - -POST/GET to `https://api.pwrtelegram.xyz/botTOKEN/madeline` - -Parameters: - -* method - messages.discardEncryption -* params - `{"chat_id": int, }` - - - -### As a user: - -POST/GET to `https://api.pwrtelegram.xyz/userTOKEN/messages.discardEncryption` - -Parameters: - -chat_id - Json encoded int - - - -Or, if you're into Lua: - -``` -Bool = messages.discardEncryption({chat_id=int, }) -``` - diff --git a/old_docs/API_docs_v40/methods/messages_getFullChat.md b/old_docs/API_docs_v40/methods/messages_getFullChat.md index 62102b64..ffa9c281 100644 --- a/old_docs/API_docs_v40/methods/messages_getFullChat.md +++ b/old_docs/API_docs_v40/methods/messages_getFullChat.md @@ -6,67 +6,8 @@ description: messages.getFullChat parameters, return type and example [Back to methods index](index.md) -*You cannot use this method directly, use the get_pwr_chat, get_info, get_full_info methods instead (see https://daniil.it/MadelineProto for more info)* +**You cannot use this method directly, use the get_pwr_chat, get_info, get_full_info methods instead (see https://daniil.it/MadelineProto for more info)** -### Parameters: - -| Name | Type | Required | -|----------|:-------------:|---------:| -|chat\_id|[InputPeer](../types/InputPeer.md) | Yes| - - -### Return type: [messages\_ChatFull](../types/messages_ChatFull.md) - -### Example: - - -``` -$MadelineProto = new \danog\MadelineProto\API(); -if (isset($token)) { // Login as a bot - $MadelineProto->bot_login($token); -} -if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } - $MadelineProto->complete_phone_login($code); -} - -$messages_ChatFull = $MadelineProto->messages->getFullChat(['chat_id' => InputPeer, ]); -``` - -Or, if you're using the [PWRTelegram HTTP API](https://pwrtelegram.xyz): - -### As a bot: - -POST/GET to `https://api.pwrtelegram.xyz/botTOKEN/madeline` - -Parameters: - -* method - messages.getFullChat -* params - `{"chat_id": InputPeer, }` - - - -### As a user: - -POST/GET to `https://api.pwrtelegram.xyz/userTOKEN/messages.getFullChat` - -Parameters: - -chat_id - Json encoded InputPeer - - - -Or, if you're into Lua: - -``` -messages_ChatFull = messages.getFullChat({chat_id=InputPeer, }) -``` - diff --git a/old_docs/API_docs_v40/methods/messages_requestEncryption.md b/old_docs/API_docs_v40/methods/messages_requestEncryption.md index 2fd1f825..c8476667 100644 --- a/old_docs/API_docs_v40/methods/messages_requestEncryption.md +++ b/old_docs/API_docs_v40/methods/messages_requestEncryption.md @@ -6,69 +6,8 @@ description: messages.requestEncryption parameters, return type and example [Back to methods index](index.md) -*You cannot use this method directly, see https://daniil.it/MadelineProto for more info on handling secret chats* +**You cannot use this method directly, see https://daniil.it/MadelineProto for more info on handling secret chats** -### Parameters: - -| Name | Type | Required | -|----------|:-------------:|---------:| -|user\_id|[InputUser](../types/InputUser.md) | Yes| -|g\_a|[bytes](../types/bytes.md) | Yes| - - -### Return type: [EncryptedChat](../types/EncryptedChat.md) - -### Example: - - -``` -$MadelineProto = new \danog\MadelineProto\API(); -if (isset($token)) { // Login as a bot - $MadelineProto->bot_login($token); -} -if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } - $MadelineProto->complete_phone_login($code); -} - -$EncryptedChat = $MadelineProto->messages->requestEncryption(['user_id' => InputUser, 'g_a' => 'bytes', ]); -``` - -Or, if you're using the [PWRTelegram HTTP API](https://pwrtelegram.xyz): - -### As a bot: - -POST/GET to `https://api.pwrtelegram.xyz/botTOKEN/madeline` - -Parameters: - -* method - messages.requestEncryption -* params - `{"user_id": InputUser, "g_a": "bytes", }` - - - -### As a user: - -POST/GET to `https://api.pwrtelegram.xyz/userTOKEN/messages.requestEncryption` - -Parameters: - -user_id - Json encoded InputUser -g_a - Json encoded bytes - - - -Or, if you're into Lua: - -``` -EncryptedChat = messages.requestEncryption({user_id=InputUser, g_a='bytes', }) -``` - diff --git a/old_docs/API_docs_v40/methods/updates_getChannelDifference.md b/old_docs/API_docs_v40/methods/updates_getChannelDifference.md index 70233f8b..2e69d1cd 100644 --- a/old_docs/API_docs_v40/methods/updates_getChannelDifference.md +++ b/old_docs/API_docs_v40/methods/updates_getChannelDifference.md @@ -6,73 +6,8 @@ description: updates.getChannelDifference parameters, return type and example [Back to methods index](index.md) -*You cannot use this method directly, see https://daniil.it/MadelineProto for more info on handling updates* +**You cannot use this method directly, see https://daniil.it/MadelineProto for more info on handling updates** -### Parameters: - -| Name | Type | Required | -|----------|:-------------:|---------:| -|peer|[InputPeer](../types/InputPeer.md) | Yes| -|filter|[ChannelMessagesFilter](../types/ChannelMessagesFilter.md) | Yes| -|pts|[int](../types/int.md) | Yes| -|limit|[int](../types/int.md) | Yes| - - -### Return type: [updates\_ChannelDifference](../types/updates_ChannelDifference.md) - -### Example: - - -``` -$MadelineProto = new \danog\MadelineProto\API(); -if (isset($token)) { // Login as a bot - $MadelineProto->bot_login($token); -} -if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } - $MadelineProto->complete_phone_login($code); -} - -$updates_ChannelDifference = $MadelineProto->updates->getChannelDifference(['peer' => InputPeer, 'filter' => ChannelMessagesFilter, 'pts' => int, 'limit' => int, ]); -``` - -Or, if you're using the [PWRTelegram HTTP API](https://pwrtelegram.xyz): - -### As a bot: - -POST/GET to `https://api.pwrtelegram.xyz/botTOKEN/madeline` - -Parameters: - -* method - updates.getChannelDifference -* params - `{"peer": InputPeer, "filter": ChannelMessagesFilter, "pts": int, "limit": int, }` - - - -### As a user: - -POST/GET to `https://api.pwrtelegram.xyz/userTOKEN/updates.getChannelDifference` - -Parameters: - -peer - Json encoded InputPeer -filter - Json encoded ChannelMessagesFilter -pts - Json encoded int -limit - Json encoded int - - - -Or, if you're into Lua: - -``` -updates_ChannelDifference = updates.getChannelDifference({peer=InputPeer, filter=ChannelMessagesFilter, pts=int, limit=int, }) -``` - diff --git a/old_docs/API_docs_v40/methods/updates_getDifference.md b/old_docs/API_docs_v40/methods/updates_getDifference.md index 53c7b078..9bcee79a 100644 --- a/old_docs/API_docs_v40/methods/updates_getDifference.md +++ b/old_docs/API_docs_v40/methods/updates_getDifference.md @@ -6,71 +6,8 @@ description: updates.getDifference parameters, return type and example [Back to methods index](index.md) -*You cannot use this method directly, see https://daniil.it/MadelineProto for more info on handling updates* +**You cannot use this method directly, see https://daniil.it/MadelineProto for more info on handling updates** -### Parameters: - -| Name | Type | Required | -|----------|:-------------:|---------:| -|pts|[int](../types/int.md) | Yes| -|date|[int](../types/int.md) | Yes| -|qts|[int](../types/int.md) | Yes| - - -### Return type: [updates\_Difference](../types/updates_Difference.md) - -### Example: - - -``` -$MadelineProto = new \danog\MadelineProto\API(); -if (isset($token)) { // Login as a bot - $MadelineProto->bot_login($token); -} -if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } - $MadelineProto->complete_phone_login($code); -} - -$updates_Difference = $MadelineProto->updates->getDifference(['pts' => int, 'date' => int, 'qts' => int, ]); -``` - -Or, if you're using the [PWRTelegram HTTP API](https://pwrtelegram.xyz): - -### As a bot: - -POST/GET to `https://api.pwrtelegram.xyz/botTOKEN/madeline` - -Parameters: - -* method - updates.getDifference -* params - `{"pts": int, "date": int, "qts": int, }` - - - -### As a user: - -POST/GET to `https://api.pwrtelegram.xyz/userTOKEN/updates.getDifference` - -Parameters: - -pts - Json encoded int -date - Json encoded int -qts - Json encoded int - - - -Or, if you're into Lua: - -``` -updates_Difference = updates.getDifference({pts=int, date=int, qts=int, }) -``` - diff --git a/old_docs/API_docs_v40/methods/updates_getState.md b/old_docs/API_docs_v40/methods/updates_getState.md index 51f6ae80..fd5955ba 100644 --- a/old_docs/API_docs_v40/methods/updates_getState.md +++ b/old_docs/API_docs_v40/methods/updates_getState.md @@ -6,61 +6,8 @@ description: updates.getState parameters, return type and example [Back to methods index](index.md) -*You cannot use this method directly, see https://daniil.it/MadelineProto for more info on handling updates* +**You cannot use this method directly, see https://daniil.it/MadelineProto for more info on handling updates** - - -### Return type: [updates\_State](../types/updates_State.md) - -### Example: - - -``` -$MadelineProto = new \danog\MadelineProto\API(); -if (isset($token)) { // Login as a bot - $MadelineProto->bot_login($token); -} -if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } - $MadelineProto->complete_phone_login($code); -} - -$updates_State = $MadelineProto->updates->getState(); -``` - -Or, if you're using the [PWRTelegram HTTP API](https://pwrtelegram.xyz): - -### As a bot: - -POST/GET to `https://api.pwrtelegram.xyz/botTOKEN/madeline` - -Parameters: - -* method - updates.getState -* params - `{}` - - - -### As a user: - -POST/GET to `https://api.pwrtelegram.xyz/userTOKEN/updates.getState` - -Parameters: - - - - -Or, if you're into Lua: - -``` -updates_State = updates.getState({}) -``` - diff --git a/old_docs/API_docs_v40/methods/upload_getFile.md b/old_docs/API_docs_v40/methods/upload_getFile.md index a1003003..add7d54e 100644 --- a/old_docs/API_docs_v40/methods/upload_getFile.md +++ b/old_docs/API_docs_v40/methods/upload_getFile.md @@ -6,71 +6,8 @@ description: upload.getFile parameters, return type and example [Back to methods index](index.md) -*You cannot use this method directly, use the upload, download_to_stream, download_to_file, download_to_dir methods instead; see https://daniil.it/MadelineProto for more info* +**You cannot use this method directly, use the upload, download_to_stream, download_to_file, download_to_dir methods instead; see https://daniil.it/MadelineProto for more info** -### Parameters: - -| Name | Type | Required | -|----------|:-------------:|---------:| -|location|[InputFileLocation](../types/InputFileLocation.md) | Yes| -|offset|[int](../types/int.md) | Yes| -|limit|[int](../types/int.md) | Yes| - - -### Return type: [upload\_File](../types/upload_File.md) - -### Example: - - -``` -$MadelineProto = new \danog\MadelineProto\API(); -if (isset($token)) { // Login as a bot - $MadelineProto->bot_login($token); -} -if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } - $MadelineProto->complete_phone_login($code); -} - -$upload_File = $MadelineProto->upload->getFile(['location' => InputFileLocation, 'offset' => int, 'limit' => int, ]); -``` - -Or, if you're using the [PWRTelegram HTTP API](https://pwrtelegram.xyz): - -### As a bot: - -POST/GET to `https://api.pwrtelegram.xyz/botTOKEN/madeline` - -Parameters: - -* method - upload.getFile -* params - `{"location": InputFileLocation, "offset": int, "limit": int, }` - - - -### As a user: - -POST/GET to `https://api.pwrtelegram.xyz/userTOKEN/upload.getFile` - -Parameters: - -location - Json encoded InputFileLocation -offset - Json encoded int -limit - Json encoded int - - - -Or, if you're into Lua: - -``` -upload_File = upload.getFile({location=InputFileLocation, offset=int, limit=int, }) -``` - diff --git a/old_docs/API_docs_v40/methods/upload_saveBigFilePart.md b/old_docs/API_docs_v40/methods/upload_saveBigFilePart.md index e5c96d89..b1c3ea28 100644 --- a/old_docs/API_docs_v40/methods/upload_saveBigFilePart.md +++ b/old_docs/API_docs_v40/methods/upload_saveBigFilePart.md @@ -6,73 +6,8 @@ description: upload.saveBigFilePart parameters, return type and example [Back to methods index](index.md) -*You cannot use this method directly, use the upload, download_to_stream, download_to_file, download_to_dir methods instead; see https://daniil.it/MadelineProto for more info* +**You cannot use this method directly, use the upload, download_to_stream, download_to_file, download_to_dir methods instead; see https://daniil.it/MadelineProto for more info** -### Parameters: - -| Name | Type | Required | -|----------|:-------------:|---------:| -|file\_id|[long](../types/long.md) | Yes| -|file\_part|[int](../types/int.md) | Yes| -|file\_total\_parts|[int](../types/int.md) | Yes| -|bytes|[bytes](../types/bytes.md) | Yes| - - -### Return type: [Bool](../types/Bool.md) - -### Example: - - -``` -$MadelineProto = new \danog\MadelineProto\API(); -if (isset($token)) { // Login as a bot - $MadelineProto->bot_login($token); -} -if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } - $MadelineProto->complete_phone_login($code); -} - -$Bool = $MadelineProto->upload->saveBigFilePart(['file_id' => long, 'file_part' => int, 'file_total_parts' => int, 'bytes' => 'bytes', ]); -``` - -Or, if you're using the [PWRTelegram HTTP API](https://pwrtelegram.xyz): - -### As a bot: - -POST/GET to `https://api.pwrtelegram.xyz/botTOKEN/madeline` - -Parameters: - -* method - upload.saveBigFilePart -* params - `{"file_id": long, "file_part": int, "file_total_parts": int, "bytes": "bytes", }` - - - -### As a user: - -POST/GET to `https://api.pwrtelegram.xyz/userTOKEN/upload.saveBigFilePart` - -Parameters: - -file_id - Json encoded long -file_part - Json encoded int -file_total_parts - Json encoded int -bytes - Json encoded bytes - - - -Or, if you're into Lua: - -``` -Bool = upload.saveBigFilePart({file_id=long, file_part=int, file_total_parts=int, bytes='bytes', }) -``` - diff --git a/old_docs/API_docs_v40/methods/upload_saveFilePart.md b/old_docs/API_docs_v40/methods/upload_saveFilePart.md index 1c16e4b2..c482f321 100644 --- a/old_docs/API_docs_v40/methods/upload_saveFilePart.md +++ b/old_docs/API_docs_v40/methods/upload_saveFilePart.md @@ -6,71 +6,8 @@ description: upload.saveFilePart parameters, return type and example [Back to methods index](index.md) -*You cannot use this method directly, use the upload, download_to_stream, download_to_file, download_to_dir methods instead; see https://daniil.it/MadelineProto for more info* +**You cannot use this method directly, use the upload, download_to_stream, download_to_file, download_to_dir methods instead; see https://daniil.it/MadelineProto for more info** -### Parameters: - -| Name | Type | Required | -|----------|:-------------:|---------:| -|file\_id|[long](../types/long.md) | Yes| -|file\_part|[int](../types/int.md) | Yes| -|bytes|[bytes](../types/bytes.md) | Yes| - - -### Return type: [Bool](../types/Bool.md) - -### Example: - - -``` -$MadelineProto = new \danog\MadelineProto\API(); -if (isset($token)) { // Login as a bot - $MadelineProto->bot_login($token); -} -if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } - $MadelineProto->complete_phone_login($code); -} - -$Bool = $MadelineProto->upload->saveFilePart(['file_id' => long, 'file_part' => int, 'bytes' => 'bytes', ]); -``` - -Or, if you're using the [PWRTelegram HTTP API](https://pwrtelegram.xyz): - -### As a bot: - -POST/GET to `https://api.pwrtelegram.xyz/botTOKEN/madeline` - -Parameters: - -* method - upload.saveFilePart -* params - `{"file_id": long, "file_part": int, "bytes": "bytes", }` - - - -### As a user: - -POST/GET to `https://api.pwrtelegram.xyz/userTOKEN/upload.saveFilePart` - -Parameters: - -file_id - Json encoded long -file_part - Json encoded int -bytes - Json encoded bytes - - - -Or, if you're into Lua: - -``` -Bool = upload.saveFilePart({file_id=long, file_part=int, bytes='bytes', }) -``` - diff --git a/old_docs/API_docs_v40/methods/users_getFullUser.md b/old_docs/API_docs_v40/methods/users_getFullUser.md index 645ab12e..4ec831ec 100644 --- a/old_docs/API_docs_v40/methods/users_getFullUser.md +++ b/old_docs/API_docs_v40/methods/users_getFullUser.md @@ -6,67 +6,8 @@ description: users.getFullUser parameters, return type and example [Back to methods index](index.md) -*You cannot use this method directly, use the get_pwr_chat, get_info, get_full_info methods instead (see https://daniil.it/MadelineProto for more info)* +**You cannot use this method directly, use the get_pwr_chat, get_info, get_full_info methods instead (see https://daniil.it/MadelineProto for more info)** -### Parameters: - -| Name | Type | Required | -|----------|:-------------:|---------:| -|id|[InputUser](../types/InputUser.md) | Yes| - - -### Return type: [UserFull](../types/UserFull.md) - -### Example: - - -``` -$MadelineProto = new \danog\MadelineProto\API(); -if (isset($token)) { // Login as a bot - $MadelineProto->bot_login($token); -} -if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } - $MadelineProto->complete_phone_login($code); -} - -$UserFull = $MadelineProto->users->getFullUser(['id' => InputUser, ]); -``` - -Or, if you're using the [PWRTelegram HTTP API](https://pwrtelegram.xyz): - -### As a bot: - -POST/GET to `https://api.pwrtelegram.xyz/botTOKEN/madeline` - -Parameters: - -* method - users.getFullUser -* params - `{"id": InputUser, }` - - - -### As a user: - -POST/GET to `https://api.pwrtelegram.xyz/userTOKEN/users.getFullUser` - -Parameters: - -id - Json encoded InputUser - - - -Or, if you're into Lua: - -``` -UserFull = users.getFullUser({id=InputUser, }) -``` - diff --git a/old_docs/API_docs_v41/constructors/README.md b/old_docs/API_docs_v41/constructors/README.md index 5ada9876..0b43a88c 100644 --- a/old_docs/API_docs_v41/constructors/README.md +++ b/old_docs/API_docs_v41/constructors/README.md @@ -4,9 +4,6 @@ description: List of constructors --- # Constructors [Back to API documentation index](..) - - - ***

[$accountDaysTTL](../constructors/accountDaysTTL.md) = \['days' => [int](../types/int.md), \]; diff --git a/old_docs/API_docs_v41/methods/auth_importBotAuthorization.md b/old_docs/API_docs_v41/methods/auth_importBotAuthorization.md index 0d8836b6..57521a13 100644 --- a/old_docs/API_docs_v41/methods/auth_importBotAuthorization.md +++ b/old_docs/API_docs_v41/methods/auth_importBotAuthorization.md @@ -6,71 +6,8 @@ description: auth.importBotAuthorization parameters, return type and example [Back to methods index](index.md) -*You cannot use this method directly, use the bot_login method instead (see https://daniil.it/MadelineProto for more info)* +**You cannot use this method directly, use the bot_login method instead (see https://daniil.it/MadelineProto for more info)** -### Parameters: - -| Name | Type | Required | -|----------|:-------------:|---------:| -|api\_id|[int](../types/int.md) | Yes| -|api\_hash|[string](../types/string.md) | Yes| -|bot\_auth\_token|[string](../types/string.md) | Yes| - - -### Return type: [auth\_Authorization](../types/auth_Authorization.md) - -### Example: - - -``` -$MadelineProto = new \danog\MadelineProto\API(); -if (isset($token)) { // Login as a bot - $MadelineProto->bot_login($token); -} -if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } - $MadelineProto->complete_phone_login($code); -} - -$auth_Authorization = $MadelineProto->auth->importBotAuthorization(['api_id' => int, 'api_hash' => 'string', 'bot_auth_token' => 'string', ]); -``` - -Or, if you're using the [PWRTelegram HTTP API](https://pwrtelegram.xyz): - -### As a bot: - -POST/GET to `https://api.pwrtelegram.xyz/botTOKEN/madeline` - -Parameters: - -* method - auth.importBotAuthorization -* params - `{"api_id": int, "api_hash": "string", "bot_auth_token": "string", }` - - - -### As a user: - -POST/GET to `https://api.pwrtelegram.xyz/userTOKEN/auth.importBotAuthorization` - -Parameters: - -api_id - Json encoded int -api_hash - Json encoded string -bot_auth_token - Json encoded string - - - -Or, if you're into Lua: - -``` -auth_Authorization = auth.importBotAuthorization({api_id=int, api_hash='string', bot_auth_token='string', }) -``` - diff --git a/old_docs/API_docs_v41/methods/auth_logOut.md b/old_docs/API_docs_v41/methods/auth_logOut.md index 12159bab..7d5bb3f7 100644 --- a/old_docs/API_docs_v41/methods/auth_logOut.md +++ b/old_docs/API_docs_v41/methods/auth_logOut.md @@ -6,61 +6,8 @@ description: auth.logOut parameters, return type and example [Back to methods index](index.md) -*You cannot use this method directly, use the logout method instead (see https://daniil.it/MadelineProto for more info)* +**You cannot use this method directly, use the logout method instead (see https://daniil.it/MadelineProto for more info)** - - -### Return type: [Bool](../types/Bool.md) - -### Example: - - -``` -$MadelineProto = new \danog\MadelineProto\API(); -if (isset($token)) { // Login as a bot - $MadelineProto->bot_login($token); -} -if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } - $MadelineProto->complete_phone_login($code); -} - -$Bool = $MadelineProto->auth->logOut(); -``` - -Or, if you're using the [PWRTelegram HTTP API](https://pwrtelegram.xyz): - -### As a bot: - -POST/GET to `https://api.pwrtelegram.xyz/botTOKEN/madeline` - -Parameters: - -* method - auth.logOut -* params - `{}` - - - -### As a user: - -POST/GET to `https://api.pwrtelegram.xyz/userTOKEN/auth.logOut` - -Parameters: - - - - -Or, if you're into Lua: - -``` -Bool = auth.logOut({}) -``` - diff --git a/old_docs/API_docs_v41/methods/auth_sendCode.md b/old_docs/API_docs_v41/methods/auth_sendCode.md index 43bc28ee..22d1df94 100644 --- a/old_docs/API_docs_v41/methods/auth_sendCode.md +++ b/old_docs/API_docs_v41/methods/auth_sendCode.md @@ -6,75 +6,8 @@ description: auth.sendCode parameters, return type and example [Back to methods index](index.md) -*You cannot use this method directly, use the phone_login method instead (see https://daniil.it/MadelineProto for more info)* +**You cannot use this method directly, use the phone_login method instead (see https://daniil.it/MadelineProto for more info)** -### Parameters: - -| Name | Type | Required | -|----------|:-------------:|---------:| -|phone\_number|[string](../types/string.md) | Yes| -|sms\_type|[int](../types/int.md) | Yes| -|api\_id|[int](../types/int.md) | Yes| -|api\_hash|[string](../types/string.md) | Yes| -|lang\_code|[string](../types/string.md) | Yes| - - -### Return type: [auth\_SentCode](../types/auth_SentCode.md) - -### Example: - - -``` -$MadelineProto = new \danog\MadelineProto\API(); -if (isset($token)) { // Login as a bot - $MadelineProto->bot_login($token); -} -if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } - $MadelineProto->complete_phone_login($code); -} - -$auth_SentCode = $MadelineProto->auth->sendCode(['phone_number' => 'string', 'sms_type' => int, 'api_id' => int, 'api_hash' => 'string', 'lang_code' => 'string', ]); -``` - -Or, if you're using the [PWRTelegram HTTP API](https://pwrtelegram.xyz): - -### As a bot: - -POST/GET to `https://api.pwrtelegram.xyz/botTOKEN/madeline` - -Parameters: - -* method - auth.sendCode -* params - `{"phone_number": "string", "sms_type": int, "api_id": int, "api_hash": "string", "lang_code": "string", }` - - - -### As a user: - -POST/GET to `https://api.pwrtelegram.xyz/userTOKEN/auth.sendCode` - -Parameters: - -phone_number - Json encoded string -sms_type - Json encoded int -api_id - Json encoded int -api_hash - Json encoded string -lang_code - Json encoded string - - - -Or, if you're into Lua: - -``` -auth_SentCode = auth.sendCode({phone_number='string', sms_type=int, api_id=int, api_hash='string', lang_code='string', }) -``` - diff --git a/old_docs/API_docs_v41/methods/auth_signIn.md b/old_docs/API_docs_v41/methods/auth_signIn.md index 75c50d70..ab40bb4d 100644 --- a/old_docs/API_docs_v41/methods/auth_signIn.md +++ b/old_docs/API_docs_v41/methods/auth_signIn.md @@ -6,71 +6,8 @@ description: auth.signIn parameters, return type and example [Back to methods index](index.md) -*You cannot use this method directly, use the complete_phone_login method instead (see https://daniil.it/MadelineProto for more info)* +**You cannot use this method directly, use the complete_phone_login method instead (see https://daniil.it/MadelineProto for more info)** -### Parameters: - -| Name | Type | Required | -|----------|:-------------:|---------:| -|phone\_number|[string](../types/string.md) | Yes| -|phone\_code\_hash|[string](../types/string.md) | Yes| -|phone\_code|[string](../types/string.md) | Yes| - - -### Return type: [auth\_Authorization](../types/auth_Authorization.md) - -### Example: - - -``` -$MadelineProto = new \danog\MadelineProto\API(); -if (isset($token)) { // Login as a bot - $MadelineProto->bot_login($token); -} -if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } - $MadelineProto->complete_phone_login($code); -} - -$auth_Authorization = $MadelineProto->auth->signIn(['phone_number' => 'string', 'phone_code_hash' => 'string', 'phone_code' => 'string', ]); -``` - -Or, if you're using the [PWRTelegram HTTP API](https://pwrtelegram.xyz): - -### As a bot: - -POST/GET to `https://api.pwrtelegram.xyz/botTOKEN/madeline` - -Parameters: - -* method - auth.signIn -* params - `{"phone_number": "string", "phone_code_hash": "string", "phone_code": "string", }` - - - -### As a user: - -POST/GET to `https://api.pwrtelegram.xyz/userTOKEN/auth.signIn` - -Parameters: - -phone_number - Json encoded string -phone_code_hash - Json encoded string -phone_code - Json encoded string - - - -Or, if you're into Lua: - -``` -auth_Authorization = auth.signIn({phone_number='string', phone_code_hash='string', phone_code='string', }) -``` - diff --git a/old_docs/API_docs_v41/methods/auth_signUp.md b/old_docs/API_docs_v41/methods/auth_signUp.md index f2a72b68..042d1191 100644 --- a/old_docs/API_docs_v41/methods/auth_signUp.md +++ b/old_docs/API_docs_v41/methods/auth_signUp.md @@ -6,75 +6,8 @@ description: auth.signUp parameters, return type and example [Back to methods index](index.md) -*You cannot use this method directly, use the complete_signup method instead (see https://daniil.it/MadelineProto for more info)* +**You cannot use this method directly, use the complete_signup method instead (see https://daniil.it/MadelineProto for more info)** -### Parameters: - -| Name | Type | Required | -|----------|:-------------:|---------:| -|phone\_number|[string](../types/string.md) | Yes| -|phone\_code\_hash|[string](../types/string.md) | Yes| -|phone\_code|[string](../types/string.md) | Yes| -|first\_name|[string](../types/string.md) | Yes| -|last\_name|[string](../types/string.md) | Yes| - - -### Return type: [auth\_Authorization](../types/auth_Authorization.md) - -### Example: - - -``` -$MadelineProto = new \danog\MadelineProto\API(); -if (isset($token)) { // Login as a bot - $MadelineProto->bot_login($token); -} -if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } - $MadelineProto->complete_phone_login($code); -} - -$auth_Authorization = $MadelineProto->auth->signUp(['phone_number' => 'string', 'phone_code_hash' => 'string', 'phone_code' => 'string', 'first_name' => 'string', 'last_name' => 'string', ]); -``` - -Or, if you're using the [PWRTelegram HTTP API](https://pwrtelegram.xyz): - -### As a bot: - -POST/GET to `https://api.pwrtelegram.xyz/botTOKEN/madeline` - -Parameters: - -* method - auth.signUp -* params - `{"phone_number": "string", "phone_code_hash": "string", "phone_code": "string", "first_name": "string", "last_name": "string", }` - - - -### As a user: - -POST/GET to `https://api.pwrtelegram.xyz/userTOKEN/auth.signUp` - -Parameters: - -phone_number - Json encoded string -phone_code_hash - Json encoded string -phone_code - Json encoded string -first_name - Json encoded string -last_name - Json encoded string - - - -Or, if you're into Lua: - -``` -auth_Authorization = auth.signUp({phone_number='string', phone_code_hash='string', phone_code='string', first_name='string', last_name='string', }) -``` - diff --git a/old_docs/API_docs_v41/methods/channels_getFullChannel.md b/old_docs/API_docs_v41/methods/channels_getFullChannel.md index 340efcfe..58dbe057 100644 --- a/old_docs/API_docs_v41/methods/channels_getFullChannel.md +++ b/old_docs/API_docs_v41/methods/channels_getFullChannel.md @@ -6,67 +6,8 @@ description: channels.getFullChannel parameters, return type and example [Back to methods index](index.md) -*You cannot use this method directly, use the get_pwr_chat, get_info, get_full_info methods instead (see https://daniil.it/MadelineProto for more info)* +**You cannot use this method directly, use the get_pwr_chat, get_info, get_full_info methods instead (see https://daniil.it/MadelineProto for more info)** -### Parameters: - -| Name | Type | Required | -|----------|:-------------:|---------:| -|channel|[InputChannel](../types/InputChannel.md) | Yes| - - -### Return type: [messages\_ChatFull](../types/messages_ChatFull.md) - -### Example: - - -``` -$MadelineProto = new \danog\MadelineProto\API(); -if (isset($token)) { // Login as a bot - $MadelineProto->bot_login($token); -} -if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } - $MadelineProto->complete_phone_login($code); -} - -$messages_ChatFull = $MadelineProto->channels->getFullChannel(['channel' => InputChannel, ]); -``` - -Or, if you're using the [PWRTelegram HTTP API](https://pwrtelegram.xyz): - -### As a bot: - -POST/GET to `https://api.pwrtelegram.xyz/botTOKEN/madeline` - -Parameters: - -* method - channels.getFullChannel -* params - `{"channel": InputChannel, }` - - - -### As a user: - -POST/GET to `https://api.pwrtelegram.xyz/userTOKEN/channels.getFullChannel` - -Parameters: - -channel - Json encoded InputChannel - - - -Or, if you're into Lua: - -``` -messages_ChatFull = channels.getFullChannel({channel=InputChannel, }) -``` - diff --git a/old_docs/API_docs_v41/methods/channels_getParticipants.md b/old_docs/API_docs_v41/methods/channels_getParticipants.md index 4c6e09cc..d84cf09c 100644 --- a/old_docs/API_docs_v41/methods/channels_getParticipants.md +++ b/old_docs/API_docs_v41/methods/channels_getParticipants.md @@ -6,73 +6,8 @@ description: channels.getParticipants parameters, return type and example [Back to methods index](index.md) -*You cannot use this method directly, use the get_pwr_chat, get_info, get_full_info methods instead (see https://daniil.it/MadelineProto for more info)* +**You cannot use this method directly, use the get_pwr_chat, get_info, get_full_info methods instead (see https://daniil.it/MadelineProto for more info)** -### Parameters: - -| Name | Type | Required | -|----------|:-------------:|---------:| -|channel|[InputChannel](../types/InputChannel.md) | Yes| -|filter|[ChannelParticipantsFilter](../types/ChannelParticipantsFilter.md) | Yes| -|offset|[int](../types/int.md) | Yes| -|limit|[int](../types/int.md) | Yes| - - -### Return type: [channels\_ChannelParticipants](../types/channels_ChannelParticipants.md) - -### Example: - - -``` -$MadelineProto = new \danog\MadelineProto\API(); -if (isset($token)) { // Login as a bot - $MadelineProto->bot_login($token); -} -if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } - $MadelineProto->complete_phone_login($code); -} - -$channels_ChannelParticipants = $MadelineProto->channels->getParticipants(['channel' => InputChannel, 'filter' => ChannelParticipantsFilter, 'offset' => int, 'limit' => int, ]); -``` - -Or, if you're using the [PWRTelegram HTTP API](https://pwrtelegram.xyz): - -### As a bot: - -POST/GET to `https://api.pwrtelegram.xyz/botTOKEN/madeline` - -Parameters: - -* method - channels.getParticipants -* params - `{"channel": InputChannel, "filter": ChannelParticipantsFilter, "offset": int, "limit": int, }` - - - -### As a user: - -POST/GET to `https://api.pwrtelegram.xyz/userTOKEN/channels.getParticipants` - -Parameters: - -channel - Json encoded InputChannel -filter - Json encoded ChannelParticipantsFilter -offset - Json encoded int -limit - Json encoded int - - - -Or, if you're into Lua: - -``` -channels_ChannelParticipants = channels.getParticipants({channel=InputChannel, filter=ChannelParticipantsFilter, offset=int, limit=int, }) -``` - diff --git a/old_docs/API_docs_v41/methods/contacts_resolveUsername.md b/old_docs/API_docs_v41/methods/contacts_resolveUsername.md index 90e72851..b665b382 100644 --- a/old_docs/API_docs_v41/methods/contacts_resolveUsername.md +++ b/old_docs/API_docs_v41/methods/contacts_resolveUsername.md @@ -6,67 +6,8 @@ description: contacts.resolveUsername parameters, return type and example [Back to methods index](index.md) -*You cannot use this method directly, use the resolve_username, get_pwr_chat, get_info, get_full_info methods instead (see https://daniil.it/MadelineProto for more info)* +**You cannot use this method directly, use the resolve_username, get_pwr_chat, get_info, get_full_info methods instead (see https://daniil.it/MadelineProto for more info)** -### Parameters: - -| Name | Type | Required | -|----------|:-------------:|---------:| -|username|[string](../types/string.md) | Yes| - - -### Return type: [contacts\_ResolvedPeer](../types/contacts_ResolvedPeer.md) - -### Example: - - -``` -$MadelineProto = new \danog\MadelineProto\API(); -if (isset($token)) { // Login as a bot - $MadelineProto->bot_login($token); -} -if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } - $MadelineProto->complete_phone_login($code); -} - -$contacts_ResolvedPeer = $MadelineProto->contacts->resolveUsername(['username' => 'string', ]); -``` - -Or, if you're using the [PWRTelegram HTTP API](https://pwrtelegram.xyz): - -### As a bot: - -POST/GET to `https://api.pwrtelegram.xyz/botTOKEN/madeline` - -Parameters: - -* method - contacts.resolveUsername -* params - `{"username": "string", }` - - - -### As a user: - -POST/GET to `https://api.pwrtelegram.xyz/userTOKEN/contacts.resolveUsername` - -Parameters: - -username - Json encoded string - - - -Or, if you're into Lua: - -``` -contacts_ResolvedPeer = contacts.resolveUsername({username='string', }) -``` - diff --git a/old_docs/API_docs_v41/methods/messages_acceptEncryption.md b/old_docs/API_docs_v41/methods/messages_acceptEncryption.md index 548087b6..243c4c00 100644 --- a/old_docs/API_docs_v41/methods/messages_acceptEncryption.md +++ b/old_docs/API_docs_v41/methods/messages_acceptEncryption.md @@ -6,71 +6,8 @@ description: messages.acceptEncryption parameters, return type and example [Back to methods index](index.md) -*You cannot use this method directly, see https://daniil.it/MadelineProto for more info on handling secret chats* +**You cannot use this method directly, see https://daniil.it/MadelineProto for more info on handling secret chats** -### Parameters: - -| Name | Type | Required | -|----------|:-------------:|---------:| -|peer|[InputEncryptedChat](../types/InputEncryptedChat.md) | Yes| -|g\_b|[bytes](../types/bytes.md) | Yes| -|key\_fingerprint|[long](../types/long.md) | Yes| - - -### Return type: [EncryptedChat](../types/EncryptedChat.md) - -### Example: - - -``` -$MadelineProto = new \danog\MadelineProto\API(); -if (isset($token)) { // Login as a bot - $MadelineProto->bot_login($token); -} -if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } - $MadelineProto->complete_phone_login($code); -} - -$EncryptedChat = $MadelineProto->messages->acceptEncryption(['peer' => InputEncryptedChat, 'g_b' => 'bytes', 'key_fingerprint' => long, ]); -``` - -Or, if you're using the [PWRTelegram HTTP API](https://pwrtelegram.xyz): - -### As a bot: - -POST/GET to `https://api.pwrtelegram.xyz/botTOKEN/madeline` - -Parameters: - -* method - messages.acceptEncryption -* params - `{"peer": InputEncryptedChat, "g_b": "bytes", "key_fingerprint": long, }` - - - -### As a user: - -POST/GET to `https://api.pwrtelegram.xyz/userTOKEN/messages.acceptEncryption` - -Parameters: - -peer - Json encoded InputEncryptedChat -g_b - Json encoded bytes -key_fingerprint - Json encoded long - - - -Or, if you're into Lua: - -``` -EncryptedChat = messages.acceptEncryption({peer=InputEncryptedChat, g_b='bytes', key_fingerprint=long, }) -``` - diff --git a/old_docs/API_docs_v41/methods/messages_discardEncryption.md b/old_docs/API_docs_v41/methods/messages_discardEncryption.md index 72648e9d..3a9dc58b 100644 --- a/old_docs/API_docs_v41/methods/messages_discardEncryption.md +++ b/old_docs/API_docs_v41/methods/messages_discardEncryption.md @@ -6,67 +6,8 @@ description: messages.discardEncryption parameters, return type and example [Back to methods index](index.md) -*You cannot use this method directly, see https://daniil.it/MadelineProto for more info on handling secret chats* +**You cannot use this method directly, see https://daniil.it/MadelineProto for more info on handling secret chats** -### Parameters: - -| Name | Type | Required | -|----------|:-------------:|---------:| -|chat\_id|[int](../types/int.md) | Yes| - - -### Return type: [Bool](../types/Bool.md) - -### Example: - - -``` -$MadelineProto = new \danog\MadelineProto\API(); -if (isset($token)) { // Login as a bot - $MadelineProto->bot_login($token); -} -if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } - $MadelineProto->complete_phone_login($code); -} - -$Bool = $MadelineProto->messages->discardEncryption(['chat_id' => int, ]); -``` - -Or, if you're using the [PWRTelegram HTTP API](https://pwrtelegram.xyz): - -### As a bot: - -POST/GET to `https://api.pwrtelegram.xyz/botTOKEN/madeline` - -Parameters: - -* method - messages.discardEncryption -* params - `{"chat_id": int, }` - - - -### As a user: - -POST/GET to `https://api.pwrtelegram.xyz/userTOKEN/messages.discardEncryption` - -Parameters: - -chat_id - Json encoded int - - - -Or, if you're into Lua: - -``` -Bool = messages.discardEncryption({chat_id=int, }) -``` - diff --git a/old_docs/API_docs_v41/methods/messages_getFullChat.md b/old_docs/API_docs_v41/methods/messages_getFullChat.md index 62102b64..ffa9c281 100644 --- a/old_docs/API_docs_v41/methods/messages_getFullChat.md +++ b/old_docs/API_docs_v41/methods/messages_getFullChat.md @@ -6,67 +6,8 @@ description: messages.getFullChat parameters, return type and example [Back to methods index](index.md) -*You cannot use this method directly, use the get_pwr_chat, get_info, get_full_info methods instead (see https://daniil.it/MadelineProto for more info)* +**You cannot use this method directly, use the get_pwr_chat, get_info, get_full_info methods instead (see https://daniil.it/MadelineProto for more info)** -### Parameters: - -| Name | Type | Required | -|----------|:-------------:|---------:| -|chat\_id|[InputPeer](../types/InputPeer.md) | Yes| - - -### Return type: [messages\_ChatFull](../types/messages_ChatFull.md) - -### Example: - - -``` -$MadelineProto = new \danog\MadelineProto\API(); -if (isset($token)) { // Login as a bot - $MadelineProto->bot_login($token); -} -if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } - $MadelineProto->complete_phone_login($code); -} - -$messages_ChatFull = $MadelineProto->messages->getFullChat(['chat_id' => InputPeer, ]); -``` - -Or, if you're using the [PWRTelegram HTTP API](https://pwrtelegram.xyz): - -### As a bot: - -POST/GET to `https://api.pwrtelegram.xyz/botTOKEN/madeline` - -Parameters: - -* method - messages.getFullChat -* params - `{"chat_id": InputPeer, }` - - - -### As a user: - -POST/GET to `https://api.pwrtelegram.xyz/userTOKEN/messages.getFullChat` - -Parameters: - -chat_id - Json encoded InputPeer - - - -Or, if you're into Lua: - -``` -messages_ChatFull = messages.getFullChat({chat_id=InputPeer, }) -``` - diff --git a/old_docs/API_docs_v41/methods/messages_requestEncryption.md b/old_docs/API_docs_v41/methods/messages_requestEncryption.md index 2fd1f825..c8476667 100644 --- a/old_docs/API_docs_v41/methods/messages_requestEncryption.md +++ b/old_docs/API_docs_v41/methods/messages_requestEncryption.md @@ -6,69 +6,8 @@ description: messages.requestEncryption parameters, return type and example [Back to methods index](index.md) -*You cannot use this method directly, see https://daniil.it/MadelineProto for more info on handling secret chats* +**You cannot use this method directly, see https://daniil.it/MadelineProto for more info on handling secret chats** -### Parameters: - -| Name | Type | Required | -|----------|:-------------:|---------:| -|user\_id|[InputUser](../types/InputUser.md) | Yes| -|g\_a|[bytes](../types/bytes.md) | Yes| - - -### Return type: [EncryptedChat](../types/EncryptedChat.md) - -### Example: - - -``` -$MadelineProto = new \danog\MadelineProto\API(); -if (isset($token)) { // Login as a bot - $MadelineProto->bot_login($token); -} -if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } - $MadelineProto->complete_phone_login($code); -} - -$EncryptedChat = $MadelineProto->messages->requestEncryption(['user_id' => InputUser, 'g_a' => 'bytes', ]); -``` - -Or, if you're using the [PWRTelegram HTTP API](https://pwrtelegram.xyz): - -### As a bot: - -POST/GET to `https://api.pwrtelegram.xyz/botTOKEN/madeline` - -Parameters: - -* method - messages.requestEncryption -* params - `{"user_id": InputUser, "g_a": "bytes", }` - - - -### As a user: - -POST/GET to `https://api.pwrtelegram.xyz/userTOKEN/messages.requestEncryption` - -Parameters: - -user_id - Json encoded InputUser -g_a - Json encoded bytes - - - -Or, if you're into Lua: - -``` -EncryptedChat = messages.requestEncryption({user_id=InputUser, g_a='bytes', }) -``` - diff --git a/old_docs/API_docs_v41/methods/updates_getChannelDifference.md b/old_docs/API_docs_v41/methods/updates_getChannelDifference.md index 51ea7aa5..2e69d1cd 100644 --- a/old_docs/API_docs_v41/methods/updates_getChannelDifference.md +++ b/old_docs/API_docs_v41/methods/updates_getChannelDifference.md @@ -6,73 +6,8 @@ description: updates.getChannelDifference parameters, return type and example [Back to methods index](index.md) -*You cannot use this method directly, see https://daniil.it/MadelineProto for more info on handling updates* +**You cannot use this method directly, see https://daniil.it/MadelineProto for more info on handling updates** -### Parameters: - -| Name | Type | Required | -|----------|:-------------:|---------:| -|channel|[InputChannel](../types/InputChannel.md) | Yes| -|filter|[ChannelMessagesFilter](../types/ChannelMessagesFilter.md) | Yes| -|pts|[int](../types/int.md) | Yes| -|limit|[int](../types/int.md) | Yes| - - -### Return type: [updates\_ChannelDifference](../types/updates_ChannelDifference.md) - -### Example: - - -``` -$MadelineProto = new \danog\MadelineProto\API(); -if (isset($token)) { // Login as a bot - $MadelineProto->bot_login($token); -} -if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } - $MadelineProto->complete_phone_login($code); -} - -$updates_ChannelDifference = $MadelineProto->updates->getChannelDifference(['channel' => InputChannel, 'filter' => ChannelMessagesFilter, 'pts' => int, 'limit' => int, ]); -``` - -Or, if you're using the [PWRTelegram HTTP API](https://pwrtelegram.xyz): - -### As a bot: - -POST/GET to `https://api.pwrtelegram.xyz/botTOKEN/madeline` - -Parameters: - -* method - updates.getChannelDifference -* params - `{"channel": InputChannel, "filter": ChannelMessagesFilter, "pts": int, "limit": int, }` - - - -### As a user: - -POST/GET to `https://api.pwrtelegram.xyz/userTOKEN/updates.getChannelDifference` - -Parameters: - -channel - Json encoded InputChannel -filter - Json encoded ChannelMessagesFilter -pts - Json encoded int -limit - Json encoded int - - - -Or, if you're into Lua: - -``` -updates_ChannelDifference = updates.getChannelDifference({channel=InputChannel, filter=ChannelMessagesFilter, pts=int, limit=int, }) -``` - diff --git a/old_docs/API_docs_v41/methods/updates_getDifference.md b/old_docs/API_docs_v41/methods/updates_getDifference.md index 53c7b078..9bcee79a 100644 --- a/old_docs/API_docs_v41/methods/updates_getDifference.md +++ b/old_docs/API_docs_v41/methods/updates_getDifference.md @@ -6,71 +6,8 @@ description: updates.getDifference parameters, return type and example [Back to methods index](index.md) -*You cannot use this method directly, see https://daniil.it/MadelineProto for more info on handling updates* +**You cannot use this method directly, see https://daniil.it/MadelineProto for more info on handling updates** -### Parameters: - -| Name | Type | Required | -|----------|:-------------:|---------:| -|pts|[int](../types/int.md) | Yes| -|date|[int](../types/int.md) | Yes| -|qts|[int](../types/int.md) | Yes| - - -### Return type: [updates\_Difference](../types/updates_Difference.md) - -### Example: - - -``` -$MadelineProto = new \danog\MadelineProto\API(); -if (isset($token)) { // Login as a bot - $MadelineProto->bot_login($token); -} -if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } - $MadelineProto->complete_phone_login($code); -} - -$updates_Difference = $MadelineProto->updates->getDifference(['pts' => int, 'date' => int, 'qts' => int, ]); -``` - -Or, if you're using the [PWRTelegram HTTP API](https://pwrtelegram.xyz): - -### As a bot: - -POST/GET to `https://api.pwrtelegram.xyz/botTOKEN/madeline` - -Parameters: - -* method - updates.getDifference -* params - `{"pts": int, "date": int, "qts": int, }` - - - -### As a user: - -POST/GET to `https://api.pwrtelegram.xyz/userTOKEN/updates.getDifference` - -Parameters: - -pts - Json encoded int -date - Json encoded int -qts - Json encoded int - - - -Or, if you're into Lua: - -``` -updates_Difference = updates.getDifference({pts=int, date=int, qts=int, }) -``` - diff --git a/old_docs/API_docs_v41/methods/updates_getState.md b/old_docs/API_docs_v41/methods/updates_getState.md index 51f6ae80..fd5955ba 100644 --- a/old_docs/API_docs_v41/methods/updates_getState.md +++ b/old_docs/API_docs_v41/methods/updates_getState.md @@ -6,61 +6,8 @@ description: updates.getState parameters, return type and example [Back to methods index](index.md) -*You cannot use this method directly, see https://daniil.it/MadelineProto for more info on handling updates* +**You cannot use this method directly, see https://daniil.it/MadelineProto for more info on handling updates** - - -### Return type: [updates\_State](../types/updates_State.md) - -### Example: - - -``` -$MadelineProto = new \danog\MadelineProto\API(); -if (isset($token)) { // Login as a bot - $MadelineProto->bot_login($token); -} -if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } - $MadelineProto->complete_phone_login($code); -} - -$updates_State = $MadelineProto->updates->getState(); -``` - -Or, if you're using the [PWRTelegram HTTP API](https://pwrtelegram.xyz): - -### As a bot: - -POST/GET to `https://api.pwrtelegram.xyz/botTOKEN/madeline` - -Parameters: - -* method - updates.getState -* params - `{}` - - - -### As a user: - -POST/GET to `https://api.pwrtelegram.xyz/userTOKEN/updates.getState` - -Parameters: - - - - -Or, if you're into Lua: - -``` -updates_State = updates.getState({}) -``` - diff --git a/old_docs/API_docs_v41/methods/upload_getFile.md b/old_docs/API_docs_v41/methods/upload_getFile.md index a1003003..add7d54e 100644 --- a/old_docs/API_docs_v41/methods/upload_getFile.md +++ b/old_docs/API_docs_v41/methods/upload_getFile.md @@ -6,71 +6,8 @@ description: upload.getFile parameters, return type and example [Back to methods index](index.md) -*You cannot use this method directly, use the upload, download_to_stream, download_to_file, download_to_dir methods instead; see https://daniil.it/MadelineProto for more info* +**You cannot use this method directly, use the upload, download_to_stream, download_to_file, download_to_dir methods instead; see https://daniil.it/MadelineProto for more info** -### Parameters: - -| Name | Type | Required | -|----------|:-------------:|---------:| -|location|[InputFileLocation](../types/InputFileLocation.md) | Yes| -|offset|[int](../types/int.md) | Yes| -|limit|[int](../types/int.md) | Yes| - - -### Return type: [upload\_File](../types/upload_File.md) - -### Example: - - -``` -$MadelineProto = new \danog\MadelineProto\API(); -if (isset($token)) { // Login as a bot - $MadelineProto->bot_login($token); -} -if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } - $MadelineProto->complete_phone_login($code); -} - -$upload_File = $MadelineProto->upload->getFile(['location' => InputFileLocation, 'offset' => int, 'limit' => int, ]); -``` - -Or, if you're using the [PWRTelegram HTTP API](https://pwrtelegram.xyz): - -### As a bot: - -POST/GET to `https://api.pwrtelegram.xyz/botTOKEN/madeline` - -Parameters: - -* method - upload.getFile -* params - `{"location": InputFileLocation, "offset": int, "limit": int, }` - - - -### As a user: - -POST/GET to `https://api.pwrtelegram.xyz/userTOKEN/upload.getFile` - -Parameters: - -location - Json encoded InputFileLocation -offset - Json encoded int -limit - Json encoded int - - - -Or, if you're into Lua: - -``` -upload_File = upload.getFile({location=InputFileLocation, offset=int, limit=int, }) -``` - diff --git a/old_docs/API_docs_v41/methods/upload_saveBigFilePart.md b/old_docs/API_docs_v41/methods/upload_saveBigFilePart.md index e5c96d89..b1c3ea28 100644 --- a/old_docs/API_docs_v41/methods/upload_saveBigFilePart.md +++ b/old_docs/API_docs_v41/methods/upload_saveBigFilePart.md @@ -6,73 +6,8 @@ description: upload.saveBigFilePart parameters, return type and example [Back to methods index](index.md) -*You cannot use this method directly, use the upload, download_to_stream, download_to_file, download_to_dir methods instead; see https://daniil.it/MadelineProto for more info* +**You cannot use this method directly, use the upload, download_to_stream, download_to_file, download_to_dir methods instead; see https://daniil.it/MadelineProto for more info** -### Parameters: - -| Name | Type | Required | -|----------|:-------------:|---------:| -|file\_id|[long](../types/long.md) | Yes| -|file\_part|[int](../types/int.md) | Yes| -|file\_total\_parts|[int](../types/int.md) | Yes| -|bytes|[bytes](../types/bytes.md) | Yes| - - -### Return type: [Bool](../types/Bool.md) - -### Example: - - -``` -$MadelineProto = new \danog\MadelineProto\API(); -if (isset($token)) { // Login as a bot - $MadelineProto->bot_login($token); -} -if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } - $MadelineProto->complete_phone_login($code); -} - -$Bool = $MadelineProto->upload->saveBigFilePart(['file_id' => long, 'file_part' => int, 'file_total_parts' => int, 'bytes' => 'bytes', ]); -``` - -Or, if you're using the [PWRTelegram HTTP API](https://pwrtelegram.xyz): - -### As a bot: - -POST/GET to `https://api.pwrtelegram.xyz/botTOKEN/madeline` - -Parameters: - -* method - upload.saveBigFilePart -* params - `{"file_id": long, "file_part": int, "file_total_parts": int, "bytes": "bytes", }` - - - -### As a user: - -POST/GET to `https://api.pwrtelegram.xyz/userTOKEN/upload.saveBigFilePart` - -Parameters: - -file_id - Json encoded long -file_part - Json encoded int -file_total_parts - Json encoded int -bytes - Json encoded bytes - - - -Or, if you're into Lua: - -``` -Bool = upload.saveBigFilePart({file_id=long, file_part=int, file_total_parts=int, bytes='bytes', }) -``` - diff --git a/old_docs/API_docs_v41/methods/upload_saveFilePart.md b/old_docs/API_docs_v41/methods/upload_saveFilePart.md index 1c16e4b2..c482f321 100644 --- a/old_docs/API_docs_v41/methods/upload_saveFilePart.md +++ b/old_docs/API_docs_v41/methods/upload_saveFilePart.md @@ -6,71 +6,8 @@ description: upload.saveFilePart parameters, return type and example [Back to methods index](index.md) -*You cannot use this method directly, use the upload, download_to_stream, download_to_file, download_to_dir methods instead; see https://daniil.it/MadelineProto for more info* +**You cannot use this method directly, use the upload, download_to_stream, download_to_file, download_to_dir methods instead; see https://daniil.it/MadelineProto for more info** -### Parameters: - -| Name | Type | Required | -|----------|:-------------:|---------:| -|file\_id|[long](../types/long.md) | Yes| -|file\_part|[int](../types/int.md) | Yes| -|bytes|[bytes](../types/bytes.md) | Yes| - - -### Return type: [Bool](../types/Bool.md) - -### Example: - - -``` -$MadelineProto = new \danog\MadelineProto\API(); -if (isset($token)) { // Login as a bot - $MadelineProto->bot_login($token); -} -if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } - $MadelineProto->complete_phone_login($code); -} - -$Bool = $MadelineProto->upload->saveFilePart(['file_id' => long, 'file_part' => int, 'bytes' => 'bytes', ]); -``` - -Or, if you're using the [PWRTelegram HTTP API](https://pwrtelegram.xyz): - -### As a bot: - -POST/GET to `https://api.pwrtelegram.xyz/botTOKEN/madeline` - -Parameters: - -* method - upload.saveFilePart -* params - `{"file_id": long, "file_part": int, "bytes": "bytes", }` - - - -### As a user: - -POST/GET to `https://api.pwrtelegram.xyz/userTOKEN/upload.saveFilePart` - -Parameters: - -file_id - Json encoded long -file_part - Json encoded int -bytes - Json encoded bytes - - - -Or, if you're into Lua: - -``` -Bool = upload.saveFilePart({file_id=long, file_part=int, bytes='bytes', }) -``` - diff --git a/old_docs/API_docs_v41/methods/users_getFullUser.md b/old_docs/API_docs_v41/methods/users_getFullUser.md index 645ab12e..4ec831ec 100644 --- a/old_docs/API_docs_v41/methods/users_getFullUser.md +++ b/old_docs/API_docs_v41/methods/users_getFullUser.md @@ -6,67 +6,8 @@ description: users.getFullUser parameters, return type and example [Back to methods index](index.md) -*You cannot use this method directly, use the get_pwr_chat, get_info, get_full_info methods instead (see https://daniil.it/MadelineProto for more info)* +**You cannot use this method directly, use the get_pwr_chat, get_info, get_full_info methods instead (see https://daniil.it/MadelineProto for more info)** -### Parameters: - -| Name | Type | Required | -|----------|:-------------:|---------:| -|id|[InputUser](../types/InputUser.md) | Yes| - - -### Return type: [UserFull](../types/UserFull.md) - -### Example: - - -``` -$MadelineProto = new \danog\MadelineProto\API(); -if (isset($token)) { // Login as a bot - $MadelineProto->bot_login($token); -} -if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } - $MadelineProto->complete_phone_login($code); -} - -$UserFull = $MadelineProto->users->getFullUser(['id' => InputUser, ]); -``` - -Or, if you're using the [PWRTelegram HTTP API](https://pwrtelegram.xyz): - -### As a bot: - -POST/GET to `https://api.pwrtelegram.xyz/botTOKEN/madeline` - -Parameters: - -* method - users.getFullUser -* params - `{"id": InputUser, }` - - - -### As a user: - -POST/GET to `https://api.pwrtelegram.xyz/userTOKEN/users.getFullUser` - -Parameters: - -id - Json encoded InputUser - - - -Or, if you're into Lua: - -``` -UserFull = users.getFullUser({id=InputUser, }) -``` - diff --git a/old_docs/API_docs_v42/constructors/README.md b/old_docs/API_docs_v42/constructors/README.md index 757a9099..26cf055f 100644 --- a/old_docs/API_docs_v42/constructors/README.md +++ b/old_docs/API_docs_v42/constructors/README.md @@ -4,9 +4,6 @@ description: List of constructors --- # Constructors [Back to API documentation index](..) - - - ***

[$accountDaysTTL](../constructors/accountDaysTTL.md) = \['days' => [int](../types/int.md), \]; diff --git a/old_docs/API_docs_v42/methods/auth_importBotAuthorization.md b/old_docs/API_docs_v42/methods/auth_importBotAuthorization.md index 0d8836b6..57521a13 100644 --- a/old_docs/API_docs_v42/methods/auth_importBotAuthorization.md +++ b/old_docs/API_docs_v42/methods/auth_importBotAuthorization.md @@ -6,71 +6,8 @@ description: auth.importBotAuthorization parameters, return type and example [Back to methods index](index.md) -*You cannot use this method directly, use the bot_login method instead (see https://daniil.it/MadelineProto for more info)* +**You cannot use this method directly, use the bot_login method instead (see https://daniil.it/MadelineProto for more info)** -### Parameters: - -| Name | Type | Required | -|----------|:-------------:|---------:| -|api\_id|[int](../types/int.md) | Yes| -|api\_hash|[string](../types/string.md) | Yes| -|bot\_auth\_token|[string](../types/string.md) | Yes| - - -### Return type: [auth\_Authorization](../types/auth_Authorization.md) - -### Example: - - -``` -$MadelineProto = new \danog\MadelineProto\API(); -if (isset($token)) { // Login as a bot - $MadelineProto->bot_login($token); -} -if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } - $MadelineProto->complete_phone_login($code); -} - -$auth_Authorization = $MadelineProto->auth->importBotAuthorization(['api_id' => int, 'api_hash' => 'string', 'bot_auth_token' => 'string', ]); -``` - -Or, if you're using the [PWRTelegram HTTP API](https://pwrtelegram.xyz): - -### As a bot: - -POST/GET to `https://api.pwrtelegram.xyz/botTOKEN/madeline` - -Parameters: - -* method - auth.importBotAuthorization -* params - `{"api_id": int, "api_hash": "string", "bot_auth_token": "string", }` - - - -### As a user: - -POST/GET to `https://api.pwrtelegram.xyz/userTOKEN/auth.importBotAuthorization` - -Parameters: - -api_id - Json encoded int -api_hash - Json encoded string -bot_auth_token - Json encoded string - - - -Or, if you're into Lua: - -``` -auth_Authorization = auth.importBotAuthorization({api_id=int, api_hash='string', bot_auth_token='string', }) -``` - diff --git a/old_docs/API_docs_v42/methods/auth_logOut.md b/old_docs/API_docs_v42/methods/auth_logOut.md index 12159bab..7d5bb3f7 100644 --- a/old_docs/API_docs_v42/methods/auth_logOut.md +++ b/old_docs/API_docs_v42/methods/auth_logOut.md @@ -6,61 +6,8 @@ description: auth.logOut parameters, return type and example [Back to methods index](index.md) -*You cannot use this method directly, use the logout method instead (see https://daniil.it/MadelineProto for more info)* +**You cannot use this method directly, use the logout method instead (see https://daniil.it/MadelineProto for more info)** - - -### Return type: [Bool](../types/Bool.md) - -### Example: - - -``` -$MadelineProto = new \danog\MadelineProto\API(); -if (isset($token)) { // Login as a bot - $MadelineProto->bot_login($token); -} -if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } - $MadelineProto->complete_phone_login($code); -} - -$Bool = $MadelineProto->auth->logOut(); -``` - -Or, if you're using the [PWRTelegram HTTP API](https://pwrtelegram.xyz): - -### As a bot: - -POST/GET to `https://api.pwrtelegram.xyz/botTOKEN/madeline` - -Parameters: - -* method - auth.logOut -* params - `{}` - - - -### As a user: - -POST/GET to `https://api.pwrtelegram.xyz/userTOKEN/auth.logOut` - -Parameters: - - - - -Or, if you're into Lua: - -``` -Bool = auth.logOut({}) -``` - diff --git a/old_docs/API_docs_v42/methods/auth_sendCode.md b/old_docs/API_docs_v42/methods/auth_sendCode.md index 43bc28ee..22d1df94 100644 --- a/old_docs/API_docs_v42/methods/auth_sendCode.md +++ b/old_docs/API_docs_v42/methods/auth_sendCode.md @@ -6,75 +6,8 @@ description: auth.sendCode parameters, return type and example [Back to methods index](index.md) -*You cannot use this method directly, use the phone_login method instead (see https://daniil.it/MadelineProto for more info)* +**You cannot use this method directly, use the phone_login method instead (see https://daniil.it/MadelineProto for more info)** -### Parameters: - -| Name | Type | Required | -|----------|:-------------:|---------:| -|phone\_number|[string](../types/string.md) | Yes| -|sms\_type|[int](../types/int.md) | Yes| -|api\_id|[int](../types/int.md) | Yes| -|api\_hash|[string](../types/string.md) | Yes| -|lang\_code|[string](../types/string.md) | Yes| - - -### Return type: [auth\_SentCode](../types/auth_SentCode.md) - -### Example: - - -``` -$MadelineProto = new \danog\MadelineProto\API(); -if (isset($token)) { // Login as a bot - $MadelineProto->bot_login($token); -} -if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } - $MadelineProto->complete_phone_login($code); -} - -$auth_SentCode = $MadelineProto->auth->sendCode(['phone_number' => 'string', 'sms_type' => int, 'api_id' => int, 'api_hash' => 'string', 'lang_code' => 'string', ]); -``` - -Or, if you're using the [PWRTelegram HTTP API](https://pwrtelegram.xyz): - -### As a bot: - -POST/GET to `https://api.pwrtelegram.xyz/botTOKEN/madeline` - -Parameters: - -* method - auth.sendCode -* params - `{"phone_number": "string", "sms_type": int, "api_id": int, "api_hash": "string", "lang_code": "string", }` - - - -### As a user: - -POST/GET to `https://api.pwrtelegram.xyz/userTOKEN/auth.sendCode` - -Parameters: - -phone_number - Json encoded string -sms_type - Json encoded int -api_id - Json encoded int -api_hash - Json encoded string -lang_code - Json encoded string - - - -Or, if you're into Lua: - -``` -auth_SentCode = auth.sendCode({phone_number='string', sms_type=int, api_id=int, api_hash='string', lang_code='string', }) -``` - diff --git a/old_docs/API_docs_v42/methods/auth_signIn.md b/old_docs/API_docs_v42/methods/auth_signIn.md index 75c50d70..ab40bb4d 100644 --- a/old_docs/API_docs_v42/methods/auth_signIn.md +++ b/old_docs/API_docs_v42/methods/auth_signIn.md @@ -6,71 +6,8 @@ description: auth.signIn parameters, return type and example [Back to methods index](index.md) -*You cannot use this method directly, use the complete_phone_login method instead (see https://daniil.it/MadelineProto for more info)* +**You cannot use this method directly, use the complete_phone_login method instead (see https://daniil.it/MadelineProto for more info)** -### Parameters: - -| Name | Type | Required | -|----------|:-------------:|---------:| -|phone\_number|[string](../types/string.md) | Yes| -|phone\_code\_hash|[string](../types/string.md) | Yes| -|phone\_code|[string](../types/string.md) | Yes| - - -### Return type: [auth\_Authorization](../types/auth_Authorization.md) - -### Example: - - -``` -$MadelineProto = new \danog\MadelineProto\API(); -if (isset($token)) { // Login as a bot - $MadelineProto->bot_login($token); -} -if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } - $MadelineProto->complete_phone_login($code); -} - -$auth_Authorization = $MadelineProto->auth->signIn(['phone_number' => 'string', 'phone_code_hash' => 'string', 'phone_code' => 'string', ]); -``` - -Or, if you're using the [PWRTelegram HTTP API](https://pwrtelegram.xyz): - -### As a bot: - -POST/GET to `https://api.pwrtelegram.xyz/botTOKEN/madeline` - -Parameters: - -* method - auth.signIn -* params - `{"phone_number": "string", "phone_code_hash": "string", "phone_code": "string", }` - - - -### As a user: - -POST/GET to `https://api.pwrtelegram.xyz/userTOKEN/auth.signIn` - -Parameters: - -phone_number - Json encoded string -phone_code_hash - Json encoded string -phone_code - Json encoded string - - - -Or, if you're into Lua: - -``` -auth_Authorization = auth.signIn({phone_number='string', phone_code_hash='string', phone_code='string', }) -``` - diff --git a/old_docs/API_docs_v42/methods/auth_signUp.md b/old_docs/API_docs_v42/methods/auth_signUp.md index f2a72b68..042d1191 100644 --- a/old_docs/API_docs_v42/methods/auth_signUp.md +++ b/old_docs/API_docs_v42/methods/auth_signUp.md @@ -6,75 +6,8 @@ description: auth.signUp parameters, return type and example [Back to methods index](index.md) -*You cannot use this method directly, use the complete_signup method instead (see https://daniil.it/MadelineProto for more info)* +**You cannot use this method directly, use the complete_signup method instead (see https://daniil.it/MadelineProto for more info)** -### Parameters: - -| Name | Type | Required | -|----------|:-------------:|---------:| -|phone\_number|[string](../types/string.md) | Yes| -|phone\_code\_hash|[string](../types/string.md) | Yes| -|phone\_code|[string](../types/string.md) | Yes| -|first\_name|[string](../types/string.md) | Yes| -|last\_name|[string](../types/string.md) | Yes| - - -### Return type: [auth\_Authorization](../types/auth_Authorization.md) - -### Example: - - -``` -$MadelineProto = new \danog\MadelineProto\API(); -if (isset($token)) { // Login as a bot - $MadelineProto->bot_login($token); -} -if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } - $MadelineProto->complete_phone_login($code); -} - -$auth_Authorization = $MadelineProto->auth->signUp(['phone_number' => 'string', 'phone_code_hash' => 'string', 'phone_code' => 'string', 'first_name' => 'string', 'last_name' => 'string', ]); -``` - -Or, if you're using the [PWRTelegram HTTP API](https://pwrtelegram.xyz): - -### As a bot: - -POST/GET to `https://api.pwrtelegram.xyz/botTOKEN/madeline` - -Parameters: - -* method - auth.signUp -* params - `{"phone_number": "string", "phone_code_hash": "string", "phone_code": "string", "first_name": "string", "last_name": "string", }` - - - -### As a user: - -POST/GET to `https://api.pwrtelegram.xyz/userTOKEN/auth.signUp` - -Parameters: - -phone_number - Json encoded string -phone_code_hash - Json encoded string -phone_code - Json encoded string -first_name - Json encoded string -last_name - Json encoded string - - - -Or, if you're into Lua: - -``` -auth_Authorization = auth.signUp({phone_number='string', phone_code_hash='string', phone_code='string', first_name='string', last_name='string', }) -``` - diff --git a/old_docs/API_docs_v42/methods/channels_getFullChannel.md b/old_docs/API_docs_v42/methods/channels_getFullChannel.md index 340efcfe..58dbe057 100644 --- a/old_docs/API_docs_v42/methods/channels_getFullChannel.md +++ b/old_docs/API_docs_v42/methods/channels_getFullChannel.md @@ -6,67 +6,8 @@ description: channels.getFullChannel parameters, return type and example [Back to methods index](index.md) -*You cannot use this method directly, use the get_pwr_chat, get_info, get_full_info methods instead (see https://daniil.it/MadelineProto for more info)* +**You cannot use this method directly, use the get_pwr_chat, get_info, get_full_info methods instead (see https://daniil.it/MadelineProto for more info)** -### Parameters: - -| Name | Type | Required | -|----------|:-------------:|---------:| -|channel|[InputChannel](../types/InputChannel.md) | Yes| - - -### Return type: [messages\_ChatFull](../types/messages_ChatFull.md) - -### Example: - - -``` -$MadelineProto = new \danog\MadelineProto\API(); -if (isset($token)) { // Login as a bot - $MadelineProto->bot_login($token); -} -if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } - $MadelineProto->complete_phone_login($code); -} - -$messages_ChatFull = $MadelineProto->channels->getFullChannel(['channel' => InputChannel, ]); -``` - -Or, if you're using the [PWRTelegram HTTP API](https://pwrtelegram.xyz): - -### As a bot: - -POST/GET to `https://api.pwrtelegram.xyz/botTOKEN/madeline` - -Parameters: - -* method - channels.getFullChannel -* params - `{"channel": InputChannel, }` - - - -### As a user: - -POST/GET to `https://api.pwrtelegram.xyz/userTOKEN/channels.getFullChannel` - -Parameters: - -channel - Json encoded InputChannel - - - -Or, if you're into Lua: - -``` -messages_ChatFull = channels.getFullChannel({channel=InputChannel, }) -``` - diff --git a/old_docs/API_docs_v42/methods/channels_getParticipants.md b/old_docs/API_docs_v42/methods/channels_getParticipants.md index 4c6e09cc..d84cf09c 100644 --- a/old_docs/API_docs_v42/methods/channels_getParticipants.md +++ b/old_docs/API_docs_v42/methods/channels_getParticipants.md @@ -6,73 +6,8 @@ description: channels.getParticipants parameters, return type and example [Back to methods index](index.md) -*You cannot use this method directly, use the get_pwr_chat, get_info, get_full_info methods instead (see https://daniil.it/MadelineProto for more info)* +**You cannot use this method directly, use the get_pwr_chat, get_info, get_full_info methods instead (see https://daniil.it/MadelineProto for more info)** -### Parameters: - -| Name | Type | Required | -|----------|:-------------:|---------:| -|channel|[InputChannel](../types/InputChannel.md) | Yes| -|filter|[ChannelParticipantsFilter](../types/ChannelParticipantsFilter.md) | Yes| -|offset|[int](../types/int.md) | Yes| -|limit|[int](../types/int.md) | Yes| - - -### Return type: [channels\_ChannelParticipants](../types/channels_ChannelParticipants.md) - -### Example: - - -``` -$MadelineProto = new \danog\MadelineProto\API(); -if (isset($token)) { // Login as a bot - $MadelineProto->bot_login($token); -} -if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } - $MadelineProto->complete_phone_login($code); -} - -$channels_ChannelParticipants = $MadelineProto->channels->getParticipants(['channel' => InputChannel, 'filter' => ChannelParticipantsFilter, 'offset' => int, 'limit' => int, ]); -``` - -Or, if you're using the [PWRTelegram HTTP API](https://pwrtelegram.xyz): - -### As a bot: - -POST/GET to `https://api.pwrtelegram.xyz/botTOKEN/madeline` - -Parameters: - -* method - channels.getParticipants -* params - `{"channel": InputChannel, "filter": ChannelParticipantsFilter, "offset": int, "limit": int, }` - - - -### As a user: - -POST/GET to `https://api.pwrtelegram.xyz/userTOKEN/channels.getParticipants` - -Parameters: - -channel - Json encoded InputChannel -filter - Json encoded ChannelParticipantsFilter -offset - Json encoded int -limit - Json encoded int - - - -Or, if you're into Lua: - -``` -channels_ChannelParticipants = channels.getParticipants({channel=InputChannel, filter=ChannelParticipantsFilter, offset=int, limit=int, }) -``` - diff --git a/old_docs/API_docs_v42/methods/contacts_resolveUsername.md b/old_docs/API_docs_v42/methods/contacts_resolveUsername.md index 90e72851..b665b382 100644 --- a/old_docs/API_docs_v42/methods/contacts_resolveUsername.md +++ b/old_docs/API_docs_v42/methods/contacts_resolveUsername.md @@ -6,67 +6,8 @@ description: contacts.resolveUsername parameters, return type and example [Back to methods index](index.md) -*You cannot use this method directly, use the resolve_username, get_pwr_chat, get_info, get_full_info methods instead (see https://daniil.it/MadelineProto for more info)* +**You cannot use this method directly, use the resolve_username, get_pwr_chat, get_info, get_full_info methods instead (see https://daniil.it/MadelineProto for more info)** -### Parameters: - -| Name | Type | Required | -|----------|:-------------:|---------:| -|username|[string](../types/string.md) | Yes| - - -### Return type: [contacts\_ResolvedPeer](../types/contacts_ResolvedPeer.md) - -### Example: - - -``` -$MadelineProto = new \danog\MadelineProto\API(); -if (isset($token)) { // Login as a bot - $MadelineProto->bot_login($token); -} -if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } - $MadelineProto->complete_phone_login($code); -} - -$contacts_ResolvedPeer = $MadelineProto->contacts->resolveUsername(['username' => 'string', ]); -``` - -Or, if you're using the [PWRTelegram HTTP API](https://pwrtelegram.xyz): - -### As a bot: - -POST/GET to `https://api.pwrtelegram.xyz/botTOKEN/madeline` - -Parameters: - -* method - contacts.resolveUsername -* params - `{"username": "string", }` - - - -### As a user: - -POST/GET to `https://api.pwrtelegram.xyz/userTOKEN/contacts.resolveUsername` - -Parameters: - -username - Json encoded string - - - -Or, if you're into Lua: - -``` -contacts_ResolvedPeer = contacts.resolveUsername({username='string', }) -``` - diff --git a/old_docs/API_docs_v42/methods/messages_acceptEncryption.md b/old_docs/API_docs_v42/methods/messages_acceptEncryption.md index 548087b6..243c4c00 100644 --- a/old_docs/API_docs_v42/methods/messages_acceptEncryption.md +++ b/old_docs/API_docs_v42/methods/messages_acceptEncryption.md @@ -6,71 +6,8 @@ description: messages.acceptEncryption parameters, return type and example [Back to methods index](index.md) -*You cannot use this method directly, see https://daniil.it/MadelineProto for more info on handling secret chats* +**You cannot use this method directly, see https://daniil.it/MadelineProto for more info on handling secret chats** -### Parameters: - -| Name | Type | Required | -|----------|:-------------:|---------:| -|peer|[InputEncryptedChat](../types/InputEncryptedChat.md) | Yes| -|g\_b|[bytes](../types/bytes.md) | Yes| -|key\_fingerprint|[long](../types/long.md) | Yes| - - -### Return type: [EncryptedChat](../types/EncryptedChat.md) - -### Example: - - -``` -$MadelineProto = new \danog\MadelineProto\API(); -if (isset($token)) { // Login as a bot - $MadelineProto->bot_login($token); -} -if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } - $MadelineProto->complete_phone_login($code); -} - -$EncryptedChat = $MadelineProto->messages->acceptEncryption(['peer' => InputEncryptedChat, 'g_b' => 'bytes', 'key_fingerprint' => long, ]); -``` - -Or, if you're using the [PWRTelegram HTTP API](https://pwrtelegram.xyz): - -### As a bot: - -POST/GET to `https://api.pwrtelegram.xyz/botTOKEN/madeline` - -Parameters: - -* method - messages.acceptEncryption -* params - `{"peer": InputEncryptedChat, "g_b": "bytes", "key_fingerprint": long, }` - - - -### As a user: - -POST/GET to `https://api.pwrtelegram.xyz/userTOKEN/messages.acceptEncryption` - -Parameters: - -peer - Json encoded InputEncryptedChat -g_b - Json encoded bytes -key_fingerprint - Json encoded long - - - -Or, if you're into Lua: - -``` -EncryptedChat = messages.acceptEncryption({peer=InputEncryptedChat, g_b='bytes', key_fingerprint=long, }) -``` - diff --git a/old_docs/API_docs_v42/methods/messages_discardEncryption.md b/old_docs/API_docs_v42/methods/messages_discardEncryption.md index 72648e9d..3a9dc58b 100644 --- a/old_docs/API_docs_v42/methods/messages_discardEncryption.md +++ b/old_docs/API_docs_v42/methods/messages_discardEncryption.md @@ -6,67 +6,8 @@ description: messages.discardEncryption parameters, return type and example [Back to methods index](index.md) -*You cannot use this method directly, see https://daniil.it/MadelineProto for more info on handling secret chats* +**You cannot use this method directly, see https://daniil.it/MadelineProto for more info on handling secret chats** -### Parameters: - -| Name | Type | Required | -|----------|:-------------:|---------:| -|chat\_id|[int](../types/int.md) | Yes| - - -### Return type: [Bool](../types/Bool.md) - -### Example: - - -``` -$MadelineProto = new \danog\MadelineProto\API(); -if (isset($token)) { // Login as a bot - $MadelineProto->bot_login($token); -} -if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } - $MadelineProto->complete_phone_login($code); -} - -$Bool = $MadelineProto->messages->discardEncryption(['chat_id' => int, ]); -``` - -Or, if you're using the [PWRTelegram HTTP API](https://pwrtelegram.xyz): - -### As a bot: - -POST/GET to `https://api.pwrtelegram.xyz/botTOKEN/madeline` - -Parameters: - -* method - messages.discardEncryption -* params - `{"chat_id": int, }` - - - -### As a user: - -POST/GET to `https://api.pwrtelegram.xyz/userTOKEN/messages.discardEncryption` - -Parameters: - -chat_id - Json encoded int - - - -Or, if you're into Lua: - -``` -Bool = messages.discardEncryption({chat_id=int, }) -``` - diff --git a/old_docs/API_docs_v42/methods/messages_getFullChat.md b/old_docs/API_docs_v42/methods/messages_getFullChat.md index 62102b64..ffa9c281 100644 --- a/old_docs/API_docs_v42/methods/messages_getFullChat.md +++ b/old_docs/API_docs_v42/methods/messages_getFullChat.md @@ -6,67 +6,8 @@ description: messages.getFullChat parameters, return type and example [Back to methods index](index.md) -*You cannot use this method directly, use the get_pwr_chat, get_info, get_full_info methods instead (see https://daniil.it/MadelineProto for more info)* +**You cannot use this method directly, use the get_pwr_chat, get_info, get_full_info methods instead (see https://daniil.it/MadelineProto for more info)** -### Parameters: - -| Name | Type | Required | -|----------|:-------------:|---------:| -|chat\_id|[InputPeer](../types/InputPeer.md) | Yes| - - -### Return type: [messages\_ChatFull](../types/messages_ChatFull.md) - -### Example: - - -``` -$MadelineProto = new \danog\MadelineProto\API(); -if (isset($token)) { // Login as a bot - $MadelineProto->bot_login($token); -} -if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } - $MadelineProto->complete_phone_login($code); -} - -$messages_ChatFull = $MadelineProto->messages->getFullChat(['chat_id' => InputPeer, ]); -``` - -Or, if you're using the [PWRTelegram HTTP API](https://pwrtelegram.xyz): - -### As a bot: - -POST/GET to `https://api.pwrtelegram.xyz/botTOKEN/madeline` - -Parameters: - -* method - messages.getFullChat -* params - `{"chat_id": InputPeer, }` - - - -### As a user: - -POST/GET to `https://api.pwrtelegram.xyz/userTOKEN/messages.getFullChat` - -Parameters: - -chat_id - Json encoded InputPeer - - - -Or, if you're into Lua: - -``` -messages_ChatFull = messages.getFullChat({chat_id=InputPeer, }) -``` - diff --git a/old_docs/API_docs_v42/methods/messages_requestEncryption.md b/old_docs/API_docs_v42/methods/messages_requestEncryption.md index 2fd1f825..c8476667 100644 --- a/old_docs/API_docs_v42/methods/messages_requestEncryption.md +++ b/old_docs/API_docs_v42/methods/messages_requestEncryption.md @@ -6,69 +6,8 @@ description: messages.requestEncryption parameters, return type and example [Back to methods index](index.md) -*You cannot use this method directly, see https://daniil.it/MadelineProto for more info on handling secret chats* +**You cannot use this method directly, see https://daniil.it/MadelineProto for more info on handling secret chats** -### Parameters: - -| Name | Type | Required | -|----------|:-------------:|---------:| -|user\_id|[InputUser](../types/InputUser.md) | Yes| -|g\_a|[bytes](../types/bytes.md) | Yes| - - -### Return type: [EncryptedChat](../types/EncryptedChat.md) - -### Example: - - -``` -$MadelineProto = new \danog\MadelineProto\API(); -if (isset($token)) { // Login as a bot - $MadelineProto->bot_login($token); -} -if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } - $MadelineProto->complete_phone_login($code); -} - -$EncryptedChat = $MadelineProto->messages->requestEncryption(['user_id' => InputUser, 'g_a' => 'bytes', ]); -``` - -Or, if you're using the [PWRTelegram HTTP API](https://pwrtelegram.xyz): - -### As a bot: - -POST/GET to `https://api.pwrtelegram.xyz/botTOKEN/madeline` - -Parameters: - -* method - messages.requestEncryption -* params - `{"user_id": InputUser, "g_a": "bytes", }` - - - -### As a user: - -POST/GET to `https://api.pwrtelegram.xyz/userTOKEN/messages.requestEncryption` - -Parameters: - -user_id - Json encoded InputUser -g_a - Json encoded bytes - - - -Or, if you're into Lua: - -``` -EncryptedChat = messages.requestEncryption({user_id=InputUser, g_a='bytes', }) -``` - diff --git a/old_docs/API_docs_v42/methods/updates_getChannelDifference.md b/old_docs/API_docs_v42/methods/updates_getChannelDifference.md index 51ea7aa5..2e69d1cd 100644 --- a/old_docs/API_docs_v42/methods/updates_getChannelDifference.md +++ b/old_docs/API_docs_v42/methods/updates_getChannelDifference.md @@ -6,73 +6,8 @@ description: updates.getChannelDifference parameters, return type and example [Back to methods index](index.md) -*You cannot use this method directly, see https://daniil.it/MadelineProto for more info on handling updates* +**You cannot use this method directly, see https://daniil.it/MadelineProto for more info on handling updates** -### Parameters: - -| Name | Type | Required | -|----------|:-------------:|---------:| -|channel|[InputChannel](../types/InputChannel.md) | Yes| -|filter|[ChannelMessagesFilter](../types/ChannelMessagesFilter.md) | Yes| -|pts|[int](../types/int.md) | Yes| -|limit|[int](../types/int.md) | Yes| - - -### Return type: [updates\_ChannelDifference](../types/updates_ChannelDifference.md) - -### Example: - - -``` -$MadelineProto = new \danog\MadelineProto\API(); -if (isset($token)) { // Login as a bot - $MadelineProto->bot_login($token); -} -if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } - $MadelineProto->complete_phone_login($code); -} - -$updates_ChannelDifference = $MadelineProto->updates->getChannelDifference(['channel' => InputChannel, 'filter' => ChannelMessagesFilter, 'pts' => int, 'limit' => int, ]); -``` - -Or, if you're using the [PWRTelegram HTTP API](https://pwrtelegram.xyz): - -### As a bot: - -POST/GET to `https://api.pwrtelegram.xyz/botTOKEN/madeline` - -Parameters: - -* method - updates.getChannelDifference -* params - `{"channel": InputChannel, "filter": ChannelMessagesFilter, "pts": int, "limit": int, }` - - - -### As a user: - -POST/GET to `https://api.pwrtelegram.xyz/userTOKEN/updates.getChannelDifference` - -Parameters: - -channel - Json encoded InputChannel -filter - Json encoded ChannelMessagesFilter -pts - Json encoded int -limit - Json encoded int - - - -Or, if you're into Lua: - -``` -updates_ChannelDifference = updates.getChannelDifference({channel=InputChannel, filter=ChannelMessagesFilter, pts=int, limit=int, }) -``` - diff --git a/old_docs/API_docs_v42/methods/updates_getDifference.md b/old_docs/API_docs_v42/methods/updates_getDifference.md index 53c7b078..9bcee79a 100644 --- a/old_docs/API_docs_v42/methods/updates_getDifference.md +++ b/old_docs/API_docs_v42/methods/updates_getDifference.md @@ -6,71 +6,8 @@ description: updates.getDifference parameters, return type and example [Back to methods index](index.md) -*You cannot use this method directly, see https://daniil.it/MadelineProto for more info on handling updates* +**You cannot use this method directly, see https://daniil.it/MadelineProto for more info on handling updates** -### Parameters: - -| Name | Type | Required | -|----------|:-------------:|---------:| -|pts|[int](../types/int.md) | Yes| -|date|[int](../types/int.md) | Yes| -|qts|[int](../types/int.md) | Yes| - - -### Return type: [updates\_Difference](../types/updates_Difference.md) - -### Example: - - -``` -$MadelineProto = new \danog\MadelineProto\API(); -if (isset($token)) { // Login as a bot - $MadelineProto->bot_login($token); -} -if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } - $MadelineProto->complete_phone_login($code); -} - -$updates_Difference = $MadelineProto->updates->getDifference(['pts' => int, 'date' => int, 'qts' => int, ]); -``` - -Or, if you're using the [PWRTelegram HTTP API](https://pwrtelegram.xyz): - -### As a bot: - -POST/GET to `https://api.pwrtelegram.xyz/botTOKEN/madeline` - -Parameters: - -* method - updates.getDifference -* params - `{"pts": int, "date": int, "qts": int, }` - - - -### As a user: - -POST/GET to `https://api.pwrtelegram.xyz/userTOKEN/updates.getDifference` - -Parameters: - -pts - Json encoded int -date - Json encoded int -qts - Json encoded int - - - -Or, if you're into Lua: - -``` -updates_Difference = updates.getDifference({pts=int, date=int, qts=int, }) -``` - diff --git a/old_docs/API_docs_v42/methods/updates_getState.md b/old_docs/API_docs_v42/methods/updates_getState.md index 51f6ae80..fd5955ba 100644 --- a/old_docs/API_docs_v42/methods/updates_getState.md +++ b/old_docs/API_docs_v42/methods/updates_getState.md @@ -6,61 +6,8 @@ description: updates.getState parameters, return type and example [Back to methods index](index.md) -*You cannot use this method directly, see https://daniil.it/MadelineProto for more info on handling updates* +**You cannot use this method directly, see https://daniil.it/MadelineProto for more info on handling updates** - - -### Return type: [updates\_State](../types/updates_State.md) - -### Example: - - -``` -$MadelineProto = new \danog\MadelineProto\API(); -if (isset($token)) { // Login as a bot - $MadelineProto->bot_login($token); -} -if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } - $MadelineProto->complete_phone_login($code); -} - -$updates_State = $MadelineProto->updates->getState(); -``` - -Or, if you're using the [PWRTelegram HTTP API](https://pwrtelegram.xyz): - -### As a bot: - -POST/GET to `https://api.pwrtelegram.xyz/botTOKEN/madeline` - -Parameters: - -* method - updates.getState -* params - `{}` - - - -### As a user: - -POST/GET to `https://api.pwrtelegram.xyz/userTOKEN/updates.getState` - -Parameters: - - - - -Or, if you're into Lua: - -``` -updates_State = updates.getState({}) -``` - diff --git a/old_docs/API_docs_v42/methods/upload_getFile.md b/old_docs/API_docs_v42/methods/upload_getFile.md index a1003003..add7d54e 100644 --- a/old_docs/API_docs_v42/methods/upload_getFile.md +++ b/old_docs/API_docs_v42/methods/upload_getFile.md @@ -6,71 +6,8 @@ description: upload.getFile parameters, return type and example [Back to methods index](index.md) -*You cannot use this method directly, use the upload, download_to_stream, download_to_file, download_to_dir methods instead; see https://daniil.it/MadelineProto for more info* +**You cannot use this method directly, use the upload, download_to_stream, download_to_file, download_to_dir methods instead; see https://daniil.it/MadelineProto for more info** -### Parameters: - -| Name | Type | Required | -|----------|:-------------:|---------:| -|location|[InputFileLocation](../types/InputFileLocation.md) | Yes| -|offset|[int](../types/int.md) | Yes| -|limit|[int](../types/int.md) | Yes| - - -### Return type: [upload\_File](../types/upload_File.md) - -### Example: - - -``` -$MadelineProto = new \danog\MadelineProto\API(); -if (isset($token)) { // Login as a bot - $MadelineProto->bot_login($token); -} -if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } - $MadelineProto->complete_phone_login($code); -} - -$upload_File = $MadelineProto->upload->getFile(['location' => InputFileLocation, 'offset' => int, 'limit' => int, ]); -``` - -Or, if you're using the [PWRTelegram HTTP API](https://pwrtelegram.xyz): - -### As a bot: - -POST/GET to `https://api.pwrtelegram.xyz/botTOKEN/madeline` - -Parameters: - -* method - upload.getFile -* params - `{"location": InputFileLocation, "offset": int, "limit": int, }` - - - -### As a user: - -POST/GET to `https://api.pwrtelegram.xyz/userTOKEN/upload.getFile` - -Parameters: - -location - Json encoded InputFileLocation -offset - Json encoded int -limit - Json encoded int - - - -Or, if you're into Lua: - -``` -upload_File = upload.getFile({location=InputFileLocation, offset=int, limit=int, }) -``` - diff --git a/old_docs/API_docs_v42/methods/upload_saveBigFilePart.md b/old_docs/API_docs_v42/methods/upload_saveBigFilePart.md index e5c96d89..b1c3ea28 100644 --- a/old_docs/API_docs_v42/methods/upload_saveBigFilePart.md +++ b/old_docs/API_docs_v42/methods/upload_saveBigFilePart.md @@ -6,73 +6,8 @@ description: upload.saveBigFilePart parameters, return type and example [Back to methods index](index.md) -*You cannot use this method directly, use the upload, download_to_stream, download_to_file, download_to_dir methods instead; see https://daniil.it/MadelineProto for more info* +**You cannot use this method directly, use the upload, download_to_stream, download_to_file, download_to_dir methods instead; see https://daniil.it/MadelineProto for more info** -### Parameters: - -| Name | Type | Required | -|----------|:-------------:|---------:| -|file\_id|[long](../types/long.md) | Yes| -|file\_part|[int](../types/int.md) | Yes| -|file\_total\_parts|[int](../types/int.md) | Yes| -|bytes|[bytes](../types/bytes.md) | Yes| - - -### Return type: [Bool](../types/Bool.md) - -### Example: - - -``` -$MadelineProto = new \danog\MadelineProto\API(); -if (isset($token)) { // Login as a bot - $MadelineProto->bot_login($token); -} -if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } - $MadelineProto->complete_phone_login($code); -} - -$Bool = $MadelineProto->upload->saveBigFilePart(['file_id' => long, 'file_part' => int, 'file_total_parts' => int, 'bytes' => 'bytes', ]); -``` - -Or, if you're using the [PWRTelegram HTTP API](https://pwrtelegram.xyz): - -### As a bot: - -POST/GET to `https://api.pwrtelegram.xyz/botTOKEN/madeline` - -Parameters: - -* method - upload.saveBigFilePart -* params - `{"file_id": long, "file_part": int, "file_total_parts": int, "bytes": "bytes", }` - - - -### As a user: - -POST/GET to `https://api.pwrtelegram.xyz/userTOKEN/upload.saveBigFilePart` - -Parameters: - -file_id - Json encoded long -file_part - Json encoded int -file_total_parts - Json encoded int -bytes - Json encoded bytes - - - -Or, if you're into Lua: - -``` -Bool = upload.saveBigFilePart({file_id=long, file_part=int, file_total_parts=int, bytes='bytes', }) -``` - diff --git a/old_docs/API_docs_v42/methods/upload_saveFilePart.md b/old_docs/API_docs_v42/methods/upload_saveFilePart.md index 1c16e4b2..c482f321 100644 --- a/old_docs/API_docs_v42/methods/upload_saveFilePart.md +++ b/old_docs/API_docs_v42/methods/upload_saveFilePart.md @@ -6,71 +6,8 @@ description: upload.saveFilePart parameters, return type and example [Back to methods index](index.md) -*You cannot use this method directly, use the upload, download_to_stream, download_to_file, download_to_dir methods instead; see https://daniil.it/MadelineProto for more info* +**You cannot use this method directly, use the upload, download_to_stream, download_to_file, download_to_dir methods instead; see https://daniil.it/MadelineProto for more info** -### Parameters: - -| Name | Type | Required | -|----------|:-------------:|---------:| -|file\_id|[long](../types/long.md) | Yes| -|file\_part|[int](../types/int.md) | Yes| -|bytes|[bytes](../types/bytes.md) | Yes| - - -### Return type: [Bool](../types/Bool.md) - -### Example: - - -``` -$MadelineProto = new \danog\MadelineProto\API(); -if (isset($token)) { // Login as a bot - $MadelineProto->bot_login($token); -} -if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } - $MadelineProto->complete_phone_login($code); -} - -$Bool = $MadelineProto->upload->saveFilePart(['file_id' => long, 'file_part' => int, 'bytes' => 'bytes', ]); -``` - -Or, if you're using the [PWRTelegram HTTP API](https://pwrtelegram.xyz): - -### As a bot: - -POST/GET to `https://api.pwrtelegram.xyz/botTOKEN/madeline` - -Parameters: - -* method - upload.saveFilePart -* params - `{"file_id": long, "file_part": int, "bytes": "bytes", }` - - - -### As a user: - -POST/GET to `https://api.pwrtelegram.xyz/userTOKEN/upload.saveFilePart` - -Parameters: - -file_id - Json encoded long -file_part - Json encoded int -bytes - Json encoded bytes - - - -Or, if you're into Lua: - -``` -Bool = upload.saveFilePart({file_id=long, file_part=int, bytes='bytes', }) -``` - diff --git a/old_docs/API_docs_v42/methods/users_getFullUser.md b/old_docs/API_docs_v42/methods/users_getFullUser.md index 645ab12e..4ec831ec 100644 --- a/old_docs/API_docs_v42/methods/users_getFullUser.md +++ b/old_docs/API_docs_v42/methods/users_getFullUser.md @@ -6,67 +6,8 @@ description: users.getFullUser parameters, return type and example [Back to methods index](index.md) -*You cannot use this method directly, use the get_pwr_chat, get_info, get_full_info methods instead (see https://daniil.it/MadelineProto for more info)* +**You cannot use this method directly, use the get_pwr_chat, get_info, get_full_info methods instead (see https://daniil.it/MadelineProto for more info)** -### Parameters: - -| Name | Type | Required | -|----------|:-------------:|---------:| -|id|[InputUser](../types/InputUser.md) | Yes| - - -### Return type: [UserFull](../types/UserFull.md) - -### Example: - - -``` -$MadelineProto = new \danog\MadelineProto\API(); -if (isset($token)) { // Login as a bot - $MadelineProto->bot_login($token); -} -if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } - $MadelineProto->complete_phone_login($code); -} - -$UserFull = $MadelineProto->users->getFullUser(['id' => InputUser, ]); -``` - -Or, if you're using the [PWRTelegram HTTP API](https://pwrtelegram.xyz): - -### As a bot: - -POST/GET to `https://api.pwrtelegram.xyz/botTOKEN/madeline` - -Parameters: - -* method - users.getFullUser -* params - `{"id": InputUser, }` - - - -### As a user: - -POST/GET to `https://api.pwrtelegram.xyz/userTOKEN/users.getFullUser` - -Parameters: - -id - Json encoded InputUser - - - -Or, if you're into Lua: - -``` -UserFull = users.getFullUser({id=InputUser, }) -``` - diff --git a/old_docs/API_docs_v44/constructors/README.md b/old_docs/API_docs_v44/constructors/README.md index af7cc86a..1cf5acf0 100644 --- a/old_docs/API_docs_v44/constructors/README.md +++ b/old_docs/API_docs_v44/constructors/README.md @@ -4,9 +4,6 @@ description: List of constructors --- # Constructors [Back to API documentation index](..) - - - ***

[$accountDaysTTL](../constructors/accountDaysTTL.md) = \['days' => [int](../types/int.md), \]; diff --git a/old_docs/API_docs_v44/methods/auth_importBotAuthorization.md b/old_docs/API_docs_v44/methods/auth_importBotAuthorization.md index 0d8836b6..57521a13 100644 --- a/old_docs/API_docs_v44/methods/auth_importBotAuthorization.md +++ b/old_docs/API_docs_v44/methods/auth_importBotAuthorization.md @@ -6,71 +6,8 @@ description: auth.importBotAuthorization parameters, return type and example [Back to methods index](index.md) -*You cannot use this method directly, use the bot_login method instead (see https://daniil.it/MadelineProto for more info)* +**You cannot use this method directly, use the bot_login method instead (see https://daniil.it/MadelineProto for more info)** -### Parameters: - -| Name | Type | Required | -|----------|:-------------:|---------:| -|api\_id|[int](../types/int.md) | Yes| -|api\_hash|[string](../types/string.md) | Yes| -|bot\_auth\_token|[string](../types/string.md) | Yes| - - -### Return type: [auth\_Authorization](../types/auth_Authorization.md) - -### Example: - - -``` -$MadelineProto = new \danog\MadelineProto\API(); -if (isset($token)) { // Login as a bot - $MadelineProto->bot_login($token); -} -if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } - $MadelineProto->complete_phone_login($code); -} - -$auth_Authorization = $MadelineProto->auth->importBotAuthorization(['api_id' => int, 'api_hash' => 'string', 'bot_auth_token' => 'string', ]); -``` - -Or, if you're using the [PWRTelegram HTTP API](https://pwrtelegram.xyz): - -### As a bot: - -POST/GET to `https://api.pwrtelegram.xyz/botTOKEN/madeline` - -Parameters: - -* method - auth.importBotAuthorization -* params - `{"api_id": int, "api_hash": "string", "bot_auth_token": "string", }` - - - -### As a user: - -POST/GET to `https://api.pwrtelegram.xyz/userTOKEN/auth.importBotAuthorization` - -Parameters: - -api_id - Json encoded int -api_hash - Json encoded string -bot_auth_token - Json encoded string - - - -Or, if you're into Lua: - -``` -auth_Authorization = auth.importBotAuthorization({api_id=int, api_hash='string', bot_auth_token='string', }) -``` - diff --git a/old_docs/API_docs_v44/methods/auth_logOut.md b/old_docs/API_docs_v44/methods/auth_logOut.md index 12159bab..7d5bb3f7 100644 --- a/old_docs/API_docs_v44/methods/auth_logOut.md +++ b/old_docs/API_docs_v44/methods/auth_logOut.md @@ -6,61 +6,8 @@ description: auth.logOut parameters, return type and example [Back to methods index](index.md) -*You cannot use this method directly, use the logout method instead (see https://daniil.it/MadelineProto for more info)* +**You cannot use this method directly, use the logout method instead (see https://daniil.it/MadelineProto for more info)** - - -### Return type: [Bool](../types/Bool.md) - -### Example: - - -``` -$MadelineProto = new \danog\MadelineProto\API(); -if (isset($token)) { // Login as a bot - $MadelineProto->bot_login($token); -} -if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } - $MadelineProto->complete_phone_login($code); -} - -$Bool = $MadelineProto->auth->logOut(); -``` - -Or, if you're using the [PWRTelegram HTTP API](https://pwrtelegram.xyz): - -### As a bot: - -POST/GET to `https://api.pwrtelegram.xyz/botTOKEN/madeline` - -Parameters: - -* method - auth.logOut -* params - `{}` - - - -### As a user: - -POST/GET to `https://api.pwrtelegram.xyz/userTOKEN/auth.logOut` - -Parameters: - - - - -Or, if you're into Lua: - -``` -Bool = auth.logOut({}) -``` - diff --git a/old_docs/API_docs_v44/methods/auth_sendCode.md b/old_docs/API_docs_v44/methods/auth_sendCode.md index 43bc28ee..22d1df94 100644 --- a/old_docs/API_docs_v44/methods/auth_sendCode.md +++ b/old_docs/API_docs_v44/methods/auth_sendCode.md @@ -6,75 +6,8 @@ description: auth.sendCode parameters, return type and example [Back to methods index](index.md) -*You cannot use this method directly, use the phone_login method instead (see https://daniil.it/MadelineProto for more info)* +**You cannot use this method directly, use the phone_login method instead (see https://daniil.it/MadelineProto for more info)** -### Parameters: - -| Name | Type | Required | -|----------|:-------------:|---------:| -|phone\_number|[string](../types/string.md) | Yes| -|sms\_type|[int](../types/int.md) | Yes| -|api\_id|[int](../types/int.md) | Yes| -|api\_hash|[string](../types/string.md) | Yes| -|lang\_code|[string](../types/string.md) | Yes| - - -### Return type: [auth\_SentCode](../types/auth_SentCode.md) - -### Example: - - -``` -$MadelineProto = new \danog\MadelineProto\API(); -if (isset($token)) { // Login as a bot - $MadelineProto->bot_login($token); -} -if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } - $MadelineProto->complete_phone_login($code); -} - -$auth_SentCode = $MadelineProto->auth->sendCode(['phone_number' => 'string', 'sms_type' => int, 'api_id' => int, 'api_hash' => 'string', 'lang_code' => 'string', ]); -``` - -Or, if you're using the [PWRTelegram HTTP API](https://pwrtelegram.xyz): - -### As a bot: - -POST/GET to `https://api.pwrtelegram.xyz/botTOKEN/madeline` - -Parameters: - -* method - auth.sendCode -* params - `{"phone_number": "string", "sms_type": int, "api_id": int, "api_hash": "string", "lang_code": "string", }` - - - -### As a user: - -POST/GET to `https://api.pwrtelegram.xyz/userTOKEN/auth.sendCode` - -Parameters: - -phone_number - Json encoded string -sms_type - Json encoded int -api_id - Json encoded int -api_hash - Json encoded string -lang_code - Json encoded string - - - -Or, if you're into Lua: - -``` -auth_SentCode = auth.sendCode({phone_number='string', sms_type=int, api_id=int, api_hash='string', lang_code='string', }) -``` - diff --git a/old_docs/API_docs_v44/methods/auth_signIn.md b/old_docs/API_docs_v44/methods/auth_signIn.md index 75c50d70..ab40bb4d 100644 --- a/old_docs/API_docs_v44/methods/auth_signIn.md +++ b/old_docs/API_docs_v44/methods/auth_signIn.md @@ -6,71 +6,8 @@ description: auth.signIn parameters, return type and example [Back to methods index](index.md) -*You cannot use this method directly, use the complete_phone_login method instead (see https://daniil.it/MadelineProto for more info)* +**You cannot use this method directly, use the complete_phone_login method instead (see https://daniil.it/MadelineProto for more info)** -### Parameters: - -| Name | Type | Required | -|----------|:-------------:|---------:| -|phone\_number|[string](../types/string.md) | Yes| -|phone\_code\_hash|[string](../types/string.md) | Yes| -|phone\_code|[string](../types/string.md) | Yes| - - -### Return type: [auth\_Authorization](../types/auth_Authorization.md) - -### Example: - - -``` -$MadelineProto = new \danog\MadelineProto\API(); -if (isset($token)) { // Login as a bot - $MadelineProto->bot_login($token); -} -if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } - $MadelineProto->complete_phone_login($code); -} - -$auth_Authorization = $MadelineProto->auth->signIn(['phone_number' => 'string', 'phone_code_hash' => 'string', 'phone_code' => 'string', ]); -``` - -Or, if you're using the [PWRTelegram HTTP API](https://pwrtelegram.xyz): - -### As a bot: - -POST/GET to `https://api.pwrtelegram.xyz/botTOKEN/madeline` - -Parameters: - -* method - auth.signIn -* params - `{"phone_number": "string", "phone_code_hash": "string", "phone_code": "string", }` - - - -### As a user: - -POST/GET to `https://api.pwrtelegram.xyz/userTOKEN/auth.signIn` - -Parameters: - -phone_number - Json encoded string -phone_code_hash - Json encoded string -phone_code - Json encoded string - - - -Or, if you're into Lua: - -``` -auth_Authorization = auth.signIn({phone_number='string', phone_code_hash='string', phone_code='string', }) -``` - diff --git a/old_docs/API_docs_v44/methods/auth_signUp.md b/old_docs/API_docs_v44/methods/auth_signUp.md index f2a72b68..042d1191 100644 --- a/old_docs/API_docs_v44/methods/auth_signUp.md +++ b/old_docs/API_docs_v44/methods/auth_signUp.md @@ -6,75 +6,8 @@ description: auth.signUp parameters, return type and example [Back to methods index](index.md) -*You cannot use this method directly, use the complete_signup method instead (see https://daniil.it/MadelineProto for more info)* +**You cannot use this method directly, use the complete_signup method instead (see https://daniil.it/MadelineProto for more info)** -### Parameters: - -| Name | Type | Required | -|----------|:-------------:|---------:| -|phone\_number|[string](../types/string.md) | Yes| -|phone\_code\_hash|[string](../types/string.md) | Yes| -|phone\_code|[string](../types/string.md) | Yes| -|first\_name|[string](../types/string.md) | Yes| -|last\_name|[string](../types/string.md) | Yes| - - -### Return type: [auth\_Authorization](../types/auth_Authorization.md) - -### Example: - - -``` -$MadelineProto = new \danog\MadelineProto\API(); -if (isset($token)) { // Login as a bot - $MadelineProto->bot_login($token); -} -if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } - $MadelineProto->complete_phone_login($code); -} - -$auth_Authorization = $MadelineProto->auth->signUp(['phone_number' => 'string', 'phone_code_hash' => 'string', 'phone_code' => 'string', 'first_name' => 'string', 'last_name' => 'string', ]); -``` - -Or, if you're using the [PWRTelegram HTTP API](https://pwrtelegram.xyz): - -### As a bot: - -POST/GET to `https://api.pwrtelegram.xyz/botTOKEN/madeline` - -Parameters: - -* method - auth.signUp -* params - `{"phone_number": "string", "phone_code_hash": "string", "phone_code": "string", "first_name": "string", "last_name": "string", }` - - - -### As a user: - -POST/GET to `https://api.pwrtelegram.xyz/userTOKEN/auth.signUp` - -Parameters: - -phone_number - Json encoded string -phone_code_hash - Json encoded string -phone_code - Json encoded string -first_name - Json encoded string -last_name - Json encoded string - - - -Or, if you're into Lua: - -``` -auth_Authorization = auth.signUp({phone_number='string', phone_code_hash='string', phone_code='string', first_name='string', last_name='string', }) -``` - diff --git a/old_docs/API_docs_v44/methods/channels_getFullChannel.md b/old_docs/API_docs_v44/methods/channels_getFullChannel.md index 340efcfe..58dbe057 100644 --- a/old_docs/API_docs_v44/methods/channels_getFullChannel.md +++ b/old_docs/API_docs_v44/methods/channels_getFullChannel.md @@ -6,67 +6,8 @@ description: channels.getFullChannel parameters, return type and example [Back to methods index](index.md) -*You cannot use this method directly, use the get_pwr_chat, get_info, get_full_info methods instead (see https://daniil.it/MadelineProto for more info)* +**You cannot use this method directly, use the get_pwr_chat, get_info, get_full_info methods instead (see https://daniil.it/MadelineProto for more info)** -### Parameters: - -| Name | Type | Required | -|----------|:-------------:|---------:| -|channel|[InputChannel](../types/InputChannel.md) | Yes| - - -### Return type: [messages\_ChatFull](../types/messages_ChatFull.md) - -### Example: - - -``` -$MadelineProto = new \danog\MadelineProto\API(); -if (isset($token)) { // Login as a bot - $MadelineProto->bot_login($token); -} -if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } - $MadelineProto->complete_phone_login($code); -} - -$messages_ChatFull = $MadelineProto->channels->getFullChannel(['channel' => InputChannel, ]); -``` - -Or, if you're using the [PWRTelegram HTTP API](https://pwrtelegram.xyz): - -### As a bot: - -POST/GET to `https://api.pwrtelegram.xyz/botTOKEN/madeline` - -Parameters: - -* method - channels.getFullChannel -* params - `{"channel": InputChannel, }` - - - -### As a user: - -POST/GET to `https://api.pwrtelegram.xyz/userTOKEN/channels.getFullChannel` - -Parameters: - -channel - Json encoded InputChannel - - - -Or, if you're into Lua: - -``` -messages_ChatFull = channels.getFullChannel({channel=InputChannel, }) -``` - diff --git a/old_docs/API_docs_v44/methods/channels_getParticipants.md b/old_docs/API_docs_v44/methods/channels_getParticipants.md index 4c6e09cc..d84cf09c 100644 --- a/old_docs/API_docs_v44/methods/channels_getParticipants.md +++ b/old_docs/API_docs_v44/methods/channels_getParticipants.md @@ -6,73 +6,8 @@ description: channels.getParticipants parameters, return type and example [Back to methods index](index.md) -*You cannot use this method directly, use the get_pwr_chat, get_info, get_full_info methods instead (see https://daniil.it/MadelineProto for more info)* +**You cannot use this method directly, use the get_pwr_chat, get_info, get_full_info methods instead (see https://daniil.it/MadelineProto for more info)** -### Parameters: - -| Name | Type | Required | -|----------|:-------------:|---------:| -|channel|[InputChannel](../types/InputChannel.md) | Yes| -|filter|[ChannelParticipantsFilter](../types/ChannelParticipantsFilter.md) | Yes| -|offset|[int](../types/int.md) | Yes| -|limit|[int](../types/int.md) | Yes| - - -### Return type: [channels\_ChannelParticipants](../types/channels_ChannelParticipants.md) - -### Example: - - -``` -$MadelineProto = new \danog\MadelineProto\API(); -if (isset($token)) { // Login as a bot - $MadelineProto->bot_login($token); -} -if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } - $MadelineProto->complete_phone_login($code); -} - -$channels_ChannelParticipants = $MadelineProto->channels->getParticipants(['channel' => InputChannel, 'filter' => ChannelParticipantsFilter, 'offset' => int, 'limit' => int, ]); -``` - -Or, if you're using the [PWRTelegram HTTP API](https://pwrtelegram.xyz): - -### As a bot: - -POST/GET to `https://api.pwrtelegram.xyz/botTOKEN/madeline` - -Parameters: - -* method - channels.getParticipants -* params - `{"channel": InputChannel, "filter": ChannelParticipantsFilter, "offset": int, "limit": int, }` - - - -### As a user: - -POST/GET to `https://api.pwrtelegram.xyz/userTOKEN/channels.getParticipants` - -Parameters: - -channel - Json encoded InputChannel -filter - Json encoded ChannelParticipantsFilter -offset - Json encoded int -limit - Json encoded int - - - -Or, if you're into Lua: - -``` -channels_ChannelParticipants = channels.getParticipants({channel=InputChannel, filter=ChannelParticipantsFilter, offset=int, limit=int, }) -``` - diff --git a/old_docs/API_docs_v44/methods/contacts_resolveUsername.md b/old_docs/API_docs_v44/methods/contacts_resolveUsername.md index 90e72851..b665b382 100644 --- a/old_docs/API_docs_v44/methods/contacts_resolveUsername.md +++ b/old_docs/API_docs_v44/methods/contacts_resolveUsername.md @@ -6,67 +6,8 @@ description: contacts.resolveUsername parameters, return type and example [Back to methods index](index.md) -*You cannot use this method directly, use the resolve_username, get_pwr_chat, get_info, get_full_info methods instead (see https://daniil.it/MadelineProto for more info)* +**You cannot use this method directly, use the resolve_username, get_pwr_chat, get_info, get_full_info methods instead (see https://daniil.it/MadelineProto for more info)** -### Parameters: - -| Name | Type | Required | -|----------|:-------------:|---------:| -|username|[string](../types/string.md) | Yes| - - -### Return type: [contacts\_ResolvedPeer](../types/contacts_ResolvedPeer.md) - -### Example: - - -``` -$MadelineProto = new \danog\MadelineProto\API(); -if (isset($token)) { // Login as a bot - $MadelineProto->bot_login($token); -} -if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } - $MadelineProto->complete_phone_login($code); -} - -$contacts_ResolvedPeer = $MadelineProto->contacts->resolveUsername(['username' => 'string', ]); -``` - -Or, if you're using the [PWRTelegram HTTP API](https://pwrtelegram.xyz): - -### As a bot: - -POST/GET to `https://api.pwrtelegram.xyz/botTOKEN/madeline` - -Parameters: - -* method - contacts.resolveUsername -* params - `{"username": "string", }` - - - -### As a user: - -POST/GET to `https://api.pwrtelegram.xyz/userTOKEN/contacts.resolveUsername` - -Parameters: - -username - Json encoded string - - - -Or, if you're into Lua: - -``` -contacts_ResolvedPeer = contacts.resolveUsername({username='string', }) -``` - diff --git a/old_docs/API_docs_v44/methods/messages_acceptEncryption.md b/old_docs/API_docs_v44/methods/messages_acceptEncryption.md index 548087b6..243c4c00 100644 --- a/old_docs/API_docs_v44/methods/messages_acceptEncryption.md +++ b/old_docs/API_docs_v44/methods/messages_acceptEncryption.md @@ -6,71 +6,8 @@ description: messages.acceptEncryption parameters, return type and example [Back to methods index](index.md) -*You cannot use this method directly, see https://daniil.it/MadelineProto for more info on handling secret chats* +**You cannot use this method directly, see https://daniil.it/MadelineProto for more info on handling secret chats** -### Parameters: - -| Name | Type | Required | -|----------|:-------------:|---------:| -|peer|[InputEncryptedChat](../types/InputEncryptedChat.md) | Yes| -|g\_b|[bytes](../types/bytes.md) | Yes| -|key\_fingerprint|[long](../types/long.md) | Yes| - - -### Return type: [EncryptedChat](../types/EncryptedChat.md) - -### Example: - - -``` -$MadelineProto = new \danog\MadelineProto\API(); -if (isset($token)) { // Login as a bot - $MadelineProto->bot_login($token); -} -if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } - $MadelineProto->complete_phone_login($code); -} - -$EncryptedChat = $MadelineProto->messages->acceptEncryption(['peer' => InputEncryptedChat, 'g_b' => 'bytes', 'key_fingerprint' => long, ]); -``` - -Or, if you're using the [PWRTelegram HTTP API](https://pwrtelegram.xyz): - -### As a bot: - -POST/GET to `https://api.pwrtelegram.xyz/botTOKEN/madeline` - -Parameters: - -* method - messages.acceptEncryption -* params - `{"peer": InputEncryptedChat, "g_b": "bytes", "key_fingerprint": long, }` - - - -### As a user: - -POST/GET to `https://api.pwrtelegram.xyz/userTOKEN/messages.acceptEncryption` - -Parameters: - -peer - Json encoded InputEncryptedChat -g_b - Json encoded bytes -key_fingerprint - Json encoded long - - - -Or, if you're into Lua: - -``` -EncryptedChat = messages.acceptEncryption({peer=InputEncryptedChat, g_b='bytes', key_fingerprint=long, }) -``` - diff --git a/old_docs/API_docs_v44/methods/messages_discardEncryption.md b/old_docs/API_docs_v44/methods/messages_discardEncryption.md index 72648e9d..3a9dc58b 100644 --- a/old_docs/API_docs_v44/methods/messages_discardEncryption.md +++ b/old_docs/API_docs_v44/methods/messages_discardEncryption.md @@ -6,67 +6,8 @@ description: messages.discardEncryption parameters, return type and example [Back to methods index](index.md) -*You cannot use this method directly, see https://daniil.it/MadelineProto for more info on handling secret chats* +**You cannot use this method directly, see https://daniil.it/MadelineProto for more info on handling secret chats** -### Parameters: - -| Name | Type | Required | -|----------|:-------------:|---------:| -|chat\_id|[int](../types/int.md) | Yes| - - -### Return type: [Bool](../types/Bool.md) - -### Example: - - -``` -$MadelineProto = new \danog\MadelineProto\API(); -if (isset($token)) { // Login as a bot - $MadelineProto->bot_login($token); -} -if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } - $MadelineProto->complete_phone_login($code); -} - -$Bool = $MadelineProto->messages->discardEncryption(['chat_id' => int, ]); -``` - -Or, if you're using the [PWRTelegram HTTP API](https://pwrtelegram.xyz): - -### As a bot: - -POST/GET to `https://api.pwrtelegram.xyz/botTOKEN/madeline` - -Parameters: - -* method - messages.discardEncryption -* params - `{"chat_id": int, }` - - - -### As a user: - -POST/GET to `https://api.pwrtelegram.xyz/userTOKEN/messages.discardEncryption` - -Parameters: - -chat_id - Json encoded int - - - -Or, if you're into Lua: - -``` -Bool = messages.discardEncryption({chat_id=int, }) -``` - diff --git a/old_docs/API_docs_v44/methods/messages_getFullChat.md b/old_docs/API_docs_v44/methods/messages_getFullChat.md index 62102b64..ffa9c281 100644 --- a/old_docs/API_docs_v44/methods/messages_getFullChat.md +++ b/old_docs/API_docs_v44/methods/messages_getFullChat.md @@ -6,67 +6,8 @@ description: messages.getFullChat parameters, return type and example [Back to methods index](index.md) -*You cannot use this method directly, use the get_pwr_chat, get_info, get_full_info methods instead (see https://daniil.it/MadelineProto for more info)* +**You cannot use this method directly, use the get_pwr_chat, get_info, get_full_info methods instead (see https://daniil.it/MadelineProto for more info)** -### Parameters: - -| Name | Type | Required | -|----------|:-------------:|---------:| -|chat\_id|[InputPeer](../types/InputPeer.md) | Yes| - - -### Return type: [messages\_ChatFull](../types/messages_ChatFull.md) - -### Example: - - -``` -$MadelineProto = new \danog\MadelineProto\API(); -if (isset($token)) { // Login as a bot - $MadelineProto->bot_login($token); -} -if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } - $MadelineProto->complete_phone_login($code); -} - -$messages_ChatFull = $MadelineProto->messages->getFullChat(['chat_id' => InputPeer, ]); -``` - -Or, if you're using the [PWRTelegram HTTP API](https://pwrtelegram.xyz): - -### As a bot: - -POST/GET to `https://api.pwrtelegram.xyz/botTOKEN/madeline` - -Parameters: - -* method - messages.getFullChat -* params - `{"chat_id": InputPeer, }` - - - -### As a user: - -POST/GET to `https://api.pwrtelegram.xyz/userTOKEN/messages.getFullChat` - -Parameters: - -chat_id - Json encoded InputPeer - - - -Or, if you're into Lua: - -``` -messages_ChatFull = messages.getFullChat({chat_id=InputPeer, }) -``` - diff --git a/old_docs/API_docs_v44/methods/messages_requestEncryption.md b/old_docs/API_docs_v44/methods/messages_requestEncryption.md index 2fd1f825..c8476667 100644 --- a/old_docs/API_docs_v44/methods/messages_requestEncryption.md +++ b/old_docs/API_docs_v44/methods/messages_requestEncryption.md @@ -6,69 +6,8 @@ description: messages.requestEncryption parameters, return type and example [Back to methods index](index.md) -*You cannot use this method directly, see https://daniil.it/MadelineProto for more info on handling secret chats* +**You cannot use this method directly, see https://daniil.it/MadelineProto for more info on handling secret chats** -### Parameters: - -| Name | Type | Required | -|----------|:-------------:|---------:| -|user\_id|[InputUser](../types/InputUser.md) | Yes| -|g\_a|[bytes](../types/bytes.md) | Yes| - - -### Return type: [EncryptedChat](../types/EncryptedChat.md) - -### Example: - - -``` -$MadelineProto = new \danog\MadelineProto\API(); -if (isset($token)) { // Login as a bot - $MadelineProto->bot_login($token); -} -if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } - $MadelineProto->complete_phone_login($code); -} - -$EncryptedChat = $MadelineProto->messages->requestEncryption(['user_id' => InputUser, 'g_a' => 'bytes', ]); -``` - -Or, if you're using the [PWRTelegram HTTP API](https://pwrtelegram.xyz): - -### As a bot: - -POST/GET to `https://api.pwrtelegram.xyz/botTOKEN/madeline` - -Parameters: - -* method - messages.requestEncryption -* params - `{"user_id": InputUser, "g_a": "bytes", }` - - - -### As a user: - -POST/GET to `https://api.pwrtelegram.xyz/userTOKEN/messages.requestEncryption` - -Parameters: - -user_id - Json encoded InputUser -g_a - Json encoded bytes - - - -Or, if you're into Lua: - -``` -EncryptedChat = messages.requestEncryption({user_id=InputUser, g_a='bytes', }) -``` - diff --git a/old_docs/API_docs_v44/methods/updates_getChannelDifference.md b/old_docs/API_docs_v44/methods/updates_getChannelDifference.md index 51ea7aa5..2e69d1cd 100644 --- a/old_docs/API_docs_v44/methods/updates_getChannelDifference.md +++ b/old_docs/API_docs_v44/methods/updates_getChannelDifference.md @@ -6,73 +6,8 @@ description: updates.getChannelDifference parameters, return type and example [Back to methods index](index.md) -*You cannot use this method directly, see https://daniil.it/MadelineProto for more info on handling updates* +**You cannot use this method directly, see https://daniil.it/MadelineProto for more info on handling updates** -### Parameters: - -| Name | Type | Required | -|----------|:-------------:|---------:| -|channel|[InputChannel](../types/InputChannel.md) | Yes| -|filter|[ChannelMessagesFilter](../types/ChannelMessagesFilter.md) | Yes| -|pts|[int](../types/int.md) | Yes| -|limit|[int](../types/int.md) | Yes| - - -### Return type: [updates\_ChannelDifference](../types/updates_ChannelDifference.md) - -### Example: - - -``` -$MadelineProto = new \danog\MadelineProto\API(); -if (isset($token)) { // Login as a bot - $MadelineProto->bot_login($token); -} -if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } - $MadelineProto->complete_phone_login($code); -} - -$updates_ChannelDifference = $MadelineProto->updates->getChannelDifference(['channel' => InputChannel, 'filter' => ChannelMessagesFilter, 'pts' => int, 'limit' => int, ]); -``` - -Or, if you're using the [PWRTelegram HTTP API](https://pwrtelegram.xyz): - -### As a bot: - -POST/GET to `https://api.pwrtelegram.xyz/botTOKEN/madeline` - -Parameters: - -* method - updates.getChannelDifference -* params - `{"channel": InputChannel, "filter": ChannelMessagesFilter, "pts": int, "limit": int, }` - - - -### As a user: - -POST/GET to `https://api.pwrtelegram.xyz/userTOKEN/updates.getChannelDifference` - -Parameters: - -channel - Json encoded InputChannel -filter - Json encoded ChannelMessagesFilter -pts - Json encoded int -limit - Json encoded int - - - -Or, if you're into Lua: - -``` -updates_ChannelDifference = updates.getChannelDifference({channel=InputChannel, filter=ChannelMessagesFilter, pts=int, limit=int, }) -``` - diff --git a/old_docs/API_docs_v44/methods/updates_getDifference.md b/old_docs/API_docs_v44/methods/updates_getDifference.md index 53c7b078..9bcee79a 100644 --- a/old_docs/API_docs_v44/methods/updates_getDifference.md +++ b/old_docs/API_docs_v44/methods/updates_getDifference.md @@ -6,71 +6,8 @@ description: updates.getDifference parameters, return type and example [Back to methods index](index.md) -*You cannot use this method directly, see https://daniil.it/MadelineProto for more info on handling updates* +**You cannot use this method directly, see https://daniil.it/MadelineProto for more info on handling updates** -### Parameters: - -| Name | Type | Required | -|----------|:-------------:|---------:| -|pts|[int](../types/int.md) | Yes| -|date|[int](../types/int.md) | Yes| -|qts|[int](../types/int.md) | Yes| - - -### Return type: [updates\_Difference](../types/updates_Difference.md) - -### Example: - - -``` -$MadelineProto = new \danog\MadelineProto\API(); -if (isset($token)) { // Login as a bot - $MadelineProto->bot_login($token); -} -if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } - $MadelineProto->complete_phone_login($code); -} - -$updates_Difference = $MadelineProto->updates->getDifference(['pts' => int, 'date' => int, 'qts' => int, ]); -``` - -Or, if you're using the [PWRTelegram HTTP API](https://pwrtelegram.xyz): - -### As a bot: - -POST/GET to `https://api.pwrtelegram.xyz/botTOKEN/madeline` - -Parameters: - -* method - updates.getDifference -* params - `{"pts": int, "date": int, "qts": int, }` - - - -### As a user: - -POST/GET to `https://api.pwrtelegram.xyz/userTOKEN/updates.getDifference` - -Parameters: - -pts - Json encoded int -date - Json encoded int -qts - Json encoded int - - - -Or, if you're into Lua: - -``` -updates_Difference = updates.getDifference({pts=int, date=int, qts=int, }) -``` - diff --git a/old_docs/API_docs_v44/methods/updates_getState.md b/old_docs/API_docs_v44/methods/updates_getState.md index 51f6ae80..fd5955ba 100644 --- a/old_docs/API_docs_v44/methods/updates_getState.md +++ b/old_docs/API_docs_v44/methods/updates_getState.md @@ -6,61 +6,8 @@ description: updates.getState parameters, return type and example [Back to methods index](index.md) -*You cannot use this method directly, see https://daniil.it/MadelineProto for more info on handling updates* +**You cannot use this method directly, see https://daniil.it/MadelineProto for more info on handling updates** - - -### Return type: [updates\_State](../types/updates_State.md) - -### Example: - - -``` -$MadelineProto = new \danog\MadelineProto\API(); -if (isset($token)) { // Login as a bot - $MadelineProto->bot_login($token); -} -if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } - $MadelineProto->complete_phone_login($code); -} - -$updates_State = $MadelineProto->updates->getState(); -``` - -Or, if you're using the [PWRTelegram HTTP API](https://pwrtelegram.xyz): - -### As a bot: - -POST/GET to `https://api.pwrtelegram.xyz/botTOKEN/madeline` - -Parameters: - -* method - updates.getState -* params - `{}` - - - -### As a user: - -POST/GET to `https://api.pwrtelegram.xyz/userTOKEN/updates.getState` - -Parameters: - - - - -Or, if you're into Lua: - -``` -updates_State = updates.getState({}) -``` - diff --git a/old_docs/API_docs_v44/methods/upload_getFile.md b/old_docs/API_docs_v44/methods/upload_getFile.md index a1003003..add7d54e 100644 --- a/old_docs/API_docs_v44/methods/upload_getFile.md +++ b/old_docs/API_docs_v44/methods/upload_getFile.md @@ -6,71 +6,8 @@ description: upload.getFile parameters, return type and example [Back to methods index](index.md) -*You cannot use this method directly, use the upload, download_to_stream, download_to_file, download_to_dir methods instead; see https://daniil.it/MadelineProto for more info* +**You cannot use this method directly, use the upload, download_to_stream, download_to_file, download_to_dir methods instead; see https://daniil.it/MadelineProto for more info** -### Parameters: - -| Name | Type | Required | -|----------|:-------------:|---------:| -|location|[InputFileLocation](../types/InputFileLocation.md) | Yes| -|offset|[int](../types/int.md) | Yes| -|limit|[int](../types/int.md) | Yes| - - -### Return type: [upload\_File](../types/upload_File.md) - -### Example: - - -``` -$MadelineProto = new \danog\MadelineProto\API(); -if (isset($token)) { // Login as a bot - $MadelineProto->bot_login($token); -} -if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } - $MadelineProto->complete_phone_login($code); -} - -$upload_File = $MadelineProto->upload->getFile(['location' => InputFileLocation, 'offset' => int, 'limit' => int, ]); -``` - -Or, if you're using the [PWRTelegram HTTP API](https://pwrtelegram.xyz): - -### As a bot: - -POST/GET to `https://api.pwrtelegram.xyz/botTOKEN/madeline` - -Parameters: - -* method - upload.getFile -* params - `{"location": InputFileLocation, "offset": int, "limit": int, }` - - - -### As a user: - -POST/GET to `https://api.pwrtelegram.xyz/userTOKEN/upload.getFile` - -Parameters: - -location - Json encoded InputFileLocation -offset - Json encoded int -limit - Json encoded int - - - -Or, if you're into Lua: - -``` -upload_File = upload.getFile({location=InputFileLocation, offset=int, limit=int, }) -``` - diff --git a/old_docs/API_docs_v44/methods/upload_saveBigFilePart.md b/old_docs/API_docs_v44/methods/upload_saveBigFilePart.md index e5c96d89..b1c3ea28 100644 --- a/old_docs/API_docs_v44/methods/upload_saveBigFilePart.md +++ b/old_docs/API_docs_v44/methods/upload_saveBigFilePart.md @@ -6,73 +6,8 @@ description: upload.saveBigFilePart parameters, return type and example [Back to methods index](index.md) -*You cannot use this method directly, use the upload, download_to_stream, download_to_file, download_to_dir methods instead; see https://daniil.it/MadelineProto for more info* +**You cannot use this method directly, use the upload, download_to_stream, download_to_file, download_to_dir methods instead; see https://daniil.it/MadelineProto for more info** -### Parameters: - -| Name | Type | Required | -|----------|:-------------:|---------:| -|file\_id|[long](../types/long.md) | Yes| -|file\_part|[int](../types/int.md) | Yes| -|file\_total\_parts|[int](../types/int.md) | Yes| -|bytes|[bytes](../types/bytes.md) | Yes| - - -### Return type: [Bool](../types/Bool.md) - -### Example: - - -``` -$MadelineProto = new \danog\MadelineProto\API(); -if (isset($token)) { // Login as a bot - $MadelineProto->bot_login($token); -} -if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } - $MadelineProto->complete_phone_login($code); -} - -$Bool = $MadelineProto->upload->saveBigFilePart(['file_id' => long, 'file_part' => int, 'file_total_parts' => int, 'bytes' => 'bytes', ]); -``` - -Or, if you're using the [PWRTelegram HTTP API](https://pwrtelegram.xyz): - -### As a bot: - -POST/GET to `https://api.pwrtelegram.xyz/botTOKEN/madeline` - -Parameters: - -* method - upload.saveBigFilePart -* params - `{"file_id": long, "file_part": int, "file_total_parts": int, "bytes": "bytes", }` - - - -### As a user: - -POST/GET to `https://api.pwrtelegram.xyz/userTOKEN/upload.saveBigFilePart` - -Parameters: - -file_id - Json encoded long -file_part - Json encoded int -file_total_parts - Json encoded int -bytes - Json encoded bytes - - - -Or, if you're into Lua: - -``` -Bool = upload.saveBigFilePart({file_id=long, file_part=int, file_total_parts=int, bytes='bytes', }) -``` - diff --git a/old_docs/API_docs_v44/methods/upload_saveFilePart.md b/old_docs/API_docs_v44/methods/upload_saveFilePart.md index 1c16e4b2..c482f321 100644 --- a/old_docs/API_docs_v44/methods/upload_saveFilePart.md +++ b/old_docs/API_docs_v44/methods/upload_saveFilePart.md @@ -6,71 +6,8 @@ description: upload.saveFilePart parameters, return type and example [Back to methods index](index.md) -*You cannot use this method directly, use the upload, download_to_stream, download_to_file, download_to_dir methods instead; see https://daniil.it/MadelineProto for more info* +**You cannot use this method directly, use the upload, download_to_stream, download_to_file, download_to_dir methods instead; see https://daniil.it/MadelineProto for more info** -### Parameters: - -| Name | Type | Required | -|----------|:-------------:|---------:| -|file\_id|[long](../types/long.md) | Yes| -|file\_part|[int](../types/int.md) | Yes| -|bytes|[bytes](../types/bytes.md) | Yes| - - -### Return type: [Bool](../types/Bool.md) - -### Example: - - -``` -$MadelineProto = new \danog\MadelineProto\API(); -if (isset($token)) { // Login as a bot - $MadelineProto->bot_login($token); -} -if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } - $MadelineProto->complete_phone_login($code); -} - -$Bool = $MadelineProto->upload->saveFilePart(['file_id' => long, 'file_part' => int, 'bytes' => 'bytes', ]); -``` - -Or, if you're using the [PWRTelegram HTTP API](https://pwrtelegram.xyz): - -### As a bot: - -POST/GET to `https://api.pwrtelegram.xyz/botTOKEN/madeline` - -Parameters: - -* method - upload.saveFilePart -* params - `{"file_id": long, "file_part": int, "bytes": "bytes", }` - - - -### As a user: - -POST/GET to `https://api.pwrtelegram.xyz/userTOKEN/upload.saveFilePart` - -Parameters: - -file_id - Json encoded long -file_part - Json encoded int -bytes - Json encoded bytes - - - -Or, if you're into Lua: - -``` -Bool = upload.saveFilePart({file_id=long, file_part=int, bytes='bytes', }) -``` - diff --git a/old_docs/API_docs_v44/methods/users_getFullUser.md b/old_docs/API_docs_v44/methods/users_getFullUser.md index 645ab12e..4ec831ec 100644 --- a/old_docs/API_docs_v44/methods/users_getFullUser.md +++ b/old_docs/API_docs_v44/methods/users_getFullUser.md @@ -6,67 +6,8 @@ description: users.getFullUser parameters, return type and example [Back to methods index](index.md) -*You cannot use this method directly, use the get_pwr_chat, get_info, get_full_info methods instead (see https://daniil.it/MadelineProto for more info)* +**You cannot use this method directly, use the get_pwr_chat, get_info, get_full_info methods instead (see https://daniil.it/MadelineProto for more info)** -### Parameters: - -| Name | Type | Required | -|----------|:-------------:|---------:| -|id|[InputUser](../types/InputUser.md) | Yes| - - -### Return type: [UserFull](../types/UserFull.md) - -### Example: - - -``` -$MadelineProto = new \danog\MadelineProto\API(); -if (isset($token)) { // Login as a bot - $MadelineProto->bot_login($token); -} -if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } - $MadelineProto->complete_phone_login($code); -} - -$UserFull = $MadelineProto->users->getFullUser(['id' => InputUser, ]); -``` - -Or, if you're using the [PWRTelegram HTTP API](https://pwrtelegram.xyz): - -### As a bot: - -POST/GET to `https://api.pwrtelegram.xyz/botTOKEN/madeline` - -Parameters: - -* method - users.getFullUser -* params - `{"id": InputUser, }` - - - -### As a user: - -POST/GET to `https://api.pwrtelegram.xyz/userTOKEN/users.getFullUser` - -Parameters: - -id - Json encoded InputUser - - - -Or, if you're into Lua: - -``` -UserFull = users.getFullUser({id=InputUser, }) -``` - diff --git a/old_docs/API_docs_v45/constructors/README.md b/old_docs/API_docs_v45/constructors/README.md index 748adaac..064a21d8 100644 --- a/old_docs/API_docs_v45/constructors/README.md +++ b/old_docs/API_docs_v45/constructors/README.md @@ -4,9 +4,6 @@ description: List of constructors --- # Constructors [Back to API documentation index](..) - - - ***

[$accountDaysTTL](../constructors/accountDaysTTL.md) = \['days' => [int](../types/int.md), \]; diff --git a/old_docs/API_docs_v45/methods/auth_importBotAuthorization.md b/old_docs/API_docs_v45/methods/auth_importBotAuthorization.md index 0d8836b6..57521a13 100644 --- a/old_docs/API_docs_v45/methods/auth_importBotAuthorization.md +++ b/old_docs/API_docs_v45/methods/auth_importBotAuthorization.md @@ -6,71 +6,8 @@ description: auth.importBotAuthorization parameters, return type and example [Back to methods index](index.md) -*You cannot use this method directly, use the bot_login method instead (see https://daniil.it/MadelineProto for more info)* +**You cannot use this method directly, use the bot_login method instead (see https://daniil.it/MadelineProto for more info)** -### Parameters: - -| Name | Type | Required | -|----------|:-------------:|---------:| -|api\_id|[int](../types/int.md) | Yes| -|api\_hash|[string](../types/string.md) | Yes| -|bot\_auth\_token|[string](../types/string.md) | Yes| - - -### Return type: [auth\_Authorization](../types/auth_Authorization.md) - -### Example: - - -``` -$MadelineProto = new \danog\MadelineProto\API(); -if (isset($token)) { // Login as a bot - $MadelineProto->bot_login($token); -} -if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } - $MadelineProto->complete_phone_login($code); -} - -$auth_Authorization = $MadelineProto->auth->importBotAuthorization(['api_id' => int, 'api_hash' => 'string', 'bot_auth_token' => 'string', ]); -``` - -Or, if you're using the [PWRTelegram HTTP API](https://pwrtelegram.xyz): - -### As a bot: - -POST/GET to `https://api.pwrtelegram.xyz/botTOKEN/madeline` - -Parameters: - -* method - auth.importBotAuthorization -* params - `{"api_id": int, "api_hash": "string", "bot_auth_token": "string", }` - - - -### As a user: - -POST/GET to `https://api.pwrtelegram.xyz/userTOKEN/auth.importBotAuthorization` - -Parameters: - -api_id - Json encoded int -api_hash - Json encoded string -bot_auth_token - Json encoded string - - - -Or, if you're into Lua: - -``` -auth_Authorization = auth.importBotAuthorization({api_id=int, api_hash='string', bot_auth_token='string', }) -``` - diff --git a/old_docs/API_docs_v45/methods/auth_logOut.md b/old_docs/API_docs_v45/methods/auth_logOut.md index 12159bab..7d5bb3f7 100644 --- a/old_docs/API_docs_v45/methods/auth_logOut.md +++ b/old_docs/API_docs_v45/methods/auth_logOut.md @@ -6,61 +6,8 @@ description: auth.logOut parameters, return type and example [Back to methods index](index.md) -*You cannot use this method directly, use the logout method instead (see https://daniil.it/MadelineProto for more info)* +**You cannot use this method directly, use the logout method instead (see https://daniil.it/MadelineProto for more info)** - - -### Return type: [Bool](../types/Bool.md) - -### Example: - - -``` -$MadelineProto = new \danog\MadelineProto\API(); -if (isset($token)) { // Login as a bot - $MadelineProto->bot_login($token); -} -if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } - $MadelineProto->complete_phone_login($code); -} - -$Bool = $MadelineProto->auth->logOut(); -``` - -Or, if you're using the [PWRTelegram HTTP API](https://pwrtelegram.xyz): - -### As a bot: - -POST/GET to `https://api.pwrtelegram.xyz/botTOKEN/madeline` - -Parameters: - -* method - auth.logOut -* params - `{}` - - - -### As a user: - -POST/GET to `https://api.pwrtelegram.xyz/userTOKEN/auth.logOut` - -Parameters: - - - - -Or, if you're into Lua: - -``` -Bool = auth.logOut({}) -``` - diff --git a/old_docs/API_docs_v45/methods/auth_sendCode.md b/old_docs/API_docs_v45/methods/auth_sendCode.md index 43bc28ee..22d1df94 100644 --- a/old_docs/API_docs_v45/methods/auth_sendCode.md +++ b/old_docs/API_docs_v45/methods/auth_sendCode.md @@ -6,75 +6,8 @@ description: auth.sendCode parameters, return type and example [Back to methods index](index.md) -*You cannot use this method directly, use the phone_login method instead (see https://daniil.it/MadelineProto for more info)* +**You cannot use this method directly, use the phone_login method instead (see https://daniil.it/MadelineProto for more info)** -### Parameters: - -| Name | Type | Required | -|----------|:-------------:|---------:| -|phone\_number|[string](../types/string.md) | Yes| -|sms\_type|[int](../types/int.md) | Yes| -|api\_id|[int](../types/int.md) | Yes| -|api\_hash|[string](../types/string.md) | Yes| -|lang\_code|[string](../types/string.md) | Yes| - - -### Return type: [auth\_SentCode](../types/auth_SentCode.md) - -### Example: - - -``` -$MadelineProto = new \danog\MadelineProto\API(); -if (isset($token)) { // Login as a bot - $MadelineProto->bot_login($token); -} -if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } - $MadelineProto->complete_phone_login($code); -} - -$auth_SentCode = $MadelineProto->auth->sendCode(['phone_number' => 'string', 'sms_type' => int, 'api_id' => int, 'api_hash' => 'string', 'lang_code' => 'string', ]); -``` - -Or, if you're using the [PWRTelegram HTTP API](https://pwrtelegram.xyz): - -### As a bot: - -POST/GET to `https://api.pwrtelegram.xyz/botTOKEN/madeline` - -Parameters: - -* method - auth.sendCode -* params - `{"phone_number": "string", "sms_type": int, "api_id": int, "api_hash": "string", "lang_code": "string", }` - - - -### As a user: - -POST/GET to `https://api.pwrtelegram.xyz/userTOKEN/auth.sendCode` - -Parameters: - -phone_number - Json encoded string -sms_type - Json encoded int -api_id - Json encoded int -api_hash - Json encoded string -lang_code - Json encoded string - - - -Or, if you're into Lua: - -``` -auth_SentCode = auth.sendCode({phone_number='string', sms_type=int, api_id=int, api_hash='string', lang_code='string', }) -``` - diff --git a/old_docs/API_docs_v45/methods/auth_signIn.md b/old_docs/API_docs_v45/methods/auth_signIn.md index 75c50d70..ab40bb4d 100644 --- a/old_docs/API_docs_v45/methods/auth_signIn.md +++ b/old_docs/API_docs_v45/methods/auth_signIn.md @@ -6,71 +6,8 @@ description: auth.signIn parameters, return type and example [Back to methods index](index.md) -*You cannot use this method directly, use the complete_phone_login method instead (see https://daniil.it/MadelineProto for more info)* +**You cannot use this method directly, use the complete_phone_login method instead (see https://daniil.it/MadelineProto for more info)** -### Parameters: - -| Name | Type | Required | -|----------|:-------------:|---------:| -|phone\_number|[string](../types/string.md) | Yes| -|phone\_code\_hash|[string](../types/string.md) | Yes| -|phone\_code|[string](../types/string.md) | Yes| - - -### Return type: [auth\_Authorization](../types/auth_Authorization.md) - -### Example: - - -``` -$MadelineProto = new \danog\MadelineProto\API(); -if (isset($token)) { // Login as a bot - $MadelineProto->bot_login($token); -} -if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } - $MadelineProto->complete_phone_login($code); -} - -$auth_Authorization = $MadelineProto->auth->signIn(['phone_number' => 'string', 'phone_code_hash' => 'string', 'phone_code' => 'string', ]); -``` - -Or, if you're using the [PWRTelegram HTTP API](https://pwrtelegram.xyz): - -### As a bot: - -POST/GET to `https://api.pwrtelegram.xyz/botTOKEN/madeline` - -Parameters: - -* method - auth.signIn -* params - `{"phone_number": "string", "phone_code_hash": "string", "phone_code": "string", }` - - - -### As a user: - -POST/GET to `https://api.pwrtelegram.xyz/userTOKEN/auth.signIn` - -Parameters: - -phone_number - Json encoded string -phone_code_hash - Json encoded string -phone_code - Json encoded string - - - -Or, if you're into Lua: - -``` -auth_Authorization = auth.signIn({phone_number='string', phone_code_hash='string', phone_code='string', }) -``` - diff --git a/old_docs/API_docs_v45/methods/auth_signUp.md b/old_docs/API_docs_v45/methods/auth_signUp.md index f2a72b68..042d1191 100644 --- a/old_docs/API_docs_v45/methods/auth_signUp.md +++ b/old_docs/API_docs_v45/methods/auth_signUp.md @@ -6,75 +6,8 @@ description: auth.signUp parameters, return type and example [Back to methods index](index.md) -*You cannot use this method directly, use the complete_signup method instead (see https://daniil.it/MadelineProto for more info)* +**You cannot use this method directly, use the complete_signup method instead (see https://daniil.it/MadelineProto for more info)** -### Parameters: - -| Name | Type | Required | -|----------|:-------------:|---------:| -|phone\_number|[string](../types/string.md) | Yes| -|phone\_code\_hash|[string](../types/string.md) | Yes| -|phone\_code|[string](../types/string.md) | Yes| -|first\_name|[string](../types/string.md) | Yes| -|last\_name|[string](../types/string.md) | Yes| - - -### Return type: [auth\_Authorization](../types/auth_Authorization.md) - -### Example: - - -``` -$MadelineProto = new \danog\MadelineProto\API(); -if (isset($token)) { // Login as a bot - $MadelineProto->bot_login($token); -} -if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } - $MadelineProto->complete_phone_login($code); -} - -$auth_Authorization = $MadelineProto->auth->signUp(['phone_number' => 'string', 'phone_code_hash' => 'string', 'phone_code' => 'string', 'first_name' => 'string', 'last_name' => 'string', ]); -``` - -Or, if you're using the [PWRTelegram HTTP API](https://pwrtelegram.xyz): - -### As a bot: - -POST/GET to `https://api.pwrtelegram.xyz/botTOKEN/madeline` - -Parameters: - -* method - auth.signUp -* params - `{"phone_number": "string", "phone_code_hash": "string", "phone_code": "string", "first_name": "string", "last_name": "string", }` - - - -### As a user: - -POST/GET to `https://api.pwrtelegram.xyz/userTOKEN/auth.signUp` - -Parameters: - -phone_number - Json encoded string -phone_code_hash - Json encoded string -phone_code - Json encoded string -first_name - Json encoded string -last_name - Json encoded string - - - -Or, if you're into Lua: - -``` -auth_Authorization = auth.signUp({phone_number='string', phone_code_hash='string', phone_code='string', first_name='string', last_name='string', }) -``` - diff --git a/old_docs/API_docs_v45/methods/channels_getFullChannel.md b/old_docs/API_docs_v45/methods/channels_getFullChannel.md index 340efcfe..58dbe057 100644 --- a/old_docs/API_docs_v45/methods/channels_getFullChannel.md +++ b/old_docs/API_docs_v45/methods/channels_getFullChannel.md @@ -6,67 +6,8 @@ description: channels.getFullChannel parameters, return type and example [Back to methods index](index.md) -*You cannot use this method directly, use the get_pwr_chat, get_info, get_full_info methods instead (see https://daniil.it/MadelineProto for more info)* +**You cannot use this method directly, use the get_pwr_chat, get_info, get_full_info methods instead (see https://daniil.it/MadelineProto for more info)** -### Parameters: - -| Name | Type | Required | -|----------|:-------------:|---------:| -|channel|[InputChannel](../types/InputChannel.md) | Yes| - - -### Return type: [messages\_ChatFull](../types/messages_ChatFull.md) - -### Example: - - -``` -$MadelineProto = new \danog\MadelineProto\API(); -if (isset($token)) { // Login as a bot - $MadelineProto->bot_login($token); -} -if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } - $MadelineProto->complete_phone_login($code); -} - -$messages_ChatFull = $MadelineProto->channels->getFullChannel(['channel' => InputChannel, ]); -``` - -Or, if you're using the [PWRTelegram HTTP API](https://pwrtelegram.xyz): - -### As a bot: - -POST/GET to `https://api.pwrtelegram.xyz/botTOKEN/madeline` - -Parameters: - -* method - channels.getFullChannel -* params - `{"channel": InputChannel, }` - - - -### As a user: - -POST/GET to `https://api.pwrtelegram.xyz/userTOKEN/channels.getFullChannel` - -Parameters: - -channel - Json encoded InputChannel - - - -Or, if you're into Lua: - -``` -messages_ChatFull = channels.getFullChannel({channel=InputChannel, }) -``` - diff --git a/old_docs/API_docs_v45/methods/channels_getParticipants.md b/old_docs/API_docs_v45/methods/channels_getParticipants.md index 4c6e09cc..d84cf09c 100644 --- a/old_docs/API_docs_v45/methods/channels_getParticipants.md +++ b/old_docs/API_docs_v45/methods/channels_getParticipants.md @@ -6,73 +6,8 @@ description: channels.getParticipants parameters, return type and example [Back to methods index](index.md) -*You cannot use this method directly, use the get_pwr_chat, get_info, get_full_info methods instead (see https://daniil.it/MadelineProto for more info)* +**You cannot use this method directly, use the get_pwr_chat, get_info, get_full_info methods instead (see https://daniil.it/MadelineProto for more info)** -### Parameters: - -| Name | Type | Required | -|----------|:-------------:|---------:| -|channel|[InputChannel](../types/InputChannel.md) | Yes| -|filter|[ChannelParticipantsFilter](../types/ChannelParticipantsFilter.md) | Yes| -|offset|[int](../types/int.md) | Yes| -|limit|[int](../types/int.md) | Yes| - - -### Return type: [channels\_ChannelParticipants](../types/channels_ChannelParticipants.md) - -### Example: - - -``` -$MadelineProto = new \danog\MadelineProto\API(); -if (isset($token)) { // Login as a bot - $MadelineProto->bot_login($token); -} -if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } - $MadelineProto->complete_phone_login($code); -} - -$channels_ChannelParticipants = $MadelineProto->channels->getParticipants(['channel' => InputChannel, 'filter' => ChannelParticipantsFilter, 'offset' => int, 'limit' => int, ]); -``` - -Or, if you're using the [PWRTelegram HTTP API](https://pwrtelegram.xyz): - -### As a bot: - -POST/GET to `https://api.pwrtelegram.xyz/botTOKEN/madeline` - -Parameters: - -* method - channels.getParticipants -* params - `{"channel": InputChannel, "filter": ChannelParticipantsFilter, "offset": int, "limit": int, }` - - - -### As a user: - -POST/GET to `https://api.pwrtelegram.xyz/userTOKEN/channels.getParticipants` - -Parameters: - -channel - Json encoded InputChannel -filter - Json encoded ChannelParticipantsFilter -offset - Json encoded int -limit - Json encoded int - - - -Or, if you're into Lua: - -``` -channels_ChannelParticipants = channels.getParticipants({channel=InputChannel, filter=ChannelParticipantsFilter, offset=int, limit=int, }) -``` - diff --git a/old_docs/API_docs_v45/methods/contacts_resolveUsername.md b/old_docs/API_docs_v45/methods/contacts_resolveUsername.md index 90e72851..b665b382 100644 --- a/old_docs/API_docs_v45/methods/contacts_resolveUsername.md +++ b/old_docs/API_docs_v45/methods/contacts_resolveUsername.md @@ -6,67 +6,8 @@ description: contacts.resolveUsername parameters, return type and example [Back to methods index](index.md) -*You cannot use this method directly, use the resolve_username, get_pwr_chat, get_info, get_full_info methods instead (see https://daniil.it/MadelineProto for more info)* +**You cannot use this method directly, use the resolve_username, get_pwr_chat, get_info, get_full_info methods instead (see https://daniil.it/MadelineProto for more info)** -### Parameters: - -| Name | Type | Required | -|----------|:-------------:|---------:| -|username|[string](../types/string.md) | Yes| - - -### Return type: [contacts\_ResolvedPeer](../types/contacts_ResolvedPeer.md) - -### Example: - - -``` -$MadelineProto = new \danog\MadelineProto\API(); -if (isset($token)) { // Login as a bot - $MadelineProto->bot_login($token); -} -if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } - $MadelineProto->complete_phone_login($code); -} - -$contacts_ResolvedPeer = $MadelineProto->contacts->resolveUsername(['username' => 'string', ]); -``` - -Or, if you're using the [PWRTelegram HTTP API](https://pwrtelegram.xyz): - -### As a bot: - -POST/GET to `https://api.pwrtelegram.xyz/botTOKEN/madeline` - -Parameters: - -* method - contacts.resolveUsername -* params - `{"username": "string", }` - - - -### As a user: - -POST/GET to `https://api.pwrtelegram.xyz/userTOKEN/contacts.resolveUsername` - -Parameters: - -username - Json encoded string - - - -Or, if you're into Lua: - -``` -contacts_ResolvedPeer = contacts.resolveUsername({username='string', }) -``` - diff --git a/old_docs/API_docs_v45/methods/messages_acceptEncryption.md b/old_docs/API_docs_v45/methods/messages_acceptEncryption.md index 548087b6..243c4c00 100644 --- a/old_docs/API_docs_v45/methods/messages_acceptEncryption.md +++ b/old_docs/API_docs_v45/methods/messages_acceptEncryption.md @@ -6,71 +6,8 @@ description: messages.acceptEncryption parameters, return type and example [Back to methods index](index.md) -*You cannot use this method directly, see https://daniil.it/MadelineProto for more info on handling secret chats* +**You cannot use this method directly, see https://daniil.it/MadelineProto for more info on handling secret chats** -### Parameters: - -| Name | Type | Required | -|----------|:-------------:|---------:| -|peer|[InputEncryptedChat](../types/InputEncryptedChat.md) | Yes| -|g\_b|[bytes](../types/bytes.md) | Yes| -|key\_fingerprint|[long](../types/long.md) | Yes| - - -### Return type: [EncryptedChat](../types/EncryptedChat.md) - -### Example: - - -``` -$MadelineProto = new \danog\MadelineProto\API(); -if (isset($token)) { // Login as a bot - $MadelineProto->bot_login($token); -} -if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } - $MadelineProto->complete_phone_login($code); -} - -$EncryptedChat = $MadelineProto->messages->acceptEncryption(['peer' => InputEncryptedChat, 'g_b' => 'bytes', 'key_fingerprint' => long, ]); -``` - -Or, if you're using the [PWRTelegram HTTP API](https://pwrtelegram.xyz): - -### As a bot: - -POST/GET to `https://api.pwrtelegram.xyz/botTOKEN/madeline` - -Parameters: - -* method - messages.acceptEncryption -* params - `{"peer": InputEncryptedChat, "g_b": "bytes", "key_fingerprint": long, }` - - - -### As a user: - -POST/GET to `https://api.pwrtelegram.xyz/userTOKEN/messages.acceptEncryption` - -Parameters: - -peer - Json encoded InputEncryptedChat -g_b - Json encoded bytes -key_fingerprint - Json encoded long - - - -Or, if you're into Lua: - -``` -EncryptedChat = messages.acceptEncryption({peer=InputEncryptedChat, g_b='bytes', key_fingerprint=long, }) -``` - diff --git a/old_docs/API_docs_v45/methods/messages_discardEncryption.md b/old_docs/API_docs_v45/methods/messages_discardEncryption.md index 72648e9d..3a9dc58b 100644 --- a/old_docs/API_docs_v45/methods/messages_discardEncryption.md +++ b/old_docs/API_docs_v45/methods/messages_discardEncryption.md @@ -6,67 +6,8 @@ description: messages.discardEncryption parameters, return type and example [Back to methods index](index.md) -*You cannot use this method directly, see https://daniil.it/MadelineProto for more info on handling secret chats* +**You cannot use this method directly, see https://daniil.it/MadelineProto for more info on handling secret chats** -### Parameters: - -| Name | Type | Required | -|----------|:-------------:|---------:| -|chat\_id|[int](../types/int.md) | Yes| - - -### Return type: [Bool](../types/Bool.md) - -### Example: - - -``` -$MadelineProto = new \danog\MadelineProto\API(); -if (isset($token)) { // Login as a bot - $MadelineProto->bot_login($token); -} -if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } - $MadelineProto->complete_phone_login($code); -} - -$Bool = $MadelineProto->messages->discardEncryption(['chat_id' => int, ]); -``` - -Or, if you're using the [PWRTelegram HTTP API](https://pwrtelegram.xyz): - -### As a bot: - -POST/GET to `https://api.pwrtelegram.xyz/botTOKEN/madeline` - -Parameters: - -* method - messages.discardEncryption -* params - `{"chat_id": int, }` - - - -### As a user: - -POST/GET to `https://api.pwrtelegram.xyz/userTOKEN/messages.discardEncryption` - -Parameters: - -chat_id - Json encoded int - - - -Or, if you're into Lua: - -``` -Bool = messages.discardEncryption({chat_id=int, }) -``` - diff --git a/old_docs/API_docs_v45/methods/messages_getFullChat.md b/old_docs/API_docs_v45/methods/messages_getFullChat.md index 62102b64..ffa9c281 100644 --- a/old_docs/API_docs_v45/methods/messages_getFullChat.md +++ b/old_docs/API_docs_v45/methods/messages_getFullChat.md @@ -6,67 +6,8 @@ description: messages.getFullChat parameters, return type and example [Back to methods index](index.md) -*You cannot use this method directly, use the get_pwr_chat, get_info, get_full_info methods instead (see https://daniil.it/MadelineProto for more info)* +**You cannot use this method directly, use the get_pwr_chat, get_info, get_full_info methods instead (see https://daniil.it/MadelineProto for more info)** -### Parameters: - -| Name | Type | Required | -|----------|:-------------:|---------:| -|chat\_id|[InputPeer](../types/InputPeer.md) | Yes| - - -### Return type: [messages\_ChatFull](../types/messages_ChatFull.md) - -### Example: - - -``` -$MadelineProto = new \danog\MadelineProto\API(); -if (isset($token)) { // Login as a bot - $MadelineProto->bot_login($token); -} -if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } - $MadelineProto->complete_phone_login($code); -} - -$messages_ChatFull = $MadelineProto->messages->getFullChat(['chat_id' => InputPeer, ]); -``` - -Or, if you're using the [PWRTelegram HTTP API](https://pwrtelegram.xyz): - -### As a bot: - -POST/GET to `https://api.pwrtelegram.xyz/botTOKEN/madeline` - -Parameters: - -* method - messages.getFullChat -* params - `{"chat_id": InputPeer, }` - - - -### As a user: - -POST/GET to `https://api.pwrtelegram.xyz/userTOKEN/messages.getFullChat` - -Parameters: - -chat_id - Json encoded InputPeer - - - -Or, if you're into Lua: - -``` -messages_ChatFull = messages.getFullChat({chat_id=InputPeer, }) -``` - diff --git a/old_docs/API_docs_v45/methods/messages_requestEncryption.md b/old_docs/API_docs_v45/methods/messages_requestEncryption.md index 2fd1f825..c8476667 100644 --- a/old_docs/API_docs_v45/methods/messages_requestEncryption.md +++ b/old_docs/API_docs_v45/methods/messages_requestEncryption.md @@ -6,69 +6,8 @@ description: messages.requestEncryption parameters, return type and example [Back to methods index](index.md) -*You cannot use this method directly, see https://daniil.it/MadelineProto for more info on handling secret chats* +**You cannot use this method directly, see https://daniil.it/MadelineProto for more info on handling secret chats** -### Parameters: - -| Name | Type | Required | -|----------|:-------------:|---------:| -|user\_id|[InputUser](../types/InputUser.md) | Yes| -|g\_a|[bytes](../types/bytes.md) | Yes| - - -### Return type: [EncryptedChat](../types/EncryptedChat.md) - -### Example: - - -``` -$MadelineProto = new \danog\MadelineProto\API(); -if (isset($token)) { // Login as a bot - $MadelineProto->bot_login($token); -} -if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } - $MadelineProto->complete_phone_login($code); -} - -$EncryptedChat = $MadelineProto->messages->requestEncryption(['user_id' => InputUser, 'g_a' => 'bytes', ]); -``` - -Or, if you're using the [PWRTelegram HTTP API](https://pwrtelegram.xyz): - -### As a bot: - -POST/GET to `https://api.pwrtelegram.xyz/botTOKEN/madeline` - -Parameters: - -* method - messages.requestEncryption -* params - `{"user_id": InputUser, "g_a": "bytes", }` - - - -### As a user: - -POST/GET to `https://api.pwrtelegram.xyz/userTOKEN/messages.requestEncryption` - -Parameters: - -user_id - Json encoded InputUser -g_a - Json encoded bytes - - - -Or, if you're into Lua: - -``` -EncryptedChat = messages.requestEncryption({user_id=InputUser, g_a='bytes', }) -``` - diff --git a/old_docs/API_docs_v45/methods/updates_getChannelDifference.md b/old_docs/API_docs_v45/methods/updates_getChannelDifference.md index 51ea7aa5..2e69d1cd 100644 --- a/old_docs/API_docs_v45/methods/updates_getChannelDifference.md +++ b/old_docs/API_docs_v45/methods/updates_getChannelDifference.md @@ -6,73 +6,8 @@ description: updates.getChannelDifference parameters, return type and example [Back to methods index](index.md) -*You cannot use this method directly, see https://daniil.it/MadelineProto for more info on handling updates* +**You cannot use this method directly, see https://daniil.it/MadelineProto for more info on handling updates** -### Parameters: - -| Name | Type | Required | -|----------|:-------------:|---------:| -|channel|[InputChannel](../types/InputChannel.md) | Yes| -|filter|[ChannelMessagesFilter](../types/ChannelMessagesFilter.md) | Yes| -|pts|[int](../types/int.md) | Yes| -|limit|[int](../types/int.md) | Yes| - - -### Return type: [updates\_ChannelDifference](../types/updates_ChannelDifference.md) - -### Example: - - -``` -$MadelineProto = new \danog\MadelineProto\API(); -if (isset($token)) { // Login as a bot - $MadelineProto->bot_login($token); -} -if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } - $MadelineProto->complete_phone_login($code); -} - -$updates_ChannelDifference = $MadelineProto->updates->getChannelDifference(['channel' => InputChannel, 'filter' => ChannelMessagesFilter, 'pts' => int, 'limit' => int, ]); -``` - -Or, if you're using the [PWRTelegram HTTP API](https://pwrtelegram.xyz): - -### As a bot: - -POST/GET to `https://api.pwrtelegram.xyz/botTOKEN/madeline` - -Parameters: - -* method - updates.getChannelDifference -* params - `{"channel": InputChannel, "filter": ChannelMessagesFilter, "pts": int, "limit": int, }` - - - -### As a user: - -POST/GET to `https://api.pwrtelegram.xyz/userTOKEN/updates.getChannelDifference` - -Parameters: - -channel - Json encoded InputChannel -filter - Json encoded ChannelMessagesFilter -pts - Json encoded int -limit - Json encoded int - - - -Or, if you're into Lua: - -``` -updates_ChannelDifference = updates.getChannelDifference({channel=InputChannel, filter=ChannelMessagesFilter, pts=int, limit=int, }) -``` - diff --git a/old_docs/API_docs_v45/methods/updates_getDifference.md b/old_docs/API_docs_v45/methods/updates_getDifference.md index 53c7b078..9bcee79a 100644 --- a/old_docs/API_docs_v45/methods/updates_getDifference.md +++ b/old_docs/API_docs_v45/methods/updates_getDifference.md @@ -6,71 +6,8 @@ description: updates.getDifference parameters, return type and example [Back to methods index](index.md) -*You cannot use this method directly, see https://daniil.it/MadelineProto for more info on handling updates* +**You cannot use this method directly, see https://daniil.it/MadelineProto for more info on handling updates** -### Parameters: - -| Name | Type | Required | -|----------|:-------------:|---------:| -|pts|[int](../types/int.md) | Yes| -|date|[int](../types/int.md) | Yes| -|qts|[int](../types/int.md) | Yes| - - -### Return type: [updates\_Difference](../types/updates_Difference.md) - -### Example: - - -``` -$MadelineProto = new \danog\MadelineProto\API(); -if (isset($token)) { // Login as a bot - $MadelineProto->bot_login($token); -} -if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } - $MadelineProto->complete_phone_login($code); -} - -$updates_Difference = $MadelineProto->updates->getDifference(['pts' => int, 'date' => int, 'qts' => int, ]); -``` - -Or, if you're using the [PWRTelegram HTTP API](https://pwrtelegram.xyz): - -### As a bot: - -POST/GET to `https://api.pwrtelegram.xyz/botTOKEN/madeline` - -Parameters: - -* method - updates.getDifference -* params - `{"pts": int, "date": int, "qts": int, }` - - - -### As a user: - -POST/GET to `https://api.pwrtelegram.xyz/userTOKEN/updates.getDifference` - -Parameters: - -pts - Json encoded int -date - Json encoded int -qts - Json encoded int - - - -Or, if you're into Lua: - -``` -updates_Difference = updates.getDifference({pts=int, date=int, qts=int, }) -``` - diff --git a/old_docs/API_docs_v45/methods/updates_getState.md b/old_docs/API_docs_v45/methods/updates_getState.md index 51f6ae80..fd5955ba 100644 --- a/old_docs/API_docs_v45/methods/updates_getState.md +++ b/old_docs/API_docs_v45/methods/updates_getState.md @@ -6,61 +6,8 @@ description: updates.getState parameters, return type and example [Back to methods index](index.md) -*You cannot use this method directly, see https://daniil.it/MadelineProto for more info on handling updates* +**You cannot use this method directly, see https://daniil.it/MadelineProto for more info on handling updates** - - -### Return type: [updates\_State](../types/updates_State.md) - -### Example: - - -``` -$MadelineProto = new \danog\MadelineProto\API(); -if (isset($token)) { // Login as a bot - $MadelineProto->bot_login($token); -} -if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } - $MadelineProto->complete_phone_login($code); -} - -$updates_State = $MadelineProto->updates->getState(); -``` - -Or, if you're using the [PWRTelegram HTTP API](https://pwrtelegram.xyz): - -### As a bot: - -POST/GET to `https://api.pwrtelegram.xyz/botTOKEN/madeline` - -Parameters: - -* method - updates.getState -* params - `{}` - - - -### As a user: - -POST/GET to `https://api.pwrtelegram.xyz/userTOKEN/updates.getState` - -Parameters: - - - - -Or, if you're into Lua: - -``` -updates_State = updates.getState({}) -``` - diff --git a/old_docs/API_docs_v45/methods/upload_getFile.md b/old_docs/API_docs_v45/methods/upload_getFile.md index a1003003..add7d54e 100644 --- a/old_docs/API_docs_v45/methods/upload_getFile.md +++ b/old_docs/API_docs_v45/methods/upload_getFile.md @@ -6,71 +6,8 @@ description: upload.getFile parameters, return type and example [Back to methods index](index.md) -*You cannot use this method directly, use the upload, download_to_stream, download_to_file, download_to_dir methods instead; see https://daniil.it/MadelineProto for more info* +**You cannot use this method directly, use the upload, download_to_stream, download_to_file, download_to_dir methods instead; see https://daniil.it/MadelineProto for more info** -### Parameters: - -| Name | Type | Required | -|----------|:-------------:|---------:| -|location|[InputFileLocation](../types/InputFileLocation.md) | Yes| -|offset|[int](../types/int.md) | Yes| -|limit|[int](../types/int.md) | Yes| - - -### Return type: [upload\_File](../types/upload_File.md) - -### Example: - - -``` -$MadelineProto = new \danog\MadelineProto\API(); -if (isset($token)) { // Login as a bot - $MadelineProto->bot_login($token); -} -if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } - $MadelineProto->complete_phone_login($code); -} - -$upload_File = $MadelineProto->upload->getFile(['location' => InputFileLocation, 'offset' => int, 'limit' => int, ]); -``` - -Or, if you're using the [PWRTelegram HTTP API](https://pwrtelegram.xyz): - -### As a bot: - -POST/GET to `https://api.pwrtelegram.xyz/botTOKEN/madeline` - -Parameters: - -* method - upload.getFile -* params - `{"location": InputFileLocation, "offset": int, "limit": int, }` - - - -### As a user: - -POST/GET to `https://api.pwrtelegram.xyz/userTOKEN/upload.getFile` - -Parameters: - -location - Json encoded InputFileLocation -offset - Json encoded int -limit - Json encoded int - - - -Or, if you're into Lua: - -``` -upload_File = upload.getFile({location=InputFileLocation, offset=int, limit=int, }) -``` - diff --git a/old_docs/API_docs_v45/methods/upload_saveBigFilePart.md b/old_docs/API_docs_v45/methods/upload_saveBigFilePart.md index e5c96d89..b1c3ea28 100644 --- a/old_docs/API_docs_v45/methods/upload_saveBigFilePart.md +++ b/old_docs/API_docs_v45/methods/upload_saveBigFilePart.md @@ -6,73 +6,8 @@ description: upload.saveBigFilePart parameters, return type and example [Back to methods index](index.md) -*You cannot use this method directly, use the upload, download_to_stream, download_to_file, download_to_dir methods instead; see https://daniil.it/MadelineProto for more info* +**You cannot use this method directly, use the upload, download_to_stream, download_to_file, download_to_dir methods instead; see https://daniil.it/MadelineProto for more info** -### Parameters: - -| Name | Type | Required | -|----------|:-------------:|---------:| -|file\_id|[long](../types/long.md) | Yes| -|file\_part|[int](../types/int.md) | Yes| -|file\_total\_parts|[int](../types/int.md) | Yes| -|bytes|[bytes](../types/bytes.md) | Yes| - - -### Return type: [Bool](../types/Bool.md) - -### Example: - - -``` -$MadelineProto = new \danog\MadelineProto\API(); -if (isset($token)) { // Login as a bot - $MadelineProto->bot_login($token); -} -if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } - $MadelineProto->complete_phone_login($code); -} - -$Bool = $MadelineProto->upload->saveBigFilePart(['file_id' => long, 'file_part' => int, 'file_total_parts' => int, 'bytes' => 'bytes', ]); -``` - -Or, if you're using the [PWRTelegram HTTP API](https://pwrtelegram.xyz): - -### As a bot: - -POST/GET to `https://api.pwrtelegram.xyz/botTOKEN/madeline` - -Parameters: - -* method - upload.saveBigFilePart -* params - `{"file_id": long, "file_part": int, "file_total_parts": int, "bytes": "bytes", }` - - - -### As a user: - -POST/GET to `https://api.pwrtelegram.xyz/userTOKEN/upload.saveBigFilePart` - -Parameters: - -file_id - Json encoded long -file_part - Json encoded int -file_total_parts - Json encoded int -bytes - Json encoded bytes - - - -Or, if you're into Lua: - -``` -Bool = upload.saveBigFilePart({file_id=long, file_part=int, file_total_parts=int, bytes='bytes', }) -``` - diff --git a/old_docs/API_docs_v45/methods/upload_saveFilePart.md b/old_docs/API_docs_v45/methods/upload_saveFilePart.md index 1c16e4b2..c482f321 100644 --- a/old_docs/API_docs_v45/methods/upload_saveFilePart.md +++ b/old_docs/API_docs_v45/methods/upload_saveFilePart.md @@ -6,71 +6,8 @@ description: upload.saveFilePart parameters, return type and example [Back to methods index](index.md) -*You cannot use this method directly, use the upload, download_to_stream, download_to_file, download_to_dir methods instead; see https://daniil.it/MadelineProto for more info* +**You cannot use this method directly, use the upload, download_to_stream, download_to_file, download_to_dir methods instead; see https://daniil.it/MadelineProto for more info** -### Parameters: - -| Name | Type | Required | -|----------|:-------------:|---------:| -|file\_id|[long](../types/long.md) | Yes| -|file\_part|[int](../types/int.md) | Yes| -|bytes|[bytes](../types/bytes.md) | Yes| - - -### Return type: [Bool](../types/Bool.md) - -### Example: - - -``` -$MadelineProto = new \danog\MadelineProto\API(); -if (isset($token)) { // Login as a bot - $MadelineProto->bot_login($token); -} -if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } - $MadelineProto->complete_phone_login($code); -} - -$Bool = $MadelineProto->upload->saveFilePart(['file_id' => long, 'file_part' => int, 'bytes' => 'bytes', ]); -``` - -Or, if you're using the [PWRTelegram HTTP API](https://pwrtelegram.xyz): - -### As a bot: - -POST/GET to `https://api.pwrtelegram.xyz/botTOKEN/madeline` - -Parameters: - -* method - upload.saveFilePart -* params - `{"file_id": long, "file_part": int, "bytes": "bytes", }` - - - -### As a user: - -POST/GET to `https://api.pwrtelegram.xyz/userTOKEN/upload.saveFilePart` - -Parameters: - -file_id - Json encoded long -file_part - Json encoded int -bytes - Json encoded bytes - - - -Or, if you're into Lua: - -``` -Bool = upload.saveFilePart({file_id=long, file_part=int, bytes='bytes', }) -``` - diff --git a/old_docs/API_docs_v45/methods/users_getFullUser.md b/old_docs/API_docs_v45/methods/users_getFullUser.md index 645ab12e..4ec831ec 100644 --- a/old_docs/API_docs_v45/methods/users_getFullUser.md +++ b/old_docs/API_docs_v45/methods/users_getFullUser.md @@ -6,67 +6,8 @@ description: users.getFullUser parameters, return type and example [Back to methods index](index.md) -*You cannot use this method directly, use the get_pwr_chat, get_info, get_full_info methods instead (see https://daniil.it/MadelineProto for more info)* +**You cannot use this method directly, use the get_pwr_chat, get_info, get_full_info methods instead (see https://daniil.it/MadelineProto for more info)** -### Parameters: - -| Name | Type | Required | -|----------|:-------------:|---------:| -|id|[InputUser](../types/InputUser.md) | Yes| - - -### Return type: [UserFull](../types/UserFull.md) - -### Example: - - -``` -$MadelineProto = new \danog\MadelineProto\API(); -if (isset($token)) { // Login as a bot - $MadelineProto->bot_login($token); -} -if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } - $MadelineProto->complete_phone_login($code); -} - -$UserFull = $MadelineProto->users->getFullUser(['id' => InputUser, ]); -``` - -Or, if you're using the [PWRTelegram HTTP API](https://pwrtelegram.xyz): - -### As a bot: - -POST/GET to `https://api.pwrtelegram.xyz/botTOKEN/madeline` - -Parameters: - -* method - users.getFullUser -* params - `{"id": InputUser, }` - - - -### As a user: - -POST/GET to `https://api.pwrtelegram.xyz/userTOKEN/users.getFullUser` - -Parameters: - -id - Json encoded InputUser - - - -Or, if you're into Lua: - -``` -UserFull = users.getFullUser({id=InputUser, }) -``` - diff --git a/old_docs/API_docs_v46/constructors/README.md b/old_docs/API_docs_v46/constructors/README.md index 81b09798..67d941e7 100644 --- a/old_docs/API_docs_v46/constructors/README.md +++ b/old_docs/API_docs_v46/constructors/README.md @@ -4,9 +4,6 @@ description: List of constructors --- # Constructors [Back to API documentation index](..) - - - ***

[$accountDaysTTL](../constructors/accountDaysTTL.md) = \['days' => [int](../types/int.md), \]; diff --git a/old_docs/API_docs_v46/methods/auth_importBotAuthorization.md b/old_docs/API_docs_v46/methods/auth_importBotAuthorization.md index 0d8836b6..57521a13 100644 --- a/old_docs/API_docs_v46/methods/auth_importBotAuthorization.md +++ b/old_docs/API_docs_v46/methods/auth_importBotAuthorization.md @@ -6,71 +6,8 @@ description: auth.importBotAuthorization parameters, return type and example [Back to methods index](index.md) -*You cannot use this method directly, use the bot_login method instead (see https://daniil.it/MadelineProto for more info)* +**You cannot use this method directly, use the bot_login method instead (see https://daniil.it/MadelineProto for more info)** -### Parameters: - -| Name | Type | Required | -|----------|:-------------:|---------:| -|api\_id|[int](../types/int.md) | Yes| -|api\_hash|[string](../types/string.md) | Yes| -|bot\_auth\_token|[string](../types/string.md) | Yes| - - -### Return type: [auth\_Authorization](../types/auth_Authorization.md) - -### Example: - - -``` -$MadelineProto = new \danog\MadelineProto\API(); -if (isset($token)) { // Login as a bot - $MadelineProto->bot_login($token); -} -if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } - $MadelineProto->complete_phone_login($code); -} - -$auth_Authorization = $MadelineProto->auth->importBotAuthorization(['api_id' => int, 'api_hash' => 'string', 'bot_auth_token' => 'string', ]); -``` - -Or, if you're using the [PWRTelegram HTTP API](https://pwrtelegram.xyz): - -### As a bot: - -POST/GET to `https://api.pwrtelegram.xyz/botTOKEN/madeline` - -Parameters: - -* method - auth.importBotAuthorization -* params - `{"api_id": int, "api_hash": "string", "bot_auth_token": "string", }` - - - -### As a user: - -POST/GET to `https://api.pwrtelegram.xyz/userTOKEN/auth.importBotAuthorization` - -Parameters: - -api_id - Json encoded int -api_hash - Json encoded string -bot_auth_token - Json encoded string - - - -Or, if you're into Lua: - -``` -auth_Authorization = auth.importBotAuthorization({api_id=int, api_hash='string', bot_auth_token='string', }) -``` - diff --git a/old_docs/API_docs_v46/methods/auth_logOut.md b/old_docs/API_docs_v46/methods/auth_logOut.md index 12159bab..7d5bb3f7 100644 --- a/old_docs/API_docs_v46/methods/auth_logOut.md +++ b/old_docs/API_docs_v46/methods/auth_logOut.md @@ -6,61 +6,8 @@ description: auth.logOut parameters, return type and example [Back to methods index](index.md) -*You cannot use this method directly, use the logout method instead (see https://daniil.it/MadelineProto for more info)* +**You cannot use this method directly, use the logout method instead (see https://daniil.it/MadelineProto for more info)** - - -### Return type: [Bool](../types/Bool.md) - -### Example: - - -``` -$MadelineProto = new \danog\MadelineProto\API(); -if (isset($token)) { // Login as a bot - $MadelineProto->bot_login($token); -} -if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } - $MadelineProto->complete_phone_login($code); -} - -$Bool = $MadelineProto->auth->logOut(); -``` - -Or, if you're using the [PWRTelegram HTTP API](https://pwrtelegram.xyz): - -### As a bot: - -POST/GET to `https://api.pwrtelegram.xyz/botTOKEN/madeline` - -Parameters: - -* method - auth.logOut -* params - `{}` - - - -### As a user: - -POST/GET to `https://api.pwrtelegram.xyz/userTOKEN/auth.logOut` - -Parameters: - - - - -Or, if you're into Lua: - -``` -Bool = auth.logOut({}) -``` - diff --git a/old_docs/API_docs_v46/methods/auth_sendCode.md b/old_docs/API_docs_v46/methods/auth_sendCode.md index 43bc28ee..22d1df94 100644 --- a/old_docs/API_docs_v46/methods/auth_sendCode.md +++ b/old_docs/API_docs_v46/methods/auth_sendCode.md @@ -6,75 +6,8 @@ description: auth.sendCode parameters, return type and example [Back to methods index](index.md) -*You cannot use this method directly, use the phone_login method instead (see https://daniil.it/MadelineProto for more info)* +**You cannot use this method directly, use the phone_login method instead (see https://daniil.it/MadelineProto for more info)** -### Parameters: - -| Name | Type | Required | -|----------|:-------------:|---------:| -|phone\_number|[string](../types/string.md) | Yes| -|sms\_type|[int](../types/int.md) | Yes| -|api\_id|[int](../types/int.md) | Yes| -|api\_hash|[string](../types/string.md) | Yes| -|lang\_code|[string](../types/string.md) | Yes| - - -### Return type: [auth\_SentCode](../types/auth_SentCode.md) - -### Example: - - -``` -$MadelineProto = new \danog\MadelineProto\API(); -if (isset($token)) { // Login as a bot - $MadelineProto->bot_login($token); -} -if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } - $MadelineProto->complete_phone_login($code); -} - -$auth_SentCode = $MadelineProto->auth->sendCode(['phone_number' => 'string', 'sms_type' => int, 'api_id' => int, 'api_hash' => 'string', 'lang_code' => 'string', ]); -``` - -Or, if you're using the [PWRTelegram HTTP API](https://pwrtelegram.xyz): - -### As a bot: - -POST/GET to `https://api.pwrtelegram.xyz/botTOKEN/madeline` - -Parameters: - -* method - auth.sendCode -* params - `{"phone_number": "string", "sms_type": int, "api_id": int, "api_hash": "string", "lang_code": "string", }` - - - -### As a user: - -POST/GET to `https://api.pwrtelegram.xyz/userTOKEN/auth.sendCode` - -Parameters: - -phone_number - Json encoded string -sms_type - Json encoded int -api_id - Json encoded int -api_hash - Json encoded string -lang_code - Json encoded string - - - -Or, if you're into Lua: - -``` -auth_SentCode = auth.sendCode({phone_number='string', sms_type=int, api_id=int, api_hash='string', lang_code='string', }) -``` - diff --git a/old_docs/API_docs_v46/methods/auth_signIn.md b/old_docs/API_docs_v46/methods/auth_signIn.md index 75c50d70..ab40bb4d 100644 --- a/old_docs/API_docs_v46/methods/auth_signIn.md +++ b/old_docs/API_docs_v46/methods/auth_signIn.md @@ -6,71 +6,8 @@ description: auth.signIn parameters, return type and example [Back to methods index](index.md) -*You cannot use this method directly, use the complete_phone_login method instead (see https://daniil.it/MadelineProto for more info)* +**You cannot use this method directly, use the complete_phone_login method instead (see https://daniil.it/MadelineProto for more info)** -### Parameters: - -| Name | Type | Required | -|----------|:-------------:|---------:| -|phone\_number|[string](../types/string.md) | Yes| -|phone\_code\_hash|[string](../types/string.md) | Yes| -|phone\_code|[string](../types/string.md) | Yes| - - -### Return type: [auth\_Authorization](../types/auth_Authorization.md) - -### Example: - - -``` -$MadelineProto = new \danog\MadelineProto\API(); -if (isset($token)) { // Login as a bot - $MadelineProto->bot_login($token); -} -if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } - $MadelineProto->complete_phone_login($code); -} - -$auth_Authorization = $MadelineProto->auth->signIn(['phone_number' => 'string', 'phone_code_hash' => 'string', 'phone_code' => 'string', ]); -``` - -Or, if you're using the [PWRTelegram HTTP API](https://pwrtelegram.xyz): - -### As a bot: - -POST/GET to `https://api.pwrtelegram.xyz/botTOKEN/madeline` - -Parameters: - -* method - auth.signIn -* params - `{"phone_number": "string", "phone_code_hash": "string", "phone_code": "string", }` - - - -### As a user: - -POST/GET to `https://api.pwrtelegram.xyz/userTOKEN/auth.signIn` - -Parameters: - -phone_number - Json encoded string -phone_code_hash - Json encoded string -phone_code - Json encoded string - - - -Or, if you're into Lua: - -``` -auth_Authorization = auth.signIn({phone_number='string', phone_code_hash='string', phone_code='string', }) -``` - diff --git a/old_docs/API_docs_v46/methods/auth_signUp.md b/old_docs/API_docs_v46/methods/auth_signUp.md index f2a72b68..042d1191 100644 --- a/old_docs/API_docs_v46/methods/auth_signUp.md +++ b/old_docs/API_docs_v46/methods/auth_signUp.md @@ -6,75 +6,8 @@ description: auth.signUp parameters, return type and example [Back to methods index](index.md) -*You cannot use this method directly, use the complete_signup method instead (see https://daniil.it/MadelineProto for more info)* +**You cannot use this method directly, use the complete_signup method instead (see https://daniil.it/MadelineProto for more info)** -### Parameters: - -| Name | Type | Required | -|----------|:-------------:|---------:| -|phone\_number|[string](../types/string.md) | Yes| -|phone\_code\_hash|[string](../types/string.md) | Yes| -|phone\_code|[string](../types/string.md) | Yes| -|first\_name|[string](../types/string.md) | Yes| -|last\_name|[string](../types/string.md) | Yes| - - -### Return type: [auth\_Authorization](../types/auth_Authorization.md) - -### Example: - - -``` -$MadelineProto = new \danog\MadelineProto\API(); -if (isset($token)) { // Login as a bot - $MadelineProto->bot_login($token); -} -if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } - $MadelineProto->complete_phone_login($code); -} - -$auth_Authorization = $MadelineProto->auth->signUp(['phone_number' => 'string', 'phone_code_hash' => 'string', 'phone_code' => 'string', 'first_name' => 'string', 'last_name' => 'string', ]); -``` - -Or, if you're using the [PWRTelegram HTTP API](https://pwrtelegram.xyz): - -### As a bot: - -POST/GET to `https://api.pwrtelegram.xyz/botTOKEN/madeline` - -Parameters: - -* method - auth.signUp -* params - `{"phone_number": "string", "phone_code_hash": "string", "phone_code": "string", "first_name": "string", "last_name": "string", }` - - - -### As a user: - -POST/GET to `https://api.pwrtelegram.xyz/userTOKEN/auth.signUp` - -Parameters: - -phone_number - Json encoded string -phone_code_hash - Json encoded string -phone_code - Json encoded string -first_name - Json encoded string -last_name - Json encoded string - - - -Or, if you're into Lua: - -``` -auth_Authorization = auth.signUp({phone_number='string', phone_code_hash='string', phone_code='string', first_name='string', last_name='string', }) -``` - diff --git a/old_docs/API_docs_v46/methods/channels_getFullChannel.md b/old_docs/API_docs_v46/methods/channels_getFullChannel.md index 340efcfe..58dbe057 100644 --- a/old_docs/API_docs_v46/methods/channels_getFullChannel.md +++ b/old_docs/API_docs_v46/methods/channels_getFullChannel.md @@ -6,67 +6,8 @@ description: channels.getFullChannel parameters, return type and example [Back to methods index](index.md) -*You cannot use this method directly, use the get_pwr_chat, get_info, get_full_info methods instead (see https://daniil.it/MadelineProto for more info)* +**You cannot use this method directly, use the get_pwr_chat, get_info, get_full_info methods instead (see https://daniil.it/MadelineProto for more info)** -### Parameters: - -| Name | Type | Required | -|----------|:-------------:|---------:| -|channel|[InputChannel](../types/InputChannel.md) | Yes| - - -### Return type: [messages\_ChatFull](../types/messages_ChatFull.md) - -### Example: - - -``` -$MadelineProto = new \danog\MadelineProto\API(); -if (isset($token)) { // Login as a bot - $MadelineProto->bot_login($token); -} -if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } - $MadelineProto->complete_phone_login($code); -} - -$messages_ChatFull = $MadelineProto->channels->getFullChannel(['channel' => InputChannel, ]); -``` - -Or, if you're using the [PWRTelegram HTTP API](https://pwrtelegram.xyz): - -### As a bot: - -POST/GET to `https://api.pwrtelegram.xyz/botTOKEN/madeline` - -Parameters: - -* method - channels.getFullChannel -* params - `{"channel": InputChannel, }` - - - -### As a user: - -POST/GET to `https://api.pwrtelegram.xyz/userTOKEN/channels.getFullChannel` - -Parameters: - -channel - Json encoded InputChannel - - - -Or, if you're into Lua: - -``` -messages_ChatFull = channels.getFullChannel({channel=InputChannel, }) -``` - diff --git a/old_docs/API_docs_v46/methods/channels_getParticipants.md b/old_docs/API_docs_v46/methods/channels_getParticipants.md index 4c6e09cc..d84cf09c 100644 --- a/old_docs/API_docs_v46/methods/channels_getParticipants.md +++ b/old_docs/API_docs_v46/methods/channels_getParticipants.md @@ -6,73 +6,8 @@ description: channels.getParticipants parameters, return type and example [Back to methods index](index.md) -*You cannot use this method directly, use the get_pwr_chat, get_info, get_full_info methods instead (see https://daniil.it/MadelineProto for more info)* +**You cannot use this method directly, use the get_pwr_chat, get_info, get_full_info methods instead (see https://daniil.it/MadelineProto for more info)** -### Parameters: - -| Name | Type | Required | -|----------|:-------------:|---------:| -|channel|[InputChannel](../types/InputChannel.md) | Yes| -|filter|[ChannelParticipantsFilter](../types/ChannelParticipantsFilter.md) | Yes| -|offset|[int](../types/int.md) | Yes| -|limit|[int](../types/int.md) | Yes| - - -### Return type: [channels\_ChannelParticipants](../types/channels_ChannelParticipants.md) - -### Example: - - -``` -$MadelineProto = new \danog\MadelineProto\API(); -if (isset($token)) { // Login as a bot - $MadelineProto->bot_login($token); -} -if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } - $MadelineProto->complete_phone_login($code); -} - -$channels_ChannelParticipants = $MadelineProto->channels->getParticipants(['channel' => InputChannel, 'filter' => ChannelParticipantsFilter, 'offset' => int, 'limit' => int, ]); -``` - -Or, if you're using the [PWRTelegram HTTP API](https://pwrtelegram.xyz): - -### As a bot: - -POST/GET to `https://api.pwrtelegram.xyz/botTOKEN/madeline` - -Parameters: - -* method - channels.getParticipants -* params - `{"channel": InputChannel, "filter": ChannelParticipantsFilter, "offset": int, "limit": int, }` - - - -### As a user: - -POST/GET to `https://api.pwrtelegram.xyz/userTOKEN/channels.getParticipants` - -Parameters: - -channel - Json encoded InputChannel -filter - Json encoded ChannelParticipantsFilter -offset - Json encoded int -limit - Json encoded int - - - -Or, if you're into Lua: - -``` -channels_ChannelParticipants = channels.getParticipants({channel=InputChannel, filter=ChannelParticipantsFilter, offset=int, limit=int, }) -``` - diff --git a/old_docs/API_docs_v46/methods/contacts_resolveUsername.md b/old_docs/API_docs_v46/methods/contacts_resolveUsername.md index 90e72851..b665b382 100644 --- a/old_docs/API_docs_v46/methods/contacts_resolveUsername.md +++ b/old_docs/API_docs_v46/methods/contacts_resolveUsername.md @@ -6,67 +6,8 @@ description: contacts.resolveUsername parameters, return type and example [Back to methods index](index.md) -*You cannot use this method directly, use the resolve_username, get_pwr_chat, get_info, get_full_info methods instead (see https://daniil.it/MadelineProto for more info)* +**You cannot use this method directly, use the resolve_username, get_pwr_chat, get_info, get_full_info methods instead (see https://daniil.it/MadelineProto for more info)** -### Parameters: - -| Name | Type | Required | -|----------|:-------------:|---------:| -|username|[string](../types/string.md) | Yes| - - -### Return type: [contacts\_ResolvedPeer](../types/contacts_ResolvedPeer.md) - -### Example: - - -``` -$MadelineProto = new \danog\MadelineProto\API(); -if (isset($token)) { // Login as a bot - $MadelineProto->bot_login($token); -} -if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } - $MadelineProto->complete_phone_login($code); -} - -$contacts_ResolvedPeer = $MadelineProto->contacts->resolveUsername(['username' => 'string', ]); -``` - -Or, if you're using the [PWRTelegram HTTP API](https://pwrtelegram.xyz): - -### As a bot: - -POST/GET to `https://api.pwrtelegram.xyz/botTOKEN/madeline` - -Parameters: - -* method - contacts.resolveUsername -* params - `{"username": "string", }` - - - -### As a user: - -POST/GET to `https://api.pwrtelegram.xyz/userTOKEN/contacts.resolveUsername` - -Parameters: - -username - Json encoded string - - - -Or, if you're into Lua: - -``` -contacts_ResolvedPeer = contacts.resolveUsername({username='string', }) -``` - diff --git a/old_docs/API_docs_v46/methods/messages_acceptEncryption.md b/old_docs/API_docs_v46/methods/messages_acceptEncryption.md index 548087b6..243c4c00 100644 --- a/old_docs/API_docs_v46/methods/messages_acceptEncryption.md +++ b/old_docs/API_docs_v46/methods/messages_acceptEncryption.md @@ -6,71 +6,8 @@ description: messages.acceptEncryption parameters, return type and example [Back to methods index](index.md) -*You cannot use this method directly, see https://daniil.it/MadelineProto for more info on handling secret chats* +**You cannot use this method directly, see https://daniil.it/MadelineProto for more info on handling secret chats** -### Parameters: - -| Name | Type | Required | -|----------|:-------------:|---------:| -|peer|[InputEncryptedChat](../types/InputEncryptedChat.md) | Yes| -|g\_b|[bytes](../types/bytes.md) | Yes| -|key\_fingerprint|[long](../types/long.md) | Yes| - - -### Return type: [EncryptedChat](../types/EncryptedChat.md) - -### Example: - - -``` -$MadelineProto = new \danog\MadelineProto\API(); -if (isset($token)) { // Login as a bot - $MadelineProto->bot_login($token); -} -if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } - $MadelineProto->complete_phone_login($code); -} - -$EncryptedChat = $MadelineProto->messages->acceptEncryption(['peer' => InputEncryptedChat, 'g_b' => 'bytes', 'key_fingerprint' => long, ]); -``` - -Or, if you're using the [PWRTelegram HTTP API](https://pwrtelegram.xyz): - -### As a bot: - -POST/GET to `https://api.pwrtelegram.xyz/botTOKEN/madeline` - -Parameters: - -* method - messages.acceptEncryption -* params - `{"peer": InputEncryptedChat, "g_b": "bytes", "key_fingerprint": long, }` - - - -### As a user: - -POST/GET to `https://api.pwrtelegram.xyz/userTOKEN/messages.acceptEncryption` - -Parameters: - -peer - Json encoded InputEncryptedChat -g_b - Json encoded bytes -key_fingerprint - Json encoded long - - - -Or, if you're into Lua: - -``` -EncryptedChat = messages.acceptEncryption({peer=InputEncryptedChat, g_b='bytes', key_fingerprint=long, }) -``` - diff --git a/old_docs/API_docs_v46/methods/messages_discardEncryption.md b/old_docs/API_docs_v46/methods/messages_discardEncryption.md index 72648e9d..3a9dc58b 100644 --- a/old_docs/API_docs_v46/methods/messages_discardEncryption.md +++ b/old_docs/API_docs_v46/methods/messages_discardEncryption.md @@ -6,67 +6,8 @@ description: messages.discardEncryption parameters, return type and example [Back to methods index](index.md) -*You cannot use this method directly, see https://daniil.it/MadelineProto for more info on handling secret chats* +**You cannot use this method directly, see https://daniil.it/MadelineProto for more info on handling secret chats** -### Parameters: - -| Name | Type | Required | -|----------|:-------------:|---------:| -|chat\_id|[int](../types/int.md) | Yes| - - -### Return type: [Bool](../types/Bool.md) - -### Example: - - -``` -$MadelineProto = new \danog\MadelineProto\API(); -if (isset($token)) { // Login as a bot - $MadelineProto->bot_login($token); -} -if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } - $MadelineProto->complete_phone_login($code); -} - -$Bool = $MadelineProto->messages->discardEncryption(['chat_id' => int, ]); -``` - -Or, if you're using the [PWRTelegram HTTP API](https://pwrtelegram.xyz): - -### As a bot: - -POST/GET to `https://api.pwrtelegram.xyz/botTOKEN/madeline` - -Parameters: - -* method - messages.discardEncryption -* params - `{"chat_id": int, }` - - - -### As a user: - -POST/GET to `https://api.pwrtelegram.xyz/userTOKEN/messages.discardEncryption` - -Parameters: - -chat_id - Json encoded int - - - -Or, if you're into Lua: - -``` -Bool = messages.discardEncryption({chat_id=int, }) -``` - diff --git a/old_docs/API_docs_v46/methods/messages_getFullChat.md b/old_docs/API_docs_v46/methods/messages_getFullChat.md index 62102b64..ffa9c281 100644 --- a/old_docs/API_docs_v46/methods/messages_getFullChat.md +++ b/old_docs/API_docs_v46/methods/messages_getFullChat.md @@ -6,67 +6,8 @@ description: messages.getFullChat parameters, return type and example [Back to methods index](index.md) -*You cannot use this method directly, use the get_pwr_chat, get_info, get_full_info methods instead (see https://daniil.it/MadelineProto for more info)* +**You cannot use this method directly, use the get_pwr_chat, get_info, get_full_info methods instead (see https://daniil.it/MadelineProto for more info)** -### Parameters: - -| Name | Type | Required | -|----------|:-------------:|---------:| -|chat\_id|[InputPeer](../types/InputPeer.md) | Yes| - - -### Return type: [messages\_ChatFull](../types/messages_ChatFull.md) - -### Example: - - -``` -$MadelineProto = new \danog\MadelineProto\API(); -if (isset($token)) { // Login as a bot - $MadelineProto->bot_login($token); -} -if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } - $MadelineProto->complete_phone_login($code); -} - -$messages_ChatFull = $MadelineProto->messages->getFullChat(['chat_id' => InputPeer, ]); -``` - -Or, if you're using the [PWRTelegram HTTP API](https://pwrtelegram.xyz): - -### As a bot: - -POST/GET to `https://api.pwrtelegram.xyz/botTOKEN/madeline` - -Parameters: - -* method - messages.getFullChat -* params - `{"chat_id": InputPeer, }` - - - -### As a user: - -POST/GET to `https://api.pwrtelegram.xyz/userTOKEN/messages.getFullChat` - -Parameters: - -chat_id - Json encoded InputPeer - - - -Or, if you're into Lua: - -``` -messages_ChatFull = messages.getFullChat({chat_id=InputPeer, }) -``` - diff --git a/old_docs/API_docs_v46/methods/messages_requestEncryption.md b/old_docs/API_docs_v46/methods/messages_requestEncryption.md index 2fd1f825..c8476667 100644 --- a/old_docs/API_docs_v46/methods/messages_requestEncryption.md +++ b/old_docs/API_docs_v46/methods/messages_requestEncryption.md @@ -6,69 +6,8 @@ description: messages.requestEncryption parameters, return type and example [Back to methods index](index.md) -*You cannot use this method directly, see https://daniil.it/MadelineProto for more info on handling secret chats* +**You cannot use this method directly, see https://daniil.it/MadelineProto for more info on handling secret chats** -### Parameters: - -| Name | Type | Required | -|----------|:-------------:|---------:| -|user\_id|[InputUser](../types/InputUser.md) | Yes| -|g\_a|[bytes](../types/bytes.md) | Yes| - - -### Return type: [EncryptedChat](../types/EncryptedChat.md) - -### Example: - - -``` -$MadelineProto = new \danog\MadelineProto\API(); -if (isset($token)) { // Login as a bot - $MadelineProto->bot_login($token); -} -if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } - $MadelineProto->complete_phone_login($code); -} - -$EncryptedChat = $MadelineProto->messages->requestEncryption(['user_id' => InputUser, 'g_a' => 'bytes', ]); -``` - -Or, if you're using the [PWRTelegram HTTP API](https://pwrtelegram.xyz): - -### As a bot: - -POST/GET to `https://api.pwrtelegram.xyz/botTOKEN/madeline` - -Parameters: - -* method - messages.requestEncryption -* params - `{"user_id": InputUser, "g_a": "bytes", }` - - - -### As a user: - -POST/GET to `https://api.pwrtelegram.xyz/userTOKEN/messages.requestEncryption` - -Parameters: - -user_id - Json encoded InputUser -g_a - Json encoded bytes - - - -Or, if you're into Lua: - -``` -EncryptedChat = messages.requestEncryption({user_id=InputUser, g_a='bytes', }) -``` - diff --git a/old_docs/API_docs_v46/methods/updates_getChannelDifference.md b/old_docs/API_docs_v46/methods/updates_getChannelDifference.md index 51ea7aa5..2e69d1cd 100644 --- a/old_docs/API_docs_v46/methods/updates_getChannelDifference.md +++ b/old_docs/API_docs_v46/methods/updates_getChannelDifference.md @@ -6,73 +6,8 @@ description: updates.getChannelDifference parameters, return type and example [Back to methods index](index.md) -*You cannot use this method directly, see https://daniil.it/MadelineProto for more info on handling updates* +**You cannot use this method directly, see https://daniil.it/MadelineProto for more info on handling updates** -### Parameters: - -| Name | Type | Required | -|----------|:-------------:|---------:| -|channel|[InputChannel](../types/InputChannel.md) | Yes| -|filter|[ChannelMessagesFilter](../types/ChannelMessagesFilter.md) | Yes| -|pts|[int](../types/int.md) | Yes| -|limit|[int](../types/int.md) | Yes| - - -### Return type: [updates\_ChannelDifference](../types/updates_ChannelDifference.md) - -### Example: - - -``` -$MadelineProto = new \danog\MadelineProto\API(); -if (isset($token)) { // Login as a bot - $MadelineProto->bot_login($token); -} -if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } - $MadelineProto->complete_phone_login($code); -} - -$updates_ChannelDifference = $MadelineProto->updates->getChannelDifference(['channel' => InputChannel, 'filter' => ChannelMessagesFilter, 'pts' => int, 'limit' => int, ]); -``` - -Or, if you're using the [PWRTelegram HTTP API](https://pwrtelegram.xyz): - -### As a bot: - -POST/GET to `https://api.pwrtelegram.xyz/botTOKEN/madeline` - -Parameters: - -* method - updates.getChannelDifference -* params - `{"channel": InputChannel, "filter": ChannelMessagesFilter, "pts": int, "limit": int, }` - - - -### As a user: - -POST/GET to `https://api.pwrtelegram.xyz/userTOKEN/updates.getChannelDifference` - -Parameters: - -channel - Json encoded InputChannel -filter - Json encoded ChannelMessagesFilter -pts - Json encoded int -limit - Json encoded int - - - -Or, if you're into Lua: - -``` -updates_ChannelDifference = updates.getChannelDifference({channel=InputChannel, filter=ChannelMessagesFilter, pts=int, limit=int, }) -``` - diff --git a/old_docs/API_docs_v46/methods/updates_getDifference.md b/old_docs/API_docs_v46/methods/updates_getDifference.md index 53c7b078..9bcee79a 100644 --- a/old_docs/API_docs_v46/methods/updates_getDifference.md +++ b/old_docs/API_docs_v46/methods/updates_getDifference.md @@ -6,71 +6,8 @@ description: updates.getDifference parameters, return type and example [Back to methods index](index.md) -*You cannot use this method directly, see https://daniil.it/MadelineProto for more info on handling updates* +**You cannot use this method directly, see https://daniil.it/MadelineProto for more info on handling updates** -### Parameters: - -| Name | Type | Required | -|----------|:-------------:|---------:| -|pts|[int](../types/int.md) | Yes| -|date|[int](../types/int.md) | Yes| -|qts|[int](../types/int.md) | Yes| - - -### Return type: [updates\_Difference](../types/updates_Difference.md) - -### Example: - - -``` -$MadelineProto = new \danog\MadelineProto\API(); -if (isset($token)) { // Login as a bot - $MadelineProto->bot_login($token); -} -if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } - $MadelineProto->complete_phone_login($code); -} - -$updates_Difference = $MadelineProto->updates->getDifference(['pts' => int, 'date' => int, 'qts' => int, ]); -``` - -Or, if you're using the [PWRTelegram HTTP API](https://pwrtelegram.xyz): - -### As a bot: - -POST/GET to `https://api.pwrtelegram.xyz/botTOKEN/madeline` - -Parameters: - -* method - updates.getDifference -* params - `{"pts": int, "date": int, "qts": int, }` - - - -### As a user: - -POST/GET to `https://api.pwrtelegram.xyz/userTOKEN/updates.getDifference` - -Parameters: - -pts - Json encoded int -date - Json encoded int -qts - Json encoded int - - - -Or, if you're into Lua: - -``` -updates_Difference = updates.getDifference({pts=int, date=int, qts=int, }) -``` - diff --git a/old_docs/API_docs_v46/methods/updates_getState.md b/old_docs/API_docs_v46/methods/updates_getState.md index 51f6ae80..fd5955ba 100644 --- a/old_docs/API_docs_v46/methods/updates_getState.md +++ b/old_docs/API_docs_v46/methods/updates_getState.md @@ -6,61 +6,8 @@ description: updates.getState parameters, return type and example [Back to methods index](index.md) -*You cannot use this method directly, see https://daniil.it/MadelineProto for more info on handling updates* +**You cannot use this method directly, see https://daniil.it/MadelineProto for more info on handling updates** - - -### Return type: [updates\_State](../types/updates_State.md) - -### Example: - - -``` -$MadelineProto = new \danog\MadelineProto\API(); -if (isset($token)) { // Login as a bot - $MadelineProto->bot_login($token); -} -if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } - $MadelineProto->complete_phone_login($code); -} - -$updates_State = $MadelineProto->updates->getState(); -``` - -Or, if you're using the [PWRTelegram HTTP API](https://pwrtelegram.xyz): - -### As a bot: - -POST/GET to `https://api.pwrtelegram.xyz/botTOKEN/madeline` - -Parameters: - -* method - updates.getState -* params - `{}` - - - -### As a user: - -POST/GET to `https://api.pwrtelegram.xyz/userTOKEN/updates.getState` - -Parameters: - - - - -Or, if you're into Lua: - -``` -updates_State = updates.getState({}) -``` - diff --git a/old_docs/API_docs_v46/methods/upload_getFile.md b/old_docs/API_docs_v46/methods/upload_getFile.md index a1003003..add7d54e 100644 --- a/old_docs/API_docs_v46/methods/upload_getFile.md +++ b/old_docs/API_docs_v46/methods/upload_getFile.md @@ -6,71 +6,8 @@ description: upload.getFile parameters, return type and example [Back to methods index](index.md) -*You cannot use this method directly, use the upload, download_to_stream, download_to_file, download_to_dir methods instead; see https://daniil.it/MadelineProto for more info* +**You cannot use this method directly, use the upload, download_to_stream, download_to_file, download_to_dir methods instead; see https://daniil.it/MadelineProto for more info** -### Parameters: - -| Name | Type | Required | -|----------|:-------------:|---------:| -|location|[InputFileLocation](../types/InputFileLocation.md) | Yes| -|offset|[int](../types/int.md) | Yes| -|limit|[int](../types/int.md) | Yes| - - -### Return type: [upload\_File](../types/upload_File.md) - -### Example: - - -``` -$MadelineProto = new \danog\MadelineProto\API(); -if (isset($token)) { // Login as a bot - $MadelineProto->bot_login($token); -} -if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } - $MadelineProto->complete_phone_login($code); -} - -$upload_File = $MadelineProto->upload->getFile(['location' => InputFileLocation, 'offset' => int, 'limit' => int, ]); -``` - -Or, if you're using the [PWRTelegram HTTP API](https://pwrtelegram.xyz): - -### As a bot: - -POST/GET to `https://api.pwrtelegram.xyz/botTOKEN/madeline` - -Parameters: - -* method - upload.getFile -* params - `{"location": InputFileLocation, "offset": int, "limit": int, }` - - - -### As a user: - -POST/GET to `https://api.pwrtelegram.xyz/userTOKEN/upload.getFile` - -Parameters: - -location - Json encoded InputFileLocation -offset - Json encoded int -limit - Json encoded int - - - -Or, if you're into Lua: - -``` -upload_File = upload.getFile({location=InputFileLocation, offset=int, limit=int, }) -``` - diff --git a/old_docs/API_docs_v46/methods/upload_saveBigFilePart.md b/old_docs/API_docs_v46/methods/upload_saveBigFilePart.md index e5c96d89..b1c3ea28 100644 --- a/old_docs/API_docs_v46/methods/upload_saveBigFilePart.md +++ b/old_docs/API_docs_v46/methods/upload_saveBigFilePart.md @@ -6,73 +6,8 @@ description: upload.saveBigFilePart parameters, return type and example [Back to methods index](index.md) -*You cannot use this method directly, use the upload, download_to_stream, download_to_file, download_to_dir methods instead; see https://daniil.it/MadelineProto for more info* +**You cannot use this method directly, use the upload, download_to_stream, download_to_file, download_to_dir methods instead; see https://daniil.it/MadelineProto for more info** -### Parameters: - -| Name | Type | Required | -|----------|:-------------:|---------:| -|file\_id|[long](../types/long.md) | Yes| -|file\_part|[int](../types/int.md) | Yes| -|file\_total\_parts|[int](../types/int.md) | Yes| -|bytes|[bytes](../types/bytes.md) | Yes| - - -### Return type: [Bool](../types/Bool.md) - -### Example: - - -``` -$MadelineProto = new \danog\MadelineProto\API(); -if (isset($token)) { // Login as a bot - $MadelineProto->bot_login($token); -} -if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } - $MadelineProto->complete_phone_login($code); -} - -$Bool = $MadelineProto->upload->saveBigFilePart(['file_id' => long, 'file_part' => int, 'file_total_parts' => int, 'bytes' => 'bytes', ]); -``` - -Or, if you're using the [PWRTelegram HTTP API](https://pwrtelegram.xyz): - -### As a bot: - -POST/GET to `https://api.pwrtelegram.xyz/botTOKEN/madeline` - -Parameters: - -* method - upload.saveBigFilePart -* params - `{"file_id": long, "file_part": int, "file_total_parts": int, "bytes": "bytes", }` - - - -### As a user: - -POST/GET to `https://api.pwrtelegram.xyz/userTOKEN/upload.saveBigFilePart` - -Parameters: - -file_id - Json encoded long -file_part - Json encoded int -file_total_parts - Json encoded int -bytes - Json encoded bytes - - - -Or, if you're into Lua: - -``` -Bool = upload.saveBigFilePart({file_id=long, file_part=int, file_total_parts=int, bytes='bytes', }) -``` - diff --git a/old_docs/API_docs_v46/methods/upload_saveFilePart.md b/old_docs/API_docs_v46/methods/upload_saveFilePart.md index 1c16e4b2..c482f321 100644 --- a/old_docs/API_docs_v46/methods/upload_saveFilePart.md +++ b/old_docs/API_docs_v46/methods/upload_saveFilePart.md @@ -6,71 +6,8 @@ description: upload.saveFilePart parameters, return type and example [Back to methods index](index.md) -*You cannot use this method directly, use the upload, download_to_stream, download_to_file, download_to_dir methods instead; see https://daniil.it/MadelineProto for more info* +**You cannot use this method directly, use the upload, download_to_stream, download_to_file, download_to_dir methods instead; see https://daniil.it/MadelineProto for more info** -### Parameters: - -| Name | Type | Required | -|----------|:-------------:|---------:| -|file\_id|[long](../types/long.md) | Yes| -|file\_part|[int](../types/int.md) | Yes| -|bytes|[bytes](../types/bytes.md) | Yes| - - -### Return type: [Bool](../types/Bool.md) - -### Example: - - -``` -$MadelineProto = new \danog\MadelineProto\API(); -if (isset($token)) { // Login as a bot - $MadelineProto->bot_login($token); -} -if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } - $MadelineProto->complete_phone_login($code); -} - -$Bool = $MadelineProto->upload->saveFilePart(['file_id' => long, 'file_part' => int, 'bytes' => 'bytes', ]); -``` - -Or, if you're using the [PWRTelegram HTTP API](https://pwrtelegram.xyz): - -### As a bot: - -POST/GET to `https://api.pwrtelegram.xyz/botTOKEN/madeline` - -Parameters: - -* method - upload.saveFilePart -* params - `{"file_id": long, "file_part": int, "bytes": "bytes", }` - - - -### As a user: - -POST/GET to `https://api.pwrtelegram.xyz/userTOKEN/upload.saveFilePart` - -Parameters: - -file_id - Json encoded long -file_part - Json encoded int -bytes - Json encoded bytes - - - -Or, if you're into Lua: - -``` -Bool = upload.saveFilePart({file_id=long, file_part=int, bytes='bytes', }) -``` - diff --git a/old_docs/API_docs_v46/methods/users_getFullUser.md b/old_docs/API_docs_v46/methods/users_getFullUser.md index 645ab12e..4ec831ec 100644 --- a/old_docs/API_docs_v46/methods/users_getFullUser.md +++ b/old_docs/API_docs_v46/methods/users_getFullUser.md @@ -6,67 +6,8 @@ description: users.getFullUser parameters, return type and example [Back to methods index](index.md) -*You cannot use this method directly, use the get_pwr_chat, get_info, get_full_info methods instead (see https://daniil.it/MadelineProto for more info)* +**You cannot use this method directly, use the get_pwr_chat, get_info, get_full_info methods instead (see https://daniil.it/MadelineProto for more info)** -### Parameters: - -| Name | Type | Required | -|----------|:-------------:|---------:| -|id|[InputUser](../types/InputUser.md) | Yes| - - -### Return type: [UserFull](../types/UserFull.md) - -### Example: - - -``` -$MadelineProto = new \danog\MadelineProto\API(); -if (isset($token)) { // Login as a bot - $MadelineProto->bot_login($token); -} -if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } - $MadelineProto->complete_phone_login($code); -} - -$UserFull = $MadelineProto->users->getFullUser(['id' => InputUser, ]); -``` - -Or, if you're using the [PWRTelegram HTTP API](https://pwrtelegram.xyz): - -### As a bot: - -POST/GET to `https://api.pwrtelegram.xyz/botTOKEN/madeline` - -Parameters: - -* method - users.getFullUser -* params - `{"id": InputUser, }` - - - -### As a user: - -POST/GET to `https://api.pwrtelegram.xyz/userTOKEN/users.getFullUser` - -Parameters: - -id - Json encoded InputUser - - - -Or, if you're into Lua: - -``` -UserFull = users.getFullUser({id=InputUser, }) -``` - diff --git a/old_docs/API_docs_v51/constructors/README.md b/old_docs/API_docs_v51/constructors/README.md index 199c092a..3ed1cdf4 100644 --- a/old_docs/API_docs_v51/constructors/README.md +++ b/old_docs/API_docs_v51/constructors/README.md @@ -4,9 +4,6 @@ description: List of constructors --- # Constructors [Back to API documentation index](..) - - - ***

[$accountDaysTTL](../constructors/accountDaysTTL.md) = \['days' => [int](../types/int.md), \]; diff --git a/old_docs/API_docs_v51/methods/auth_importBotAuthorization.md b/old_docs/API_docs_v51/methods/auth_importBotAuthorization.md index 0d8836b6..57521a13 100644 --- a/old_docs/API_docs_v51/methods/auth_importBotAuthorization.md +++ b/old_docs/API_docs_v51/methods/auth_importBotAuthorization.md @@ -6,71 +6,8 @@ description: auth.importBotAuthorization parameters, return type and example [Back to methods index](index.md) -*You cannot use this method directly, use the bot_login method instead (see https://daniil.it/MadelineProto for more info)* +**You cannot use this method directly, use the bot_login method instead (see https://daniil.it/MadelineProto for more info)** -### Parameters: - -| Name | Type | Required | -|----------|:-------------:|---------:| -|api\_id|[int](../types/int.md) | Yes| -|api\_hash|[string](../types/string.md) | Yes| -|bot\_auth\_token|[string](../types/string.md) | Yes| - - -### Return type: [auth\_Authorization](../types/auth_Authorization.md) - -### Example: - - -``` -$MadelineProto = new \danog\MadelineProto\API(); -if (isset($token)) { // Login as a bot - $MadelineProto->bot_login($token); -} -if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } - $MadelineProto->complete_phone_login($code); -} - -$auth_Authorization = $MadelineProto->auth->importBotAuthorization(['api_id' => int, 'api_hash' => 'string', 'bot_auth_token' => 'string', ]); -``` - -Or, if you're using the [PWRTelegram HTTP API](https://pwrtelegram.xyz): - -### As a bot: - -POST/GET to `https://api.pwrtelegram.xyz/botTOKEN/madeline` - -Parameters: - -* method - auth.importBotAuthorization -* params - `{"api_id": int, "api_hash": "string", "bot_auth_token": "string", }` - - - -### As a user: - -POST/GET to `https://api.pwrtelegram.xyz/userTOKEN/auth.importBotAuthorization` - -Parameters: - -api_id - Json encoded int -api_hash - Json encoded string -bot_auth_token - Json encoded string - - - -Or, if you're into Lua: - -``` -auth_Authorization = auth.importBotAuthorization({api_id=int, api_hash='string', bot_auth_token='string', }) -``` - diff --git a/old_docs/API_docs_v51/methods/auth_logOut.md b/old_docs/API_docs_v51/methods/auth_logOut.md index 12159bab..7d5bb3f7 100644 --- a/old_docs/API_docs_v51/methods/auth_logOut.md +++ b/old_docs/API_docs_v51/methods/auth_logOut.md @@ -6,61 +6,8 @@ description: auth.logOut parameters, return type and example [Back to methods index](index.md) -*You cannot use this method directly, use the logout method instead (see https://daniil.it/MadelineProto for more info)* +**You cannot use this method directly, use the logout method instead (see https://daniil.it/MadelineProto for more info)** - - -### Return type: [Bool](../types/Bool.md) - -### Example: - - -``` -$MadelineProto = new \danog\MadelineProto\API(); -if (isset($token)) { // Login as a bot - $MadelineProto->bot_login($token); -} -if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } - $MadelineProto->complete_phone_login($code); -} - -$Bool = $MadelineProto->auth->logOut(); -``` - -Or, if you're using the [PWRTelegram HTTP API](https://pwrtelegram.xyz): - -### As a bot: - -POST/GET to `https://api.pwrtelegram.xyz/botTOKEN/madeline` - -Parameters: - -* method - auth.logOut -* params - `{}` - - - -### As a user: - -POST/GET to `https://api.pwrtelegram.xyz/userTOKEN/auth.logOut` - -Parameters: - - - - -Or, if you're into Lua: - -``` -Bool = auth.logOut({}) -``` - diff --git a/old_docs/API_docs_v51/methods/auth_sendCode.md b/old_docs/API_docs_v51/methods/auth_sendCode.md index 469f0f2c..22d1df94 100644 --- a/old_docs/API_docs_v51/methods/auth_sendCode.md +++ b/old_docs/API_docs_v51/methods/auth_sendCode.md @@ -6,77 +6,8 @@ description: auth.sendCode parameters, return type and example [Back to methods index](index.md) -*You cannot use this method directly, use the phone_login method instead (see https://daniil.it/MadelineProto for more info)* +**You cannot use this method directly, use the phone_login method instead (see https://daniil.it/MadelineProto for more info)** -### Parameters: - -| Name | Type | Required | -|----------|:-------------:|---------:| -|allow\_flashcall|[Bool](../types/Bool.md) | Optional| -|phone\_number|[string](../types/string.md) | Yes| -|current\_number|[Bool](../types/Bool.md) | Optional| -|api\_id|[int](../types/int.md) | Yes| -|api\_hash|[string](../types/string.md) | Yes| -|lang\_code|[string](../types/string.md) | Yes| - - -### Return type: [auth\_SentCode](../types/auth_SentCode.md) - -### Example: - - -``` -$MadelineProto = new \danog\MadelineProto\API(); -if (isset($token)) { // Login as a bot - $MadelineProto->bot_login($token); -} -if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } - $MadelineProto->complete_phone_login($code); -} - -$auth_SentCode = $MadelineProto->auth->sendCode(['allow_flashcall' => Bool, 'phone_number' => 'string', 'current_number' => Bool, 'api_id' => int, 'api_hash' => 'string', 'lang_code' => 'string', ]); -``` - -Or, if you're using the [PWRTelegram HTTP API](https://pwrtelegram.xyz): - -### As a bot: - -POST/GET to `https://api.pwrtelegram.xyz/botTOKEN/madeline` - -Parameters: - -* method - auth.sendCode -* params - `{"allow_flashcall": Bool, "phone_number": "string", "current_number": Bool, "api_id": int, "api_hash": "string", "lang_code": "string", }` - - - -### As a user: - -POST/GET to `https://api.pwrtelegram.xyz/userTOKEN/auth.sendCode` - -Parameters: - -allow_flashcall - Json encoded Bool -phone_number - Json encoded string -current_number - Json encoded Bool -api_id - Json encoded int -api_hash - Json encoded string -lang_code - Json encoded string - - - -Or, if you're into Lua: - -``` -auth_SentCode = auth.sendCode({allow_flashcall=Bool, phone_number='string', current_number=Bool, api_id=int, api_hash='string', lang_code='string', }) -``` - diff --git a/old_docs/API_docs_v51/methods/auth_signIn.md b/old_docs/API_docs_v51/methods/auth_signIn.md index 75c50d70..ab40bb4d 100644 --- a/old_docs/API_docs_v51/methods/auth_signIn.md +++ b/old_docs/API_docs_v51/methods/auth_signIn.md @@ -6,71 +6,8 @@ description: auth.signIn parameters, return type and example [Back to methods index](index.md) -*You cannot use this method directly, use the complete_phone_login method instead (see https://daniil.it/MadelineProto for more info)* +**You cannot use this method directly, use the complete_phone_login method instead (see https://daniil.it/MadelineProto for more info)** -### Parameters: - -| Name | Type | Required | -|----------|:-------------:|---------:| -|phone\_number|[string](../types/string.md) | Yes| -|phone\_code\_hash|[string](../types/string.md) | Yes| -|phone\_code|[string](../types/string.md) | Yes| - - -### Return type: [auth\_Authorization](../types/auth_Authorization.md) - -### Example: - - -``` -$MadelineProto = new \danog\MadelineProto\API(); -if (isset($token)) { // Login as a bot - $MadelineProto->bot_login($token); -} -if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } - $MadelineProto->complete_phone_login($code); -} - -$auth_Authorization = $MadelineProto->auth->signIn(['phone_number' => 'string', 'phone_code_hash' => 'string', 'phone_code' => 'string', ]); -``` - -Or, if you're using the [PWRTelegram HTTP API](https://pwrtelegram.xyz): - -### As a bot: - -POST/GET to `https://api.pwrtelegram.xyz/botTOKEN/madeline` - -Parameters: - -* method - auth.signIn -* params - `{"phone_number": "string", "phone_code_hash": "string", "phone_code": "string", }` - - - -### As a user: - -POST/GET to `https://api.pwrtelegram.xyz/userTOKEN/auth.signIn` - -Parameters: - -phone_number - Json encoded string -phone_code_hash - Json encoded string -phone_code - Json encoded string - - - -Or, if you're into Lua: - -``` -auth_Authorization = auth.signIn({phone_number='string', phone_code_hash='string', phone_code='string', }) -``` - diff --git a/old_docs/API_docs_v51/methods/auth_signUp.md b/old_docs/API_docs_v51/methods/auth_signUp.md index f2a72b68..042d1191 100644 --- a/old_docs/API_docs_v51/methods/auth_signUp.md +++ b/old_docs/API_docs_v51/methods/auth_signUp.md @@ -6,75 +6,8 @@ description: auth.signUp parameters, return type and example [Back to methods index](index.md) -*You cannot use this method directly, use the complete_signup method instead (see https://daniil.it/MadelineProto for more info)* +**You cannot use this method directly, use the complete_signup method instead (see https://daniil.it/MadelineProto for more info)** -### Parameters: - -| Name | Type | Required | -|----------|:-------------:|---------:| -|phone\_number|[string](../types/string.md) | Yes| -|phone\_code\_hash|[string](../types/string.md) | Yes| -|phone\_code|[string](../types/string.md) | Yes| -|first\_name|[string](../types/string.md) | Yes| -|last\_name|[string](../types/string.md) | Yes| - - -### Return type: [auth\_Authorization](../types/auth_Authorization.md) - -### Example: - - -``` -$MadelineProto = new \danog\MadelineProto\API(); -if (isset($token)) { // Login as a bot - $MadelineProto->bot_login($token); -} -if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } - $MadelineProto->complete_phone_login($code); -} - -$auth_Authorization = $MadelineProto->auth->signUp(['phone_number' => 'string', 'phone_code_hash' => 'string', 'phone_code' => 'string', 'first_name' => 'string', 'last_name' => 'string', ]); -``` - -Or, if you're using the [PWRTelegram HTTP API](https://pwrtelegram.xyz): - -### As a bot: - -POST/GET to `https://api.pwrtelegram.xyz/botTOKEN/madeline` - -Parameters: - -* method - auth.signUp -* params - `{"phone_number": "string", "phone_code_hash": "string", "phone_code": "string", "first_name": "string", "last_name": "string", }` - - - -### As a user: - -POST/GET to `https://api.pwrtelegram.xyz/userTOKEN/auth.signUp` - -Parameters: - -phone_number - Json encoded string -phone_code_hash - Json encoded string -phone_code - Json encoded string -first_name - Json encoded string -last_name - Json encoded string - - - -Or, if you're into Lua: - -``` -auth_Authorization = auth.signUp({phone_number='string', phone_code_hash='string', phone_code='string', first_name='string', last_name='string', }) -``` - diff --git a/old_docs/API_docs_v51/methods/channels_getFullChannel.md b/old_docs/API_docs_v51/methods/channels_getFullChannel.md index 340efcfe..58dbe057 100644 --- a/old_docs/API_docs_v51/methods/channels_getFullChannel.md +++ b/old_docs/API_docs_v51/methods/channels_getFullChannel.md @@ -6,67 +6,8 @@ description: channels.getFullChannel parameters, return type and example [Back to methods index](index.md) -*You cannot use this method directly, use the get_pwr_chat, get_info, get_full_info methods instead (see https://daniil.it/MadelineProto for more info)* +**You cannot use this method directly, use the get_pwr_chat, get_info, get_full_info methods instead (see https://daniil.it/MadelineProto for more info)** -### Parameters: - -| Name | Type | Required | -|----------|:-------------:|---------:| -|channel|[InputChannel](../types/InputChannel.md) | Yes| - - -### Return type: [messages\_ChatFull](../types/messages_ChatFull.md) - -### Example: - - -``` -$MadelineProto = new \danog\MadelineProto\API(); -if (isset($token)) { // Login as a bot - $MadelineProto->bot_login($token); -} -if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } - $MadelineProto->complete_phone_login($code); -} - -$messages_ChatFull = $MadelineProto->channels->getFullChannel(['channel' => InputChannel, ]); -``` - -Or, if you're using the [PWRTelegram HTTP API](https://pwrtelegram.xyz): - -### As a bot: - -POST/GET to `https://api.pwrtelegram.xyz/botTOKEN/madeline` - -Parameters: - -* method - channels.getFullChannel -* params - `{"channel": InputChannel, }` - - - -### As a user: - -POST/GET to `https://api.pwrtelegram.xyz/userTOKEN/channels.getFullChannel` - -Parameters: - -channel - Json encoded InputChannel - - - -Or, if you're into Lua: - -``` -messages_ChatFull = channels.getFullChannel({channel=InputChannel, }) -``` - diff --git a/old_docs/API_docs_v51/methods/channels_getParticipants.md b/old_docs/API_docs_v51/methods/channels_getParticipants.md index 4c6e09cc..d84cf09c 100644 --- a/old_docs/API_docs_v51/methods/channels_getParticipants.md +++ b/old_docs/API_docs_v51/methods/channels_getParticipants.md @@ -6,73 +6,8 @@ description: channels.getParticipants parameters, return type and example [Back to methods index](index.md) -*You cannot use this method directly, use the get_pwr_chat, get_info, get_full_info methods instead (see https://daniil.it/MadelineProto for more info)* +**You cannot use this method directly, use the get_pwr_chat, get_info, get_full_info methods instead (see https://daniil.it/MadelineProto for more info)** -### Parameters: - -| Name | Type | Required | -|----------|:-------------:|---------:| -|channel|[InputChannel](../types/InputChannel.md) | Yes| -|filter|[ChannelParticipantsFilter](../types/ChannelParticipantsFilter.md) | Yes| -|offset|[int](../types/int.md) | Yes| -|limit|[int](../types/int.md) | Yes| - - -### Return type: [channels\_ChannelParticipants](../types/channels_ChannelParticipants.md) - -### Example: - - -``` -$MadelineProto = new \danog\MadelineProto\API(); -if (isset($token)) { // Login as a bot - $MadelineProto->bot_login($token); -} -if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } - $MadelineProto->complete_phone_login($code); -} - -$channels_ChannelParticipants = $MadelineProto->channels->getParticipants(['channel' => InputChannel, 'filter' => ChannelParticipantsFilter, 'offset' => int, 'limit' => int, ]); -``` - -Or, if you're using the [PWRTelegram HTTP API](https://pwrtelegram.xyz): - -### As a bot: - -POST/GET to `https://api.pwrtelegram.xyz/botTOKEN/madeline` - -Parameters: - -* method - channels.getParticipants -* params - `{"channel": InputChannel, "filter": ChannelParticipantsFilter, "offset": int, "limit": int, }` - - - -### As a user: - -POST/GET to `https://api.pwrtelegram.xyz/userTOKEN/channels.getParticipants` - -Parameters: - -channel - Json encoded InputChannel -filter - Json encoded ChannelParticipantsFilter -offset - Json encoded int -limit - Json encoded int - - - -Or, if you're into Lua: - -``` -channels_ChannelParticipants = channels.getParticipants({channel=InputChannel, filter=ChannelParticipantsFilter, offset=int, limit=int, }) -``` - diff --git a/old_docs/API_docs_v51/methods/contacts_resolveUsername.md b/old_docs/API_docs_v51/methods/contacts_resolveUsername.md index 90e72851..b665b382 100644 --- a/old_docs/API_docs_v51/methods/contacts_resolveUsername.md +++ b/old_docs/API_docs_v51/methods/contacts_resolveUsername.md @@ -6,67 +6,8 @@ description: contacts.resolveUsername parameters, return type and example [Back to methods index](index.md) -*You cannot use this method directly, use the resolve_username, get_pwr_chat, get_info, get_full_info methods instead (see https://daniil.it/MadelineProto for more info)* +**You cannot use this method directly, use the resolve_username, get_pwr_chat, get_info, get_full_info methods instead (see https://daniil.it/MadelineProto for more info)** -### Parameters: - -| Name | Type | Required | -|----------|:-------------:|---------:| -|username|[string](../types/string.md) | Yes| - - -### Return type: [contacts\_ResolvedPeer](../types/contacts_ResolvedPeer.md) - -### Example: - - -``` -$MadelineProto = new \danog\MadelineProto\API(); -if (isset($token)) { // Login as a bot - $MadelineProto->bot_login($token); -} -if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } - $MadelineProto->complete_phone_login($code); -} - -$contacts_ResolvedPeer = $MadelineProto->contacts->resolveUsername(['username' => 'string', ]); -``` - -Or, if you're using the [PWRTelegram HTTP API](https://pwrtelegram.xyz): - -### As a bot: - -POST/GET to `https://api.pwrtelegram.xyz/botTOKEN/madeline` - -Parameters: - -* method - contacts.resolveUsername -* params - `{"username": "string", }` - - - -### As a user: - -POST/GET to `https://api.pwrtelegram.xyz/userTOKEN/contacts.resolveUsername` - -Parameters: - -username - Json encoded string - - - -Or, if you're into Lua: - -``` -contacts_ResolvedPeer = contacts.resolveUsername({username='string', }) -``` - diff --git a/old_docs/API_docs_v51/methods/messages_acceptEncryption.md b/old_docs/API_docs_v51/methods/messages_acceptEncryption.md index 548087b6..243c4c00 100644 --- a/old_docs/API_docs_v51/methods/messages_acceptEncryption.md +++ b/old_docs/API_docs_v51/methods/messages_acceptEncryption.md @@ -6,71 +6,8 @@ description: messages.acceptEncryption parameters, return type and example [Back to methods index](index.md) -*You cannot use this method directly, see https://daniil.it/MadelineProto for more info on handling secret chats* +**You cannot use this method directly, see https://daniil.it/MadelineProto for more info on handling secret chats** -### Parameters: - -| Name | Type | Required | -|----------|:-------------:|---------:| -|peer|[InputEncryptedChat](../types/InputEncryptedChat.md) | Yes| -|g\_b|[bytes](../types/bytes.md) | Yes| -|key\_fingerprint|[long](../types/long.md) | Yes| - - -### Return type: [EncryptedChat](../types/EncryptedChat.md) - -### Example: - - -``` -$MadelineProto = new \danog\MadelineProto\API(); -if (isset($token)) { // Login as a bot - $MadelineProto->bot_login($token); -} -if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } - $MadelineProto->complete_phone_login($code); -} - -$EncryptedChat = $MadelineProto->messages->acceptEncryption(['peer' => InputEncryptedChat, 'g_b' => 'bytes', 'key_fingerprint' => long, ]); -``` - -Or, if you're using the [PWRTelegram HTTP API](https://pwrtelegram.xyz): - -### As a bot: - -POST/GET to `https://api.pwrtelegram.xyz/botTOKEN/madeline` - -Parameters: - -* method - messages.acceptEncryption -* params - `{"peer": InputEncryptedChat, "g_b": "bytes", "key_fingerprint": long, }` - - - -### As a user: - -POST/GET to `https://api.pwrtelegram.xyz/userTOKEN/messages.acceptEncryption` - -Parameters: - -peer - Json encoded InputEncryptedChat -g_b - Json encoded bytes -key_fingerprint - Json encoded long - - - -Or, if you're into Lua: - -``` -EncryptedChat = messages.acceptEncryption({peer=InputEncryptedChat, g_b='bytes', key_fingerprint=long, }) -``` - diff --git a/old_docs/API_docs_v51/methods/messages_discardEncryption.md b/old_docs/API_docs_v51/methods/messages_discardEncryption.md index 72648e9d..3a9dc58b 100644 --- a/old_docs/API_docs_v51/methods/messages_discardEncryption.md +++ b/old_docs/API_docs_v51/methods/messages_discardEncryption.md @@ -6,67 +6,8 @@ description: messages.discardEncryption parameters, return type and example [Back to methods index](index.md) -*You cannot use this method directly, see https://daniil.it/MadelineProto for more info on handling secret chats* +**You cannot use this method directly, see https://daniil.it/MadelineProto for more info on handling secret chats** -### Parameters: - -| Name | Type | Required | -|----------|:-------------:|---------:| -|chat\_id|[int](../types/int.md) | Yes| - - -### Return type: [Bool](../types/Bool.md) - -### Example: - - -``` -$MadelineProto = new \danog\MadelineProto\API(); -if (isset($token)) { // Login as a bot - $MadelineProto->bot_login($token); -} -if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } - $MadelineProto->complete_phone_login($code); -} - -$Bool = $MadelineProto->messages->discardEncryption(['chat_id' => int, ]); -``` - -Or, if you're using the [PWRTelegram HTTP API](https://pwrtelegram.xyz): - -### As a bot: - -POST/GET to `https://api.pwrtelegram.xyz/botTOKEN/madeline` - -Parameters: - -* method - messages.discardEncryption -* params - `{"chat_id": int, }` - - - -### As a user: - -POST/GET to `https://api.pwrtelegram.xyz/userTOKEN/messages.discardEncryption` - -Parameters: - -chat_id - Json encoded int - - - -Or, if you're into Lua: - -``` -Bool = messages.discardEncryption({chat_id=int, }) -``` - diff --git a/old_docs/API_docs_v51/methods/messages_getFullChat.md b/old_docs/API_docs_v51/methods/messages_getFullChat.md index 62102b64..ffa9c281 100644 --- a/old_docs/API_docs_v51/methods/messages_getFullChat.md +++ b/old_docs/API_docs_v51/methods/messages_getFullChat.md @@ -6,67 +6,8 @@ description: messages.getFullChat parameters, return type and example [Back to methods index](index.md) -*You cannot use this method directly, use the get_pwr_chat, get_info, get_full_info methods instead (see https://daniil.it/MadelineProto for more info)* +**You cannot use this method directly, use the get_pwr_chat, get_info, get_full_info methods instead (see https://daniil.it/MadelineProto for more info)** -### Parameters: - -| Name | Type | Required | -|----------|:-------------:|---------:| -|chat\_id|[InputPeer](../types/InputPeer.md) | Yes| - - -### Return type: [messages\_ChatFull](../types/messages_ChatFull.md) - -### Example: - - -``` -$MadelineProto = new \danog\MadelineProto\API(); -if (isset($token)) { // Login as a bot - $MadelineProto->bot_login($token); -} -if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } - $MadelineProto->complete_phone_login($code); -} - -$messages_ChatFull = $MadelineProto->messages->getFullChat(['chat_id' => InputPeer, ]); -``` - -Or, if you're using the [PWRTelegram HTTP API](https://pwrtelegram.xyz): - -### As a bot: - -POST/GET to `https://api.pwrtelegram.xyz/botTOKEN/madeline` - -Parameters: - -* method - messages.getFullChat -* params - `{"chat_id": InputPeer, }` - - - -### As a user: - -POST/GET to `https://api.pwrtelegram.xyz/userTOKEN/messages.getFullChat` - -Parameters: - -chat_id - Json encoded InputPeer - - - -Or, if you're into Lua: - -``` -messages_ChatFull = messages.getFullChat({chat_id=InputPeer, }) -``` - diff --git a/old_docs/API_docs_v51/methods/messages_requestEncryption.md b/old_docs/API_docs_v51/methods/messages_requestEncryption.md index 2fd1f825..c8476667 100644 --- a/old_docs/API_docs_v51/methods/messages_requestEncryption.md +++ b/old_docs/API_docs_v51/methods/messages_requestEncryption.md @@ -6,69 +6,8 @@ description: messages.requestEncryption parameters, return type and example [Back to methods index](index.md) -*You cannot use this method directly, see https://daniil.it/MadelineProto for more info on handling secret chats* +**You cannot use this method directly, see https://daniil.it/MadelineProto for more info on handling secret chats** -### Parameters: - -| Name | Type | Required | -|----------|:-------------:|---------:| -|user\_id|[InputUser](../types/InputUser.md) | Yes| -|g\_a|[bytes](../types/bytes.md) | Yes| - - -### Return type: [EncryptedChat](../types/EncryptedChat.md) - -### Example: - - -``` -$MadelineProto = new \danog\MadelineProto\API(); -if (isset($token)) { // Login as a bot - $MadelineProto->bot_login($token); -} -if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } - $MadelineProto->complete_phone_login($code); -} - -$EncryptedChat = $MadelineProto->messages->requestEncryption(['user_id' => InputUser, 'g_a' => 'bytes', ]); -``` - -Or, if you're using the [PWRTelegram HTTP API](https://pwrtelegram.xyz): - -### As a bot: - -POST/GET to `https://api.pwrtelegram.xyz/botTOKEN/madeline` - -Parameters: - -* method - messages.requestEncryption -* params - `{"user_id": InputUser, "g_a": "bytes", }` - - - -### As a user: - -POST/GET to `https://api.pwrtelegram.xyz/userTOKEN/messages.requestEncryption` - -Parameters: - -user_id - Json encoded InputUser -g_a - Json encoded bytes - - - -Or, if you're into Lua: - -``` -EncryptedChat = messages.requestEncryption({user_id=InputUser, g_a='bytes', }) -``` - diff --git a/old_docs/API_docs_v51/methods/updates_getChannelDifference.md b/old_docs/API_docs_v51/methods/updates_getChannelDifference.md index 51ea7aa5..2e69d1cd 100644 --- a/old_docs/API_docs_v51/methods/updates_getChannelDifference.md +++ b/old_docs/API_docs_v51/methods/updates_getChannelDifference.md @@ -6,73 +6,8 @@ description: updates.getChannelDifference parameters, return type and example [Back to methods index](index.md) -*You cannot use this method directly, see https://daniil.it/MadelineProto for more info on handling updates* +**You cannot use this method directly, see https://daniil.it/MadelineProto for more info on handling updates** -### Parameters: - -| Name | Type | Required | -|----------|:-------------:|---------:| -|channel|[InputChannel](../types/InputChannel.md) | Yes| -|filter|[ChannelMessagesFilter](../types/ChannelMessagesFilter.md) | Yes| -|pts|[int](../types/int.md) | Yes| -|limit|[int](../types/int.md) | Yes| - - -### Return type: [updates\_ChannelDifference](../types/updates_ChannelDifference.md) - -### Example: - - -``` -$MadelineProto = new \danog\MadelineProto\API(); -if (isset($token)) { // Login as a bot - $MadelineProto->bot_login($token); -} -if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } - $MadelineProto->complete_phone_login($code); -} - -$updates_ChannelDifference = $MadelineProto->updates->getChannelDifference(['channel' => InputChannel, 'filter' => ChannelMessagesFilter, 'pts' => int, 'limit' => int, ]); -``` - -Or, if you're using the [PWRTelegram HTTP API](https://pwrtelegram.xyz): - -### As a bot: - -POST/GET to `https://api.pwrtelegram.xyz/botTOKEN/madeline` - -Parameters: - -* method - updates.getChannelDifference -* params - `{"channel": InputChannel, "filter": ChannelMessagesFilter, "pts": int, "limit": int, }` - - - -### As a user: - -POST/GET to `https://api.pwrtelegram.xyz/userTOKEN/updates.getChannelDifference` - -Parameters: - -channel - Json encoded InputChannel -filter - Json encoded ChannelMessagesFilter -pts - Json encoded int -limit - Json encoded int - - - -Or, if you're into Lua: - -``` -updates_ChannelDifference = updates.getChannelDifference({channel=InputChannel, filter=ChannelMessagesFilter, pts=int, limit=int, }) -``` - diff --git a/old_docs/API_docs_v51/methods/updates_getDifference.md b/old_docs/API_docs_v51/methods/updates_getDifference.md index 53c7b078..9bcee79a 100644 --- a/old_docs/API_docs_v51/methods/updates_getDifference.md +++ b/old_docs/API_docs_v51/methods/updates_getDifference.md @@ -6,71 +6,8 @@ description: updates.getDifference parameters, return type and example [Back to methods index](index.md) -*You cannot use this method directly, see https://daniil.it/MadelineProto for more info on handling updates* +**You cannot use this method directly, see https://daniil.it/MadelineProto for more info on handling updates** -### Parameters: - -| Name | Type | Required | -|----------|:-------------:|---------:| -|pts|[int](../types/int.md) | Yes| -|date|[int](../types/int.md) | Yes| -|qts|[int](../types/int.md) | Yes| - - -### Return type: [updates\_Difference](../types/updates_Difference.md) - -### Example: - - -``` -$MadelineProto = new \danog\MadelineProto\API(); -if (isset($token)) { // Login as a bot - $MadelineProto->bot_login($token); -} -if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } - $MadelineProto->complete_phone_login($code); -} - -$updates_Difference = $MadelineProto->updates->getDifference(['pts' => int, 'date' => int, 'qts' => int, ]); -``` - -Or, if you're using the [PWRTelegram HTTP API](https://pwrtelegram.xyz): - -### As a bot: - -POST/GET to `https://api.pwrtelegram.xyz/botTOKEN/madeline` - -Parameters: - -* method - updates.getDifference -* params - `{"pts": int, "date": int, "qts": int, }` - - - -### As a user: - -POST/GET to `https://api.pwrtelegram.xyz/userTOKEN/updates.getDifference` - -Parameters: - -pts - Json encoded int -date - Json encoded int -qts - Json encoded int - - - -Or, if you're into Lua: - -``` -updates_Difference = updates.getDifference({pts=int, date=int, qts=int, }) -``` - diff --git a/old_docs/API_docs_v51/methods/updates_getState.md b/old_docs/API_docs_v51/methods/updates_getState.md index 51f6ae80..fd5955ba 100644 --- a/old_docs/API_docs_v51/methods/updates_getState.md +++ b/old_docs/API_docs_v51/methods/updates_getState.md @@ -6,61 +6,8 @@ description: updates.getState parameters, return type and example [Back to methods index](index.md) -*You cannot use this method directly, see https://daniil.it/MadelineProto for more info on handling updates* +**You cannot use this method directly, see https://daniil.it/MadelineProto for more info on handling updates** - - -### Return type: [updates\_State](../types/updates_State.md) - -### Example: - - -``` -$MadelineProto = new \danog\MadelineProto\API(); -if (isset($token)) { // Login as a bot - $MadelineProto->bot_login($token); -} -if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } - $MadelineProto->complete_phone_login($code); -} - -$updates_State = $MadelineProto->updates->getState(); -``` - -Or, if you're using the [PWRTelegram HTTP API](https://pwrtelegram.xyz): - -### As a bot: - -POST/GET to `https://api.pwrtelegram.xyz/botTOKEN/madeline` - -Parameters: - -* method - updates.getState -* params - `{}` - - - -### As a user: - -POST/GET to `https://api.pwrtelegram.xyz/userTOKEN/updates.getState` - -Parameters: - - - - -Or, if you're into Lua: - -``` -updates_State = updates.getState({}) -``` - diff --git a/old_docs/API_docs_v51/methods/upload_getFile.md b/old_docs/API_docs_v51/methods/upload_getFile.md index a1003003..add7d54e 100644 --- a/old_docs/API_docs_v51/methods/upload_getFile.md +++ b/old_docs/API_docs_v51/methods/upload_getFile.md @@ -6,71 +6,8 @@ description: upload.getFile parameters, return type and example [Back to methods index](index.md) -*You cannot use this method directly, use the upload, download_to_stream, download_to_file, download_to_dir methods instead; see https://daniil.it/MadelineProto for more info* +**You cannot use this method directly, use the upload, download_to_stream, download_to_file, download_to_dir methods instead; see https://daniil.it/MadelineProto for more info** -### Parameters: - -| Name | Type | Required | -|----------|:-------------:|---------:| -|location|[InputFileLocation](../types/InputFileLocation.md) | Yes| -|offset|[int](../types/int.md) | Yes| -|limit|[int](../types/int.md) | Yes| - - -### Return type: [upload\_File](../types/upload_File.md) - -### Example: - - -``` -$MadelineProto = new \danog\MadelineProto\API(); -if (isset($token)) { // Login as a bot - $MadelineProto->bot_login($token); -} -if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } - $MadelineProto->complete_phone_login($code); -} - -$upload_File = $MadelineProto->upload->getFile(['location' => InputFileLocation, 'offset' => int, 'limit' => int, ]); -``` - -Or, if you're using the [PWRTelegram HTTP API](https://pwrtelegram.xyz): - -### As a bot: - -POST/GET to `https://api.pwrtelegram.xyz/botTOKEN/madeline` - -Parameters: - -* method - upload.getFile -* params - `{"location": InputFileLocation, "offset": int, "limit": int, }` - - - -### As a user: - -POST/GET to `https://api.pwrtelegram.xyz/userTOKEN/upload.getFile` - -Parameters: - -location - Json encoded InputFileLocation -offset - Json encoded int -limit - Json encoded int - - - -Or, if you're into Lua: - -``` -upload_File = upload.getFile({location=InputFileLocation, offset=int, limit=int, }) -``` - diff --git a/old_docs/API_docs_v51/methods/upload_saveBigFilePart.md b/old_docs/API_docs_v51/methods/upload_saveBigFilePart.md index e5c96d89..b1c3ea28 100644 --- a/old_docs/API_docs_v51/methods/upload_saveBigFilePart.md +++ b/old_docs/API_docs_v51/methods/upload_saveBigFilePart.md @@ -6,73 +6,8 @@ description: upload.saveBigFilePart parameters, return type and example [Back to methods index](index.md) -*You cannot use this method directly, use the upload, download_to_stream, download_to_file, download_to_dir methods instead; see https://daniil.it/MadelineProto for more info* +**You cannot use this method directly, use the upload, download_to_stream, download_to_file, download_to_dir methods instead; see https://daniil.it/MadelineProto for more info** -### Parameters: - -| Name | Type | Required | -|----------|:-------------:|---------:| -|file\_id|[long](../types/long.md) | Yes| -|file\_part|[int](../types/int.md) | Yes| -|file\_total\_parts|[int](../types/int.md) | Yes| -|bytes|[bytes](../types/bytes.md) | Yes| - - -### Return type: [Bool](../types/Bool.md) - -### Example: - - -``` -$MadelineProto = new \danog\MadelineProto\API(); -if (isset($token)) { // Login as a bot - $MadelineProto->bot_login($token); -} -if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } - $MadelineProto->complete_phone_login($code); -} - -$Bool = $MadelineProto->upload->saveBigFilePart(['file_id' => long, 'file_part' => int, 'file_total_parts' => int, 'bytes' => 'bytes', ]); -``` - -Or, if you're using the [PWRTelegram HTTP API](https://pwrtelegram.xyz): - -### As a bot: - -POST/GET to `https://api.pwrtelegram.xyz/botTOKEN/madeline` - -Parameters: - -* method - upload.saveBigFilePart -* params - `{"file_id": long, "file_part": int, "file_total_parts": int, "bytes": "bytes", }` - - - -### As a user: - -POST/GET to `https://api.pwrtelegram.xyz/userTOKEN/upload.saveBigFilePart` - -Parameters: - -file_id - Json encoded long -file_part - Json encoded int -file_total_parts - Json encoded int -bytes - Json encoded bytes - - - -Or, if you're into Lua: - -``` -Bool = upload.saveBigFilePart({file_id=long, file_part=int, file_total_parts=int, bytes='bytes', }) -``` - diff --git a/old_docs/API_docs_v51/methods/upload_saveFilePart.md b/old_docs/API_docs_v51/methods/upload_saveFilePart.md index 1c16e4b2..c482f321 100644 --- a/old_docs/API_docs_v51/methods/upload_saveFilePart.md +++ b/old_docs/API_docs_v51/methods/upload_saveFilePart.md @@ -6,71 +6,8 @@ description: upload.saveFilePart parameters, return type and example [Back to methods index](index.md) -*You cannot use this method directly, use the upload, download_to_stream, download_to_file, download_to_dir methods instead; see https://daniil.it/MadelineProto for more info* +**You cannot use this method directly, use the upload, download_to_stream, download_to_file, download_to_dir methods instead; see https://daniil.it/MadelineProto for more info** -### Parameters: - -| Name | Type | Required | -|----------|:-------------:|---------:| -|file\_id|[long](../types/long.md) | Yes| -|file\_part|[int](../types/int.md) | Yes| -|bytes|[bytes](../types/bytes.md) | Yes| - - -### Return type: [Bool](../types/Bool.md) - -### Example: - - -``` -$MadelineProto = new \danog\MadelineProto\API(); -if (isset($token)) { // Login as a bot - $MadelineProto->bot_login($token); -} -if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } - $MadelineProto->complete_phone_login($code); -} - -$Bool = $MadelineProto->upload->saveFilePart(['file_id' => long, 'file_part' => int, 'bytes' => 'bytes', ]); -``` - -Or, if you're using the [PWRTelegram HTTP API](https://pwrtelegram.xyz): - -### As a bot: - -POST/GET to `https://api.pwrtelegram.xyz/botTOKEN/madeline` - -Parameters: - -* method - upload.saveFilePart -* params - `{"file_id": long, "file_part": int, "bytes": "bytes", }` - - - -### As a user: - -POST/GET to `https://api.pwrtelegram.xyz/userTOKEN/upload.saveFilePart` - -Parameters: - -file_id - Json encoded long -file_part - Json encoded int -bytes - Json encoded bytes - - - -Or, if you're into Lua: - -``` -Bool = upload.saveFilePart({file_id=long, file_part=int, bytes='bytes', }) -``` - diff --git a/old_docs/API_docs_v51/methods/users_getFullUser.md b/old_docs/API_docs_v51/methods/users_getFullUser.md index 645ab12e..4ec831ec 100644 --- a/old_docs/API_docs_v51/methods/users_getFullUser.md +++ b/old_docs/API_docs_v51/methods/users_getFullUser.md @@ -6,67 +6,8 @@ description: users.getFullUser parameters, return type and example [Back to methods index](index.md) -*You cannot use this method directly, use the get_pwr_chat, get_info, get_full_info methods instead (see https://daniil.it/MadelineProto for more info)* +**You cannot use this method directly, use the get_pwr_chat, get_info, get_full_info methods instead (see https://daniil.it/MadelineProto for more info)** -### Parameters: - -| Name | Type | Required | -|----------|:-------------:|---------:| -|id|[InputUser](../types/InputUser.md) | Yes| - - -### Return type: [UserFull](../types/UserFull.md) - -### Example: - - -``` -$MadelineProto = new \danog\MadelineProto\API(); -if (isset($token)) { // Login as a bot - $MadelineProto->bot_login($token); -} -if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } - $MadelineProto->complete_phone_login($code); -} - -$UserFull = $MadelineProto->users->getFullUser(['id' => InputUser, ]); -``` - -Or, if you're using the [PWRTelegram HTTP API](https://pwrtelegram.xyz): - -### As a bot: - -POST/GET to `https://api.pwrtelegram.xyz/botTOKEN/madeline` - -Parameters: - -* method - users.getFullUser -* params - `{"id": InputUser, }` - - - -### As a user: - -POST/GET to `https://api.pwrtelegram.xyz/userTOKEN/users.getFullUser` - -Parameters: - -id - Json encoded InputUser - - - -Or, if you're into Lua: - -``` -UserFull = users.getFullUser({id=InputUser, }) -``` - diff --git a/old_docs/API_docs_v53/constructors/README.md b/old_docs/API_docs_v53/constructors/README.md index d76276bb..19f866c1 100644 --- a/old_docs/API_docs_v53/constructors/README.md +++ b/old_docs/API_docs_v53/constructors/README.md @@ -4,9 +4,6 @@ description: List of constructors --- # Constructors [Back to API documentation index](..) - - - ***

[$accountDaysTTL](../constructors/accountDaysTTL.md) = \['days' => [int](../types/int.md), \]; diff --git a/old_docs/API_docs_v53/methods/auth_importBotAuthorization.md b/old_docs/API_docs_v53/methods/auth_importBotAuthorization.md index 0d8836b6..57521a13 100644 --- a/old_docs/API_docs_v53/methods/auth_importBotAuthorization.md +++ b/old_docs/API_docs_v53/methods/auth_importBotAuthorization.md @@ -6,71 +6,8 @@ description: auth.importBotAuthorization parameters, return type and example [Back to methods index](index.md) -*You cannot use this method directly, use the bot_login method instead (see https://daniil.it/MadelineProto for more info)* +**You cannot use this method directly, use the bot_login method instead (see https://daniil.it/MadelineProto for more info)** -### Parameters: - -| Name | Type | Required | -|----------|:-------------:|---------:| -|api\_id|[int](../types/int.md) | Yes| -|api\_hash|[string](../types/string.md) | Yes| -|bot\_auth\_token|[string](../types/string.md) | Yes| - - -### Return type: [auth\_Authorization](../types/auth_Authorization.md) - -### Example: - - -``` -$MadelineProto = new \danog\MadelineProto\API(); -if (isset($token)) { // Login as a bot - $MadelineProto->bot_login($token); -} -if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } - $MadelineProto->complete_phone_login($code); -} - -$auth_Authorization = $MadelineProto->auth->importBotAuthorization(['api_id' => int, 'api_hash' => 'string', 'bot_auth_token' => 'string', ]); -``` - -Or, if you're using the [PWRTelegram HTTP API](https://pwrtelegram.xyz): - -### As a bot: - -POST/GET to `https://api.pwrtelegram.xyz/botTOKEN/madeline` - -Parameters: - -* method - auth.importBotAuthorization -* params - `{"api_id": int, "api_hash": "string", "bot_auth_token": "string", }` - - - -### As a user: - -POST/GET to `https://api.pwrtelegram.xyz/userTOKEN/auth.importBotAuthorization` - -Parameters: - -api_id - Json encoded int -api_hash - Json encoded string -bot_auth_token - Json encoded string - - - -Or, if you're into Lua: - -``` -auth_Authorization = auth.importBotAuthorization({api_id=int, api_hash='string', bot_auth_token='string', }) -``` - diff --git a/old_docs/API_docs_v53/methods/auth_logOut.md b/old_docs/API_docs_v53/methods/auth_logOut.md index 12159bab..7d5bb3f7 100644 --- a/old_docs/API_docs_v53/methods/auth_logOut.md +++ b/old_docs/API_docs_v53/methods/auth_logOut.md @@ -6,61 +6,8 @@ description: auth.logOut parameters, return type and example [Back to methods index](index.md) -*You cannot use this method directly, use the logout method instead (see https://daniil.it/MadelineProto for more info)* +**You cannot use this method directly, use the logout method instead (see https://daniil.it/MadelineProto for more info)** - - -### Return type: [Bool](../types/Bool.md) - -### Example: - - -``` -$MadelineProto = new \danog\MadelineProto\API(); -if (isset($token)) { // Login as a bot - $MadelineProto->bot_login($token); -} -if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } - $MadelineProto->complete_phone_login($code); -} - -$Bool = $MadelineProto->auth->logOut(); -``` - -Or, if you're using the [PWRTelegram HTTP API](https://pwrtelegram.xyz): - -### As a bot: - -POST/GET to `https://api.pwrtelegram.xyz/botTOKEN/madeline` - -Parameters: - -* method - auth.logOut -* params - `{}` - - - -### As a user: - -POST/GET to `https://api.pwrtelegram.xyz/userTOKEN/auth.logOut` - -Parameters: - - - - -Or, if you're into Lua: - -``` -Bool = auth.logOut({}) -``` - diff --git a/old_docs/API_docs_v53/methods/auth_sendCode.md b/old_docs/API_docs_v53/methods/auth_sendCode.md index bda88218..22d1df94 100644 --- a/old_docs/API_docs_v53/methods/auth_sendCode.md +++ b/old_docs/API_docs_v53/methods/auth_sendCode.md @@ -6,75 +6,8 @@ description: auth.sendCode parameters, return type and example [Back to methods index](index.md) -*You cannot use this method directly, use the phone_login method instead (see https://daniil.it/MadelineProto for more info)* +**You cannot use this method directly, use the phone_login method instead (see https://daniil.it/MadelineProto for more info)** -### Parameters: - -| Name | Type | Required | -|----------|:-------------:|---------:| -|allow\_flashcall|[Bool](../types/Bool.md) | Optional| -|phone\_number|[string](../types/string.md) | Yes| -|current\_number|[Bool](../types/Bool.md) | Optional| -|api\_id|[int](../types/int.md) | Yes| -|api\_hash|[string](../types/string.md) | Yes| - - -### Return type: [auth\_SentCode](../types/auth_SentCode.md) - -### Example: - - -``` -$MadelineProto = new \danog\MadelineProto\API(); -if (isset($token)) { // Login as a bot - $MadelineProto->bot_login($token); -} -if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } - $MadelineProto->complete_phone_login($code); -} - -$auth_SentCode = $MadelineProto->auth->sendCode(['allow_flashcall' => Bool, 'phone_number' => 'string', 'current_number' => Bool, 'api_id' => int, 'api_hash' => 'string', ]); -``` - -Or, if you're using the [PWRTelegram HTTP API](https://pwrtelegram.xyz): - -### As a bot: - -POST/GET to `https://api.pwrtelegram.xyz/botTOKEN/madeline` - -Parameters: - -* method - auth.sendCode -* params - `{"allow_flashcall": Bool, "phone_number": "string", "current_number": Bool, "api_id": int, "api_hash": "string", }` - - - -### As a user: - -POST/GET to `https://api.pwrtelegram.xyz/userTOKEN/auth.sendCode` - -Parameters: - -allow_flashcall - Json encoded Bool -phone_number - Json encoded string -current_number - Json encoded Bool -api_id - Json encoded int -api_hash - Json encoded string - - - -Or, if you're into Lua: - -``` -auth_SentCode = auth.sendCode({allow_flashcall=Bool, phone_number='string', current_number=Bool, api_id=int, api_hash='string', }) -``` - diff --git a/old_docs/API_docs_v53/methods/auth_signIn.md b/old_docs/API_docs_v53/methods/auth_signIn.md index 75c50d70..ab40bb4d 100644 --- a/old_docs/API_docs_v53/methods/auth_signIn.md +++ b/old_docs/API_docs_v53/methods/auth_signIn.md @@ -6,71 +6,8 @@ description: auth.signIn parameters, return type and example [Back to methods index](index.md) -*You cannot use this method directly, use the complete_phone_login method instead (see https://daniil.it/MadelineProto for more info)* +**You cannot use this method directly, use the complete_phone_login method instead (see https://daniil.it/MadelineProto for more info)** -### Parameters: - -| Name | Type | Required | -|----------|:-------------:|---------:| -|phone\_number|[string](../types/string.md) | Yes| -|phone\_code\_hash|[string](../types/string.md) | Yes| -|phone\_code|[string](../types/string.md) | Yes| - - -### Return type: [auth\_Authorization](../types/auth_Authorization.md) - -### Example: - - -``` -$MadelineProto = new \danog\MadelineProto\API(); -if (isset($token)) { // Login as a bot - $MadelineProto->bot_login($token); -} -if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } - $MadelineProto->complete_phone_login($code); -} - -$auth_Authorization = $MadelineProto->auth->signIn(['phone_number' => 'string', 'phone_code_hash' => 'string', 'phone_code' => 'string', ]); -``` - -Or, if you're using the [PWRTelegram HTTP API](https://pwrtelegram.xyz): - -### As a bot: - -POST/GET to `https://api.pwrtelegram.xyz/botTOKEN/madeline` - -Parameters: - -* method - auth.signIn -* params - `{"phone_number": "string", "phone_code_hash": "string", "phone_code": "string", }` - - - -### As a user: - -POST/GET to `https://api.pwrtelegram.xyz/userTOKEN/auth.signIn` - -Parameters: - -phone_number - Json encoded string -phone_code_hash - Json encoded string -phone_code - Json encoded string - - - -Or, if you're into Lua: - -``` -auth_Authorization = auth.signIn({phone_number='string', phone_code_hash='string', phone_code='string', }) -``` - diff --git a/old_docs/API_docs_v53/methods/auth_signUp.md b/old_docs/API_docs_v53/methods/auth_signUp.md index f2a72b68..042d1191 100644 --- a/old_docs/API_docs_v53/methods/auth_signUp.md +++ b/old_docs/API_docs_v53/methods/auth_signUp.md @@ -6,75 +6,8 @@ description: auth.signUp parameters, return type and example [Back to methods index](index.md) -*You cannot use this method directly, use the complete_signup method instead (see https://daniil.it/MadelineProto for more info)* +**You cannot use this method directly, use the complete_signup method instead (see https://daniil.it/MadelineProto for more info)** -### Parameters: - -| Name | Type | Required | -|----------|:-------------:|---------:| -|phone\_number|[string](../types/string.md) | Yes| -|phone\_code\_hash|[string](../types/string.md) | Yes| -|phone\_code|[string](../types/string.md) | Yes| -|first\_name|[string](../types/string.md) | Yes| -|last\_name|[string](../types/string.md) | Yes| - - -### Return type: [auth\_Authorization](../types/auth_Authorization.md) - -### Example: - - -``` -$MadelineProto = new \danog\MadelineProto\API(); -if (isset($token)) { // Login as a bot - $MadelineProto->bot_login($token); -} -if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } - $MadelineProto->complete_phone_login($code); -} - -$auth_Authorization = $MadelineProto->auth->signUp(['phone_number' => 'string', 'phone_code_hash' => 'string', 'phone_code' => 'string', 'first_name' => 'string', 'last_name' => 'string', ]); -``` - -Or, if you're using the [PWRTelegram HTTP API](https://pwrtelegram.xyz): - -### As a bot: - -POST/GET to `https://api.pwrtelegram.xyz/botTOKEN/madeline` - -Parameters: - -* method - auth.signUp -* params - `{"phone_number": "string", "phone_code_hash": "string", "phone_code": "string", "first_name": "string", "last_name": "string", }` - - - -### As a user: - -POST/GET to `https://api.pwrtelegram.xyz/userTOKEN/auth.signUp` - -Parameters: - -phone_number - Json encoded string -phone_code_hash - Json encoded string -phone_code - Json encoded string -first_name - Json encoded string -last_name - Json encoded string - - - -Or, if you're into Lua: - -``` -auth_Authorization = auth.signUp({phone_number='string', phone_code_hash='string', phone_code='string', first_name='string', last_name='string', }) -``` - diff --git a/old_docs/API_docs_v53/methods/channels_getFullChannel.md b/old_docs/API_docs_v53/methods/channels_getFullChannel.md index 340efcfe..58dbe057 100644 --- a/old_docs/API_docs_v53/methods/channels_getFullChannel.md +++ b/old_docs/API_docs_v53/methods/channels_getFullChannel.md @@ -6,67 +6,8 @@ description: channels.getFullChannel parameters, return type and example [Back to methods index](index.md) -*You cannot use this method directly, use the get_pwr_chat, get_info, get_full_info methods instead (see https://daniil.it/MadelineProto for more info)* +**You cannot use this method directly, use the get_pwr_chat, get_info, get_full_info methods instead (see https://daniil.it/MadelineProto for more info)** -### Parameters: - -| Name | Type | Required | -|----------|:-------------:|---------:| -|channel|[InputChannel](../types/InputChannel.md) | Yes| - - -### Return type: [messages\_ChatFull](../types/messages_ChatFull.md) - -### Example: - - -``` -$MadelineProto = new \danog\MadelineProto\API(); -if (isset($token)) { // Login as a bot - $MadelineProto->bot_login($token); -} -if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } - $MadelineProto->complete_phone_login($code); -} - -$messages_ChatFull = $MadelineProto->channels->getFullChannel(['channel' => InputChannel, ]); -``` - -Or, if you're using the [PWRTelegram HTTP API](https://pwrtelegram.xyz): - -### As a bot: - -POST/GET to `https://api.pwrtelegram.xyz/botTOKEN/madeline` - -Parameters: - -* method - channels.getFullChannel -* params - `{"channel": InputChannel, }` - - - -### As a user: - -POST/GET to `https://api.pwrtelegram.xyz/userTOKEN/channels.getFullChannel` - -Parameters: - -channel - Json encoded InputChannel - - - -Or, if you're into Lua: - -``` -messages_ChatFull = channels.getFullChannel({channel=InputChannel, }) -``` - diff --git a/old_docs/API_docs_v53/methods/channels_getParticipants.md b/old_docs/API_docs_v53/methods/channels_getParticipants.md index 4c6e09cc..d84cf09c 100644 --- a/old_docs/API_docs_v53/methods/channels_getParticipants.md +++ b/old_docs/API_docs_v53/methods/channels_getParticipants.md @@ -6,73 +6,8 @@ description: channels.getParticipants parameters, return type and example [Back to methods index](index.md) -*You cannot use this method directly, use the get_pwr_chat, get_info, get_full_info methods instead (see https://daniil.it/MadelineProto for more info)* +**You cannot use this method directly, use the get_pwr_chat, get_info, get_full_info methods instead (see https://daniil.it/MadelineProto for more info)** -### Parameters: - -| Name | Type | Required | -|----------|:-------------:|---------:| -|channel|[InputChannel](../types/InputChannel.md) | Yes| -|filter|[ChannelParticipantsFilter](../types/ChannelParticipantsFilter.md) | Yes| -|offset|[int](../types/int.md) | Yes| -|limit|[int](../types/int.md) | Yes| - - -### Return type: [channels\_ChannelParticipants](../types/channels_ChannelParticipants.md) - -### Example: - - -``` -$MadelineProto = new \danog\MadelineProto\API(); -if (isset($token)) { // Login as a bot - $MadelineProto->bot_login($token); -} -if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } - $MadelineProto->complete_phone_login($code); -} - -$channels_ChannelParticipants = $MadelineProto->channels->getParticipants(['channel' => InputChannel, 'filter' => ChannelParticipantsFilter, 'offset' => int, 'limit' => int, ]); -``` - -Or, if you're using the [PWRTelegram HTTP API](https://pwrtelegram.xyz): - -### As a bot: - -POST/GET to `https://api.pwrtelegram.xyz/botTOKEN/madeline` - -Parameters: - -* method - channels.getParticipants -* params - `{"channel": InputChannel, "filter": ChannelParticipantsFilter, "offset": int, "limit": int, }` - - - -### As a user: - -POST/GET to `https://api.pwrtelegram.xyz/userTOKEN/channels.getParticipants` - -Parameters: - -channel - Json encoded InputChannel -filter - Json encoded ChannelParticipantsFilter -offset - Json encoded int -limit - Json encoded int - - - -Or, if you're into Lua: - -``` -channels_ChannelParticipants = channels.getParticipants({channel=InputChannel, filter=ChannelParticipantsFilter, offset=int, limit=int, }) -``` - diff --git a/old_docs/API_docs_v53/methods/contacts_resolveUsername.md b/old_docs/API_docs_v53/methods/contacts_resolveUsername.md index 90e72851..b665b382 100644 --- a/old_docs/API_docs_v53/methods/contacts_resolveUsername.md +++ b/old_docs/API_docs_v53/methods/contacts_resolveUsername.md @@ -6,67 +6,8 @@ description: contacts.resolveUsername parameters, return type and example [Back to methods index](index.md) -*You cannot use this method directly, use the resolve_username, get_pwr_chat, get_info, get_full_info methods instead (see https://daniil.it/MadelineProto for more info)* +**You cannot use this method directly, use the resolve_username, get_pwr_chat, get_info, get_full_info methods instead (see https://daniil.it/MadelineProto for more info)** -### Parameters: - -| Name | Type | Required | -|----------|:-------------:|---------:| -|username|[string](../types/string.md) | Yes| - - -### Return type: [contacts\_ResolvedPeer](../types/contacts_ResolvedPeer.md) - -### Example: - - -``` -$MadelineProto = new \danog\MadelineProto\API(); -if (isset($token)) { // Login as a bot - $MadelineProto->bot_login($token); -} -if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } - $MadelineProto->complete_phone_login($code); -} - -$contacts_ResolvedPeer = $MadelineProto->contacts->resolveUsername(['username' => 'string', ]); -``` - -Or, if you're using the [PWRTelegram HTTP API](https://pwrtelegram.xyz): - -### As a bot: - -POST/GET to `https://api.pwrtelegram.xyz/botTOKEN/madeline` - -Parameters: - -* method - contacts.resolveUsername -* params - `{"username": "string", }` - - - -### As a user: - -POST/GET to `https://api.pwrtelegram.xyz/userTOKEN/contacts.resolveUsername` - -Parameters: - -username - Json encoded string - - - -Or, if you're into Lua: - -``` -contacts_ResolvedPeer = contacts.resolveUsername({username='string', }) -``` - diff --git a/old_docs/API_docs_v53/methods/messages_acceptEncryption.md b/old_docs/API_docs_v53/methods/messages_acceptEncryption.md index 548087b6..243c4c00 100644 --- a/old_docs/API_docs_v53/methods/messages_acceptEncryption.md +++ b/old_docs/API_docs_v53/methods/messages_acceptEncryption.md @@ -6,71 +6,8 @@ description: messages.acceptEncryption parameters, return type and example [Back to methods index](index.md) -*You cannot use this method directly, see https://daniil.it/MadelineProto for more info on handling secret chats* +**You cannot use this method directly, see https://daniil.it/MadelineProto for more info on handling secret chats** -### Parameters: - -| Name | Type | Required | -|----------|:-------------:|---------:| -|peer|[InputEncryptedChat](../types/InputEncryptedChat.md) | Yes| -|g\_b|[bytes](../types/bytes.md) | Yes| -|key\_fingerprint|[long](../types/long.md) | Yes| - - -### Return type: [EncryptedChat](../types/EncryptedChat.md) - -### Example: - - -``` -$MadelineProto = new \danog\MadelineProto\API(); -if (isset($token)) { // Login as a bot - $MadelineProto->bot_login($token); -} -if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } - $MadelineProto->complete_phone_login($code); -} - -$EncryptedChat = $MadelineProto->messages->acceptEncryption(['peer' => InputEncryptedChat, 'g_b' => 'bytes', 'key_fingerprint' => long, ]); -``` - -Or, if you're using the [PWRTelegram HTTP API](https://pwrtelegram.xyz): - -### As a bot: - -POST/GET to `https://api.pwrtelegram.xyz/botTOKEN/madeline` - -Parameters: - -* method - messages.acceptEncryption -* params - `{"peer": InputEncryptedChat, "g_b": "bytes", "key_fingerprint": long, }` - - - -### As a user: - -POST/GET to `https://api.pwrtelegram.xyz/userTOKEN/messages.acceptEncryption` - -Parameters: - -peer - Json encoded InputEncryptedChat -g_b - Json encoded bytes -key_fingerprint - Json encoded long - - - -Or, if you're into Lua: - -``` -EncryptedChat = messages.acceptEncryption({peer=InputEncryptedChat, g_b='bytes', key_fingerprint=long, }) -``` - diff --git a/old_docs/API_docs_v53/methods/messages_discardEncryption.md b/old_docs/API_docs_v53/methods/messages_discardEncryption.md index 72648e9d..3a9dc58b 100644 --- a/old_docs/API_docs_v53/methods/messages_discardEncryption.md +++ b/old_docs/API_docs_v53/methods/messages_discardEncryption.md @@ -6,67 +6,8 @@ description: messages.discardEncryption parameters, return type and example [Back to methods index](index.md) -*You cannot use this method directly, see https://daniil.it/MadelineProto for more info on handling secret chats* +**You cannot use this method directly, see https://daniil.it/MadelineProto for more info on handling secret chats** -### Parameters: - -| Name | Type | Required | -|----------|:-------------:|---------:| -|chat\_id|[int](../types/int.md) | Yes| - - -### Return type: [Bool](../types/Bool.md) - -### Example: - - -``` -$MadelineProto = new \danog\MadelineProto\API(); -if (isset($token)) { // Login as a bot - $MadelineProto->bot_login($token); -} -if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } - $MadelineProto->complete_phone_login($code); -} - -$Bool = $MadelineProto->messages->discardEncryption(['chat_id' => int, ]); -``` - -Or, if you're using the [PWRTelegram HTTP API](https://pwrtelegram.xyz): - -### As a bot: - -POST/GET to `https://api.pwrtelegram.xyz/botTOKEN/madeline` - -Parameters: - -* method - messages.discardEncryption -* params - `{"chat_id": int, }` - - - -### As a user: - -POST/GET to `https://api.pwrtelegram.xyz/userTOKEN/messages.discardEncryption` - -Parameters: - -chat_id - Json encoded int - - - -Or, if you're into Lua: - -``` -Bool = messages.discardEncryption({chat_id=int, }) -``` - diff --git a/old_docs/API_docs_v53/methods/messages_getFullChat.md b/old_docs/API_docs_v53/methods/messages_getFullChat.md index 62102b64..ffa9c281 100644 --- a/old_docs/API_docs_v53/methods/messages_getFullChat.md +++ b/old_docs/API_docs_v53/methods/messages_getFullChat.md @@ -6,67 +6,8 @@ description: messages.getFullChat parameters, return type and example [Back to methods index](index.md) -*You cannot use this method directly, use the get_pwr_chat, get_info, get_full_info methods instead (see https://daniil.it/MadelineProto for more info)* +**You cannot use this method directly, use the get_pwr_chat, get_info, get_full_info methods instead (see https://daniil.it/MadelineProto for more info)** -### Parameters: - -| Name | Type | Required | -|----------|:-------------:|---------:| -|chat\_id|[InputPeer](../types/InputPeer.md) | Yes| - - -### Return type: [messages\_ChatFull](../types/messages_ChatFull.md) - -### Example: - - -``` -$MadelineProto = new \danog\MadelineProto\API(); -if (isset($token)) { // Login as a bot - $MadelineProto->bot_login($token); -} -if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } - $MadelineProto->complete_phone_login($code); -} - -$messages_ChatFull = $MadelineProto->messages->getFullChat(['chat_id' => InputPeer, ]); -``` - -Or, if you're using the [PWRTelegram HTTP API](https://pwrtelegram.xyz): - -### As a bot: - -POST/GET to `https://api.pwrtelegram.xyz/botTOKEN/madeline` - -Parameters: - -* method - messages.getFullChat -* params - `{"chat_id": InputPeer, }` - - - -### As a user: - -POST/GET to `https://api.pwrtelegram.xyz/userTOKEN/messages.getFullChat` - -Parameters: - -chat_id - Json encoded InputPeer - - - -Or, if you're into Lua: - -``` -messages_ChatFull = messages.getFullChat({chat_id=InputPeer, }) -``` - diff --git a/old_docs/API_docs_v53/methods/messages_requestEncryption.md b/old_docs/API_docs_v53/methods/messages_requestEncryption.md index 2fd1f825..c8476667 100644 --- a/old_docs/API_docs_v53/methods/messages_requestEncryption.md +++ b/old_docs/API_docs_v53/methods/messages_requestEncryption.md @@ -6,69 +6,8 @@ description: messages.requestEncryption parameters, return type and example [Back to methods index](index.md) -*You cannot use this method directly, see https://daniil.it/MadelineProto for more info on handling secret chats* +**You cannot use this method directly, see https://daniil.it/MadelineProto for more info on handling secret chats** -### Parameters: - -| Name | Type | Required | -|----------|:-------------:|---------:| -|user\_id|[InputUser](../types/InputUser.md) | Yes| -|g\_a|[bytes](../types/bytes.md) | Yes| - - -### Return type: [EncryptedChat](../types/EncryptedChat.md) - -### Example: - - -``` -$MadelineProto = new \danog\MadelineProto\API(); -if (isset($token)) { // Login as a bot - $MadelineProto->bot_login($token); -} -if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } - $MadelineProto->complete_phone_login($code); -} - -$EncryptedChat = $MadelineProto->messages->requestEncryption(['user_id' => InputUser, 'g_a' => 'bytes', ]); -``` - -Or, if you're using the [PWRTelegram HTTP API](https://pwrtelegram.xyz): - -### As a bot: - -POST/GET to `https://api.pwrtelegram.xyz/botTOKEN/madeline` - -Parameters: - -* method - messages.requestEncryption -* params - `{"user_id": InputUser, "g_a": "bytes", }` - - - -### As a user: - -POST/GET to `https://api.pwrtelegram.xyz/userTOKEN/messages.requestEncryption` - -Parameters: - -user_id - Json encoded InputUser -g_a - Json encoded bytes - - - -Or, if you're into Lua: - -``` -EncryptedChat = messages.requestEncryption({user_id=InputUser, g_a='bytes', }) -``` - diff --git a/old_docs/API_docs_v53/methods/updates_getChannelDifference.md b/old_docs/API_docs_v53/methods/updates_getChannelDifference.md index 51ea7aa5..2e69d1cd 100644 --- a/old_docs/API_docs_v53/methods/updates_getChannelDifference.md +++ b/old_docs/API_docs_v53/methods/updates_getChannelDifference.md @@ -6,73 +6,8 @@ description: updates.getChannelDifference parameters, return type and example [Back to methods index](index.md) -*You cannot use this method directly, see https://daniil.it/MadelineProto for more info on handling updates* +**You cannot use this method directly, see https://daniil.it/MadelineProto for more info on handling updates** -### Parameters: - -| Name | Type | Required | -|----------|:-------------:|---------:| -|channel|[InputChannel](../types/InputChannel.md) | Yes| -|filter|[ChannelMessagesFilter](../types/ChannelMessagesFilter.md) | Yes| -|pts|[int](../types/int.md) | Yes| -|limit|[int](../types/int.md) | Yes| - - -### Return type: [updates\_ChannelDifference](../types/updates_ChannelDifference.md) - -### Example: - - -``` -$MadelineProto = new \danog\MadelineProto\API(); -if (isset($token)) { // Login as a bot - $MadelineProto->bot_login($token); -} -if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } - $MadelineProto->complete_phone_login($code); -} - -$updates_ChannelDifference = $MadelineProto->updates->getChannelDifference(['channel' => InputChannel, 'filter' => ChannelMessagesFilter, 'pts' => int, 'limit' => int, ]); -``` - -Or, if you're using the [PWRTelegram HTTP API](https://pwrtelegram.xyz): - -### As a bot: - -POST/GET to `https://api.pwrtelegram.xyz/botTOKEN/madeline` - -Parameters: - -* method - updates.getChannelDifference -* params - `{"channel": InputChannel, "filter": ChannelMessagesFilter, "pts": int, "limit": int, }` - - - -### As a user: - -POST/GET to `https://api.pwrtelegram.xyz/userTOKEN/updates.getChannelDifference` - -Parameters: - -channel - Json encoded InputChannel -filter - Json encoded ChannelMessagesFilter -pts - Json encoded int -limit - Json encoded int - - - -Or, if you're into Lua: - -``` -updates_ChannelDifference = updates.getChannelDifference({channel=InputChannel, filter=ChannelMessagesFilter, pts=int, limit=int, }) -``` - diff --git a/old_docs/API_docs_v53/methods/updates_getDifference.md b/old_docs/API_docs_v53/methods/updates_getDifference.md index 53c7b078..9bcee79a 100644 --- a/old_docs/API_docs_v53/methods/updates_getDifference.md +++ b/old_docs/API_docs_v53/methods/updates_getDifference.md @@ -6,71 +6,8 @@ description: updates.getDifference parameters, return type and example [Back to methods index](index.md) -*You cannot use this method directly, see https://daniil.it/MadelineProto for more info on handling updates* +**You cannot use this method directly, see https://daniil.it/MadelineProto for more info on handling updates** -### Parameters: - -| Name | Type | Required | -|----------|:-------------:|---------:| -|pts|[int](../types/int.md) | Yes| -|date|[int](../types/int.md) | Yes| -|qts|[int](../types/int.md) | Yes| - - -### Return type: [updates\_Difference](../types/updates_Difference.md) - -### Example: - - -``` -$MadelineProto = new \danog\MadelineProto\API(); -if (isset($token)) { // Login as a bot - $MadelineProto->bot_login($token); -} -if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } - $MadelineProto->complete_phone_login($code); -} - -$updates_Difference = $MadelineProto->updates->getDifference(['pts' => int, 'date' => int, 'qts' => int, ]); -``` - -Or, if you're using the [PWRTelegram HTTP API](https://pwrtelegram.xyz): - -### As a bot: - -POST/GET to `https://api.pwrtelegram.xyz/botTOKEN/madeline` - -Parameters: - -* method - updates.getDifference -* params - `{"pts": int, "date": int, "qts": int, }` - - - -### As a user: - -POST/GET to `https://api.pwrtelegram.xyz/userTOKEN/updates.getDifference` - -Parameters: - -pts - Json encoded int -date - Json encoded int -qts - Json encoded int - - - -Or, if you're into Lua: - -``` -updates_Difference = updates.getDifference({pts=int, date=int, qts=int, }) -``` - diff --git a/old_docs/API_docs_v53/methods/updates_getState.md b/old_docs/API_docs_v53/methods/updates_getState.md index 51f6ae80..fd5955ba 100644 --- a/old_docs/API_docs_v53/methods/updates_getState.md +++ b/old_docs/API_docs_v53/methods/updates_getState.md @@ -6,61 +6,8 @@ description: updates.getState parameters, return type and example [Back to methods index](index.md) -*You cannot use this method directly, see https://daniil.it/MadelineProto for more info on handling updates* +**You cannot use this method directly, see https://daniil.it/MadelineProto for more info on handling updates** - - -### Return type: [updates\_State](../types/updates_State.md) - -### Example: - - -``` -$MadelineProto = new \danog\MadelineProto\API(); -if (isset($token)) { // Login as a bot - $MadelineProto->bot_login($token); -} -if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } - $MadelineProto->complete_phone_login($code); -} - -$updates_State = $MadelineProto->updates->getState(); -``` - -Or, if you're using the [PWRTelegram HTTP API](https://pwrtelegram.xyz): - -### As a bot: - -POST/GET to `https://api.pwrtelegram.xyz/botTOKEN/madeline` - -Parameters: - -* method - updates.getState -* params - `{}` - - - -### As a user: - -POST/GET to `https://api.pwrtelegram.xyz/userTOKEN/updates.getState` - -Parameters: - - - - -Or, if you're into Lua: - -``` -updates_State = updates.getState({}) -``` - diff --git a/old_docs/API_docs_v53/methods/upload_getFile.md b/old_docs/API_docs_v53/methods/upload_getFile.md index a1003003..add7d54e 100644 --- a/old_docs/API_docs_v53/methods/upload_getFile.md +++ b/old_docs/API_docs_v53/methods/upload_getFile.md @@ -6,71 +6,8 @@ description: upload.getFile parameters, return type and example [Back to methods index](index.md) -*You cannot use this method directly, use the upload, download_to_stream, download_to_file, download_to_dir methods instead; see https://daniil.it/MadelineProto for more info* +**You cannot use this method directly, use the upload, download_to_stream, download_to_file, download_to_dir methods instead; see https://daniil.it/MadelineProto for more info** -### Parameters: - -| Name | Type | Required | -|----------|:-------------:|---------:| -|location|[InputFileLocation](../types/InputFileLocation.md) | Yes| -|offset|[int](../types/int.md) | Yes| -|limit|[int](../types/int.md) | Yes| - - -### Return type: [upload\_File](../types/upload_File.md) - -### Example: - - -``` -$MadelineProto = new \danog\MadelineProto\API(); -if (isset($token)) { // Login as a bot - $MadelineProto->bot_login($token); -} -if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } - $MadelineProto->complete_phone_login($code); -} - -$upload_File = $MadelineProto->upload->getFile(['location' => InputFileLocation, 'offset' => int, 'limit' => int, ]); -``` - -Or, if you're using the [PWRTelegram HTTP API](https://pwrtelegram.xyz): - -### As a bot: - -POST/GET to `https://api.pwrtelegram.xyz/botTOKEN/madeline` - -Parameters: - -* method - upload.getFile -* params - `{"location": InputFileLocation, "offset": int, "limit": int, }` - - - -### As a user: - -POST/GET to `https://api.pwrtelegram.xyz/userTOKEN/upload.getFile` - -Parameters: - -location - Json encoded InputFileLocation -offset - Json encoded int -limit - Json encoded int - - - -Or, if you're into Lua: - -``` -upload_File = upload.getFile({location=InputFileLocation, offset=int, limit=int, }) -``` - diff --git a/old_docs/API_docs_v53/methods/upload_saveBigFilePart.md b/old_docs/API_docs_v53/methods/upload_saveBigFilePart.md index e5c96d89..b1c3ea28 100644 --- a/old_docs/API_docs_v53/methods/upload_saveBigFilePart.md +++ b/old_docs/API_docs_v53/methods/upload_saveBigFilePart.md @@ -6,73 +6,8 @@ description: upload.saveBigFilePart parameters, return type and example [Back to methods index](index.md) -*You cannot use this method directly, use the upload, download_to_stream, download_to_file, download_to_dir methods instead; see https://daniil.it/MadelineProto for more info* +**You cannot use this method directly, use the upload, download_to_stream, download_to_file, download_to_dir methods instead; see https://daniil.it/MadelineProto for more info** -### Parameters: - -| Name | Type | Required | -|----------|:-------------:|---------:| -|file\_id|[long](../types/long.md) | Yes| -|file\_part|[int](../types/int.md) | Yes| -|file\_total\_parts|[int](../types/int.md) | Yes| -|bytes|[bytes](../types/bytes.md) | Yes| - - -### Return type: [Bool](../types/Bool.md) - -### Example: - - -``` -$MadelineProto = new \danog\MadelineProto\API(); -if (isset($token)) { // Login as a bot - $MadelineProto->bot_login($token); -} -if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } - $MadelineProto->complete_phone_login($code); -} - -$Bool = $MadelineProto->upload->saveBigFilePart(['file_id' => long, 'file_part' => int, 'file_total_parts' => int, 'bytes' => 'bytes', ]); -``` - -Or, if you're using the [PWRTelegram HTTP API](https://pwrtelegram.xyz): - -### As a bot: - -POST/GET to `https://api.pwrtelegram.xyz/botTOKEN/madeline` - -Parameters: - -* method - upload.saveBigFilePart -* params - `{"file_id": long, "file_part": int, "file_total_parts": int, "bytes": "bytes", }` - - - -### As a user: - -POST/GET to `https://api.pwrtelegram.xyz/userTOKEN/upload.saveBigFilePart` - -Parameters: - -file_id - Json encoded long -file_part - Json encoded int -file_total_parts - Json encoded int -bytes - Json encoded bytes - - - -Or, if you're into Lua: - -``` -Bool = upload.saveBigFilePart({file_id=long, file_part=int, file_total_parts=int, bytes='bytes', }) -``` - diff --git a/old_docs/API_docs_v53/methods/upload_saveFilePart.md b/old_docs/API_docs_v53/methods/upload_saveFilePart.md index 1c16e4b2..c482f321 100644 --- a/old_docs/API_docs_v53/methods/upload_saveFilePart.md +++ b/old_docs/API_docs_v53/methods/upload_saveFilePart.md @@ -6,71 +6,8 @@ description: upload.saveFilePart parameters, return type and example [Back to methods index](index.md) -*You cannot use this method directly, use the upload, download_to_stream, download_to_file, download_to_dir methods instead; see https://daniil.it/MadelineProto for more info* +**You cannot use this method directly, use the upload, download_to_stream, download_to_file, download_to_dir methods instead; see https://daniil.it/MadelineProto for more info** -### Parameters: - -| Name | Type | Required | -|----------|:-------------:|---------:| -|file\_id|[long](../types/long.md) | Yes| -|file\_part|[int](../types/int.md) | Yes| -|bytes|[bytes](../types/bytes.md) | Yes| - - -### Return type: [Bool](../types/Bool.md) - -### Example: - - -``` -$MadelineProto = new \danog\MadelineProto\API(); -if (isset($token)) { // Login as a bot - $MadelineProto->bot_login($token); -} -if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } - $MadelineProto->complete_phone_login($code); -} - -$Bool = $MadelineProto->upload->saveFilePart(['file_id' => long, 'file_part' => int, 'bytes' => 'bytes', ]); -``` - -Or, if you're using the [PWRTelegram HTTP API](https://pwrtelegram.xyz): - -### As a bot: - -POST/GET to `https://api.pwrtelegram.xyz/botTOKEN/madeline` - -Parameters: - -* method - upload.saveFilePart -* params - `{"file_id": long, "file_part": int, "bytes": "bytes", }` - - - -### As a user: - -POST/GET to `https://api.pwrtelegram.xyz/userTOKEN/upload.saveFilePart` - -Parameters: - -file_id - Json encoded long -file_part - Json encoded int -bytes - Json encoded bytes - - - -Or, if you're into Lua: - -``` -Bool = upload.saveFilePart({file_id=long, file_part=int, bytes='bytes', }) -``` - diff --git a/old_docs/API_docs_v53/methods/users_getFullUser.md b/old_docs/API_docs_v53/methods/users_getFullUser.md index 645ab12e..4ec831ec 100644 --- a/old_docs/API_docs_v53/methods/users_getFullUser.md +++ b/old_docs/API_docs_v53/methods/users_getFullUser.md @@ -6,67 +6,8 @@ description: users.getFullUser parameters, return type and example [Back to methods index](index.md) -*You cannot use this method directly, use the get_pwr_chat, get_info, get_full_info methods instead (see https://daniil.it/MadelineProto for more info)* +**You cannot use this method directly, use the get_pwr_chat, get_info, get_full_info methods instead (see https://daniil.it/MadelineProto for more info)** -### Parameters: - -| Name | Type | Required | -|----------|:-------------:|---------:| -|id|[InputUser](../types/InputUser.md) | Yes| - - -### Return type: [UserFull](../types/UserFull.md) - -### Example: - - -``` -$MadelineProto = new \danog\MadelineProto\API(); -if (isset($token)) { // Login as a bot - $MadelineProto->bot_login($token); -} -if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } - $MadelineProto->complete_phone_login($code); -} - -$UserFull = $MadelineProto->users->getFullUser(['id' => InputUser, ]); -``` - -Or, if you're using the [PWRTelegram HTTP API](https://pwrtelegram.xyz): - -### As a bot: - -POST/GET to `https://api.pwrtelegram.xyz/botTOKEN/madeline` - -Parameters: - -* method - users.getFullUser -* params - `{"id": InputUser, }` - - - -### As a user: - -POST/GET to `https://api.pwrtelegram.xyz/userTOKEN/users.getFullUser` - -Parameters: - -id - Json encoded InputUser - - - -Or, if you're into Lua: - -``` -UserFull = users.getFullUser({id=InputUser, }) -``` - diff --git a/old_docs/API_docs_v55/constructors/README.md b/old_docs/API_docs_v55/constructors/README.md index f165eefd..eb5cc0c1 100644 --- a/old_docs/API_docs_v55/constructors/README.md +++ b/old_docs/API_docs_v55/constructors/README.md @@ -4,9 +4,6 @@ description: List of constructors --- # Constructors [Back to API documentation index](..) - - - ***

[$accountDaysTTL](../constructors/accountDaysTTL.md) = \['days' => [int](../types/int.md), \]; diff --git a/old_docs/API_docs_v55/methods/auth_importBotAuthorization.md b/old_docs/API_docs_v55/methods/auth_importBotAuthorization.md index 0d8836b6..57521a13 100644 --- a/old_docs/API_docs_v55/methods/auth_importBotAuthorization.md +++ b/old_docs/API_docs_v55/methods/auth_importBotAuthorization.md @@ -6,71 +6,8 @@ description: auth.importBotAuthorization parameters, return type and example [Back to methods index](index.md) -*You cannot use this method directly, use the bot_login method instead (see https://daniil.it/MadelineProto for more info)* +**You cannot use this method directly, use the bot_login method instead (see https://daniil.it/MadelineProto for more info)** -### Parameters: - -| Name | Type | Required | -|----------|:-------------:|---------:| -|api\_id|[int](../types/int.md) | Yes| -|api\_hash|[string](../types/string.md) | Yes| -|bot\_auth\_token|[string](../types/string.md) | Yes| - - -### Return type: [auth\_Authorization](../types/auth_Authorization.md) - -### Example: - - -``` -$MadelineProto = new \danog\MadelineProto\API(); -if (isset($token)) { // Login as a bot - $MadelineProto->bot_login($token); -} -if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } - $MadelineProto->complete_phone_login($code); -} - -$auth_Authorization = $MadelineProto->auth->importBotAuthorization(['api_id' => int, 'api_hash' => 'string', 'bot_auth_token' => 'string', ]); -``` - -Or, if you're using the [PWRTelegram HTTP API](https://pwrtelegram.xyz): - -### As a bot: - -POST/GET to `https://api.pwrtelegram.xyz/botTOKEN/madeline` - -Parameters: - -* method - auth.importBotAuthorization -* params - `{"api_id": int, "api_hash": "string", "bot_auth_token": "string", }` - - - -### As a user: - -POST/GET to `https://api.pwrtelegram.xyz/userTOKEN/auth.importBotAuthorization` - -Parameters: - -api_id - Json encoded int -api_hash - Json encoded string -bot_auth_token - Json encoded string - - - -Or, if you're into Lua: - -``` -auth_Authorization = auth.importBotAuthorization({api_id=int, api_hash='string', bot_auth_token='string', }) -``` - diff --git a/old_docs/API_docs_v55/methods/auth_logOut.md b/old_docs/API_docs_v55/methods/auth_logOut.md index 12159bab..7d5bb3f7 100644 --- a/old_docs/API_docs_v55/methods/auth_logOut.md +++ b/old_docs/API_docs_v55/methods/auth_logOut.md @@ -6,61 +6,8 @@ description: auth.logOut parameters, return type and example [Back to methods index](index.md) -*You cannot use this method directly, use the logout method instead (see https://daniil.it/MadelineProto for more info)* +**You cannot use this method directly, use the logout method instead (see https://daniil.it/MadelineProto for more info)** - - -### Return type: [Bool](../types/Bool.md) - -### Example: - - -``` -$MadelineProto = new \danog\MadelineProto\API(); -if (isset($token)) { // Login as a bot - $MadelineProto->bot_login($token); -} -if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } - $MadelineProto->complete_phone_login($code); -} - -$Bool = $MadelineProto->auth->logOut(); -``` - -Or, if you're using the [PWRTelegram HTTP API](https://pwrtelegram.xyz): - -### As a bot: - -POST/GET to `https://api.pwrtelegram.xyz/botTOKEN/madeline` - -Parameters: - -* method - auth.logOut -* params - `{}` - - - -### As a user: - -POST/GET to `https://api.pwrtelegram.xyz/userTOKEN/auth.logOut` - -Parameters: - - - - -Or, if you're into Lua: - -``` -Bool = auth.logOut({}) -``` - diff --git a/old_docs/API_docs_v55/methods/auth_sendCode.md b/old_docs/API_docs_v55/methods/auth_sendCode.md index bda88218..22d1df94 100644 --- a/old_docs/API_docs_v55/methods/auth_sendCode.md +++ b/old_docs/API_docs_v55/methods/auth_sendCode.md @@ -6,75 +6,8 @@ description: auth.sendCode parameters, return type and example [Back to methods index](index.md) -*You cannot use this method directly, use the phone_login method instead (see https://daniil.it/MadelineProto for more info)* +**You cannot use this method directly, use the phone_login method instead (see https://daniil.it/MadelineProto for more info)** -### Parameters: - -| Name | Type | Required | -|----------|:-------------:|---------:| -|allow\_flashcall|[Bool](../types/Bool.md) | Optional| -|phone\_number|[string](../types/string.md) | Yes| -|current\_number|[Bool](../types/Bool.md) | Optional| -|api\_id|[int](../types/int.md) | Yes| -|api\_hash|[string](../types/string.md) | Yes| - - -### Return type: [auth\_SentCode](../types/auth_SentCode.md) - -### Example: - - -``` -$MadelineProto = new \danog\MadelineProto\API(); -if (isset($token)) { // Login as a bot - $MadelineProto->bot_login($token); -} -if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } - $MadelineProto->complete_phone_login($code); -} - -$auth_SentCode = $MadelineProto->auth->sendCode(['allow_flashcall' => Bool, 'phone_number' => 'string', 'current_number' => Bool, 'api_id' => int, 'api_hash' => 'string', ]); -``` - -Or, if you're using the [PWRTelegram HTTP API](https://pwrtelegram.xyz): - -### As a bot: - -POST/GET to `https://api.pwrtelegram.xyz/botTOKEN/madeline` - -Parameters: - -* method - auth.sendCode -* params - `{"allow_flashcall": Bool, "phone_number": "string", "current_number": Bool, "api_id": int, "api_hash": "string", }` - - - -### As a user: - -POST/GET to `https://api.pwrtelegram.xyz/userTOKEN/auth.sendCode` - -Parameters: - -allow_flashcall - Json encoded Bool -phone_number - Json encoded string -current_number - Json encoded Bool -api_id - Json encoded int -api_hash - Json encoded string - - - -Or, if you're into Lua: - -``` -auth_SentCode = auth.sendCode({allow_flashcall=Bool, phone_number='string', current_number=Bool, api_id=int, api_hash='string', }) -``` - diff --git a/old_docs/API_docs_v55/methods/auth_signIn.md b/old_docs/API_docs_v55/methods/auth_signIn.md index 75c50d70..ab40bb4d 100644 --- a/old_docs/API_docs_v55/methods/auth_signIn.md +++ b/old_docs/API_docs_v55/methods/auth_signIn.md @@ -6,71 +6,8 @@ description: auth.signIn parameters, return type and example [Back to methods index](index.md) -*You cannot use this method directly, use the complete_phone_login method instead (see https://daniil.it/MadelineProto for more info)* +**You cannot use this method directly, use the complete_phone_login method instead (see https://daniil.it/MadelineProto for more info)** -### Parameters: - -| Name | Type | Required | -|----------|:-------------:|---------:| -|phone\_number|[string](../types/string.md) | Yes| -|phone\_code\_hash|[string](../types/string.md) | Yes| -|phone\_code|[string](../types/string.md) | Yes| - - -### Return type: [auth\_Authorization](../types/auth_Authorization.md) - -### Example: - - -``` -$MadelineProto = new \danog\MadelineProto\API(); -if (isset($token)) { // Login as a bot - $MadelineProto->bot_login($token); -} -if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } - $MadelineProto->complete_phone_login($code); -} - -$auth_Authorization = $MadelineProto->auth->signIn(['phone_number' => 'string', 'phone_code_hash' => 'string', 'phone_code' => 'string', ]); -``` - -Or, if you're using the [PWRTelegram HTTP API](https://pwrtelegram.xyz): - -### As a bot: - -POST/GET to `https://api.pwrtelegram.xyz/botTOKEN/madeline` - -Parameters: - -* method - auth.signIn -* params - `{"phone_number": "string", "phone_code_hash": "string", "phone_code": "string", }` - - - -### As a user: - -POST/GET to `https://api.pwrtelegram.xyz/userTOKEN/auth.signIn` - -Parameters: - -phone_number - Json encoded string -phone_code_hash - Json encoded string -phone_code - Json encoded string - - - -Or, if you're into Lua: - -``` -auth_Authorization = auth.signIn({phone_number='string', phone_code_hash='string', phone_code='string', }) -``` - diff --git a/old_docs/API_docs_v55/methods/auth_signUp.md b/old_docs/API_docs_v55/methods/auth_signUp.md index f2a72b68..042d1191 100644 --- a/old_docs/API_docs_v55/methods/auth_signUp.md +++ b/old_docs/API_docs_v55/methods/auth_signUp.md @@ -6,75 +6,8 @@ description: auth.signUp parameters, return type and example [Back to methods index](index.md) -*You cannot use this method directly, use the complete_signup method instead (see https://daniil.it/MadelineProto for more info)* +**You cannot use this method directly, use the complete_signup method instead (see https://daniil.it/MadelineProto for more info)** -### Parameters: - -| Name | Type | Required | -|----------|:-------------:|---------:| -|phone\_number|[string](../types/string.md) | Yes| -|phone\_code\_hash|[string](../types/string.md) | Yes| -|phone\_code|[string](../types/string.md) | Yes| -|first\_name|[string](../types/string.md) | Yes| -|last\_name|[string](../types/string.md) | Yes| - - -### Return type: [auth\_Authorization](../types/auth_Authorization.md) - -### Example: - - -``` -$MadelineProto = new \danog\MadelineProto\API(); -if (isset($token)) { // Login as a bot - $MadelineProto->bot_login($token); -} -if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } - $MadelineProto->complete_phone_login($code); -} - -$auth_Authorization = $MadelineProto->auth->signUp(['phone_number' => 'string', 'phone_code_hash' => 'string', 'phone_code' => 'string', 'first_name' => 'string', 'last_name' => 'string', ]); -``` - -Or, if you're using the [PWRTelegram HTTP API](https://pwrtelegram.xyz): - -### As a bot: - -POST/GET to `https://api.pwrtelegram.xyz/botTOKEN/madeline` - -Parameters: - -* method - auth.signUp -* params - `{"phone_number": "string", "phone_code_hash": "string", "phone_code": "string", "first_name": "string", "last_name": "string", }` - - - -### As a user: - -POST/GET to `https://api.pwrtelegram.xyz/userTOKEN/auth.signUp` - -Parameters: - -phone_number - Json encoded string -phone_code_hash - Json encoded string -phone_code - Json encoded string -first_name - Json encoded string -last_name - Json encoded string - - - -Or, if you're into Lua: - -``` -auth_Authorization = auth.signUp({phone_number='string', phone_code_hash='string', phone_code='string', first_name='string', last_name='string', }) -``` - diff --git a/old_docs/API_docs_v55/methods/channels_getFullChannel.md b/old_docs/API_docs_v55/methods/channels_getFullChannel.md index 340efcfe..58dbe057 100644 --- a/old_docs/API_docs_v55/methods/channels_getFullChannel.md +++ b/old_docs/API_docs_v55/methods/channels_getFullChannel.md @@ -6,67 +6,8 @@ description: channels.getFullChannel parameters, return type and example [Back to methods index](index.md) -*You cannot use this method directly, use the get_pwr_chat, get_info, get_full_info methods instead (see https://daniil.it/MadelineProto for more info)* +**You cannot use this method directly, use the get_pwr_chat, get_info, get_full_info methods instead (see https://daniil.it/MadelineProto for more info)** -### Parameters: - -| Name | Type | Required | -|----------|:-------------:|---------:| -|channel|[InputChannel](../types/InputChannel.md) | Yes| - - -### Return type: [messages\_ChatFull](../types/messages_ChatFull.md) - -### Example: - - -``` -$MadelineProto = new \danog\MadelineProto\API(); -if (isset($token)) { // Login as a bot - $MadelineProto->bot_login($token); -} -if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } - $MadelineProto->complete_phone_login($code); -} - -$messages_ChatFull = $MadelineProto->channels->getFullChannel(['channel' => InputChannel, ]); -``` - -Or, if you're using the [PWRTelegram HTTP API](https://pwrtelegram.xyz): - -### As a bot: - -POST/GET to `https://api.pwrtelegram.xyz/botTOKEN/madeline` - -Parameters: - -* method - channels.getFullChannel -* params - `{"channel": InputChannel, }` - - - -### As a user: - -POST/GET to `https://api.pwrtelegram.xyz/userTOKEN/channels.getFullChannel` - -Parameters: - -channel - Json encoded InputChannel - - - -Or, if you're into Lua: - -``` -messages_ChatFull = channels.getFullChannel({channel=InputChannel, }) -``` - diff --git a/old_docs/API_docs_v55/methods/channels_getParticipants.md b/old_docs/API_docs_v55/methods/channels_getParticipants.md index 4c6e09cc..d84cf09c 100644 --- a/old_docs/API_docs_v55/methods/channels_getParticipants.md +++ b/old_docs/API_docs_v55/methods/channels_getParticipants.md @@ -6,73 +6,8 @@ description: channels.getParticipants parameters, return type and example [Back to methods index](index.md) -*You cannot use this method directly, use the get_pwr_chat, get_info, get_full_info methods instead (see https://daniil.it/MadelineProto for more info)* +**You cannot use this method directly, use the get_pwr_chat, get_info, get_full_info methods instead (see https://daniil.it/MadelineProto for more info)** -### Parameters: - -| Name | Type | Required | -|----------|:-------------:|---------:| -|channel|[InputChannel](../types/InputChannel.md) | Yes| -|filter|[ChannelParticipantsFilter](../types/ChannelParticipantsFilter.md) | Yes| -|offset|[int](../types/int.md) | Yes| -|limit|[int](../types/int.md) | Yes| - - -### Return type: [channels\_ChannelParticipants](../types/channels_ChannelParticipants.md) - -### Example: - - -``` -$MadelineProto = new \danog\MadelineProto\API(); -if (isset($token)) { // Login as a bot - $MadelineProto->bot_login($token); -} -if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } - $MadelineProto->complete_phone_login($code); -} - -$channels_ChannelParticipants = $MadelineProto->channels->getParticipants(['channel' => InputChannel, 'filter' => ChannelParticipantsFilter, 'offset' => int, 'limit' => int, ]); -``` - -Or, if you're using the [PWRTelegram HTTP API](https://pwrtelegram.xyz): - -### As a bot: - -POST/GET to `https://api.pwrtelegram.xyz/botTOKEN/madeline` - -Parameters: - -* method - channels.getParticipants -* params - `{"channel": InputChannel, "filter": ChannelParticipantsFilter, "offset": int, "limit": int, }` - - - -### As a user: - -POST/GET to `https://api.pwrtelegram.xyz/userTOKEN/channels.getParticipants` - -Parameters: - -channel - Json encoded InputChannel -filter - Json encoded ChannelParticipantsFilter -offset - Json encoded int -limit - Json encoded int - - - -Or, if you're into Lua: - -``` -channels_ChannelParticipants = channels.getParticipants({channel=InputChannel, filter=ChannelParticipantsFilter, offset=int, limit=int, }) -``` - diff --git a/old_docs/API_docs_v55/methods/contacts_resolveUsername.md b/old_docs/API_docs_v55/methods/contacts_resolveUsername.md index 90e72851..b665b382 100644 --- a/old_docs/API_docs_v55/methods/contacts_resolveUsername.md +++ b/old_docs/API_docs_v55/methods/contacts_resolveUsername.md @@ -6,67 +6,8 @@ description: contacts.resolveUsername parameters, return type and example [Back to methods index](index.md) -*You cannot use this method directly, use the resolve_username, get_pwr_chat, get_info, get_full_info methods instead (see https://daniil.it/MadelineProto for more info)* +**You cannot use this method directly, use the resolve_username, get_pwr_chat, get_info, get_full_info methods instead (see https://daniil.it/MadelineProto for more info)** -### Parameters: - -| Name | Type | Required | -|----------|:-------------:|---------:| -|username|[string](../types/string.md) | Yes| - - -### Return type: [contacts\_ResolvedPeer](../types/contacts_ResolvedPeer.md) - -### Example: - - -``` -$MadelineProto = new \danog\MadelineProto\API(); -if (isset($token)) { // Login as a bot - $MadelineProto->bot_login($token); -} -if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } - $MadelineProto->complete_phone_login($code); -} - -$contacts_ResolvedPeer = $MadelineProto->contacts->resolveUsername(['username' => 'string', ]); -``` - -Or, if you're using the [PWRTelegram HTTP API](https://pwrtelegram.xyz): - -### As a bot: - -POST/GET to `https://api.pwrtelegram.xyz/botTOKEN/madeline` - -Parameters: - -* method - contacts.resolveUsername -* params - `{"username": "string", }` - - - -### As a user: - -POST/GET to `https://api.pwrtelegram.xyz/userTOKEN/contacts.resolveUsername` - -Parameters: - -username - Json encoded string - - - -Or, if you're into Lua: - -``` -contacts_ResolvedPeer = contacts.resolveUsername({username='string', }) -``` - diff --git a/old_docs/API_docs_v55/methods/messages_acceptEncryption.md b/old_docs/API_docs_v55/methods/messages_acceptEncryption.md index 548087b6..243c4c00 100644 --- a/old_docs/API_docs_v55/methods/messages_acceptEncryption.md +++ b/old_docs/API_docs_v55/methods/messages_acceptEncryption.md @@ -6,71 +6,8 @@ description: messages.acceptEncryption parameters, return type and example [Back to methods index](index.md) -*You cannot use this method directly, see https://daniil.it/MadelineProto for more info on handling secret chats* +**You cannot use this method directly, see https://daniil.it/MadelineProto for more info on handling secret chats** -### Parameters: - -| Name | Type | Required | -|----------|:-------------:|---------:| -|peer|[InputEncryptedChat](../types/InputEncryptedChat.md) | Yes| -|g\_b|[bytes](../types/bytes.md) | Yes| -|key\_fingerprint|[long](../types/long.md) | Yes| - - -### Return type: [EncryptedChat](../types/EncryptedChat.md) - -### Example: - - -``` -$MadelineProto = new \danog\MadelineProto\API(); -if (isset($token)) { // Login as a bot - $MadelineProto->bot_login($token); -} -if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } - $MadelineProto->complete_phone_login($code); -} - -$EncryptedChat = $MadelineProto->messages->acceptEncryption(['peer' => InputEncryptedChat, 'g_b' => 'bytes', 'key_fingerprint' => long, ]); -``` - -Or, if you're using the [PWRTelegram HTTP API](https://pwrtelegram.xyz): - -### As a bot: - -POST/GET to `https://api.pwrtelegram.xyz/botTOKEN/madeline` - -Parameters: - -* method - messages.acceptEncryption -* params - `{"peer": InputEncryptedChat, "g_b": "bytes", "key_fingerprint": long, }` - - - -### As a user: - -POST/GET to `https://api.pwrtelegram.xyz/userTOKEN/messages.acceptEncryption` - -Parameters: - -peer - Json encoded InputEncryptedChat -g_b - Json encoded bytes -key_fingerprint - Json encoded long - - - -Or, if you're into Lua: - -``` -EncryptedChat = messages.acceptEncryption({peer=InputEncryptedChat, g_b='bytes', key_fingerprint=long, }) -``` - diff --git a/old_docs/API_docs_v55/methods/messages_discardEncryption.md b/old_docs/API_docs_v55/methods/messages_discardEncryption.md index 72648e9d..3a9dc58b 100644 --- a/old_docs/API_docs_v55/methods/messages_discardEncryption.md +++ b/old_docs/API_docs_v55/methods/messages_discardEncryption.md @@ -6,67 +6,8 @@ description: messages.discardEncryption parameters, return type and example [Back to methods index](index.md) -*You cannot use this method directly, see https://daniil.it/MadelineProto for more info on handling secret chats* +**You cannot use this method directly, see https://daniil.it/MadelineProto for more info on handling secret chats** -### Parameters: - -| Name | Type | Required | -|----------|:-------------:|---------:| -|chat\_id|[int](../types/int.md) | Yes| - - -### Return type: [Bool](../types/Bool.md) - -### Example: - - -``` -$MadelineProto = new \danog\MadelineProto\API(); -if (isset($token)) { // Login as a bot - $MadelineProto->bot_login($token); -} -if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } - $MadelineProto->complete_phone_login($code); -} - -$Bool = $MadelineProto->messages->discardEncryption(['chat_id' => int, ]); -``` - -Or, if you're using the [PWRTelegram HTTP API](https://pwrtelegram.xyz): - -### As a bot: - -POST/GET to `https://api.pwrtelegram.xyz/botTOKEN/madeline` - -Parameters: - -* method - messages.discardEncryption -* params - `{"chat_id": int, }` - - - -### As a user: - -POST/GET to `https://api.pwrtelegram.xyz/userTOKEN/messages.discardEncryption` - -Parameters: - -chat_id - Json encoded int - - - -Or, if you're into Lua: - -``` -Bool = messages.discardEncryption({chat_id=int, }) -``` - diff --git a/old_docs/API_docs_v55/methods/messages_getFullChat.md b/old_docs/API_docs_v55/methods/messages_getFullChat.md index 62102b64..ffa9c281 100644 --- a/old_docs/API_docs_v55/methods/messages_getFullChat.md +++ b/old_docs/API_docs_v55/methods/messages_getFullChat.md @@ -6,67 +6,8 @@ description: messages.getFullChat parameters, return type and example [Back to methods index](index.md) -*You cannot use this method directly, use the get_pwr_chat, get_info, get_full_info methods instead (see https://daniil.it/MadelineProto for more info)* +**You cannot use this method directly, use the get_pwr_chat, get_info, get_full_info methods instead (see https://daniil.it/MadelineProto for more info)** -### Parameters: - -| Name | Type | Required | -|----------|:-------------:|---------:| -|chat\_id|[InputPeer](../types/InputPeer.md) | Yes| - - -### Return type: [messages\_ChatFull](../types/messages_ChatFull.md) - -### Example: - - -``` -$MadelineProto = new \danog\MadelineProto\API(); -if (isset($token)) { // Login as a bot - $MadelineProto->bot_login($token); -} -if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } - $MadelineProto->complete_phone_login($code); -} - -$messages_ChatFull = $MadelineProto->messages->getFullChat(['chat_id' => InputPeer, ]); -``` - -Or, if you're using the [PWRTelegram HTTP API](https://pwrtelegram.xyz): - -### As a bot: - -POST/GET to `https://api.pwrtelegram.xyz/botTOKEN/madeline` - -Parameters: - -* method - messages.getFullChat -* params - `{"chat_id": InputPeer, }` - - - -### As a user: - -POST/GET to `https://api.pwrtelegram.xyz/userTOKEN/messages.getFullChat` - -Parameters: - -chat_id - Json encoded InputPeer - - - -Or, if you're into Lua: - -``` -messages_ChatFull = messages.getFullChat({chat_id=InputPeer, }) -``` - diff --git a/old_docs/API_docs_v55/methods/messages_requestEncryption.md b/old_docs/API_docs_v55/methods/messages_requestEncryption.md index 2fd1f825..c8476667 100644 --- a/old_docs/API_docs_v55/methods/messages_requestEncryption.md +++ b/old_docs/API_docs_v55/methods/messages_requestEncryption.md @@ -6,69 +6,8 @@ description: messages.requestEncryption parameters, return type and example [Back to methods index](index.md) -*You cannot use this method directly, see https://daniil.it/MadelineProto for more info on handling secret chats* +**You cannot use this method directly, see https://daniil.it/MadelineProto for more info on handling secret chats** -### Parameters: - -| Name | Type | Required | -|----------|:-------------:|---------:| -|user\_id|[InputUser](../types/InputUser.md) | Yes| -|g\_a|[bytes](../types/bytes.md) | Yes| - - -### Return type: [EncryptedChat](../types/EncryptedChat.md) - -### Example: - - -``` -$MadelineProto = new \danog\MadelineProto\API(); -if (isset($token)) { // Login as a bot - $MadelineProto->bot_login($token); -} -if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } - $MadelineProto->complete_phone_login($code); -} - -$EncryptedChat = $MadelineProto->messages->requestEncryption(['user_id' => InputUser, 'g_a' => 'bytes', ]); -``` - -Or, if you're using the [PWRTelegram HTTP API](https://pwrtelegram.xyz): - -### As a bot: - -POST/GET to `https://api.pwrtelegram.xyz/botTOKEN/madeline` - -Parameters: - -* method - messages.requestEncryption -* params - `{"user_id": InputUser, "g_a": "bytes", }` - - - -### As a user: - -POST/GET to `https://api.pwrtelegram.xyz/userTOKEN/messages.requestEncryption` - -Parameters: - -user_id - Json encoded InputUser -g_a - Json encoded bytes - - - -Or, if you're into Lua: - -``` -EncryptedChat = messages.requestEncryption({user_id=InputUser, g_a='bytes', }) -``` - diff --git a/old_docs/API_docs_v55/methods/updates_getChannelDifference.md b/old_docs/API_docs_v55/methods/updates_getChannelDifference.md index 51ea7aa5..2e69d1cd 100644 --- a/old_docs/API_docs_v55/methods/updates_getChannelDifference.md +++ b/old_docs/API_docs_v55/methods/updates_getChannelDifference.md @@ -6,73 +6,8 @@ description: updates.getChannelDifference parameters, return type and example [Back to methods index](index.md) -*You cannot use this method directly, see https://daniil.it/MadelineProto for more info on handling updates* +**You cannot use this method directly, see https://daniil.it/MadelineProto for more info on handling updates** -### Parameters: - -| Name | Type | Required | -|----------|:-------------:|---------:| -|channel|[InputChannel](../types/InputChannel.md) | Yes| -|filter|[ChannelMessagesFilter](../types/ChannelMessagesFilter.md) | Yes| -|pts|[int](../types/int.md) | Yes| -|limit|[int](../types/int.md) | Yes| - - -### Return type: [updates\_ChannelDifference](../types/updates_ChannelDifference.md) - -### Example: - - -``` -$MadelineProto = new \danog\MadelineProto\API(); -if (isset($token)) { // Login as a bot - $MadelineProto->bot_login($token); -} -if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } - $MadelineProto->complete_phone_login($code); -} - -$updates_ChannelDifference = $MadelineProto->updates->getChannelDifference(['channel' => InputChannel, 'filter' => ChannelMessagesFilter, 'pts' => int, 'limit' => int, ]); -``` - -Or, if you're using the [PWRTelegram HTTP API](https://pwrtelegram.xyz): - -### As a bot: - -POST/GET to `https://api.pwrtelegram.xyz/botTOKEN/madeline` - -Parameters: - -* method - updates.getChannelDifference -* params - `{"channel": InputChannel, "filter": ChannelMessagesFilter, "pts": int, "limit": int, }` - - - -### As a user: - -POST/GET to `https://api.pwrtelegram.xyz/userTOKEN/updates.getChannelDifference` - -Parameters: - -channel - Json encoded InputChannel -filter - Json encoded ChannelMessagesFilter -pts - Json encoded int -limit - Json encoded int - - - -Or, if you're into Lua: - -``` -updates_ChannelDifference = updates.getChannelDifference({channel=InputChannel, filter=ChannelMessagesFilter, pts=int, limit=int, }) -``` - diff --git a/old_docs/API_docs_v55/methods/updates_getDifference.md b/old_docs/API_docs_v55/methods/updates_getDifference.md index 53c7b078..9bcee79a 100644 --- a/old_docs/API_docs_v55/methods/updates_getDifference.md +++ b/old_docs/API_docs_v55/methods/updates_getDifference.md @@ -6,71 +6,8 @@ description: updates.getDifference parameters, return type and example [Back to methods index](index.md) -*You cannot use this method directly, see https://daniil.it/MadelineProto for more info on handling updates* +**You cannot use this method directly, see https://daniil.it/MadelineProto for more info on handling updates** -### Parameters: - -| Name | Type | Required | -|----------|:-------------:|---------:| -|pts|[int](../types/int.md) | Yes| -|date|[int](../types/int.md) | Yes| -|qts|[int](../types/int.md) | Yes| - - -### Return type: [updates\_Difference](../types/updates_Difference.md) - -### Example: - - -``` -$MadelineProto = new \danog\MadelineProto\API(); -if (isset($token)) { // Login as a bot - $MadelineProto->bot_login($token); -} -if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } - $MadelineProto->complete_phone_login($code); -} - -$updates_Difference = $MadelineProto->updates->getDifference(['pts' => int, 'date' => int, 'qts' => int, ]); -``` - -Or, if you're using the [PWRTelegram HTTP API](https://pwrtelegram.xyz): - -### As a bot: - -POST/GET to `https://api.pwrtelegram.xyz/botTOKEN/madeline` - -Parameters: - -* method - updates.getDifference -* params - `{"pts": int, "date": int, "qts": int, }` - - - -### As a user: - -POST/GET to `https://api.pwrtelegram.xyz/userTOKEN/updates.getDifference` - -Parameters: - -pts - Json encoded int -date - Json encoded int -qts - Json encoded int - - - -Or, if you're into Lua: - -``` -updates_Difference = updates.getDifference({pts=int, date=int, qts=int, }) -``` - diff --git a/old_docs/API_docs_v55/methods/updates_getState.md b/old_docs/API_docs_v55/methods/updates_getState.md index 51f6ae80..fd5955ba 100644 --- a/old_docs/API_docs_v55/methods/updates_getState.md +++ b/old_docs/API_docs_v55/methods/updates_getState.md @@ -6,61 +6,8 @@ description: updates.getState parameters, return type and example [Back to methods index](index.md) -*You cannot use this method directly, see https://daniil.it/MadelineProto for more info on handling updates* +**You cannot use this method directly, see https://daniil.it/MadelineProto for more info on handling updates** - - -### Return type: [updates\_State](../types/updates_State.md) - -### Example: - - -``` -$MadelineProto = new \danog\MadelineProto\API(); -if (isset($token)) { // Login as a bot - $MadelineProto->bot_login($token); -} -if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } - $MadelineProto->complete_phone_login($code); -} - -$updates_State = $MadelineProto->updates->getState(); -``` - -Or, if you're using the [PWRTelegram HTTP API](https://pwrtelegram.xyz): - -### As a bot: - -POST/GET to `https://api.pwrtelegram.xyz/botTOKEN/madeline` - -Parameters: - -* method - updates.getState -* params - `{}` - - - -### As a user: - -POST/GET to `https://api.pwrtelegram.xyz/userTOKEN/updates.getState` - -Parameters: - - - - -Or, if you're into Lua: - -``` -updates_State = updates.getState({}) -``` - diff --git a/old_docs/API_docs_v55/methods/upload_getFile.md b/old_docs/API_docs_v55/methods/upload_getFile.md index a1003003..add7d54e 100644 --- a/old_docs/API_docs_v55/methods/upload_getFile.md +++ b/old_docs/API_docs_v55/methods/upload_getFile.md @@ -6,71 +6,8 @@ description: upload.getFile parameters, return type and example [Back to methods index](index.md) -*You cannot use this method directly, use the upload, download_to_stream, download_to_file, download_to_dir methods instead; see https://daniil.it/MadelineProto for more info* +**You cannot use this method directly, use the upload, download_to_stream, download_to_file, download_to_dir methods instead; see https://daniil.it/MadelineProto for more info** -### Parameters: - -| Name | Type | Required | -|----------|:-------------:|---------:| -|location|[InputFileLocation](../types/InputFileLocation.md) | Yes| -|offset|[int](../types/int.md) | Yes| -|limit|[int](../types/int.md) | Yes| - - -### Return type: [upload\_File](../types/upload_File.md) - -### Example: - - -``` -$MadelineProto = new \danog\MadelineProto\API(); -if (isset($token)) { // Login as a bot - $MadelineProto->bot_login($token); -} -if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } - $MadelineProto->complete_phone_login($code); -} - -$upload_File = $MadelineProto->upload->getFile(['location' => InputFileLocation, 'offset' => int, 'limit' => int, ]); -``` - -Or, if you're using the [PWRTelegram HTTP API](https://pwrtelegram.xyz): - -### As a bot: - -POST/GET to `https://api.pwrtelegram.xyz/botTOKEN/madeline` - -Parameters: - -* method - upload.getFile -* params - `{"location": InputFileLocation, "offset": int, "limit": int, }` - - - -### As a user: - -POST/GET to `https://api.pwrtelegram.xyz/userTOKEN/upload.getFile` - -Parameters: - -location - Json encoded InputFileLocation -offset - Json encoded int -limit - Json encoded int - - - -Or, if you're into Lua: - -``` -upload_File = upload.getFile({location=InputFileLocation, offset=int, limit=int, }) -``` - diff --git a/old_docs/API_docs_v55/methods/upload_saveBigFilePart.md b/old_docs/API_docs_v55/methods/upload_saveBigFilePart.md index e5c96d89..b1c3ea28 100644 --- a/old_docs/API_docs_v55/methods/upload_saveBigFilePart.md +++ b/old_docs/API_docs_v55/methods/upload_saveBigFilePart.md @@ -6,73 +6,8 @@ description: upload.saveBigFilePart parameters, return type and example [Back to methods index](index.md) -*You cannot use this method directly, use the upload, download_to_stream, download_to_file, download_to_dir methods instead; see https://daniil.it/MadelineProto for more info* +**You cannot use this method directly, use the upload, download_to_stream, download_to_file, download_to_dir methods instead; see https://daniil.it/MadelineProto for more info** -### Parameters: - -| Name | Type | Required | -|----------|:-------------:|---------:| -|file\_id|[long](../types/long.md) | Yes| -|file\_part|[int](../types/int.md) | Yes| -|file\_total\_parts|[int](../types/int.md) | Yes| -|bytes|[bytes](../types/bytes.md) | Yes| - - -### Return type: [Bool](../types/Bool.md) - -### Example: - - -``` -$MadelineProto = new \danog\MadelineProto\API(); -if (isset($token)) { // Login as a bot - $MadelineProto->bot_login($token); -} -if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } - $MadelineProto->complete_phone_login($code); -} - -$Bool = $MadelineProto->upload->saveBigFilePart(['file_id' => long, 'file_part' => int, 'file_total_parts' => int, 'bytes' => 'bytes', ]); -``` - -Or, if you're using the [PWRTelegram HTTP API](https://pwrtelegram.xyz): - -### As a bot: - -POST/GET to `https://api.pwrtelegram.xyz/botTOKEN/madeline` - -Parameters: - -* method - upload.saveBigFilePart -* params - `{"file_id": long, "file_part": int, "file_total_parts": int, "bytes": "bytes", }` - - - -### As a user: - -POST/GET to `https://api.pwrtelegram.xyz/userTOKEN/upload.saveBigFilePart` - -Parameters: - -file_id - Json encoded long -file_part - Json encoded int -file_total_parts - Json encoded int -bytes - Json encoded bytes - - - -Or, if you're into Lua: - -``` -Bool = upload.saveBigFilePart({file_id=long, file_part=int, file_total_parts=int, bytes='bytes', }) -``` - diff --git a/old_docs/API_docs_v55/methods/upload_saveFilePart.md b/old_docs/API_docs_v55/methods/upload_saveFilePart.md index 1c16e4b2..c482f321 100644 --- a/old_docs/API_docs_v55/methods/upload_saveFilePart.md +++ b/old_docs/API_docs_v55/methods/upload_saveFilePart.md @@ -6,71 +6,8 @@ description: upload.saveFilePart parameters, return type and example [Back to methods index](index.md) -*You cannot use this method directly, use the upload, download_to_stream, download_to_file, download_to_dir methods instead; see https://daniil.it/MadelineProto for more info* +**You cannot use this method directly, use the upload, download_to_stream, download_to_file, download_to_dir methods instead; see https://daniil.it/MadelineProto for more info** -### Parameters: - -| Name | Type | Required | -|----------|:-------------:|---------:| -|file\_id|[long](../types/long.md) | Yes| -|file\_part|[int](../types/int.md) | Yes| -|bytes|[bytes](../types/bytes.md) | Yes| - - -### Return type: [Bool](../types/Bool.md) - -### Example: - - -``` -$MadelineProto = new \danog\MadelineProto\API(); -if (isset($token)) { // Login as a bot - $MadelineProto->bot_login($token); -} -if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } - $MadelineProto->complete_phone_login($code); -} - -$Bool = $MadelineProto->upload->saveFilePart(['file_id' => long, 'file_part' => int, 'bytes' => 'bytes', ]); -``` - -Or, if you're using the [PWRTelegram HTTP API](https://pwrtelegram.xyz): - -### As a bot: - -POST/GET to `https://api.pwrtelegram.xyz/botTOKEN/madeline` - -Parameters: - -* method - upload.saveFilePart -* params - `{"file_id": long, "file_part": int, "bytes": "bytes", }` - - - -### As a user: - -POST/GET to `https://api.pwrtelegram.xyz/userTOKEN/upload.saveFilePart` - -Parameters: - -file_id - Json encoded long -file_part - Json encoded int -bytes - Json encoded bytes - - - -Or, if you're into Lua: - -``` -Bool = upload.saveFilePart({file_id=long, file_part=int, bytes='bytes', }) -``` - diff --git a/old_docs/API_docs_v55/methods/users_getFullUser.md b/old_docs/API_docs_v55/methods/users_getFullUser.md index 645ab12e..4ec831ec 100644 --- a/old_docs/API_docs_v55/methods/users_getFullUser.md +++ b/old_docs/API_docs_v55/methods/users_getFullUser.md @@ -6,67 +6,8 @@ description: users.getFullUser parameters, return type and example [Back to methods index](index.md) -*You cannot use this method directly, use the get_pwr_chat, get_info, get_full_info methods instead (see https://daniil.it/MadelineProto for more info)* +**You cannot use this method directly, use the get_pwr_chat, get_info, get_full_info methods instead (see https://daniil.it/MadelineProto for more info)** -### Parameters: - -| Name | Type | Required | -|----------|:-------------:|---------:| -|id|[InputUser](../types/InputUser.md) | Yes| - - -### Return type: [UserFull](../types/UserFull.md) - -### Example: - - -``` -$MadelineProto = new \danog\MadelineProto\API(); -if (isset($token)) { // Login as a bot - $MadelineProto->bot_login($token); -} -if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } - $MadelineProto->complete_phone_login($code); -} - -$UserFull = $MadelineProto->users->getFullUser(['id' => InputUser, ]); -``` - -Or, if you're using the [PWRTelegram HTTP API](https://pwrtelegram.xyz): - -### As a bot: - -POST/GET to `https://api.pwrtelegram.xyz/botTOKEN/madeline` - -Parameters: - -* method - users.getFullUser -* params - `{"id": InputUser, }` - - - -### As a user: - -POST/GET to `https://api.pwrtelegram.xyz/userTOKEN/users.getFullUser` - -Parameters: - -id - Json encoded InputUser - - - -Or, if you're into Lua: - -``` -UserFull = users.getFullUser({id=InputUser, }) -``` - diff --git a/old_docs/API_docs_v57/constructors/README.md b/old_docs/API_docs_v57/constructors/README.md index b91b6310..72c00bf2 100644 --- a/old_docs/API_docs_v57/constructors/README.md +++ b/old_docs/API_docs_v57/constructors/README.md @@ -4,9 +4,6 @@ description: List of constructors --- # Constructors [Back to API documentation index](..) - - - ***

[$accountDaysTTL](../constructors/accountDaysTTL.md) = \['days' => [int](../types/int.md), \]; diff --git a/old_docs/API_docs_v57/methods/auth_importBotAuthorization.md b/old_docs/API_docs_v57/methods/auth_importBotAuthorization.md index 0d8836b6..57521a13 100644 --- a/old_docs/API_docs_v57/methods/auth_importBotAuthorization.md +++ b/old_docs/API_docs_v57/methods/auth_importBotAuthorization.md @@ -6,71 +6,8 @@ description: auth.importBotAuthorization parameters, return type and example [Back to methods index](index.md) -*You cannot use this method directly, use the bot_login method instead (see https://daniil.it/MadelineProto for more info)* +**You cannot use this method directly, use the bot_login method instead (see https://daniil.it/MadelineProto for more info)** -### Parameters: - -| Name | Type | Required | -|----------|:-------------:|---------:| -|api\_id|[int](../types/int.md) | Yes| -|api\_hash|[string](../types/string.md) | Yes| -|bot\_auth\_token|[string](../types/string.md) | Yes| - - -### Return type: [auth\_Authorization](../types/auth_Authorization.md) - -### Example: - - -``` -$MadelineProto = new \danog\MadelineProto\API(); -if (isset($token)) { // Login as a bot - $MadelineProto->bot_login($token); -} -if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } - $MadelineProto->complete_phone_login($code); -} - -$auth_Authorization = $MadelineProto->auth->importBotAuthorization(['api_id' => int, 'api_hash' => 'string', 'bot_auth_token' => 'string', ]); -``` - -Or, if you're using the [PWRTelegram HTTP API](https://pwrtelegram.xyz): - -### As a bot: - -POST/GET to `https://api.pwrtelegram.xyz/botTOKEN/madeline` - -Parameters: - -* method - auth.importBotAuthorization -* params - `{"api_id": int, "api_hash": "string", "bot_auth_token": "string", }` - - - -### As a user: - -POST/GET to `https://api.pwrtelegram.xyz/userTOKEN/auth.importBotAuthorization` - -Parameters: - -api_id - Json encoded int -api_hash - Json encoded string -bot_auth_token - Json encoded string - - - -Or, if you're into Lua: - -``` -auth_Authorization = auth.importBotAuthorization({api_id=int, api_hash='string', bot_auth_token='string', }) -``` - diff --git a/old_docs/API_docs_v57/methods/auth_logOut.md b/old_docs/API_docs_v57/methods/auth_logOut.md index 12159bab..7d5bb3f7 100644 --- a/old_docs/API_docs_v57/methods/auth_logOut.md +++ b/old_docs/API_docs_v57/methods/auth_logOut.md @@ -6,61 +6,8 @@ description: auth.logOut parameters, return type and example [Back to methods index](index.md) -*You cannot use this method directly, use the logout method instead (see https://daniil.it/MadelineProto for more info)* +**You cannot use this method directly, use the logout method instead (see https://daniil.it/MadelineProto for more info)** - - -### Return type: [Bool](../types/Bool.md) - -### Example: - - -``` -$MadelineProto = new \danog\MadelineProto\API(); -if (isset($token)) { // Login as a bot - $MadelineProto->bot_login($token); -} -if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } - $MadelineProto->complete_phone_login($code); -} - -$Bool = $MadelineProto->auth->logOut(); -``` - -Or, if you're using the [PWRTelegram HTTP API](https://pwrtelegram.xyz): - -### As a bot: - -POST/GET to `https://api.pwrtelegram.xyz/botTOKEN/madeline` - -Parameters: - -* method - auth.logOut -* params - `{}` - - - -### As a user: - -POST/GET to `https://api.pwrtelegram.xyz/userTOKEN/auth.logOut` - -Parameters: - - - - -Or, if you're into Lua: - -``` -Bool = auth.logOut({}) -``` - diff --git a/old_docs/API_docs_v57/methods/auth_sendCode.md b/old_docs/API_docs_v57/methods/auth_sendCode.md index bda88218..22d1df94 100644 --- a/old_docs/API_docs_v57/methods/auth_sendCode.md +++ b/old_docs/API_docs_v57/methods/auth_sendCode.md @@ -6,75 +6,8 @@ description: auth.sendCode parameters, return type and example [Back to methods index](index.md) -*You cannot use this method directly, use the phone_login method instead (see https://daniil.it/MadelineProto for more info)* +**You cannot use this method directly, use the phone_login method instead (see https://daniil.it/MadelineProto for more info)** -### Parameters: - -| Name | Type | Required | -|----------|:-------------:|---------:| -|allow\_flashcall|[Bool](../types/Bool.md) | Optional| -|phone\_number|[string](../types/string.md) | Yes| -|current\_number|[Bool](../types/Bool.md) | Optional| -|api\_id|[int](../types/int.md) | Yes| -|api\_hash|[string](../types/string.md) | Yes| - - -### Return type: [auth\_SentCode](../types/auth_SentCode.md) - -### Example: - - -``` -$MadelineProto = new \danog\MadelineProto\API(); -if (isset($token)) { // Login as a bot - $MadelineProto->bot_login($token); -} -if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } - $MadelineProto->complete_phone_login($code); -} - -$auth_SentCode = $MadelineProto->auth->sendCode(['allow_flashcall' => Bool, 'phone_number' => 'string', 'current_number' => Bool, 'api_id' => int, 'api_hash' => 'string', ]); -``` - -Or, if you're using the [PWRTelegram HTTP API](https://pwrtelegram.xyz): - -### As a bot: - -POST/GET to `https://api.pwrtelegram.xyz/botTOKEN/madeline` - -Parameters: - -* method - auth.sendCode -* params - `{"allow_flashcall": Bool, "phone_number": "string", "current_number": Bool, "api_id": int, "api_hash": "string", }` - - - -### As a user: - -POST/GET to `https://api.pwrtelegram.xyz/userTOKEN/auth.sendCode` - -Parameters: - -allow_flashcall - Json encoded Bool -phone_number - Json encoded string -current_number - Json encoded Bool -api_id - Json encoded int -api_hash - Json encoded string - - - -Or, if you're into Lua: - -``` -auth_SentCode = auth.sendCode({allow_flashcall=Bool, phone_number='string', current_number=Bool, api_id=int, api_hash='string', }) -``` - diff --git a/old_docs/API_docs_v57/methods/auth_signIn.md b/old_docs/API_docs_v57/methods/auth_signIn.md index 75c50d70..ab40bb4d 100644 --- a/old_docs/API_docs_v57/methods/auth_signIn.md +++ b/old_docs/API_docs_v57/methods/auth_signIn.md @@ -6,71 +6,8 @@ description: auth.signIn parameters, return type and example [Back to methods index](index.md) -*You cannot use this method directly, use the complete_phone_login method instead (see https://daniil.it/MadelineProto for more info)* +**You cannot use this method directly, use the complete_phone_login method instead (see https://daniil.it/MadelineProto for more info)** -### Parameters: - -| Name | Type | Required | -|----------|:-------------:|---------:| -|phone\_number|[string](../types/string.md) | Yes| -|phone\_code\_hash|[string](../types/string.md) | Yes| -|phone\_code|[string](../types/string.md) | Yes| - - -### Return type: [auth\_Authorization](../types/auth_Authorization.md) - -### Example: - - -``` -$MadelineProto = new \danog\MadelineProto\API(); -if (isset($token)) { // Login as a bot - $MadelineProto->bot_login($token); -} -if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } - $MadelineProto->complete_phone_login($code); -} - -$auth_Authorization = $MadelineProto->auth->signIn(['phone_number' => 'string', 'phone_code_hash' => 'string', 'phone_code' => 'string', ]); -``` - -Or, if you're using the [PWRTelegram HTTP API](https://pwrtelegram.xyz): - -### As a bot: - -POST/GET to `https://api.pwrtelegram.xyz/botTOKEN/madeline` - -Parameters: - -* method - auth.signIn -* params - `{"phone_number": "string", "phone_code_hash": "string", "phone_code": "string", }` - - - -### As a user: - -POST/GET to `https://api.pwrtelegram.xyz/userTOKEN/auth.signIn` - -Parameters: - -phone_number - Json encoded string -phone_code_hash - Json encoded string -phone_code - Json encoded string - - - -Or, if you're into Lua: - -``` -auth_Authorization = auth.signIn({phone_number='string', phone_code_hash='string', phone_code='string', }) -``` - diff --git a/old_docs/API_docs_v57/methods/auth_signUp.md b/old_docs/API_docs_v57/methods/auth_signUp.md index f2a72b68..042d1191 100644 --- a/old_docs/API_docs_v57/methods/auth_signUp.md +++ b/old_docs/API_docs_v57/methods/auth_signUp.md @@ -6,75 +6,8 @@ description: auth.signUp parameters, return type and example [Back to methods index](index.md) -*You cannot use this method directly, use the complete_signup method instead (see https://daniil.it/MadelineProto for more info)* +**You cannot use this method directly, use the complete_signup method instead (see https://daniil.it/MadelineProto for more info)** -### Parameters: - -| Name | Type | Required | -|----------|:-------------:|---------:| -|phone\_number|[string](../types/string.md) | Yes| -|phone\_code\_hash|[string](../types/string.md) | Yes| -|phone\_code|[string](../types/string.md) | Yes| -|first\_name|[string](../types/string.md) | Yes| -|last\_name|[string](../types/string.md) | Yes| - - -### Return type: [auth\_Authorization](../types/auth_Authorization.md) - -### Example: - - -``` -$MadelineProto = new \danog\MadelineProto\API(); -if (isset($token)) { // Login as a bot - $MadelineProto->bot_login($token); -} -if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } - $MadelineProto->complete_phone_login($code); -} - -$auth_Authorization = $MadelineProto->auth->signUp(['phone_number' => 'string', 'phone_code_hash' => 'string', 'phone_code' => 'string', 'first_name' => 'string', 'last_name' => 'string', ]); -``` - -Or, if you're using the [PWRTelegram HTTP API](https://pwrtelegram.xyz): - -### As a bot: - -POST/GET to `https://api.pwrtelegram.xyz/botTOKEN/madeline` - -Parameters: - -* method - auth.signUp -* params - `{"phone_number": "string", "phone_code_hash": "string", "phone_code": "string", "first_name": "string", "last_name": "string", }` - - - -### As a user: - -POST/GET to `https://api.pwrtelegram.xyz/userTOKEN/auth.signUp` - -Parameters: - -phone_number - Json encoded string -phone_code_hash - Json encoded string -phone_code - Json encoded string -first_name - Json encoded string -last_name - Json encoded string - - - -Or, if you're into Lua: - -``` -auth_Authorization = auth.signUp({phone_number='string', phone_code_hash='string', phone_code='string', first_name='string', last_name='string', }) -``` - diff --git a/old_docs/API_docs_v57/methods/channels_getFullChannel.md b/old_docs/API_docs_v57/methods/channels_getFullChannel.md index 340efcfe..58dbe057 100644 --- a/old_docs/API_docs_v57/methods/channels_getFullChannel.md +++ b/old_docs/API_docs_v57/methods/channels_getFullChannel.md @@ -6,67 +6,8 @@ description: channels.getFullChannel parameters, return type and example [Back to methods index](index.md) -*You cannot use this method directly, use the get_pwr_chat, get_info, get_full_info methods instead (see https://daniil.it/MadelineProto for more info)* +**You cannot use this method directly, use the get_pwr_chat, get_info, get_full_info methods instead (see https://daniil.it/MadelineProto for more info)** -### Parameters: - -| Name | Type | Required | -|----------|:-------------:|---------:| -|channel|[InputChannel](../types/InputChannel.md) | Yes| - - -### Return type: [messages\_ChatFull](../types/messages_ChatFull.md) - -### Example: - - -``` -$MadelineProto = new \danog\MadelineProto\API(); -if (isset($token)) { // Login as a bot - $MadelineProto->bot_login($token); -} -if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } - $MadelineProto->complete_phone_login($code); -} - -$messages_ChatFull = $MadelineProto->channels->getFullChannel(['channel' => InputChannel, ]); -``` - -Or, if you're using the [PWRTelegram HTTP API](https://pwrtelegram.xyz): - -### As a bot: - -POST/GET to `https://api.pwrtelegram.xyz/botTOKEN/madeline` - -Parameters: - -* method - channels.getFullChannel -* params - `{"channel": InputChannel, }` - - - -### As a user: - -POST/GET to `https://api.pwrtelegram.xyz/userTOKEN/channels.getFullChannel` - -Parameters: - -channel - Json encoded InputChannel - - - -Or, if you're into Lua: - -``` -messages_ChatFull = channels.getFullChannel({channel=InputChannel, }) -``` - diff --git a/old_docs/API_docs_v57/methods/channels_getParticipants.md b/old_docs/API_docs_v57/methods/channels_getParticipants.md index 4c6e09cc..d84cf09c 100644 --- a/old_docs/API_docs_v57/methods/channels_getParticipants.md +++ b/old_docs/API_docs_v57/methods/channels_getParticipants.md @@ -6,73 +6,8 @@ description: channels.getParticipants parameters, return type and example [Back to methods index](index.md) -*You cannot use this method directly, use the get_pwr_chat, get_info, get_full_info methods instead (see https://daniil.it/MadelineProto for more info)* +**You cannot use this method directly, use the get_pwr_chat, get_info, get_full_info methods instead (see https://daniil.it/MadelineProto for more info)** -### Parameters: - -| Name | Type | Required | -|----------|:-------------:|---------:| -|channel|[InputChannel](../types/InputChannel.md) | Yes| -|filter|[ChannelParticipantsFilter](../types/ChannelParticipantsFilter.md) | Yes| -|offset|[int](../types/int.md) | Yes| -|limit|[int](../types/int.md) | Yes| - - -### Return type: [channels\_ChannelParticipants](../types/channels_ChannelParticipants.md) - -### Example: - - -``` -$MadelineProto = new \danog\MadelineProto\API(); -if (isset($token)) { // Login as a bot - $MadelineProto->bot_login($token); -} -if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } - $MadelineProto->complete_phone_login($code); -} - -$channels_ChannelParticipants = $MadelineProto->channels->getParticipants(['channel' => InputChannel, 'filter' => ChannelParticipantsFilter, 'offset' => int, 'limit' => int, ]); -``` - -Or, if you're using the [PWRTelegram HTTP API](https://pwrtelegram.xyz): - -### As a bot: - -POST/GET to `https://api.pwrtelegram.xyz/botTOKEN/madeline` - -Parameters: - -* method - channels.getParticipants -* params - `{"channel": InputChannel, "filter": ChannelParticipantsFilter, "offset": int, "limit": int, }` - - - -### As a user: - -POST/GET to `https://api.pwrtelegram.xyz/userTOKEN/channels.getParticipants` - -Parameters: - -channel - Json encoded InputChannel -filter - Json encoded ChannelParticipantsFilter -offset - Json encoded int -limit - Json encoded int - - - -Or, if you're into Lua: - -``` -channels_ChannelParticipants = channels.getParticipants({channel=InputChannel, filter=ChannelParticipantsFilter, offset=int, limit=int, }) -``` - diff --git a/old_docs/API_docs_v57/methods/contacts_resolveUsername.md b/old_docs/API_docs_v57/methods/contacts_resolveUsername.md index 90e72851..b665b382 100644 --- a/old_docs/API_docs_v57/methods/contacts_resolveUsername.md +++ b/old_docs/API_docs_v57/methods/contacts_resolveUsername.md @@ -6,67 +6,8 @@ description: contacts.resolveUsername parameters, return type and example [Back to methods index](index.md) -*You cannot use this method directly, use the resolve_username, get_pwr_chat, get_info, get_full_info methods instead (see https://daniil.it/MadelineProto for more info)* +**You cannot use this method directly, use the resolve_username, get_pwr_chat, get_info, get_full_info methods instead (see https://daniil.it/MadelineProto for more info)** -### Parameters: - -| Name | Type | Required | -|----------|:-------------:|---------:| -|username|[string](../types/string.md) | Yes| - - -### Return type: [contacts\_ResolvedPeer](../types/contacts_ResolvedPeer.md) - -### Example: - - -``` -$MadelineProto = new \danog\MadelineProto\API(); -if (isset($token)) { // Login as a bot - $MadelineProto->bot_login($token); -} -if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } - $MadelineProto->complete_phone_login($code); -} - -$contacts_ResolvedPeer = $MadelineProto->contacts->resolveUsername(['username' => 'string', ]); -``` - -Or, if you're using the [PWRTelegram HTTP API](https://pwrtelegram.xyz): - -### As a bot: - -POST/GET to `https://api.pwrtelegram.xyz/botTOKEN/madeline` - -Parameters: - -* method - contacts.resolveUsername -* params - `{"username": "string", }` - - - -### As a user: - -POST/GET to `https://api.pwrtelegram.xyz/userTOKEN/contacts.resolveUsername` - -Parameters: - -username - Json encoded string - - - -Or, if you're into Lua: - -``` -contacts_ResolvedPeer = contacts.resolveUsername({username='string', }) -``` - diff --git a/old_docs/API_docs_v57/methods/messages_acceptEncryption.md b/old_docs/API_docs_v57/methods/messages_acceptEncryption.md index 548087b6..243c4c00 100644 --- a/old_docs/API_docs_v57/methods/messages_acceptEncryption.md +++ b/old_docs/API_docs_v57/methods/messages_acceptEncryption.md @@ -6,71 +6,8 @@ description: messages.acceptEncryption parameters, return type and example [Back to methods index](index.md) -*You cannot use this method directly, see https://daniil.it/MadelineProto for more info on handling secret chats* +**You cannot use this method directly, see https://daniil.it/MadelineProto for more info on handling secret chats** -### Parameters: - -| Name | Type | Required | -|----------|:-------------:|---------:| -|peer|[InputEncryptedChat](../types/InputEncryptedChat.md) | Yes| -|g\_b|[bytes](../types/bytes.md) | Yes| -|key\_fingerprint|[long](../types/long.md) | Yes| - - -### Return type: [EncryptedChat](../types/EncryptedChat.md) - -### Example: - - -``` -$MadelineProto = new \danog\MadelineProto\API(); -if (isset($token)) { // Login as a bot - $MadelineProto->bot_login($token); -} -if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } - $MadelineProto->complete_phone_login($code); -} - -$EncryptedChat = $MadelineProto->messages->acceptEncryption(['peer' => InputEncryptedChat, 'g_b' => 'bytes', 'key_fingerprint' => long, ]); -``` - -Or, if you're using the [PWRTelegram HTTP API](https://pwrtelegram.xyz): - -### As a bot: - -POST/GET to `https://api.pwrtelegram.xyz/botTOKEN/madeline` - -Parameters: - -* method - messages.acceptEncryption -* params - `{"peer": InputEncryptedChat, "g_b": "bytes", "key_fingerprint": long, }` - - - -### As a user: - -POST/GET to `https://api.pwrtelegram.xyz/userTOKEN/messages.acceptEncryption` - -Parameters: - -peer - Json encoded InputEncryptedChat -g_b - Json encoded bytes -key_fingerprint - Json encoded long - - - -Or, if you're into Lua: - -``` -EncryptedChat = messages.acceptEncryption({peer=InputEncryptedChat, g_b='bytes', key_fingerprint=long, }) -``` - diff --git a/old_docs/API_docs_v57/methods/messages_discardEncryption.md b/old_docs/API_docs_v57/methods/messages_discardEncryption.md index 72648e9d..3a9dc58b 100644 --- a/old_docs/API_docs_v57/methods/messages_discardEncryption.md +++ b/old_docs/API_docs_v57/methods/messages_discardEncryption.md @@ -6,67 +6,8 @@ description: messages.discardEncryption parameters, return type and example [Back to methods index](index.md) -*You cannot use this method directly, see https://daniil.it/MadelineProto for more info on handling secret chats* +**You cannot use this method directly, see https://daniil.it/MadelineProto for more info on handling secret chats** -### Parameters: - -| Name | Type | Required | -|----------|:-------------:|---------:| -|chat\_id|[int](../types/int.md) | Yes| - - -### Return type: [Bool](../types/Bool.md) - -### Example: - - -``` -$MadelineProto = new \danog\MadelineProto\API(); -if (isset($token)) { // Login as a bot - $MadelineProto->bot_login($token); -} -if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } - $MadelineProto->complete_phone_login($code); -} - -$Bool = $MadelineProto->messages->discardEncryption(['chat_id' => int, ]); -``` - -Or, if you're using the [PWRTelegram HTTP API](https://pwrtelegram.xyz): - -### As a bot: - -POST/GET to `https://api.pwrtelegram.xyz/botTOKEN/madeline` - -Parameters: - -* method - messages.discardEncryption -* params - `{"chat_id": int, }` - - - -### As a user: - -POST/GET to `https://api.pwrtelegram.xyz/userTOKEN/messages.discardEncryption` - -Parameters: - -chat_id - Json encoded int - - - -Or, if you're into Lua: - -``` -Bool = messages.discardEncryption({chat_id=int, }) -``` - diff --git a/old_docs/API_docs_v57/methods/messages_getFullChat.md b/old_docs/API_docs_v57/methods/messages_getFullChat.md index 62102b64..ffa9c281 100644 --- a/old_docs/API_docs_v57/methods/messages_getFullChat.md +++ b/old_docs/API_docs_v57/methods/messages_getFullChat.md @@ -6,67 +6,8 @@ description: messages.getFullChat parameters, return type and example [Back to methods index](index.md) -*You cannot use this method directly, use the get_pwr_chat, get_info, get_full_info methods instead (see https://daniil.it/MadelineProto for more info)* +**You cannot use this method directly, use the get_pwr_chat, get_info, get_full_info methods instead (see https://daniil.it/MadelineProto for more info)** -### Parameters: - -| Name | Type | Required | -|----------|:-------------:|---------:| -|chat\_id|[InputPeer](../types/InputPeer.md) | Yes| - - -### Return type: [messages\_ChatFull](../types/messages_ChatFull.md) - -### Example: - - -``` -$MadelineProto = new \danog\MadelineProto\API(); -if (isset($token)) { // Login as a bot - $MadelineProto->bot_login($token); -} -if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } - $MadelineProto->complete_phone_login($code); -} - -$messages_ChatFull = $MadelineProto->messages->getFullChat(['chat_id' => InputPeer, ]); -``` - -Or, if you're using the [PWRTelegram HTTP API](https://pwrtelegram.xyz): - -### As a bot: - -POST/GET to `https://api.pwrtelegram.xyz/botTOKEN/madeline` - -Parameters: - -* method - messages.getFullChat -* params - `{"chat_id": InputPeer, }` - - - -### As a user: - -POST/GET to `https://api.pwrtelegram.xyz/userTOKEN/messages.getFullChat` - -Parameters: - -chat_id - Json encoded InputPeer - - - -Or, if you're into Lua: - -``` -messages_ChatFull = messages.getFullChat({chat_id=InputPeer, }) -``` - diff --git a/old_docs/API_docs_v57/methods/messages_requestEncryption.md b/old_docs/API_docs_v57/methods/messages_requestEncryption.md index 2fd1f825..c8476667 100644 --- a/old_docs/API_docs_v57/methods/messages_requestEncryption.md +++ b/old_docs/API_docs_v57/methods/messages_requestEncryption.md @@ -6,69 +6,8 @@ description: messages.requestEncryption parameters, return type and example [Back to methods index](index.md) -*You cannot use this method directly, see https://daniil.it/MadelineProto for more info on handling secret chats* +**You cannot use this method directly, see https://daniil.it/MadelineProto for more info on handling secret chats** -### Parameters: - -| Name | Type | Required | -|----------|:-------------:|---------:| -|user\_id|[InputUser](../types/InputUser.md) | Yes| -|g\_a|[bytes](../types/bytes.md) | Yes| - - -### Return type: [EncryptedChat](../types/EncryptedChat.md) - -### Example: - - -``` -$MadelineProto = new \danog\MadelineProto\API(); -if (isset($token)) { // Login as a bot - $MadelineProto->bot_login($token); -} -if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } - $MadelineProto->complete_phone_login($code); -} - -$EncryptedChat = $MadelineProto->messages->requestEncryption(['user_id' => InputUser, 'g_a' => 'bytes', ]); -``` - -Or, if you're using the [PWRTelegram HTTP API](https://pwrtelegram.xyz): - -### As a bot: - -POST/GET to `https://api.pwrtelegram.xyz/botTOKEN/madeline` - -Parameters: - -* method - messages.requestEncryption -* params - `{"user_id": InputUser, "g_a": "bytes", }` - - - -### As a user: - -POST/GET to `https://api.pwrtelegram.xyz/userTOKEN/messages.requestEncryption` - -Parameters: - -user_id - Json encoded InputUser -g_a - Json encoded bytes - - - -Or, if you're into Lua: - -``` -EncryptedChat = messages.requestEncryption({user_id=InputUser, g_a='bytes', }) -``` - diff --git a/old_docs/API_docs_v57/methods/updates_getChannelDifference.md b/old_docs/API_docs_v57/methods/updates_getChannelDifference.md index 51ea7aa5..2e69d1cd 100644 --- a/old_docs/API_docs_v57/methods/updates_getChannelDifference.md +++ b/old_docs/API_docs_v57/methods/updates_getChannelDifference.md @@ -6,73 +6,8 @@ description: updates.getChannelDifference parameters, return type and example [Back to methods index](index.md) -*You cannot use this method directly, see https://daniil.it/MadelineProto for more info on handling updates* +**You cannot use this method directly, see https://daniil.it/MadelineProto for more info on handling updates** -### Parameters: - -| Name | Type | Required | -|----------|:-------------:|---------:| -|channel|[InputChannel](../types/InputChannel.md) | Yes| -|filter|[ChannelMessagesFilter](../types/ChannelMessagesFilter.md) | Yes| -|pts|[int](../types/int.md) | Yes| -|limit|[int](../types/int.md) | Yes| - - -### Return type: [updates\_ChannelDifference](../types/updates_ChannelDifference.md) - -### Example: - - -``` -$MadelineProto = new \danog\MadelineProto\API(); -if (isset($token)) { // Login as a bot - $MadelineProto->bot_login($token); -} -if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } - $MadelineProto->complete_phone_login($code); -} - -$updates_ChannelDifference = $MadelineProto->updates->getChannelDifference(['channel' => InputChannel, 'filter' => ChannelMessagesFilter, 'pts' => int, 'limit' => int, ]); -``` - -Or, if you're using the [PWRTelegram HTTP API](https://pwrtelegram.xyz): - -### As a bot: - -POST/GET to `https://api.pwrtelegram.xyz/botTOKEN/madeline` - -Parameters: - -* method - updates.getChannelDifference -* params - `{"channel": InputChannel, "filter": ChannelMessagesFilter, "pts": int, "limit": int, }` - - - -### As a user: - -POST/GET to `https://api.pwrtelegram.xyz/userTOKEN/updates.getChannelDifference` - -Parameters: - -channel - Json encoded InputChannel -filter - Json encoded ChannelMessagesFilter -pts - Json encoded int -limit - Json encoded int - - - -Or, if you're into Lua: - -``` -updates_ChannelDifference = updates.getChannelDifference({channel=InputChannel, filter=ChannelMessagesFilter, pts=int, limit=int, }) -``` - diff --git a/old_docs/API_docs_v57/methods/updates_getDifference.md b/old_docs/API_docs_v57/methods/updates_getDifference.md index 53c7b078..9bcee79a 100644 --- a/old_docs/API_docs_v57/methods/updates_getDifference.md +++ b/old_docs/API_docs_v57/methods/updates_getDifference.md @@ -6,71 +6,8 @@ description: updates.getDifference parameters, return type and example [Back to methods index](index.md) -*You cannot use this method directly, see https://daniil.it/MadelineProto for more info on handling updates* +**You cannot use this method directly, see https://daniil.it/MadelineProto for more info on handling updates** -### Parameters: - -| Name | Type | Required | -|----------|:-------------:|---------:| -|pts|[int](../types/int.md) | Yes| -|date|[int](../types/int.md) | Yes| -|qts|[int](../types/int.md) | Yes| - - -### Return type: [updates\_Difference](../types/updates_Difference.md) - -### Example: - - -``` -$MadelineProto = new \danog\MadelineProto\API(); -if (isset($token)) { // Login as a bot - $MadelineProto->bot_login($token); -} -if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } - $MadelineProto->complete_phone_login($code); -} - -$updates_Difference = $MadelineProto->updates->getDifference(['pts' => int, 'date' => int, 'qts' => int, ]); -``` - -Or, if you're using the [PWRTelegram HTTP API](https://pwrtelegram.xyz): - -### As a bot: - -POST/GET to `https://api.pwrtelegram.xyz/botTOKEN/madeline` - -Parameters: - -* method - updates.getDifference -* params - `{"pts": int, "date": int, "qts": int, }` - - - -### As a user: - -POST/GET to `https://api.pwrtelegram.xyz/userTOKEN/updates.getDifference` - -Parameters: - -pts - Json encoded int -date - Json encoded int -qts - Json encoded int - - - -Or, if you're into Lua: - -``` -updates_Difference = updates.getDifference({pts=int, date=int, qts=int, }) -``` - diff --git a/old_docs/API_docs_v57/methods/updates_getState.md b/old_docs/API_docs_v57/methods/updates_getState.md index 51f6ae80..fd5955ba 100644 --- a/old_docs/API_docs_v57/methods/updates_getState.md +++ b/old_docs/API_docs_v57/methods/updates_getState.md @@ -6,61 +6,8 @@ description: updates.getState parameters, return type and example [Back to methods index](index.md) -*You cannot use this method directly, see https://daniil.it/MadelineProto for more info on handling updates* +**You cannot use this method directly, see https://daniil.it/MadelineProto for more info on handling updates** - - -### Return type: [updates\_State](../types/updates_State.md) - -### Example: - - -``` -$MadelineProto = new \danog\MadelineProto\API(); -if (isset($token)) { // Login as a bot - $MadelineProto->bot_login($token); -} -if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } - $MadelineProto->complete_phone_login($code); -} - -$updates_State = $MadelineProto->updates->getState(); -``` - -Or, if you're using the [PWRTelegram HTTP API](https://pwrtelegram.xyz): - -### As a bot: - -POST/GET to `https://api.pwrtelegram.xyz/botTOKEN/madeline` - -Parameters: - -* method - updates.getState -* params - `{}` - - - -### As a user: - -POST/GET to `https://api.pwrtelegram.xyz/userTOKEN/updates.getState` - -Parameters: - - - - -Or, if you're into Lua: - -``` -updates_State = updates.getState({}) -``` - diff --git a/old_docs/API_docs_v57/methods/upload_getFile.md b/old_docs/API_docs_v57/methods/upload_getFile.md index a1003003..add7d54e 100644 --- a/old_docs/API_docs_v57/methods/upload_getFile.md +++ b/old_docs/API_docs_v57/methods/upload_getFile.md @@ -6,71 +6,8 @@ description: upload.getFile parameters, return type and example [Back to methods index](index.md) -*You cannot use this method directly, use the upload, download_to_stream, download_to_file, download_to_dir methods instead; see https://daniil.it/MadelineProto for more info* +**You cannot use this method directly, use the upload, download_to_stream, download_to_file, download_to_dir methods instead; see https://daniil.it/MadelineProto for more info** -### Parameters: - -| Name | Type | Required | -|----------|:-------------:|---------:| -|location|[InputFileLocation](../types/InputFileLocation.md) | Yes| -|offset|[int](../types/int.md) | Yes| -|limit|[int](../types/int.md) | Yes| - - -### Return type: [upload\_File](../types/upload_File.md) - -### Example: - - -``` -$MadelineProto = new \danog\MadelineProto\API(); -if (isset($token)) { // Login as a bot - $MadelineProto->bot_login($token); -} -if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } - $MadelineProto->complete_phone_login($code); -} - -$upload_File = $MadelineProto->upload->getFile(['location' => InputFileLocation, 'offset' => int, 'limit' => int, ]); -``` - -Or, if you're using the [PWRTelegram HTTP API](https://pwrtelegram.xyz): - -### As a bot: - -POST/GET to `https://api.pwrtelegram.xyz/botTOKEN/madeline` - -Parameters: - -* method - upload.getFile -* params - `{"location": InputFileLocation, "offset": int, "limit": int, }` - - - -### As a user: - -POST/GET to `https://api.pwrtelegram.xyz/userTOKEN/upload.getFile` - -Parameters: - -location - Json encoded InputFileLocation -offset - Json encoded int -limit - Json encoded int - - - -Or, if you're into Lua: - -``` -upload_File = upload.getFile({location=InputFileLocation, offset=int, limit=int, }) -``` - diff --git a/old_docs/API_docs_v57/methods/upload_saveBigFilePart.md b/old_docs/API_docs_v57/methods/upload_saveBigFilePart.md index e5c96d89..b1c3ea28 100644 --- a/old_docs/API_docs_v57/methods/upload_saveBigFilePart.md +++ b/old_docs/API_docs_v57/methods/upload_saveBigFilePart.md @@ -6,73 +6,8 @@ description: upload.saveBigFilePart parameters, return type and example [Back to methods index](index.md) -*You cannot use this method directly, use the upload, download_to_stream, download_to_file, download_to_dir methods instead; see https://daniil.it/MadelineProto for more info* +**You cannot use this method directly, use the upload, download_to_stream, download_to_file, download_to_dir methods instead; see https://daniil.it/MadelineProto for more info** -### Parameters: - -| Name | Type | Required | -|----------|:-------------:|---------:| -|file\_id|[long](../types/long.md) | Yes| -|file\_part|[int](../types/int.md) | Yes| -|file\_total\_parts|[int](../types/int.md) | Yes| -|bytes|[bytes](../types/bytes.md) | Yes| - - -### Return type: [Bool](../types/Bool.md) - -### Example: - - -``` -$MadelineProto = new \danog\MadelineProto\API(); -if (isset($token)) { // Login as a bot - $MadelineProto->bot_login($token); -} -if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } - $MadelineProto->complete_phone_login($code); -} - -$Bool = $MadelineProto->upload->saveBigFilePart(['file_id' => long, 'file_part' => int, 'file_total_parts' => int, 'bytes' => 'bytes', ]); -``` - -Or, if you're using the [PWRTelegram HTTP API](https://pwrtelegram.xyz): - -### As a bot: - -POST/GET to `https://api.pwrtelegram.xyz/botTOKEN/madeline` - -Parameters: - -* method - upload.saveBigFilePart -* params - `{"file_id": long, "file_part": int, "file_total_parts": int, "bytes": "bytes", }` - - - -### As a user: - -POST/GET to `https://api.pwrtelegram.xyz/userTOKEN/upload.saveBigFilePart` - -Parameters: - -file_id - Json encoded long -file_part - Json encoded int -file_total_parts - Json encoded int -bytes - Json encoded bytes - - - -Or, if you're into Lua: - -``` -Bool = upload.saveBigFilePart({file_id=long, file_part=int, file_total_parts=int, bytes='bytes', }) -``` - diff --git a/old_docs/API_docs_v57/methods/upload_saveFilePart.md b/old_docs/API_docs_v57/methods/upload_saveFilePart.md index 1c16e4b2..c482f321 100644 --- a/old_docs/API_docs_v57/methods/upload_saveFilePart.md +++ b/old_docs/API_docs_v57/methods/upload_saveFilePart.md @@ -6,71 +6,8 @@ description: upload.saveFilePart parameters, return type and example [Back to methods index](index.md) -*You cannot use this method directly, use the upload, download_to_stream, download_to_file, download_to_dir methods instead; see https://daniil.it/MadelineProto for more info* +**You cannot use this method directly, use the upload, download_to_stream, download_to_file, download_to_dir methods instead; see https://daniil.it/MadelineProto for more info** -### Parameters: - -| Name | Type | Required | -|----------|:-------------:|---------:| -|file\_id|[long](../types/long.md) | Yes| -|file\_part|[int](../types/int.md) | Yes| -|bytes|[bytes](../types/bytes.md) | Yes| - - -### Return type: [Bool](../types/Bool.md) - -### Example: - - -``` -$MadelineProto = new \danog\MadelineProto\API(); -if (isset($token)) { // Login as a bot - $MadelineProto->bot_login($token); -} -if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } - $MadelineProto->complete_phone_login($code); -} - -$Bool = $MadelineProto->upload->saveFilePart(['file_id' => long, 'file_part' => int, 'bytes' => 'bytes', ]); -``` - -Or, if you're using the [PWRTelegram HTTP API](https://pwrtelegram.xyz): - -### As a bot: - -POST/GET to `https://api.pwrtelegram.xyz/botTOKEN/madeline` - -Parameters: - -* method - upload.saveFilePart -* params - `{"file_id": long, "file_part": int, "bytes": "bytes", }` - - - -### As a user: - -POST/GET to `https://api.pwrtelegram.xyz/userTOKEN/upload.saveFilePart` - -Parameters: - -file_id - Json encoded long -file_part - Json encoded int -bytes - Json encoded bytes - - - -Or, if you're into Lua: - -``` -Bool = upload.saveFilePart({file_id=long, file_part=int, bytes='bytes', }) -``` - diff --git a/old_docs/API_docs_v57/methods/users_getFullUser.md b/old_docs/API_docs_v57/methods/users_getFullUser.md index 645ab12e..4ec831ec 100644 --- a/old_docs/API_docs_v57/methods/users_getFullUser.md +++ b/old_docs/API_docs_v57/methods/users_getFullUser.md @@ -6,67 +6,8 @@ description: users.getFullUser parameters, return type and example [Back to methods index](index.md) -*You cannot use this method directly, use the get_pwr_chat, get_info, get_full_info methods instead (see https://daniil.it/MadelineProto for more info)* +**You cannot use this method directly, use the get_pwr_chat, get_info, get_full_info methods instead (see https://daniil.it/MadelineProto for more info)** -### Parameters: - -| Name | Type | Required | -|----------|:-------------:|---------:| -|id|[InputUser](../types/InputUser.md) | Yes| - - -### Return type: [UserFull](../types/UserFull.md) - -### Example: - - -``` -$MadelineProto = new \danog\MadelineProto\API(); -if (isset($token)) { // Login as a bot - $MadelineProto->bot_login($token); -} -if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } - $MadelineProto->complete_phone_login($code); -} - -$UserFull = $MadelineProto->users->getFullUser(['id' => InputUser, ]); -``` - -Or, if you're using the [PWRTelegram HTTP API](https://pwrtelegram.xyz): - -### As a bot: - -POST/GET to `https://api.pwrtelegram.xyz/botTOKEN/madeline` - -Parameters: - -* method - users.getFullUser -* params - `{"id": InputUser, }` - - - -### As a user: - -POST/GET to `https://api.pwrtelegram.xyz/userTOKEN/users.getFullUser` - -Parameters: - -id - Json encoded InputUser - - - -Or, if you're into Lua: - -``` -UserFull = users.getFullUser({id=InputUser, }) -``` - diff --git a/old_docs/API_docs_v62/constructors/README.md b/old_docs/API_docs_v62/constructors/README.md index a7802277..8e7d3522 100644 --- a/old_docs/API_docs_v62/constructors/README.md +++ b/old_docs/API_docs_v62/constructors/README.md @@ -4,9 +4,6 @@ description: List of constructors --- # Constructors [Back to API documentation index](..) - - - ***

[$accountDaysTTL](../constructors/accountDaysTTL.md) = \['days' => [int](../types/int.md), \]; diff --git a/old_docs/API_docs_v62/methods/auth_importBotAuthorization.md b/old_docs/API_docs_v62/methods/auth_importBotAuthorization.md index 0d8836b6..57521a13 100644 --- a/old_docs/API_docs_v62/methods/auth_importBotAuthorization.md +++ b/old_docs/API_docs_v62/methods/auth_importBotAuthorization.md @@ -6,71 +6,8 @@ description: auth.importBotAuthorization parameters, return type and example [Back to methods index](index.md) -*You cannot use this method directly, use the bot_login method instead (see https://daniil.it/MadelineProto for more info)* +**You cannot use this method directly, use the bot_login method instead (see https://daniil.it/MadelineProto for more info)** -### Parameters: - -| Name | Type | Required | -|----------|:-------------:|---------:| -|api\_id|[int](../types/int.md) | Yes| -|api\_hash|[string](../types/string.md) | Yes| -|bot\_auth\_token|[string](../types/string.md) | Yes| - - -### Return type: [auth\_Authorization](../types/auth_Authorization.md) - -### Example: - - -``` -$MadelineProto = new \danog\MadelineProto\API(); -if (isset($token)) { // Login as a bot - $MadelineProto->bot_login($token); -} -if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } - $MadelineProto->complete_phone_login($code); -} - -$auth_Authorization = $MadelineProto->auth->importBotAuthorization(['api_id' => int, 'api_hash' => 'string', 'bot_auth_token' => 'string', ]); -``` - -Or, if you're using the [PWRTelegram HTTP API](https://pwrtelegram.xyz): - -### As a bot: - -POST/GET to `https://api.pwrtelegram.xyz/botTOKEN/madeline` - -Parameters: - -* method - auth.importBotAuthorization -* params - `{"api_id": int, "api_hash": "string", "bot_auth_token": "string", }` - - - -### As a user: - -POST/GET to `https://api.pwrtelegram.xyz/userTOKEN/auth.importBotAuthorization` - -Parameters: - -api_id - Json encoded int -api_hash - Json encoded string -bot_auth_token - Json encoded string - - - -Or, if you're into Lua: - -``` -auth_Authorization = auth.importBotAuthorization({api_id=int, api_hash='string', bot_auth_token='string', }) -``` - diff --git a/old_docs/API_docs_v62/methods/auth_logOut.md b/old_docs/API_docs_v62/methods/auth_logOut.md index 12159bab..7d5bb3f7 100644 --- a/old_docs/API_docs_v62/methods/auth_logOut.md +++ b/old_docs/API_docs_v62/methods/auth_logOut.md @@ -6,61 +6,8 @@ description: auth.logOut parameters, return type and example [Back to methods index](index.md) -*You cannot use this method directly, use the logout method instead (see https://daniil.it/MadelineProto for more info)* +**You cannot use this method directly, use the logout method instead (see https://daniil.it/MadelineProto for more info)** - - -### Return type: [Bool](../types/Bool.md) - -### Example: - - -``` -$MadelineProto = new \danog\MadelineProto\API(); -if (isset($token)) { // Login as a bot - $MadelineProto->bot_login($token); -} -if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } - $MadelineProto->complete_phone_login($code); -} - -$Bool = $MadelineProto->auth->logOut(); -``` - -Or, if you're using the [PWRTelegram HTTP API](https://pwrtelegram.xyz): - -### As a bot: - -POST/GET to `https://api.pwrtelegram.xyz/botTOKEN/madeline` - -Parameters: - -* method - auth.logOut -* params - `{}` - - - -### As a user: - -POST/GET to `https://api.pwrtelegram.xyz/userTOKEN/auth.logOut` - -Parameters: - - - - -Or, if you're into Lua: - -``` -Bool = auth.logOut({}) -``` - diff --git a/old_docs/API_docs_v62/methods/auth_sendCode.md b/old_docs/API_docs_v62/methods/auth_sendCode.md index bda88218..22d1df94 100644 --- a/old_docs/API_docs_v62/methods/auth_sendCode.md +++ b/old_docs/API_docs_v62/methods/auth_sendCode.md @@ -6,75 +6,8 @@ description: auth.sendCode parameters, return type and example [Back to methods index](index.md) -*You cannot use this method directly, use the phone_login method instead (see https://daniil.it/MadelineProto for more info)* +**You cannot use this method directly, use the phone_login method instead (see https://daniil.it/MadelineProto for more info)** -### Parameters: - -| Name | Type | Required | -|----------|:-------------:|---------:| -|allow\_flashcall|[Bool](../types/Bool.md) | Optional| -|phone\_number|[string](../types/string.md) | Yes| -|current\_number|[Bool](../types/Bool.md) | Optional| -|api\_id|[int](../types/int.md) | Yes| -|api\_hash|[string](../types/string.md) | Yes| - - -### Return type: [auth\_SentCode](../types/auth_SentCode.md) - -### Example: - - -``` -$MadelineProto = new \danog\MadelineProto\API(); -if (isset($token)) { // Login as a bot - $MadelineProto->bot_login($token); -} -if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } - $MadelineProto->complete_phone_login($code); -} - -$auth_SentCode = $MadelineProto->auth->sendCode(['allow_flashcall' => Bool, 'phone_number' => 'string', 'current_number' => Bool, 'api_id' => int, 'api_hash' => 'string', ]); -``` - -Or, if you're using the [PWRTelegram HTTP API](https://pwrtelegram.xyz): - -### As a bot: - -POST/GET to `https://api.pwrtelegram.xyz/botTOKEN/madeline` - -Parameters: - -* method - auth.sendCode -* params - `{"allow_flashcall": Bool, "phone_number": "string", "current_number": Bool, "api_id": int, "api_hash": "string", }` - - - -### As a user: - -POST/GET to `https://api.pwrtelegram.xyz/userTOKEN/auth.sendCode` - -Parameters: - -allow_flashcall - Json encoded Bool -phone_number - Json encoded string -current_number - Json encoded Bool -api_id - Json encoded int -api_hash - Json encoded string - - - -Or, if you're into Lua: - -``` -auth_SentCode = auth.sendCode({allow_flashcall=Bool, phone_number='string', current_number=Bool, api_id=int, api_hash='string', }) -``` - diff --git a/old_docs/API_docs_v62/methods/auth_signIn.md b/old_docs/API_docs_v62/methods/auth_signIn.md index 75c50d70..ab40bb4d 100644 --- a/old_docs/API_docs_v62/methods/auth_signIn.md +++ b/old_docs/API_docs_v62/methods/auth_signIn.md @@ -6,71 +6,8 @@ description: auth.signIn parameters, return type and example [Back to methods index](index.md) -*You cannot use this method directly, use the complete_phone_login method instead (see https://daniil.it/MadelineProto for more info)* +**You cannot use this method directly, use the complete_phone_login method instead (see https://daniil.it/MadelineProto for more info)** -### Parameters: - -| Name | Type | Required | -|----------|:-------------:|---------:| -|phone\_number|[string](../types/string.md) | Yes| -|phone\_code\_hash|[string](../types/string.md) | Yes| -|phone\_code|[string](../types/string.md) | Yes| - - -### Return type: [auth\_Authorization](../types/auth_Authorization.md) - -### Example: - - -``` -$MadelineProto = new \danog\MadelineProto\API(); -if (isset($token)) { // Login as a bot - $MadelineProto->bot_login($token); -} -if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } - $MadelineProto->complete_phone_login($code); -} - -$auth_Authorization = $MadelineProto->auth->signIn(['phone_number' => 'string', 'phone_code_hash' => 'string', 'phone_code' => 'string', ]); -``` - -Or, if you're using the [PWRTelegram HTTP API](https://pwrtelegram.xyz): - -### As a bot: - -POST/GET to `https://api.pwrtelegram.xyz/botTOKEN/madeline` - -Parameters: - -* method - auth.signIn -* params - `{"phone_number": "string", "phone_code_hash": "string", "phone_code": "string", }` - - - -### As a user: - -POST/GET to `https://api.pwrtelegram.xyz/userTOKEN/auth.signIn` - -Parameters: - -phone_number - Json encoded string -phone_code_hash - Json encoded string -phone_code - Json encoded string - - - -Or, if you're into Lua: - -``` -auth_Authorization = auth.signIn({phone_number='string', phone_code_hash='string', phone_code='string', }) -``` - diff --git a/old_docs/API_docs_v62/methods/auth_signUp.md b/old_docs/API_docs_v62/methods/auth_signUp.md index f2a72b68..042d1191 100644 --- a/old_docs/API_docs_v62/methods/auth_signUp.md +++ b/old_docs/API_docs_v62/methods/auth_signUp.md @@ -6,75 +6,8 @@ description: auth.signUp parameters, return type and example [Back to methods index](index.md) -*You cannot use this method directly, use the complete_signup method instead (see https://daniil.it/MadelineProto for more info)* +**You cannot use this method directly, use the complete_signup method instead (see https://daniil.it/MadelineProto for more info)** -### Parameters: - -| Name | Type | Required | -|----------|:-------------:|---------:| -|phone\_number|[string](../types/string.md) | Yes| -|phone\_code\_hash|[string](../types/string.md) | Yes| -|phone\_code|[string](../types/string.md) | Yes| -|first\_name|[string](../types/string.md) | Yes| -|last\_name|[string](../types/string.md) | Yes| - - -### Return type: [auth\_Authorization](../types/auth_Authorization.md) - -### Example: - - -``` -$MadelineProto = new \danog\MadelineProto\API(); -if (isset($token)) { // Login as a bot - $MadelineProto->bot_login($token); -} -if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } - $MadelineProto->complete_phone_login($code); -} - -$auth_Authorization = $MadelineProto->auth->signUp(['phone_number' => 'string', 'phone_code_hash' => 'string', 'phone_code' => 'string', 'first_name' => 'string', 'last_name' => 'string', ]); -``` - -Or, if you're using the [PWRTelegram HTTP API](https://pwrtelegram.xyz): - -### As a bot: - -POST/GET to `https://api.pwrtelegram.xyz/botTOKEN/madeline` - -Parameters: - -* method - auth.signUp -* params - `{"phone_number": "string", "phone_code_hash": "string", "phone_code": "string", "first_name": "string", "last_name": "string", }` - - - -### As a user: - -POST/GET to `https://api.pwrtelegram.xyz/userTOKEN/auth.signUp` - -Parameters: - -phone_number - Json encoded string -phone_code_hash - Json encoded string -phone_code - Json encoded string -first_name - Json encoded string -last_name - Json encoded string - - - -Or, if you're into Lua: - -``` -auth_Authorization = auth.signUp({phone_number='string', phone_code_hash='string', phone_code='string', first_name='string', last_name='string', }) -``` - diff --git a/old_docs/API_docs_v62/methods/channels_getFullChannel.md b/old_docs/API_docs_v62/methods/channels_getFullChannel.md index 340efcfe..58dbe057 100644 --- a/old_docs/API_docs_v62/methods/channels_getFullChannel.md +++ b/old_docs/API_docs_v62/methods/channels_getFullChannel.md @@ -6,67 +6,8 @@ description: channels.getFullChannel parameters, return type and example [Back to methods index](index.md) -*You cannot use this method directly, use the get_pwr_chat, get_info, get_full_info methods instead (see https://daniil.it/MadelineProto for more info)* +**You cannot use this method directly, use the get_pwr_chat, get_info, get_full_info methods instead (see https://daniil.it/MadelineProto for more info)** -### Parameters: - -| Name | Type | Required | -|----------|:-------------:|---------:| -|channel|[InputChannel](../types/InputChannel.md) | Yes| - - -### Return type: [messages\_ChatFull](../types/messages_ChatFull.md) - -### Example: - - -``` -$MadelineProto = new \danog\MadelineProto\API(); -if (isset($token)) { // Login as a bot - $MadelineProto->bot_login($token); -} -if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } - $MadelineProto->complete_phone_login($code); -} - -$messages_ChatFull = $MadelineProto->channels->getFullChannel(['channel' => InputChannel, ]); -``` - -Or, if you're using the [PWRTelegram HTTP API](https://pwrtelegram.xyz): - -### As a bot: - -POST/GET to `https://api.pwrtelegram.xyz/botTOKEN/madeline` - -Parameters: - -* method - channels.getFullChannel -* params - `{"channel": InputChannel, }` - - - -### As a user: - -POST/GET to `https://api.pwrtelegram.xyz/userTOKEN/channels.getFullChannel` - -Parameters: - -channel - Json encoded InputChannel - - - -Or, if you're into Lua: - -``` -messages_ChatFull = channels.getFullChannel({channel=InputChannel, }) -``` - diff --git a/old_docs/API_docs_v62/methods/channels_getParticipants.md b/old_docs/API_docs_v62/methods/channels_getParticipants.md index 4c6e09cc..d84cf09c 100644 --- a/old_docs/API_docs_v62/methods/channels_getParticipants.md +++ b/old_docs/API_docs_v62/methods/channels_getParticipants.md @@ -6,73 +6,8 @@ description: channels.getParticipants parameters, return type and example [Back to methods index](index.md) -*You cannot use this method directly, use the get_pwr_chat, get_info, get_full_info methods instead (see https://daniil.it/MadelineProto for more info)* +**You cannot use this method directly, use the get_pwr_chat, get_info, get_full_info methods instead (see https://daniil.it/MadelineProto for more info)** -### Parameters: - -| Name | Type | Required | -|----------|:-------------:|---------:| -|channel|[InputChannel](../types/InputChannel.md) | Yes| -|filter|[ChannelParticipantsFilter](../types/ChannelParticipantsFilter.md) | Yes| -|offset|[int](../types/int.md) | Yes| -|limit|[int](../types/int.md) | Yes| - - -### Return type: [channels\_ChannelParticipants](../types/channels_ChannelParticipants.md) - -### Example: - - -``` -$MadelineProto = new \danog\MadelineProto\API(); -if (isset($token)) { // Login as a bot - $MadelineProto->bot_login($token); -} -if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } - $MadelineProto->complete_phone_login($code); -} - -$channels_ChannelParticipants = $MadelineProto->channels->getParticipants(['channel' => InputChannel, 'filter' => ChannelParticipantsFilter, 'offset' => int, 'limit' => int, ]); -``` - -Or, if you're using the [PWRTelegram HTTP API](https://pwrtelegram.xyz): - -### As a bot: - -POST/GET to `https://api.pwrtelegram.xyz/botTOKEN/madeline` - -Parameters: - -* method - channels.getParticipants -* params - `{"channel": InputChannel, "filter": ChannelParticipantsFilter, "offset": int, "limit": int, }` - - - -### As a user: - -POST/GET to `https://api.pwrtelegram.xyz/userTOKEN/channels.getParticipants` - -Parameters: - -channel - Json encoded InputChannel -filter - Json encoded ChannelParticipantsFilter -offset - Json encoded int -limit - Json encoded int - - - -Or, if you're into Lua: - -``` -channels_ChannelParticipants = channels.getParticipants({channel=InputChannel, filter=ChannelParticipantsFilter, offset=int, limit=int, }) -``` - diff --git a/old_docs/API_docs_v62/methods/contacts_resolveUsername.md b/old_docs/API_docs_v62/methods/contacts_resolveUsername.md index 90e72851..b665b382 100644 --- a/old_docs/API_docs_v62/methods/contacts_resolveUsername.md +++ b/old_docs/API_docs_v62/methods/contacts_resolveUsername.md @@ -6,67 +6,8 @@ description: contacts.resolveUsername parameters, return type and example [Back to methods index](index.md) -*You cannot use this method directly, use the resolve_username, get_pwr_chat, get_info, get_full_info methods instead (see https://daniil.it/MadelineProto for more info)* +**You cannot use this method directly, use the resolve_username, get_pwr_chat, get_info, get_full_info methods instead (see https://daniil.it/MadelineProto for more info)** -### Parameters: - -| Name | Type | Required | -|----------|:-------------:|---------:| -|username|[string](../types/string.md) | Yes| - - -### Return type: [contacts\_ResolvedPeer](../types/contacts_ResolvedPeer.md) - -### Example: - - -``` -$MadelineProto = new \danog\MadelineProto\API(); -if (isset($token)) { // Login as a bot - $MadelineProto->bot_login($token); -} -if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } - $MadelineProto->complete_phone_login($code); -} - -$contacts_ResolvedPeer = $MadelineProto->contacts->resolveUsername(['username' => 'string', ]); -``` - -Or, if you're using the [PWRTelegram HTTP API](https://pwrtelegram.xyz): - -### As a bot: - -POST/GET to `https://api.pwrtelegram.xyz/botTOKEN/madeline` - -Parameters: - -* method - contacts.resolveUsername -* params - `{"username": "string", }` - - - -### As a user: - -POST/GET to `https://api.pwrtelegram.xyz/userTOKEN/contacts.resolveUsername` - -Parameters: - -username - Json encoded string - - - -Or, if you're into Lua: - -``` -contacts_ResolvedPeer = contacts.resolveUsername({username='string', }) -``` - diff --git a/old_docs/API_docs_v62/methods/messages_acceptEncryption.md b/old_docs/API_docs_v62/methods/messages_acceptEncryption.md index 548087b6..243c4c00 100644 --- a/old_docs/API_docs_v62/methods/messages_acceptEncryption.md +++ b/old_docs/API_docs_v62/methods/messages_acceptEncryption.md @@ -6,71 +6,8 @@ description: messages.acceptEncryption parameters, return type and example [Back to methods index](index.md) -*You cannot use this method directly, see https://daniil.it/MadelineProto for more info on handling secret chats* +**You cannot use this method directly, see https://daniil.it/MadelineProto for more info on handling secret chats** -### Parameters: - -| Name | Type | Required | -|----------|:-------------:|---------:| -|peer|[InputEncryptedChat](../types/InputEncryptedChat.md) | Yes| -|g\_b|[bytes](../types/bytes.md) | Yes| -|key\_fingerprint|[long](../types/long.md) | Yes| - - -### Return type: [EncryptedChat](../types/EncryptedChat.md) - -### Example: - - -``` -$MadelineProto = new \danog\MadelineProto\API(); -if (isset($token)) { // Login as a bot - $MadelineProto->bot_login($token); -} -if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } - $MadelineProto->complete_phone_login($code); -} - -$EncryptedChat = $MadelineProto->messages->acceptEncryption(['peer' => InputEncryptedChat, 'g_b' => 'bytes', 'key_fingerprint' => long, ]); -``` - -Or, if you're using the [PWRTelegram HTTP API](https://pwrtelegram.xyz): - -### As a bot: - -POST/GET to `https://api.pwrtelegram.xyz/botTOKEN/madeline` - -Parameters: - -* method - messages.acceptEncryption -* params - `{"peer": InputEncryptedChat, "g_b": "bytes", "key_fingerprint": long, }` - - - -### As a user: - -POST/GET to `https://api.pwrtelegram.xyz/userTOKEN/messages.acceptEncryption` - -Parameters: - -peer - Json encoded InputEncryptedChat -g_b - Json encoded bytes -key_fingerprint - Json encoded long - - - -Or, if you're into Lua: - -``` -EncryptedChat = messages.acceptEncryption({peer=InputEncryptedChat, g_b='bytes', key_fingerprint=long, }) -``` - diff --git a/old_docs/API_docs_v62/methods/messages_discardEncryption.md b/old_docs/API_docs_v62/methods/messages_discardEncryption.md index 72648e9d..3a9dc58b 100644 --- a/old_docs/API_docs_v62/methods/messages_discardEncryption.md +++ b/old_docs/API_docs_v62/methods/messages_discardEncryption.md @@ -6,67 +6,8 @@ description: messages.discardEncryption parameters, return type and example [Back to methods index](index.md) -*You cannot use this method directly, see https://daniil.it/MadelineProto for more info on handling secret chats* +**You cannot use this method directly, see https://daniil.it/MadelineProto for more info on handling secret chats** -### Parameters: - -| Name | Type | Required | -|----------|:-------------:|---------:| -|chat\_id|[int](../types/int.md) | Yes| - - -### Return type: [Bool](../types/Bool.md) - -### Example: - - -``` -$MadelineProto = new \danog\MadelineProto\API(); -if (isset($token)) { // Login as a bot - $MadelineProto->bot_login($token); -} -if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } - $MadelineProto->complete_phone_login($code); -} - -$Bool = $MadelineProto->messages->discardEncryption(['chat_id' => int, ]); -``` - -Or, if you're using the [PWRTelegram HTTP API](https://pwrtelegram.xyz): - -### As a bot: - -POST/GET to `https://api.pwrtelegram.xyz/botTOKEN/madeline` - -Parameters: - -* method - messages.discardEncryption -* params - `{"chat_id": int, }` - - - -### As a user: - -POST/GET to `https://api.pwrtelegram.xyz/userTOKEN/messages.discardEncryption` - -Parameters: - -chat_id - Json encoded int - - - -Or, if you're into Lua: - -``` -Bool = messages.discardEncryption({chat_id=int, }) -``` - diff --git a/old_docs/API_docs_v62/methods/messages_getFullChat.md b/old_docs/API_docs_v62/methods/messages_getFullChat.md index 62102b64..ffa9c281 100644 --- a/old_docs/API_docs_v62/methods/messages_getFullChat.md +++ b/old_docs/API_docs_v62/methods/messages_getFullChat.md @@ -6,67 +6,8 @@ description: messages.getFullChat parameters, return type and example [Back to methods index](index.md) -*You cannot use this method directly, use the get_pwr_chat, get_info, get_full_info methods instead (see https://daniil.it/MadelineProto for more info)* +**You cannot use this method directly, use the get_pwr_chat, get_info, get_full_info methods instead (see https://daniil.it/MadelineProto for more info)** -### Parameters: - -| Name | Type | Required | -|----------|:-------------:|---------:| -|chat\_id|[InputPeer](../types/InputPeer.md) | Yes| - - -### Return type: [messages\_ChatFull](../types/messages_ChatFull.md) - -### Example: - - -``` -$MadelineProto = new \danog\MadelineProto\API(); -if (isset($token)) { // Login as a bot - $MadelineProto->bot_login($token); -} -if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } - $MadelineProto->complete_phone_login($code); -} - -$messages_ChatFull = $MadelineProto->messages->getFullChat(['chat_id' => InputPeer, ]); -``` - -Or, if you're using the [PWRTelegram HTTP API](https://pwrtelegram.xyz): - -### As a bot: - -POST/GET to `https://api.pwrtelegram.xyz/botTOKEN/madeline` - -Parameters: - -* method - messages.getFullChat -* params - `{"chat_id": InputPeer, }` - - - -### As a user: - -POST/GET to `https://api.pwrtelegram.xyz/userTOKEN/messages.getFullChat` - -Parameters: - -chat_id - Json encoded InputPeer - - - -Or, if you're into Lua: - -``` -messages_ChatFull = messages.getFullChat({chat_id=InputPeer, }) -``` - diff --git a/old_docs/API_docs_v62/methods/messages_requestEncryption.md b/old_docs/API_docs_v62/methods/messages_requestEncryption.md index 2fd1f825..c8476667 100644 --- a/old_docs/API_docs_v62/methods/messages_requestEncryption.md +++ b/old_docs/API_docs_v62/methods/messages_requestEncryption.md @@ -6,69 +6,8 @@ description: messages.requestEncryption parameters, return type and example [Back to methods index](index.md) -*You cannot use this method directly, see https://daniil.it/MadelineProto for more info on handling secret chats* +**You cannot use this method directly, see https://daniil.it/MadelineProto for more info on handling secret chats** -### Parameters: - -| Name | Type | Required | -|----------|:-------------:|---------:| -|user\_id|[InputUser](../types/InputUser.md) | Yes| -|g\_a|[bytes](../types/bytes.md) | Yes| - - -### Return type: [EncryptedChat](../types/EncryptedChat.md) - -### Example: - - -``` -$MadelineProto = new \danog\MadelineProto\API(); -if (isset($token)) { // Login as a bot - $MadelineProto->bot_login($token); -} -if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } - $MadelineProto->complete_phone_login($code); -} - -$EncryptedChat = $MadelineProto->messages->requestEncryption(['user_id' => InputUser, 'g_a' => 'bytes', ]); -``` - -Or, if you're using the [PWRTelegram HTTP API](https://pwrtelegram.xyz): - -### As a bot: - -POST/GET to `https://api.pwrtelegram.xyz/botTOKEN/madeline` - -Parameters: - -* method - messages.requestEncryption -* params - `{"user_id": InputUser, "g_a": "bytes", }` - - - -### As a user: - -POST/GET to `https://api.pwrtelegram.xyz/userTOKEN/messages.requestEncryption` - -Parameters: - -user_id - Json encoded InputUser -g_a - Json encoded bytes - - - -Or, if you're into Lua: - -``` -EncryptedChat = messages.requestEncryption({user_id=InputUser, g_a='bytes', }) -``` - diff --git a/old_docs/API_docs_v62/methods/phone_acceptCall.md b/old_docs/API_docs_v62/methods/phone_acceptCall.md index faf566fc..79266f27 100644 --- a/old_docs/API_docs_v62/methods/phone_acceptCall.md +++ b/old_docs/API_docs_v62/methods/phone_acceptCall.md @@ -6,73 +6,8 @@ description: phone.acceptCall parameters, return type and example [Back to methods index](index.md) -*You cannot use this method directly, see https://daniil.it/MadelineProto#calls for more info on handling calls* +**You cannot use this method directly, see https://daniil.it/MadelineProto#calls for more info on handling calls** -### Parameters: - -| Name | Type | Required | -|----------|:-------------:|---------:| -|peer|[InputPhoneCall](../types/InputPhoneCall.md) | Yes| -|g\_b|[bytes](../types/bytes.md) | Yes| -|key\_fingerprint|[long](../types/long.md) | Yes| -|protocol|[PhoneCallProtocol](../types/PhoneCallProtocol.md) | Yes| - - -### Return type: [phone\_PhoneCall](../types/phone_PhoneCall.md) - -### Example: - - -``` -$MadelineProto = new \danog\MadelineProto\API(); -if (isset($token)) { // Login as a bot - $MadelineProto->bot_login($token); -} -if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } - $MadelineProto->complete_phone_login($code); -} - -$phone_PhoneCall = $MadelineProto->phone->acceptCall(['peer' => InputPhoneCall, 'g_b' => 'bytes', 'key_fingerprint' => long, 'protocol' => PhoneCallProtocol, ]); -``` - -Or, if you're using the [PWRTelegram HTTP API](https://pwrtelegram.xyz): - -### As a bot: - -POST/GET to `https://api.pwrtelegram.xyz/botTOKEN/madeline` - -Parameters: - -* method - phone.acceptCall -* params - `{"peer": InputPhoneCall, "g_b": "bytes", "key_fingerprint": long, "protocol": PhoneCallProtocol, }` - - - -### As a user: - -POST/GET to `https://api.pwrtelegram.xyz/userTOKEN/phone.acceptCall` - -Parameters: - -peer - Json encoded InputPhoneCall -g_b - Json encoded bytes -key_fingerprint - Json encoded long -protocol - Json encoded PhoneCallProtocol - - - -Or, if you're into Lua: - -``` -phone_PhoneCall = phone.acceptCall({peer=InputPhoneCall, g_b='bytes', key_fingerprint=long, protocol=PhoneCallProtocol, }) -``` - diff --git a/old_docs/API_docs_v62/methods/phone_discardCall.md b/old_docs/API_docs_v62/methods/phone_discardCall.md index d4f088de..c300e61c 100644 --- a/old_docs/API_docs_v62/methods/phone_discardCall.md +++ b/old_docs/API_docs_v62/methods/phone_discardCall.md @@ -6,73 +6,8 @@ description: phone.discardCall parameters, return type and example [Back to methods index](index.md) -*You cannot use this method directly, see https://daniil.it/MadelineProto#calls for more info on handling calls* +**You cannot use this method directly, see https://daniil.it/MadelineProto#calls for more info on handling calls** -### Parameters: - -| Name | Type | Required | -|----------|:-------------:|---------:| -|peer|[InputPhoneCall](../types/InputPhoneCall.md) | Yes| -|duration|[int](../types/int.md) | Yes| -|reason|[PhoneCallDiscardReason](../types/PhoneCallDiscardReason.md) | Yes| -|connection\_id|[long](../types/long.md) | Yes| - - -### Return type: [Bool](../types/Bool.md) - -### Example: - - -``` -$MadelineProto = new \danog\MadelineProto\API(); -if (isset($token)) { // Login as a bot - $MadelineProto->bot_login($token); -} -if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } - $MadelineProto->complete_phone_login($code); -} - -$Bool = $MadelineProto->phone->discardCall(['peer' => InputPhoneCall, 'duration' => int, 'reason' => PhoneCallDiscardReason, 'connection_id' => long, ]); -``` - -Or, if you're using the [PWRTelegram HTTP API](https://pwrtelegram.xyz): - -### As a bot: - -POST/GET to `https://api.pwrtelegram.xyz/botTOKEN/madeline` - -Parameters: - -* method - phone.discardCall -* params - `{"peer": InputPhoneCall, "duration": int, "reason": PhoneCallDiscardReason, "connection_id": long, }` - - - -### As a user: - -POST/GET to `https://api.pwrtelegram.xyz/userTOKEN/phone.discardCall` - -Parameters: - -peer - Json encoded InputPhoneCall -duration - Json encoded int -reason - Json encoded PhoneCallDiscardReason -connection_id - Json encoded long - - - -Or, if you're into Lua: - -``` -Bool = phone.discardCall({peer=InputPhoneCall, duration=int, reason=PhoneCallDiscardReason, connection_id=long, }) -``` - diff --git a/old_docs/API_docs_v62/methods/phone_requestCall.md b/old_docs/API_docs_v62/methods/phone_requestCall.md index 82dfa7ac..c8ae48a9 100644 --- a/old_docs/API_docs_v62/methods/phone_requestCall.md +++ b/old_docs/API_docs_v62/methods/phone_requestCall.md @@ -6,71 +6,8 @@ description: phone.requestCall parameters, return type and example [Back to methods index](index.md) -*You cannot use this method directly, see https://daniil.it/MadelineProto#calls for more info on handling calls* +**You cannot use this method directly, see https://daniil.it/MadelineProto#calls for more info on handling calls** -### Parameters: - -| Name | Type | Required | -|----------|:-------------:|---------:| -|user\_id|[InputUser](../types/InputUser.md) | Yes| -|g\_a|[bytes](../types/bytes.md) | Yes| -|protocol|[PhoneCallProtocol](../types/PhoneCallProtocol.md) | Yes| - - -### Return type: [phone\_PhoneCall](../types/phone_PhoneCall.md) - -### Example: - - -``` -$MadelineProto = new \danog\MadelineProto\API(); -if (isset($token)) { // Login as a bot - $MadelineProto->bot_login($token); -} -if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } - $MadelineProto->complete_phone_login($code); -} - -$phone_PhoneCall = $MadelineProto->phone->requestCall(['user_id' => InputUser, 'g_a' => 'bytes', 'protocol' => PhoneCallProtocol, ]); -``` - -Or, if you're using the [PWRTelegram HTTP API](https://pwrtelegram.xyz): - -### As a bot: - -POST/GET to `https://api.pwrtelegram.xyz/botTOKEN/madeline` - -Parameters: - -* method - phone.requestCall -* params - `{"user_id": InputUser, "g_a": "bytes", "protocol": PhoneCallProtocol, }` - - - -### As a user: - -POST/GET to `https://api.pwrtelegram.xyz/userTOKEN/phone.requestCall` - -Parameters: - -user_id - Json encoded InputUser -g_a - Json encoded bytes -protocol - Json encoded PhoneCallProtocol - - - -Or, if you're into Lua: - -``` -phone_PhoneCall = phone.requestCall({user_id=InputUser, g_a='bytes', protocol=PhoneCallProtocol, }) -``` - diff --git a/old_docs/API_docs_v62/methods/updates_getChannelDifference.md b/old_docs/API_docs_v62/methods/updates_getChannelDifference.md index d4eff325..2e69d1cd 100644 --- a/old_docs/API_docs_v62/methods/updates_getChannelDifference.md +++ b/old_docs/API_docs_v62/methods/updates_getChannelDifference.md @@ -6,75 +6,8 @@ description: updates.getChannelDifference parameters, return type and example [Back to methods index](index.md) -*You cannot use this method directly, see https://daniil.it/MadelineProto for more info on handling updates* +**You cannot use this method directly, see https://daniil.it/MadelineProto for more info on handling updates** -### Parameters: - -| Name | Type | Required | -|----------|:-------------:|---------:| -|force|[Bool](../types/Bool.md) | Optional| -|channel|[InputChannel](../types/InputChannel.md) | Yes| -|filter|[ChannelMessagesFilter](../types/ChannelMessagesFilter.md) | Yes| -|pts|[int](../types/int.md) | Yes| -|limit|[int](../types/int.md) | Yes| - - -### Return type: [updates\_ChannelDifference](../types/updates_ChannelDifference.md) - -### Example: - - -``` -$MadelineProto = new \danog\MadelineProto\API(); -if (isset($token)) { // Login as a bot - $MadelineProto->bot_login($token); -} -if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } - $MadelineProto->complete_phone_login($code); -} - -$updates_ChannelDifference = $MadelineProto->updates->getChannelDifference(['force' => Bool, 'channel' => InputChannel, 'filter' => ChannelMessagesFilter, 'pts' => int, 'limit' => int, ]); -``` - -Or, if you're using the [PWRTelegram HTTP API](https://pwrtelegram.xyz): - -### As a bot: - -POST/GET to `https://api.pwrtelegram.xyz/botTOKEN/madeline` - -Parameters: - -* method - updates.getChannelDifference -* params - `{"force": Bool, "channel": InputChannel, "filter": ChannelMessagesFilter, "pts": int, "limit": int, }` - - - -### As a user: - -POST/GET to `https://api.pwrtelegram.xyz/userTOKEN/updates.getChannelDifference` - -Parameters: - -force - Json encoded Bool -channel - Json encoded InputChannel -filter - Json encoded ChannelMessagesFilter -pts - Json encoded int -limit - Json encoded int - - - -Or, if you're into Lua: - -``` -updates_ChannelDifference = updates.getChannelDifference({force=Bool, channel=InputChannel, filter=ChannelMessagesFilter, pts=int, limit=int, }) -``` - diff --git a/old_docs/API_docs_v62/methods/updates_getDifference.md b/old_docs/API_docs_v62/methods/updates_getDifference.md index b50de4bb..9bcee79a 100644 --- a/old_docs/API_docs_v62/methods/updates_getDifference.md +++ b/old_docs/API_docs_v62/methods/updates_getDifference.md @@ -6,73 +6,8 @@ description: updates.getDifference parameters, return type and example [Back to methods index](index.md) -*You cannot use this method directly, see https://daniil.it/MadelineProto for more info on handling updates* +**You cannot use this method directly, see https://daniil.it/MadelineProto for more info on handling updates** -### Parameters: - -| Name | Type | Required | -|----------|:-------------:|---------:| -|pts|[int](../types/int.md) | Yes| -|pts\_total\_limit|[int](../types/int.md) | Optional| -|date|[int](../types/int.md) | Yes| -|qts|[int](../types/int.md) | Yes| - - -### Return type: [updates\_Difference](../types/updates_Difference.md) - -### Example: - - -``` -$MadelineProto = new \danog\MadelineProto\API(); -if (isset($token)) { // Login as a bot - $MadelineProto->bot_login($token); -} -if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } - $MadelineProto->complete_phone_login($code); -} - -$updates_Difference = $MadelineProto->updates->getDifference(['pts' => int, 'pts_total_limit' => int, 'date' => int, 'qts' => int, ]); -``` - -Or, if you're using the [PWRTelegram HTTP API](https://pwrtelegram.xyz): - -### As a bot: - -POST/GET to `https://api.pwrtelegram.xyz/botTOKEN/madeline` - -Parameters: - -* method - updates.getDifference -* params - `{"pts": int, "pts_total_limit": int, "date": int, "qts": int, }` - - - -### As a user: - -POST/GET to `https://api.pwrtelegram.xyz/userTOKEN/updates.getDifference` - -Parameters: - -pts - Json encoded int -pts_total_limit - Json encoded int -date - Json encoded int -qts - Json encoded int - - - -Or, if you're into Lua: - -``` -updates_Difference = updates.getDifference({pts=int, pts_total_limit=int, date=int, qts=int, }) -``` - diff --git a/old_docs/API_docs_v62/methods/updates_getState.md b/old_docs/API_docs_v62/methods/updates_getState.md index 51f6ae80..fd5955ba 100644 --- a/old_docs/API_docs_v62/methods/updates_getState.md +++ b/old_docs/API_docs_v62/methods/updates_getState.md @@ -6,61 +6,8 @@ description: updates.getState parameters, return type and example [Back to methods index](index.md) -*You cannot use this method directly, see https://daniil.it/MadelineProto for more info on handling updates* +**You cannot use this method directly, see https://daniil.it/MadelineProto for more info on handling updates** - - -### Return type: [updates\_State](../types/updates_State.md) - -### Example: - - -``` -$MadelineProto = new \danog\MadelineProto\API(); -if (isset($token)) { // Login as a bot - $MadelineProto->bot_login($token); -} -if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } - $MadelineProto->complete_phone_login($code); -} - -$updates_State = $MadelineProto->updates->getState(); -``` - -Or, if you're using the [PWRTelegram HTTP API](https://pwrtelegram.xyz): - -### As a bot: - -POST/GET to `https://api.pwrtelegram.xyz/botTOKEN/madeline` - -Parameters: - -* method - updates.getState -* params - `{}` - - - -### As a user: - -POST/GET to `https://api.pwrtelegram.xyz/userTOKEN/updates.getState` - -Parameters: - - - - -Or, if you're into Lua: - -``` -updates_State = updates.getState({}) -``` - diff --git a/old_docs/API_docs_v62/methods/upload_getFile.md b/old_docs/API_docs_v62/methods/upload_getFile.md index a1003003..add7d54e 100644 --- a/old_docs/API_docs_v62/methods/upload_getFile.md +++ b/old_docs/API_docs_v62/methods/upload_getFile.md @@ -6,71 +6,8 @@ description: upload.getFile parameters, return type and example [Back to methods index](index.md) -*You cannot use this method directly, use the upload, download_to_stream, download_to_file, download_to_dir methods instead; see https://daniil.it/MadelineProto for more info* +**You cannot use this method directly, use the upload, download_to_stream, download_to_file, download_to_dir methods instead; see https://daniil.it/MadelineProto for more info** -### Parameters: - -| Name | Type | Required | -|----------|:-------------:|---------:| -|location|[InputFileLocation](../types/InputFileLocation.md) | Yes| -|offset|[int](../types/int.md) | Yes| -|limit|[int](../types/int.md) | Yes| - - -### Return type: [upload\_File](../types/upload_File.md) - -### Example: - - -``` -$MadelineProto = new \danog\MadelineProto\API(); -if (isset($token)) { // Login as a bot - $MadelineProto->bot_login($token); -} -if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } - $MadelineProto->complete_phone_login($code); -} - -$upload_File = $MadelineProto->upload->getFile(['location' => InputFileLocation, 'offset' => int, 'limit' => int, ]); -``` - -Or, if you're using the [PWRTelegram HTTP API](https://pwrtelegram.xyz): - -### As a bot: - -POST/GET to `https://api.pwrtelegram.xyz/botTOKEN/madeline` - -Parameters: - -* method - upload.getFile -* params - `{"location": InputFileLocation, "offset": int, "limit": int, }` - - - -### As a user: - -POST/GET to `https://api.pwrtelegram.xyz/userTOKEN/upload.getFile` - -Parameters: - -location - Json encoded InputFileLocation -offset - Json encoded int -limit - Json encoded int - - - -Or, if you're into Lua: - -``` -upload_File = upload.getFile({location=InputFileLocation, offset=int, limit=int, }) -``` - diff --git a/old_docs/API_docs_v62/methods/upload_saveBigFilePart.md b/old_docs/API_docs_v62/methods/upload_saveBigFilePart.md index e5c96d89..b1c3ea28 100644 --- a/old_docs/API_docs_v62/methods/upload_saveBigFilePart.md +++ b/old_docs/API_docs_v62/methods/upload_saveBigFilePart.md @@ -6,73 +6,8 @@ description: upload.saveBigFilePart parameters, return type and example [Back to methods index](index.md) -*You cannot use this method directly, use the upload, download_to_stream, download_to_file, download_to_dir methods instead; see https://daniil.it/MadelineProto for more info* +**You cannot use this method directly, use the upload, download_to_stream, download_to_file, download_to_dir methods instead; see https://daniil.it/MadelineProto for more info** -### Parameters: - -| Name | Type | Required | -|----------|:-------------:|---------:| -|file\_id|[long](../types/long.md) | Yes| -|file\_part|[int](../types/int.md) | Yes| -|file\_total\_parts|[int](../types/int.md) | Yes| -|bytes|[bytes](../types/bytes.md) | Yes| - - -### Return type: [Bool](../types/Bool.md) - -### Example: - - -``` -$MadelineProto = new \danog\MadelineProto\API(); -if (isset($token)) { // Login as a bot - $MadelineProto->bot_login($token); -} -if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } - $MadelineProto->complete_phone_login($code); -} - -$Bool = $MadelineProto->upload->saveBigFilePart(['file_id' => long, 'file_part' => int, 'file_total_parts' => int, 'bytes' => 'bytes', ]); -``` - -Or, if you're using the [PWRTelegram HTTP API](https://pwrtelegram.xyz): - -### As a bot: - -POST/GET to `https://api.pwrtelegram.xyz/botTOKEN/madeline` - -Parameters: - -* method - upload.saveBigFilePart -* params - `{"file_id": long, "file_part": int, "file_total_parts": int, "bytes": "bytes", }` - - - -### As a user: - -POST/GET to `https://api.pwrtelegram.xyz/userTOKEN/upload.saveBigFilePart` - -Parameters: - -file_id - Json encoded long -file_part - Json encoded int -file_total_parts - Json encoded int -bytes - Json encoded bytes - - - -Or, if you're into Lua: - -``` -Bool = upload.saveBigFilePart({file_id=long, file_part=int, file_total_parts=int, bytes='bytes', }) -``` - diff --git a/old_docs/API_docs_v62/methods/upload_saveFilePart.md b/old_docs/API_docs_v62/methods/upload_saveFilePart.md index 1c16e4b2..c482f321 100644 --- a/old_docs/API_docs_v62/methods/upload_saveFilePart.md +++ b/old_docs/API_docs_v62/methods/upload_saveFilePart.md @@ -6,71 +6,8 @@ description: upload.saveFilePart parameters, return type and example [Back to methods index](index.md) -*You cannot use this method directly, use the upload, download_to_stream, download_to_file, download_to_dir methods instead; see https://daniil.it/MadelineProto for more info* +**You cannot use this method directly, use the upload, download_to_stream, download_to_file, download_to_dir methods instead; see https://daniil.it/MadelineProto for more info** -### Parameters: - -| Name | Type | Required | -|----------|:-------------:|---------:| -|file\_id|[long](../types/long.md) | Yes| -|file\_part|[int](../types/int.md) | Yes| -|bytes|[bytes](../types/bytes.md) | Yes| - - -### Return type: [Bool](../types/Bool.md) - -### Example: - - -``` -$MadelineProto = new \danog\MadelineProto\API(); -if (isset($token)) { // Login as a bot - $MadelineProto->bot_login($token); -} -if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } - $MadelineProto->complete_phone_login($code); -} - -$Bool = $MadelineProto->upload->saveFilePart(['file_id' => long, 'file_part' => int, 'bytes' => 'bytes', ]); -``` - -Or, if you're using the [PWRTelegram HTTP API](https://pwrtelegram.xyz): - -### As a bot: - -POST/GET to `https://api.pwrtelegram.xyz/botTOKEN/madeline` - -Parameters: - -* method - upload.saveFilePart -* params - `{"file_id": long, "file_part": int, "bytes": "bytes", }` - - - -### As a user: - -POST/GET to `https://api.pwrtelegram.xyz/userTOKEN/upload.saveFilePart` - -Parameters: - -file_id - Json encoded long -file_part - Json encoded int -bytes - Json encoded bytes - - - -Or, if you're into Lua: - -``` -Bool = upload.saveFilePart({file_id=long, file_part=int, bytes='bytes', }) -``` - diff --git a/old_docs/API_docs_v62/methods/users_getFullUser.md b/old_docs/API_docs_v62/methods/users_getFullUser.md index 645ab12e..4ec831ec 100644 --- a/old_docs/API_docs_v62/methods/users_getFullUser.md +++ b/old_docs/API_docs_v62/methods/users_getFullUser.md @@ -6,67 +6,8 @@ description: users.getFullUser parameters, return type and example [Back to methods index](index.md) -*You cannot use this method directly, use the get_pwr_chat, get_info, get_full_info methods instead (see https://daniil.it/MadelineProto for more info)* +**You cannot use this method directly, use the get_pwr_chat, get_info, get_full_info methods instead (see https://daniil.it/MadelineProto for more info)** -### Parameters: - -| Name | Type | Required | -|----------|:-------------:|---------:| -|id|[InputUser](../types/InputUser.md) | Yes| - - -### Return type: [UserFull](../types/UserFull.md) - -### Example: - - -``` -$MadelineProto = new \danog\MadelineProto\API(); -if (isset($token)) { // Login as a bot - $MadelineProto->bot_login($token); -} -if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } - $MadelineProto->complete_phone_login($code); -} - -$UserFull = $MadelineProto->users->getFullUser(['id' => InputUser, ]); -``` - -Or, if you're using the [PWRTelegram HTTP API](https://pwrtelegram.xyz): - -### As a bot: - -POST/GET to `https://api.pwrtelegram.xyz/botTOKEN/madeline` - -Parameters: - -* method - users.getFullUser -* params - `{"id": InputUser, }` - - - -### As a user: - -POST/GET to `https://api.pwrtelegram.xyz/userTOKEN/users.getFullUser` - -Parameters: - -id - Json encoded InputUser - - - -Or, if you're into Lua: - -``` -UserFull = users.getFullUser({id=InputUser, }) -``` - diff --git a/old_docs/API_docs_v62/types/PhoneCall.md b/old_docs/API_docs_v62/types/PhoneCall.md index cb9cc822..668c475e 100644 --- a/old_docs/API_docs_v62/types/PhoneCall.md +++ b/old_docs/API_docs_v62/types/PhoneCall.md @@ -146,7 +146,6 @@ The audio configuration is an array structured in the following way: * `playOnHold(array $files)` - Array of audio files encoded in PCM, with the audio input configuration to loop on hold (when the files given with play/then have finished playing). If not called, no data will be played, returns `$this` * `isPlaying()` - Returns true if MadelineProto is still playing the files given with play/then, false if the hold files (or nothing) is being played * `setMicMute(bool $mute)` - Stops/resumes playing files/hold files, returns `$this` -* `setBitrate(int $bitrate)` - Sets maximum outgoing bitrate, and increases the bitrate of the call to the maximum outgoing bitrate (high values increase the quality of the song), returns `$this` * `setOutputFile(string $outputfile)` - Writes incoming audio data to file encoded in PCM, with the audio output configuration, returns `$this` * `unsetOutputFile()` - Stops writing audio data to previously set file, returns `$this` diff --git a/old_docs/API_docs_v65/constructors/README.md b/old_docs/API_docs_v65/constructors/README.md index 6bf8d515..df67fabb 100644 --- a/old_docs/API_docs_v65/constructors/README.md +++ b/old_docs/API_docs_v65/constructors/README.md @@ -4,9 +4,6 @@ description: List of constructors --- # Constructors [Back to API documentation index](..) - - - ***

[$accountDaysTTL](../constructors/accountDaysTTL.md) = \['days' => [int](../types/int.md), \]; diff --git a/old_docs/API_docs_v65/methods/auth_importBotAuthorization.md b/old_docs/API_docs_v65/methods/auth_importBotAuthorization.md index 10f1b242..57521a13 100644 --- a/old_docs/API_docs_v65/methods/auth_importBotAuthorization.md +++ b/old_docs/API_docs_v65/methods/auth_importBotAuthorization.md @@ -6,79 +6,8 @@ description: auth.importBotAuthorization parameters, return type and example [Back to methods index](index.md) -*You cannot use this method directly, use the bot_login method instead (see https://daniil.it/MadelineProto for more info)* +**You cannot use this method directly, use the bot_login method instead (see https://daniil.it/MadelineProto for more info)** -### Parameters: - -| Name | Type | Required | -|----------|:-------------:|---------:| -|a|[Bool](../types/Bool.md) | Optional| -|b|[Bool](../types/Bool.md) | Optional| -|c|[Bool](../types/Bool.md) | Optional| -|d|[Bool](../types/Bool.md) | Optional| -|api\_id|[int](../types/int.md) | Yes| -|api\_hash|[string](../types/string.md) | Yes| -|bot\_auth\_token|[string](../types/string.md) | Yes| - - -### Return type: [auth\_Authorization](../types/auth_Authorization.md) - -### Example: - - -``` -$MadelineProto = new \danog\MadelineProto\API(); -if (isset($token)) { // Login as a bot - $MadelineProto->bot_login($token); -} -if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } - $MadelineProto->complete_phone_login($code); -} - -$auth_Authorization = $MadelineProto->auth->importBotAuthorization(['a' => Bool, 'b' => Bool, 'c' => Bool, 'd' => Bool, 'api_id' => int, 'api_hash' => 'string', 'bot_auth_token' => 'string', ]); -``` - -Or, if you're using the [PWRTelegram HTTP API](https://pwrtelegram.xyz): - -### As a bot: - -POST/GET to `https://api.pwrtelegram.xyz/botTOKEN/madeline` - -Parameters: - -* method - auth.importBotAuthorization -* params - `{"a": Bool, "b": Bool, "c": Bool, "d": Bool, "api_id": int, "api_hash": "string", "bot_auth_token": "string", }` - - - -### As a user: - -POST/GET to `https://api.pwrtelegram.xyz/userTOKEN/auth.importBotAuthorization` - -Parameters: - -a - Json encoded Bool -b - Json encoded Bool -c - Json encoded Bool -d - Json encoded Bool -api_id - Json encoded int -api_hash - Json encoded string -bot_auth_token - Json encoded string - - - -Or, if you're into Lua: - -``` -auth_Authorization = auth.importBotAuthorization({a=Bool, b=Bool, c=Bool, d=Bool, api_id=int, api_hash='string', bot_auth_token='string', }) -``` - diff --git a/old_docs/API_docs_v65/methods/auth_logOut.md b/old_docs/API_docs_v65/methods/auth_logOut.md index 12159bab..7d5bb3f7 100644 --- a/old_docs/API_docs_v65/methods/auth_logOut.md +++ b/old_docs/API_docs_v65/methods/auth_logOut.md @@ -6,61 +6,8 @@ description: auth.logOut parameters, return type and example [Back to methods index](index.md) -*You cannot use this method directly, use the logout method instead (see https://daniil.it/MadelineProto for more info)* +**You cannot use this method directly, use the logout method instead (see https://daniil.it/MadelineProto for more info)** - - -### Return type: [Bool](../types/Bool.md) - -### Example: - - -``` -$MadelineProto = new \danog\MadelineProto\API(); -if (isset($token)) { // Login as a bot - $MadelineProto->bot_login($token); -} -if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } - $MadelineProto->complete_phone_login($code); -} - -$Bool = $MadelineProto->auth->logOut(); -``` - -Or, if you're using the [PWRTelegram HTTP API](https://pwrtelegram.xyz): - -### As a bot: - -POST/GET to `https://api.pwrtelegram.xyz/botTOKEN/madeline` - -Parameters: - -* method - auth.logOut -* params - `{}` - - - -### As a user: - -POST/GET to `https://api.pwrtelegram.xyz/userTOKEN/auth.logOut` - -Parameters: - - - - -Or, if you're into Lua: - -``` -Bool = auth.logOut({}) -``` - diff --git a/old_docs/API_docs_v65/methods/auth_sendCode.md b/old_docs/API_docs_v65/methods/auth_sendCode.md index bda88218..22d1df94 100644 --- a/old_docs/API_docs_v65/methods/auth_sendCode.md +++ b/old_docs/API_docs_v65/methods/auth_sendCode.md @@ -6,75 +6,8 @@ description: auth.sendCode parameters, return type and example [Back to methods index](index.md) -*You cannot use this method directly, use the phone_login method instead (see https://daniil.it/MadelineProto for more info)* +**You cannot use this method directly, use the phone_login method instead (see https://daniil.it/MadelineProto for more info)** -### Parameters: - -| Name | Type | Required | -|----------|:-------------:|---------:| -|allow\_flashcall|[Bool](../types/Bool.md) | Optional| -|phone\_number|[string](../types/string.md) | Yes| -|current\_number|[Bool](../types/Bool.md) | Optional| -|api\_id|[int](../types/int.md) | Yes| -|api\_hash|[string](../types/string.md) | Yes| - - -### Return type: [auth\_SentCode](../types/auth_SentCode.md) - -### Example: - - -``` -$MadelineProto = new \danog\MadelineProto\API(); -if (isset($token)) { // Login as a bot - $MadelineProto->bot_login($token); -} -if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } - $MadelineProto->complete_phone_login($code); -} - -$auth_SentCode = $MadelineProto->auth->sendCode(['allow_flashcall' => Bool, 'phone_number' => 'string', 'current_number' => Bool, 'api_id' => int, 'api_hash' => 'string', ]); -``` - -Or, if you're using the [PWRTelegram HTTP API](https://pwrtelegram.xyz): - -### As a bot: - -POST/GET to `https://api.pwrtelegram.xyz/botTOKEN/madeline` - -Parameters: - -* method - auth.sendCode -* params - `{"allow_flashcall": Bool, "phone_number": "string", "current_number": Bool, "api_id": int, "api_hash": "string", }` - - - -### As a user: - -POST/GET to `https://api.pwrtelegram.xyz/userTOKEN/auth.sendCode` - -Parameters: - -allow_flashcall - Json encoded Bool -phone_number - Json encoded string -current_number - Json encoded Bool -api_id - Json encoded int -api_hash - Json encoded string - - - -Or, if you're into Lua: - -``` -auth_SentCode = auth.sendCode({allow_flashcall=Bool, phone_number='string', current_number=Bool, api_id=int, api_hash='string', }) -``` - diff --git a/old_docs/API_docs_v65/methods/auth_signIn.md b/old_docs/API_docs_v65/methods/auth_signIn.md index 75c50d70..ab40bb4d 100644 --- a/old_docs/API_docs_v65/methods/auth_signIn.md +++ b/old_docs/API_docs_v65/methods/auth_signIn.md @@ -6,71 +6,8 @@ description: auth.signIn parameters, return type and example [Back to methods index](index.md) -*You cannot use this method directly, use the complete_phone_login method instead (see https://daniil.it/MadelineProto for more info)* +**You cannot use this method directly, use the complete_phone_login method instead (see https://daniil.it/MadelineProto for more info)** -### Parameters: - -| Name | Type | Required | -|----------|:-------------:|---------:| -|phone\_number|[string](../types/string.md) | Yes| -|phone\_code\_hash|[string](../types/string.md) | Yes| -|phone\_code|[string](../types/string.md) | Yes| - - -### Return type: [auth\_Authorization](../types/auth_Authorization.md) - -### Example: - - -``` -$MadelineProto = new \danog\MadelineProto\API(); -if (isset($token)) { // Login as a bot - $MadelineProto->bot_login($token); -} -if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } - $MadelineProto->complete_phone_login($code); -} - -$auth_Authorization = $MadelineProto->auth->signIn(['phone_number' => 'string', 'phone_code_hash' => 'string', 'phone_code' => 'string', ]); -``` - -Or, if you're using the [PWRTelegram HTTP API](https://pwrtelegram.xyz): - -### As a bot: - -POST/GET to `https://api.pwrtelegram.xyz/botTOKEN/madeline` - -Parameters: - -* method - auth.signIn -* params - `{"phone_number": "string", "phone_code_hash": "string", "phone_code": "string", }` - - - -### As a user: - -POST/GET to `https://api.pwrtelegram.xyz/userTOKEN/auth.signIn` - -Parameters: - -phone_number - Json encoded string -phone_code_hash - Json encoded string -phone_code - Json encoded string - - - -Or, if you're into Lua: - -``` -auth_Authorization = auth.signIn({phone_number='string', phone_code_hash='string', phone_code='string', }) -``` - diff --git a/old_docs/API_docs_v65/methods/auth_signUp.md b/old_docs/API_docs_v65/methods/auth_signUp.md index f2a72b68..042d1191 100644 --- a/old_docs/API_docs_v65/methods/auth_signUp.md +++ b/old_docs/API_docs_v65/methods/auth_signUp.md @@ -6,75 +6,8 @@ description: auth.signUp parameters, return type and example [Back to methods index](index.md) -*You cannot use this method directly, use the complete_signup method instead (see https://daniil.it/MadelineProto for more info)* +**You cannot use this method directly, use the complete_signup method instead (see https://daniil.it/MadelineProto for more info)** -### Parameters: - -| Name | Type | Required | -|----------|:-------------:|---------:| -|phone\_number|[string](../types/string.md) | Yes| -|phone\_code\_hash|[string](../types/string.md) | Yes| -|phone\_code|[string](../types/string.md) | Yes| -|first\_name|[string](../types/string.md) | Yes| -|last\_name|[string](../types/string.md) | Yes| - - -### Return type: [auth\_Authorization](../types/auth_Authorization.md) - -### Example: - - -``` -$MadelineProto = new \danog\MadelineProto\API(); -if (isset($token)) { // Login as a bot - $MadelineProto->bot_login($token); -} -if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } - $MadelineProto->complete_phone_login($code); -} - -$auth_Authorization = $MadelineProto->auth->signUp(['phone_number' => 'string', 'phone_code_hash' => 'string', 'phone_code' => 'string', 'first_name' => 'string', 'last_name' => 'string', ]); -``` - -Or, if you're using the [PWRTelegram HTTP API](https://pwrtelegram.xyz): - -### As a bot: - -POST/GET to `https://api.pwrtelegram.xyz/botTOKEN/madeline` - -Parameters: - -* method - auth.signUp -* params - `{"phone_number": "string", "phone_code_hash": "string", "phone_code": "string", "first_name": "string", "last_name": "string", }` - - - -### As a user: - -POST/GET to `https://api.pwrtelegram.xyz/userTOKEN/auth.signUp` - -Parameters: - -phone_number - Json encoded string -phone_code_hash - Json encoded string -phone_code - Json encoded string -first_name - Json encoded string -last_name - Json encoded string - - - -Or, if you're into Lua: - -``` -auth_Authorization = auth.signUp({phone_number='string', phone_code_hash='string', phone_code='string', first_name='string', last_name='string', }) -``` - diff --git a/old_docs/API_docs_v65/methods/channels_getFullChannel.md b/old_docs/API_docs_v65/methods/channels_getFullChannel.md index 340efcfe..58dbe057 100644 --- a/old_docs/API_docs_v65/methods/channels_getFullChannel.md +++ b/old_docs/API_docs_v65/methods/channels_getFullChannel.md @@ -6,67 +6,8 @@ description: channels.getFullChannel parameters, return type and example [Back to methods index](index.md) -*You cannot use this method directly, use the get_pwr_chat, get_info, get_full_info methods instead (see https://daniil.it/MadelineProto for more info)* +**You cannot use this method directly, use the get_pwr_chat, get_info, get_full_info methods instead (see https://daniil.it/MadelineProto for more info)** -### Parameters: - -| Name | Type | Required | -|----------|:-------------:|---------:| -|channel|[InputChannel](../types/InputChannel.md) | Yes| - - -### Return type: [messages\_ChatFull](../types/messages_ChatFull.md) - -### Example: - - -``` -$MadelineProto = new \danog\MadelineProto\API(); -if (isset($token)) { // Login as a bot - $MadelineProto->bot_login($token); -} -if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } - $MadelineProto->complete_phone_login($code); -} - -$messages_ChatFull = $MadelineProto->channels->getFullChannel(['channel' => InputChannel, ]); -``` - -Or, if you're using the [PWRTelegram HTTP API](https://pwrtelegram.xyz): - -### As a bot: - -POST/GET to `https://api.pwrtelegram.xyz/botTOKEN/madeline` - -Parameters: - -* method - channels.getFullChannel -* params - `{"channel": InputChannel, }` - - - -### As a user: - -POST/GET to `https://api.pwrtelegram.xyz/userTOKEN/channels.getFullChannel` - -Parameters: - -channel - Json encoded InputChannel - - - -Or, if you're into Lua: - -``` -messages_ChatFull = channels.getFullChannel({channel=InputChannel, }) -``` - diff --git a/old_docs/API_docs_v65/methods/channels_getParticipants.md b/old_docs/API_docs_v65/methods/channels_getParticipants.md index 4c6e09cc..d84cf09c 100644 --- a/old_docs/API_docs_v65/methods/channels_getParticipants.md +++ b/old_docs/API_docs_v65/methods/channels_getParticipants.md @@ -6,73 +6,8 @@ description: channels.getParticipants parameters, return type and example [Back to methods index](index.md) -*You cannot use this method directly, use the get_pwr_chat, get_info, get_full_info methods instead (see https://daniil.it/MadelineProto for more info)* +**You cannot use this method directly, use the get_pwr_chat, get_info, get_full_info methods instead (see https://daniil.it/MadelineProto for more info)** -### Parameters: - -| Name | Type | Required | -|----------|:-------------:|---------:| -|channel|[InputChannel](../types/InputChannel.md) | Yes| -|filter|[ChannelParticipantsFilter](../types/ChannelParticipantsFilter.md) | Yes| -|offset|[int](../types/int.md) | Yes| -|limit|[int](../types/int.md) | Yes| - - -### Return type: [channels\_ChannelParticipants](../types/channels_ChannelParticipants.md) - -### Example: - - -``` -$MadelineProto = new \danog\MadelineProto\API(); -if (isset($token)) { // Login as a bot - $MadelineProto->bot_login($token); -} -if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } - $MadelineProto->complete_phone_login($code); -} - -$channels_ChannelParticipants = $MadelineProto->channels->getParticipants(['channel' => InputChannel, 'filter' => ChannelParticipantsFilter, 'offset' => int, 'limit' => int, ]); -``` - -Or, if you're using the [PWRTelegram HTTP API](https://pwrtelegram.xyz): - -### As a bot: - -POST/GET to `https://api.pwrtelegram.xyz/botTOKEN/madeline` - -Parameters: - -* method - channels.getParticipants -* params - `{"channel": InputChannel, "filter": ChannelParticipantsFilter, "offset": int, "limit": int, }` - - - -### As a user: - -POST/GET to `https://api.pwrtelegram.xyz/userTOKEN/channels.getParticipants` - -Parameters: - -channel - Json encoded InputChannel -filter - Json encoded ChannelParticipantsFilter -offset - Json encoded int -limit - Json encoded int - - - -Or, if you're into Lua: - -``` -channels_ChannelParticipants = channels.getParticipants({channel=InputChannel, filter=ChannelParticipantsFilter, offset=int, limit=int, }) -``` - diff --git a/old_docs/API_docs_v65/methods/contacts_resolveUsername.md b/old_docs/API_docs_v65/methods/contacts_resolveUsername.md index 90e72851..b665b382 100644 --- a/old_docs/API_docs_v65/methods/contacts_resolveUsername.md +++ b/old_docs/API_docs_v65/methods/contacts_resolveUsername.md @@ -6,67 +6,8 @@ description: contacts.resolveUsername parameters, return type and example [Back to methods index](index.md) -*You cannot use this method directly, use the resolve_username, get_pwr_chat, get_info, get_full_info methods instead (see https://daniil.it/MadelineProto for more info)* +**You cannot use this method directly, use the resolve_username, get_pwr_chat, get_info, get_full_info methods instead (see https://daniil.it/MadelineProto for more info)** -### Parameters: - -| Name | Type | Required | -|----------|:-------------:|---------:| -|username|[string](../types/string.md) | Yes| - - -### Return type: [contacts\_ResolvedPeer](../types/contacts_ResolvedPeer.md) - -### Example: - - -``` -$MadelineProto = new \danog\MadelineProto\API(); -if (isset($token)) { // Login as a bot - $MadelineProto->bot_login($token); -} -if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } - $MadelineProto->complete_phone_login($code); -} - -$contacts_ResolvedPeer = $MadelineProto->contacts->resolveUsername(['username' => 'string', ]); -``` - -Or, if you're using the [PWRTelegram HTTP API](https://pwrtelegram.xyz): - -### As a bot: - -POST/GET to `https://api.pwrtelegram.xyz/botTOKEN/madeline` - -Parameters: - -* method - contacts.resolveUsername -* params - `{"username": "string", }` - - - -### As a user: - -POST/GET to `https://api.pwrtelegram.xyz/userTOKEN/contacts.resolveUsername` - -Parameters: - -username - Json encoded string - - - -Or, if you're into Lua: - -``` -contacts_ResolvedPeer = contacts.resolveUsername({username='string', }) -``` - diff --git a/old_docs/API_docs_v65/methods/messages_acceptEncryption.md b/old_docs/API_docs_v65/methods/messages_acceptEncryption.md index 548087b6..243c4c00 100644 --- a/old_docs/API_docs_v65/methods/messages_acceptEncryption.md +++ b/old_docs/API_docs_v65/methods/messages_acceptEncryption.md @@ -6,71 +6,8 @@ description: messages.acceptEncryption parameters, return type and example [Back to methods index](index.md) -*You cannot use this method directly, see https://daniil.it/MadelineProto for more info on handling secret chats* +**You cannot use this method directly, see https://daniil.it/MadelineProto for more info on handling secret chats** -### Parameters: - -| Name | Type | Required | -|----------|:-------------:|---------:| -|peer|[InputEncryptedChat](../types/InputEncryptedChat.md) | Yes| -|g\_b|[bytes](../types/bytes.md) | Yes| -|key\_fingerprint|[long](../types/long.md) | Yes| - - -### Return type: [EncryptedChat](../types/EncryptedChat.md) - -### Example: - - -``` -$MadelineProto = new \danog\MadelineProto\API(); -if (isset($token)) { // Login as a bot - $MadelineProto->bot_login($token); -} -if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } - $MadelineProto->complete_phone_login($code); -} - -$EncryptedChat = $MadelineProto->messages->acceptEncryption(['peer' => InputEncryptedChat, 'g_b' => 'bytes', 'key_fingerprint' => long, ]); -``` - -Or, if you're using the [PWRTelegram HTTP API](https://pwrtelegram.xyz): - -### As a bot: - -POST/GET to `https://api.pwrtelegram.xyz/botTOKEN/madeline` - -Parameters: - -* method - messages.acceptEncryption -* params - `{"peer": InputEncryptedChat, "g_b": "bytes", "key_fingerprint": long, }` - - - -### As a user: - -POST/GET to `https://api.pwrtelegram.xyz/userTOKEN/messages.acceptEncryption` - -Parameters: - -peer - Json encoded InputEncryptedChat -g_b - Json encoded bytes -key_fingerprint - Json encoded long - - - -Or, if you're into Lua: - -``` -EncryptedChat = messages.acceptEncryption({peer=InputEncryptedChat, g_b='bytes', key_fingerprint=long, }) -``` - diff --git a/old_docs/API_docs_v65/methods/messages_discardEncryption.md b/old_docs/API_docs_v65/methods/messages_discardEncryption.md index 72648e9d..3a9dc58b 100644 --- a/old_docs/API_docs_v65/methods/messages_discardEncryption.md +++ b/old_docs/API_docs_v65/methods/messages_discardEncryption.md @@ -6,67 +6,8 @@ description: messages.discardEncryption parameters, return type and example [Back to methods index](index.md) -*You cannot use this method directly, see https://daniil.it/MadelineProto for more info on handling secret chats* +**You cannot use this method directly, see https://daniil.it/MadelineProto for more info on handling secret chats** -### Parameters: - -| Name | Type | Required | -|----------|:-------------:|---------:| -|chat\_id|[int](../types/int.md) | Yes| - - -### Return type: [Bool](../types/Bool.md) - -### Example: - - -``` -$MadelineProto = new \danog\MadelineProto\API(); -if (isset($token)) { // Login as a bot - $MadelineProto->bot_login($token); -} -if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } - $MadelineProto->complete_phone_login($code); -} - -$Bool = $MadelineProto->messages->discardEncryption(['chat_id' => int, ]); -``` - -Or, if you're using the [PWRTelegram HTTP API](https://pwrtelegram.xyz): - -### As a bot: - -POST/GET to `https://api.pwrtelegram.xyz/botTOKEN/madeline` - -Parameters: - -* method - messages.discardEncryption -* params - `{"chat_id": int, }` - - - -### As a user: - -POST/GET to `https://api.pwrtelegram.xyz/userTOKEN/messages.discardEncryption` - -Parameters: - -chat_id - Json encoded int - - - -Or, if you're into Lua: - -``` -Bool = messages.discardEncryption({chat_id=int, }) -``` - diff --git a/old_docs/API_docs_v65/methods/messages_getFullChat.md b/old_docs/API_docs_v65/methods/messages_getFullChat.md index 62102b64..ffa9c281 100644 --- a/old_docs/API_docs_v65/methods/messages_getFullChat.md +++ b/old_docs/API_docs_v65/methods/messages_getFullChat.md @@ -6,67 +6,8 @@ description: messages.getFullChat parameters, return type and example [Back to methods index](index.md) -*You cannot use this method directly, use the get_pwr_chat, get_info, get_full_info methods instead (see https://daniil.it/MadelineProto for more info)* +**You cannot use this method directly, use the get_pwr_chat, get_info, get_full_info methods instead (see https://daniil.it/MadelineProto for more info)** -### Parameters: - -| Name | Type | Required | -|----------|:-------------:|---------:| -|chat\_id|[InputPeer](../types/InputPeer.md) | Yes| - - -### Return type: [messages\_ChatFull](../types/messages_ChatFull.md) - -### Example: - - -``` -$MadelineProto = new \danog\MadelineProto\API(); -if (isset($token)) { // Login as a bot - $MadelineProto->bot_login($token); -} -if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } - $MadelineProto->complete_phone_login($code); -} - -$messages_ChatFull = $MadelineProto->messages->getFullChat(['chat_id' => InputPeer, ]); -``` - -Or, if you're using the [PWRTelegram HTTP API](https://pwrtelegram.xyz): - -### As a bot: - -POST/GET to `https://api.pwrtelegram.xyz/botTOKEN/madeline` - -Parameters: - -* method - messages.getFullChat -* params - `{"chat_id": InputPeer, }` - - - -### As a user: - -POST/GET to `https://api.pwrtelegram.xyz/userTOKEN/messages.getFullChat` - -Parameters: - -chat_id - Json encoded InputPeer - - - -Or, if you're into Lua: - -``` -messages_ChatFull = messages.getFullChat({chat_id=InputPeer, }) -``` - diff --git a/old_docs/API_docs_v65/methods/messages_requestEncryption.md b/old_docs/API_docs_v65/methods/messages_requestEncryption.md index 2fd1f825..c8476667 100644 --- a/old_docs/API_docs_v65/methods/messages_requestEncryption.md +++ b/old_docs/API_docs_v65/methods/messages_requestEncryption.md @@ -6,69 +6,8 @@ description: messages.requestEncryption parameters, return type and example [Back to methods index](index.md) -*You cannot use this method directly, see https://daniil.it/MadelineProto for more info on handling secret chats* +**You cannot use this method directly, see https://daniil.it/MadelineProto for more info on handling secret chats** -### Parameters: - -| Name | Type | Required | -|----------|:-------------:|---------:| -|user\_id|[InputUser](../types/InputUser.md) | Yes| -|g\_a|[bytes](../types/bytes.md) | Yes| - - -### Return type: [EncryptedChat](../types/EncryptedChat.md) - -### Example: - - -``` -$MadelineProto = new \danog\MadelineProto\API(); -if (isset($token)) { // Login as a bot - $MadelineProto->bot_login($token); -} -if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } - $MadelineProto->complete_phone_login($code); -} - -$EncryptedChat = $MadelineProto->messages->requestEncryption(['user_id' => InputUser, 'g_a' => 'bytes', ]); -``` - -Or, if you're using the [PWRTelegram HTTP API](https://pwrtelegram.xyz): - -### As a bot: - -POST/GET to `https://api.pwrtelegram.xyz/botTOKEN/madeline` - -Parameters: - -* method - messages.requestEncryption -* params - `{"user_id": InputUser, "g_a": "bytes", }` - - - -### As a user: - -POST/GET to `https://api.pwrtelegram.xyz/userTOKEN/messages.requestEncryption` - -Parameters: - -user_id - Json encoded InputUser -g_a - Json encoded bytes - - - -Or, if you're into Lua: - -``` -EncryptedChat = messages.requestEncryption({user_id=InputUser, g_a='bytes', }) -``` - diff --git a/old_docs/API_docs_v65/methods/phone_acceptCall.md b/old_docs/API_docs_v65/methods/phone_acceptCall.md index a3cf68a8..79266f27 100644 --- a/old_docs/API_docs_v65/methods/phone_acceptCall.md +++ b/old_docs/API_docs_v65/methods/phone_acceptCall.md @@ -6,71 +6,8 @@ description: phone.acceptCall parameters, return type and example [Back to methods index](index.md) -*You cannot use this method directly, see https://daniil.it/MadelineProto#calls for more info on handling calls* +**You cannot use this method directly, see https://daniil.it/MadelineProto#calls for more info on handling calls** -### Parameters: - -| Name | Type | Required | -|----------|:-------------:|---------:| -|peer|[InputPhoneCall](../types/InputPhoneCall.md) | Yes| -|g\_b|[bytes](../types/bytes.md) | Yes| -|protocol|[PhoneCallProtocol](../types/PhoneCallProtocol.md) | Yes| - - -### Return type: [phone\_PhoneCall](../types/phone_PhoneCall.md) - -### Example: - - -``` -$MadelineProto = new \danog\MadelineProto\API(); -if (isset($token)) { // Login as a bot - $MadelineProto->bot_login($token); -} -if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } - $MadelineProto->complete_phone_login($code); -} - -$phone_PhoneCall = $MadelineProto->phone->acceptCall(['peer' => InputPhoneCall, 'g_b' => 'bytes', 'protocol' => PhoneCallProtocol, ]); -``` - -Or, if you're using the [PWRTelegram HTTP API](https://pwrtelegram.xyz): - -### As a bot: - -POST/GET to `https://api.pwrtelegram.xyz/botTOKEN/madeline` - -Parameters: - -* method - phone.acceptCall -* params - `{"peer": InputPhoneCall, "g_b": "bytes", "protocol": PhoneCallProtocol, }` - - - -### As a user: - -POST/GET to `https://api.pwrtelegram.xyz/userTOKEN/phone.acceptCall` - -Parameters: - -peer - Json encoded InputPhoneCall -g_b - Json encoded bytes -protocol - Json encoded PhoneCallProtocol - - - -Or, if you're into Lua: - -``` -phone_PhoneCall = phone.acceptCall({peer=InputPhoneCall, g_b='bytes', protocol=PhoneCallProtocol, }) -``` - diff --git a/old_docs/API_docs_v65/methods/phone_confirmCall.md b/old_docs/API_docs_v65/methods/phone_confirmCall.md index ecec0ffc..69e90751 100644 --- a/old_docs/API_docs_v65/methods/phone_confirmCall.md +++ b/old_docs/API_docs_v65/methods/phone_confirmCall.md @@ -6,73 +6,8 @@ description: phone.confirmCall parameters, return type and example [Back to methods index](index.md) -*You cannot use this method directly, see https://daniil.it/MadelineProto#calls for more info on handling calls* +**You cannot use this method directly, see https://daniil.it/MadelineProto#calls for more info on handling calls** -### Parameters: - -| Name | Type | Required | -|----------|:-------------:|---------:| -|peer|[InputPhoneCall](../types/InputPhoneCall.md) | Yes| -|g\_a|[bytes](../types/bytes.md) | Yes| -|key\_fingerprint|[long](../types/long.md) | Yes| -|protocol|[PhoneCallProtocol](../types/PhoneCallProtocol.md) | Yes| - - -### Return type: [phone\_PhoneCall](../types/phone_PhoneCall.md) - -### Example: - - -``` -$MadelineProto = new \danog\MadelineProto\API(); -if (isset($token)) { // Login as a bot - $MadelineProto->bot_login($token); -} -if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } - $MadelineProto->complete_phone_login($code); -} - -$phone_PhoneCall = $MadelineProto->phone->confirmCall(['peer' => InputPhoneCall, 'g_a' => 'bytes', 'key_fingerprint' => long, 'protocol' => PhoneCallProtocol, ]); -``` - -Or, if you're using the [PWRTelegram HTTP API](https://pwrtelegram.xyz): - -### As a bot: - -POST/GET to `https://api.pwrtelegram.xyz/botTOKEN/madeline` - -Parameters: - -* method - phone.confirmCall -* params - `{"peer": InputPhoneCall, "g_a": "bytes", "key_fingerprint": long, "protocol": PhoneCallProtocol, }` - - - -### As a user: - -POST/GET to `https://api.pwrtelegram.xyz/userTOKEN/phone.confirmCall` - -Parameters: - -peer - Json encoded InputPhoneCall -g_a - Json encoded bytes -key_fingerprint - Json encoded long -protocol - Json encoded PhoneCallProtocol - - - -Or, if you're into Lua: - -``` -phone_PhoneCall = phone.confirmCall({peer=InputPhoneCall, g_a='bytes', key_fingerprint=long, protocol=PhoneCallProtocol, }) -``` - diff --git a/old_docs/API_docs_v65/methods/phone_discardCall.md b/old_docs/API_docs_v65/methods/phone_discardCall.md index bb6b4cd7..c300e61c 100644 --- a/old_docs/API_docs_v65/methods/phone_discardCall.md +++ b/old_docs/API_docs_v65/methods/phone_discardCall.md @@ -6,73 +6,8 @@ description: phone.discardCall parameters, return type and example [Back to methods index](index.md) -*You cannot use this method directly, see https://daniil.it/MadelineProto#calls for more info on handling calls* +**You cannot use this method directly, see https://daniil.it/MadelineProto#calls for more info on handling calls** -### Parameters: - -| Name | Type | Required | -|----------|:-------------:|---------:| -|peer|[InputPhoneCall](../types/InputPhoneCall.md) | Yes| -|duration|[int](../types/int.md) | Yes| -|reason|[PhoneCallDiscardReason](../types/PhoneCallDiscardReason.md) | Yes| -|connection\_id|[long](../types/long.md) | Yes| - - -### Return type: [Updates](../types/Updates.md) - -### Example: - - -``` -$MadelineProto = new \danog\MadelineProto\API(); -if (isset($token)) { // Login as a bot - $MadelineProto->bot_login($token); -} -if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } - $MadelineProto->complete_phone_login($code); -} - -$Updates = $MadelineProto->phone->discardCall(['peer' => InputPhoneCall, 'duration' => int, 'reason' => PhoneCallDiscardReason, 'connection_id' => long, ]); -``` - -Or, if you're using the [PWRTelegram HTTP API](https://pwrtelegram.xyz): - -### As a bot: - -POST/GET to `https://api.pwrtelegram.xyz/botTOKEN/madeline` - -Parameters: - -* method - phone.discardCall -* params - `{"peer": InputPhoneCall, "duration": int, "reason": PhoneCallDiscardReason, "connection_id": long, }` - - - -### As a user: - -POST/GET to `https://api.pwrtelegram.xyz/userTOKEN/phone.discardCall` - -Parameters: - -peer - Json encoded InputPhoneCall -duration - Json encoded int -reason - Json encoded PhoneCallDiscardReason -connection_id - Json encoded long - - - -Or, if you're into Lua: - -``` -Updates = phone.discardCall({peer=InputPhoneCall, duration=int, reason=PhoneCallDiscardReason, connection_id=long, }) -``` - diff --git a/old_docs/API_docs_v65/methods/phone_requestCall.md b/old_docs/API_docs_v65/methods/phone_requestCall.md index 7364c886..c8ae48a9 100644 --- a/old_docs/API_docs_v65/methods/phone_requestCall.md +++ b/old_docs/API_docs_v65/methods/phone_requestCall.md @@ -6,71 +6,8 @@ description: phone.requestCall parameters, return type and example [Back to methods index](index.md) -*You cannot use this method directly, see https://daniil.it/MadelineProto#calls for more info on handling calls* +**You cannot use this method directly, see https://daniil.it/MadelineProto#calls for more info on handling calls** -### Parameters: - -| Name | Type | Required | -|----------|:-------------:|---------:| -|user\_id|[InputUser](../types/InputUser.md) | Yes| -|g\_a\_hash|[bytes](../types/bytes.md) | Yes| -|protocol|[PhoneCallProtocol](../types/PhoneCallProtocol.md) | Yes| - - -### Return type: [phone\_PhoneCall](../types/phone_PhoneCall.md) - -### Example: - - -``` -$MadelineProto = new \danog\MadelineProto\API(); -if (isset($token)) { // Login as a bot - $MadelineProto->bot_login($token); -} -if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } - $MadelineProto->complete_phone_login($code); -} - -$phone_PhoneCall = $MadelineProto->phone->requestCall(['user_id' => InputUser, 'g_a_hash' => 'bytes', 'protocol' => PhoneCallProtocol, ]); -``` - -Or, if you're using the [PWRTelegram HTTP API](https://pwrtelegram.xyz): - -### As a bot: - -POST/GET to `https://api.pwrtelegram.xyz/botTOKEN/madeline` - -Parameters: - -* method - phone.requestCall -* params - `{"user_id": InputUser, "g_a_hash": "bytes", "protocol": PhoneCallProtocol, }` - - - -### As a user: - -POST/GET to `https://api.pwrtelegram.xyz/userTOKEN/phone.requestCall` - -Parameters: - -user_id - Json encoded InputUser -g_a_hash - Json encoded bytes -protocol - Json encoded PhoneCallProtocol - - - -Or, if you're into Lua: - -``` -phone_PhoneCall = phone.requestCall({user_id=InputUser, g_a_hash='bytes', protocol=PhoneCallProtocol, }) -``` - diff --git a/old_docs/API_docs_v65/methods/updates_getChannelDifference.md b/old_docs/API_docs_v65/methods/updates_getChannelDifference.md index d4eff325..2e69d1cd 100644 --- a/old_docs/API_docs_v65/methods/updates_getChannelDifference.md +++ b/old_docs/API_docs_v65/methods/updates_getChannelDifference.md @@ -6,75 +6,8 @@ description: updates.getChannelDifference parameters, return type and example [Back to methods index](index.md) -*You cannot use this method directly, see https://daniil.it/MadelineProto for more info on handling updates* +**You cannot use this method directly, see https://daniil.it/MadelineProto for more info on handling updates** -### Parameters: - -| Name | Type | Required | -|----------|:-------------:|---------:| -|force|[Bool](../types/Bool.md) | Optional| -|channel|[InputChannel](../types/InputChannel.md) | Yes| -|filter|[ChannelMessagesFilter](../types/ChannelMessagesFilter.md) | Yes| -|pts|[int](../types/int.md) | Yes| -|limit|[int](../types/int.md) | Yes| - - -### Return type: [updates\_ChannelDifference](../types/updates_ChannelDifference.md) - -### Example: - - -``` -$MadelineProto = new \danog\MadelineProto\API(); -if (isset($token)) { // Login as a bot - $MadelineProto->bot_login($token); -} -if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } - $MadelineProto->complete_phone_login($code); -} - -$updates_ChannelDifference = $MadelineProto->updates->getChannelDifference(['force' => Bool, 'channel' => InputChannel, 'filter' => ChannelMessagesFilter, 'pts' => int, 'limit' => int, ]); -``` - -Or, if you're using the [PWRTelegram HTTP API](https://pwrtelegram.xyz): - -### As a bot: - -POST/GET to `https://api.pwrtelegram.xyz/botTOKEN/madeline` - -Parameters: - -* method - updates.getChannelDifference -* params - `{"force": Bool, "channel": InputChannel, "filter": ChannelMessagesFilter, "pts": int, "limit": int, }` - - - -### As a user: - -POST/GET to `https://api.pwrtelegram.xyz/userTOKEN/updates.getChannelDifference` - -Parameters: - -force - Json encoded Bool -channel - Json encoded InputChannel -filter - Json encoded ChannelMessagesFilter -pts - Json encoded int -limit - Json encoded int - - - -Or, if you're into Lua: - -``` -updates_ChannelDifference = updates.getChannelDifference({force=Bool, channel=InputChannel, filter=ChannelMessagesFilter, pts=int, limit=int, }) -``` - diff --git a/old_docs/API_docs_v65/methods/updates_getDifference.md b/old_docs/API_docs_v65/methods/updates_getDifference.md index b50de4bb..9bcee79a 100644 --- a/old_docs/API_docs_v65/methods/updates_getDifference.md +++ b/old_docs/API_docs_v65/methods/updates_getDifference.md @@ -6,73 +6,8 @@ description: updates.getDifference parameters, return type and example [Back to methods index](index.md) -*You cannot use this method directly, see https://daniil.it/MadelineProto for more info on handling updates* +**You cannot use this method directly, see https://daniil.it/MadelineProto for more info on handling updates** -### Parameters: - -| Name | Type | Required | -|----------|:-------------:|---------:| -|pts|[int](../types/int.md) | Yes| -|pts\_total\_limit|[int](../types/int.md) | Optional| -|date|[int](../types/int.md) | Yes| -|qts|[int](../types/int.md) | Yes| - - -### Return type: [updates\_Difference](../types/updates_Difference.md) - -### Example: - - -``` -$MadelineProto = new \danog\MadelineProto\API(); -if (isset($token)) { // Login as a bot - $MadelineProto->bot_login($token); -} -if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } - $MadelineProto->complete_phone_login($code); -} - -$updates_Difference = $MadelineProto->updates->getDifference(['pts' => int, 'pts_total_limit' => int, 'date' => int, 'qts' => int, ]); -``` - -Or, if you're using the [PWRTelegram HTTP API](https://pwrtelegram.xyz): - -### As a bot: - -POST/GET to `https://api.pwrtelegram.xyz/botTOKEN/madeline` - -Parameters: - -* method - updates.getDifference -* params - `{"pts": int, "pts_total_limit": int, "date": int, "qts": int, }` - - - -### As a user: - -POST/GET to `https://api.pwrtelegram.xyz/userTOKEN/updates.getDifference` - -Parameters: - -pts - Json encoded int -pts_total_limit - Json encoded int -date - Json encoded int -qts - Json encoded int - - - -Or, if you're into Lua: - -``` -updates_Difference = updates.getDifference({pts=int, pts_total_limit=int, date=int, qts=int, }) -``` - diff --git a/old_docs/API_docs_v65/methods/updates_getState.md b/old_docs/API_docs_v65/methods/updates_getState.md index 51f6ae80..fd5955ba 100644 --- a/old_docs/API_docs_v65/methods/updates_getState.md +++ b/old_docs/API_docs_v65/methods/updates_getState.md @@ -6,61 +6,8 @@ description: updates.getState parameters, return type and example [Back to methods index](index.md) -*You cannot use this method directly, see https://daniil.it/MadelineProto for more info on handling updates* +**You cannot use this method directly, see https://daniil.it/MadelineProto for more info on handling updates** - - -### Return type: [updates\_State](../types/updates_State.md) - -### Example: - - -``` -$MadelineProto = new \danog\MadelineProto\API(); -if (isset($token)) { // Login as a bot - $MadelineProto->bot_login($token); -} -if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } - $MadelineProto->complete_phone_login($code); -} - -$updates_State = $MadelineProto->updates->getState(); -``` - -Or, if you're using the [PWRTelegram HTTP API](https://pwrtelegram.xyz): - -### As a bot: - -POST/GET to `https://api.pwrtelegram.xyz/botTOKEN/madeline` - -Parameters: - -* method - updates.getState -* params - `{}` - - - -### As a user: - -POST/GET to `https://api.pwrtelegram.xyz/userTOKEN/updates.getState` - -Parameters: - - - - -Or, if you're into Lua: - -``` -updates_State = updates.getState({}) -``` - diff --git a/old_docs/API_docs_v65/methods/upload_getFile.md b/old_docs/API_docs_v65/methods/upload_getFile.md index a1003003..add7d54e 100644 --- a/old_docs/API_docs_v65/methods/upload_getFile.md +++ b/old_docs/API_docs_v65/methods/upload_getFile.md @@ -6,71 +6,8 @@ description: upload.getFile parameters, return type and example [Back to methods index](index.md) -*You cannot use this method directly, use the upload, download_to_stream, download_to_file, download_to_dir methods instead; see https://daniil.it/MadelineProto for more info* +**You cannot use this method directly, use the upload, download_to_stream, download_to_file, download_to_dir methods instead; see https://daniil.it/MadelineProto for more info** -### Parameters: - -| Name | Type | Required | -|----------|:-------------:|---------:| -|location|[InputFileLocation](../types/InputFileLocation.md) | Yes| -|offset|[int](../types/int.md) | Yes| -|limit|[int](../types/int.md) | Yes| - - -### Return type: [upload\_File](../types/upload_File.md) - -### Example: - - -``` -$MadelineProto = new \danog\MadelineProto\API(); -if (isset($token)) { // Login as a bot - $MadelineProto->bot_login($token); -} -if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } - $MadelineProto->complete_phone_login($code); -} - -$upload_File = $MadelineProto->upload->getFile(['location' => InputFileLocation, 'offset' => int, 'limit' => int, ]); -``` - -Or, if you're using the [PWRTelegram HTTP API](https://pwrtelegram.xyz): - -### As a bot: - -POST/GET to `https://api.pwrtelegram.xyz/botTOKEN/madeline` - -Parameters: - -* method - upload.getFile -* params - `{"location": InputFileLocation, "offset": int, "limit": int, }` - - - -### As a user: - -POST/GET to `https://api.pwrtelegram.xyz/userTOKEN/upload.getFile` - -Parameters: - -location - Json encoded InputFileLocation -offset - Json encoded int -limit - Json encoded int - - - -Or, if you're into Lua: - -``` -upload_File = upload.getFile({location=InputFileLocation, offset=int, limit=int, }) -``` - diff --git a/old_docs/API_docs_v65/methods/upload_saveBigFilePart.md b/old_docs/API_docs_v65/methods/upload_saveBigFilePart.md index e5c96d89..b1c3ea28 100644 --- a/old_docs/API_docs_v65/methods/upload_saveBigFilePart.md +++ b/old_docs/API_docs_v65/methods/upload_saveBigFilePart.md @@ -6,73 +6,8 @@ description: upload.saveBigFilePart parameters, return type and example [Back to methods index](index.md) -*You cannot use this method directly, use the upload, download_to_stream, download_to_file, download_to_dir methods instead; see https://daniil.it/MadelineProto for more info* +**You cannot use this method directly, use the upload, download_to_stream, download_to_file, download_to_dir methods instead; see https://daniil.it/MadelineProto for more info** -### Parameters: - -| Name | Type | Required | -|----------|:-------------:|---------:| -|file\_id|[long](../types/long.md) | Yes| -|file\_part|[int](../types/int.md) | Yes| -|file\_total\_parts|[int](../types/int.md) | Yes| -|bytes|[bytes](../types/bytes.md) | Yes| - - -### Return type: [Bool](../types/Bool.md) - -### Example: - - -``` -$MadelineProto = new \danog\MadelineProto\API(); -if (isset($token)) { // Login as a bot - $MadelineProto->bot_login($token); -} -if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } - $MadelineProto->complete_phone_login($code); -} - -$Bool = $MadelineProto->upload->saveBigFilePart(['file_id' => long, 'file_part' => int, 'file_total_parts' => int, 'bytes' => 'bytes', ]); -``` - -Or, if you're using the [PWRTelegram HTTP API](https://pwrtelegram.xyz): - -### As a bot: - -POST/GET to `https://api.pwrtelegram.xyz/botTOKEN/madeline` - -Parameters: - -* method - upload.saveBigFilePart -* params - `{"file_id": long, "file_part": int, "file_total_parts": int, "bytes": "bytes", }` - - - -### As a user: - -POST/GET to `https://api.pwrtelegram.xyz/userTOKEN/upload.saveBigFilePart` - -Parameters: - -file_id - Json encoded long -file_part - Json encoded int -file_total_parts - Json encoded int -bytes - Json encoded bytes - - - -Or, if you're into Lua: - -``` -Bool = upload.saveBigFilePart({file_id=long, file_part=int, file_total_parts=int, bytes='bytes', }) -``` - diff --git a/old_docs/API_docs_v65/methods/upload_saveFilePart.md b/old_docs/API_docs_v65/methods/upload_saveFilePart.md index 1c16e4b2..c482f321 100644 --- a/old_docs/API_docs_v65/methods/upload_saveFilePart.md +++ b/old_docs/API_docs_v65/methods/upload_saveFilePart.md @@ -6,71 +6,8 @@ description: upload.saveFilePart parameters, return type and example [Back to methods index](index.md) -*You cannot use this method directly, use the upload, download_to_stream, download_to_file, download_to_dir methods instead; see https://daniil.it/MadelineProto for more info* +**You cannot use this method directly, use the upload, download_to_stream, download_to_file, download_to_dir methods instead; see https://daniil.it/MadelineProto for more info** -### Parameters: - -| Name | Type | Required | -|----------|:-------------:|---------:| -|file\_id|[long](../types/long.md) | Yes| -|file\_part|[int](../types/int.md) | Yes| -|bytes|[bytes](../types/bytes.md) | Yes| - - -### Return type: [Bool](../types/Bool.md) - -### Example: - - -``` -$MadelineProto = new \danog\MadelineProto\API(); -if (isset($token)) { // Login as a bot - $MadelineProto->bot_login($token); -} -if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } - $MadelineProto->complete_phone_login($code); -} - -$Bool = $MadelineProto->upload->saveFilePart(['file_id' => long, 'file_part' => int, 'bytes' => 'bytes', ]); -``` - -Or, if you're using the [PWRTelegram HTTP API](https://pwrtelegram.xyz): - -### As a bot: - -POST/GET to `https://api.pwrtelegram.xyz/botTOKEN/madeline` - -Parameters: - -* method - upload.saveFilePart -* params - `{"file_id": long, "file_part": int, "bytes": "bytes", }` - - - -### As a user: - -POST/GET to `https://api.pwrtelegram.xyz/userTOKEN/upload.saveFilePart` - -Parameters: - -file_id - Json encoded long -file_part - Json encoded int -bytes - Json encoded bytes - - - -Or, if you're into Lua: - -``` -Bool = upload.saveFilePart({file_id=long, file_part=int, bytes='bytes', }) -``` - diff --git a/old_docs/API_docs_v65/methods/users_getFullUser.md b/old_docs/API_docs_v65/methods/users_getFullUser.md index 645ab12e..4ec831ec 100644 --- a/old_docs/API_docs_v65/methods/users_getFullUser.md +++ b/old_docs/API_docs_v65/methods/users_getFullUser.md @@ -6,67 +6,8 @@ description: users.getFullUser parameters, return type and example [Back to methods index](index.md) -*You cannot use this method directly, use the get_pwr_chat, get_info, get_full_info methods instead (see https://daniil.it/MadelineProto for more info)* +**You cannot use this method directly, use the get_pwr_chat, get_info, get_full_info methods instead (see https://daniil.it/MadelineProto for more info)** -### Parameters: - -| Name | Type | Required | -|----------|:-------------:|---------:| -|id|[InputUser](../types/InputUser.md) | Yes| - - -### Return type: [UserFull](../types/UserFull.md) - -### Example: - - -``` -$MadelineProto = new \danog\MadelineProto\API(); -if (isset($token)) { // Login as a bot - $MadelineProto->bot_login($token); -} -if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } - $MadelineProto->complete_phone_login($code); -} - -$UserFull = $MadelineProto->users->getFullUser(['id' => InputUser, ]); -``` - -Or, if you're using the [PWRTelegram HTTP API](https://pwrtelegram.xyz): - -### As a bot: - -POST/GET to `https://api.pwrtelegram.xyz/botTOKEN/madeline` - -Parameters: - -* method - users.getFullUser -* params - `{"id": InputUser, }` - - - -### As a user: - -POST/GET to `https://api.pwrtelegram.xyz/userTOKEN/users.getFullUser` - -Parameters: - -id - Json encoded InputUser - - - -Or, if you're into Lua: - -``` -UserFull = users.getFullUser({id=InputUser, }) -``` - diff --git a/old_docs/API_docs_v65/types/PhoneCall.md b/old_docs/API_docs_v65/types/PhoneCall.md index cb9cc822..668c475e 100644 --- a/old_docs/API_docs_v65/types/PhoneCall.md +++ b/old_docs/API_docs_v65/types/PhoneCall.md @@ -146,7 +146,6 @@ The audio configuration is an array structured in the following way: * `playOnHold(array $files)` - Array of audio files encoded in PCM, with the audio input configuration to loop on hold (when the files given with play/then have finished playing). If not called, no data will be played, returns `$this` * `isPlaying()` - Returns true if MadelineProto is still playing the files given with play/then, false if the hold files (or nothing) is being played * `setMicMute(bool $mute)` - Stops/resumes playing files/hold files, returns `$this` -* `setBitrate(int $bitrate)` - Sets maximum outgoing bitrate, and increases the bitrate of the call to the maximum outgoing bitrate (high values increase the quality of the song), returns `$this` * `setOutputFile(string $outputfile)` - Writes incoming audio data to file encoded in PCM, with the audio output configuration, returns `$this` * `unsetOutputFile()` - Stops writing audio data to previously set file, returns `$this` diff --git a/old_docs/API_docs_v66/constructors/README.md b/old_docs/API_docs_v66/constructors/README.md index 46c9a4f1..d6733f99 100644 --- a/old_docs/API_docs_v66/constructors/README.md +++ b/old_docs/API_docs_v66/constructors/README.md @@ -4,9 +4,6 @@ description: List of constructors --- # Constructors [Back to API documentation index](..) - - - ***

[$accountDaysTTL](../constructors/accountDaysTTL.md) = \['days' => [int](../types/int.md), \]; diff --git a/old_docs/API_docs_v66/methods/auth_importBotAuthorization.md b/old_docs/API_docs_v66/methods/auth_importBotAuthorization.md index 0d8836b6..57521a13 100644 --- a/old_docs/API_docs_v66/methods/auth_importBotAuthorization.md +++ b/old_docs/API_docs_v66/methods/auth_importBotAuthorization.md @@ -6,71 +6,8 @@ description: auth.importBotAuthorization parameters, return type and example [Back to methods index](index.md) -*You cannot use this method directly, use the bot_login method instead (see https://daniil.it/MadelineProto for more info)* +**You cannot use this method directly, use the bot_login method instead (see https://daniil.it/MadelineProto for more info)** -### Parameters: - -| Name | Type | Required | -|----------|:-------------:|---------:| -|api\_id|[int](../types/int.md) | Yes| -|api\_hash|[string](../types/string.md) | Yes| -|bot\_auth\_token|[string](../types/string.md) | Yes| - - -### Return type: [auth\_Authorization](../types/auth_Authorization.md) - -### Example: - - -``` -$MadelineProto = new \danog\MadelineProto\API(); -if (isset($token)) { // Login as a bot - $MadelineProto->bot_login($token); -} -if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } - $MadelineProto->complete_phone_login($code); -} - -$auth_Authorization = $MadelineProto->auth->importBotAuthorization(['api_id' => int, 'api_hash' => 'string', 'bot_auth_token' => 'string', ]); -``` - -Or, if you're using the [PWRTelegram HTTP API](https://pwrtelegram.xyz): - -### As a bot: - -POST/GET to `https://api.pwrtelegram.xyz/botTOKEN/madeline` - -Parameters: - -* method - auth.importBotAuthorization -* params - `{"api_id": int, "api_hash": "string", "bot_auth_token": "string", }` - - - -### As a user: - -POST/GET to `https://api.pwrtelegram.xyz/userTOKEN/auth.importBotAuthorization` - -Parameters: - -api_id - Json encoded int -api_hash - Json encoded string -bot_auth_token - Json encoded string - - - -Or, if you're into Lua: - -``` -auth_Authorization = auth.importBotAuthorization({api_id=int, api_hash='string', bot_auth_token='string', }) -``` - diff --git a/old_docs/API_docs_v66/methods/auth_logOut.md b/old_docs/API_docs_v66/methods/auth_logOut.md index 12159bab..7d5bb3f7 100644 --- a/old_docs/API_docs_v66/methods/auth_logOut.md +++ b/old_docs/API_docs_v66/methods/auth_logOut.md @@ -6,61 +6,8 @@ description: auth.logOut parameters, return type and example [Back to methods index](index.md) -*You cannot use this method directly, use the logout method instead (see https://daniil.it/MadelineProto for more info)* +**You cannot use this method directly, use the logout method instead (see https://daniil.it/MadelineProto for more info)** - - -### Return type: [Bool](../types/Bool.md) - -### Example: - - -``` -$MadelineProto = new \danog\MadelineProto\API(); -if (isset($token)) { // Login as a bot - $MadelineProto->bot_login($token); -} -if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } - $MadelineProto->complete_phone_login($code); -} - -$Bool = $MadelineProto->auth->logOut(); -``` - -Or, if you're using the [PWRTelegram HTTP API](https://pwrtelegram.xyz): - -### As a bot: - -POST/GET to `https://api.pwrtelegram.xyz/botTOKEN/madeline` - -Parameters: - -* method - auth.logOut -* params - `{}` - - - -### As a user: - -POST/GET to `https://api.pwrtelegram.xyz/userTOKEN/auth.logOut` - -Parameters: - - - - -Or, if you're into Lua: - -``` -Bool = auth.logOut({}) -``` - diff --git a/old_docs/API_docs_v66/methods/auth_sendCode.md b/old_docs/API_docs_v66/methods/auth_sendCode.md index bda88218..22d1df94 100644 --- a/old_docs/API_docs_v66/methods/auth_sendCode.md +++ b/old_docs/API_docs_v66/methods/auth_sendCode.md @@ -6,75 +6,8 @@ description: auth.sendCode parameters, return type and example [Back to methods index](index.md) -*You cannot use this method directly, use the phone_login method instead (see https://daniil.it/MadelineProto for more info)* +**You cannot use this method directly, use the phone_login method instead (see https://daniil.it/MadelineProto for more info)** -### Parameters: - -| Name | Type | Required | -|----------|:-------------:|---------:| -|allow\_flashcall|[Bool](../types/Bool.md) | Optional| -|phone\_number|[string](../types/string.md) | Yes| -|current\_number|[Bool](../types/Bool.md) | Optional| -|api\_id|[int](../types/int.md) | Yes| -|api\_hash|[string](../types/string.md) | Yes| - - -### Return type: [auth\_SentCode](../types/auth_SentCode.md) - -### Example: - - -``` -$MadelineProto = new \danog\MadelineProto\API(); -if (isset($token)) { // Login as a bot - $MadelineProto->bot_login($token); -} -if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } - $MadelineProto->complete_phone_login($code); -} - -$auth_SentCode = $MadelineProto->auth->sendCode(['allow_flashcall' => Bool, 'phone_number' => 'string', 'current_number' => Bool, 'api_id' => int, 'api_hash' => 'string', ]); -``` - -Or, if you're using the [PWRTelegram HTTP API](https://pwrtelegram.xyz): - -### As a bot: - -POST/GET to `https://api.pwrtelegram.xyz/botTOKEN/madeline` - -Parameters: - -* method - auth.sendCode -* params - `{"allow_flashcall": Bool, "phone_number": "string", "current_number": Bool, "api_id": int, "api_hash": "string", }` - - - -### As a user: - -POST/GET to `https://api.pwrtelegram.xyz/userTOKEN/auth.sendCode` - -Parameters: - -allow_flashcall - Json encoded Bool -phone_number - Json encoded string -current_number - Json encoded Bool -api_id - Json encoded int -api_hash - Json encoded string - - - -Or, if you're into Lua: - -``` -auth_SentCode = auth.sendCode({allow_flashcall=Bool, phone_number='string', current_number=Bool, api_id=int, api_hash='string', }) -``` - diff --git a/old_docs/API_docs_v66/methods/auth_signIn.md b/old_docs/API_docs_v66/methods/auth_signIn.md index 75c50d70..ab40bb4d 100644 --- a/old_docs/API_docs_v66/methods/auth_signIn.md +++ b/old_docs/API_docs_v66/methods/auth_signIn.md @@ -6,71 +6,8 @@ description: auth.signIn parameters, return type and example [Back to methods index](index.md) -*You cannot use this method directly, use the complete_phone_login method instead (see https://daniil.it/MadelineProto for more info)* +**You cannot use this method directly, use the complete_phone_login method instead (see https://daniil.it/MadelineProto for more info)** -### Parameters: - -| Name | Type | Required | -|----------|:-------------:|---------:| -|phone\_number|[string](../types/string.md) | Yes| -|phone\_code\_hash|[string](../types/string.md) | Yes| -|phone\_code|[string](../types/string.md) | Yes| - - -### Return type: [auth\_Authorization](../types/auth_Authorization.md) - -### Example: - - -``` -$MadelineProto = new \danog\MadelineProto\API(); -if (isset($token)) { // Login as a bot - $MadelineProto->bot_login($token); -} -if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } - $MadelineProto->complete_phone_login($code); -} - -$auth_Authorization = $MadelineProto->auth->signIn(['phone_number' => 'string', 'phone_code_hash' => 'string', 'phone_code' => 'string', ]); -``` - -Or, if you're using the [PWRTelegram HTTP API](https://pwrtelegram.xyz): - -### As a bot: - -POST/GET to `https://api.pwrtelegram.xyz/botTOKEN/madeline` - -Parameters: - -* method - auth.signIn -* params - `{"phone_number": "string", "phone_code_hash": "string", "phone_code": "string", }` - - - -### As a user: - -POST/GET to `https://api.pwrtelegram.xyz/userTOKEN/auth.signIn` - -Parameters: - -phone_number - Json encoded string -phone_code_hash - Json encoded string -phone_code - Json encoded string - - - -Or, if you're into Lua: - -``` -auth_Authorization = auth.signIn({phone_number='string', phone_code_hash='string', phone_code='string', }) -``` - diff --git a/old_docs/API_docs_v66/methods/auth_signUp.md b/old_docs/API_docs_v66/methods/auth_signUp.md index f2a72b68..042d1191 100644 --- a/old_docs/API_docs_v66/methods/auth_signUp.md +++ b/old_docs/API_docs_v66/methods/auth_signUp.md @@ -6,75 +6,8 @@ description: auth.signUp parameters, return type and example [Back to methods index](index.md) -*You cannot use this method directly, use the complete_signup method instead (see https://daniil.it/MadelineProto for more info)* +**You cannot use this method directly, use the complete_signup method instead (see https://daniil.it/MadelineProto for more info)** -### Parameters: - -| Name | Type | Required | -|----------|:-------------:|---------:| -|phone\_number|[string](../types/string.md) | Yes| -|phone\_code\_hash|[string](../types/string.md) | Yes| -|phone\_code|[string](../types/string.md) | Yes| -|first\_name|[string](../types/string.md) | Yes| -|last\_name|[string](../types/string.md) | Yes| - - -### Return type: [auth\_Authorization](../types/auth_Authorization.md) - -### Example: - - -``` -$MadelineProto = new \danog\MadelineProto\API(); -if (isset($token)) { // Login as a bot - $MadelineProto->bot_login($token); -} -if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } - $MadelineProto->complete_phone_login($code); -} - -$auth_Authorization = $MadelineProto->auth->signUp(['phone_number' => 'string', 'phone_code_hash' => 'string', 'phone_code' => 'string', 'first_name' => 'string', 'last_name' => 'string', ]); -``` - -Or, if you're using the [PWRTelegram HTTP API](https://pwrtelegram.xyz): - -### As a bot: - -POST/GET to `https://api.pwrtelegram.xyz/botTOKEN/madeline` - -Parameters: - -* method - auth.signUp -* params - `{"phone_number": "string", "phone_code_hash": "string", "phone_code": "string", "first_name": "string", "last_name": "string", }` - - - -### As a user: - -POST/GET to `https://api.pwrtelegram.xyz/userTOKEN/auth.signUp` - -Parameters: - -phone_number - Json encoded string -phone_code_hash - Json encoded string -phone_code - Json encoded string -first_name - Json encoded string -last_name - Json encoded string - - - -Or, if you're into Lua: - -``` -auth_Authorization = auth.signUp({phone_number='string', phone_code_hash='string', phone_code='string', first_name='string', last_name='string', }) -``` - diff --git a/old_docs/API_docs_v66/methods/channels_getFullChannel.md b/old_docs/API_docs_v66/methods/channels_getFullChannel.md index 340efcfe..58dbe057 100644 --- a/old_docs/API_docs_v66/methods/channels_getFullChannel.md +++ b/old_docs/API_docs_v66/methods/channels_getFullChannel.md @@ -6,67 +6,8 @@ description: channels.getFullChannel parameters, return type and example [Back to methods index](index.md) -*You cannot use this method directly, use the get_pwr_chat, get_info, get_full_info methods instead (see https://daniil.it/MadelineProto for more info)* +**You cannot use this method directly, use the get_pwr_chat, get_info, get_full_info methods instead (see https://daniil.it/MadelineProto for more info)** -### Parameters: - -| Name | Type | Required | -|----------|:-------------:|---------:| -|channel|[InputChannel](../types/InputChannel.md) | Yes| - - -### Return type: [messages\_ChatFull](../types/messages_ChatFull.md) - -### Example: - - -``` -$MadelineProto = new \danog\MadelineProto\API(); -if (isset($token)) { // Login as a bot - $MadelineProto->bot_login($token); -} -if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } - $MadelineProto->complete_phone_login($code); -} - -$messages_ChatFull = $MadelineProto->channels->getFullChannel(['channel' => InputChannel, ]); -``` - -Or, if you're using the [PWRTelegram HTTP API](https://pwrtelegram.xyz): - -### As a bot: - -POST/GET to `https://api.pwrtelegram.xyz/botTOKEN/madeline` - -Parameters: - -* method - channels.getFullChannel -* params - `{"channel": InputChannel, }` - - - -### As a user: - -POST/GET to `https://api.pwrtelegram.xyz/userTOKEN/channels.getFullChannel` - -Parameters: - -channel - Json encoded InputChannel - - - -Or, if you're into Lua: - -``` -messages_ChatFull = channels.getFullChannel({channel=InputChannel, }) -``` - diff --git a/old_docs/API_docs_v66/methods/channels_getParticipants.md b/old_docs/API_docs_v66/methods/channels_getParticipants.md index 4c6e09cc..d84cf09c 100644 --- a/old_docs/API_docs_v66/methods/channels_getParticipants.md +++ b/old_docs/API_docs_v66/methods/channels_getParticipants.md @@ -6,73 +6,8 @@ description: channels.getParticipants parameters, return type and example [Back to methods index](index.md) -*You cannot use this method directly, use the get_pwr_chat, get_info, get_full_info methods instead (see https://daniil.it/MadelineProto for more info)* +**You cannot use this method directly, use the get_pwr_chat, get_info, get_full_info methods instead (see https://daniil.it/MadelineProto for more info)** -### Parameters: - -| Name | Type | Required | -|----------|:-------------:|---------:| -|channel|[InputChannel](../types/InputChannel.md) | Yes| -|filter|[ChannelParticipantsFilter](../types/ChannelParticipantsFilter.md) | Yes| -|offset|[int](../types/int.md) | Yes| -|limit|[int](../types/int.md) | Yes| - - -### Return type: [channels\_ChannelParticipants](../types/channels_ChannelParticipants.md) - -### Example: - - -``` -$MadelineProto = new \danog\MadelineProto\API(); -if (isset($token)) { // Login as a bot - $MadelineProto->bot_login($token); -} -if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } - $MadelineProto->complete_phone_login($code); -} - -$channels_ChannelParticipants = $MadelineProto->channels->getParticipants(['channel' => InputChannel, 'filter' => ChannelParticipantsFilter, 'offset' => int, 'limit' => int, ]); -``` - -Or, if you're using the [PWRTelegram HTTP API](https://pwrtelegram.xyz): - -### As a bot: - -POST/GET to `https://api.pwrtelegram.xyz/botTOKEN/madeline` - -Parameters: - -* method - channels.getParticipants -* params - `{"channel": InputChannel, "filter": ChannelParticipantsFilter, "offset": int, "limit": int, }` - - - -### As a user: - -POST/GET to `https://api.pwrtelegram.xyz/userTOKEN/channels.getParticipants` - -Parameters: - -channel - Json encoded InputChannel -filter - Json encoded ChannelParticipantsFilter -offset - Json encoded int -limit - Json encoded int - - - -Or, if you're into Lua: - -``` -channels_ChannelParticipants = channels.getParticipants({channel=InputChannel, filter=ChannelParticipantsFilter, offset=int, limit=int, }) -``` - diff --git a/old_docs/API_docs_v66/methods/contacts_resolveUsername.md b/old_docs/API_docs_v66/methods/contacts_resolveUsername.md index 90e72851..b665b382 100644 --- a/old_docs/API_docs_v66/methods/contacts_resolveUsername.md +++ b/old_docs/API_docs_v66/methods/contacts_resolveUsername.md @@ -6,67 +6,8 @@ description: contacts.resolveUsername parameters, return type and example [Back to methods index](index.md) -*You cannot use this method directly, use the resolve_username, get_pwr_chat, get_info, get_full_info methods instead (see https://daniil.it/MadelineProto for more info)* +**You cannot use this method directly, use the resolve_username, get_pwr_chat, get_info, get_full_info methods instead (see https://daniil.it/MadelineProto for more info)** -### Parameters: - -| Name | Type | Required | -|----------|:-------------:|---------:| -|username|[string](../types/string.md) | Yes| - - -### Return type: [contacts\_ResolvedPeer](../types/contacts_ResolvedPeer.md) - -### Example: - - -``` -$MadelineProto = new \danog\MadelineProto\API(); -if (isset($token)) { // Login as a bot - $MadelineProto->bot_login($token); -} -if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } - $MadelineProto->complete_phone_login($code); -} - -$contacts_ResolvedPeer = $MadelineProto->contacts->resolveUsername(['username' => 'string', ]); -``` - -Or, if you're using the [PWRTelegram HTTP API](https://pwrtelegram.xyz): - -### As a bot: - -POST/GET to `https://api.pwrtelegram.xyz/botTOKEN/madeline` - -Parameters: - -* method - contacts.resolveUsername -* params - `{"username": "string", }` - - - -### As a user: - -POST/GET to `https://api.pwrtelegram.xyz/userTOKEN/contacts.resolveUsername` - -Parameters: - -username - Json encoded string - - - -Or, if you're into Lua: - -``` -contacts_ResolvedPeer = contacts.resolveUsername({username='string', }) -``` - diff --git a/old_docs/API_docs_v66/methods/messages_acceptEncryption.md b/old_docs/API_docs_v66/methods/messages_acceptEncryption.md index 548087b6..243c4c00 100644 --- a/old_docs/API_docs_v66/methods/messages_acceptEncryption.md +++ b/old_docs/API_docs_v66/methods/messages_acceptEncryption.md @@ -6,71 +6,8 @@ description: messages.acceptEncryption parameters, return type and example [Back to methods index](index.md) -*You cannot use this method directly, see https://daniil.it/MadelineProto for more info on handling secret chats* +**You cannot use this method directly, see https://daniil.it/MadelineProto for more info on handling secret chats** -### Parameters: - -| Name | Type | Required | -|----------|:-------------:|---------:| -|peer|[InputEncryptedChat](../types/InputEncryptedChat.md) | Yes| -|g\_b|[bytes](../types/bytes.md) | Yes| -|key\_fingerprint|[long](../types/long.md) | Yes| - - -### Return type: [EncryptedChat](../types/EncryptedChat.md) - -### Example: - - -``` -$MadelineProto = new \danog\MadelineProto\API(); -if (isset($token)) { // Login as a bot - $MadelineProto->bot_login($token); -} -if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } - $MadelineProto->complete_phone_login($code); -} - -$EncryptedChat = $MadelineProto->messages->acceptEncryption(['peer' => InputEncryptedChat, 'g_b' => 'bytes', 'key_fingerprint' => long, ]); -``` - -Or, if you're using the [PWRTelegram HTTP API](https://pwrtelegram.xyz): - -### As a bot: - -POST/GET to `https://api.pwrtelegram.xyz/botTOKEN/madeline` - -Parameters: - -* method - messages.acceptEncryption -* params - `{"peer": InputEncryptedChat, "g_b": "bytes", "key_fingerprint": long, }` - - - -### As a user: - -POST/GET to `https://api.pwrtelegram.xyz/userTOKEN/messages.acceptEncryption` - -Parameters: - -peer - Json encoded InputEncryptedChat -g_b - Json encoded bytes -key_fingerprint - Json encoded long - - - -Or, if you're into Lua: - -``` -EncryptedChat = messages.acceptEncryption({peer=InputEncryptedChat, g_b='bytes', key_fingerprint=long, }) -``` - diff --git a/old_docs/API_docs_v66/methods/messages_discardEncryption.md b/old_docs/API_docs_v66/methods/messages_discardEncryption.md index 72648e9d..3a9dc58b 100644 --- a/old_docs/API_docs_v66/methods/messages_discardEncryption.md +++ b/old_docs/API_docs_v66/methods/messages_discardEncryption.md @@ -6,67 +6,8 @@ description: messages.discardEncryption parameters, return type and example [Back to methods index](index.md) -*You cannot use this method directly, see https://daniil.it/MadelineProto for more info on handling secret chats* +**You cannot use this method directly, see https://daniil.it/MadelineProto for more info on handling secret chats** -### Parameters: - -| Name | Type | Required | -|----------|:-------------:|---------:| -|chat\_id|[int](../types/int.md) | Yes| - - -### Return type: [Bool](../types/Bool.md) - -### Example: - - -``` -$MadelineProto = new \danog\MadelineProto\API(); -if (isset($token)) { // Login as a bot - $MadelineProto->bot_login($token); -} -if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } - $MadelineProto->complete_phone_login($code); -} - -$Bool = $MadelineProto->messages->discardEncryption(['chat_id' => int, ]); -``` - -Or, if you're using the [PWRTelegram HTTP API](https://pwrtelegram.xyz): - -### As a bot: - -POST/GET to `https://api.pwrtelegram.xyz/botTOKEN/madeline` - -Parameters: - -* method - messages.discardEncryption -* params - `{"chat_id": int, }` - - - -### As a user: - -POST/GET to `https://api.pwrtelegram.xyz/userTOKEN/messages.discardEncryption` - -Parameters: - -chat_id - Json encoded int - - - -Or, if you're into Lua: - -``` -Bool = messages.discardEncryption({chat_id=int, }) -``` - diff --git a/old_docs/API_docs_v66/methods/messages_getFullChat.md b/old_docs/API_docs_v66/methods/messages_getFullChat.md index 62102b64..ffa9c281 100644 --- a/old_docs/API_docs_v66/methods/messages_getFullChat.md +++ b/old_docs/API_docs_v66/methods/messages_getFullChat.md @@ -6,67 +6,8 @@ description: messages.getFullChat parameters, return type and example [Back to methods index](index.md) -*You cannot use this method directly, use the get_pwr_chat, get_info, get_full_info methods instead (see https://daniil.it/MadelineProto for more info)* +**You cannot use this method directly, use the get_pwr_chat, get_info, get_full_info methods instead (see https://daniil.it/MadelineProto for more info)** -### Parameters: - -| Name | Type | Required | -|----------|:-------------:|---------:| -|chat\_id|[InputPeer](../types/InputPeer.md) | Yes| - - -### Return type: [messages\_ChatFull](../types/messages_ChatFull.md) - -### Example: - - -``` -$MadelineProto = new \danog\MadelineProto\API(); -if (isset($token)) { // Login as a bot - $MadelineProto->bot_login($token); -} -if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } - $MadelineProto->complete_phone_login($code); -} - -$messages_ChatFull = $MadelineProto->messages->getFullChat(['chat_id' => InputPeer, ]); -``` - -Or, if you're using the [PWRTelegram HTTP API](https://pwrtelegram.xyz): - -### As a bot: - -POST/GET to `https://api.pwrtelegram.xyz/botTOKEN/madeline` - -Parameters: - -* method - messages.getFullChat -* params - `{"chat_id": InputPeer, }` - - - -### As a user: - -POST/GET to `https://api.pwrtelegram.xyz/userTOKEN/messages.getFullChat` - -Parameters: - -chat_id - Json encoded InputPeer - - - -Or, if you're into Lua: - -``` -messages_ChatFull = messages.getFullChat({chat_id=InputPeer, }) -``` - diff --git a/old_docs/API_docs_v66/methods/messages_requestEncryption.md b/old_docs/API_docs_v66/methods/messages_requestEncryption.md index 2fd1f825..c8476667 100644 --- a/old_docs/API_docs_v66/methods/messages_requestEncryption.md +++ b/old_docs/API_docs_v66/methods/messages_requestEncryption.md @@ -6,69 +6,8 @@ description: messages.requestEncryption parameters, return type and example [Back to methods index](index.md) -*You cannot use this method directly, see https://daniil.it/MadelineProto for more info on handling secret chats* +**You cannot use this method directly, see https://daniil.it/MadelineProto for more info on handling secret chats** -### Parameters: - -| Name | Type | Required | -|----------|:-------------:|---------:| -|user\_id|[InputUser](../types/InputUser.md) | Yes| -|g\_a|[bytes](../types/bytes.md) | Yes| - - -### Return type: [EncryptedChat](../types/EncryptedChat.md) - -### Example: - - -``` -$MadelineProto = new \danog\MadelineProto\API(); -if (isset($token)) { // Login as a bot - $MadelineProto->bot_login($token); -} -if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } - $MadelineProto->complete_phone_login($code); -} - -$EncryptedChat = $MadelineProto->messages->requestEncryption(['user_id' => InputUser, 'g_a' => 'bytes', ]); -``` - -Or, if you're using the [PWRTelegram HTTP API](https://pwrtelegram.xyz): - -### As a bot: - -POST/GET to `https://api.pwrtelegram.xyz/botTOKEN/madeline` - -Parameters: - -* method - messages.requestEncryption -* params - `{"user_id": InputUser, "g_a": "bytes", }` - - - -### As a user: - -POST/GET to `https://api.pwrtelegram.xyz/userTOKEN/messages.requestEncryption` - -Parameters: - -user_id - Json encoded InputUser -g_a - Json encoded bytes - - - -Or, if you're into Lua: - -``` -EncryptedChat = messages.requestEncryption({user_id=InputUser, g_a='bytes', }) -``` - diff --git a/old_docs/API_docs_v66/methods/phone_acceptCall.md b/old_docs/API_docs_v66/methods/phone_acceptCall.md index a3cf68a8..79266f27 100644 --- a/old_docs/API_docs_v66/methods/phone_acceptCall.md +++ b/old_docs/API_docs_v66/methods/phone_acceptCall.md @@ -6,71 +6,8 @@ description: phone.acceptCall parameters, return type and example [Back to methods index](index.md) -*You cannot use this method directly, see https://daniil.it/MadelineProto#calls for more info on handling calls* +**You cannot use this method directly, see https://daniil.it/MadelineProto#calls for more info on handling calls** -### Parameters: - -| Name | Type | Required | -|----------|:-------------:|---------:| -|peer|[InputPhoneCall](../types/InputPhoneCall.md) | Yes| -|g\_b|[bytes](../types/bytes.md) | Yes| -|protocol|[PhoneCallProtocol](../types/PhoneCallProtocol.md) | Yes| - - -### Return type: [phone\_PhoneCall](../types/phone_PhoneCall.md) - -### Example: - - -``` -$MadelineProto = new \danog\MadelineProto\API(); -if (isset($token)) { // Login as a bot - $MadelineProto->bot_login($token); -} -if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } - $MadelineProto->complete_phone_login($code); -} - -$phone_PhoneCall = $MadelineProto->phone->acceptCall(['peer' => InputPhoneCall, 'g_b' => 'bytes', 'protocol' => PhoneCallProtocol, ]); -``` - -Or, if you're using the [PWRTelegram HTTP API](https://pwrtelegram.xyz): - -### As a bot: - -POST/GET to `https://api.pwrtelegram.xyz/botTOKEN/madeline` - -Parameters: - -* method - phone.acceptCall -* params - `{"peer": InputPhoneCall, "g_b": "bytes", "protocol": PhoneCallProtocol, }` - - - -### As a user: - -POST/GET to `https://api.pwrtelegram.xyz/userTOKEN/phone.acceptCall` - -Parameters: - -peer - Json encoded InputPhoneCall -g_b - Json encoded bytes -protocol - Json encoded PhoneCallProtocol - - - -Or, if you're into Lua: - -``` -phone_PhoneCall = phone.acceptCall({peer=InputPhoneCall, g_b='bytes', protocol=PhoneCallProtocol, }) -``` - diff --git a/old_docs/API_docs_v66/methods/phone_confirmCall.md b/old_docs/API_docs_v66/methods/phone_confirmCall.md index ecec0ffc..69e90751 100644 --- a/old_docs/API_docs_v66/methods/phone_confirmCall.md +++ b/old_docs/API_docs_v66/methods/phone_confirmCall.md @@ -6,73 +6,8 @@ description: phone.confirmCall parameters, return type and example [Back to methods index](index.md) -*You cannot use this method directly, see https://daniil.it/MadelineProto#calls for more info on handling calls* +**You cannot use this method directly, see https://daniil.it/MadelineProto#calls for more info on handling calls** -### Parameters: - -| Name | Type | Required | -|----------|:-------------:|---------:| -|peer|[InputPhoneCall](../types/InputPhoneCall.md) | Yes| -|g\_a|[bytes](../types/bytes.md) | Yes| -|key\_fingerprint|[long](../types/long.md) | Yes| -|protocol|[PhoneCallProtocol](../types/PhoneCallProtocol.md) | Yes| - - -### Return type: [phone\_PhoneCall](../types/phone_PhoneCall.md) - -### Example: - - -``` -$MadelineProto = new \danog\MadelineProto\API(); -if (isset($token)) { // Login as a bot - $MadelineProto->bot_login($token); -} -if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } - $MadelineProto->complete_phone_login($code); -} - -$phone_PhoneCall = $MadelineProto->phone->confirmCall(['peer' => InputPhoneCall, 'g_a' => 'bytes', 'key_fingerprint' => long, 'protocol' => PhoneCallProtocol, ]); -``` - -Or, if you're using the [PWRTelegram HTTP API](https://pwrtelegram.xyz): - -### As a bot: - -POST/GET to `https://api.pwrtelegram.xyz/botTOKEN/madeline` - -Parameters: - -* method - phone.confirmCall -* params - `{"peer": InputPhoneCall, "g_a": "bytes", "key_fingerprint": long, "protocol": PhoneCallProtocol, }` - - - -### As a user: - -POST/GET to `https://api.pwrtelegram.xyz/userTOKEN/phone.confirmCall` - -Parameters: - -peer - Json encoded InputPhoneCall -g_a - Json encoded bytes -key_fingerprint - Json encoded long -protocol - Json encoded PhoneCallProtocol - - - -Or, if you're into Lua: - -``` -phone_PhoneCall = phone.confirmCall({peer=InputPhoneCall, g_a='bytes', key_fingerprint=long, protocol=PhoneCallProtocol, }) -``` - diff --git a/old_docs/API_docs_v66/methods/phone_discardCall.md b/old_docs/API_docs_v66/methods/phone_discardCall.md index bb6b4cd7..c300e61c 100644 --- a/old_docs/API_docs_v66/methods/phone_discardCall.md +++ b/old_docs/API_docs_v66/methods/phone_discardCall.md @@ -6,73 +6,8 @@ description: phone.discardCall parameters, return type and example [Back to methods index](index.md) -*You cannot use this method directly, see https://daniil.it/MadelineProto#calls for more info on handling calls* +**You cannot use this method directly, see https://daniil.it/MadelineProto#calls for more info on handling calls** -### Parameters: - -| Name | Type | Required | -|----------|:-------------:|---------:| -|peer|[InputPhoneCall](../types/InputPhoneCall.md) | Yes| -|duration|[int](../types/int.md) | Yes| -|reason|[PhoneCallDiscardReason](../types/PhoneCallDiscardReason.md) | Yes| -|connection\_id|[long](../types/long.md) | Yes| - - -### Return type: [Updates](../types/Updates.md) - -### Example: - - -``` -$MadelineProto = new \danog\MadelineProto\API(); -if (isset($token)) { // Login as a bot - $MadelineProto->bot_login($token); -} -if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } - $MadelineProto->complete_phone_login($code); -} - -$Updates = $MadelineProto->phone->discardCall(['peer' => InputPhoneCall, 'duration' => int, 'reason' => PhoneCallDiscardReason, 'connection_id' => long, ]); -``` - -Or, if you're using the [PWRTelegram HTTP API](https://pwrtelegram.xyz): - -### As a bot: - -POST/GET to `https://api.pwrtelegram.xyz/botTOKEN/madeline` - -Parameters: - -* method - phone.discardCall -* params - `{"peer": InputPhoneCall, "duration": int, "reason": PhoneCallDiscardReason, "connection_id": long, }` - - - -### As a user: - -POST/GET to `https://api.pwrtelegram.xyz/userTOKEN/phone.discardCall` - -Parameters: - -peer - Json encoded InputPhoneCall -duration - Json encoded int -reason - Json encoded PhoneCallDiscardReason -connection_id - Json encoded long - - - -Or, if you're into Lua: - -``` -Updates = phone.discardCall({peer=InputPhoneCall, duration=int, reason=PhoneCallDiscardReason, connection_id=long, }) -``` - diff --git a/old_docs/API_docs_v66/methods/phone_requestCall.md b/old_docs/API_docs_v66/methods/phone_requestCall.md index 7364c886..c8ae48a9 100644 --- a/old_docs/API_docs_v66/methods/phone_requestCall.md +++ b/old_docs/API_docs_v66/methods/phone_requestCall.md @@ -6,71 +6,8 @@ description: phone.requestCall parameters, return type and example [Back to methods index](index.md) -*You cannot use this method directly, see https://daniil.it/MadelineProto#calls for more info on handling calls* +**You cannot use this method directly, see https://daniil.it/MadelineProto#calls for more info on handling calls** -### Parameters: - -| Name | Type | Required | -|----------|:-------------:|---------:| -|user\_id|[InputUser](../types/InputUser.md) | Yes| -|g\_a\_hash|[bytes](../types/bytes.md) | Yes| -|protocol|[PhoneCallProtocol](../types/PhoneCallProtocol.md) | Yes| - - -### Return type: [phone\_PhoneCall](../types/phone_PhoneCall.md) - -### Example: - - -``` -$MadelineProto = new \danog\MadelineProto\API(); -if (isset($token)) { // Login as a bot - $MadelineProto->bot_login($token); -} -if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } - $MadelineProto->complete_phone_login($code); -} - -$phone_PhoneCall = $MadelineProto->phone->requestCall(['user_id' => InputUser, 'g_a_hash' => 'bytes', 'protocol' => PhoneCallProtocol, ]); -``` - -Or, if you're using the [PWRTelegram HTTP API](https://pwrtelegram.xyz): - -### As a bot: - -POST/GET to `https://api.pwrtelegram.xyz/botTOKEN/madeline` - -Parameters: - -* method - phone.requestCall -* params - `{"user_id": InputUser, "g_a_hash": "bytes", "protocol": PhoneCallProtocol, }` - - - -### As a user: - -POST/GET to `https://api.pwrtelegram.xyz/userTOKEN/phone.requestCall` - -Parameters: - -user_id - Json encoded InputUser -g_a_hash - Json encoded bytes -protocol - Json encoded PhoneCallProtocol - - - -Or, if you're into Lua: - -``` -phone_PhoneCall = phone.requestCall({user_id=InputUser, g_a_hash='bytes', protocol=PhoneCallProtocol, }) -``` - diff --git a/old_docs/API_docs_v66/methods/updates_getChannelDifference.md b/old_docs/API_docs_v66/methods/updates_getChannelDifference.md index d4eff325..2e69d1cd 100644 --- a/old_docs/API_docs_v66/methods/updates_getChannelDifference.md +++ b/old_docs/API_docs_v66/methods/updates_getChannelDifference.md @@ -6,75 +6,8 @@ description: updates.getChannelDifference parameters, return type and example [Back to methods index](index.md) -*You cannot use this method directly, see https://daniil.it/MadelineProto for more info on handling updates* +**You cannot use this method directly, see https://daniil.it/MadelineProto for more info on handling updates** -### Parameters: - -| Name | Type | Required | -|----------|:-------------:|---------:| -|force|[Bool](../types/Bool.md) | Optional| -|channel|[InputChannel](../types/InputChannel.md) | Yes| -|filter|[ChannelMessagesFilter](../types/ChannelMessagesFilter.md) | Yes| -|pts|[int](../types/int.md) | Yes| -|limit|[int](../types/int.md) | Yes| - - -### Return type: [updates\_ChannelDifference](../types/updates_ChannelDifference.md) - -### Example: - - -``` -$MadelineProto = new \danog\MadelineProto\API(); -if (isset($token)) { // Login as a bot - $MadelineProto->bot_login($token); -} -if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } - $MadelineProto->complete_phone_login($code); -} - -$updates_ChannelDifference = $MadelineProto->updates->getChannelDifference(['force' => Bool, 'channel' => InputChannel, 'filter' => ChannelMessagesFilter, 'pts' => int, 'limit' => int, ]); -``` - -Or, if you're using the [PWRTelegram HTTP API](https://pwrtelegram.xyz): - -### As a bot: - -POST/GET to `https://api.pwrtelegram.xyz/botTOKEN/madeline` - -Parameters: - -* method - updates.getChannelDifference -* params - `{"force": Bool, "channel": InputChannel, "filter": ChannelMessagesFilter, "pts": int, "limit": int, }` - - - -### As a user: - -POST/GET to `https://api.pwrtelegram.xyz/userTOKEN/updates.getChannelDifference` - -Parameters: - -force - Json encoded Bool -channel - Json encoded InputChannel -filter - Json encoded ChannelMessagesFilter -pts - Json encoded int -limit - Json encoded int - - - -Or, if you're into Lua: - -``` -updates_ChannelDifference = updates.getChannelDifference({force=Bool, channel=InputChannel, filter=ChannelMessagesFilter, pts=int, limit=int, }) -``` - diff --git a/old_docs/API_docs_v66/methods/updates_getDifference.md b/old_docs/API_docs_v66/methods/updates_getDifference.md index b50de4bb..9bcee79a 100644 --- a/old_docs/API_docs_v66/methods/updates_getDifference.md +++ b/old_docs/API_docs_v66/methods/updates_getDifference.md @@ -6,73 +6,8 @@ description: updates.getDifference parameters, return type and example [Back to methods index](index.md) -*You cannot use this method directly, see https://daniil.it/MadelineProto for more info on handling updates* +**You cannot use this method directly, see https://daniil.it/MadelineProto for more info on handling updates** -### Parameters: - -| Name | Type | Required | -|----------|:-------------:|---------:| -|pts|[int](../types/int.md) | Yes| -|pts\_total\_limit|[int](../types/int.md) | Optional| -|date|[int](../types/int.md) | Yes| -|qts|[int](../types/int.md) | Yes| - - -### Return type: [updates\_Difference](../types/updates_Difference.md) - -### Example: - - -``` -$MadelineProto = new \danog\MadelineProto\API(); -if (isset($token)) { // Login as a bot - $MadelineProto->bot_login($token); -} -if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } - $MadelineProto->complete_phone_login($code); -} - -$updates_Difference = $MadelineProto->updates->getDifference(['pts' => int, 'pts_total_limit' => int, 'date' => int, 'qts' => int, ]); -``` - -Or, if you're using the [PWRTelegram HTTP API](https://pwrtelegram.xyz): - -### As a bot: - -POST/GET to `https://api.pwrtelegram.xyz/botTOKEN/madeline` - -Parameters: - -* method - updates.getDifference -* params - `{"pts": int, "pts_total_limit": int, "date": int, "qts": int, }` - - - -### As a user: - -POST/GET to `https://api.pwrtelegram.xyz/userTOKEN/updates.getDifference` - -Parameters: - -pts - Json encoded int -pts_total_limit - Json encoded int -date - Json encoded int -qts - Json encoded int - - - -Or, if you're into Lua: - -``` -updates_Difference = updates.getDifference({pts=int, pts_total_limit=int, date=int, qts=int, }) -``` - diff --git a/old_docs/API_docs_v66/methods/updates_getState.md b/old_docs/API_docs_v66/methods/updates_getState.md index 51f6ae80..fd5955ba 100644 --- a/old_docs/API_docs_v66/methods/updates_getState.md +++ b/old_docs/API_docs_v66/methods/updates_getState.md @@ -6,61 +6,8 @@ description: updates.getState parameters, return type and example [Back to methods index](index.md) -*You cannot use this method directly, see https://daniil.it/MadelineProto for more info on handling updates* +**You cannot use this method directly, see https://daniil.it/MadelineProto for more info on handling updates** - - -### Return type: [updates\_State](../types/updates_State.md) - -### Example: - - -``` -$MadelineProto = new \danog\MadelineProto\API(); -if (isset($token)) { // Login as a bot - $MadelineProto->bot_login($token); -} -if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } - $MadelineProto->complete_phone_login($code); -} - -$updates_State = $MadelineProto->updates->getState(); -``` - -Or, if you're using the [PWRTelegram HTTP API](https://pwrtelegram.xyz): - -### As a bot: - -POST/GET to `https://api.pwrtelegram.xyz/botTOKEN/madeline` - -Parameters: - -* method - updates.getState -* params - `{}` - - - -### As a user: - -POST/GET to `https://api.pwrtelegram.xyz/userTOKEN/updates.getState` - -Parameters: - - - - -Or, if you're into Lua: - -``` -updates_State = updates.getState({}) -``` - diff --git a/old_docs/API_docs_v66/methods/upload_getCdnFile.md b/old_docs/API_docs_v66/methods/upload_getCdnFile.md index b0a0514b..3a0cd50e 100644 --- a/old_docs/API_docs_v66/methods/upload_getCdnFile.md +++ b/old_docs/API_docs_v66/methods/upload_getCdnFile.md @@ -6,71 +6,8 @@ description: upload.getCdnFile parameters, return type and example [Back to methods index](index.md) -*You cannot use this method directly, use the upload, download_to_stream, download_to_file, download_to_dir methods instead; see https://daniil.it/MadelineProto for more info* +**You cannot use this method directly, use the upload, download_to_stream, download_to_file, download_to_dir methods instead; see https://daniil.it/MadelineProto for more info** -### Parameters: - -| Name | Type | Required | -|----------|:-------------:|---------:| -|file\_token|[bytes](../types/bytes.md) | Yes| -|offset|[int](../types/int.md) | Yes| -|limit|[int](../types/int.md) | Yes| - - -### Return type: [upload\_CdnFile](../types/upload_CdnFile.md) - -### Example: - - -``` -$MadelineProto = new \danog\MadelineProto\API(); -if (isset($token)) { // Login as a bot - $MadelineProto->bot_login($token); -} -if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } - $MadelineProto->complete_phone_login($code); -} - -$upload_CdnFile = $MadelineProto->upload->getCdnFile(['file_token' => 'bytes', 'offset' => int, 'limit' => int, ]); -``` - -Or, if you're using the [PWRTelegram HTTP API](https://pwrtelegram.xyz): - -### As a bot: - -POST/GET to `https://api.pwrtelegram.xyz/botTOKEN/madeline` - -Parameters: - -* method - upload.getCdnFile -* params - `{"file_token": "bytes", "offset": int, "limit": int, }` - - - -### As a user: - -POST/GET to `https://api.pwrtelegram.xyz/userTOKEN/upload.getCdnFile` - -Parameters: - -file_token - Json encoded bytes -offset - Json encoded int -limit - Json encoded int - - - -Or, if you're into Lua: - -``` -upload_CdnFile = upload.getCdnFile({file_token='bytes', offset=int, limit=int, }) -``` - diff --git a/old_docs/API_docs_v66/methods/upload_getFile.md b/old_docs/API_docs_v66/methods/upload_getFile.md index a1003003..add7d54e 100644 --- a/old_docs/API_docs_v66/methods/upload_getFile.md +++ b/old_docs/API_docs_v66/methods/upload_getFile.md @@ -6,71 +6,8 @@ description: upload.getFile parameters, return type and example [Back to methods index](index.md) -*You cannot use this method directly, use the upload, download_to_stream, download_to_file, download_to_dir methods instead; see https://daniil.it/MadelineProto for more info* +**You cannot use this method directly, use the upload, download_to_stream, download_to_file, download_to_dir methods instead; see https://daniil.it/MadelineProto for more info** -### Parameters: - -| Name | Type | Required | -|----------|:-------------:|---------:| -|location|[InputFileLocation](../types/InputFileLocation.md) | Yes| -|offset|[int](../types/int.md) | Yes| -|limit|[int](../types/int.md) | Yes| - - -### Return type: [upload\_File](../types/upload_File.md) - -### Example: - - -``` -$MadelineProto = new \danog\MadelineProto\API(); -if (isset($token)) { // Login as a bot - $MadelineProto->bot_login($token); -} -if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } - $MadelineProto->complete_phone_login($code); -} - -$upload_File = $MadelineProto->upload->getFile(['location' => InputFileLocation, 'offset' => int, 'limit' => int, ]); -``` - -Or, if you're using the [PWRTelegram HTTP API](https://pwrtelegram.xyz): - -### As a bot: - -POST/GET to `https://api.pwrtelegram.xyz/botTOKEN/madeline` - -Parameters: - -* method - upload.getFile -* params - `{"location": InputFileLocation, "offset": int, "limit": int, }` - - - -### As a user: - -POST/GET to `https://api.pwrtelegram.xyz/userTOKEN/upload.getFile` - -Parameters: - -location - Json encoded InputFileLocation -offset - Json encoded int -limit - Json encoded int - - - -Or, if you're into Lua: - -``` -upload_File = upload.getFile({location=InputFileLocation, offset=int, limit=int, }) -``` - diff --git a/old_docs/API_docs_v66/methods/upload_reuploadCdnFile.md b/old_docs/API_docs_v66/methods/upload_reuploadCdnFile.md index acb960a4..4c00bbd0 100644 --- a/old_docs/API_docs_v66/methods/upload_reuploadCdnFile.md +++ b/old_docs/API_docs_v66/methods/upload_reuploadCdnFile.md @@ -6,69 +6,8 @@ description: upload.reuploadCdnFile parameters, return type and example [Back to methods index](index.md) -*You cannot use this method directly, use the upload, download_to_stream, download_to_file, download_to_dir methods instead; see https://daniil.it/MadelineProto for more info* +**You cannot use this method directly, use the upload, download_to_stream, download_to_file, download_to_dir methods instead; see https://daniil.it/MadelineProto for more info** -### Parameters: - -| Name | Type | Required | -|----------|:-------------:|---------:| -|file\_token|[bytes](../types/bytes.md) | Yes| -|request\_token|[bytes](../types/bytes.md) | Yes| - - -### Return type: [Bool](../types/Bool.md) - -### Example: - - -``` -$MadelineProto = new \danog\MadelineProto\API(); -if (isset($token)) { // Login as a bot - $MadelineProto->bot_login($token); -} -if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } - $MadelineProto->complete_phone_login($code); -} - -$Bool = $MadelineProto->upload->reuploadCdnFile(['file_token' => 'bytes', 'request_token' => 'bytes', ]); -``` - -Or, if you're using the [PWRTelegram HTTP API](https://pwrtelegram.xyz): - -### As a bot: - -POST/GET to `https://api.pwrtelegram.xyz/botTOKEN/madeline` - -Parameters: - -* method - upload.reuploadCdnFile -* params - `{"file_token": "bytes", "request_token": "bytes", }` - - - -### As a user: - -POST/GET to `https://api.pwrtelegram.xyz/userTOKEN/upload.reuploadCdnFile` - -Parameters: - -file_token - Json encoded bytes -request_token - Json encoded bytes - - - -Or, if you're into Lua: - -``` -Bool = upload.reuploadCdnFile({file_token='bytes', request_token='bytes', }) -``` - diff --git a/old_docs/API_docs_v66/methods/upload_saveBigFilePart.md b/old_docs/API_docs_v66/methods/upload_saveBigFilePart.md index e5c96d89..b1c3ea28 100644 --- a/old_docs/API_docs_v66/methods/upload_saveBigFilePart.md +++ b/old_docs/API_docs_v66/methods/upload_saveBigFilePart.md @@ -6,73 +6,8 @@ description: upload.saveBigFilePart parameters, return type and example [Back to methods index](index.md) -*You cannot use this method directly, use the upload, download_to_stream, download_to_file, download_to_dir methods instead; see https://daniil.it/MadelineProto for more info* +**You cannot use this method directly, use the upload, download_to_stream, download_to_file, download_to_dir methods instead; see https://daniil.it/MadelineProto for more info** -### Parameters: - -| Name | Type | Required | -|----------|:-------------:|---------:| -|file\_id|[long](../types/long.md) | Yes| -|file\_part|[int](../types/int.md) | Yes| -|file\_total\_parts|[int](../types/int.md) | Yes| -|bytes|[bytes](../types/bytes.md) | Yes| - - -### Return type: [Bool](../types/Bool.md) - -### Example: - - -``` -$MadelineProto = new \danog\MadelineProto\API(); -if (isset($token)) { // Login as a bot - $MadelineProto->bot_login($token); -} -if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } - $MadelineProto->complete_phone_login($code); -} - -$Bool = $MadelineProto->upload->saveBigFilePart(['file_id' => long, 'file_part' => int, 'file_total_parts' => int, 'bytes' => 'bytes', ]); -``` - -Or, if you're using the [PWRTelegram HTTP API](https://pwrtelegram.xyz): - -### As a bot: - -POST/GET to `https://api.pwrtelegram.xyz/botTOKEN/madeline` - -Parameters: - -* method - upload.saveBigFilePart -* params - `{"file_id": long, "file_part": int, "file_total_parts": int, "bytes": "bytes", }` - - - -### As a user: - -POST/GET to `https://api.pwrtelegram.xyz/userTOKEN/upload.saveBigFilePart` - -Parameters: - -file_id - Json encoded long -file_part - Json encoded int -file_total_parts - Json encoded int -bytes - Json encoded bytes - - - -Or, if you're into Lua: - -``` -Bool = upload.saveBigFilePart({file_id=long, file_part=int, file_total_parts=int, bytes='bytes', }) -``` - diff --git a/old_docs/API_docs_v66/methods/upload_saveFilePart.md b/old_docs/API_docs_v66/methods/upload_saveFilePart.md index 1c16e4b2..c482f321 100644 --- a/old_docs/API_docs_v66/methods/upload_saveFilePart.md +++ b/old_docs/API_docs_v66/methods/upload_saveFilePart.md @@ -6,71 +6,8 @@ description: upload.saveFilePart parameters, return type and example [Back to methods index](index.md) -*You cannot use this method directly, use the upload, download_to_stream, download_to_file, download_to_dir methods instead; see https://daniil.it/MadelineProto for more info* +**You cannot use this method directly, use the upload, download_to_stream, download_to_file, download_to_dir methods instead; see https://daniil.it/MadelineProto for more info** -### Parameters: - -| Name | Type | Required | -|----------|:-------------:|---------:| -|file\_id|[long](../types/long.md) | Yes| -|file\_part|[int](../types/int.md) | Yes| -|bytes|[bytes](../types/bytes.md) | Yes| - - -### Return type: [Bool](../types/Bool.md) - -### Example: - - -``` -$MadelineProto = new \danog\MadelineProto\API(); -if (isset($token)) { // Login as a bot - $MadelineProto->bot_login($token); -} -if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } - $MadelineProto->complete_phone_login($code); -} - -$Bool = $MadelineProto->upload->saveFilePart(['file_id' => long, 'file_part' => int, 'bytes' => 'bytes', ]); -``` - -Or, if you're using the [PWRTelegram HTTP API](https://pwrtelegram.xyz): - -### As a bot: - -POST/GET to `https://api.pwrtelegram.xyz/botTOKEN/madeline` - -Parameters: - -* method - upload.saveFilePart -* params - `{"file_id": long, "file_part": int, "bytes": "bytes", }` - - - -### As a user: - -POST/GET to `https://api.pwrtelegram.xyz/userTOKEN/upload.saveFilePart` - -Parameters: - -file_id - Json encoded long -file_part - Json encoded int -bytes - Json encoded bytes - - - -Or, if you're into Lua: - -``` -Bool = upload.saveFilePart({file_id=long, file_part=int, bytes='bytes', }) -``` - diff --git a/old_docs/API_docs_v66/methods/users_getFullUser.md b/old_docs/API_docs_v66/methods/users_getFullUser.md index 645ab12e..4ec831ec 100644 --- a/old_docs/API_docs_v66/methods/users_getFullUser.md +++ b/old_docs/API_docs_v66/methods/users_getFullUser.md @@ -6,67 +6,8 @@ description: users.getFullUser parameters, return type and example [Back to methods index](index.md) -*You cannot use this method directly, use the get_pwr_chat, get_info, get_full_info methods instead (see https://daniil.it/MadelineProto for more info)* +**You cannot use this method directly, use the get_pwr_chat, get_info, get_full_info methods instead (see https://daniil.it/MadelineProto for more info)** -### Parameters: - -| Name | Type | Required | -|----------|:-------------:|---------:| -|id|[InputUser](../types/InputUser.md) | Yes| - - -### Return type: [UserFull](../types/UserFull.md) - -### Example: - - -``` -$MadelineProto = new \danog\MadelineProto\API(); -if (isset($token)) { // Login as a bot - $MadelineProto->bot_login($token); -} -if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } - $MadelineProto->complete_phone_login($code); -} - -$UserFull = $MadelineProto->users->getFullUser(['id' => InputUser, ]); -``` - -Or, if you're using the [PWRTelegram HTTP API](https://pwrtelegram.xyz): - -### As a bot: - -POST/GET to `https://api.pwrtelegram.xyz/botTOKEN/madeline` - -Parameters: - -* method - users.getFullUser -* params - `{"id": InputUser, }` - - - -### As a user: - -POST/GET to `https://api.pwrtelegram.xyz/userTOKEN/users.getFullUser` - -Parameters: - -id - Json encoded InputUser - - - -Or, if you're into Lua: - -``` -UserFull = users.getFullUser({id=InputUser, }) -``` - diff --git a/old_docs/API_docs_v66/types/PhoneCall.md b/old_docs/API_docs_v66/types/PhoneCall.md index cb9cc822..668c475e 100644 --- a/old_docs/API_docs_v66/types/PhoneCall.md +++ b/old_docs/API_docs_v66/types/PhoneCall.md @@ -146,7 +146,6 @@ The audio configuration is an array structured in the following way: * `playOnHold(array $files)` - Array of audio files encoded in PCM, with the audio input configuration to loop on hold (when the files given with play/then have finished playing). If not called, no data will be played, returns `$this` * `isPlaying()` - Returns true if MadelineProto is still playing the files given with play/then, false if the hold files (or nothing) is being played * `setMicMute(bool $mute)` - Stops/resumes playing files/hold files, returns `$this` -* `setBitrate(int $bitrate)` - Sets maximum outgoing bitrate, and increases the bitrate of the call to the maximum outgoing bitrate (high values increase the quality of the song), returns `$this` * `setOutputFile(string $outputfile)` - Writes incoming audio data to file encoded in PCM, with the audio output configuration, returns `$this` * `unsetOutputFile()` - Stops writing audio data to previously set file, returns `$this` diff --git a/old_docs/API_docs_v68/constructors/README.md b/old_docs/API_docs_v68/constructors/README.md index 2605baea..bd90004b 100644 --- a/old_docs/API_docs_v68/constructors/README.md +++ b/old_docs/API_docs_v68/constructors/README.md @@ -4,9 +4,6 @@ description: List of constructors --- # Constructors [Back to API documentation index](..) - - - ***

[$accountDaysTTL](../constructors/accountDaysTTL.md) = \['days' => [int](../types/int.md), \]; @@ -424,7 +421,7 @@ description: List of constructors ***

[$help\_appUpdate](../constructors/help_appUpdate.md) = \['id' => [int](../types/int.md), 'critical' => [Bool](../types/Bool.md), 'url' => [string](../types/string.md), 'text' => [string](../types/string.md), \]; -[$help\_configSimple](../constructors/help_configSimple.md) = \['date' => [int](../types/int.md), 'expires' => [int](../types/int.md), 'dc_id' => [int](../types/int.md), 'ip_port_list' => \[[ipPort](../types/ipPort.md)\], \]; +[$help\_configSimple](../constructors/help_configSimple.md) = \['date' => [int](../types/int.md), 'expires' => [int](../types/int.md), 'dc_id' => [int](../types/int.md), 'ip_port_list' => \[[ipPort](../constructors/ipPort.md)\], \]; [$help\_inviteText](../constructors/help_inviteText.md) = \['message' => [string](../types/string.md), \]; diff --git a/old_docs/API_docs_v68/methods/auth_importBotAuthorization.md b/old_docs/API_docs_v68/methods/auth_importBotAuthorization.md index 0d8836b6..57521a13 100644 --- a/old_docs/API_docs_v68/methods/auth_importBotAuthorization.md +++ b/old_docs/API_docs_v68/methods/auth_importBotAuthorization.md @@ -6,71 +6,8 @@ description: auth.importBotAuthorization parameters, return type and example [Back to methods index](index.md) -*You cannot use this method directly, use the bot_login method instead (see https://daniil.it/MadelineProto for more info)* +**You cannot use this method directly, use the bot_login method instead (see https://daniil.it/MadelineProto for more info)** -### Parameters: - -| Name | Type | Required | -|----------|:-------------:|---------:| -|api\_id|[int](../types/int.md) | Yes| -|api\_hash|[string](../types/string.md) | Yes| -|bot\_auth\_token|[string](../types/string.md) | Yes| - - -### Return type: [auth\_Authorization](../types/auth_Authorization.md) - -### Example: - - -``` -$MadelineProto = new \danog\MadelineProto\API(); -if (isset($token)) { // Login as a bot - $MadelineProto->bot_login($token); -} -if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } - $MadelineProto->complete_phone_login($code); -} - -$auth_Authorization = $MadelineProto->auth->importBotAuthorization(['api_id' => int, 'api_hash' => 'string', 'bot_auth_token' => 'string', ]); -``` - -Or, if you're using the [PWRTelegram HTTP API](https://pwrtelegram.xyz): - -### As a bot: - -POST/GET to `https://api.pwrtelegram.xyz/botTOKEN/madeline` - -Parameters: - -* method - auth.importBotAuthorization -* params - `{"api_id": int, "api_hash": "string", "bot_auth_token": "string", }` - - - -### As a user: - -POST/GET to `https://api.pwrtelegram.xyz/userTOKEN/auth.importBotAuthorization` - -Parameters: - -api_id - Json encoded int -api_hash - Json encoded string -bot_auth_token - Json encoded string - - - -Or, if you're into Lua: - -``` -auth_Authorization = auth.importBotAuthorization({api_id=int, api_hash='string', bot_auth_token='string', }) -``` - diff --git a/old_docs/API_docs_v68/methods/auth_logOut.md b/old_docs/API_docs_v68/methods/auth_logOut.md index 12159bab..7d5bb3f7 100644 --- a/old_docs/API_docs_v68/methods/auth_logOut.md +++ b/old_docs/API_docs_v68/methods/auth_logOut.md @@ -6,61 +6,8 @@ description: auth.logOut parameters, return type and example [Back to methods index](index.md) -*You cannot use this method directly, use the logout method instead (see https://daniil.it/MadelineProto for more info)* +**You cannot use this method directly, use the logout method instead (see https://daniil.it/MadelineProto for more info)** - - -### Return type: [Bool](../types/Bool.md) - -### Example: - - -``` -$MadelineProto = new \danog\MadelineProto\API(); -if (isset($token)) { // Login as a bot - $MadelineProto->bot_login($token); -} -if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } - $MadelineProto->complete_phone_login($code); -} - -$Bool = $MadelineProto->auth->logOut(); -``` - -Or, if you're using the [PWRTelegram HTTP API](https://pwrtelegram.xyz): - -### As a bot: - -POST/GET to `https://api.pwrtelegram.xyz/botTOKEN/madeline` - -Parameters: - -* method - auth.logOut -* params - `{}` - - - -### As a user: - -POST/GET to `https://api.pwrtelegram.xyz/userTOKEN/auth.logOut` - -Parameters: - - - - -Or, if you're into Lua: - -``` -Bool = auth.logOut({}) -``` - diff --git a/old_docs/API_docs_v68/methods/auth_sendCode.md b/old_docs/API_docs_v68/methods/auth_sendCode.md index bda88218..22d1df94 100644 --- a/old_docs/API_docs_v68/methods/auth_sendCode.md +++ b/old_docs/API_docs_v68/methods/auth_sendCode.md @@ -6,75 +6,8 @@ description: auth.sendCode parameters, return type and example [Back to methods index](index.md) -*You cannot use this method directly, use the phone_login method instead (see https://daniil.it/MadelineProto for more info)* +**You cannot use this method directly, use the phone_login method instead (see https://daniil.it/MadelineProto for more info)** -### Parameters: - -| Name | Type | Required | -|----------|:-------------:|---------:| -|allow\_flashcall|[Bool](../types/Bool.md) | Optional| -|phone\_number|[string](../types/string.md) | Yes| -|current\_number|[Bool](../types/Bool.md) | Optional| -|api\_id|[int](../types/int.md) | Yes| -|api\_hash|[string](../types/string.md) | Yes| - - -### Return type: [auth\_SentCode](../types/auth_SentCode.md) - -### Example: - - -``` -$MadelineProto = new \danog\MadelineProto\API(); -if (isset($token)) { // Login as a bot - $MadelineProto->bot_login($token); -} -if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } - $MadelineProto->complete_phone_login($code); -} - -$auth_SentCode = $MadelineProto->auth->sendCode(['allow_flashcall' => Bool, 'phone_number' => 'string', 'current_number' => Bool, 'api_id' => int, 'api_hash' => 'string', ]); -``` - -Or, if you're using the [PWRTelegram HTTP API](https://pwrtelegram.xyz): - -### As a bot: - -POST/GET to `https://api.pwrtelegram.xyz/botTOKEN/madeline` - -Parameters: - -* method - auth.sendCode -* params - `{"allow_flashcall": Bool, "phone_number": "string", "current_number": Bool, "api_id": int, "api_hash": "string", }` - - - -### As a user: - -POST/GET to `https://api.pwrtelegram.xyz/userTOKEN/auth.sendCode` - -Parameters: - -allow_flashcall - Json encoded Bool -phone_number - Json encoded string -current_number - Json encoded Bool -api_id - Json encoded int -api_hash - Json encoded string - - - -Or, if you're into Lua: - -``` -auth_SentCode = auth.sendCode({allow_flashcall=Bool, phone_number='string', current_number=Bool, api_id=int, api_hash='string', }) -``` - diff --git a/old_docs/API_docs_v68/methods/auth_signIn.md b/old_docs/API_docs_v68/methods/auth_signIn.md index 75c50d70..ab40bb4d 100644 --- a/old_docs/API_docs_v68/methods/auth_signIn.md +++ b/old_docs/API_docs_v68/methods/auth_signIn.md @@ -6,71 +6,8 @@ description: auth.signIn parameters, return type and example [Back to methods index](index.md) -*You cannot use this method directly, use the complete_phone_login method instead (see https://daniil.it/MadelineProto for more info)* +**You cannot use this method directly, use the complete_phone_login method instead (see https://daniil.it/MadelineProto for more info)** -### Parameters: - -| Name | Type | Required | -|----------|:-------------:|---------:| -|phone\_number|[string](../types/string.md) | Yes| -|phone\_code\_hash|[string](../types/string.md) | Yes| -|phone\_code|[string](../types/string.md) | Yes| - - -### Return type: [auth\_Authorization](../types/auth_Authorization.md) - -### Example: - - -``` -$MadelineProto = new \danog\MadelineProto\API(); -if (isset($token)) { // Login as a bot - $MadelineProto->bot_login($token); -} -if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } - $MadelineProto->complete_phone_login($code); -} - -$auth_Authorization = $MadelineProto->auth->signIn(['phone_number' => 'string', 'phone_code_hash' => 'string', 'phone_code' => 'string', ]); -``` - -Or, if you're using the [PWRTelegram HTTP API](https://pwrtelegram.xyz): - -### As a bot: - -POST/GET to `https://api.pwrtelegram.xyz/botTOKEN/madeline` - -Parameters: - -* method - auth.signIn -* params - `{"phone_number": "string", "phone_code_hash": "string", "phone_code": "string", }` - - - -### As a user: - -POST/GET to `https://api.pwrtelegram.xyz/userTOKEN/auth.signIn` - -Parameters: - -phone_number - Json encoded string -phone_code_hash - Json encoded string -phone_code - Json encoded string - - - -Or, if you're into Lua: - -``` -auth_Authorization = auth.signIn({phone_number='string', phone_code_hash='string', phone_code='string', }) -``` - diff --git a/old_docs/API_docs_v68/methods/auth_signUp.md b/old_docs/API_docs_v68/methods/auth_signUp.md index f2a72b68..042d1191 100644 --- a/old_docs/API_docs_v68/methods/auth_signUp.md +++ b/old_docs/API_docs_v68/methods/auth_signUp.md @@ -6,75 +6,8 @@ description: auth.signUp parameters, return type and example [Back to methods index](index.md) -*You cannot use this method directly, use the complete_signup method instead (see https://daniil.it/MadelineProto for more info)* +**You cannot use this method directly, use the complete_signup method instead (see https://daniil.it/MadelineProto for more info)** -### Parameters: - -| Name | Type | Required | -|----------|:-------------:|---------:| -|phone\_number|[string](../types/string.md) | Yes| -|phone\_code\_hash|[string](../types/string.md) | Yes| -|phone\_code|[string](../types/string.md) | Yes| -|first\_name|[string](../types/string.md) | Yes| -|last\_name|[string](../types/string.md) | Yes| - - -### Return type: [auth\_Authorization](../types/auth_Authorization.md) - -### Example: - - -``` -$MadelineProto = new \danog\MadelineProto\API(); -if (isset($token)) { // Login as a bot - $MadelineProto->bot_login($token); -} -if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } - $MadelineProto->complete_phone_login($code); -} - -$auth_Authorization = $MadelineProto->auth->signUp(['phone_number' => 'string', 'phone_code_hash' => 'string', 'phone_code' => 'string', 'first_name' => 'string', 'last_name' => 'string', ]); -``` - -Or, if you're using the [PWRTelegram HTTP API](https://pwrtelegram.xyz): - -### As a bot: - -POST/GET to `https://api.pwrtelegram.xyz/botTOKEN/madeline` - -Parameters: - -* method - auth.signUp -* params - `{"phone_number": "string", "phone_code_hash": "string", "phone_code": "string", "first_name": "string", "last_name": "string", }` - - - -### As a user: - -POST/GET to `https://api.pwrtelegram.xyz/userTOKEN/auth.signUp` - -Parameters: - -phone_number - Json encoded string -phone_code_hash - Json encoded string -phone_code - Json encoded string -first_name - Json encoded string -last_name - Json encoded string - - - -Or, if you're into Lua: - -``` -auth_Authorization = auth.signUp({phone_number='string', phone_code_hash='string', phone_code='string', first_name='string', last_name='string', }) -``` - diff --git a/old_docs/API_docs_v68/methods/channels_getFullChannel.md b/old_docs/API_docs_v68/methods/channels_getFullChannel.md index 340efcfe..58dbe057 100644 --- a/old_docs/API_docs_v68/methods/channels_getFullChannel.md +++ b/old_docs/API_docs_v68/methods/channels_getFullChannel.md @@ -6,67 +6,8 @@ description: channels.getFullChannel parameters, return type and example [Back to methods index](index.md) -*You cannot use this method directly, use the get_pwr_chat, get_info, get_full_info methods instead (see https://daniil.it/MadelineProto for more info)* +**You cannot use this method directly, use the get_pwr_chat, get_info, get_full_info methods instead (see https://daniil.it/MadelineProto for more info)** -### Parameters: - -| Name | Type | Required | -|----------|:-------------:|---------:| -|channel|[InputChannel](../types/InputChannel.md) | Yes| - - -### Return type: [messages\_ChatFull](../types/messages_ChatFull.md) - -### Example: - - -``` -$MadelineProto = new \danog\MadelineProto\API(); -if (isset($token)) { // Login as a bot - $MadelineProto->bot_login($token); -} -if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } - $MadelineProto->complete_phone_login($code); -} - -$messages_ChatFull = $MadelineProto->channels->getFullChannel(['channel' => InputChannel, ]); -``` - -Or, if you're using the [PWRTelegram HTTP API](https://pwrtelegram.xyz): - -### As a bot: - -POST/GET to `https://api.pwrtelegram.xyz/botTOKEN/madeline` - -Parameters: - -* method - channels.getFullChannel -* params - `{"channel": InputChannel, }` - - - -### As a user: - -POST/GET to `https://api.pwrtelegram.xyz/userTOKEN/channels.getFullChannel` - -Parameters: - -channel - Json encoded InputChannel - - - -Or, if you're into Lua: - -``` -messages_ChatFull = channels.getFullChannel({channel=InputChannel, }) -``` - diff --git a/old_docs/API_docs_v68/methods/channels_getParticipants.md b/old_docs/API_docs_v68/methods/channels_getParticipants.md index 4c6e09cc..d84cf09c 100644 --- a/old_docs/API_docs_v68/methods/channels_getParticipants.md +++ b/old_docs/API_docs_v68/methods/channels_getParticipants.md @@ -6,73 +6,8 @@ description: channels.getParticipants parameters, return type and example [Back to methods index](index.md) -*You cannot use this method directly, use the get_pwr_chat, get_info, get_full_info methods instead (see https://daniil.it/MadelineProto for more info)* +**You cannot use this method directly, use the get_pwr_chat, get_info, get_full_info methods instead (see https://daniil.it/MadelineProto for more info)** -### Parameters: - -| Name | Type | Required | -|----------|:-------------:|---------:| -|channel|[InputChannel](../types/InputChannel.md) | Yes| -|filter|[ChannelParticipantsFilter](../types/ChannelParticipantsFilter.md) | Yes| -|offset|[int](../types/int.md) | Yes| -|limit|[int](../types/int.md) | Yes| - - -### Return type: [channels\_ChannelParticipants](../types/channels_ChannelParticipants.md) - -### Example: - - -``` -$MadelineProto = new \danog\MadelineProto\API(); -if (isset($token)) { // Login as a bot - $MadelineProto->bot_login($token); -} -if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } - $MadelineProto->complete_phone_login($code); -} - -$channels_ChannelParticipants = $MadelineProto->channels->getParticipants(['channel' => InputChannel, 'filter' => ChannelParticipantsFilter, 'offset' => int, 'limit' => int, ]); -``` - -Or, if you're using the [PWRTelegram HTTP API](https://pwrtelegram.xyz): - -### As a bot: - -POST/GET to `https://api.pwrtelegram.xyz/botTOKEN/madeline` - -Parameters: - -* method - channels.getParticipants -* params - `{"channel": InputChannel, "filter": ChannelParticipantsFilter, "offset": int, "limit": int, }` - - - -### As a user: - -POST/GET to `https://api.pwrtelegram.xyz/userTOKEN/channels.getParticipants` - -Parameters: - -channel - Json encoded InputChannel -filter - Json encoded ChannelParticipantsFilter -offset - Json encoded int -limit - Json encoded int - - - -Or, if you're into Lua: - -``` -channels_ChannelParticipants = channels.getParticipants({channel=InputChannel, filter=ChannelParticipantsFilter, offset=int, limit=int, }) -``` - diff --git a/old_docs/API_docs_v68/methods/contacts_resolveUsername.md b/old_docs/API_docs_v68/methods/contacts_resolveUsername.md index 90e72851..b665b382 100644 --- a/old_docs/API_docs_v68/methods/contacts_resolveUsername.md +++ b/old_docs/API_docs_v68/methods/contacts_resolveUsername.md @@ -6,67 +6,8 @@ description: contacts.resolveUsername parameters, return type and example [Back to methods index](index.md) -*You cannot use this method directly, use the resolve_username, get_pwr_chat, get_info, get_full_info methods instead (see https://daniil.it/MadelineProto for more info)* +**You cannot use this method directly, use the resolve_username, get_pwr_chat, get_info, get_full_info methods instead (see https://daniil.it/MadelineProto for more info)** -### Parameters: - -| Name | Type | Required | -|----------|:-------------:|---------:| -|username|[string](../types/string.md) | Yes| - - -### Return type: [contacts\_ResolvedPeer](../types/contacts_ResolvedPeer.md) - -### Example: - - -``` -$MadelineProto = new \danog\MadelineProto\API(); -if (isset($token)) { // Login as a bot - $MadelineProto->bot_login($token); -} -if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } - $MadelineProto->complete_phone_login($code); -} - -$contacts_ResolvedPeer = $MadelineProto->contacts->resolveUsername(['username' => 'string', ]); -``` - -Or, if you're using the [PWRTelegram HTTP API](https://pwrtelegram.xyz): - -### As a bot: - -POST/GET to `https://api.pwrtelegram.xyz/botTOKEN/madeline` - -Parameters: - -* method - contacts.resolveUsername -* params - `{"username": "string", }` - - - -### As a user: - -POST/GET to `https://api.pwrtelegram.xyz/userTOKEN/contacts.resolveUsername` - -Parameters: - -username - Json encoded string - - - -Or, if you're into Lua: - -``` -contacts_ResolvedPeer = contacts.resolveUsername({username='string', }) -``` - diff --git a/old_docs/API_docs_v68/methods/messages_acceptEncryption.md b/old_docs/API_docs_v68/methods/messages_acceptEncryption.md index 548087b6..243c4c00 100644 --- a/old_docs/API_docs_v68/methods/messages_acceptEncryption.md +++ b/old_docs/API_docs_v68/methods/messages_acceptEncryption.md @@ -6,71 +6,8 @@ description: messages.acceptEncryption parameters, return type and example [Back to methods index](index.md) -*You cannot use this method directly, see https://daniil.it/MadelineProto for more info on handling secret chats* +**You cannot use this method directly, see https://daniil.it/MadelineProto for more info on handling secret chats** -### Parameters: - -| Name | Type | Required | -|----------|:-------------:|---------:| -|peer|[InputEncryptedChat](../types/InputEncryptedChat.md) | Yes| -|g\_b|[bytes](../types/bytes.md) | Yes| -|key\_fingerprint|[long](../types/long.md) | Yes| - - -### Return type: [EncryptedChat](../types/EncryptedChat.md) - -### Example: - - -``` -$MadelineProto = new \danog\MadelineProto\API(); -if (isset($token)) { // Login as a bot - $MadelineProto->bot_login($token); -} -if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } - $MadelineProto->complete_phone_login($code); -} - -$EncryptedChat = $MadelineProto->messages->acceptEncryption(['peer' => InputEncryptedChat, 'g_b' => 'bytes', 'key_fingerprint' => long, ]); -``` - -Or, if you're using the [PWRTelegram HTTP API](https://pwrtelegram.xyz): - -### As a bot: - -POST/GET to `https://api.pwrtelegram.xyz/botTOKEN/madeline` - -Parameters: - -* method - messages.acceptEncryption -* params - `{"peer": InputEncryptedChat, "g_b": "bytes", "key_fingerprint": long, }` - - - -### As a user: - -POST/GET to `https://api.pwrtelegram.xyz/userTOKEN/messages.acceptEncryption` - -Parameters: - -peer - Json encoded InputEncryptedChat -g_b - Json encoded bytes -key_fingerprint - Json encoded long - - - -Or, if you're into Lua: - -``` -EncryptedChat = messages.acceptEncryption({peer=InputEncryptedChat, g_b='bytes', key_fingerprint=long, }) -``` - diff --git a/old_docs/API_docs_v68/methods/messages_discardEncryption.md b/old_docs/API_docs_v68/methods/messages_discardEncryption.md index 72648e9d..3a9dc58b 100644 --- a/old_docs/API_docs_v68/methods/messages_discardEncryption.md +++ b/old_docs/API_docs_v68/methods/messages_discardEncryption.md @@ -6,67 +6,8 @@ description: messages.discardEncryption parameters, return type and example [Back to methods index](index.md) -*You cannot use this method directly, see https://daniil.it/MadelineProto for more info on handling secret chats* +**You cannot use this method directly, see https://daniil.it/MadelineProto for more info on handling secret chats** -### Parameters: - -| Name | Type | Required | -|----------|:-------------:|---------:| -|chat\_id|[int](../types/int.md) | Yes| - - -### Return type: [Bool](../types/Bool.md) - -### Example: - - -``` -$MadelineProto = new \danog\MadelineProto\API(); -if (isset($token)) { // Login as a bot - $MadelineProto->bot_login($token); -} -if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } - $MadelineProto->complete_phone_login($code); -} - -$Bool = $MadelineProto->messages->discardEncryption(['chat_id' => int, ]); -``` - -Or, if you're using the [PWRTelegram HTTP API](https://pwrtelegram.xyz): - -### As a bot: - -POST/GET to `https://api.pwrtelegram.xyz/botTOKEN/madeline` - -Parameters: - -* method - messages.discardEncryption -* params - `{"chat_id": int, }` - - - -### As a user: - -POST/GET to `https://api.pwrtelegram.xyz/userTOKEN/messages.discardEncryption` - -Parameters: - -chat_id - Json encoded int - - - -Or, if you're into Lua: - -``` -Bool = messages.discardEncryption({chat_id=int, }) -``` - diff --git a/old_docs/API_docs_v68/methods/messages_getFullChat.md b/old_docs/API_docs_v68/methods/messages_getFullChat.md index 62102b64..ffa9c281 100644 --- a/old_docs/API_docs_v68/methods/messages_getFullChat.md +++ b/old_docs/API_docs_v68/methods/messages_getFullChat.md @@ -6,67 +6,8 @@ description: messages.getFullChat parameters, return type and example [Back to methods index](index.md) -*You cannot use this method directly, use the get_pwr_chat, get_info, get_full_info methods instead (see https://daniil.it/MadelineProto for more info)* +**You cannot use this method directly, use the get_pwr_chat, get_info, get_full_info methods instead (see https://daniil.it/MadelineProto for more info)** -### Parameters: - -| Name | Type | Required | -|----------|:-------------:|---------:| -|chat\_id|[InputPeer](../types/InputPeer.md) | Yes| - - -### Return type: [messages\_ChatFull](../types/messages_ChatFull.md) - -### Example: - - -``` -$MadelineProto = new \danog\MadelineProto\API(); -if (isset($token)) { // Login as a bot - $MadelineProto->bot_login($token); -} -if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } - $MadelineProto->complete_phone_login($code); -} - -$messages_ChatFull = $MadelineProto->messages->getFullChat(['chat_id' => InputPeer, ]); -``` - -Or, if you're using the [PWRTelegram HTTP API](https://pwrtelegram.xyz): - -### As a bot: - -POST/GET to `https://api.pwrtelegram.xyz/botTOKEN/madeline` - -Parameters: - -* method - messages.getFullChat -* params - `{"chat_id": InputPeer, }` - - - -### As a user: - -POST/GET to `https://api.pwrtelegram.xyz/userTOKEN/messages.getFullChat` - -Parameters: - -chat_id - Json encoded InputPeer - - - -Or, if you're into Lua: - -``` -messages_ChatFull = messages.getFullChat({chat_id=InputPeer, }) -``` - diff --git a/old_docs/API_docs_v68/methods/messages_requestEncryption.md b/old_docs/API_docs_v68/methods/messages_requestEncryption.md index 2fd1f825..c8476667 100644 --- a/old_docs/API_docs_v68/methods/messages_requestEncryption.md +++ b/old_docs/API_docs_v68/methods/messages_requestEncryption.md @@ -6,69 +6,8 @@ description: messages.requestEncryption parameters, return type and example [Back to methods index](index.md) -*You cannot use this method directly, see https://daniil.it/MadelineProto for more info on handling secret chats* +**You cannot use this method directly, see https://daniil.it/MadelineProto for more info on handling secret chats** -### Parameters: - -| Name | Type | Required | -|----------|:-------------:|---------:| -|user\_id|[InputUser](../types/InputUser.md) | Yes| -|g\_a|[bytes](../types/bytes.md) | Yes| - - -### Return type: [EncryptedChat](../types/EncryptedChat.md) - -### Example: - - -``` -$MadelineProto = new \danog\MadelineProto\API(); -if (isset($token)) { // Login as a bot - $MadelineProto->bot_login($token); -} -if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } - $MadelineProto->complete_phone_login($code); -} - -$EncryptedChat = $MadelineProto->messages->requestEncryption(['user_id' => InputUser, 'g_a' => 'bytes', ]); -``` - -Or, if you're using the [PWRTelegram HTTP API](https://pwrtelegram.xyz): - -### As a bot: - -POST/GET to `https://api.pwrtelegram.xyz/botTOKEN/madeline` - -Parameters: - -* method - messages.requestEncryption -* params - `{"user_id": InputUser, "g_a": "bytes", }` - - - -### As a user: - -POST/GET to `https://api.pwrtelegram.xyz/userTOKEN/messages.requestEncryption` - -Parameters: - -user_id - Json encoded InputUser -g_a - Json encoded bytes - - - -Or, if you're into Lua: - -``` -EncryptedChat = messages.requestEncryption({user_id=InputUser, g_a='bytes', }) -``` - diff --git a/old_docs/API_docs_v68/methods/phone_acceptCall.md b/old_docs/API_docs_v68/methods/phone_acceptCall.md index a3cf68a8..79266f27 100644 --- a/old_docs/API_docs_v68/methods/phone_acceptCall.md +++ b/old_docs/API_docs_v68/methods/phone_acceptCall.md @@ -6,71 +6,8 @@ description: phone.acceptCall parameters, return type and example [Back to methods index](index.md) -*You cannot use this method directly, see https://daniil.it/MadelineProto#calls for more info on handling calls* +**You cannot use this method directly, see https://daniil.it/MadelineProto#calls for more info on handling calls** -### Parameters: - -| Name | Type | Required | -|----------|:-------------:|---------:| -|peer|[InputPhoneCall](../types/InputPhoneCall.md) | Yes| -|g\_b|[bytes](../types/bytes.md) | Yes| -|protocol|[PhoneCallProtocol](../types/PhoneCallProtocol.md) | Yes| - - -### Return type: [phone\_PhoneCall](../types/phone_PhoneCall.md) - -### Example: - - -``` -$MadelineProto = new \danog\MadelineProto\API(); -if (isset($token)) { // Login as a bot - $MadelineProto->bot_login($token); -} -if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } - $MadelineProto->complete_phone_login($code); -} - -$phone_PhoneCall = $MadelineProto->phone->acceptCall(['peer' => InputPhoneCall, 'g_b' => 'bytes', 'protocol' => PhoneCallProtocol, ]); -``` - -Or, if you're using the [PWRTelegram HTTP API](https://pwrtelegram.xyz): - -### As a bot: - -POST/GET to `https://api.pwrtelegram.xyz/botTOKEN/madeline` - -Parameters: - -* method - phone.acceptCall -* params - `{"peer": InputPhoneCall, "g_b": "bytes", "protocol": PhoneCallProtocol, }` - - - -### As a user: - -POST/GET to `https://api.pwrtelegram.xyz/userTOKEN/phone.acceptCall` - -Parameters: - -peer - Json encoded InputPhoneCall -g_b - Json encoded bytes -protocol - Json encoded PhoneCallProtocol - - - -Or, if you're into Lua: - -``` -phone_PhoneCall = phone.acceptCall({peer=InputPhoneCall, g_b='bytes', protocol=PhoneCallProtocol, }) -``` - diff --git a/old_docs/API_docs_v68/methods/phone_confirmCall.md b/old_docs/API_docs_v68/methods/phone_confirmCall.md index ecec0ffc..69e90751 100644 --- a/old_docs/API_docs_v68/methods/phone_confirmCall.md +++ b/old_docs/API_docs_v68/methods/phone_confirmCall.md @@ -6,73 +6,8 @@ description: phone.confirmCall parameters, return type and example [Back to methods index](index.md) -*You cannot use this method directly, see https://daniil.it/MadelineProto#calls for more info on handling calls* +**You cannot use this method directly, see https://daniil.it/MadelineProto#calls for more info on handling calls** -### Parameters: - -| Name | Type | Required | -|----------|:-------------:|---------:| -|peer|[InputPhoneCall](../types/InputPhoneCall.md) | Yes| -|g\_a|[bytes](../types/bytes.md) | Yes| -|key\_fingerprint|[long](../types/long.md) | Yes| -|protocol|[PhoneCallProtocol](../types/PhoneCallProtocol.md) | Yes| - - -### Return type: [phone\_PhoneCall](../types/phone_PhoneCall.md) - -### Example: - - -``` -$MadelineProto = new \danog\MadelineProto\API(); -if (isset($token)) { // Login as a bot - $MadelineProto->bot_login($token); -} -if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } - $MadelineProto->complete_phone_login($code); -} - -$phone_PhoneCall = $MadelineProto->phone->confirmCall(['peer' => InputPhoneCall, 'g_a' => 'bytes', 'key_fingerprint' => long, 'protocol' => PhoneCallProtocol, ]); -``` - -Or, if you're using the [PWRTelegram HTTP API](https://pwrtelegram.xyz): - -### As a bot: - -POST/GET to `https://api.pwrtelegram.xyz/botTOKEN/madeline` - -Parameters: - -* method - phone.confirmCall -* params - `{"peer": InputPhoneCall, "g_a": "bytes", "key_fingerprint": long, "protocol": PhoneCallProtocol, }` - - - -### As a user: - -POST/GET to `https://api.pwrtelegram.xyz/userTOKEN/phone.confirmCall` - -Parameters: - -peer - Json encoded InputPhoneCall -g_a - Json encoded bytes -key_fingerprint - Json encoded long -protocol - Json encoded PhoneCallProtocol - - - -Or, if you're into Lua: - -``` -phone_PhoneCall = phone.confirmCall({peer=InputPhoneCall, g_a='bytes', key_fingerprint=long, protocol=PhoneCallProtocol, }) -``` - diff --git a/old_docs/API_docs_v68/methods/phone_discardCall.md b/old_docs/API_docs_v68/methods/phone_discardCall.md index bb6b4cd7..c300e61c 100644 --- a/old_docs/API_docs_v68/methods/phone_discardCall.md +++ b/old_docs/API_docs_v68/methods/phone_discardCall.md @@ -6,73 +6,8 @@ description: phone.discardCall parameters, return type and example [Back to methods index](index.md) -*You cannot use this method directly, see https://daniil.it/MadelineProto#calls for more info on handling calls* +**You cannot use this method directly, see https://daniil.it/MadelineProto#calls for more info on handling calls** -### Parameters: - -| Name | Type | Required | -|----------|:-------------:|---------:| -|peer|[InputPhoneCall](../types/InputPhoneCall.md) | Yes| -|duration|[int](../types/int.md) | Yes| -|reason|[PhoneCallDiscardReason](../types/PhoneCallDiscardReason.md) | Yes| -|connection\_id|[long](../types/long.md) | Yes| - - -### Return type: [Updates](../types/Updates.md) - -### Example: - - -``` -$MadelineProto = new \danog\MadelineProto\API(); -if (isset($token)) { // Login as a bot - $MadelineProto->bot_login($token); -} -if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } - $MadelineProto->complete_phone_login($code); -} - -$Updates = $MadelineProto->phone->discardCall(['peer' => InputPhoneCall, 'duration' => int, 'reason' => PhoneCallDiscardReason, 'connection_id' => long, ]); -``` - -Or, if you're using the [PWRTelegram HTTP API](https://pwrtelegram.xyz): - -### As a bot: - -POST/GET to `https://api.pwrtelegram.xyz/botTOKEN/madeline` - -Parameters: - -* method - phone.discardCall -* params - `{"peer": InputPhoneCall, "duration": int, "reason": PhoneCallDiscardReason, "connection_id": long, }` - - - -### As a user: - -POST/GET to `https://api.pwrtelegram.xyz/userTOKEN/phone.discardCall` - -Parameters: - -peer - Json encoded InputPhoneCall -duration - Json encoded int -reason - Json encoded PhoneCallDiscardReason -connection_id - Json encoded long - - - -Or, if you're into Lua: - -``` -Updates = phone.discardCall({peer=InputPhoneCall, duration=int, reason=PhoneCallDiscardReason, connection_id=long, }) -``` - diff --git a/old_docs/API_docs_v68/methods/phone_requestCall.md b/old_docs/API_docs_v68/methods/phone_requestCall.md index 7364c886..c8ae48a9 100644 --- a/old_docs/API_docs_v68/methods/phone_requestCall.md +++ b/old_docs/API_docs_v68/methods/phone_requestCall.md @@ -6,71 +6,8 @@ description: phone.requestCall parameters, return type and example [Back to methods index](index.md) -*You cannot use this method directly, see https://daniil.it/MadelineProto#calls for more info on handling calls* +**You cannot use this method directly, see https://daniil.it/MadelineProto#calls for more info on handling calls** -### Parameters: - -| Name | Type | Required | -|----------|:-------------:|---------:| -|user\_id|[InputUser](../types/InputUser.md) | Yes| -|g\_a\_hash|[bytes](../types/bytes.md) | Yes| -|protocol|[PhoneCallProtocol](../types/PhoneCallProtocol.md) | Yes| - - -### Return type: [phone\_PhoneCall](../types/phone_PhoneCall.md) - -### Example: - - -``` -$MadelineProto = new \danog\MadelineProto\API(); -if (isset($token)) { // Login as a bot - $MadelineProto->bot_login($token); -} -if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } - $MadelineProto->complete_phone_login($code); -} - -$phone_PhoneCall = $MadelineProto->phone->requestCall(['user_id' => InputUser, 'g_a_hash' => 'bytes', 'protocol' => PhoneCallProtocol, ]); -``` - -Or, if you're using the [PWRTelegram HTTP API](https://pwrtelegram.xyz): - -### As a bot: - -POST/GET to `https://api.pwrtelegram.xyz/botTOKEN/madeline` - -Parameters: - -* method - phone.requestCall -* params - `{"user_id": InputUser, "g_a_hash": "bytes", "protocol": PhoneCallProtocol, }` - - - -### As a user: - -POST/GET to `https://api.pwrtelegram.xyz/userTOKEN/phone.requestCall` - -Parameters: - -user_id - Json encoded InputUser -g_a_hash - Json encoded bytes -protocol - Json encoded PhoneCallProtocol - - - -Or, if you're into Lua: - -``` -phone_PhoneCall = phone.requestCall({user_id=InputUser, g_a_hash='bytes', protocol=PhoneCallProtocol, }) -``` - diff --git a/old_docs/API_docs_v68/methods/updates_getChannelDifference.md b/old_docs/API_docs_v68/methods/updates_getChannelDifference.md index d4eff325..2e69d1cd 100644 --- a/old_docs/API_docs_v68/methods/updates_getChannelDifference.md +++ b/old_docs/API_docs_v68/methods/updates_getChannelDifference.md @@ -6,75 +6,8 @@ description: updates.getChannelDifference parameters, return type and example [Back to methods index](index.md) -*You cannot use this method directly, see https://daniil.it/MadelineProto for more info on handling updates* +**You cannot use this method directly, see https://daniil.it/MadelineProto for more info on handling updates** -### Parameters: - -| Name | Type | Required | -|----------|:-------------:|---------:| -|force|[Bool](../types/Bool.md) | Optional| -|channel|[InputChannel](../types/InputChannel.md) | Yes| -|filter|[ChannelMessagesFilter](../types/ChannelMessagesFilter.md) | Yes| -|pts|[int](../types/int.md) | Yes| -|limit|[int](../types/int.md) | Yes| - - -### Return type: [updates\_ChannelDifference](../types/updates_ChannelDifference.md) - -### Example: - - -``` -$MadelineProto = new \danog\MadelineProto\API(); -if (isset($token)) { // Login as a bot - $MadelineProto->bot_login($token); -} -if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } - $MadelineProto->complete_phone_login($code); -} - -$updates_ChannelDifference = $MadelineProto->updates->getChannelDifference(['force' => Bool, 'channel' => InputChannel, 'filter' => ChannelMessagesFilter, 'pts' => int, 'limit' => int, ]); -``` - -Or, if you're using the [PWRTelegram HTTP API](https://pwrtelegram.xyz): - -### As a bot: - -POST/GET to `https://api.pwrtelegram.xyz/botTOKEN/madeline` - -Parameters: - -* method - updates.getChannelDifference -* params - `{"force": Bool, "channel": InputChannel, "filter": ChannelMessagesFilter, "pts": int, "limit": int, }` - - - -### As a user: - -POST/GET to `https://api.pwrtelegram.xyz/userTOKEN/updates.getChannelDifference` - -Parameters: - -force - Json encoded Bool -channel - Json encoded InputChannel -filter - Json encoded ChannelMessagesFilter -pts - Json encoded int -limit - Json encoded int - - - -Or, if you're into Lua: - -``` -updates_ChannelDifference = updates.getChannelDifference({force=Bool, channel=InputChannel, filter=ChannelMessagesFilter, pts=int, limit=int, }) -``` - diff --git a/old_docs/API_docs_v68/methods/updates_getDifference.md b/old_docs/API_docs_v68/methods/updates_getDifference.md index b50de4bb..9bcee79a 100644 --- a/old_docs/API_docs_v68/methods/updates_getDifference.md +++ b/old_docs/API_docs_v68/methods/updates_getDifference.md @@ -6,73 +6,8 @@ description: updates.getDifference parameters, return type and example [Back to methods index](index.md) -*You cannot use this method directly, see https://daniil.it/MadelineProto for more info on handling updates* +**You cannot use this method directly, see https://daniil.it/MadelineProto for more info on handling updates** -### Parameters: - -| Name | Type | Required | -|----------|:-------------:|---------:| -|pts|[int](../types/int.md) | Yes| -|pts\_total\_limit|[int](../types/int.md) | Optional| -|date|[int](../types/int.md) | Yes| -|qts|[int](../types/int.md) | Yes| - - -### Return type: [updates\_Difference](../types/updates_Difference.md) - -### Example: - - -``` -$MadelineProto = new \danog\MadelineProto\API(); -if (isset($token)) { // Login as a bot - $MadelineProto->bot_login($token); -} -if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } - $MadelineProto->complete_phone_login($code); -} - -$updates_Difference = $MadelineProto->updates->getDifference(['pts' => int, 'pts_total_limit' => int, 'date' => int, 'qts' => int, ]); -``` - -Or, if you're using the [PWRTelegram HTTP API](https://pwrtelegram.xyz): - -### As a bot: - -POST/GET to `https://api.pwrtelegram.xyz/botTOKEN/madeline` - -Parameters: - -* method - updates.getDifference -* params - `{"pts": int, "pts_total_limit": int, "date": int, "qts": int, }` - - - -### As a user: - -POST/GET to `https://api.pwrtelegram.xyz/userTOKEN/updates.getDifference` - -Parameters: - -pts - Json encoded int -pts_total_limit - Json encoded int -date - Json encoded int -qts - Json encoded int - - - -Or, if you're into Lua: - -``` -updates_Difference = updates.getDifference({pts=int, pts_total_limit=int, date=int, qts=int, }) -``` - diff --git a/old_docs/API_docs_v68/methods/updates_getState.md b/old_docs/API_docs_v68/methods/updates_getState.md index 51f6ae80..fd5955ba 100644 --- a/old_docs/API_docs_v68/methods/updates_getState.md +++ b/old_docs/API_docs_v68/methods/updates_getState.md @@ -6,61 +6,8 @@ description: updates.getState parameters, return type and example [Back to methods index](index.md) -*You cannot use this method directly, see https://daniil.it/MadelineProto for more info on handling updates* +**You cannot use this method directly, see https://daniil.it/MadelineProto for more info on handling updates** - - -### Return type: [updates\_State](../types/updates_State.md) - -### Example: - - -``` -$MadelineProto = new \danog\MadelineProto\API(); -if (isset($token)) { // Login as a bot - $MadelineProto->bot_login($token); -} -if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } - $MadelineProto->complete_phone_login($code); -} - -$updates_State = $MadelineProto->updates->getState(); -``` - -Or, if you're using the [PWRTelegram HTTP API](https://pwrtelegram.xyz): - -### As a bot: - -POST/GET to `https://api.pwrtelegram.xyz/botTOKEN/madeline` - -Parameters: - -* method - updates.getState -* params - `{}` - - - -### As a user: - -POST/GET to `https://api.pwrtelegram.xyz/userTOKEN/updates.getState` - -Parameters: - - - - -Or, if you're into Lua: - -``` -updates_State = updates.getState({}) -``` - diff --git a/old_docs/API_docs_v68/methods/upload_getCdnFile.md b/old_docs/API_docs_v68/methods/upload_getCdnFile.md index b0a0514b..3a0cd50e 100644 --- a/old_docs/API_docs_v68/methods/upload_getCdnFile.md +++ b/old_docs/API_docs_v68/methods/upload_getCdnFile.md @@ -6,71 +6,8 @@ description: upload.getCdnFile parameters, return type and example [Back to methods index](index.md) -*You cannot use this method directly, use the upload, download_to_stream, download_to_file, download_to_dir methods instead; see https://daniil.it/MadelineProto for more info* +**You cannot use this method directly, use the upload, download_to_stream, download_to_file, download_to_dir methods instead; see https://daniil.it/MadelineProto for more info** -### Parameters: - -| Name | Type | Required | -|----------|:-------------:|---------:| -|file\_token|[bytes](../types/bytes.md) | Yes| -|offset|[int](../types/int.md) | Yes| -|limit|[int](../types/int.md) | Yes| - - -### Return type: [upload\_CdnFile](../types/upload_CdnFile.md) - -### Example: - - -``` -$MadelineProto = new \danog\MadelineProto\API(); -if (isset($token)) { // Login as a bot - $MadelineProto->bot_login($token); -} -if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } - $MadelineProto->complete_phone_login($code); -} - -$upload_CdnFile = $MadelineProto->upload->getCdnFile(['file_token' => 'bytes', 'offset' => int, 'limit' => int, ]); -``` - -Or, if you're using the [PWRTelegram HTTP API](https://pwrtelegram.xyz): - -### As a bot: - -POST/GET to `https://api.pwrtelegram.xyz/botTOKEN/madeline` - -Parameters: - -* method - upload.getCdnFile -* params - `{"file_token": "bytes", "offset": int, "limit": int, }` - - - -### As a user: - -POST/GET to `https://api.pwrtelegram.xyz/userTOKEN/upload.getCdnFile` - -Parameters: - -file_token - Json encoded bytes -offset - Json encoded int -limit - Json encoded int - - - -Or, if you're into Lua: - -``` -upload_CdnFile = upload.getCdnFile({file_token='bytes', offset=int, limit=int, }) -``` - diff --git a/old_docs/API_docs_v68/methods/upload_getFile.md b/old_docs/API_docs_v68/methods/upload_getFile.md index a1003003..add7d54e 100644 --- a/old_docs/API_docs_v68/methods/upload_getFile.md +++ b/old_docs/API_docs_v68/methods/upload_getFile.md @@ -6,71 +6,8 @@ description: upload.getFile parameters, return type and example [Back to methods index](index.md) -*You cannot use this method directly, use the upload, download_to_stream, download_to_file, download_to_dir methods instead; see https://daniil.it/MadelineProto for more info* +**You cannot use this method directly, use the upload, download_to_stream, download_to_file, download_to_dir methods instead; see https://daniil.it/MadelineProto for more info** -### Parameters: - -| Name | Type | Required | -|----------|:-------------:|---------:| -|location|[InputFileLocation](../types/InputFileLocation.md) | Yes| -|offset|[int](../types/int.md) | Yes| -|limit|[int](../types/int.md) | Yes| - - -### Return type: [upload\_File](../types/upload_File.md) - -### Example: - - -``` -$MadelineProto = new \danog\MadelineProto\API(); -if (isset($token)) { // Login as a bot - $MadelineProto->bot_login($token); -} -if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } - $MadelineProto->complete_phone_login($code); -} - -$upload_File = $MadelineProto->upload->getFile(['location' => InputFileLocation, 'offset' => int, 'limit' => int, ]); -``` - -Or, if you're using the [PWRTelegram HTTP API](https://pwrtelegram.xyz): - -### As a bot: - -POST/GET to `https://api.pwrtelegram.xyz/botTOKEN/madeline` - -Parameters: - -* method - upload.getFile -* params - `{"location": InputFileLocation, "offset": int, "limit": int, }` - - - -### As a user: - -POST/GET to `https://api.pwrtelegram.xyz/userTOKEN/upload.getFile` - -Parameters: - -location - Json encoded InputFileLocation -offset - Json encoded int -limit - Json encoded int - - - -Or, if you're into Lua: - -``` -upload_File = upload.getFile({location=InputFileLocation, offset=int, limit=int, }) -``` - diff --git a/old_docs/API_docs_v68/methods/upload_reuploadCdnFile.md b/old_docs/API_docs_v68/methods/upload_reuploadCdnFile.md index acb960a4..4c00bbd0 100644 --- a/old_docs/API_docs_v68/methods/upload_reuploadCdnFile.md +++ b/old_docs/API_docs_v68/methods/upload_reuploadCdnFile.md @@ -6,69 +6,8 @@ description: upload.reuploadCdnFile parameters, return type and example [Back to methods index](index.md) -*You cannot use this method directly, use the upload, download_to_stream, download_to_file, download_to_dir methods instead; see https://daniil.it/MadelineProto for more info* +**You cannot use this method directly, use the upload, download_to_stream, download_to_file, download_to_dir methods instead; see https://daniil.it/MadelineProto for more info** -### Parameters: - -| Name | Type | Required | -|----------|:-------------:|---------:| -|file\_token|[bytes](../types/bytes.md) | Yes| -|request\_token|[bytes](../types/bytes.md) | Yes| - - -### Return type: [Bool](../types/Bool.md) - -### Example: - - -``` -$MadelineProto = new \danog\MadelineProto\API(); -if (isset($token)) { // Login as a bot - $MadelineProto->bot_login($token); -} -if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } - $MadelineProto->complete_phone_login($code); -} - -$Bool = $MadelineProto->upload->reuploadCdnFile(['file_token' => 'bytes', 'request_token' => 'bytes', ]); -``` - -Or, if you're using the [PWRTelegram HTTP API](https://pwrtelegram.xyz): - -### As a bot: - -POST/GET to `https://api.pwrtelegram.xyz/botTOKEN/madeline` - -Parameters: - -* method - upload.reuploadCdnFile -* params - `{"file_token": "bytes", "request_token": "bytes", }` - - - -### As a user: - -POST/GET to `https://api.pwrtelegram.xyz/userTOKEN/upload.reuploadCdnFile` - -Parameters: - -file_token - Json encoded bytes -request_token - Json encoded bytes - - - -Or, if you're into Lua: - -``` -Bool = upload.reuploadCdnFile({file_token='bytes', request_token='bytes', }) -``` - diff --git a/old_docs/API_docs_v68/methods/upload_saveBigFilePart.md b/old_docs/API_docs_v68/methods/upload_saveBigFilePart.md index e5c96d89..b1c3ea28 100644 --- a/old_docs/API_docs_v68/methods/upload_saveBigFilePart.md +++ b/old_docs/API_docs_v68/methods/upload_saveBigFilePart.md @@ -6,73 +6,8 @@ description: upload.saveBigFilePart parameters, return type and example [Back to methods index](index.md) -*You cannot use this method directly, use the upload, download_to_stream, download_to_file, download_to_dir methods instead; see https://daniil.it/MadelineProto for more info* +**You cannot use this method directly, use the upload, download_to_stream, download_to_file, download_to_dir methods instead; see https://daniil.it/MadelineProto for more info** -### Parameters: - -| Name | Type | Required | -|----------|:-------------:|---------:| -|file\_id|[long](../types/long.md) | Yes| -|file\_part|[int](../types/int.md) | Yes| -|file\_total\_parts|[int](../types/int.md) | Yes| -|bytes|[bytes](../types/bytes.md) | Yes| - - -### Return type: [Bool](../types/Bool.md) - -### Example: - - -``` -$MadelineProto = new \danog\MadelineProto\API(); -if (isset($token)) { // Login as a bot - $MadelineProto->bot_login($token); -} -if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } - $MadelineProto->complete_phone_login($code); -} - -$Bool = $MadelineProto->upload->saveBigFilePart(['file_id' => long, 'file_part' => int, 'file_total_parts' => int, 'bytes' => 'bytes', ]); -``` - -Or, if you're using the [PWRTelegram HTTP API](https://pwrtelegram.xyz): - -### As a bot: - -POST/GET to `https://api.pwrtelegram.xyz/botTOKEN/madeline` - -Parameters: - -* method - upload.saveBigFilePart -* params - `{"file_id": long, "file_part": int, "file_total_parts": int, "bytes": "bytes", }` - - - -### As a user: - -POST/GET to `https://api.pwrtelegram.xyz/userTOKEN/upload.saveBigFilePart` - -Parameters: - -file_id - Json encoded long -file_part - Json encoded int -file_total_parts - Json encoded int -bytes - Json encoded bytes - - - -Or, if you're into Lua: - -``` -Bool = upload.saveBigFilePart({file_id=long, file_part=int, file_total_parts=int, bytes='bytes', }) -``` - diff --git a/old_docs/API_docs_v68/methods/upload_saveFilePart.md b/old_docs/API_docs_v68/methods/upload_saveFilePart.md index 1c16e4b2..c482f321 100644 --- a/old_docs/API_docs_v68/methods/upload_saveFilePart.md +++ b/old_docs/API_docs_v68/methods/upload_saveFilePart.md @@ -6,71 +6,8 @@ description: upload.saveFilePart parameters, return type and example [Back to methods index](index.md) -*You cannot use this method directly, use the upload, download_to_stream, download_to_file, download_to_dir methods instead; see https://daniil.it/MadelineProto for more info* +**You cannot use this method directly, use the upload, download_to_stream, download_to_file, download_to_dir methods instead; see https://daniil.it/MadelineProto for more info** -### Parameters: - -| Name | Type | Required | -|----------|:-------------:|---------:| -|file\_id|[long](../types/long.md) | Yes| -|file\_part|[int](../types/int.md) | Yes| -|bytes|[bytes](../types/bytes.md) | Yes| - - -### Return type: [Bool](../types/Bool.md) - -### Example: - - -``` -$MadelineProto = new \danog\MadelineProto\API(); -if (isset($token)) { // Login as a bot - $MadelineProto->bot_login($token); -} -if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } - $MadelineProto->complete_phone_login($code); -} - -$Bool = $MadelineProto->upload->saveFilePart(['file_id' => long, 'file_part' => int, 'bytes' => 'bytes', ]); -``` - -Or, if you're using the [PWRTelegram HTTP API](https://pwrtelegram.xyz): - -### As a bot: - -POST/GET to `https://api.pwrtelegram.xyz/botTOKEN/madeline` - -Parameters: - -* method - upload.saveFilePart -* params - `{"file_id": long, "file_part": int, "bytes": "bytes", }` - - - -### As a user: - -POST/GET to `https://api.pwrtelegram.xyz/userTOKEN/upload.saveFilePart` - -Parameters: - -file_id - Json encoded long -file_part - Json encoded int -bytes - Json encoded bytes - - - -Or, if you're into Lua: - -``` -Bool = upload.saveFilePart({file_id=long, file_part=int, bytes='bytes', }) -``` - diff --git a/old_docs/API_docs_v68/methods/users_getFullUser.md b/old_docs/API_docs_v68/methods/users_getFullUser.md index 645ab12e..4ec831ec 100644 --- a/old_docs/API_docs_v68/methods/users_getFullUser.md +++ b/old_docs/API_docs_v68/methods/users_getFullUser.md @@ -6,67 +6,8 @@ description: users.getFullUser parameters, return type and example [Back to methods index](index.md) -*You cannot use this method directly, use the get_pwr_chat, get_info, get_full_info methods instead (see https://daniil.it/MadelineProto for more info)* +**You cannot use this method directly, use the get_pwr_chat, get_info, get_full_info methods instead (see https://daniil.it/MadelineProto for more info)** -### Parameters: - -| Name | Type | Required | -|----------|:-------------:|---------:| -|id|[InputUser](../types/InputUser.md) | Yes| - - -### Return type: [UserFull](../types/UserFull.md) - -### Example: - - -``` -$MadelineProto = new \danog\MadelineProto\API(); -if (isset($token)) { // Login as a bot - $MadelineProto->bot_login($token); -} -if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } - $MadelineProto->complete_phone_login($code); -} - -$UserFull = $MadelineProto->users->getFullUser(['id' => InputUser, ]); -``` - -Or, if you're using the [PWRTelegram HTTP API](https://pwrtelegram.xyz): - -### As a bot: - -POST/GET to `https://api.pwrtelegram.xyz/botTOKEN/madeline` - -Parameters: - -* method - users.getFullUser -* params - `{"id": InputUser, }` - - - -### As a user: - -POST/GET to `https://api.pwrtelegram.xyz/userTOKEN/users.getFullUser` - -Parameters: - -id - Json encoded InputUser - - - -Or, if you're into Lua: - -``` -UserFull = users.getFullUser({id=InputUser, }) -``` - diff --git a/old_docs/API_docs_v68/types/PhoneCall.md b/old_docs/API_docs_v68/types/PhoneCall.md index cb9cc822..668c475e 100644 --- a/old_docs/API_docs_v68/types/PhoneCall.md +++ b/old_docs/API_docs_v68/types/PhoneCall.md @@ -146,7 +146,6 @@ The audio configuration is an array structured in the following way: * `playOnHold(array $files)` - Array of audio files encoded in PCM, with the audio input configuration to loop on hold (when the files given with play/then have finished playing). If not called, no data will be played, returns `$this` * `isPlaying()` - Returns true if MadelineProto is still playing the files given with play/then, false if the hold files (or nothing) is being played * `setMicMute(bool $mute)` - Stops/resumes playing files/hold files, returns `$this` -* `setBitrate(int $bitrate)` - Sets maximum outgoing bitrate, and increases the bitrate of the call to the maximum outgoing bitrate (high values increase the quality of the song), returns `$this` * `setOutputFile(string $outputfile)` - Writes incoming audio data to file encoded in PCM, with the audio output configuration, returns `$this` * `unsetOutputFile()` - Stops writing audio data to previously set file, returns `$this` diff --git a/src/danog/MadelineProto/AnnotationsBuilder.php b/src/danog/MadelineProto/AnnotationsBuilder.php index 176ee342..2233af99 100644 --- a/src/danog/MadelineProto/AnnotationsBuilder.php +++ b/src/danog/MadelineProto/AnnotationsBuilder.php @@ -74,16 +74,16 @@ class AnnotationsBuilder { \danog\MadelineProto\Logger::log(['Creating internal classes...'], \danog\MadelineProto\Logger::NOTICE); $handle = fopen(dirname(__FILE__).'/InternalDoc.php', 'w'); - foreach ($this->methods->method as $key => $rmethod) { - if (!strpos($rmethod, '.')) { + foreach ($this->methods->by_id as $id => $data) { + if (!strpos($data['method'], '.')) { continue; } - list($namespace, $method) = explode('.', $rmethod); + list($namespace, $method) = explode('.', $data['method']); if (!in_array($namespace, $this->get_method_namespaces())) { continue; } - $type = str_replace(['.', '<', '>'], ['_', '_of_', ''], $this->methods->type[$key]); - foreach ($this->methods->params[$key] as $param) { + $type = str_replace(['.', '<', '>'], ['_', '_of_', ''], $data['type']); + foreach ($data['params'] as $param) { if (in_array($param['name'], ['flags', 'random_id'])) { continue; } diff --git a/src/danog/MadelineProto/DocsBuilder.php b/src/danog/MadelineProto/DocsBuilder.php index 512b240d..6145369f 100644 --- a/src/danog/MadelineProto/DocsBuilder.php +++ b/src/danog/MadelineProto/DocsBuilder.php @@ -15,6 +15,8 @@ namespace danog\MadelineProto; class DocsBuilder { use \danog\MadelineProto\TL\TL; + use \danog\MadelineProto\DocsBuilder\Methods; + use \danog\MadelineProto\DocsBuilder\Constructors; use Tools; public $td = false; @@ -36,10 +38,12 @@ class DocsBuilder $this->index = $settings['readme'] ? 'README.md' : 'index.md'; } + public $types = []; + public $any = '*'; + public function end($what) { return end($what); } + public function escape($hwat) { return str_replace('_', '\_', $hwat); } public function mk_docs() { - $types = []; - $any = '*'; \danog\MadelineProto\Logger::log(['Generating documentation index...'], \danog\MadelineProto\Logger::NOTICE); file_put_contents($this->index, '--- @@ -57,512 +61,8 @@ description: '.$this->settings['description'].' [Back to main documentation](..) '); - - foreach (glob('methods/'.$any) as $unlink) { - unlink($unlink); - } - - if (file_exists('methods')) { - rmdir('methods'); - } - - mkdir('methods'); - - $methods = []; - - \danog\MadelineProto\Logger::log(['Generating methods documentation...'], \danog\MadelineProto\Logger::NOTICE); - - foreach ($this->methods->method as $key => $rmethod) { - $method = str_replace('.', '_', $rmethod); - $real_method = str_replace('.', '->', $rmethod); - $rtype = $this->methods->type[$key]; - $type = str_replace(['.', '<', '>'], ['_', '_of_', ''], $rtype); - $real_type = preg_replace('/.*_of_/', '', $type); - if (!isset($types[$real_type])) { - $types[$real_type] = ['constructors' => [], 'methods' => []]; - } - if (!in_array($key, $types[$real_type]['methods'])) { - $types[$real_type]['methods'][] = $key; - } - - $params = ''; - foreach ($this->methods->params[$key] as $param) { - if (in_array($param['name'], ['flags', 'random_id', 'random_bytes'])) { - continue; - } - if ($param['name'] === 'data' && $type === 'messages_SentEncryptedMessage') { - $param['name'] = 'message'; - $param['type'] = 'DecryptedMessage'; - } - if ($param['name'] === 'chat_id' && $rmethod !== 'messages.discardEncryption') { - $param['type'] = 'InputPeer'; - } - $stype = 'type'; - $link_type = 'types'; - if (isset($param['subtype'])) { - $stype = 'subtype'; - if ($param['type'] === 'vector') { - $link_type = 'constructors'; - } - } - $ptype = str_replace('.', '_', $param[$stype]); - switch ($ptype) { - case 'true': - case 'false': - $ptype = 'Bool'; - } - $params .= "'".$param['name']."' => "; - $ptype = - '['. - str_replace('_', '\_', $ptype). - '](../'.$link_type.'/'.$ptype.'.md)'; - - $params .= (isset($param['subtype']) ? '\['.$ptype.'\]' : $ptype).', '; - } - $md_method = '['.$real_method.']('.$method.'.md)'; - - $methods[$method] = '$MadelineProto->'.$md_method.'(\['.$params.'\]) === [$'.str_replace('_', '\_', $type).'](../types/'.$real_type.'.md) - -'; - - $params = ''; - $lua_params = ''; - $pwr_params = ''; - $json_params = ''; - $table = empty($this->methods->params[$key]) ? '' : '### Parameters: - -| Name | Type | Required | -|----------|:-------------:|---------:| -'; - if (isset($this->td_descriptions['methods'][$rmethod])) { - $table = '### Params: - -| Name | Type | Required | Description | -|----------|:-------------:|:--------:|------------:| -'; - } - - $hasentities = false; - $hasreplymarkup = false; - $hasmessage = false; - foreach ($this->methods->params[$key] as $param) { - if (in_array($param['name'], ['flags', 'random_id', 'random_bytes'])) { - continue; - } - if ($param['name'] === 'data' && $type === 'messages_SentEncryptedMessage') { - $param['name'] = 'message'; - $param['type'] = 'DecryptedMessage'; - } - if ($param['name'] === 'chat_id' && $rmethod !== 'messages.discardEncryption') { - $param['type'] = 'InputPeer'; - } - - $ptype = str_replace('.', '_', $param[isset($param['subtype']) ? 'subtype' : 'type']); - switch ($ptype) { - case 'true': - case 'false': - $ptype = 'Bool'; - } - $table .= '|'.str_replace('_', '\_', $param['name']).'|'.(isset($param['subtype']) ? 'Array of ' : '').'['.str_replace('_', '\_', $ptype).'](../types/'.$ptype.'.md) | '.(isset($param['pow']) ? 'Optional' : 'Yes').'|'; - if (isset($this->td_descriptions['methods'][$rmethod])) { - $table .= $this->td_descriptions['methods'][$rmethod]['params'][$param['name']].'|'; - } - $table .= PHP_EOL; - - $pptype = in_array($ptype, ['string', 'bytes']) ? "'".$ptype."'" : $ptype; - $ppptype = in_array($ptype, ['string', 'bytes']) ? '"'.$ptype.'"' : $ptype; - - $params .= "'".$param['name']."' => "; - $params .= (isset($param['subtype']) ? '['.$pptype.']' : $pptype).', '; - $json_params .= '"'.$param['name'].'": '.(isset($param['subtype']) ? '['.$ppptype.']' : $ppptype).', '; - $pwr_params .= $param['name'].' - Json encoded '.(isset($param['subtype']) ? ' array of '.$ptype : $ptype)."\n"; - $lua_params .= $param['name'].'='; - $lua_params .= (isset($param['subtype']) ? '{'.$pptype.'}' : $pptype).', '; - if ($param['name'] === 'reply_markup') { - $hasreplymarkup = true; - } - if ($param['name'] === 'message') { - $hasmessage = true; - } - if ($param['name'] === 'entities') { - $hasentities = true; - $table .= '|parse\_mode| [string](../types/string.md) | Optional | -'; - $params .= "'parse_mode' => 'string', "; - $lua_params .= "parse_mode='string', "; - $json_params .= '"parse_mode": "string"'; - $pwr_params = "parse_mode - string\n"; - } - } - $description = isset($this->td_descriptions['methods'][$rmethod]) ? $this->td_descriptions['methods'][$rmethod]['description'] : ($rmethod.' parameters, return type and example'); - $header = '--- -title: '.$rmethod.' -description: '.$description.' ---- -## Method: '.str_replace('_', '\_', $rmethod).' -[Back to methods index](index.md) - - -'; - if (isset(MTProto::DISALLOWED_METHODS[$rmethod])) { - $header .= '*'.MTProto::DISALLOWED_METHODS[$rmethod]."*\n\n\n\n\n"; - } - if ($this->td) { - $header .= 'YOU CANNOT USE THIS METHOD IN MADELINEPROTO - - -'; - } - $header .= isset($this->td_descriptions['methods'][$rmethod]) ? $this->td_descriptions['methods'][$rmethod]['description'].PHP_EOL.PHP_EOL : ''; - $table .= ' - -'; - $return = '### Return type: ['.str_replace('_', '\_', $type).'](../types/'.$real_type.'.md) - -'; - $example = str_replace('[]', '', '### Example: - - -``` -$MadelineProto = new \danog\MadelineProto\API(); -if (isset($token)) { // Login as a bot - $MadelineProto->bot_login($token); -} -if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo \'Enter the code you received: \'; - $code = \'\'; - for ($x = 0; $x < $sentCode[\'type\'][\'length\']; $x++) { - $code .= fgetc(STDIN); - } - $MadelineProto->complete_phone_login($code); -} - -$'.$type.' = $MadelineProto->'.$real_method.'(['.$params.']); -``` - -Or, if you\'re using the [PWRTelegram HTTP API](https://pwrtelegram.xyz): - -### As a bot: - -POST/GET to `https://api.pwrtelegram.xyz/botTOKEN/madeline` - -Parameters: - -* method - '.$rmethod.' -* params - `{'.$json_params.'}` - - - -### As a user: - -POST/GET to `https://api.pwrtelegram.xyz/userTOKEN/'.$rmethod.'` - -Parameters: - -'.$pwr_params.' - - -Or, if you\'re into Lua: - -``` -'.$type.' = '.$rmethod.'({'.$lua_params.'}) -``` - -'); - if ($hasreplymarkup) { - $example .= ' -## Usage of reply_markup - -You can provide bot API reply_markup objects here. - - -'; - } - if ($hasmessage) { - $example .= ' -## Return value - -If the length of the provided message is bigger than 4096, the message will be split in chunks and the method will be called multiple times, with the same parameters (except for the message), and an array of ['.str_replace('_', '\_', $type).'](../types/'.$real_type.'.md) will be returned instead. - - -'; - } - if ($hasentities) { - $example .= ' -## Usage of parse_mode: - -Set parse_mode to html to enable HTML parsing of the message. - -Set parse_mode to Markdown to enable markown AND html parsing of the message. - -The following tags are currently supported: - -``` -
a newline -bold works ok, internal tags are stripped -bold -italic -italic -inline fixed-width code -
pre-formatted fixed-width code block
-URL -Mention by username -Mention by user id -
Pre tags can have a language attribute
-``` - -You can also use normal markdown, note that to create mentions you must use the `mention:` syntax like in html: - -``` -[Mention by username](mention:@danogentili) -[Mention by user id](mention:186785362) -``` - -MadelineProto supports all html entities supported by [html_entity_decode](http://php.net/manual/en/function.html-entity-decode.php). -'; - } - file_put_contents('methods/'.$method.'.md', $header.$table.$return.$example); - } - - \danog\MadelineProto\Logger::log(['Generating methods index...'], \danog\MadelineProto\Logger::NOTICE); - - ksort($methods); - $last_namespace = ''; - foreach ($methods as $method => &$value) { - $new_namespace = preg_replace('/_.*/', '', $method); - $br = $new_namespace != $last_namespace ? '*** -

' : ''; - $value = $br.$value; - $last_namespace = $new_namespace; - } - - file_put_contents('methods/'.$this->index, '--- -title: Methods -description: List of methods ---- -# Methods -[Back to API documentation index](..) - - - -'.implode('', $methods)); - - foreach (glob('constructors/'.$any) as $unlink) { - unlink($unlink); - } - - if (file_exists('constructors')) { - rmdir('constructors'); - } - - mkdir('constructors'); - - $constructors = []; - \danog\MadelineProto\Logger::log(['Generating constructors documentation...'], \danog\MadelineProto\Logger::NOTICE); - - foreach ($this->constructors->predicate as $key => $rconstructor) { - if (preg_match('/%/', $type)) { - $type = $this->constructors->find_by_type(str_replace('%', '', $type))['predicate']; - } - $layer = isset($this->constructors->layer[$key]) ? '_'.$this->constructors->layer[$key] : ''; - $rtype = $this->constructors->type[$key]; - - $type = str_replace(['.', '<', '>'], ['_', '_of_', ''], $rtype); - $real_type = preg_replace('/.*_of_/', '', $type); - $constructor = str_replace(['.', '<', '>'], ['_', '_of_', ''], $rconstructor); - $real_constructor = preg_replace('/.*_of_/', '', $constructor); - - if (!isset($types[$real_type])) { - $types[$real_type] = ['constructors' => [], 'methods' => []]; - } - if (!in_array($key, $types[$real_type]['constructors'])) { - $types[$real_type]['constructors'][] = $key; - } - - $params = ''; - foreach ($this->constructors->params[$key] as $param) { - if (in_array($param['name'], ['flags', 'random_id', 'random_bytes'])) { - continue; - } - if ($type === 'EncryptedMessage' && $param['name'] === 'bytes') { - $param['name'] = 'decrypted_message'; - $param['type'] = 'DecryptedMessage'; - } - $stype = 'type'; - $link_type = 'types'; - if (isset($param['subtype'])) { - $stype = 'subtype'; - if ($param['type'] === 'vector') { - $link_type = 'constructors'; - } - } - - $ptype = str_replace('.', '_', $param[$stype]); - switch ($ptype) { - case 'true': - case 'false': - $ptype = 'Bool'; - } - if (preg_match('/%/', $ptype)) { - $ptype = $this->constructors->find_by_type(str_replace('%', '', $ptype))['predicate']; - } - - $params .= "'".$param['name']."' => "; - $ptype = - '['. - str_replace('_', '\_', $ptype). - '](../'.$link_type.'/'.$ptype.'.md)'; - - $params .= (isset($param['subtype']) ? '\['.$ptype.'\]' : $ptype).', '; - } - $md_constructor = str_replace('_', '\_', $constructor.$layer); - - $constructors[$constructor] = '[$'.$md_constructor.'](../constructors/'.$real_constructor.$layer.'.md) = \['.$params.'\]; - -'; - - $table = empty($this->constructors->params[$key]) ? '' : '### Attributes: - -| Name | Type | Required | -|----------|:-------------:|---------:| -'; - if (isset($this->td_descriptions['constructors'][$rconstructor])) { - $table = '### Attributes: - -| Name | Type | Required | Description | -|----------|:-------------:|:--------:|------------:| -'; - } - - $params = ''; - $lua_params = ''; - $pwr_params = ''; - $hasreplymarkup = false; - foreach ($this->constructors->params[$key] as $param) { - if (in_array($param['name'], ['flags', 'random_id', 'random_bytes'])) { - continue; - } - if ($type === 'EncryptedMessage' && $param['name'] === 'bytes') { - $param['name'] = 'decrypted_message'; - $param['type'] = 'DecryptedMessage'; - } - $ptype = str_replace('.', '_', $param[isset($param['subtype']) ? 'subtype' : 'type']); - - $link_type = 'types'; - if (isset($param['subtype'])) { - if ($param['type'] === 'vector') { - $link_type = 'constructors'; - } - } - if (preg_match('/%/', $ptype)) { - $ptype = $this->constructors->find_by_type(str_replace('%', '', $ptype))['predicate']; - } - switch ($ptype) { - case 'true': - case 'false': - $ptype = 'Bool'; - } - $table .= '|'.str_replace('_', '\_', $param['name']).'|'.(isset($param['subtype']) ? 'Array of ' : '').'['.str_replace('_', '\_', $ptype).'](../'.$link_type.'/'.$ptype.'.md) | '.(isset($param['pow']) ? 'Optional' : 'Yes').'|'; - if (isset($this->td_descriptions['constructors'][$rconstructor]['params'][$param['name']])) { - $table .= $this->td_descriptions['constructors'][$rconstructor]['params'][$param['name']].'|'; - } - $table .= PHP_EOL; - - $pptype = in_array($ptype, ['string', 'bytes']) ? "'".$ptype."'" : $ptype; - $ppptype = in_array($ptype, ['string', 'bytes']) ? '"'.$ptype.'"' : $ptype; - - $params .= ", '".$param['name']."' => "; - $params .= (isset($param['subtype']) ? '['.$pptype.']' : $pptype); - $lua_params .= ', '.$param['name'].'='; - $lua_params .= (isset($param['subtype']) ? '{'.$pptype.'}' : $pptype); - $pwr_params .= ', "'.$param['name'].'": '.(isset($param['subtype']) ? '['.$ppptype.']' : $ppptype); - if ($param['name'] === 'reply_markup') { - $hasreplymarkup = true; - } - } - $params = "['_' => '".$rconstructor."'".$params.']'; - $lua_params = "{_='".$rconstructor."'".$lua_params.'}'; - $pwr_params = '{"_": "'.$rconstructor.'"'.$pwr_params.'}'; - $description = isset($this->td_descriptions['constructors'][$rconstructor]) ? $this->td_descriptions['constructors'][$rconstructor]['description'] : ($constructor.' attributes, type and example'); - $header = '--- -title: '.$rconstructor.' -description: '.$description.' ---- -## Constructor: '.str_replace('_', '\_', $rconstructor.$layer).' -[Back to constructors index](index.md) - - - -'; - $table .= ' - - -'; - if (isset($this->td_descriptions['constructors'][$rconstructor])) { - $header .= $this->td_descriptions['constructors'][$rconstructor]['description'].PHP_EOL.PHP_EOL; - } - - $type = '### Type: ['.str_replace('_', '\_', $real_type).'](../types/'.$real_type.'.md) - - -'; - $example = '### Example: - -``` -$'.$constructor.$layer.' = '.$params.'; -``` - -[PWRTelegram](https://pwrtelegram.xyz) json-encoded version: - -``` -'.$pwr_params.' -``` - - -Or, if you\'re into Lua: - - -``` -'.$constructor.$layer.'='.$lua_params.' - -``` - - -'; - if ($hasreplymarkup) { - $example .= ' -## Usage of reply_markup - -You can provide bot API reply_markup objects here. - - -'; - } - file_put_contents('constructors/'.$constructor.$layer.'.md', $header.$table.$type.$example); - } - - \danog\MadelineProto\Logger::log(['Generating constructors index...'], \danog\MadelineProto\Logger::NOTICE); - - ksort($constructors); - $last_namespace = ''; - foreach ($constructors as $method => &$value) { - $new_namespace = preg_replace('/_.*/', '', $method); - $br = $new_namespace != $last_namespace ? '*** -

' : ''; - $value = $br.$value; - $last_namespace = $new_namespace; - } - file_put_contents('constructors/'.$this->index, '--- -title: Constructors -description: List of constructors ---- -# Constructors -[Back to API documentation index](..) - - - -'.implode('', $constructors)); + $this->mk_methodS(); + $this->mk_constructors(); foreach (glob('types/*') as $unlink) { unlink($unlink); @@ -573,30 +73,30 @@ description: List of constructors } mkdir('types'); - ksort($types); + ksort($this->types); $index = ''; \danog\MadelineProto\Logger::log(['Generating types documentation...'], \danog\MadelineProto\Logger::NOTICE); - foreach ($types as $otype => $keys) { - $new_namespace = preg_replace('/_.*/', '', $method); - $br = $new_namespace != $last_namespace ? '*** -

' : ''; + $last_namespace = ''; + foreach ($this->types as $otype => $keys) { + $new_namespace = preg_replace('/_.*/', '', $otype); + //$br = $new_namespace != $last_namespace ? '***

' : ''; $type = str_replace(['.', '<', '>'], ['_', '_of_', ''], $otype); $type = preg_replace('/.*_of_/', '', $type); - $index .= $br.'['.str_replace('_', '\_', $type).']('.$type.'.md) + $index .= '['.str_replace('_', '\_', $type).']('.$type.'.md) '; $constructors = ''; - foreach ($keys['constructors'] as $key) { - $predicate = str_replace('.', '_', $this->constructors->predicate[$key]).(isset($this->constructors->layer[$key]) ? '_'.$this->constructors->layer[$key] : ''); + foreach ($keys['constructors'] as $data) { + $predicate = str_replace('.', '_', $data['predicate']).(isset($data['layer']) && $data['layer'] !== '' ? '_'.$data['layer'] : ''); $md_predicate = str_replace('_', '\_', $predicate); $constructors .= '['.$md_predicate.'](../constructors/'.$predicate.'.md) '; } $methods = ''; - foreach ($keys['methods'] as $key) { - $name = str_replace('.', '_', $this->methods->method[$key]); + foreach ($keys['methods'] as $data) { + $name = str_replace('.', '_', $data['method']); $md_name = str_replace('_', '->', $name); $methods .= '[$MadelineProto->'.$md_name.'](../methods/'.$name.'.md) diff --git a/src/danog/MadelineProto/DocsBuilder/Constructors.php b/src/danog/MadelineProto/DocsBuilder/Constructors.php new file mode 100644 index 00000000..7d240ae7 --- /dev/null +++ b/src/danog/MadelineProto/DocsBuilder/Constructors.php @@ -0,0 +1,244 @@ +. +*/ + +namespace danog\MadelineProto\DocsBuilder; + +trait Constructors +{ + public function mk_constructors() { + foreach (glob('constructors/'.$this->any) as $unlink) { + unlink($unlink); + } + if (file_exists('constructors')) { + rmdir('constructors'); + } + mkdir('constructors'); + $this->docs_constructors = []; + \danog\MadelineProto\Logger::log(['Generating constructors documentation...'], \danog\MadelineProto\Logger::NOTICE); + $got = []; + foreach ($this->constructors->by_predicate_and_layer as $predicate => $id) { + $data = $this->constructors->by_id[$id]; + if (isset($got[$id])) { + $data['layer'] = ''; + var_dump($data); + } + $got[$id] = ''; + + /* + if (preg_match('/%/', $type)) { + $type = $this->constructors->find_by_type(str_replace('%', '', $type))['predicate']; + }*/ + $layer = isset($data['layer']) && $data['layer'] !== '' ? '_'.$data['layer'] : ''; + $type = str_replace(['.', '<', '>'], ['_', '_of_', ''], $data['type']); + $php_type = preg_replace('/.*_of_/', '', $type); + $constructor = str_replace(['.', '<', '>'], ['_', '_of_', ''], $data['predicate']); + $php_constructor = preg_replace('/.*_of_/', '', $constructor); + if (!isset($this->types[$php_type])) { + $this->types[$php_type] = ['constructors' => [], 'methods' => []]; + } + if (!in_array($data, $this->types[$php_type]['constructors'])) { + $this->types[$php_type]['constructors'][] = $data; + } + $params = ''; + foreach ($data['params'] as $param) { + if (in_array($param['name'], ['flags', 'random_id', 'random_bytes'])) { + continue; + } + if ($type === 'EncryptedMessage' && $param['name'] === 'bytes') { + $param['name'] = 'decrypted_message'; + $param['type'] = 'DecryptedMessage'; + } + $type_or_subtype = isset($param['subtype']) ? 'subtype' : 'type'; + $type_or_bare_type = (ctype_upper($this->end(explode('.', $param[$type_or_subtype]))[0]) || in_array($param[$type_or_subtype], ['!X', 'X', 'bytes', 'true', 'false', 'double', 'string', 'Bool', 'int', 'long', 'int128', 'int256', 'int512'])) ? 'types' : 'constructors'; + + $param[$type_or_subtype] = str_replace(['.', 'true', 'false'], ['_', 'Bool', 'Bool'], $param[$type_or_subtype]); + + if (preg_match('/%/', $param[$type_or_subtype])) { + $param[$type_or_subtype] = $this->constructors->find_by_type(str_replace('%', '', $param[$type_or_subtype]))['predicate']; + } + $params .= "'".$param['name']."' => "; + $param[$type_or_subtype] = '['.$this->escape($param[$type_or_subtype]).'](../'.$type_or_bare_type.'/'.$param[$type_or_subtype].'.md)'; + $params .= (isset($param['subtype']) ? '\['.$param[$type_or_subtype].'\]' : $param[$type_or_subtype]).', '; + } + $md_constructor = str_replace('_', '\_', $constructor.$layer); + $this->docs_constructors[$constructor] = '[$'.$md_constructor.'](../constructors/'.$php_constructor.$layer.'.md) = \['.$params.'\]; + +'; + $table = empty($data['params']) ? '' : '### Attributes: + +| Name | Type | Required | +|----------|:-------------:|---------:| +'; + if (isset($this->td_descriptions['constructors'][$data['predicate']])) { + $table = '### Attributes: + +| Name | Type | Required | Description | +|----------|:-------------:|:--------:|------------:| +'; + } + $params = ''; + $lua_params = ''; + $pwr_params = ''; + $hasreplymarkup = false; + $hasentities = false; + foreach ($data['params'] as $param) { + if (in_array($param['name'], ['flags', 'random_id', 'random_bytes'])) { + continue; + } + if ($type === 'EncryptedMessage' && $param['name'] === 'bytes') { + $param['name'] = 'decrypted_message'; + $param['type'] = 'DecryptedMessage'; + } + $ptype = str_replace('.', '_', $param[isset($param['subtype']) ? 'subtype' : 'type']); + $type_or_bare_type = 'types'; + if (isset($param['subtype'])) { + if ($param['type'] === 'vector') { + $type_or_bare_type = 'constructors'; + } + } + if (preg_match('/%/', $ptype)) { + $ptype = $this->constructors->find_by_type(str_replace('%', '', $ptype))['predicate']; + } + switch ($ptype) { + case 'true': + case 'false': + $ptype = 'Bool'; + } + $table .= '|'.str_replace('_', '\_', $param['name']).'|'.(isset($param['subtype']) ? 'Array of ' : '').'['.str_replace('_', '\_', $ptype).'](../'.$type_or_bare_type.'/'.$ptype.'.md) | '.(isset($param['pow']) ? 'Optional' : 'Yes').'|'; + if (isset($this->td_descriptions['constructors'][$data['predicate']]['params'][$param['name']])) { + $table .= $this->td_descriptions['constructors'][$data['predicate']]['params'][$param['name']].'|'; + } + $table .= PHP_EOL; + $pptype = in_array($ptype, ['string', 'bytes']) ? "'".$ptype."'" : $ptype; + $ppptype = in_array($ptype, ['string', 'bytes']) ? '"'.$ptype.'"' : $ptype; + $params .= ", '".$param['name']."' => "; + $params .= (isset($param['subtype']) ? '['.$pptype.']' : $pptype); + $lua_params .= ', '.$param['name'].'='; + $lua_params .= (isset($param['subtype']) ? '{'.$pptype.'}' : $pptype); + $pwr_params .= ', "'.$param['name'].'": '.(isset($param['subtype']) ? '['.$ppptype.']' : $ppptype); + if ($param['name'] === 'reply_markup') { + $hasreplymarkup = true; + } + } + $params = "['_' => '".$data['predicate']."'".$params.']'; + $lua_params = "{_='".$data['predicate']."'".$lua_params.'}'; + $pwr_params = '{"_": "'.$data['predicate'].'"'.$pwr_params.'}'; + $description = isset($this->td_descriptions['constructors'][$data['predicate']]) ? $this->td_descriptions['constructors'][$data['predicate']]['description'] : ($constructor.' attributes, type and example'); + $header = '--- +title: '.$data['predicate'].' +description: '.$description.' +--- +## Constructor: '.str_replace('_', '\_', $data['predicate'].$layer).' +[Back to constructors index](index.md) + + + +'; + $table .= ' + + +'; + if (isset($this->td_descriptions['constructors'][$data['predicate']])) { + $header .= $this->td_descriptions['constructors'][$data['predicate']]['description'].PHP_EOL.PHP_EOL; + } + $type = '### Type: ['.str_replace('_', '\_', $php_type).'](../types/'.$php_type.'.md) + + +'; + $example = '### Example: + +``` +$'.$constructor.$layer.' = '.$params.'; +``` + +[PWRTelegram](https://pwrtelegram.xyz) json-encoded version: + +``` +'.$pwr_params.' +``` + + +Or, if you\'re into Lua: + + +``` +'.$constructor.$layer.'='.$lua_params.' + +``` + + +'; + + if ($hasreplymarkup) { + $example .= ' +## Usage of reply_markup + +You can provide bot API reply_markup objects here. + + +'; + } + if ($hasentities) { + $example .= ' +## Usage of parse_mode: + +Set parse_mode to html to enable HTML parsing of the message. + +Set parse_mode to Markdown to enable markown AND html parsing of the message. + +The following tags are currently supported: + +``` +
a newline +bold works ok, internal tags are stripped +bold +italic +italic +inline fixed-width code +
pre-formatted fixed-width code block
+URL +Mention by username +Mention by user id +
Pre tags can have a language attribute
+``` + +You can also use normal markdown, note that to create mentions you must use the `mention:` syntax like in html: + +``` +[Mention by username](mention:@danogentili) +[Mention by user id](mention:186785362) +``` + +MadelineProto supports all html entities supported by [html_entity_decode](http://php.net/manual/en/function.html-entity-decode.php). +'; + } + file_put_contents('constructors/'.$constructor.$layer.'.md', $header.$table.$type.$example); + } + \danog\MadelineProto\Logger::log(['Generating constructors index...'], \danog\MadelineProto\Logger::NOTICE); + ksort($this->docs_constructors); + $last_namespace = ''; + foreach ($this->docs_constructors as $constructor => &$value) { + $new_namespace = preg_replace('/_.*/', '', $constructor); + $br = $new_namespace != $last_namespace ? '*** +

' : ''; + $value = $br.$value; + $last_namespace = $new_namespace; + } + file_put_contents('constructors/'.$this->index, '--- +title: Constructors +description: List of constructors +--- +# Constructors +[Back to API documentation index](..) +'.implode('', $this->docs_constructors)); + } +} diff --git a/src/danog/MadelineProto/DocsBuilder/Methods.php b/src/danog/MadelineProto/DocsBuilder/Methods.php new file mode 100644 index 00000000..f10ddb49 --- /dev/null +++ b/src/danog/MadelineProto/DocsBuilder/Methods.php @@ -0,0 +1,296 @@ +. +*/ + +namespace danog\MadelineProto\DocsBuilder; + +trait Methods +{ + public function mk_methods() { + + foreach (glob($this->settings['output_dir'].'methods/'.$this->any) as $unlink) { + unlink($this->settings['output_dir'].$unlink); + } + + if (file_exists($this->settings['output_dir'].'methods')) { + rmdir($this->settings['output_dir'].'methods'); + } + + mkdir($this->settings['output_dir'].'methods'); + + $this->docs_methods = []; + + \danog\MadelineProto\Logger::log(['Generating methods documentation...'], \danog\MadelineProto\Logger::NOTICE); + foreach ($this->methods->by_id as $id => $data) { + $method = str_replace('.', '_', $data['method']); + $php_method = str_replace('.', '->', $data['method']); + $type = str_replace(['.', '<', '>'], ['_', '_of_', ''], $data['type']); + $php_type = preg_replace('/.*_of_/', '', $type); + if (!isset($this->types[$php_type])) { + $this->types[$php_type] = ['methods' => [], 'constructors' => []]; + } + if (!in_array($data, $this->types[$php_type]['methods'])) { + $this->types[$php_type]['methods'][] = $data; + } + + $params = ''; + foreach ($data['params'] as $param) { + if (in_array($param['name'], ['flags', 'random_id', 'random_bytes'])) { + continue; + } + if ($param['name'] === 'data' && $type === 'messages_SentEncryptedMessage') { + $param['name'] = 'message'; + $param['type'] = 'DecryptedMessage'; + } + if ($param['name'] === 'chat_id' && $data['method'] !== 'messages.discardEncryption') { + $param['type'] = 'InputPeer'; + } + $type_or_subtype = isset($param['subtype']) ? 'subtype' : 'type'; + $type_or_bare_type = (ctype_upper($this->end(explode('.', $param[$type_or_subtype]))[0]) || in_array($param[$type_or_subtype], ['!X', 'X', 'bytes', 'true', 'false', 'double', 'string', 'Bool', 'int', 'long', 'int128', 'int256', 'int512'])) ? 'types' : 'constructors'; + $param[$type_or_subtype] = str_replace(['.', 'true', 'false'], ['_', 'Bool', 'Bool'], $param[$type_or_subtype]); + + $param[$type_or_subtype] = '['.$this->escape($param[$type_or_subtype]).'](../'.$type_or_bare_type.'/'.$param[$type_or_subtype].'.md)'; + + $params .= "'".$param['name']."' => ".(isset($param['subtype']) ? '\['.$param[$type_or_subtype].'\]' : $param[$type_or_subtype]).', '; + } + $md_method = '['.$php_method.']('.$method.'.md)'; + + $this->docs_methods[$method] = '$MadelineProto->'.$md_method.'(\['.$params.'\]) === [$'.str_replace('_', '\_', $type).'](../types/'.$php_type.'.md) + +'; + + $params = ''; + $lua_params = ''; + $pwr_params = ''; + $json_params = ''; + $table = empty($data['params']) ? '' : '### Parameters: + +| Name | Type | Required | +|----------|:-------------:|---------:| +'; + if (isset($this->td_descriptions['methods'][$data['method']])) { + $table = '### Params: + +| Name | Type | Required | Description | +|----------|:-------------:|:--------:|------------:| +'; + } + + $hasentities = false; + $hasreplymarkup = false; + $hasmessage = false; + foreach ($data['params'] as $param) { + if (in_array($param['name'], ['flags', 'random_id', 'random_bytes'])) { + continue; + } + if ($param['name'] === 'data' && $type === 'messages_SentEncryptedMessage') { + $param['name'] = 'message'; + $param['type'] = 'DecryptedMessage'; + } + if ($param['name'] === 'chat_id' && $data['method'] !== 'messages.discardEncryption') { + $param['type'] = 'InputPeer'; + } + + $ptype = str_replace('.', '_', $param[isset($param['subtype']) ? 'subtype' : 'type']); + switch ($ptype) { + case 'true': + case 'false': + $ptype = 'Bool'; + } + $table .= '|'.str_replace('_', '\_', $param['name']).'|'.(isset($param['subtype']) ? 'Array of ' : '').'['.str_replace('_', '\_', $ptype).'](../types/'.$ptype.'.md) | '.(isset($param['pow']) ? 'Optional' : 'Yes').'|'; + if (isset($this->td_descriptions['methods'][$data['method']])) { + $table .= $this->td_descriptions['methods'][$data['method']]['params'][$param['name']].'|'; + } + $table .= PHP_EOL; + + $pptype = in_array($ptype, ['string', 'bytes']) ? "'".$ptype."'" : $ptype; + $ppptype = in_array($ptype, ['string', 'bytes']) ? '"'.$ptype.'"' : $ptype; + + $params .= "'".$param['name']."' => "; + $params .= (isset($param['subtype']) ? '['.$pptype.']' : $pptype).', '; + $json_params .= '"'.$param['name'].'": '.(isset($param['subtype']) ? '['.$ppptype.']' : $ppptype).', '; + $pwr_params .= $param['name'].' - Json encoded '.(isset($param['subtype']) ? ' array of '.$ptype : $ptype)."\n"; + $lua_params .= $param['name'].'='; + $lua_params .= (isset($param['subtype']) ? '{'.$pptype.'}' : $pptype).', '; + if ($param['name'] === 'reply_markup') { + $hasreplymarkup = true; + } + if ($param['name'] === 'message') { + $hasmessage = true; + } + if ($param['name'] === 'entities') { + $hasentities = true; + $table .= '|parse\_mode| [string](../types/string.md) | Optional | +'; + $params .= "'parse_mode' => 'string', "; + $lua_params .= "parse_mode='string', "; + $json_params .= '"parse_mode": "string"'; + $pwr_params = "parse_mode - string\n"; + } + } + $description = isset($this->td_descriptions['methods'][$data['method']]) ? $this->td_descriptions['methods'][$data['method']]['description'] : ($data['method'].' parameters, return type and example'); + $header = '--- +title: '.$data['method'].' +description: '.$description.' +--- +## Method: '.str_replace('_', '\_', $data['method']).' +[Back to methods index](index.md) + + +'; + if (isset(\danog\MadelineProto\MTProto::DISALLOWED_METHODS[$data['method']])) { + $header .= '**'.\danog\MadelineProto\MTProto::DISALLOWED_METHODS[$data['method']]."**\n\n\n\n\n"; + file_put_contents('methods/'.$method.'.md', $header); + continue; + } + if ($this->td) { + $header .= 'YOU CANNOT USE THIS METHOD IN MADELINEPROTO + + +'; + } + $header .= isset($this->td_descriptions['methods'][$data['method']]) ? $this->td_descriptions['methods'][$data['method']]['description'].PHP_EOL.PHP_EOL : ''; + $table .= ' + +'; + $return = '### Return type: ['.str_replace('_', '\_', $type).'](../types/'.$php_type.'.md) + +'; + $example = str_replace('[]', '', '### Example: + + +``` +$MadelineProto = new \danog\MadelineProto\API(); +if (isset($token)) { // Login as a bot + $MadelineProto->bot_login($token); +} +if (isset($number)) { // Login as a user + $sentCode = $MadelineProto->phone_login($number); + echo \'Enter the code you received: \'; + $code = \'\'; + for ($x = 0; $x < $sentCode[\'type\'][\'length\']; $x++) { + $code .= fgetc(STDIN); + } + $MadelineProto->complete_phone_login($code); +} + +$'.$type.' = $MadelineProto->'.$php_method.'(['.$params.']); +``` + +Or, if you\'re using the [PWRTelegram HTTP API](https://pwrtelegram.xyz): + +### As a bot: + +POST/GET to `https://api.pwrtelegram.xyz/botTOKEN/madeline` + +Parameters: + +* method - '.$data['method'].' +* params - `{'.$json_params.'}` + + + +### As a user: + +POST/GET to `https://api.pwrtelegram.xyz/userTOKEN/'.$data['method'].'` + +Parameters: + +'.$pwr_params.' + + +Or, if you\'re into Lua: + +``` +'.$type.' = '.$data['method'].'({'.$lua_params.'}) +``` + +'); + if ($hasreplymarkup) { + $example .= ' +## Usage of reply_markup + +You can provide bot API reply_markup objects here. + + +'; + } + if ($hasmessage) { + $example .= ' +## Return value + +If the length of the provided message is bigger than 4096, the message will be split in chunks and the method will be called multiple times, with the same parameters (except for the message), and an array of ['.str_replace('_', '\_', $type).'](../types/'.$php_type.'.md) will be returned instead. + + +'; + } + if ($hasentities) { + $example .= ' +## Usage of parse_mode: + +Set parse_mode to html to enable HTML parsing of the message. + +Set parse_mode to Markdown to enable markown AND html parsing of the message. + +The following tags are currently supported: + +``` +
a newline +bold works ok, internal tags are stripped +bold +italic +italic +inline fixed-width code +
pre-formatted fixed-width code block
+URL +Mention by username +Mention by user id +
Pre tags can have a language attribute
+``` + +You can also use normal markdown, note that to create mentions you must use the `mention:` syntax like in html: + +``` +[Mention by username](mention:@danogentili) +[Mention by user id](mention:186785362) +``` + +MadelineProto supports all html entities supported by [html_entity_decode](http://php.net/manual/en/function.html-entity-decode.php). +'; + } + file_put_contents('methods/'.$method.'.md', $header.$table.$return.$example); + } + + \danog\MadelineProto\Logger::log(['Generating methods index...'], \danog\MadelineProto\Logger::NOTICE); + + ksort($this->docs_methods); + $last_namespace = ''; + foreach ($this->docs_methods as $method => &$value) { + $new_namespace = preg_replace('/_.*/', '', $method); + $br = $new_namespace != $last_namespace ? '*** +

' : ''; + $value = $br.$value; + $last_namespace = $new_namespace; + } + + file_put_contents('methods/'.$this->index, '--- +title: Methods +description: List of methods +--- +# Methods +[Back to API documentation index](..) + + + +'.implode('', $this->docs_methods)); + + } +} diff --git a/src/danog/MadelineProto/Lua.php b/src/danog/MadelineProto/Lua.php index a7535152..ec305d2f 100644 --- a/src/danog/MadelineProto/Lua.php +++ b/src/danog/MadelineProto/Lua.php @@ -41,7 +41,6 @@ class Lua $this->madelineproto_lua = 1; $this->Lua->registerCallback('tdcli_function', [$this, 'tdcli_function']); $this->Lua->registerCallback('madeline_function', [$this, 'madeline_function']); - $this->Lua->registerCallback('var_dump', 'var_dump'); foreach (get_class_methods($this->MadelineProto->API) as $method) { $this->Lua->registerCallback($method, [$this->MadelineProto->API, $method]); } diff --git a/src/danog/MadelineProto/MTProtoTools/CallHandler.php b/src/danog/MadelineProto/MTProtoTools/CallHandler.php index 0e1504b6..f891abe1 100644 --- a/src/danog/MadelineProto/MTProtoTools/CallHandler.php +++ b/src/danog/MadelineProto/MTProtoTools/CallHandler.php @@ -28,6 +28,9 @@ trait CallHandler if (!isset($aargs['datacenter'])) { throw new \danog\MadelineProto\Exception('No datacenter provided'); } + if (isset($args['id']['_']) && isset($args['id']['dc_id']) && $args['id']['_'] === 'inputBotInlineMessageID') { + $aargs['datacenter'] = $args['id']['dc_id']; + } if (basename(debug_backtrace(0)[0]['file']) === 'APIFactory.php' && isset(self::DISALLOWED_METHODS[$method])) { if ($method === 'channels.getParticipants' && isset($args['filter']) && $args['filter'] === ['_' => 'channelParticipantsRecent']) { \danog\MadelineProto\Logger::log([self::DISALLOWED_METHODS[$method]], \danog\MadelineProto\Logger::FATAL_ERROR); diff --git a/src/danog/MadelineProto/TL/TL.php b/src/danog/MadelineProto/TL/TL.php index 1bacd70a..211ade1a 100644 --- a/src/danog/MadelineProto/TL/TL.php +++ b/src/danog/MadelineProto/TL/TL.php @@ -14,12 +14,12 @@ namespace danog\MadelineProto\TL; trait TL { - private $encrypted_layer = -1; - private $constructors; - private $methods; - private $td_constructors; - private $td_methods; - private $td_descriptions; + public $encrypted_layer = -1; + public $constructors; + public $methods; + public $td_constructors; + public $td_methods; + public $td_descriptions; public function construct_tl($files) { @@ -190,8 +190,8 @@ trait TL } } if (isset($files['td']) && isset($files['telegram'])) { - foreach ($this->td_constructors->id as $key => $id) { - $name = $this->td_constructors->predicate[$key]; + foreach ($this->td_constructors->by_id as $id => $data) { + $name = $data['predicate']; if ($this->constructors->find_by_id($id) === false) { unset($this->td_descriptions['constructors'][$name]); } else { @@ -203,8 +203,8 @@ trait TL } } } - foreach ($this->td_methods->id as $key => $id) { - $name = $this->td_methods->method[$key]; + foreach ($this->td_methods->by_id as $id => $data) { + $name = $data['method']; if ($this->methods->find_by_id($id) === false) { unset($this->td_descriptions['methods'][$name]); } else {