From 917e52a2f356d28bb3c6d917dd58fd0cf5a25dd4 Mon Sep 17 00:00:00 2001 From: Daniil Gentili Date: Mon, 11 Dec 2017 12:12:38 +0100 Subject: [PATCH] Docufix --- docs/API_docs/methods/account_changePhone.md | 9 +++------ docs/API_docs/methods/account_checkUsername.md | 9 +++------ docs/API_docs/methods/account_confirmPhone.md | 9 +++------ docs/API_docs/methods/account_deleteAccount.md | 9 +++------ docs/API_docs/methods/account_getAccountTTL.md | 9 +++------ docs/API_docs/methods/account_getAuthorizations.md | 9 +++------ docs/API_docs/methods/account_getNotifySettings.md | 9 +++------ docs/API_docs/methods/account_getPassword.md | 9 +++------ docs/API_docs/methods/account_getPasswordSettings.md | 9 +++------ docs/API_docs/methods/account_getPrivacy.md | 9 +++------ docs/API_docs/methods/account_getTmpPassword.md | 9 +++------ docs/API_docs/methods/account_getWallPapers.md | 9 +++------ docs/API_docs/methods/account_registerDevice.md | 9 +++------ docs/API_docs/methods/account_reportPeer.md | 9 +++------ docs/API_docs/methods/account_resetAuthorization.md | 9 +++------ docs/API_docs/methods/account_resetNotifySettings.md | 9 +++------ docs/API_docs/methods/account_sendChangePhoneCode.md | 9 +++------ docs/API_docs/methods/account_sendConfirmPhoneCode.md | 9 +++------ docs/API_docs/methods/account_setAccountTTL.md | 9 +++------ docs/API_docs/methods/account_setPrivacy.md | 9 +++------ docs/API_docs/methods/account_unregisterDevice.md | 9 +++------ docs/API_docs/methods/account_updateDeviceLocked.md | 9 +++------ docs/API_docs/methods/account_updateNotifySettings.md | 9 +++------ docs/API_docs/methods/account_updatePasswordSettings.md | 9 +++------ docs/API_docs/methods/account_updateProfile.md | 9 +++------ docs/API_docs/methods/account_updateStatus.md | 9 +++------ docs/API_docs/methods/account_updateUsername.md | 9 +++------ docs/API_docs/methods/auth_bindTempAuthKey.md | 9 +++------ docs/API_docs/methods/auth_cancelCode.md | 9 +++------ docs/API_docs/methods/auth_checkPassword.md | 9 +++------ docs/API_docs/methods/auth_checkPhone.md | 9 +++------ docs/API_docs/methods/auth_dropTempAuthKeys.md | 9 +++------ docs/API_docs/methods/auth_exportAuthorization.md | 9 +++------ docs/API_docs/methods/auth_importAuthorization.md | 9 +++------ docs/API_docs/methods/auth_recoverPassword.md | 9 +++------ docs/API_docs/methods/auth_requestPasswordRecovery.md | 9 +++------ docs/API_docs/methods/auth_resendCode.md | 9 +++------ docs/API_docs/methods/auth_resetAuthorizations.md | 9 +++------ docs/API_docs/methods/auth_sendInvites.md | 9 +++------ docs/API_docs/methods/bots_answerWebhookJSONQuery.md | 9 +++------ docs/API_docs/methods/bots_sendCustomRequest.md | 9 +++------ docs/API_docs/methods/channels_checkUsername.md | 9 +++------ docs/API_docs/methods/channels_createChannel.md | 9 +++------ docs/API_docs/methods/channels_deleteChannel.md | 9 +++------ docs/API_docs/methods/channels_deleteHistory.md | 9 +++------ docs/API_docs/methods/channels_deleteMessages.md | 9 +++------ docs/API_docs/methods/channels_deleteUserHistory.md | 9 +++------ docs/API_docs/methods/channels_editAbout.md | 9 +++------ docs/API_docs/methods/channels_editAdmin.md | 9 +++------ docs/API_docs/methods/channels_editBanned.md | 9 +++------ docs/API_docs/methods/channels_editPhoto.md | 9 +++------ docs/API_docs/methods/channels_editTitle.md | 9 +++------ docs/API_docs/methods/channels_exportInvite.md | 9 +++------ docs/API_docs/methods/channels_exportMessageLink.md | 9 +++------ docs/API_docs/methods/channels_getAdminLog.md | 9 +++------ .../methods/channels_getAdminedPublicChannels.md | 9 +++------ docs/API_docs/methods/channels_getChannels.md | 9 +++------ docs/API_docs/methods/channels_getMessages.md | 9 +++------ docs/API_docs/methods/channels_getParticipant.md | 9 +++------ docs/API_docs/methods/channels_inviteToChannel.md | 9 +++------ docs/API_docs/methods/channels_joinChannel.md | 9 +++------ docs/API_docs/methods/channels_leaveChannel.md | 9 +++------ docs/API_docs/methods/channels_readHistory.md | 9 +++------ docs/API_docs/methods/channels_readMessageContents.md | 9 +++------ docs/API_docs/methods/channels_reportSpam.md | 9 +++------ docs/API_docs/methods/channels_setStickers.md | 9 +++------ docs/API_docs/methods/channels_toggleInvites.md | 9 +++------ docs/API_docs/methods/channels_togglePreHistoryHidden.md | 9 +++------ docs/API_docs/methods/channels_toggleSignatures.md | 9 +++------ docs/API_docs/methods/channels_updatePinnedMessage.md | 9 +++------ docs/API_docs/methods/channels_updateUsername.md | 9 +++------ docs/API_docs/methods/contacts_block.md | 9 +++------ docs/API_docs/methods/contacts_deleteContact.md | 9 +++------ docs/API_docs/methods/contacts_deleteContacts.md | 9 +++------ docs/API_docs/methods/contacts_exportCard.md | 9 +++------ docs/API_docs/methods/contacts_getBlocked.md | 9 +++------ docs/API_docs/methods/contacts_getContacts.md | 9 +++------ docs/API_docs/methods/contacts_getStatuses.md | 9 +++------ docs/API_docs/methods/contacts_getTopPeers.md | 9 +++------ docs/API_docs/methods/contacts_importCard.md | 9 +++------ docs/API_docs/methods/contacts_importContacts.md | 9 +++------ docs/API_docs/methods/contacts_resetSaved.md | 9 +++------ docs/API_docs/methods/contacts_resetTopPeerRating.md | 9 +++------ docs/API_docs/methods/contacts_search.md | 9 +++------ docs/API_docs/methods/contacts_unblock.md | 9 +++------ docs/API_docs/methods/help_getAppChangelog.md | 9 +++------ docs/API_docs/methods/help_getAppUpdate.md | 9 +++------ docs/API_docs/methods/help_getCdnConfig.md | 9 +++------ docs/API_docs/methods/help_getConfig.md | 9 +++------ docs/API_docs/methods/help_getInviteText.md | 9 +++------ docs/API_docs/methods/help_getNearestDc.md | 9 +++------ docs/API_docs/methods/help_getRecentMeUrls.md | 9 +++------ docs/API_docs/methods/help_getSupport.md | 9 +++------ docs/API_docs/methods/help_getTermsOfService.md | 9 +++------ docs/API_docs/methods/help_saveAppLog.md | 9 +++------ docs/API_docs/methods/help_setBotUpdatesStatus.md | 9 +++------ docs/API_docs/methods/initConnection.md | 9 +++------ docs/API_docs/methods/invokeAfterMsg.md | 9 +++------ docs/API_docs/methods/invokeAfterMsgs.md | 9 +++------ docs/API_docs/methods/invokeWithLayer.md | 9 +++------ docs/API_docs/methods/invokeWithoutUpdates.md | 9 +++------ docs/API_docs/methods/langpack_getDifference.md | 9 +++------ docs/API_docs/methods/langpack_getLangPack.md | 9 +++------ docs/API_docs/methods/langpack_getLanguages.md | 9 +++------ docs/API_docs/methods/langpack_getStrings.md | 9 +++------ docs/API_docs/methods/messages_addChatUser.md | 9 +++------ docs/API_docs/methods/messages_checkChatInvite.md | 9 +++------ docs/API_docs/methods/messages_clearRecentStickers.md | 9 +++------ docs/API_docs/methods/messages_createChat.md | 9 +++------ docs/API_docs/methods/messages_deleteChatUser.md | 9 +++------ docs/API_docs/methods/messages_deleteHistory.md | 9 +++------ docs/API_docs/methods/messages_deleteMessages.md | 9 +++------ docs/API_docs/methods/messages_editChatAdmin.md | 9 +++------ docs/API_docs/methods/messages_editChatPhoto.md | 9 +++------ docs/API_docs/methods/messages_editChatTitle.md | 9 +++------ docs/API_docs/methods/messages_editInlineBotMessage.md | 9 +++------ docs/API_docs/methods/messages_editMessage.md | 9 +++------ docs/API_docs/methods/messages_exportChatInvite.md | 9 +++------ docs/API_docs/methods/messages_faveSticker.md | 9 +++------ docs/API_docs/methods/messages_forwardMessage.md | 9 +++------ docs/API_docs/methods/messages_forwardMessages.md | 9 +++------ docs/API_docs/methods/messages_getAllChats.md | 9 +++------ docs/API_docs/methods/messages_getAllDrafts.md | 9 +++------ docs/API_docs/methods/messages_getAllStickers.md | 9 +++------ docs/API_docs/methods/messages_getArchivedStickers.md | 9 +++------ docs/API_docs/methods/messages_getAttachedStickers.md | 9 +++------ docs/API_docs/methods/messages_getBotCallbackAnswer.md | 9 +++------ docs/API_docs/methods/messages_getChats.md | 9 +++------ docs/API_docs/methods/messages_getCommonChats.md | 9 +++------ docs/API_docs/methods/messages_getDhConfig.md | 9 +++------ docs/API_docs/methods/messages_getDialogs.md | 9 +++------ docs/API_docs/methods/messages_getDocumentByHash.md | 9 +++------ docs/API_docs/methods/messages_getFavedStickers.md | 9 +++------ docs/API_docs/methods/messages_getFeaturedStickers.md | 9 +++------ docs/API_docs/methods/messages_getGameHighScores.md | 9 +++------ docs/API_docs/methods/messages_getHistory.md | 9 +++------ docs/API_docs/methods/messages_getInlineBotResults.md | 9 +++------ .../API_docs/methods/messages_getInlineGameHighScores.md | 9 +++------ docs/API_docs/methods/messages_getMaskStickers.md | 9 +++------ docs/API_docs/methods/messages_getMessageEditData.md | 9 +++------ docs/API_docs/methods/messages_getMessages.md | 9 +++------ docs/API_docs/methods/messages_getMessagesViews.md | 9 +++------ docs/API_docs/methods/messages_getPeerDialogs.md | 9 +++------ docs/API_docs/methods/messages_getPeerSettings.md | 9 +++------ docs/API_docs/methods/messages_getPinnedDialogs.md | 9 +++------ docs/API_docs/methods/messages_getRecentLocations.md | 9 +++------ docs/API_docs/methods/messages_getRecentStickers.md | 9 +++------ docs/API_docs/methods/messages_getSavedGifs.md | 9 +++------ docs/API_docs/methods/messages_getStickerSet.md | 9 +++------ docs/API_docs/methods/messages_getUnreadMentions.md | 9 +++------ docs/API_docs/methods/messages_getWebPage.md | 9 +++------ docs/API_docs/methods/messages_getWebPagePreview.md | 9 +++------ docs/API_docs/methods/messages_hideReportSpam.md | 9 +++------ docs/API_docs/methods/messages_importChatInvite.md | 9 +++------ docs/API_docs/methods/messages_installStickerSet.md | 9 +++------ docs/API_docs/methods/messages_migrateChat.md | 9 +++------ docs/API_docs/methods/messages_readEncryptedHistory.md | 9 +++------ docs/API_docs/methods/messages_readFeaturedStickers.md | 9 +++------ docs/API_docs/methods/messages_readHistory.md | 9 +++------ docs/API_docs/methods/messages_readMentions.md | 9 +++------ docs/API_docs/methods/messages_readMessageContents.md | 9 +++------ docs/API_docs/methods/messages_receivedMessages.md | 9 +++------ docs/API_docs/methods/messages_receivedQueue.md | 9 +++------ docs/API_docs/methods/messages_reorderPinnedDialogs.md | 9 +++------ docs/API_docs/methods/messages_reorderStickerSets.md | 9 +++------ docs/API_docs/methods/messages_reportEncryptedSpam.md | 9 +++------ docs/API_docs/methods/messages_reportSpam.md | 9 +++------ docs/API_docs/methods/messages_saveDraft.md | 9 +++------ docs/API_docs/methods/messages_saveGif.md | 9 +++------ docs/API_docs/methods/messages_saveRecentSticker.md | 9 +++------ docs/API_docs/methods/messages_search.md | 9 +++------ docs/API_docs/methods/messages_searchGifs.md | 9 +++------ docs/API_docs/methods/messages_searchGlobal.md | 9 +++------ docs/API_docs/methods/messages_sendEncrypted.md | 9 +++------ docs/API_docs/methods/messages_sendEncryptedFile.md | 9 +++------ docs/API_docs/methods/messages_sendEncryptedService.md | 9 +++------ docs/API_docs/methods/messages_sendInlineBotResult.md | 9 +++------ docs/API_docs/methods/messages_sendMedia.md | 9 +++------ docs/API_docs/methods/messages_sendMessage.md | 9 +++------ docs/API_docs/methods/messages_sendMultiMedia.md | 9 +++------ .../methods/messages_sendScreenshotNotification.md | 9 +++------ docs/API_docs/methods/messages_setBotCallbackAnswer.md | 9 +++------ .../methods/messages_setBotPrecheckoutResults.md | 9 +++------ docs/API_docs/methods/messages_setBotShippingResults.md | 9 +++------ docs/API_docs/methods/messages_setEncryptedTyping.md | 9 +++------ docs/API_docs/methods/messages_setGameScore.md | 9 +++------ docs/API_docs/methods/messages_setInlineBotResults.md | 9 +++------ docs/API_docs/methods/messages_setInlineGameScore.md | 9 +++------ docs/API_docs/methods/messages_setTyping.md | 9 +++------ docs/API_docs/methods/messages_startBot.md | 9 +++------ docs/API_docs/methods/messages_toggleChatAdmins.md | 9 +++------ docs/API_docs/methods/messages_toggleDialogPin.md | 9 +++------ docs/API_docs/methods/messages_uninstallStickerSet.md | 9 +++------ docs/API_docs/methods/messages_uploadEncryptedFile.md | 9 +++------ docs/API_docs/methods/messages_uploadMedia.md | 9 +++------ docs/API_docs/methods/payments_clearSavedInfo.md | 9 +++------ docs/API_docs/methods/payments_getPaymentForm.md | 9 +++------ docs/API_docs/methods/payments_getPaymentReceipt.md | 9 +++------ docs/API_docs/methods/payments_getSavedInfo.md | 9 +++------ docs/API_docs/methods/payments_sendPaymentForm.md | 9 +++------ docs/API_docs/methods/payments_validateRequestedInfo.md | 9 +++------ docs/API_docs/methods/phone_getCallConfig.md | 9 +++------ docs/API_docs/methods/phone_receivedCall.md | 9 +++------ docs/API_docs/methods/phone_saveCallDebug.md | 9 +++------ docs/API_docs/methods/phone_setCallRating.md | 9 +++------ docs/API_docs/methods/photos_deletePhotos.md | 9 +++------ docs/API_docs/methods/photos_getUserPhotos.md | 9 +++------ docs/API_docs/methods/photos_updateProfilePhoto.md | 9 +++------ docs/API_docs/methods/photos_uploadProfilePhoto.md | 9 +++------ docs/API_docs/methods/stickers_addStickerToSet.md | 9 +++------ docs/API_docs/methods/stickers_changeStickerPosition.md | 9 +++------ docs/API_docs/methods/stickers_createStickerSet.md | 9 +++------ docs/API_docs/methods/stickers_removeStickerFromSet.md | 9 +++------ docs/API_docs/methods/upload_getWebFile.md | 9 +++------ docs/API_docs/methods/users_getUsers.md | 9 +++------ docs/MTProto_docs/methods/destroy_session.md | 9 +++------ docs/MTProto_docs/methods/get_future_salts.md | 9 +++------ docs/MTProto_docs/methods/http_wait.md | 9 +++------ docs/MTProto_docs/methods/ping.md | 9 +++------ docs/MTProto_docs/methods/ping_delay_disconnect.md | 9 +++------ docs/MTProto_docs/methods/req_DH_params.md | 9 +++------ docs/MTProto_docs/methods/req_pq.md | 9 +++------ docs/MTProto_docs/methods/rpc_drop_answer.md | 9 +++------ docs/MTProto_docs/methods/set_client_DH_params.md | 9 +++------ old_docs/API_docs_v18/methods/account_checkUsername.md | 9 +++------ .../API_docs_v18/methods/account_getNotifySettings.md | 9 +++------ old_docs/API_docs_v18/methods/account_getWallPapers.md | 9 +++------ old_docs/API_docs_v18/methods/account_registerDevice.md | 9 +++------ .../API_docs_v18/methods/account_resetNotifySettings.md | 9 +++------ .../API_docs_v18/methods/account_unregisterDevice.md | 9 +++------ .../API_docs_v18/methods/account_updateNotifySettings.md | 9 +++------ old_docs/API_docs_v18/methods/account_updateProfile.md | 9 +++------ old_docs/API_docs_v18/methods/account_updateStatus.md | 9 +++------ old_docs/API_docs_v18/methods/account_updateUsername.md | 9 +++------ old_docs/API_docs_v18/methods/auth_bindTempAuthKey.md | 9 +++------ old_docs/API_docs_v18/methods/auth_checkPhone.md | 9 +++------ .../API_docs_v18/methods/auth_exportAuthorization.md | 9 +++------ .../API_docs_v18/methods/auth_importAuthorization.md | 9 +++------ .../API_docs_v18/methods/auth_resetAuthorizations.md | 9 +++------ old_docs/API_docs_v18/methods/auth_sendCall.md | 9 +++------ old_docs/API_docs_v18/methods/auth_sendInvites.md | 9 +++------ old_docs/API_docs_v18/methods/auth_sendSms.md | 9 +++------ old_docs/API_docs_v18/methods/contacts_block.md | 9 +++------ old_docs/API_docs_v18/methods/contacts_deleteContact.md | 9 +++------ old_docs/API_docs_v18/methods/contacts_deleteContacts.md | 9 +++------ old_docs/API_docs_v18/methods/contacts_exportCard.md | 9 +++------ old_docs/API_docs_v18/methods/contacts_getBlocked.md | 9 +++------ old_docs/API_docs_v18/methods/contacts_getContacts.md | 9 +++------ old_docs/API_docs_v18/methods/contacts_getStatuses.md | 9 +++------ old_docs/API_docs_v18/methods/contacts_getSuggested.md | 9 +++------ old_docs/API_docs_v18/methods/contacts_importCard.md | 9 +++------ old_docs/API_docs_v18/methods/contacts_importContacts.md | 9 +++------ old_docs/API_docs_v18/methods/contacts_search.md | 9 +++------ old_docs/API_docs_v18/methods/contacts_unblock.md | 9 +++------ old_docs/API_docs_v18/methods/help_getAppUpdate.md | 9 +++------ old_docs/API_docs_v18/methods/help_getConfig.md | 9 +++------ old_docs/API_docs_v18/methods/help_getInviteText.md | 9 +++------ old_docs/API_docs_v18/methods/help_getNearestDc.md | 9 +++------ old_docs/API_docs_v18/methods/help_getSupport.md | 9 +++------ old_docs/API_docs_v18/methods/help_saveAppLog.md | 9 +++------ old_docs/API_docs_v18/methods/initConnection.md | 9 +++------ old_docs/API_docs_v18/methods/invokeAfterMsg.md | 9 +++------ old_docs/API_docs_v18/methods/invokeAfterMsgs.md | 9 +++------ old_docs/API_docs_v18/methods/invokeWithLayer18.md | 9 +++------ old_docs/API_docs_v18/methods/messages_addChatUser.md | 9 +++------ old_docs/API_docs_v18/methods/messages_createChat.md | 9 +++------ old_docs/API_docs_v18/methods/messages_deleteChatUser.md | 9 +++------ old_docs/API_docs_v18/methods/messages_deleteHistory.md | 9 +++------ old_docs/API_docs_v18/methods/messages_deleteMessages.md | 9 +++------ old_docs/API_docs_v18/methods/messages_editChatPhoto.md | 9 +++------ old_docs/API_docs_v18/methods/messages_editChatTitle.md | 9 +++------ old_docs/API_docs_v18/methods/messages_forwardMessage.md | 9 +++------ .../API_docs_v18/methods/messages_forwardMessages.md | 9 +++------ old_docs/API_docs_v18/methods/messages_getChats.md | 9 +++------ old_docs/API_docs_v18/methods/messages_getDhConfig.md | 9 +++------ old_docs/API_docs_v18/methods/messages_getDialogs.md | 9 +++------ old_docs/API_docs_v18/methods/messages_getHistory.md | 9 +++------ old_docs/API_docs_v18/methods/messages_getMessages.md | 9 +++------ .../methods/messages_readEncryptedHistory.md | 9 +++------ old_docs/API_docs_v18/methods/messages_readHistory.md | 9 +++------ .../API_docs_v18/methods/messages_readMessageContents.md | 9 +++------ .../API_docs_v18/methods/messages_receivedMessages.md | 9 +++------ old_docs/API_docs_v18/methods/messages_receivedQueue.md | 9 +++------ old_docs/API_docs_v18/methods/messages_reportSpam.md | 9 +++------ old_docs/API_docs_v18/methods/messages_search.md | 9 +++------ old_docs/API_docs_v18/methods/messages_sendBroadcast.md | 9 +++------ old_docs/API_docs_v18/methods/messages_sendEncrypted.md | 9 +++------ .../API_docs_v18/methods/messages_sendEncryptedFile.md | 9 +++------ .../methods/messages_sendEncryptedService.md | 9 +++------ old_docs/API_docs_v18/methods/messages_sendMedia.md | 9 +++------ old_docs/API_docs_v18/methods/messages_sendMessage.md | 9 +++------ .../API_docs_v18/methods/messages_setEncryptedTyping.md | 9 +++------ old_docs/API_docs_v18/methods/messages_setTyping.md | 9 +++------ old_docs/API_docs_v18/methods/photos_deletePhotos.md | 9 +++------ old_docs/API_docs_v18/methods/photos_getUserPhotos.md | 9 +++------ .../API_docs_v18/methods/photos_updateProfilePhoto.md | 9 +++------ .../API_docs_v18/methods/photos_uploadProfilePhoto.md | 9 +++------ old_docs/API_docs_v18/methods/users_getUsers.md | 9 +++------ old_docs/API_docs_v23/methods/account_changePhone.md | 9 +++------ old_docs/API_docs_v23/methods/account_checkUsername.md | 9 +++------ old_docs/API_docs_v23/methods/account_deleteAccount.md | 9 +++------ old_docs/API_docs_v23/methods/account_getAccountTTL.md | 9 +++------ .../API_docs_v23/methods/account_getNotifySettings.md | 9 +++------ old_docs/API_docs_v23/methods/account_getPrivacy.md | 9 +++------ old_docs/API_docs_v23/methods/account_getWallPapers.md | 9 +++------ old_docs/API_docs_v23/methods/account_registerDevice.md | 9 +++------ old_docs/API_docs_v23/methods/account_reportPeer.md | 9 +++------ .../API_docs_v23/methods/account_resetNotifySettings.md | 9 +++------ .../API_docs_v23/methods/account_sendChangePhoneCode.md | 9 +++------ old_docs/API_docs_v23/methods/account_setAccountTTL.md | 9 +++------ old_docs/API_docs_v23/methods/account_setPrivacy.md | 9 +++------ .../API_docs_v23/methods/account_unregisterDevice.md | 9 +++------ .../API_docs_v23/methods/account_updateDeviceLocked.md | 9 +++------ .../API_docs_v23/methods/account_updateNotifySettings.md | 9 +++------ old_docs/API_docs_v23/methods/account_updateProfile.md | 9 +++------ old_docs/API_docs_v23/methods/account_updateStatus.md | 9 +++------ old_docs/API_docs_v23/methods/account_updateUsername.md | 9 +++------ old_docs/API_docs_v23/methods/auth_bindTempAuthKey.md | 9 +++------ old_docs/API_docs_v23/methods/auth_checkPhone.md | 9 +++------ .../API_docs_v23/methods/auth_exportAuthorization.md | 9 +++------ .../API_docs_v23/methods/auth_importAuthorization.md | 9 +++------ .../API_docs_v23/methods/auth_resetAuthorizations.md | 9 +++------ old_docs/API_docs_v23/methods/auth_sendCall.md | 9 +++------ old_docs/API_docs_v23/methods/auth_sendInvites.md | 9 +++------ old_docs/API_docs_v23/methods/auth_sendSms.md | 9 +++------ old_docs/API_docs_v23/methods/contacts_block.md | 9 +++------ old_docs/API_docs_v23/methods/contacts_deleteContact.md | 9 +++------ old_docs/API_docs_v23/methods/contacts_deleteContacts.md | 9 +++------ old_docs/API_docs_v23/methods/contacts_exportCard.md | 9 +++------ old_docs/API_docs_v23/methods/contacts_getBlocked.md | 9 +++------ old_docs/API_docs_v23/methods/contacts_getContacts.md | 9 +++------ old_docs/API_docs_v23/methods/contacts_getStatuses.md | 9 +++------ old_docs/API_docs_v23/methods/contacts_getSuggested.md | 9 +++------ old_docs/API_docs_v23/methods/contacts_importCard.md | 9 +++------ old_docs/API_docs_v23/methods/contacts_importContacts.md | 9 +++------ old_docs/API_docs_v23/methods/contacts_search.md | 9 +++------ old_docs/API_docs_v23/methods/contacts_unblock.md | 9 +++------ old_docs/API_docs_v23/methods/help_getAppUpdate.md | 9 +++------ old_docs/API_docs_v23/methods/help_getConfig.md | 9 +++------ old_docs/API_docs_v23/methods/help_getInviteText.md | 9 +++------ old_docs/API_docs_v23/methods/help_getNearestDc.md | 9 +++------ old_docs/API_docs_v23/methods/help_getSupport.md | 9 +++------ old_docs/API_docs_v23/methods/help_saveAppLog.md | 9 +++------ old_docs/API_docs_v23/methods/initConnection.md | 9 +++------ old_docs/API_docs_v23/methods/invokeAfterMsg.md | 9 +++------ old_docs/API_docs_v23/methods/invokeAfterMsgs.md | 9 +++------ old_docs/API_docs_v23/methods/invokeWithLayer.md | 9 +++------ old_docs/API_docs_v23/methods/messages_addChatUser.md | 9 +++------ old_docs/API_docs_v23/methods/messages_createChat.md | 9 +++------ old_docs/API_docs_v23/methods/messages_deleteChatUser.md | 9 +++------ old_docs/API_docs_v23/methods/messages_deleteHistory.md | 9 +++------ old_docs/API_docs_v23/methods/messages_deleteMessages.md | 9 +++------ old_docs/API_docs_v23/methods/messages_editChatPhoto.md | 9 +++------ old_docs/API_docs_v23/methods/messages_editChatTitle.md | 9 +++------ old_docs/API_docs_v23/methods/messages_forwardMessage.md | 9 +++------ .../API_docs_v23/methods/messages_forwardMessages.md | 9 +++------ old_docs/API_docs_v23/methods/messages_getAllStickers.md | 9 +++------ old_docs/API_docs_v23/methods/messages_getChats.md | 9 +++------ old_docs/API_docs_v23/methods/messages_getDhConfig.md | 9 +++------ old_docs/API_docs_v23/methods/messages_getDialogs.md | 9 +++------ old_docs/API_docs_v23/methods/messages_getHistory.md | 9 +++------ old_docs/API_docs_v23/methods/messages_getMessages.md | 9 +++------ old_docs/API_docs_v23/methods/messages_getStickers.md | 9 +++------ .../methods/messages_readEncryptedHistory.md | 9 +++------ old_docs/API_docs_v23/methods/messages_readHistory.md | 9 +++------ .../API_docs_v23/methods/messages_readMessageContents.md | 9 +++------ .../API_docs_v23/methods/messages_receivedMessages.md | 9 +++------ old_docs/API_docs_v23/methods/messages_receivedQueue.md | 9 +++------ old_docs/API_docs_v23/methods/messages_reportSpam.md | 9 +++------ old_docs/API_docs_v23/methods/messages_search.md | 9 +++------ old_docs/API_docs_v23/methods/messages_sendBroadcast.md | 9 +++------ old_docs/API_docs_v23/methods/messages_sendEncrypted.md | 9 +++------ .../API_docs_v23/methods/messages_sendEncryptedFile.md | 9 +++------ .../methods/messages_sendEncryptedService.md | 9 +++------ old_docs/API_docs_v23/methods/messages_sendMedia.md | 9 +++------ old_docs/API_docs_v23/methods/messages_sendMessage.md | 9 +++------ .../API_docs_v23/methods/messages_setEncryptedTyping.md | 9 +++------ old_docs/API_docs_v23/methods/messages_setTyping.md | 9 +++------ old_docs/API_docs_v23/methods/photos_deletePhotos.md | 9 +++------ old_docs/API_docs_v23/methods/photos_getUserPhotos.md | 9 +++------ .../API_docs_v23/methods/photos_updateProfilePhoto.md | 9 +++------ .../API_docs_v23/methods/photos_uploadProfilePhoto.md | 9 +++------ old_docs/API_docs_v23/methods/users_getUsers.md | 9 +++------ old_docs/API_docs_v25/methods/account_changePhone.md | 9 +++------ old_docs/API_docs_v25/methods/account_checkUsername.md | 9 +++------ old_docs/API_docs_v25/methods/account_deleteAccount.md | 9 +++------ old_docs/API_docs_v25/methods/account_getAccountTTL.md | 9 +++------ .../API_docs_v25/methods/account_getNotifySettings.md | 9 +++------ old_docs/API_docs_v25/methods/account_getPassword.md | 9 +++------ old_docs/API_docs_v25/methods/account_getPrivacy.md | 9 +++------ old_docs/API_docs_v25/methods/account_getWallPapers.md | 9 +++------ old_docs/API_docs_v25/methods/account_registerDevice.md | 9 +++------ .../API_docs_v25/methods/account_resetNotifySettings.md | 9 +++------ .../API_docs_v25/methods/account_sendChangePhoneCode.md | 9 +++------ old_docs/API_docs_v25/methods/account_setAccountTTL.md | 9 +++------ old_docs/API_docs_v25/methods/account_setPassword.md | 9 +++------ old_docs/API_docs_v25/methods/account_setPrivacy.md | 9 +++------ .../API_docs_v25/methods/account_unregisterDevice.md | 9 +++------ .../API_docs_v25/methods/account_updateDeviceLocked.md | 9 +++------ .../API_docs_v25/methods/account_updateNotifySettings.md | 9 +++------ old_docs/API_docs_v25/methods/account_updateProfile.md | 9 +++------ old_docs/API_docs_v25/methods/account_updateStatus.md | 9 +++------ old_docs/API_docs_v25/methods/account_updateUsername.md | 9 +++------ old_docs/API_docs_v25/methods/auth_bindTempAuthKey.md | 9 +++------ old_docs/API_docs_v25/methods/auth_checkPassword.md | 9 +++------ old_docs/API_docs_v25/methods/auth_checkPhone.md | 9 +++------ .../API_docs_v25/methods/auth_exportAuthorization.md | 9 +++------ .../API_docs_v25/methods/auth_importAuthorization.md | 9 +++------ .../API_docs_v25/methods/auth_resetAuthorizations.md | 9 +++------ old_docs/API_docs_v25/methods/auth_sendCall.md | 9 +++------ old_docs/API_docs_v25/methods/auth_sendInvites.md | 9 +++------ old_docs/API_docs_v25/methods/auth_sendSms.md | 9 +++------ old_docs/API_docs_v25/methods/contacts_block.md | 9 +++------ old_docs/API_docs_v25/methods/contacts_deleteContact.md | 9 +++------ old_docs/API_docs_v25/methods/contacts_deleteContacts.md | 9 +++------ old_docs/API_docs_v25/methods/contacts_exportCard.md | 9 +++------ old_docs/API_docs_v25/methods/contacts_getBlocked.md | 9 +++------ old_docs/API_docs_v25/methods/contacts_getContacts.md | 9 +++------ old_docs/API_docs_v25/methods/contacts_getStatuses.md | 9 +++------ old_docs/API_docs_v25/methods/contacts_getSuggested.md | 9 +++------ old_docs/API_docs_v25/methods/contacts_importCard.md | 9 +++------ old_docs/API_docs_v25/methods/contacts_importContacts.md | 9 +++------ old_docs/API_docs_v25/methods/contacts_search.md | 9 +++------ old_docs/API_docs_v25/methods/contacts_unblock.md | 9 +++------ old_docs/API_docs_v25/methods/geochats_checkin.md | 9 +++------ old_docs/API_docs_v25/methods/geochats_createGeoChat.md | 9 +++------ old_docs/API_docs_v25/methods/geochats_editChatPhoto.md | 9 +++------ old_docs/API_docs_v25/methods/geochats_editChatTitle.md | 9 +++------ old_docs/API_docs_v25/methods/geochats_getFullChat.md | 9 +++------ old_docs/API_docs_v25/methods/geochats_getHistory.md | 9 +++------ old_docs/API_docs_v25/methods/geochats_getLocated.md | 9 +++------ old_docs/API_docs_v25/methods/geochats_getRecents.md | 9 +++------ old_docs/API_docs_v25/methods/geochats_search.md | 9 +++------ old_docs/API_docs_v25/methods/geochats_sendMedia.md | 9 +++------ old_docs/API_docs_v25/methods/geochats_sendMessage.md | 9 +++------ old_docs/API_docs_v25/methods/geochats_setTyping.md | 9 +++------ old_docs/API_docs_v25/methods/help_getAppUpdate.md | 9 +++------ old_docs/API_docs_v25/methods/help_getConfig.md | 9 +++------ old_docs/API_docs_v25/methods/help_getInviteText.md | 9 +++------ old_docs/API_docs_v25/methods/help_getNearestDc.md | 9 +++------ old_docs/API_docs_v25/methods/help_getSupport.md | 9 +++------ old_docs/API_docs_v25/methods/help_saveAppLog.md | 9 +++------ old_docs/API_docs_v25/methods/initConnection.md | 9 +++------ old_docs/API_docs_v25/methods/invokeAfterMsg.md | 9 +++------ old_docs/API_docs_v25/methods/invokeAfterMsgs.md | 9 +++------ old_docs/API_docs_v25/methods/invokeWithLayer.md | 9 +++------ old_docs/API_docs_v25/methods/messages_addChatUser.md | 9 +++------ old_docs/API_docs_v25/methods/messages_createChat.md | 9 +++------ old_docs/API_docs_v25/methods/messages_deleteChatUser.md | 9 +++------ old_docs/API_docs_v25/methods/messages_deleteHistory.md | 9 +++------ old_docs/API_docs_v25/methods/messages_deleteMessages.md | 9 +++------ old_docs/API_docs_v25/methods/messages_editChatPhoto.md | 9 +++------ old_docs/API_docs_v25/methods/messages_editChatTitle.md | 9 +++------ old_docs/API_docs_v25/methods/messages_forwardMessage.md | 9 +++------ .../API_docs_v25/methods/messages_forwardMessages.md | 9 +++------ old_docs/API_docs_v25/methods/messages_getAllStickers.md | 9 +++------ old_docs/API_docs_v25/methods/messages_getChats.md | 9 +++------ old_docs/API_docs_v25/methods/messages_getDhConfig.md | 9 +++------ old_docs/API_docs_v25/methods/messages_getDialogs.md | 9 +++------ old_docs/API_docs_v25/methods/messages_getHistory.md | 9 +++------ old_docs/API_docs_v25/methods/messages_getMessages.md | 9 +++------ old_docs/API_docs_v25/methods/messages_getStickers.md | 9 +++------ .../methods/messages_readEncryptedHistory.md | 9 +++------ old_docs/API_docs_v25/methods/messages_readHistory.md | 9 +++------ .../API_docs_v25/methods/messages_readMessageContents.md | 9 +++------ .../API_docs_v25/methods/messages_receivedMessages.md | 9 +++------ old_docs/API_docs_v25/methods/messages_receivedQueue.md | 9 +++------ old_docs/API_docs_v25/methods/messages_search.md | 9 +++------ old_docs/API_docs_v25/methods/messages_sendBroadcast.md | 9 +++------ old_docs/API_docs_v25/methods/messages_sendEncrypted.md | 9 +++------ .../API_docs_v25/methods/messages_sendEncryptedFile.md | 9 +++------ .../methods/messages_sendEncryptedService.md | 9 +++------ old_docs/API_docs_v25/methods/messages_sendMedia.md | 9 +++------ old_docs/API_docs_v25/methods/messages_sendMessage.md | 9 +++------ .../API_docs_v25/methods/messages_setEncryptedTyping.md | 9 +++------ old_docs/API_docs_v25/methods/messages_setTyping.md | 9 +++------ old_docs/API_docs_v25/methods/photos_deletePhotos.md | 9 +++------ old_docs/API_docs_v25/methods/photos_getUserPhotos.md | 9 +++------ .../API_docs_v25/methods/photos_updateProfilePhoto.md | 9 +++------ .../API_docs_v25/methods/photos_uploadProfilePhoto.md | 9 +++------ old_docs/API_docs_v25/methods/users_getUsers.md | 9 +++------ old_docs/API_docs_v27/methods/account_changePhone.md | 9 +++------ old_docs/API_docs_v27/methods/account_checkUsername.md | 9 +++------ old_docs/API_docs_v27/methods/account_deleteAccount.md | 9 +++------ old_docs/API_docs_v27/methods/account_getAccountTTL.md | 9 +++------ .../API_docs_v27/methods/account_getAuthorizations.md | 9 +++------ .../API_docs_v27/methods/account_getNotifySettings.md | 9 +++------ old_docs/API_docs_v27/methods/account_getPassword.md | 9 +++------ .../API_docs_v27/methods/account_getPasswordSettings.md | 9 +++------ old_docs/API_docs_v27/methods/account_getPrivacy.md | 9 +++------ old_docs/API_docs_v27/methods/account_getWallPapers.md | 9 +++------ old_docs/API_docs_v27/methods/account_registerDevice.md | 9 +++------ .../API_docs_v27/methods/account_resetAuthorization.md | 9 +++------ .../API_docs_v27/methods/account_resetNotifySettings.md | 9 +++------ .../API_docs_v27/methods/account_sendChangePhoneCode.md | 9 +++------ old_docs/API_docs_v27/methods/account_setAccountTTL.md | 9 +++------ old_docs/API_docs_v27/methods/account_setPrivacy.md | 9 +++------ .../API_docs_v27/methods/account_unregisterDevice.md | 9 +++------ .../API_docs_v27/methods/account_updateDeviceLocked.md | 9 +++------ .../API_docs_v27/methods/account_updateNotifySettings.md | 9 +++------ .../methods/account_updatePasswordSettings.md | 9 +++------ old_docs/API_docs_v27/methods/account_updateProfile.md | 9 +++------ old_docs/API_docs_v27/methods/account_updateStatus.md | 9 +++------ old_docs/API_docs_v27/methods/account_updateUsername.md | 9 +++------ old_docs/API_docs_v27/methods/auth_bindTempAuthKey.md | 9 +++------ old_docs/API_docs_v27/methods/auth_checkPassword.md | 9 +++------ old_docs/API_docs_v27/methods/auth_checkPhone.md | 9 +++------ .../API_docs_v27/methods/auth_exportAuthorization.md | 9 +++------ .../API_docs_v27/methods/auth_importAuthorization.md | 9 +++------ old_docs/API_docs_v27/methods/auth_recoverPassword.md | 9 +++------ .../API_docs_v27/methods/auth_requestPasswordRecovery.md | 9 +++------ .../API_docs_v27/methods/auth_resetAuthorizations.md | 9 +++------ old_docs/API_docs_v27/methods/auth_sendCall.md | 9 +++------ old_docs/API_docs_v27/methods/auth_sendInvites.md | 9 +++------ old_docs/API_docs_v27/methods/auth_sendSms.md | 9 +++------ old_docs/API_docs_v27/methods/contacts_block.md | 9 +++------ old_docs/API_docs_v27/methods/contacts_deleteContact.md | 9 +++------ old_docs/API_docs_v27/methods/contacts_deleteContacts.md | 9 +++------ old_docs/API_docs_v27/methods/contacts_exportCard.md | 9 +++------ old_docs/API_docs_v27/methods/contacts_getBlocked.md | 9 +++------ old_docs/API_docs_v27/methods/contacts_getContacts.md | 9 +++------ old_docs/API_docs_v27/methods/contacts_getStatuses.md | 9 +++------ old_docs/API_docs_v27/methods/contacts_getSuggested.md | 9 +++------ old_docs/API_docs_v27/methods/contacts_importCard.md | 9 +++------ old_docs/API_docs_v27/methods/contacts_importContacts.md | 9 +++------ old_docs/API_docs_v27/methods/contacts_search.md | 9 +++------ old_docs/API_docs_v27/methods/contacts_unblock.md | 9 +++------ old_docs/API_docs_v27/methods/geochats_checkin.md | 9 +++------ old_docs/API_docs_v27/methods/geochats_createGeoChat.md | 9 +++------ old_docs/API_docs_v27/methods/geochats_editChatPhoto.md | 9 +++------ old_docs/API_docs_v27/methods/geochats_editChatTitle.md | 9 +++------ old_docs/API_docs_v27/methods/geochats_getFullChat.md | 9 +++------ old_docs/API_docs_v27/methods/geochats_getHistory.md | 9 +++------ old_docs/API_docs_v27/methods/geochats_getLocated.md | 9 +++------ old_docs/API_docs_v27/methods/geochats_getRecents.md | 9 +++------ old_docs/API_docs_v27/methods/geochats_search.md | 9 +++------ old_docs/API_docs_v27/methods/geochats_sendMedia.md | 9 +++------ old_docs/API_docs_v27/methods/geochats_sendMessage.md | 9 +++------ old_docs/API_docs_v27/methods/geochats_setTyping.md | 9 +++------ old_docs/API_docs_v27/methods/help_getAppUpdate.md | 9 +++------ old_docs/API_docs_v27/methods/help_getConfig.md | 9 +++------ old_docs/API_docs_v27/methods/help_getInviteText.md | 9 +++------ old_docs/API_docs_v27/methods/help_getNearestDc.md | 9 +++------ old_docs/API_docs_v27/methods/help_getSupport.md | 9 +++------ old_docs/API_docs_v27/methods/help_saveAppLog.md | 9 +++------ old_docs/API_docs_v27/methods/initConnection.md | 9 +++------ old_docs/API_docs_v27/methods/invokeAfterMsg.md | 9 +++------ old_docs/API_docs_v27/methods/invokeAfterMsgs.md | 9 +++------ old_docs/API_docs_v27/methods/invokeWithLayer.md | 9 +++------ old_docs/API_docs_v27/methods/messages_addChatUser.md | 9 +++------ old_docs/API_docs_v27/methods/messages_createChat.md | 9 +++------ old_docs/API_docs_v27/methods/messages_deleteChatUser.md | 9 +++------ old_docs/API_docs_v27/methods/messages_deleteHistory.md | 9 +++------ old_docs/API_docs_v27/methods/messages_deleteMessages.md | 9 +++------ old_docs/API_docs_v27/methods/messages_editChatPhoto.md | 9 +++------ old_docs/API_docs_v27/methods/messages_editChatTitle.md | 9 +++------ old_docs/API_docs_v27/methods/messages_forwardMessage.md | 9 +++------ .../API_docs_v27/methods/messages_forwardMessages.md | 9 +++------ old_docs/API_docs_v27/methods/messages_getAllStickers.md | 9 +++------ old_docs/API_docs_v27/methods/messages_getChats.md | 9 +++------ old_docs/API_docs_v27/methods/messages_getDhConfig.md | 9 +++------ old_docs/API_docs_v27/methods/messages_getDialogs.md | 9 +++------ old_docs/API_docs_v27/methods/messages_getHistory.md | 9 +++------ old_docs/API_docs_v27/methods/messages_getMessages.md | 9 +++------ old_docs/API_docs_v27/methods/messages_getStickers.md | 9 +++------ .../API_docs_v27/methods/messages_getWebPagePreview.md | 9 +++------ .../methods/messages_readEncryptedHistory.md | 9 +++------ old_docs/API_docs_v27/methods/messages_readHistory.md | 9 +++------ .../API_docs_v27/methods/messages_readMessageContents.md | 9 +++------ .../API_docs_v27/methods/messages_receivedMessages.md | 9 +++------ old_docs/API_docs_v27/methods/messages_receivedQueue.md | 9 +++------ old_docs/API_docs_v27/methods/messages_search.md | 9 +++------ old_docs/API_docs_v27/methods/messages_sendBroadcast.md | 9 +++------ old_docs/API_docs_v27/methods/messages_sendEncrypted.md | 9 +++------ .../API_docs_v27/methods/messages_sendEncryptedFile.md | 9 +++------ .../methods/messages_sendEncryptedService.md | 9 +++------ old_docs/API_docs_v27/methods/messages_sendMedia.md | 9 +++------ old_docs/API_docs_v27/methods/messages_sendMessage.md | 9 +++------ .../API_docs_v27/methods/messages_setEncryptedTyping.md | 9 +++------ old_docs/API_docs_v27/methods/messages_setTyping.md | 9 +++------ old_docs/API_docs_v27/methods/photos_deletePhotos.md | 9 +++------ old_docs/API_docs_v27/methods/photos_getUserPhotos.md | 9 +++------ .../API_docs_v27/methods/photos_updateProfilePhoto.md | 9 +++------ .../API_docs_v27/methods/photos_uploadProfilePhoto.md | 9 +++------ old_docs/API_docs_v27/methods/users_getUsers.md | 9 +++------ old_docs/API_docs_v33/methods/account_changePhone.md | 9 +++------ old_docs/API_docs_v33/methods/account_checkUsername.md | 9 +++------ old_docs/API_docs_v33/methods/account_deleteAccount.md | 9 +++------ old_docs/API_docs_v33/methods/account_getAccountTTL.md | 9 +++------ .../API_docs_v33/methods/account_getAuthorizations.md | 9 +++------ .../API_docs_v33/methods/account_getNotifySettings.md | 9 +++------ old_docs/API_docs_v33/methods/account_getPassword.md | 9 +++------ .../API_docs_v33/methods/account_getPasswordSettings.md | 9 +++------ old_docs/API_docs_v33/methods/account_getPrivacy.md | 9 +++------ old_docs/API_docs_v33/methods/account_getWallPapers.md | 9 +++------ old_docs/API_docs_v33/methods/account_registerDevice.md | 9 +++------ .../API_docs_v33/methods/account_resetAuthorization.md | 9 +++------ .../API_docs_v33/methods/account_resetNotifySettings.md | 9 +++------ .../API_docs_v33/methods/account_sendChangePhoneCode.md | 9 +++------ old_docs/API_docs_v33/methods/account_setAccountTTL.md | 9 +++------ old_docs/API_docs_v33/methods/account_setPrivacy.md | 9 +++------ .../API_docs_v33/methods/account_unregisterDevice.md | 9 +++------ .../API_docs_v33/methods/account_updateDeviceLocked.md | 9 +++------ .../API_docs_v33/methods/account_updateNotifySettings.md | 9 +++------ .../methods/account_updatePasswordSettings.md | 9 +++------ old_docs/API_docs_v33/methods/account_updateProfile.md | 9 +++------ old_docs/API_docs_v33/methods/account_updateStatus.md | 9 +++------ old_docs/API_docs_v33/methods/account_updateUsername.md | 9 +++------ old_docs/API_docs_v33/methods/auth_bindTempAuthKey.md | 9 +++------ old_docs/API_docs_v33/methods/auth_checkPassword.md | 9 +++------ old_docs/API_docs_v33/methods/auth_checkPhone.md | 9 +++------ .../API_docs_v33/methods/auth_exportAuthorization.md | 9 +++------ .../API_docs_v33/methods/auth_importAuthorization.md | 9 +++------ old_docs/API_docs_v33/methods/auth_recoverPassword.md | 9 +++------ .../API_docs_v33/methods/auth_requestPasswordRecovery.md | 9 +++------ .../API_docs_v33/methods/auth_resetAuthorizations.md | 9 +++------ old_docs/API_docs_v33/methods/auth_sendCall.md | 9 +++------ old_docs/API_docs_v33/methods/auth_sendInvites.md | 9 +++------ old_docs/API_docs_v33/methods/auth_sendSms.md | 9 +++------ old_docs/API_docs_v33/methods/contacts_block.md | 9 +++------ old_docs/API_docs_v33/methods/contacts_deleteContact.md | 9 +++------ old_docs/API_docs_v33/methods/contacts_deleteContacts.md | 9 +++------ old_docs/API_docs_v33/methods/contacts_exportCard.md | 9 +++------ old_docs/API_docs_v33/methods/contacts_getBlocked.md | 9 +++------ old_docs/API_docs_v33/methods/contacts_getContacts.md | 9 +++------ old_docs/API_docs_v33/methods/contacts_getStatuses.md | 9 +++------ old_docs/API_docs_v33/methods/contacts_getSuggested.md | 9 +++------ old_docs/API_docs_v33/methods/contacts_importCard.md | 9 +++------ old_docs/API_docs_v33/methods/contacts_importContacts.md | 9 +++------ old_docs/API_docs_v33/methods/contacts_search.md | 9 +++------ old_docs/API_docs_v33/methods/contacts_unblock.md | 9 +++------ old_docs/API_docs_v33/methods/geochats_checkin.md | 9 +++------ old_docs/API_docs_v33/methods/geochats_createGeoChat.md | 9 +++------ old_docs/API_docs_v33/methods/geochats_editChatPhoto.md | 9 +++------ old_docs/API_docs_v33/methods/geochats_editChatTitle.md | 9 +++------ old_docs/API_docs_v33/methods/geochats_getFullChat.md | 9 +++------ old_docs/API_docs_v33/methods/geochats_getHistory.md | 9 +++------ old_docs/API_docs_v33/methods/geochats_getLocated.md | 9 +++------ old_docs/API_docs_v33/methods/geochats_getRecents.md | 9 +++------ old_docs/API_docs_v33/methods/geochats_search.md | 9 +++------ old_docs/API_docs_v33/methods/geochats_sendMedia.md | 9 +++------ old_docs/API_docs_v33/methods/geochats_sendMessage.md | 9 +++------ old_docs/API_docs_v33/methods/geochats_setTyping.md | 9 +++------ old_docs/API_docs_v33/methods/help_getAppChangelog.md | 9 +++------ old_docs/API_docs_v33/methods/help_getAppUpdate.md | 9 +++------ old_docs/API_docs_v33/methods/help_getConfig.md | 9 +++------ old_docs/API_docs_v33/methods/help_getInviteText.md | 9 +++------ old_docs/API_docs_v33/methods/help_getNearestDc.md | 9 +++------ old_docs/API_docs_v33/methods/help_getSupport.md | 9 +++------ old_docs/API_docs_v33/methods/help_saveAppLog.md | 9 +++------ old_docs/API_docs_v33/methods/initConnection.md | 9 +++------ old_docs/API_docs_v33/methods/invokeAfterMsg.md | 9 +++------ old_docs/API_docs_v33/methods/invokeAfterMsgs.md | 9 +++------ old_docs/API_docs_v33/methods/invokeWithLayer.md | 9 +++------ old_docs/API_docs_v33/methods/invokeWithoutUpdates.md | 9 +++------ old_docs/API_docs_v33/methods/messages_addChatUser.md | 9 +++------ .../API_docs_v33/methods/messages_checkChatInvite.md | 9 +++------ old_docs/API_docs_v33/methods/messages_createChat.md | 9 +++------ old_docs/API_docs_v33/methods/messages_deleteChatUser.md | 9 +++------ old_docs/API_docs_v33/methods/messages_deleteHistory.md | 9 +++------ old_docs/API_docs_v33/methods/messages_deleteMessages.md | 9 +++------ old_docs/API_docs_v33/methods/messages_editChatPhoto.md | 9 +++------ old_docs/API_docs_v33/methods/messages_editChatTitle.md | 9 +++------ .../API_docs_v33/methods/messages_exportChatInvite.md | 9 +++------ old_docs/API_docs_v33/methods/messages_forwardMessage.md | 9 +++------ .../API_docs_v33/methods/messages_forwardMessages.md | 9 +++------ old_docs/API_docs_v33/methods/messages_getAllStickers.md | 9 +++------ old_docs/API_docs_v33/methods/messages_getChats.md | 9 +++------ old_docs/API_docs_v33/methods/messages_getDhConfig.md | 9 +++------ old_docs/API_docs_v33/methods/messages_getDialogs.md | 9 +++------ old_docs/API_docs_v33/methods/messages_getHistory.md | 9 +++------ old_docs/API_docs_v33/methods/messages_getMessages.md | 9 +++------ old_docs/API_docs_v33/methods/messages_getStickerSet.md | 9 +++------ old_docs/API_docs_v33/methods/messages_getStickers.md | 9 +++------ .../API_docs_v33/methods/messages_getWebPagePreview.md | 9 +++------ .../API_docs_v33/methods/messages_importChatInvite.md | 9 +++------ .../API_docs_v33/methods/messages_installStickerSet.md | 9 +++------ .../methods/messages_readEncryptedHistory.md | 9 +++------ old_docs/API_docs_v33/methods/messages_readHistory.md | 9 +++------ .../API_docs_v33/methods/messages_readMessageContents.md | 9 +++------ .../API_docs_v33/methods/messages_receivedMessages.md | 9 +++------ old_docs/API_docs_v33/methods/messages_receivedQueue.md | 9 +++------ old_docs/API_docs_v33/methods/messages_search.md | 9 +++------ old_docs/API_docs_v33/methods/messages_sendBroadcast.md | 9 +++------ old_docs/API_docs_v33/methods/messages_sendEncrypted.md | 9 +++------ .../API_docs_v33/methods/messages_sendEncryptedFile.md | 9 +++------ .../methods/messages_sendEncryptedService.md | 9 +++------ old_docs/API_docs_v33/methods/messages_sendMedia.md | 9 +++------ old_docs/API_docs_v33/methods/messages_sendMessage.md | 9 +++------ .../API_docs_v33/methods/messages_setEncryptedTyping.md | 9 +++------ old_docs/API_docs_v33/methods/messages_setTyping.md | 9 +++------ old_docs/API_docs_v33/methods/messages_startBot.md | 9 +++------ .../API_docs_v33/methods/messages_uninstallStickerSet.md | 9 +++------ old_docs/API_docs_v33/methods/photos_deletePhotos.md | 9 +++------ old_docs/API_docs_v33/methods/photos_getUserPhotos.md | 9 +++------ .../API_docs_v33/methods/photos_updateProfilePhoto.md | 9 +++------ .../API_docs_v33/methods/photos_uploadProfilePhoto.md | 9 +++------ old_docs/API_docs_v33/methods/users_getUsers.md | 9 +++------ old_docs/API_docs_v38/methods/account_changePhone.md | 9 +++------ old_docs/API_docs_v38/methods/account_checkUsername.md | 9 +++------ old_docs/API_docs_v38/methods/account_deleteAccount.md | 9 +++------ old_docs/API_docs_v38/methods/account_getAccountTTL.md | 9 +++------ .../API_docs_v38/methods/account_getAuthorizations.md | 9 +++------ .../API_docs_v38/methods/account_getNotifySettings.md | 9 +++------ old_docs/API_docs_v38/methods/account_getPassword.md | 9 +++------ .../API_docs_v38/methods/account_getPasswordSettings.md | 9 +++------ old_docs/API_docs_v38/methods/account_getPrivacy.md | 9 +++------ old_docs/API_docs_v38/methods/account_getWallPapers.md | 9 +++------ old_docs/API_docs_v38/methods/account_registerDevice.md | 9 +++------ .../API_docs_v38/methods/account_resetAuthorization.md | 9 +++------ .../API_docs_v38/methods/account_resetNotifySettings.md | 9 +++------ .../API_docs_v38/methods/account_sendChangePhoneCode.md | 9 +++------ old_docs/API_docs_v38/methods/account_setAccountTTL.md | 9 +++------ old_docs/API_docs_v38/methods/account_setPrivacy.md | 9 +++------ .../API_docs_v38/methods/account_unregisterDevice.md | 9 +++------ .../API_docs_v38/methods/account_updateDeviceLocked.md | 9 +++------ .../API_docs_v38/methods/account_updateNotifySettings.md | 9 +++------ .../methods/account_updatePasswordSettings.md | 9 +++------ old_docs/API_docs_v38/methods/account_updateProfile.md | 9 +++------ old_docs/API_docs_v38/methods/account_updateStatus.md | 9 +++------ old_docs/API_docs_v38/methods/account_updateUsername.md | 9 +++------ old_docs/API_docs_v38/methods/auth_bindTempAuthKey.md | 9 +++------ old_docs/API_docs_v38/methods/auth_checkPassword.md | 9 +++------ old_docs/API_docs_v38/methods/auth_checkPhone.md | 9 +++------ .../API_docs_v38/methods/auth_exportAuthorization.md | 9 +++------ .../API_docs_v38/methods/auth_importAuthorization.md | 9 +++------ old_docs/API_docs_v38/methods/auth_recoverPassword.md | 9 +++------ .../API_docs_v38/methods/auth_requestPasswordRecovery.md | 9 +++------ .../API_docs_v38/methods/auth_resetAuthorizations.md | 9 +++------ old_docs/API_docs_v38/methods/auth_sendCall.md | 9 +++------ old_docs/API_docs_v38/methods/auth_sendInvites.md | 9 +++------ old_docs/API_docs_v38/methods/auth_sendSms.md | 9 +++------ old_docs/API_docs_v38/methods/channels_checkUsername.md | 9 +++------ old_docs/API_docs_v38/methods/channels_createChannel.md | 9 +++------ old_docs/API_docs_v38/methods/channels_deleteChannel.md | 9 +++------ old_docs/API_docs_v38/methods/channels_deleteMessages.md | 9 +++------ .../API_docs_v38/methods/channels_deleteUserHistory.md | 9 +++------ old_docs/API_docs_v38/methods/channels_editAbout.md | 9 +++------ old_docs/API_docs_v38/methods/channels_editAdmin.md | 9 +++------ old_docs/API_docs_v38/methods/channels_editPhoto.md | 9 +++------ old_docs/API_docs_v38/methods/channels_editTitle.md | 9 +++------ old_docs/API_docs_v38/methods/channels_exportInvite.md | 9 +++------ old_docs/API_docs_v38/methods/channels_getChannels.md | 9 +++------ old_docs/API_docs_v38/methods/channels_getDialogs.md | 9 +++------ .../API_docs_v38/methods/channels_getImportantHistory.md | 9 +++------ old_docs/API_docs_v38/methods/channels_getMessages.md | 9 +++------ old_docs/API_docs_v38/methods/channels_getParticipant.md | 9 +++------ .../API_docs_v38/methods/channels_inviteToChannel.md | 9 +++------ old_docs/API_docs_v38/methods/channels_joinChannel.md | 9 +++------ .../API_docs_v38/methods/channels_kickFromChannel.md | 9 +++------ old_docs/API_docs_v38/methods/channels_leaveChannel.md | 9 +++------ old_docs/API_docs_v38/methods/channels_readHistory.md | 9 +++------ old_docs/API_docs_v38/methods/channels_reportSpam.md | 9 +++------ old_docs/API_docs_v38/methods/channels_toggleComments.md | 9 +++------ old_docs/API_docs_v38/methods/channels_updateUsername.md | 9 +++------ old_docs/API_docs_v38/methods/contacts_block.md | 9 +++------ old_docs/API_docs_v38/methods/contacts_deleteContact.md | 9 +++------ old_docs/API_docs_v38/methods/contacts_deleteContacts.md | 9 +++------ old_docs/API_docs_v38/methods/contacts_exportCard.md | 9 +++------ old_docs/API_docs_v38/methods/contacts_getBlocked.md | 9 +++------ old_docs/API_docs_v38/methods/contacts_getContacts.md | 9 +++------ old_docs/API_docs_v38/methods/contacts_getStatuses.md | 9 +++------ old_docs/API_docs_v38/methods/contacts_getSuggested.md | 9 +++------ old_docs/API_docs_v38/methods/contacts_importCard.md | 9 +++------ old_docs/API_docs_v38/methods/contacts_importContacts.md | 9 +++------ old_docs/API_docs_v38/methods/contacts_search.md | 9 +++------ old_docs/API_docs_v38/methods/contacts_unblock.md | 9 +++------ old_docs/API_docs_v38/methods/help_getAppChangelog.md | 9 +++------ old_docs/API_docs_v38/methods/help_getAppUpdate.md | 9 +++------ old_docs/API_docs_v38/methods/help_getConfig.md | 9 +++------ old_docs/API_docs_v38/methods/help_getInviteText.md | 9 +++------ old_docs/API_docs_v38/methods/help_getNearestDc.md | 9 +++------ old_docs/API_docs_v38/methods/help_getSupport.md | 9 +++------ old_docs/API_docs_v38/methods/help_saveAppLog.md | 9 +++------ old_docs/API_docs_v38/methods/initConnection.md | 9 +++------ old_docs/API_docs_v38/methods/invokeAfterMsg.md | 9 +++------ old_docs/API_docs_v38/methods/invokeAfterMsgs.md | 9 +++------ old_docs/API_docs_v38/methods/invokeWithLayer.md | 9 +++------ old_docs/API_docs_v38/methods/invokeWithoutUpdates.md | 9 +++------ old_docs/API_docs_v38/methods/messages_addChatUser.md | 9 +++------ .../API_docs_v38/methods/messages_checkChatInvite.md | 9 +++------ old_docs/API_docs_v38/methods/messages_createChat.md | 9 +++------ old_docs/API_docs_v38/methods/messages_deleteChatUser.md | 9 +++------ old_docs/API_docs_v38/methods/messages_deleteHistory.md | 9 +++------ old_docs/API_docs_v38/methods/messages_deleteMessages.md | 9 +++------ old_docs/API_docs_v38/methods/messages_editChatPhoto.md | 9 +++------ old_docs/API_docs_v38/methods/messages_editChatTitle.md | 9 +++------ .../API_docs_v38/methods/messages_exportChatInvite.md | 9 +++------ old_docs/API_docs_v38/methods/messages_forwardMessage.md | 9 +++------ .../API_docs_v38/methods/messages_forwardMessages.md | 9 +++------ old_docs/API_docs_v38/methods/messages_getAllStickers.md | 9 +++------ old_docs/API_docs_v38/methods/messages_getChats.md | 9 +++------ old_docs/API_docs_v38/methods/messages_getDhConfig.md | 9 +++------ old_docs/API_docs_v38/methods/messages_getDialogs.md | 9 +++------ old_docs/API_docs_v38/methods/messages_getHistory.md | 9 +++------ old_docs/API_docs_v38/methods/messages_getMessages.md | 9 +++------ .../API_docs_v38/methods/messages_getMessagesViews.md | 9 +++------ old_docs/API_docs_v38/methods/messages_getStickerSet.md | 9 +++------ old_docs/API_docs_v38/methods/messages_getStickers.md | 9 +++------ .../API_docs_v38/methods/messages_getWebPagePreview.md | 9 +++------ .../API_docs_v38/methods/messages_importChatInvite.md | 9 +++------ .../API_docs_v38/methods/messages_installStickerSet.md | 9 +++------ .../methods/messages_readEncryptedHistory.md | 9 +++------ old_docs/API_docs_v38/methods/messages_readHistory.md | 9 +++------ .../API_docs_v38/methods/messages_readMessageContents.md | 9 +++------ .../API_docs_v38/methods/messages_receivedMessages.md | 9 +++------ old_docs/API_docs_v38/methods/messages_receivedQueue.md | 9 +++------ old_docs/API_docs_v38/methods/messages_reportSpam.md | 9 +++------ old_docs/API_docs_v38/methods/messages_search.md | 9 +++------ old_docs/API_docs_v38/methods/messages_sendBroadcast.md | 9 +++------ old_docs/API_docs_v38/methods/messages_sendEncrypted.md | 9 +++------ .../API_docs_v38/methods/messages_sendEncryptedFile.md | 9 +++------ .../methods/messages_sendEncryptedService.md | 9 +++------ old_docs/API_docs_v38/methods/messages_sendMedia.md | 9 +++------ old_docs/API_docs_v38/methods/messages_sendMessage.md | 9 +++------ .../API_docs_v38/methods/messages_setEncryptedTyping.md | 9 +++------ old_docs/API_docs_v38/methods/messages_setTyping.md | 9 +++------ old_docs/API_docs_v38/methods/messages_startBot.md | 9 +++------ .../API_docs_v38/methods/messages_uninstallStickerSet.md | 9 +++------ old_docs/API_docs_v38/methods/photos_deletePhotos.md | 9 +++------ old_docs/API_docs_v38/methods/photos_getUserPhotos.md | 9 +++------ .../API_docs_v38/methods/photos_updateProfilePhoto.md | 9 +++------ .../API_docs_v38/methods/photos_uploadProfilePhoto.md | 9 +++------ old_docs/API_docs_v38/methods/users_getUsers.md | 9 +++------ old_docs/API_docs_v40/methods/account_changePhone.md | 9 +++------ old_docs/API_docs_v40/methods/account_checkUsername.md | 9 +++------ old_docs/API_docs_v40/methods/account_deleteAccount.md | 9 +++------ old_docs/API_docs_v40/methods/account_getAccountTTL.md | 9 +++------ .../API_docs_v40/methods/account_getAuthorizations.md | 9 +++------ .../API_docs_v40/methods/account_getNotifySettings.md | 9 +++------ old_docs/API_docs_v40/methods/account_getPassword.md | 9 +++------ .../API_docs_v40/methods/account_getPasswordSettings.md | 9 +++------ old_docs/API_docs_v40/methods/account_getPrivacy.md | 9 +++------ old_docs/API_docs_v40/methods/account_getWallPapers.md | 9 +++------ old_docs/API_docs_v40/methods/account_registerDevice.md | 9 +++------ .../API_docs_v40/methods/account_resetAuthorization.md | 9 +++------ .../API_docs_v40/methods/account_resetNotifySettings.md | 9 +++------ .../API_docs_v40/methods/account_sendChangePhoneCode.md | 9 +++------ old_docs/API_docs_v40/methods/account_setAccountTTL.md | 9 +++------ old_docs/API_docs_v40/methods/account_setPrivacy.md | 9 +++------ .../API_docs_v40/methods/account_unregisterDevice.md | 9 +++------ .../API_docs_v40/methods/account_updateDeviceLocked.md | 9 +++------ .../API_docs_v40/methods/account_updateNotifySettings.md | 9 +++------ .../methods/account_updatePasswordSettings.md | 9 +++------ old_docs/API_docs_v40/methods/account_updateProfile.md | 9 +++------ old_docs/API_docs_v40/methods/account_updateStatus.md | 9 +++------ old_docs/API_docs_v40/methods/account_updateUsername.md | 9 +++------ old_docs/API_docs_v40/methods/auth_bindTempAuthKey.md | 9 +++------ old_docs/API_docs_v40/methods/auth_checkPassword.md | 9 +++------ old_docs/API_docs_v40/methods/auth_checkPhone.md | 9 +++------ .../API_docs_v40/methods/auth_exportAuthorization.md | 9 +++------ .../API_docs_v40/methods/auth_importAuthorization.md | 9 +++------ old_docs/API_docs_v40/methods/auth_recoverPassword.md | 9 +++------ .../API_docs_v40/methods/auth_requestPasswordRecovery.md | 9 +++------ .../API_docs_v40/methods/auth_resetAuthorizations.md | 9 +++------ old_docs/API_docs_v40/methods/auth_sendCall.md | 9 +++------ old_docs/API_docs_v40/methods/auth_sendInvites.md | 9 +++------ old_docs/API_docs_v40/methods/auth_sendSms.md | 9 +++------ old_docs/API_docs_v40/methods/contacts_block.md | 9 +++------ old_docs/API_docs_v40/methods/contacts_deleteContact.md | 9 +++------ old_docs/API_docs_v40/methods/contacts_deleteContacts.md | 9 +++------ old_docs/API_docs_v40/methods/contacts_exportCard.md | 9 +++------ old_docs/API_docs_v40/methods/contacts_getBlocked.md | 9 +++------ old_docs/API_docs_v40/methods/contacts_getContacts.md | 9 +++------ old_docs/API_docs_v40/methods/contacts_getStatuses.md | 9 +++------ old_docs/API_docs_v40/methods/contacts_getSuggested.md | 9 +++------ old_docs/API_docs_v40/methods/contacts_importCard.md | 9 +++------ old_docs/API_docs_v40/methods/contacts_importContacts.md | 9 +++------ old_docs/API_docs_v40/methods/contacts_search.md | 9 +++------ old_docs/API_docs_v40/methods/contacts_unblock.md | 9 +++------ old_docs/API_docs_v40/methods/help_getAppChangelog.md | 9 +++------ old_docs/API_docs_v40/methods/help_getAppUpdate.md | 9 +++------ old_docs/API_docs_v40/methods/help_getConfig.md | 9 +++------ old_docs/API_docs_v40/methods/help_getInviteText.md | 9 +++------ old_docs/API_docs_v40/methods/help_getNearestDc.md | 9 +++------ old_docs/API_docs_v40/methods/help_getSupport.md | 9 +++------ old_docs/API_docs_v40/methods/help_saveAppLog.md | 9 +++------ old_docs/API_docs_v40/methods/initConnection.md | 9 +++------ old_docs/API_docs_v40/methods/invokeAfterMsg.md | 9 +++------ old_docs/API_docs_v40/methods/invokeAfterMsgs.md | 9 +++------ old_docs/API_docs_v40/methods/invokeWithLayer.md | 9 +++------ old_docs/API_docs_v40/methods/invokeWithoutUpdates.md | 9 +++------ old_docs/API_docs_v40/methods/messages_addChatUser.md | 9 +++------ .../API_docs_v40/methods/messages_checkChatInvite.md | 9 +++------ old_docs/API_docs_v40/methods/messages_createChannel.md | 9 +++------ old_docs/API_docs_v40/methods/messages_createChat.md | 9 +++------ .../methods/messages_deleteChannelMessages.md | 9 +++------ old_docs/API_docs_v40/methods/messages_deleteChatUser.md | 9 +++------ old_docs/API_docs_v40/methods/messages_deleteHistory.md | 9 +++------ old_docs/API_docs_v40/methods/messages_deleteMessages.md | 9 +++------ old_docs/API_docs_v40/methods/messages_editChatPhoto.md | 9 +++------ old_docs/API_docs_v40/methods/messages_editChatTitle.md | 9 +++------ .../API_docs_v40/methods/messages_exportChatInvite.md | 9 +++------ old_docs/API_docs_v40/methods/messages_forwardMessage.md | 9 +++------ .../API_docs_v40/methods/messages_forwardMessages.md | 9 +++------ old_docs/API_docs_v40/methods/messages_getAllStickers.md | 9 +++------ .../API_docs_v40/methods/messages_getChannelDialogs.md | 9 +++------ old_docs/API_docs_v40/methods/messages_getChats.md | 9 +++------ old_docs/API_docs_v40/methods/messages_getDhConfig.md | 9 +++------ old_docs/API_docs_v40/methods/messages_getDialogs.md | 9 +++------ old_docs/API_docs_v40/methods/messages_getHistory.md | 9 +++------ .../API_docs_v40/methods/messages_getImportantHistory.md | 9 +++------ old_docs/API_docs_v40/methods/messages_getMessages.md | 9 +++------ old_docs/API_docs_v40/methods/messages_getStickerSet.md | 9 +++------ old_docs/API_docs_v40/methods/messages_getStickers.md | 9 +++------ .../API_docs_v40/methods/messages_getWebPagePreview.md | 9 +++------ .../API_docs_v40/methods/messages_importChatInvite.md | 9 +++------ .../API_docs_v40/methods/messages_installStickerSet.md | 9 +++------ .../API_docs_v40/methods/messages_readChannelHistory.md | 9 +++------ .../methods/messages_readEncryptedHistory.md | 9 +++------ old_docs/API_docs_v40/methods/messages_readHistory.md | 9 +++------ .../API_docs_v40/methods/messages_readMessageContents.md | 9 +++------ .../API_docs_v40/methods/messages_receivedMessages.md | 9 +++------ old_docs/API_docs_v40/methods/messages_receivedQueue.md | 9 +++------ old_docs/API_docs_v40/methods/messages_search.md | 9 +++------ old_docs/API_docs_v40/methods/messages_sendBroadcast.md | 9 +++------ old_docs/API_docs_v40/methods/messages_sendEncrypted.md | 9 +++------ .../API_docs_v40/methods/messages_sendEncryptedFile.md | 9 +++------ .../methods/messages_sendEncryptedService.md | 9 +++------ old_docs/API_docs_v40/methods/messages_sendMedia.md | 9 +++------ old_docs/API_docs_v40/methods/messages_sendMessage.md | 9 +++------ .../API_docs_v40/methods/messages_setEncryptedTyping.md | 9 +++------ old_docs/API_docs_v40/methods/messages_setTyping.md | 9 +++------ old_docs/API_docs_v40/methods/messages_startBot.md | 9 +++------ .../API_docs_v40/methods/messages_uninstallStickerSet.md | 9 +++------ old_docs/API_docs_v40/methods/photos_deletePhotos.md | 9 +++------ old_docs/API_docs_v40/methods/photos_getUserPhotos.md | 9 +++------ .../API_docs_v40/methods/photos_updateProfilePhoto.md | 9 +++------ .../API_docs_v40/methods/photos_uploadProfilePhoto.md | 9 +++------ old_docs/API_docs_v40/methods/users_getUsers.md | 9 +++------ old_docs/API_docs_v41/methods/account_changePhone.md | 9 +++------ old_docs/API_docs_v41/methods/account_checkUsername.md | 9 +++------ old_docs/API_docs_v41/methods/account_deleteAccount.md | 9 +++------ old_docs/API_docs_v41/methods/account_getAccountTTL.md | 9 +++------ .../API_docs_v41/methods/account_getAuthorizations.md | 9 +++------ .../API_docs_v41/methods/account_getNotifySettings.md | 9 +++------ old_docs/API_docs_v41/methods/account_getPassword.md | 9 +++------ .../API_docs_v41/methods/account_getPasswordSettings.md | 9 +++------ old_docs/API_docs_v41/methods/account_getPrivacy.md | 9 +++------ old_docs/API_docs_v41/methods/account_getWallPapers.md | 9 +++------ old_docs/API_docs_v41/methods/account_registerDevice.md | 9 +++------ .../API_docs_v41/methods/account_resetAuthorization.md | 9 +++------ .../API_docs_v41/methods/account_resetNotifySettings.md | 9 +++------ .../API_docs_v41/methods/account_sendChangePhoneCode.md | 9 +++------ old_docs/API_docs_v41/methods/account_setAccountTTL.md | 9 +++------ old_docs/API_docs_v41/methods/account_setPrivacy.md | 9 +++------ .../API_docs_v41/methods/account_unregisterDevice.md | 9 +++------ .../API_docs_v41/methods/account_updateDeviceLocked.md | 9 +++------ .../API_docs_v41/methods/account_updateNotifySettings.md | 9 +++------ .../methods/account_updatePasswordSettings.md | 9 +++------ old_docs/API_docs_v41/methods/account_updateProfile.md | 9 +++------ old_docs/API_docs_v41/methods/account_updateStatus.md | 9 +++------ old_docs/API_docs_v41/methods/account_updateUsername.md | 9 +++------ old_docs/API_docs_v41/methods/auth_bindTempAuthKey.md | 9 +++------ old_docs/API_docs_v41/methods/auth_checkPassword.md | 9 +++------ old_docs/API_docs_v41/methods/auth_checkPhone.md | 9 +++------ .../API_docs_v41/methods/auth_exportAuthorization.md | 9 +++------ .../API_docs_v41/methods/auth_importAuthorization.md | 9 +++------ old_docs/API_docs_v41/methods/auth_recoverPassword.md | 9 +++------ .../API_docs_v41/methods/auth_requestPasswordRecovery.md | 9 +++------ .../API_docs_v41/methods/auth_resetAuthorizations.md | 9 +++------ old_docs/API_docs_v41/methods/auth_sendCall.md | 9 +++------ old_docs/API_docs_v41/methods/auth_sendInvites.md | 9 +++------ old_docs/API_docs_v41/methods/auth_sendSms.md | 9 +++------ old_docs/API_docs_v41/methods/channels_checkUsername.md | 9 +++------ old_docs/API_docs_v41/methods/channels_createChannel.md | 9 +++------ old_docs/API_docs_v41/methods/channels_deleteChannel.md | 9 +++------ old_docs/API_docs_v41/methods/channels_deleteMessages.md | 9 +++------ .../API_docs_v41/methods/channels_deleteUserHistory.md | 9 +++------ old_docs/API_docs_v41/methods/channels_editAbout.md | 9 +++------ old_docs/API_docs_v41/methods/channels_editAdmin.md | 9 +++------ old_docs/API_docs_v41/methods/channels_editPhoto.md | 9 +++------ old_docs/API_docs_v41/methods/channels_editTitle.md | 9 +++------ old_docs/API_docs_v41/methods/channels_exportInvite.md | 9 +++------ old_docs/API_docs_v41/methods/channels_getChannels.md | 9 +++------ old_docs/API_docs_v41/methods/channels_getDialogs.md | 9 +++------ .../API_docs_v41/methods/channels_getImportantHistory.md | 9 +++------ old_docs/API_docs_v41/methods/channels_getMessages.md | 9 +++------ old_docs/API_docs_v41/methods/channels_getParticipant.md | 9 +++------ .../API_docs_v41/methods/channels_inviteToChannel.md | 9 +++------ old_docs/API_docs_v41/methods/channels_joinChannel.md | 9 +++------ .../API_docs_v41/methods/channels_kickFromChannel.md | 9 +++------ old_docs/API_docs_v41/methods/channels_leaveChannel.md | 9 +++------ old_docs/API_docs_v41/methods/channels_readHistory.md | 9 +++------ old_docs/API_docs_v41/methods/channels_reportSpam.md | 9 +++------ old_docs/API_docs_v41/methods/channels_toggleComments.md | 9 +++------ old_docs/API_docs_v41/methods/channels_updateUsername.md | 9 +++------ old_docs/API_docs_v41/methods/contacts_block.md | 9 +++------ old_docs/API_docs_v41/methods/contacts_deleteContact.md | 9 +++------ old_docs/API_docs_v41/methods/contacts_deleteContacts.md | 9 +++------ old_docs/API_docs_v41/methods/contacts_exportCard.md | 9 +++------ old_docs/API_docs_v41/methods/contacts_getBlocked.md | 9 +++------ old_docs/API_docs_v41/methods/contacts_getContacts.md | 9 +++------ old_docs/API_docs_v41/methods/contacts_getStatuses.md | 9 +++------ old_docs/API_docs_v41/methods/contacts_getSuggested.md | 9 +++------ old_docs/API_docs_v41/methods/contacts_importCard.md | 9 +++------ old_docs/API_docs_v41/methods/contacts_importContacts.md | 9 +++------ old_docs/API_docs_v41/methods/contacts_search.md | 9 +++------ old_docs/API_docs_v41/methods/contacts_unblock.md | 9 +++------ old_docs/API_docs_v41/methods/help_getAppChangelog.md | 9 +++------ old_docs/API_docs_v41/methods/help_getAppUpdate.md | 9 +++------ old_docs/API_docs_v41/methods/help_getConfig.md | 9 +++------ old_docs/API_docs_v41/methods/help_getInviteText.md | 9 +++------ old_docs/API_docs_v41/methods/help_getNearestDc.md | 9 +++------ old_docs/API_docs_v41/methods/help_getSupport.md | 9 +++------ old_docs/API_docs_v41/methods/help_saveAppLog.md | 9 +++------ old_docs/API_docs_v41/methods/initConnection.md | 9 +++------ old_docs/API_docs_v41/methods/invokeAfterMsg.md | 9 +++------ old_docs/API_docs_v41/methods/invokeAfterMsgs.md | 9 +++------ old_docs/API_docs_v41/methods/invokeWithLayer.md | 9 +++------ old_docs/API_docs_v41/methods/invokeWithoutUpdates.md | 9 +++------ old_docs/API_docs_v41/methods/messages_addChatUser.md | 9 +++------ .../API_docs_v41/methods/messages_checkChatInvite.md | 9 +++------ old_docs/API_docs_v41/methods/messages_createChat.md | 9 +++------ old_docs/API_docs_v41/methods/messages_deactivateChat.md | 9 +++------ old_docs/API_docs_v41/methods/messages_deleteChatUser.md | 9 +++------ old_docs/API_docs_v41/methods/messages_deleteHistory.md | 9 +++------ old_docs/API_docs_v41/methods/messages_deleteMessages.md | 9 +++------ old_docs/API_docs_v41/methods/messages_editChatAdmin.md | 9 +++------ old_docs/API_docs_v41/methods/messages_editChatPhoto.md | 9 +++------ old_docs/API_docs_v41/methods/messages_editChatTitle.md | 9 +++------ .../API_docs_v41/methods/messages_exportChatInvite.md | 9 +++------ old_docs/API_docs_v41/methods/messages_forwardMessage.md | 9 +++------ .../API_docs_v41/methods/messages_forwardMessages.md | 9 +++------ old_docs/API_docs_v41/methods/messages_getAllStickers.md | 9 +++------ old_docs/API_docs_v41/methods/messages_getChats.md | 9 +++------ old_docs/API_docs_v41/methods/messages_getDhConfig.md | 9 +++------ old_docs/API_docs_v41/methods/messages_getDialogs.md | 9 +++------ old_docs/API_docs_v41/methods/messages_getHistory.md | 9 +++------ old_docs/API_docs_v41/methods/messages_getMessages.md | 9 +++------ .../API_docs_v41/methods/messages_getMessagesViews.md | 9 +++------ old_docs/API_docs_v41/methods/messages_getStickerSet.md | 9 +++------ old_docs/API_docs_v41/methods/messages_getStickers.md | 9 +++------ .../API_docs_v41/methods/messages_getWebPagePreview.md | 9 +++------ .../API_docs_v41/methods/messages_importChatInvite.md | 9 +++------ .../API_docs_v41/methods/messages_installStickerSet.md | 9 +++------ old_docs/API_docs_v41/methods/messages_migrateChat.md | 9 +++------ .../methods/messages_readEncryptedHistory.md | 9 +++------ old_docs/API_docs_v41/methods/messages_readHistory.md | 9 +++------ .../API_docs_v41/methods/messages_readMessageContents.md | 9 +++------ .../API_docs_v41/methods/messages_receivedMessages.md | 9 +++------ old_docs/API_docs_v41/methods/messages_receivedQueue.md | 9 +++------ old_docs/API_docs_v41/methods/messages_reportSpam.md | 9 +++------ old_docs/API_docs_v41/methods/messages_search.md | 9 +++------ old_docs/API_docs_v41/methods/messages_searchGlobal.md | 9 +++------ old_docs/API_docs_v41/methods/messages_sendBroadcast.md | 9 +++------ old_docs/API_docs_v41/methods/messages_sendEncrypted.md | 9 +++------ .../API_docs_v41/methods/messages_sendEncryptedFile.md | 9 +++------ .../methods/messages_sendEncryptedService.md | 9 +++------ old_docs/API_docs_v41/methods/messages_sendMedia.md | 9 +++------ old_docs/API_docs_v41/methods/messages_sendMessage.md | 9 +++------ .../API_docs_v41/methods/messages_setEncryptedTyping.md | 9 +++------ old_docs/API_docs_v41/methods/messages_setTyping.md | 9 +++------ old_docs/API_docs_v41/methods/messages_startBot.md | 9 +++------ .../API_docs_v41/methods/messages_toggleChatAdmins.md | 9 +++------ .../API_docs_v41/methods/messages_uninstallStickerSet.md | 9 +++------ old_docs/API_docs_v41/methods/photos_deletePhotos.md | 9 +++------ old_docs/API_docs_v41/methods/photos_getUserPhotos.md | 9 +++------ .../API_docs_v41/methods/photos_updateProfilePhoto.md | 9 +++------ .../API_docs_v41/methods/photos_uploadProfilePhoto.md | 9 +++------ old_docs/API_docs_v41/methods/users_getUsers.md | 9 +++------ old_docs/API_docs_v42/methods/account_changePhone.md | 9 +++------ old_docs/API_docs_v42/methods/account_checkUsername.md | 9 +++------ old_docs/API_docs_v42/methods/account_deleteAccount.md | 9 +++------ old_docs/API_docs_v42/methods/account_getAccountTTL.md | 9 +++------ .../API_docs_v42/methods/account_getAuthorizations.md | 9 +++------ .../API_docs_v42/methods/account_getNotifySettings.md | 9 +++------ old_docs/API_docs_v42/methods/account_getPassword.md | 9 +++------ .../API_docs_v42/methods/account_getPasswordSettings.md | 9 +++------ old_docs/API_docs_v42/methods/account_getPrivacy.md | 9 +++------ old_docs/API_docs_v42/methods/account_getWallPapers.md | 9 +++------ old_docs/API_docs_v42/methods/account_registerDevice.md | 9 +++------ .../API_docs_v42/methods/account_resetAuthorization.md | 9 +++------ .../API_docs_v42/methods/account_resetNotifySettings.md | 9 +++------ .../API_docs_v42/methods/account_sendChangePhoneCode.md | 9 +++------ old_docs/API_docs_v42/methods/account_setAccountTTL.md | 9 +++------ old_docs/API_docs_v42/methods/account_setPrivacy.md | 9 +++------ .../API_docs_v42/methods/account_unregisterDevice.md | 9 +++------ .../API_docs_v42/methods/account_updateDeviceLocked.md | 9 +++------ .../API_docs_v42/methods/account_updateNotifySettings.md | 9 +++------ .../methods/account_updatePasswordSettings.md | 9 +++------ old_docs/API_docs_v42/methods/account_updateProfile.md | 9 +++------ old_docs/API_docs_v42/methods/account_updateStatus.md | 9 +++------ old_docs/API_docs_v42/methods/account_updateUsername.md | 9 +++------ old_docs/API_docs_v42/methods/auth_bindTempAuthKey.md | 9 +++------ old_docs/API_docs_v42/methods/auth_checkPassword.md | 9 +++------ old_docs/API_docs_v42/methods/auth_checkPhone.md | 9 +++------ .../API_docs_v42/methods/auth_exportAuthorization.md | 9 +++------ .../API_docs_v42/methods/auth_importAuthorization.md | 9 +++------ old_docs/API_docs_v42/methods/auth_recoverPassword.md | 9 +++------ .../API_docs_v42/methods/auth_requestPasswordRecovery.md | 9 +++------ .../API_docs_v42/methods/auth_resetAuthorizations.md | 9 +++------ old_docs/API_docs_v42/methods/auth_sendCall.md | 9 +++------ old_docs/API_docs_v42/methods/auth_sendInvites.md | 9 +++------ old_docs/API_docs_v42/methods/auth_sendSms.md | 9 +++------ old_docs/API_docs_v42/methods/channels_checkUsername.md | 9 +++------ old_docs/API_docs_v42/methods/channels_createChannel.md | 9 +++------ old_docs/API_docs_v42/methods/channels_deleteChannel.md | 9 +++------ old_docs/API_docs_v42/methods/channels_deleteMessages.md | 9 +++------ .../API_docs_v42/methods/channels_deleteUserHistory.md | 9 +++------ old_docs/API_docs_v42/methods/channels_editAbout.md | 9 +++------ old_docs/API_docs_v42/methods/channels_editAdmin.md | 9 +++------ old_docs/API_docs_v42/methods/channels_editPhoto.md | 9 +++------ old_docs/API_docs_v42/methods/channels_editTitle.md | 9 +++------ old_docs/API_docs_v42/methods/channels_exportInvite.md | 9 +++------ old_docs/API_docs_v42/methods/channels_getChannels.md | 9 +++------ old_docs/API_docs_v42/methods/channels_getDialogs.md | 9 +++------ .../API_docs_v42/methods/channels_getImportantHistory.md | 9 +++------ old_docs/API_docs_v42/methods/channels_getMessages.md | 9 +++------ old_docs/API_docs_v42/methods/channels_getParticipant.md | 9 +++------ .../API_docs_v42/methods/channels_inviteToChannel.md | 9 +++------ old_docs/API_docs_v42/methods/channels_joinChannel.md | 9 +++------ .../API_docs_v42/methods/channels_kickFromChannel.md | 9 +++------ old_docs/API_docs_v42/methods/channels_leaveChannel.md | 9 +++------ old_docs/API_docs_v42/methods/channels_readHistory.md | 9 +++------ old_docs/API_docs_v42/methods/channels_reportSpam.md | 9 +++------ old_docs/API_docs_v42/methods/channels_toggleComments.md | 9 +++------ old_docs/API_docs_v42/methods/channels_updateUsername.md | 9 +++------ old_docs/API_docs_v42/methods/contacts_block.md | 9 +++------ old_docs/API_docs_v42/methods/contacts_deleteContact.md | 9 +++------ old_docs/API_docs_v42/methods/contacts_deleteContacts.md | 9 +++------ old_docs/API_docs_v42/methods/contacts_exportCard.md | 9 +++------ old_docs/API_docs_v42/methods/contacts_getBlocked.md | 9 +++------ old_docs/API_docs_v42/methods/contacts_getContacts.md | 9 +++------ old_docs/API_docs_v42/methods/contacts_getStatuses.md | 9 +++------ old_docs/API_docs_v42/methods/contacts_getSuggested.md | 9 +++------ old_docs/API_docs_v42/methods/contacts_importCard.md | 9 +++------ old_docs/API_docs_v42/methods/contacts_importContacts.md | 9 +++------ old_docs/API_docs_v42/methods/contacts_search.md | 9 +++------ old_docs/API_docs_v42/methods/contacts_unblock.md | 9 +++------ old_docs/API_docs_v42/methods/help_getAppChangelog.md | 9 +++------ old_docs/API_docs_v42/methods/help_getAppUpdate.md | 9 +++------ old_docs/API_docs_v42/methods/help_getConfig.md | 9 +++------ old_docs/API_docs_v42/methods/help_getInviteText.md | 9 +++------ old_docs/API_docs_v42/methods/help_getNearestDc.md | 9 +++------ old_docs/API_docs_v42/methods/help_getSupport.md | 9 +++------ old_docs/API_docs_v42/methods/help_saveAppLog.md | 9 +++------ old_docs/API_docs_v42/methods/initConnection.md | 9 +++------ old_docs/API_docs_v42/methods/invokeAfterMsg.md | 9 +++------ old_docs/API_docs_v42/methods/invokeAfterMsgs.md | 9 +++------ old_docs/API_docs_v42/methods/invokeWithLayer.md | 9 +++------ old_docs/API_docs_v42/methods/invokeWithoutUpdates.md | 9 +++------ old_docs/API_docs_v42/methods/messages_addChatUser.md | 9 +++------ .../API_docs_v42/methods/messages_checkChatInvite.md | 9 +++------ old_docs/API_docs_v42/methods/messages_createChat.md | 9 +++------ old_docs/API_docs_v42/methods/messages_deleteChatUser.md | 9 +++------ old_docs/API_docs_v42/methods/messages_deleteHistory.md | 9 +++------ old_docs/API_docs_v42/methods/messages_deleteMessages.md | 9 +++------ old_docs/API_docs_v42/methods/messages_editChatAdmin.md | 9 +++------ old_docs/API_docs_v42/methods/messages_editChatPhoto.md | 9 +++------ old_docs/API_docs_v42/methods/messages_editChatTitle.md | 9 +++------ .../API_docs_v42/methods/messages_exportChatInvite.md | 9 +++------ old_docs/API_docs_v42/methods/messages_forwardMessage.md | 9 +++------ .../API_docs_v42/methods/messages_forwardMessages.md | 9 +++------ old_docs/API_docs_v42/methods/messages_getAllStickers.md | 9 +++------ old_docs/API_docs_v42/methods/messages_getChats.md | 9 +++------ old_docs/API_docs_v42/methods/messages_getDhConfig.md | 9 +++------ old_docs/API_docs_v42/methods/messages_getDialogs.md | 9 +++------ old_docs/API_docs_v42/methods/messages_getHistory.md | 9 +++------ old_docs/API_docs_v42/methods/messages_getMessages.md | 9 +++------ .../API_docs_v42/methods/messages_getMessagesViews.md | 9 +++------ old_docs/API_docs_v42/methods/messages_getStickerSet.md | 9 +++------ old_docs/API_docs_v42/methods/messages_getStickers.md | 9 +++------ .../API_docs_v42/methods/messages_getWebPagePreview.md | 9 +++------ .../API_docs_v42/methods/messages_importChatInvite.md | 9 +++------ .../API_docs_v42/methods/messages_installStickerSet.md | 9 +++------ old_docs/API_docs_v42/methods/messages_migrateChat.md | 9 +++------ .../methods/messages_readEncryptedHistory.md | 9 +++------ old_docs/API_docs_v42/methods/messages_readHistory.md | 9 +++------ .../API_docs_v42/methods/messages_readMessageContents.md | 9 +++------ .../API_docs_v42/methods/messages_receivedMessages.md | 9 +++------ old_docs/API_docs_v42/methods/messages_receivedQueue.md | 9 +++------ old_docs/API_docs_v42/methods/messages_reportSpam.md | 9 +++------ old_docs/API_docs_v42/methods/messages_search.md | 9 +++------ old_docs/API_docs_v42/methods/messages_searchGlobal.md | 9 +++------ old_docs/API_docs_v42/methods/messages_sendBroadcast.md | 9 +++------ old_docs/API_docs_v42/methods/messages_sendEncrypted.md | 9 +++------ .../API_docs_v42/methods/messages_sendEncryptedFile.md | 9 +++------ .../methods/messages_sendEncryptedService.md | 9 +++------ old_docs/API_docs_v42/methods/messages_sendMedia.md | 9 +++------ old_docs/API_docs_v42/methods/messages_sendMessage.md | 9 +++------ .../API_docs_v42/methods/messages_setEncryptedTyping.md | 9 +++------ old_docs/API_docs_v42/methods/messages_setTyping.md | 9 +++------ old_docs/API_docs_v42/methods/messages_startBot.md | 9 +++------ .../API_docs_v42/methods/messages_toggleChatAdmins.md | 9 +++------ .../API_docs_v42/methods/messages_uninstallStickerSet.md | 9 +++------ old_docs/API_docs_v42/methods/photos_deletePhotos.md | 9 +++------ old_docs/API_docs_v42/methods/photos_getUserPhotos.md | 9 +++------ .../API_docs_v42/methods/photos_updateProfilePhoto.md | 9 +++------ .../API_docs_v42/methods/photos_uploadProfilePhoto.md | 9 +++------ old_docs/API_docs_v42/methods/users_getUsers.md | 9 +++------ old_docs/API_docs_v44/methods/account_changePhone.md | 9 +++------ old_docs/API_docs_v44/methods/account_checkUsername.md | 9 +++------ old_docs/API_docs_v44/methods/account_deleteAccount.md | 9 +++------ old_docs/API_docs_v44/methods/account_getAccountTTL.md | 9 +++------ .../API_docs_v44/methods/account_getAuthorizations.md | 9 +++------ .../API_docs_v44/methods/account_getNotifySettings.md | 9 +++------ old_docs/API_docs_v44/methods/account_getPassword.md | 9 +++------ .../API_docs_v44/methods/account_getPasswordSettings.md | 9 +++------ old_docs/API_docs_v44/methods/account_getPrivacy.md | 9 +++------ old_docs/API_docs_v44/methods/account_getWallPapers.md | 9 +++------ old_docs/API_docs_v44/methods/account_registerDevice.md | 9 +++------ old_docs/API_docs_v44/methods/account_reportPeer.md | 9 +++------ .../API_docs_v44/methods/account_resetAuthorization.md | 9 +++------ .../API_docs_v44/methods/account_resetNotifySettings.md | 9 +++------ .../API_docs_v44/methods/account_sendChangePhoneCode.md | 9 +++------ old_docs/API_docs_v44/methods/account_setAccountTTL.md | 9 +++------ old_docs/API_docs_v44/methods/account_setPrivacy.md | 9 +++------ .../API_docs_v44/methods/account_unregisterDevice.md | 9 +++------ .../API_docs_v44/methods/account_updateDeviceLocked.md | 9 +++------ .../API_docs_v44/methods/account_updateNotifySettings.md | 9 +++------ .../methods/account_updatePasswordSettings.md | 9 +++------ old_docs/API_docs_v44/methods/account_updateProfile.md | 9 +++------ old_docs/API_docs_v44/methods/account_updateStatus.md | 9 +++------ old_docs/API_docs_v44/methods/account_updateUsername.md | 9 +++------ old_docs/API_docs_v44/methods/auth_bindTempAuthKey.md | 9 +++------ old_docs/API_docs_v44/methods/auth_checkPassword.md | 9 +++------ old_docs/API_docs_v44/methods/auth_checkPhone.md | 9 +++------ .../API_docs_v44/methods/auth_exportAuthorization.md | 9 +++------ .../API_docs_v44/methods/auth_importAuthorization.md | 9 +++------ old_docs/API_docs_v44/methods/auth_recoverPassword.md | 9 +++------ .../API_docs_v44/methods/auth_requestPasswordRecovery.md | 9 +++------ .../API_docs_v44/methods/auth_resetAuthorizations.md | 9 +++------ old_docs/API_docs_v44/methods/auth_sendCall.md | 9 +++------ old_docs/API_docs_v44/methods/auth_sendInvites.md | 9 +++------ old_docs/API_docs_v44/methods/auth_sendSms.md | 9 +++------ old_docs/API_docs_v44/methods/channels_checkUsername.md | 9 +++------ old_docs/API_docs_v44/methods/channels_createChannel.md | 9 +++------ old_docs/API_docs_v44/methods/channels_deleteChannel.md | 9 +++------ old_docs/API_docs_v44/methods/channels_deleteMessages.md | 9 +++------ .../API_docs_v44/methods/channels_deleteUserHistory.md | 9 +++------ old_docs/API_docs_v44/methods/channels_editAbout.md | 9 +++------ old_docs/API_docs_v44/methods/channels_editAdmin.md | 9 +++------ old_docs/API_docs_v44/methods/channels_editPhoto.md | 9 +++------ old_docs/API_docs_v44/methods/channels_editTitle.md | 9 +++------ old_docs/API_docs_v44/methods/channels_exportInvite.md | 9 +++------ old_docs/API_docs_v44/methods/channels_getChannels.md | 9 +++------ old_docs/API_docs_v44/methods/channels_getDialogs.md | 9 +++------ .../API_docs_v44/methods/channels_getImportantHistory.md | 9 +++------ old_docs/API_docs_v44/methods/channels_getMessages.md | 9 +++------ old_docs/API_docs_v44/methods/channels_getParticipant.md | 9 +++------ .../API_docs_v44/methods/channels_inviteToChannel.md | 9 +++------ old_docs/API_docs_v44/methods/channels_joinChannel.md | 9 +++------ .../API_docs_v44/methods/channels_kickFromChannel.md | 9 +++------ old_docs/API_docs_v44/methods/channels_leaveChannel.md | 9 +++------ old_docs/API_docs_v44/methods/channels_readHistory.md | 9 +++------ old_docs/API_docs_v44/methods/channels_reportSpam.md | 9 +++------ old_docs/API_docs_v44/methods/channels_toggleComments.md | 9 +++------ old_docs/API_docs_v44/methods/channels_updateUsername.md | 9 +++------ old_docs/API_docs_v44/methods/contacts_block.md | 9 +++------ old_docs/API_docs_v44/methods/contacts_deleteContact.md | 9 +++------ old_docs/API_docs_v44/methods/contacts_deleteContacts.md | 9 +++------ old_docs/API_docs_v44/methods/contacts_exportCard.md | 9 +++------ old_docs/API_docs_v44/methods/contacts_getBlocked.md | 9 +++------ old_docs/API_docs_v44/methods/contacts_getContacts.md | 9 +++------ old_docs/API_docs_v44/methods/contacts_getStatuses.md | 9 +++------ old_docs/API_docs_v44/methods/contacts_getSuggested.md | 9 +++------ old_docs/API_docs_v44/methods/contacts_importCard.md | 9 +++------ old_docs/API_docs_v44/methods/contacts_importContacts.md | 9 +++------ old_docs/API_docs_v44/methods/contacts_search.md | 9 +++------ old_docs/API_docs_v44/methods/contacts_unblock.md | 9 +++------ old_docs/API_docs_v44/methods/help_getAppChangelog.md | 9 +++------ old_docs/API_docs_v44/methods/help_getAppUpdate.md | 9 +++------ old_docs/API_docs_v44/methods/help_getConfig.md | 9 +++------ old_docs/API_docs_v44/methods/help_getInviteText.md | 9 +++------ old_docs/API_docs_v44/methods/help_getNearestDc.md | 9 +++------ old_docs/API_docs_v44/methods/help_getSupport.md | 9 +++------ old_docs/API_docs_v44/methods/help_getTermsOfService.md | 9 +++------ old_docs/API_docs_v44/methods/help_saveAppLog.md | 9 +++------ old_docs/API_docs_v44/methods/initConnection.md | 9 +++------ old_docs/API_docs_v44/methods/invokeAfterMsg.md | 9 +++------ old_docs/API_docs_v44/methods/invokeAfterMsgs.md | 9 +++------ old_docs/API_docs_v44/methods/invokeWithLayer.md | 9 +++------ old_docs/API_docs_v44/methods/invokeWithoutUpdates.md | 9 +++------ old_docs/API_docs_v44/methods/messages_addChatUser.md | 9 +++------ .../API_docs_v44/methods/messages_checkChatInvite.md | 9 +++------ old_docs/API_docs_v44/methods/messages_createChat.md | 9 +++------ old_docs/API_docs_v44/methods/messages_deleteChatUser.md | 9 +++------ old_docs/API_docs_v44/methods/messages_deleteHistory.md | 9 +++------ old_docs/API_docs_v44/methods/messages_deleteMessages.md | 9 +++------ old_docs/API_docs_v44/methods/messages_editChatAdmin.md | 9 +++------ old_docs/API_docs_v44/methods/messages_editChatPhoto.md | 9 +++------ old_docs/API_docs_v44/methods/messages_editChatTitle.md | 9 +++------ .../API_docs_v44/methods/messages_exportChatInvite.md | 9 +++------ old_docs/API_docs_v44/methods/messages_forwardMessage.md | 9 +++------ .../API_docs_v44/methods/messages_forwardMessages.md | 9 +++------ old_docs/API_docs_v44/methods/messages_getAllStickers.md | 9 +++------ old_docs/API_docs_v44/methods/messages_getChats.md | 9 +++------ old_docs/API_docs_v44/methods/messages_getDhConfig.md | 9 +++------ old_docs/API_docs_v44/methods/messages_getDialogs.md | 9 +++------ .../API_docs_v44/methods/messages_getDocumentByHash.md | 9 +++------ old_docs/API_docs_v44/methods/messages_getHistory.md | 9 +++------ old_docs/API_docs_v44/methods/messages_getMessages.md | 9 +++------ .../API_docs_v44/methods/messages_getMessagesViews.md | 9 +++------ old_docs/API_docs_v44/methods/messages_getStickerSet.md | 9 +++------ old_docs/API_docs_v44/methods/messages_getStickers.md | 9 +++------ .../API_docs_v44/methods/messages_getWebPagePreview.md | 9 +++------ .../API_docs_v44/methods/messages_importChatInvite.md | 9 +++------ .../API_docs_v44/methods/messages_installStickerSet.md | 9 +++------ old_docs/API_docs_v44/methods/messages_migrateChat.md | 9 +++------ .../methods/messages_readEncryptedHistory.md | 9 +++------ old_docs/API_docs_v44/methods/messages_readHistory.md | 9 +++------ .../API_docs_v44/methods/messages_readMessageContents.md | 9 +++------ .../API_docs_v44/methods/messages_receivedMessages.md | 9 +++------ old_docs/API_docs_v44/methods/messages_receivedQueue.md | 9 +++------ .../API_docs_v44/methods/messages_reorderStickerSets.md | 9 +++------ old_docs/API_docs_v44/methods/messages_reportSpam.md | 9 +++------ old_docs/API_docs_v44/methods/messages_search.md | 9 +++------ old_docs/API_docs_v44/methods/messages_searchGifs.md | 9 +++------ old_docs/API_docs_v44/methods/messages_searchGlobal.md | 9 +++------ old_docs/API_docs_v44/methods/messages_sendBroadcast.md | 9 +++------ old_docs/API_docs_v44/methods/messages_sendEncrypted.md | 9 +++------ .../API_docs_v44/methods/messages_sendEncryptedFile.md | 9 +++------ .../methods/messages_sendEncryptedService.md | 9 +++------ old_docs/API_docs_v44/methods/messages_sendMedia.md | 9 +++------ old_docs/API_docs_v44/methods/messages_sendMessage.md | 9 +++------ .../API_docs_v44/methods/messages_setEncryptedTyping.md | 9 +++------ old_docs/API_docs_v44/methods/messages_setTyping.md | 9 +++------ old_docs/API_docs_v44/methods/messages_startBot.md | 9 +++------ .../API_docs_v44/methods/messages_toggleChatAdmins.md | 9 +++------ .../API_docs_v44/methods/messages_uninstallStickerSet.md | 9 +++------ old_docs/API_docs_v44/methods/photos_deletePhotos.md | 9 +++------ old_docs/API_docs_v44/methods/photos_getUserPhotos.md | 9 +++------ .../API_docs_v44/methods/photos_updateProfilePhoto.md | 9 +++------ .../API_docs_v44/methods/photos_uploadProfilePhoto.md | 9 +++------ old_docs/API_docs_v44/methods/users_getUsers.md | 9 +++------ old_docs/API_docs_v45/methods/account_changePhone.md | 9 +++------ old_docs/API_docs_v45/methods/account_checkUsername.md | 9 +++------ old_docs/API_docs_v45/methods/account_deleteAccount.md | 9 +++------ old_docs/API_docs_v45/methods/account_getAccountTTL.md | 9 +++------ .../API_docs_v45/methods/account_getAuthorizations.md | 9 +++------ .../API_docs_v45/methods/account_getNotifySettings.md | 9 +++------ old_docs/API_docs_v45/methods/account_getPassword.md | 9 +++------ .../API_docs_v45/methods/account_getPasswordSettings.md | 9 +++------ old_docs/API_docs_v45/methods/account_getPrivacy.md | 9 +++------ old_docs/API_docs_v45/methods/account_getWallPapers.md | 9 +++------ old_docs/API_docs_v45/methods/account_registerDevice.md | 9 +++------ old_docs/API_docs_v45/methods/account_reportPeer.md | 9 +++------ .../API_docs_v45/methods/account_resetAuthorization.md | 9 +++------ .../API_docs_v45/methods/account_resetNotifySettings.md | 9 +++------ .../API_docs_v45/methods/account_sendChangePhoneCode.md | 9 +++------ old_docs/API_docs_v45/methods/account_setAccountTTL.md | 9 +++------ old_docs/API_docs_v45/methods/account_setPrivacy.md | 9 +++------ .../API_docs_v45/methods/account_unregisterDevice.md | 9 +++------ .../API_docs_v45/methods/account_updateDeviceLocked.md | 9 +++------ .../API_docs_v45/methods/account_updateNotifySettings.md | 9 +++------ .../methods/account_updatePasswordSettings.md | 9 +++------ old_docs/API_docs_v45/methods/account_updateProfile.md | 9 +++------ old_docs/API_docs_v45/methods/account_updateStatus.md | 9 +++------ old_docs/API_docs_v45/methods/account_updateUsername.md | 9 +++------ old_docs/API_docs_v45/methods/auth_bindTempAuthKey.md | 9 +++------ old_docs/API_docs_v45/methods/auth_checkPassword.md | 9 +++------ old_docs/API_docs_v45/methods/auth_checkPhone.md | 9 +++------ .../API_docs_v45/methods/auth_exportAuthorization.md | 9 +++------ .../API_docs_v45/methods/auth_importAuthorization.md | 9 +++------ old_docs/API_docs_v45/methods/auth_recoverPassword.md | 9 +++------ .../API_docs_v45/methods/auth_requestPasswordRecovery.md | 9 +++------ .../API_docs_v45/methods/auth_resetAuthorizations.md | 9 +++------ old_docs/API_docs_v45/methods/auth_sendCall.md | 9 +++------ old_docs/API_docs_v45/methods/auth_sendInvites.md | 9 +++------ old_docs/API_docs_v45/methods/auth_sendSms.md | 9 +++------ old_docs/API_docs_v45/methods/channels_checkUsername.md | 9 +++------ old_docs/API_docs_v45/methods/channels_createChannel.md | 9 +++------ old_docs/API_docs_v45/methods/channels_deleteChannel.md | 9 +++------ old_docs/API_docs_v45/methods/channels_deleteMessages.md | 9 +++------ .../API_docs_v45/methods/channels_deleteUserHistory.md | 9 +++------ old_docs/API_docs_v45/methods/channels_editAbout.md | 9 +++------ old_docs/API_docs_v45/methods/channels_editAdmin.md | 9 +++------ old_docs/API_docs_v45/methods/channels_editPhoto.md | 9 +++------ old_docs/API_docs_v45/methods/channels_editTitle.md | 9 +++------ old_docs/API_docs_v45/methods/channels_exportInvite.md | 9 +++------ old_docs/API_docs_v45/methods/channels_getChannels.md | 9 +++------ old_docs/API_docs_v45/methods/channels_getDialogs.md | 9 +++------ .../API_docs_v45/methods/channels_getImportantHistory.md | 9 +++------ old_docs/API_docs_v45/methods/channels_getMessages.md | 9 +++------ old_docs/API_docs_v45/methods/channels_getParticipant.md | 9 +++------ .../API_docs_v45/methods/channels_inviteToChannel.md | 9 +++------ old_docs/API_docs_v45/methods/channels_joinChannel.md | 9 +++------ .../API_docs_v45/methods/channels_kickFromChannel.md | 9 +++------ old_docs/API_docs_v45/methods/channels_leaveChannel.md | 9 +++------ old_docs/API_docs_v45/methods/channels_readHistory.md | 9 +++------ old_docs/API_docs_v45/methods/channels_reportSpam.md | 9 +++------ old_docs/API_docs_v45/methods/channels_toggleComments.md | 9 +++------ old_docs/API_docs_v45/methods/channels_updateUsername.md | 9 +++------ old_docs/API_docs_v45/methods/contacts_block.md | 9 +++------ old_docs/API_docs_v45/methods/contacts_deleteContact.md | 9 +++------ old_docs/API_docs_v45/methods/contacts_deleteContacts.md | 9 +++------ old_docs/API_docs_v45/methods/contacts_exportCard.md | 9 +++------ old_docs/API_docs_v45/methods/contacts_getBlocked.md | 9 +++------ old_docs/API_docs_v45/methods/contacts_getContacts.md | 9 +++------ old_docs/API_docs_v45/methods/contacts_getStatuses.md | 9 +++------ old_docs/API_docs_v45/methods/contacts_getSuggested.md | 9 +++------ old_docs/API_docs_v45/methods/contacts_importCard.md | 9 +++------ old_docs/API_docs_v45/methods/contacts_importContacts.md | 9 +++------ old_docs/API_docs_v45/methods/contacts_search.md | 9 +++------ old_docs/API_docs_v45/methods/contacts_unblock.md | 9 +++------ old_docs/API_docs_v45/methods/help_getAppChangelog.md | 9 +++------ old_docs/API_docs_v45/methods/help_getAppUpdate.md | 9 +++------ old_docs/API_docs_v45/methods/help_getConfig.md | 9 +++------ old_docs/API_docs_v45/methods/help_getInviteText.md | 9 +++------ old_docs/API_docs_v45/methods/help_getNearestDc.md | 9 +++------ old_docs/API_docs_v45/methods/help_getSupport.md | 9 +++------ old_docs/API_docs_v45/methods/help_getTermsOfService.md | 9 +++------ old_docs/API_docs_v45/methods/help_saveAppLog.md | 9 +++------ old_docs/API_docs_v45/methods/initConnection.md | 9 +++------ old_docs/API_docs_v45/methods/invokeAfterMsg.md | 9 +++------ old_docs/API_docs_v45/methods/invokeAfterMsgs.md | 9 +++------ old_docs/API_docs_v45/methods/invokeWithLayer.md | 9 +++------ old_docs/API_docs_v45/methods/invokeWithoutUpdates.md | 9 +++------ old_docs/API_docs_v45/methods/messages_addChatUser.md | 9 +++------ .../API_docs_v45/methods/messages_checkChatInvite.md | 9 +++------ old_docs/API_docs_v45/methods/messages_createChat.md | 9 +++------ old_docs/API_docs_v45/methods/messages_deleteChatUser.md | 9 +++------ old_docs/API_docs_v45/methods/messages_deleteHistory.md | 9 +++------ old_docs/API_docs_v45/methods/messages_deleteMessages.md | 9 +++------ old_docs/API_docs_v45/methods/messages_editChatAdmin.md | 9 +++------ old_docs/API_docs_v45/methods/messages_editChatPhoto.md | 9 +++------ old_docs/API_docs_v45/methods/messages_editChatTitle.md | 9 +++------ .../API_docs_v45/methods/messages_exportChatInvite.md | 9 +++------ old_docs/API_docs_v45/methods/messages_forwardMessage.md | 9 +++------ .../API_docs_v45/methods/messages_forwardMessages.md | 9 +++------ old_docs/API_docs_v45/methods/messages_getAllStickers.md | 9 +++------ old_docs/API_docs_v45/methods/messages_getChats.md | 9 +++------ old_docs/API_docs_v45/methods/messages_getDhConfig.md | 9 +++------ old_docs/API_docs_v45/methods/messages_getDialogs.md | 9 +++------ .../API_docs_v45/methods/messages_getDocumentByHash.md | 9 +++------ old_docs/API_docs_v45/methods/messages_getHistory.md | 9 +++------ .../API_docs_v45/methods/messages_getInlineBotResults.md | 9 +++------ old_docs/API_docs_v45/methods/messages_getMessages.md | 9 +++------ .../API_docs_v45/methods/messages_getMessagesViews.md | 9 +++------ old_docs/API_docs_v45/methods/messages_getSavedGifs.md | 9 +++------ old_docs/API_docs_v45/methods/messages_getStickerSet.md | 9 +++------ old_docs/API_docs_v45/methods/messages_getStickers.md | 9 +++------ .../API_docs_v45/methods/messages_getWebPagePreview.md | 9 +++------ .../API_docs_v45/methods/messages_importChatInvite.md | 9 +++------ .../API_docs_v45/methods/messages_installStickerSet.md | 9 +++------ old_docs/API_docs_v45/methods/messages_migrateChat.md | 9 +++------ .../methods/messages_readEncryptedHistory.md | 9 +++------ old_docs/API_docs_v45/methods/messages_readHistory.md | 9 +++------ .../API_docs_v45/methods/messages_readMessageContents.md | 9 +++------ .../API_docs_v45/methods/messages_receivedMessages.md | 9 +++------ old_docs/API_docs_v45/methods/messages_receivedQueue.md | 9 +++------ .../API_docs_v45/methods/messages_reorderStickerSets.md | 9 +++------ old_docs/API_docs_v45/methods/messages_reportSpam.md | 9 +++------ old_docs/API_docs_v45/methods/messages_saveGif.md | 9 +++------ old_docs/API_docs_v45/methods/messages_search.md | 9 +++------ old_docs/API_docs_v45/methods/messages_searchGifs.md | 9 +++------ old_docs/API_docs_v45/methods/messages_searchGlobal.md | 9 +++------ old_docs/API_docs_v45/methods/messages_sendBroadcast.md | 9 +++------ old_docs/API_docs_v45/methods/messages_sendEncrypted.md | 9 +++------ .../API_docs_v45/methods/messages_sendEncryptedFile.md | 9 +++------ .../methods/messages_sendEncryptedService.md | 9 +++------ .../API_docs_v45/methods/messages_sendInlineBotResult.md | 9 +++------ old_docs/API_docs_v45/methods/messages_sendMedia.md | 9 +++------ old_docs/API_docs_v45/methods/messages_sendMessage.md | 9 +++------ .../API_docs_v45/methods/messages_setEncryptedTyping.md | 9 +++------ .../API_docs_v45/methods/messages_setInlineBotResults.md | 9 +++------ old_docs/API_docs_v45/methods/messages_setTyping.md | 9 +++------ old_docs/API_docs_v45/methods/messages_startBot.md | 9 +++------ .../API_docs_v45/methods/messages_toggleChatAdmins.md | 9 +++------ .../API_docs_v45/methods/messages_uninstallStickerSet.md | 9 +++------ old_docs/API_docs_v45/methods/photos_deletePhotos.md | 9 +++------ old_docs/API_docs_v45/methods/photos_getUserPhotos.md | 9 +++------ .../API_docs_v45/methods/photos_updateProfilePhoto.md | 9 +++------ .../API_docs_v45/methods/photos_uploadProfilePhoto.md | 9 +++------ old_docs/API_docs_v45/methods/users_getUsers.md | 9 +++------ old_docs/API_docs_v46/methods/account_changePhone.md | 9 +++------ old_docs/API_docs_v46/methods/account_checkUsername.md | 9 +++------ old_docs/API_docs_v46/methods/account_deleteAccount.md | 9 +++------ old_docs/API_docs_v46/methods/account_getAccountTTL.md | 9 +++------ .../API_docs_v46/methods/account_getAuthorizations.md | 9 +++------ .../API_docs_v46/methods/account_getNotifySettings.md | 9 +++------ old_docs/API_docs_v46/methods/account_getPassword.md | 9 +++------ .../API_docs_v46/methods/account_getPasswordSettings.md | 9 +++------ old_docs/API_docs_v46/methods/account_getPrivacy.md | 9 +++------ old_docs/API_docs_v46/methods/account_getWallPapers.md | 9 +++------ old_docs/API_docs_v46/methods/account_registerDevice.md | 9 +++------ old_docs/API_docs_v46/methods/account_reportPeer.md | 9 +++------ .../API_docs_v46/methods/account_resetAuthorization.md | 9 +++------ .../API_docs_v46/methods/account_resetNotifySettings.md | 9 +++------ .../API_docs_v46/methods/account_sendChangePhoneCode.md | 9 +++------ old_docs/API_docs_v46/methods/account_setAccountTTL.md | 9 +++------ old_docs/API_docs_v46/methods/account_setPrivacy.md | 9 +++------ .../API_docs_v46/methods/account_unregisterDevice.md | 9 +++------ .../API_docs_v46/methods/account_updateDeviceLocked.md | 9 +++------ .../API_docs_v46/methods/account_updateNotifySettings.md | 9 +++------ .../methods/account_updatePasswordSettings.md | 9 +++------ old_docs/API_docs_v46/methods/account_updateProfile.md | 9 +++------ old_docs/API_docs_v46/methods/account_updateStatus.md | 9 +++------ old_docs/API_docs_v46/methods/account_updateUsername.md | 9 +++------ old_docs/API_docs_v46/methods/auth_bindTempAuthKey.md | 9 +++------ old_docs/API_docs_v46/methods/auth_checkPassword.md | 9 +++------ old_docs/API_docs_v46/methods/auth_checkPhone.md | 9 +++------ .../API_docs_v46/methods/auth_exportAuthorization.md | 9 +++------ .../API_docs_v46/methods/auth_importAuthorization.md | 9 +++------ old_docs/API_docs_v46/methods/auth_recoverPassword.md | 9 +++------ .../API_docs_v46/methods/auth_requestPasswordRecovery.md | 9 +++------ .../API_docs_v46/methods/auth_resetAuthorizations.md | 9 +++------ old_docs/API_docs_v46/methods/auth_sendCall.md | 9 +++------ old_docs/API_docs_v46/methods/auth_sendInvites.md | 9 +++------ old_docs/API_docs_v46/methods/auth_sendSms.md | 9 +++------ old_docs/API_docs_v46/methods/channels_checkUsername.md | 9 +++------ old_docs/API_docs_v46/methods/channels_createChannel.md | 9 +++------ old_docs/API_docs_v46/methods/channels_deleteChannel.md | 9 +++------ old_docs/API_docs_v46/methods/channels_deleteMessages.md | 9 +++------ .../API_docs_v46/methods/channels_deleteUserHistory.md | 9 +++------ old_docs/API_docs_v46/methods/channels_editAbout.md | 9 +++------ old_docs/API_docs_v46/methods/channels_editAdmin.md | 9 +++------ old_docs/API_docs_v46/methods/channels_editPhoto.md | 9 +++------ old_docs/API_docs_v46/methods/channels_editTitle.md | 9 +++------ old_docs/API_docs_v46/methods/channels_exportInvite.md | 9 +++------ old_docs/API_docs_v46/methods/channels_getChannels.md | 9 +++------ old_docs/API_docs_v46/methods/channels_getDialogs.md | 9 +++------ .../API_docs_v46/methods/channels_getImportantHistory.md | 9 +++------ old_docs/API_docs_v46/methods/channels_getMessages.md | 9 +++------ old_docs/API_docs_v46/methods/channels_getParticipant.md | 9 +++------ .../API_docs_v46/methods/channels_inviteToChannel.md | 9 +++------ old_docs/API_docs_v46/methods/channels_joinChannel.md | 9 +++------ .../API_docs_v46/methods/channels_kickFromChannel.md | 9 +++------ old_docs/API_docs_v46/methods/channels_leaveChannel.md | 9 +++------ old_docs/API_docs_v46/methods/channels_readHistory.md | 9 +++------ old_docs/API_docs_v46/methods/channels_reportSpam.md | 9 +++------ old_docs/API_docs_v46/methods/channels_toggleComments.md | 9 +++------ old_docs/API_docs_v46/methods/channels_updateUsername.md | 9 +++------ old_docs/API_docs_v46/methods/contacts_block.md | 9 +++------ old_docs/API_docs_v46/methods/contacts_deleteContact.md | 9 +++------ old_docs/API_docs_v46/methods/contacts_deleteContacts.md | 9 +++------ old_docs/API_docs_v46/methods/contacts_exportCard.md | 9 +++------ old_docs/API_docs_v46/methods/contacts_getBlocked.md | 9 +++------ old_docs/API_docs_v46/methods/contacts_getContacts.md | 9 +++------ old_docs/API_docs_v46/methods/contacts_getStatuses.md | 9 +++------ old_docs/API_docs_v46/methods/contacts_getSuggested.md | 9 +++------ old_docs/API_docs_v46/methods/contacts_importCard.md | 9 +++------ old_docs/API_docs_v46/methods/contacts_importContacts.md | 9 +++------ old_docs/API_docs_v46/methods/contacts_search.md | 9 +++------ old_docs/API_docs_v46/methods/contacts_unblock.md | 9 +++------ old_docs/API_docs_v46/methods/help_getAppChangelog.md | 9 +++------ old_docs/API_docs_v46/methods/help_getAppUpdate.md | 9 +++------ old_docs/API_docs_v46/methods/help_getConfig.md | 9 +++------ old_docs/API_docs_v46/methods/help_getInviteText.md | 9 +++------ old_docs/API_docs_v46/methods/help_getNearestDc.md | 9 +++------ old_docs/API_docs_v46/methods/help_getSupport.md | 9 +++------ old_docs/API_docs_v46/methods/help_getTermsOfService.md | 9 +++------ old_docs/API_docs_v46/methods/help_saveAppLog.md | 9 +++------ old_docs/API_docs_v46/methods/initConnection.md | 9 +++------ old_docs/API_docs_v46/methods/invokeAfterMsg.md | 9 +++------ old_docs/API_docs_v46/methods/invokeAfterMsgs.md | 9 +++------ old_docs/API_docs_v46/methods/invokeWithLayer.md | 9 +++------ old_docs/API_docs_v46/methods/invokeWithoutUpdates.md | 9 +++------ old_docs/API_docs_v46/methods/messages_addChatUser.md | 9 +++------ .../API_docs_v46/methods/messages_checkChatInvite.md | 9 +++------ old_docs/API_docs_v46/methods/messages_createChat.md | 9 +++------ old_docs/API_docs_v46/methods/messages_deleteChatUser.md | 9 +++------ old_docs/API_docs_v46/methods/messages_deleteHistory.md | 9 +++------ old_docs/API_docs_v46/methods/messages_deleteMessages.md | 9 +++------ old_docs/API_docs_v46/methods/messages_editChatAdmin.md | 9 +++------ old_docs/API_docs_v46/methods/messages_editChatPhoto.md | 9 +++------ old_docs/API_docs_v46/methods/messages_editChatTitle.md | 9 +++------ .../API_docs_v46/methods/messages_exportChatInvite.md | 9 +++------ old_docs/API_docs_v46/methods/messages_forwardMessage.md | 9 +++------ .../API_docs_v46/methods/messages_forwardMessages.md | 9 +++------ old_docs/API_docs_v46/methods/messages_getAllStickers.md | 9 +++------ old_docs/API_docs_v46/methods/messages_getChats.md | 9 +++------ old_docs/API_docs_v46/methods/messages_getDhConfig.md | 9 +++------ old_docs/API_docs_v46/methods/messages_getDialogs.md | 9 +++------ .../API_docs_v46/methods/messages_getDocumentByHash.md | 9 +++------ old_docs/API_docs_v46/methods/messages_getHistory.md | 9 +++------ .../API_docs_v46/methods/messages_getInlineBotResults.md | 9 +++------ old_docs/API_docs_v46/methods/messages_getMessages.md | 9 +++------ .../API_docs_v46/methods/messages_getMessagesViews.md | 9 +++------ old_docs/API_docs_v46/methods/messages_getSavedGifs.md | 9 +++------ old_docs/API_docs_v46/methods/messages_getStickerSet.md | 9 +++------ old_docs/API_docs_v46/methods/messages_getStickers.md | 9 +++------ .../API_docs_v46/methods/messages_getWebPagePreview.md | 9 +++------ .../API_docs_v46/methods/messages_importChatInvite.md | 9 +++------ .../API_docs_v46/methods/messages_installStickerSet.md | 9 +++------ old_docs/API_docs_v46/methods/messages_migrateChat.md | 9 +++------ .../methods/messages_readEncryptedHistory.md | 9 +++------ old_docs/API_docs_v46/methods/messages_readHistory.md | 9 +++------ .../API_docs_v46/methods/messages_readMessageContents.md | 9 +++------ .../API_docs_v46/methods/messages_receivedMessages.md | 9 +++------ old_docs/API_docs_v46/methods/messages_receivedQueue.md | 9 +++------ .../API_docs_v46/methods/messages_reorderStickerSets.md | 9 +++------ old_docs/API_docs_v46/methods/messages_reportSpam.md | 9 +++------ old_docs/API_docs_v46/methods/messages_saveGif.md | 9 +++------ old_docs/API_docs_v46/methods/messages_search.md | 9 +++------ old_docs/API_docs_v46/methods/messages_searchGifs.md | 9 +++------ old_docs/API_docs_v46/methods/messages_searchGlobal.md | 9 +++------ old_docs/API_docs_v46/methods/messages_sendBroadcast.md | 9 +++------ old_docs/API_docs_v46/methods/messages_sendEncrypted.md | 9 +++------ .../API_docs_v46/methods/messages_sendEncryptedFile.md | 9 +++------ .../methods/messages_sendEncryptedService.md | 9 +++------ .../API_docs_v46/methods/messages_sendInlineBotResult.md | 9 +++------ old_docs/API_docs_v46/methods/messages_sendMedia.md | 9 +++------ old_docs/API_docs_v46/methods/messages_sendMessage.md | 9 +++------ .../API_docs_v46/methods/messages_setEncryptedTyping.md | 9 +++------ .../API_docs_v46/methods/messages_setInlineBotResults.md | 9 +++------ old_docs/API_docs_v46/methods/messages_setTyping.md | 9 +++------ old_docs/API_docs_v46/methods/messages_startBot.md | 9 +++------ .../API_docs_v46/methods/messages_toggleChatAdmins.md | 9 +++------ .../API_docs_v46/methods/messages_uninstallStickerSet.md | 9 +++------ old_docs/API_docs_v46/methods/photos_deletePhotos.md | 9 +++------ old_docs/API_docs_v46/methods/photos_getUserPhotos.md | 9 +++------ .../API_docs_v46/methods/photos_updateProfilePhoto.md | 9 +++------ .../API_docs_v46/methods/photos_uploadProfilePhoto.md | 9 +++------ old_docs/API_docs_v46/methods/users_getUsers.md | 9 +++------ old_docs/API_docs_v51/methods/account_changePhone.md | 9 +++------ old_docs/API_docs_v51/methods/account_checkUsername.md | 9 +++------ old_docs/API_docs_v51/methods/account_deleteAccount.md | 9 +++------ old_docs/API_docs_v51/methods/account_getAccountTTL.md | 9 +++------ .../API_docs_v51/methods/account_getAuthorizations.md | 9 +++------ .../API_docs_v51/methods/account_getNotifySettings.md | 9 +++------ old_docs/API_docs_v51/methods/account_getPassword.md | 9 +++------ .../API_docs_v51/methods/account_getPasswordSettings.md | 9 +++------ old_docs/API_docs_v51/methods/account_getPrivacy.md | 9 +++------ old_docs/API_docs_v51/methods/account_getWallPapers.md | 9 +++------ old_docs/API_docs_v51/methods/account_registerDevice.md | 9 +++------ old_docs/API_docs_v51/methods/account_reportPeer.md | 9 +++------ .../API_docs_v51/methods/account_resetAuthorization.md | 9 +++------ .../API_docs_v51/methods/account_resetNotifySettings.md | 9 +++------ .../API_docs_v51/methods/account_sendChangePhoneCode.md | 9 +++------ old_docs/API_docs_v51/methods/account_setAccountTTL.md | 9 +++------ old_docs/API_docs_v51/methods/account_setPrivacy.md | 9 +++------ .../API_docs_v51/methods/account_unregisterDevice.md | 9 +++------ .../API_docs_v51/methods/account_updateDeviceLocked.md | 9 +++------ .../API_docs_v51/methods/account_updateNotifySettings.md | 9 +++------ .../methods/account_updatePasswordSettings.md | 9 +++------ old_docs/API_docs_v51/methods/account_updateProfile.md | 9 +++------ old_docs/API_docs_v51/methods/account_updateStatus.md | 9 +++------ old_docs/API_docs_v51/methods/account_updateUsername.md | 9 +++------ old_docs/API_docs_v51/methods/auth_bindTempAuthKey.md | 9 +++------ old_docs/API_docs_v51/methods/auth_cancelCode.md | 9 +++------ old_docs/API_docs_v51/methods/auth_checkPassword.md | 9 +++------ old_docs/API_docs_v51/methods/auth_checkPhone.md | 9 +++------ .../API_docs_v51/methods/auth_exportAuthorization.md | 9 +++------ .../API_docs_v51/methods/auth_importAuthorization.md | 9 +++------ old_docs/API_docs_v51/methods/auth_recoverPassword.md | 9 +++------ .../API_docs_v51/methods/auth_requestPasswordRecovery.md | 9 +++------ old_docs/API_docs_v51/methods/auth_resendCode.md | 9 +++------ .../API_docs_v51/methods/auth_resetAuthorizations.md | 9 +++------ old_docs/API_docs_v51/methods/auth_sendInvites.md | 9 +++------ old_docs/API_docs_v51/methods/channels_checkUsername.md | 9 +++------ old_docs/API_docs_v51/methods/channels_createChannel.md | 9 +++------ old_docs/API_docs_v51/methods/channels_deleteChannel.md | 9 +++------ old_docs/API_docs_v51/methods/channels_deleteMessages.md | 9 +++------ .../API_docs_v51/methods/channels_deleteUserHistory.md | 9 +++------ old_docs/API_docs_v51/methods/channels_editAbout.md | 9 +++------ old_docs/API_docs_v51/methods/channels_editAdmin.md | 9 +++------ old_docs/API_docs_v51/methods/channels_editPhoto.md | 9 +++------ old_docs/API_docs_v51/methods/channels_editTitle.md | 9 +++------ old_docs/API_docs_v51/methods/channels_exportInvite.md | 9 +++------ .../API_docs_v51/methods/channels_exportMessageLink.md | 9 +++------ old_docs/API_docs_v51/methods/channels_getChannels.md | 9 +++------ old_docs/API_docs_v51/methods/channels_getDialogs.md | 9 +++------ .../API_docs_v51/methods/channels_getImportantHistory.md | 9 +++------ old_docs/API_docs_v51/methods/channels_getMessages.md | 9 +++------ old_docs/API_docs_v51/methods/channels_getParticipant.md | 9 +++------ .../API_docs_v51/methods/channels_inviteToChannel.md | 9 +++------ old_docs/API_docs_v51/methods/channels_joinChannel.md | 9 +++------ .../API_docs_v51/methods/channels_kickFromChannel.md | 9 +++------ old_docs/API_docs_v51/methods/channels_leaveChannel.md | 9 +++------ old_docs/API_docs_v51/methods/channels_readHistory.md | 9 +++------ old_docs/API_docs_v51/methods/channels_reportSpam.md | 9 +++------ old_docs/API_docs_v51/methods/channels_toggleComments.md | 9 +++------ old_docs/API_docs_v51/methods/channels_toggleInvites.md | 9 +++------ .../API_docs_v51/methods/channels_toggleSignatures.md | 9 +++------ .../API_docs_v51/methods/channels_updatePinnedMessage.md | 9 +++------ old_docs/API_docs_v51/methods/channels_updateUsername.md | 9 +++------ old_docs/API_docs_v51/methods/contacts_block.md | 9 +++------ old_docs/API_docs_v51/methods/contacts_deleteContact.md | 9 +++------ old_docs/API_docs_v51/methods/contacts_deleteContacts.md | 9 +++------ old_docs/API_docs_v51/methods/contacts_exportCard.md | 9 +++------ old_docs/API_docs_v51/methods/contacts_getBlocked.md | 9 +++------ old_docs/API_docs_v51/methods/contacts_getContacts.md | 9 +++------ old_docs/API_docs_v51/methods/contacts_getStatuses.md | 9 +++------ old_docs/API_docs_v51/methods/contacts_importCard.md | 9 +++------ old_docs/API_docs_v51/methods/contacts_importContacts.md | 9 +++------ old_docs/API_docs_v51/methods/contacts_search.md | 9 +++------ old_docs/API_docs_v51/methods/contacts_unblock.md | 9 +++------ old_docs/API_docs_v51/methods/help_getAppChangelog.md | 9 +++------ old_docs/API_docs_v51/methods/help_getAppUpdate.md | 9 +++------ old_docs/API_docs_v51/methods/help_getConfig.md | 9 +++------ old_docs/API_docs_v51/methods/help_getInviteText.md | 9 +++------ old_docs/API_docs_v51/methods/help_getNearestDc.md | 9 +++------ old_docs/API_docs_v51/methods/help_getSupport.md | 9 +++------ old_docs/API_docs_v51/methods/help_getTermsOfService.md | 9 +++------ old_docs/API_docs_v51/methods/help_saveAppLog.md | 9 +++------ old_docs/API_docs_v51/methods/initConnection.md | 9 +++------ old_docs/API_docs_v51/methods/invokeAfterMsg.md | 9 +++------ old_docs/API_docs_v51/methods/invokeAfterMsgs.md | 9 +++------ old_docs/API_docs_v51/methods/invokeWithLayer.md | 9 +++------ old_docs/API_docs_v51/methods/invokeWithoutUpdates.md | 9 +++------ old_docs/API_docs_v51/methods/messages_addChatUser.md | 9 +++------ .../API_docs_v51/methods/messages_checkChatInvite.md | 9 +++------ old_docs/API_docs_v51/methods/messages_createChat.md | 9 +++------ old_docs/API_docs_v51/methods/messages_deleteChatUser.md | 9 +++------ old_docs/API_docs_v51/methods/messages_deleteHistory.md | 9 +++------ old_docs/API_docs_v51/methods/messages_deleteMessages.md | 9 +++------ old_docs/API_docs_v51/methods/messages_editChatAdmin.md | 9 +++------ old_docs/API_docs_v51/methods/messages_editChatPhoto.md | 9 +++------ old_docs/API_docs_v51/methods/messages_editChatTitle.md | 9 +++------ .../methods/messages_editInlineBotMessage.md | 9 +++------ old_docs/API_docs_v51/methods/messages_editMessage.md | 9 +++------ .../API_docs_v51/methods/messages_exportChatInvite.md | 9 +++------ old_docs/API_docs_v51/methods/messages_forwardMessage.md | 9 +++------ .../API_docs_v51/methods/messages_forwardMessages.md | 9 +++------ old_docs/API_docs_v51/methods/messages_getAllStickers.md | 9 +++------ .../methods/messages_getBotCallbackAnswer.md | 9 +++------ old_docs/API_docs_v51/methods/messages_getChats.md | 9 +++------ old_docs/API_docs_v51/methods/messages_getDhConfig.md | 9 +++------ old_docs/API_docs_v51/methods/messages_getDialogs.md | 9 +++------ .../API_docs_v51/methods/messages_getDocumentByHash.md | 9 +++------ old_docs/API_docs_v51/methods/messages_getHistory.md | 9 +++------ .../API_docs_v51/methods/messages_getInlineBotResults.md | 9 +++------ .../API_docs_v51/methods/messages_getMessageEditData.md | 9 +++------ old_docs/API_docs_v51/methods/messages_getMessages.md | 9 +++------ .../API_docs_v51/methods/messages_getMessagesViews.md | 9 +++------ .../API_docs_v51/methods/messages_getPeerSettings.md | 9 +++------ old_docs/API_docs_v51/methods/messages_getSavedGifs.md | 9 +++------ old_docs/API_docs_v51/methods/messages_getStickerSet.md | 9 +++------ old_docs/API_docs_v51/methods/messages_getStickers.md | 9 +++------ .../API_docs_v51/methods/messages_getWebPagePreview.md | 9 +++------ old_docs/API_docs_v51/methods/messages_hideReportSpam.md | 9 +++------ .../API_docs_v51/methods/messages_importChatInvite.md | 9 +++------ .../API_docs_v51/methods/messages_installStickerSet.md | 9 +++------ old_docs/API_docs_v51/methods/messages_migrateChat.md | 9 +++------ .../methods/messages_readEncryptedHistory.md | 9 +++------ old_docs/API_docs_v51/methods/messages_readHistory.md | 9 +++------ .../API_docs_v51/methods/messages_readMessageContents.md | 9 +++------ .../API_docs_v51/methods/messages_receivedMessages.md | 9 +++------ old_docs/API_docs_v51/methods/messages_receivedQueue.md | 9 +++------ .../API_docs_v51/methods/messages_reorderStickerSets.md | 9 +++------ old_docs/API_docs_v51/methods/messages_reportSpam.md | 9 +++------ old_docs/API_docs_v51/methods/messages_saveGif.md | 9 +++------ old_docs/API_docs_v51/methods/messages_search.md | 9 +++------ old_docs/API_docs_v51/methods/messages_searchGifs.md | 9 +++------ old_docs/API_docs_v51/methods/messages_searchGlobal.md | 9 +++------ old_docs/API_docs_v51/methods/messages_sendBroadcast.md | 9 +++------ old_docs/API_docs_v51/methods/messages_sendEncrypted.md | 9 +++------ .../API_docs_v51/methods/messages_sendEncryptedFile.md | 9 +++------ .../methods/messages_sendEncryptedService.md | 9 +++------ .../API_docs_v51/methods/messages_sendInlineBotResult.md | 9 +++------ old_docs/API_docs_v51/methods/messages_sendMedia.md | 9 +++------ old_docs/API_docs_v51/methods/messages_sendMessage.md | 9 +++------ .../methods/messages_setBotCallbackAnswer.md | 9 +++------ .../API_docs_v51/methods/messages_setEncryptedTyping.md | 9 +++------ .../API_docs_v51/methods/messages_setInlineBotResults.md | 9 +++------ old_docs/API_docs_v51/methods/messages_setTyping.md | 9 +++------ old_docs/API_docs_v51/methods/messages_startBot.md | 9 +++------ .../API_docs_v51/methods/messages_toggleChatAdmins.md | 9 +++------ .../API_docs_v51/methods/messages_uninstallStickerSet.md | 9 +++------ old_docs/API_docs_v51/methods/photos_deletePhotos.md | 9 +++------ old_docs/API_docs_v51/methods/photos_getUserPhotos.md | 9 +++------ .../API_docs_v51/methods/photos_updateProfilePhoto.md | 9 +++------ .../API_docs_v51/methods/photos_uploadProfilePhoto.md | 9 +++------ old_docs/API_docs_v51/methods/users_getUsers.md | 9 +++------ old_docs/API_docs_v53/methods/account_changePhone.md | 9 +++------ old_docs/API_docs_v53/methods/account_checkUsername.md | 9 +++------ old_docs/API_docs_v53/methods/account_deleteAccount.md | 9 +++------ old_docs/API_docs_v53/methods/account_getAccountTTL.md | 9 +++------ .../API_docs_v53/methods/account_getAuthorizations.md | 9 +++------ .../API_docs_v53/methods/account_getNotifySettings.md | 9 +++------ old_docs/API_docs_v53/methods/account_getPassword.md | 9 +++------ .../API_docs_v53/methods/account_getPasswordSettings.md | 9 +++------ old_docs/API_docs_v53/methods/account_getPrivacy.md | 9 +++------ old_docs/API_docs_v53/methods/account_getWallPapers.md | 9 +++------ old_docs/API_docs_v53/methods/account_registerDevice.md | 9 +++------ old_docs/API_docs_v53/methods/account_reportPeer.md | 9 +++------ .../API_docs_v53/methods/account_resetAuthorization.md | 9 +++------ .../API_docs_v53/methods/account_resetNotifySettings.md | 9 +++------ .../API_docs_v53/methods/account_sendChangePhoneCode.md | 9 +++------ old_docs/API_docs_v53/methods/account_setAccountTTL.md | 9 +++------ old_docs/API_docs_v53/methods/account_setPrivacy.md | 9 +++------ .../API_docs_v53/methods/account_unregisterDevice.md | 9 +++------ .../API_docs_v53/methods/account_updateDeviceLocked.md | 9 +++------ .../API_docs_v53/methods/account_updateNotifySettings.md | 9 +++------ .../methods/account_updatePasswordSettings.md | 9 +++------ old_docs/API_docs_v53/methods/account_updateProfile.md | 9 +++------ old_docs/API_docs_v53/methods/account_updateStatus.md | 9 +++------ old_docs/API_docs_v53/methods/account_updateUsername.md | 9 +++------ old_docs/API_docs_v53/methods/auth_bindTempAuthKey.md | 9 +++------ old_docs/API_docs_v53/methods/auth_cancelCode.md | 9 +++------ old_docs/API_docs_v53/methods/auth_checkPassword.md | 9 +++------ old_docs/API_docs_v53/methods/auth_checkPhone.md | 9 +++------ .../API_docs_v53/methods/auth_exportAuthorization.md | 9 +++------ .../API_docs_v53/methods/auth_importAuthorization.md | 9 +++------ old_docs/API_docs_v53/methods/auth_recoverPassword.md | 9 +++------ .../API_docs_v53/methods/auth_requestPasswordRecovery.md | 9 +++------ old_docs/API_docs_v53/methods/auth_resendCode.md | 9 +++------ .../API_docs_v53/methods/auth_resetAuthorizations.md | 9 +++------ old_docs/API_docs_v53/methods/auth_sendInvites.md | 9 +++------ old_docs/API_docs_v53/methods/channels_checkUsername.md | 9 +++------ old_docs/API_docs_v53/methods/channels_createChannel.md | 9 +++------ old_docs/API_docs_v53/methods/channels_deleteChannel.md | 9 +++------ old_docs/API_docs_v53/methods/channels_deleteMessages.md | 9 +++------ .../API_docs_v53/methods/channels_deleteUserHistory.md | 9 +++------ old_docs/API_docs_v53/methods/channels_editAbout.md | 9 +++------ old_docs/API_docs_v53/methods/channels_editAdmin.md | 9 +++------ old_docs/API_docs_v53/methods/channels_editPhoto.md | 9 +++------ old_docs/API_docs_v53/methods/channels_editTitle.md | 9 +++------ old_docs/API_docs_v53/methods/channels_exportInvite.md | 9 +++------ .../API_docs_v53/methods/channels_exportMessageLink.md | 9 +++------ old_docs/API_docs_v53/methods/channels_getChannels.md | 9 +++------ old_docs/API_docs_v53/methods/channels_getMessages.md | 9 +++------ old_docs/API_docs_v53/methods/channels_getParticipant.md | 9 +++------ .../API_docs_v53/methods/channels_inviteToChannel.md | 9 +++------ old_docs/API_docs_v53/methods/channels_joinChannel.md | 9 +++------ .../API_docs_v53/methods/channels_kickFromChannel.md | 9 +++------ old_docs/API_docs_v53/methods/channels_leaveChannel.md | 9 +++------ old_docs/API_docs_v53/methods/channels_readHistory.md | 9 +++------ old_docs/API_docs_v53/methods/channels_reportSpam.md | 9 +++------ old_docs/API_docs_v53/methods/channels_toggleInvites.md | 9 +++------ .../API_docs_v53/methods/channels_toggleSignatures.md | 9 +++------ .../API_docs_v53/methods/channels_updatePinnedMessage.md | 9 +++------ old_docs/API_docs_v53/methods/channels_updateUsername.md | 9 +++------ old_docs/API_docs_v53/methods/contacts_block.md | 9 +++------ old_docs/API_docs_v53/methods/contacts_deleteContact.md | 9 +++------ old_docs/API_docs_v53/methods/contacts_deleteContacts.md | 9 +++------ old_docs/API_docs_v53/methods/contacts_exportCard.md | 9 +++------ old_docs/API_docs_v53/methods/contacts_getBlocked.md | 9 +++------ old_docs/API_docs_v53/methods/contacts_getContacts.md | 9 +++------ old_docs/API_docs_v53/methods/contacts_getStatuses.md | 9 +++------ old_docs/API_docs_v53/methods/contacts_getTopPeers.md | 9 +++------ old_docs/API_docs_v53/methods/contacts_importCard.md | 9 +++------ old_docs/API_docs_v53/methods/contacts_importContacts.md | 9 +++------ .../API_docs_v53/methods/contacts_resetTopPeerRating.md | 9 +++------ old_docs/API_docs_v53/methods/contacts_search.md | 9 +++------ old_docs/API_docs_v53/methods/contacts_unblock.md | 9 +++------ old_docs/API_docs_v53/methods/help_getAppChangelog.md | 9 +++------ old_docs/API_docs_v53/methods/help_getAppUpdate.md | 9 +++------ old_docs/API_docs_v53/methods/help_getConfig.md | 9 +++------ old_docs/API_docs_v53/methods/help_getInviteText.md | 9 +++------ old_docs/API_docs_v53/methods/help_getNearestDc.md | 9 +++------ old_docs/API_docs_v53/methods/help_getSupport.md | 9 +++------ old_docs/API_docs_v53/methods/help_getTermsOfService.md | 9 +++------ old_docs/API_docs_v53/methods/help_saveAppLog.md | 9 +++------ old_docs/API_docs_v53/methods/initConnection.md | 9 +++------ old_docs/API_docs_v53/methods/invokeAfterMsg.md | 9 +++------ old_docs/API_docs_v53/methods/invokeAfterMsgs.md | 9 +++------ old_docs/API_docs_v53/methods/invokeWithLayer.md | 9 +++------ old_docs/API_docs_v53/methods/invokeWithoutUpdates.md | 9 +++------ old_docs/API_docs_v53/methods/messages_addChatUser.md | 9 +++------ .../API_docs_v53/methods/messages_checkChatInvite.md | 9 +++------ old_docs/API_docs_v53/methods/messages_createChat.md | 9 +++------ old_docs/API_docs_v53/methods/messages_deleteChatUser.md | 9 +++------ old_docs/API_docs_v53/methods/messages_deleteHistory.md | 9 +++------ old_docs/API_docs_v53/methods/messages_deleteMessages.md | 9 +++------ old_docs/API_docs_v53/methods/messages_editChatAdmin.md | 9 +++------ old_docs/API_docs_v53/methods/messages_editChatPhoto.md | 9 +++------ old_docs/API_docs_v53/methods/messages_editChatTitle.md | 9 +++------ .../methods/messages_editInlineBotMessage.md | 9 +++------ old_docs/API_docs_v53/methods/messages_editMessage.md | 9 +++------ .../API_docs_v53/methods/messages_exportChatInvite.md | 9 +++------ old_docs/API_docs_v53/methods/messages_forwardMessage.md | 9 +++------ .../API_docs_v53/methods/messages_forwardMessages.md | 9 +++------ old_docs/API_docs_v53/methods/messages_getAllDrafts.md | 9 +++------ old_docs/API_docs_v53/methods/messages_getAllStickers.md | 9 +++------ .../methods/messages_getBotCallbackAnswer.md | 9 +++------ old_docs/API_docs_v53/methods/messages_getChats.md | 9 +++------ old_docs/API_docs_v53/methods/messages_getDhConfig.md | 9 +++------ old_docs/API_docs_v53/methods/messages_getDialogs.md | 9 +++------ .../API_docs_v53/methods/messages_getDocumentByHash.md | 9 +++------ old_docs/API_docs_v53/methods/messages_getHistory.md | 9 +++------ .../API_docs_v53/methods/messages_getInlineBotResults.md | 9 +++------ .../API_docs_v53/methods/messages_getMessageEditData.md | 9 +++------ old_docs/API_docs_v53/methods/messages_getMessages.md | 9 +++------ .../API_docs_v53/methods/messages_getMessagesViews.md | 9 +++------ old_docs/API_docs_v53/methods/messages_getPeerDialogs.md | 9 +++------ .../API_docs_v53/methods/messages_getPeerSettings.md | 9 +++------ old_docs/API_docs_v53/methods/messages_getSavedGifs.md | 9 +++------ old_docs/API_docs_v53/methods/messages_getStickerSet.md | 9 +++------ old_docs/API_docs_v53/methods/messages_getStickers.md | 9 +++------ .../API_docs_v53/methods/messages_getWebPagePreview.md | 9 +++------ old_docs/API_docs_v53/methods/messages_hideReportSpam.md | 9 +++------ .../API_docs_v53/methods/messages_importChatInvite.md | 9 +++------ .../API_docs_v53/methods/messages_installStickerSet.md | 9 +++------ old_docs/API_docs_v53/methods/messages_migrateChat.md | 9 +++------ .../methods/messages_readEncryptedHistory.md | 9 +++------ old_docs/API_docs_v53/methods/messages_readHistory.md | 9 +++------ .../API_docs_v53/methods/messages_readMessageContents.md | 9 +++------ .../API_docs_v53/methods/messages_receivedMessages.md | 9 +++------ old_docs/API_docs_v53/methods/messages_receivedQueue.md | 9 +++------ .../API_docs_v53/methods/messages_reorderStickerSets.md | 9 +++------ old_docs/API_docs_v53/methods/messages_reportSpam.md | 9 +++------ old_docs/API_docs_v53/methods/messages_saveDraft.md | 9 +++------ old_docs/API_docs_v53/methods/messages_saveGif.md | 9 +++------ old_docs/API_docs_v53/methods/messages_search.md | 9 +++------ old_docs/API_docs_v53/methods/messages_searchGifs.md | 9 +++------ old_docs/API_docs_v53/methods/messages_searchGlobal.md | 9 +++------ old_docs/API_docs_v53/methods/messages_sendBroadcast.md | 9 +++------ old_docs/API_docs_v53/methods/messages_sendEncrypted.md | 9 +++------ .../API_docs_v53/methods/messages_sendEncryptedFile.md | 9 +++------ .../methods/messages_sendEncryptedService.md | 9 +++------ .../API_docs_v53/methods/messages_sendInlineBotResult.md | 9 +++------ old_docs/API_docs_v53/methods/messages_sendMedia.md | 9 +++------ old_docs/API_docs_v53/methods/messages_sendMessage.md | 9 +++------ .../methods/messages_setBotCallbackAnswer.md | 9 +++------ .../API_docs_v53/methods/messages_setEncryptedTyping.md | 9 +++------ .../API_docs_v53/methods/messages_setInlineBotResults.md | 9 +++------ old_docs/API_docs_v53/methods/messages_setTyping.md | 9 +++------ old_docs/API_docs_v53/methods/messages_startBot.md | 9 +++------ .../API_docs_v53/methods/messages_toggleChatAdmins.md | 9 +++------ .../API_docs_v53/methods/messages_uninstallStickerSet.md | 9 +++------ old_docs/API_docs_v53/methods/photos_deletePhotos.md | 9 +++------ old_docs/API_docs_v53/methods/photos_getUserPhotos.md | 9 +++------ .../API_docs_v53/methods/photos_updateProfilePhoto.md | 9 +++------ .../API_docs_v53/methods/photos_uploadProfilePhoto.md | 9 +++------ old_docs/API_docs_v53/methods/users_getUsers.md | 9 +++------ old_docs/API_docs_v55/methods/account_changePhone.md | 9 +++------ old_docs/API_docs_v55/methods/account_checkUsername.md | 9 +++------ old_docs/API_docs_v55/methods/account_confirmPhone.md | 9 +++------ old_docs/API_docs_v55/methods/account_deleteAccount.md | 9 +++------ old_docs/API_docs_v55/methods/account_getAccountTTL.md | 9 +++------ .../API_docs_v55/methods/account_getAuthorizations.md | 9 +++------ .../API_docs_v55/methods/account_getNotifySettings.md | 9 +++------ old_docs/API_docs_v55/methods/account_getPassword.md | 9 +++------ .../API_docs_v55/methods/account_getPasswordSettings.md | 9 +++------ old_docs/API_docs_v55/methods/account_getPrivacy.md | 9 +++------ old_docs/API_docs_v55/methods/account_getWallPapers.md | 9 +++------ old_docs/API_docs_v55/methods/account_registerDevice.md | 9 +++------ old_docs/API_docs_v55/methods/account_reportPeer.md | 9 +++------ .../API_docs_v55/methods/account_resetAuthorization.md | 9 +++------ .../API_docs_v55/methods/account_resetNotifySettings.md | 9 +++------ .../API_docs_v55/methods/account_sendChangePhoneCode.md | 9 +++------ .../API_docs_v55/methods/account_sendConfirmPhoneCode.md | 9 +++------ old_docs/API_docs_v55/methods/account_setAccountTTL.md | 9 +++------ old_docs/API_docs_v55/methods/account_setPrivacy.md | 9 +++------ .../API_docs_v55/methods/account_unregisterDevice.md | 9 +++------ .../API_docs_v55/methods/account_updateDeviceLocked.md | 9 +++------ .../API_docs_v55/methods/account_updateNotifySettings.md | 9 +++------ .../methods/account_updatePasswordSettings.md | 9 +++------ old_docs/API_docs_v55/methods/account_updateProfile.md | 9 +++------ old_docs/API_docs_v55/methods/account_updateStatus.md | 9 +++------ old_docs/API_docs_v55/methods/account_updateUsername.md | 9 +++------ old_docs/API_docs_v55/methods/auth_bindTempAuthKey.md | 9 +++------ old_docs/API_docs_v55/methods/auth_cancelCode.md | 9 +++------ old_docs/API_docs_v55/methods/auth_checkPassword.md | 9 +++------ old_docs/API_docs_v55/methods/auth_checkPhone.md | 9 +++------ .../API_docs_v55/methods/auth_exportAuthorization.md | 9 +++------ .../API_docs_v55/methods/auth_importAuthorization.md | 9 +++------ old_docs/API_docs_v55/methods/auth_recoverPassword.md | 9 +++------ .../API_docs_v55/methods/auth_requestPasswordRecovery.md | 9 +++------ old_docs/API_docs_v55/methods/auth_resendCode.md | 9 +++------ .../API_docs_v55/methods/auth_resetAuthorizations.md | 9 +++------ old_docs/API_docs_v55/methods/auth_sendInvites.md | 9 +++------ old_docs/API_docs_v55/methods/channels_checkUsername.md | 9 +++------ old_docs/API_docs_v55/methods/channels_createChannel.md | 9 +++------ old_docs/API_docs_v55/methods/channels_deleteChannel.md | 9 +++------ old_docs/API_docs_v55/methods/channels_deleteMessages.md | 9 +++------ .../API_docs_v55/methods/channels_deleteUserHistory.md | 9 +++------ old_docs/API_docs_v55/methods/channels_editAbout.md | 9 +++------ old_docs/API_docs_v55/methods/channels_editAdmin.md | 9 +++------ old_docs/API_docs_v55/methods/channels_editPhoto.md | 9 +++------ old_docs/API_docs_v55/methods/channels_editTitle.md | 9 +++------ old_docs/API_docs_v55/methods/channels_exportInvite.md | 9 +++------ .../API_docs_v55/methods/channels_exportMessageLink.md | 9 +++------ old_docs/API_docs_v55/methods/channels_getChannels.md | 9 +++------ old_docs/API_docs_v55/methods/channels_getMessages.md | 9 +++------ old_docs/API_docs_v55/methods/channels_getParticipant.md | 9 +++------ .../API_docs_v55/methods/channels_inviteToChannel.md | 9 +++------ old_docs/API_docs_v55/methods/channels_joinChannel.md | 9 +++------ .../API_docs_v55/methods/channels_kickFromChannel.md | 9 +++------ old_docs/API_docs_v55/methods/channels_leaveChannel.md | 9 +++------ old_docs/API_docs_v55/methods/channels_readHistory.md | 9 +++------ old_docs/API_docs_v55/methods/channels_reportSpam.md | 9 +++------ old_docs/API_docs_v55/methods/channels_toggleInvites.md | 9 +++------ .../API_docs_v55/methods/channels_toggleSignatures.md | 9 +++------ .../API_docs_v55/methods/channels_updatePinnedMessage.md | 9 +++------ old_docs/API_docs_v55/methods/channels_updateUsername.md | 9 +++------ old_docs/API_docs_v55/methods/contacts_block.md | 9 +++------ old_docs/API_docs_v55/methods/contacts_deleteContact.md | 9 +++------ old_docs/API_docs_v55/methods/contacts_deleteContacts.md | 9 +++------ old_docs/API_docs_v55/methods/contacts_exportCard.md | 9 +++------ old_docs/API_docs_v55/methods/contacts_getBlocked.md | 9 +++------ old_docs/API_docs_v55/methods/contacts_getContacts.md | 9 +++------ old_docs/API_docs_v55/methods/contacts_getStatuses.md | 9 +++------ old_docs/API_docs_v55/methods/contacts_getTopPeers.md | 9 +++------ old_docs/API_docs_v55/methods/contacts_importCard.md | 9 +++------ old_docs/API_docs_v55/methods/contacts_importContacts.md | 9 +++------ .../API_docs_v55/methods/contacts_resetTopPeerRating.md | 9 +++------ old_docs/API_docs_v55/methods/contacts_search.md | 9 +++------ old_docs/API_docs_v55/methods/contacts_unblock.md | 9 +++------ old_docs/API_docs_v55/methods/help_getAppChangelog.md | 9 +++------ old_docs/API_docs_v55/methods/help_getAppUpdate.md | 9 +++------ old_docs/API_docs_v55/methods/help_getConfig.md | 9 +++------ old_docs/API_docs_v55/methods/help_getInviteText.md | 9 +++------ old_docs/API_docs_v55/methods/help_getNearestDc.md | 9 +++------ old_docs/API_docs_v55/methods/help_getSupport.md | 9 +++------ old_docs/API_docs_v55/methods/help_getTermsOfService.md | 9 +++------ old_docs/API_docs_v55/methods/help_saveAppLog.md | 9 +++------ old_docs/API_docs_v55/methods/initConnection.md | 9 +++------ old_docs/API_docs_v55/methods/invokeAfterMsg.md | 9 +++------ old_docs/API_docs_v55/methods/invokeAfterMsgs.md | 9 +++------ old_docs/API_docs_v55/methods/invokeWithLayer.md | 9 +++------ old_docs/API_docs_v55/methods/invokeWithoutUpdates.md | 9 +++------ old_docs/API_docs_v55/methods/messages_addChatUser.md | 9 +++------ .../API_docs_v55/methods/messages_checkChatInvite.md | 9 +++------ .../API_docs_v55/methods/messages_clearRecentStickers.md | 9 +++------ old_docs/API_docs_v55/methods/messages_createChat.md | 9 +++------ old_docs/API_docs_v55/methods/messages_deleteChatUser.md | 9 +++------ old_docs/API_docs_v55/methods/messages_deleteHistory.md | 9 +++------ old_docs/API_docs_v55/methods/messages_deleteMessages.md | 9 +++------ old_docs/API_docs_v55/methods/messages_editChatAdmin.md | 9 +++------ old_docs/API_docs_v55/methods/messages_editChatPhoto.md | 9 +++------ old_docs/API_docs_v55/methods/messages_editChatTitle.md | 9 +++------ .../methods/messages_editInlineBotMessage.md | 9 +++------ old_docs/API_docs_v55/methods/messages_editMessage.md | 9 +++------ .../API_docs_v55/methods/messages_exportChatInvite.md | 9 +++------ old_docs/API_docs_v55/methods/messages_forwardMessage.md | 9 +++------ .../API_docs_v55/methods/messages_forwardMessages.md | 9 +++------ old_docs/API_docs_v55/methods/messages_getAllDrafts.md | 9 +++------ old_docs/API_docs_v55/methods/messages_getAllStickers.md | 9 +++------ .../API_docs_v55/methods/messages_getArchivedStickers.md | 9 +++------ .../methods/messages_getBotCallbackAnswer.md | 9 +++------ old_docs/API_docs_v55/methods/messages_getChats.md | 9 +++------ old_docs/API_docs_v55/methods/messages_getDhConfig.md | 9 +++------ old_docs/API_docs_v55/methods/messages_getDialogs.md | 9 +++------ .../API_docs_v55/methods/messages_getDocumentByHash.md | 9 +++------ .../API_docs_v55/methods/messages_getFeaturedStickers.md | 9 +++------ old_docs/API_docs_v55/methods/messages_getHistory.md | 9 +++------ .../API_docs_v55/methods/messages_getInlineBotResults.md | 9 +++------ .../API_docs_v55/methods/messages_getMessageEditData.md | 9 +++------ old_docs/API_docs_v55/methods/messages_getMessages.md | 9 +++------ .../API_docs_v55/methods/messages_getMessagesViews.md | 9 +++------ old_docs/API_docs_v55/methods/messages_getPeerDialogs.md | 9 +++------ .../API_docs_v55/methods/messages_getPeerSettings.md | 9 +++------ .../API_docs_v55/methods/messages_getRecentStickers.md | 9 +++------ old_docs/API_docs_v55/methods/messages_getSavedGifs.md | 9 +++------ old_docs/API_docs_v55/methods/messages_getStickerSet.md | 9 +++------ old_docs/API_docs_v55/methods/messages_getStickers.md | 9 +++------ .../API_docs_v55/methods/messages_getUnusedStickers.md | 9 +++------ .../API_docs_v55/methods/messages_getWebPagePreview.md | 9 +++------ old_docs/API_docs_v55/methods/messages_hideReportSpam.md | 9 +++------ .../API_docs_v55/methods/messages_importChatInvite.md | 9 +++------ .../API_docs_v55/methods/messages_installStickerSet.md | 9 +++------ old_docs/API_docs_v55/methods/messages_migrateChat.md | 9 +++------ .../methods/messages_readEncryptedHistory.md | 9 +++------ .../methods/messages_readFeaturedStickers.md | 9 +++------ old_docs/API_docs_v55/methods/messages_readHistory.md | 9 +++------ .../API_docs_v55/methods/messages_readMessageContents.md | 9 +++------ .../API_docs_v55/methods/messages_receivedMessages.md | 9 +++------ old_docs/API_docs_v55/methods/messages_receivedQueue.md | 9 +++------ .../API_docs_v55/methods/messages_reorderStickerSets.md | 9 +++------ old_docs/API_docs_v55/methods/messages_reportSpam.md | 9 +++------ old_docs/API_docs_v55/methods/messages_saveDraft.md | 9 +++------ old_docs/API_docs_v55/methods/messages_saveGif.md | 9 +++------ .../API_docs_v55/methods/messages_saveRecentSticker.md | 9 +++------ old_docs/API_docs_v55/methods/messages_search.md | 9 +++------ old_docs/API_docs_v55/methods/messages_searchGifs.md | 9 +++------ old_docs/API_docs_v55/methods/messages_searchGlobal.md | 9 +++------ old_docs/API_docs_v55/methods/messages_sendBroadcast.md | 9 +++------ old_docs/API_docs_v55/methods/messages_sendEncrypted.md | 9 +++------ .../API_docs_v55/methods/messages_sendEncryptedFile.md | 9 +++------ .../methods/messages_sendEncryptedService.md | 9 +++------ .../API_docs_v55/methods/messages_sendInlineBotResult.md | 9 +++------ old_docs/API_docs_v55/methods/messages_sendMedia.md | 9 +++------ old_docs/API_docs_v55/methods/messages_sendMessage.md | 9 +++------ .../methods/messages_setBotCallbackAnswer.md | 9 +++------ .../API_docs_v55/methods/messages_setEncryptedTyping.md | 9 +++------ .../API_docs_v55/methods/messages_setInlineBotResults.md | 9 +++------ old_docs/API_docs_v55/methods/messages_setTyping.md | 9 +++------ old_docs/API_docs_v55/methods/messages_startBot.md | 9 +++------ .../API_docs_v55/methods/messages_toggleChatAdmins.md | 9 +++------ .../API_docs_v55/methods/messages_uninstallStickerSet.md | 9 +++------ old_docs/API_docs_v55/methods/photos_deletePhotos.md | 9 +++------ old_docs/API_docs_v55/methods/photos_getUserPhotos.md | 9 +++------ .../API_docs_v55/methods/photos_updateProfilePhoto.md | 9 +++------ .../API_docs_v55/methods/photos_uploadProfilePhoto.md | 9 +++------ old_docs/API_docs_v55/methods/users_getUsers.md | 9 +++------ old_docs/API_docs_v57/methods/account_changePhone.md | 9 +++------ old_docs/API_docs_v57/methods/account_checkUsername.md | 9 +++------ old_docs/API_docs_v57/methods/account_confirmPhone.md | 9 +++------ old_docs/API_docs_v57/methods/account_deleteAccount.md | 9 +++------ old_docs/API_docs_v57/methods/account_getAccountTTL.md | 9 +++------ .../API_docs_v57/methods/account_getAuthorizations.md | 9 +++------ .../API_docs_v57/methods/account_getNotifySettings.md | 9 +++------ old_docs/API_docs_v57/methods/account_getPassword.md | 9 +++------ .../API_docs_v57/methods/account_getPasswordSettings.md | 9 +++------ old_docs/API_docs_v57/methods/account_getPrivacy.md | 9 +++------ old_docs/API_docs_v57/methods/account_getWallPapers.md | 9 +++------ old_docs/API_docs_v57/methods/account_registerDevice.md | 9 +++------ old_docs/API_docs_v57/methods/account_reportPeer.md | 9 +++------ .../API_docs_v57/methods/account_resetAuthorization.md | 9 +++------ .../API_docs_v57/methods/account_resetNotifySettings.md | 9 +++------ .../API_docs_v57/methods/account_sendChangePhoneCode.md | 9 +++------ .../API_docs_v57/methods/account_sendConfirmPhoneCode.md | 9 +++------ old_docs/API_docs_v57/methods/account_setAccountTTL.md | 9 +++------ old_docs/API_docs_v57/methods/account_setPrivacy.md | 9 +++------ .../API_docs_v57/methods/account_unregisterDevice.md | 9 +++------ .../API_docs_v57/methods/account_updateDeviceLocked.md | 9 +++------ .../API_docs_v57/methods/account_updateNotifySettings.md | 9 +++------ .../methods/account_updatePasswordSettings.md | 9 +++------ old_docs/API_docs_v57/methods/account_updateProfile.md | 9 +++------ old_docs/API_docs_v57/methods/account_updateStatus.md | 9 +++------ old_docs/API_docs_v57/methods/account_updateUsername.md | 9 +++------ old_docs/API_docs_v57/methods/auth_bindTempAuthKey.md | 9 +++------ old_docs/API_docs_v57/methods/auth_cancelCode.md | 9 +++------ old_docs/API_docs_v57/methods/auth_checkPassword.md | 9 +++------ old_docs/API_docs_v57/methods/auth_checkPhone.md | 9 +++------ old_docs/API_docs_v57/methods/auth_dropTempAuthKeys.md | 9 +++------ .../API_docs_v57/methods/auth_exportAuthorization.md | 9 +++------ .../API_docs_v57/methods/auth_importAuthorization.md | 9 +++------ old_docs/API_docs_v57/methods/auth_recoverPassword.md | 9 +++------ .../API_docs_v57/methods/auth_requestPasswordRecovery.md | 9 +++------ old_docs/API_docs_v57/methods/auth_resendCode.md | 9 +++------ .../API_docs_v57/methods/auth_resetAuthorizations.md | 9 +++------ old_docs/API_docs_v57/methods/auth_sendInvites.md | 9 +++------ old_docs/API_docs_v57/methods/channels_checkUsername.md | 9 +++------ old_docs/API_docs_v57/methods/channels_createChannel.md | 9 +++------ old_docs/API_docs_v57/methods/channels_deleteChannel.md | 9 +++------ old_docs/API_docs_v57/methods/channels_deleteMessages.md | 9 +++------ .../API_docs_v57/methods/channels_deleteUserHistory.md | 9 +++------ old_docs/API_docs_v57/methods/channels_editAbout.md | 9 +++------ old_docs/API_docs_v57/methods/channels_editAdmin.md | 9 +++------ old_docs/API_docs_v57/methods/channels_editPhoto.md | 9 +++------ old_docs/API_docs_v57/methods/channels_editTitle.md | 9 +++------ old_docs/API_docs_v57/methods/channels_exportInvite.md | 9 +++------ .../API_docs_v57/methods/channels_exportMessageLink.md | 9 +++------ .../methods/channels_getAdminedPublicChannels.md | 9 +++------ old_docs/API_docs_v57/methods/channels_getChannels.md | 9 +++------ old_docs/API_docs_v57/methods/channels_getMessages.md | 9 +++------ old_docs/API_docs_v57/methods/channels_getParticipant.md | 9 +++------ .../API_docs_v57/methods/channels_inviteToChannel.md | 9 +++------ old_docs/API_docs_v57/methods/channels_joinChannel.md | 9 +++------ .../API_docs_v57/methods/channels_kickFromChannel.md | 9 +++------ old_docs/API_docs_v57/methods/channels_leaveChannel.md | 9 +++------ old_docs/API_docs_v57/methods/channels_readHistory.md | 9 +++------ old_docs/API_docs_v57/methods/channels_reportSpam.md | 9 +++------ old_docs/API_docs_v57/methods/channels_toggleInvites.md | 9 +++------ .../API_docs_v57/methods/channels_toggleSignatures.md | 9 +++------ .../API_docs_v57/methods/channels_updatePinnedMessage.md | 9 +++------ old_docs/API_docs_v57/methods/channels_updateUsername.md | 9 +++------ old_docs/API_docs_v57/methods/contacts_block.md | 9 +++------ old_docs/API_docs_v57/methods/contacts_deleteContact.md | 9 +++------ old_docs/API_docs_v57/methods/contacts_deleteContacts.md | 9 +++------ old_docs/API_docs_v57/methods/contacts_exportCard.md | 9 +++------ old_docs/API_docs_v57/methods/contacts_getBlocked.md | 9 +++------ old_docs/API_docs_v57/methods/contacts_getContacts.md | 9 +++------ old_docs/API_docs_v57/methods/contacts_getStatuses.md | 9 +++------ old_docs/API_docs_v57/methods/contacts_getTopPeers.md | 9 +++------ old_docs/API_docs_v57/methods/contacts_importCard.md | 9 +++------ old_docs/API_docs_v57/methods/contacts_importContacts.md | 9 +++------ .../API_docs_v57/methods/contacts_resetTopPeerRating.md | 9 +++------ old_docs/API_docs_v57/methods/contacts_search.md | 9 +++------ old_docs/API_docs_v57/methods/contacts_unblock.md | 9 +++------ old_docs/API_docs_v57/methods/help_getAppChangelog.md | 9 +++------ old_docs/API_docs_v57/methods/help_getAppUpdate.md | 9 +++------ old_docs/API_docs_v57/methods/help_getConfig.md | 9 +++------ old_docs/API_docs_v57/methods/help_getInviteText.md | 9 +++------ old_docs/API_docs_v57/methods/help_getNearestDc.md | 9 +++------ old_docs/API_docs_v57/methods/help_getSupport.md | 9 +++------ old_docs/API_docs_v57/methods/help_getTermsOfService.md | 9 +++------ old_docs/API_docs_v57/methods/help_saveAppLog.md | 9 +++------ old_docs/API_docs_v57/methods/initConnection.md | 9 +++------ old_docs/API_docs_v57/methods/invokeAfterMsg.md | 9 +++------ old_docs/API_docs_v57/methods/invokeAfterMsgs.md | 9 +++------ old_docs/API_docs_v57/methods/invokeWithLayer.md | 9 +++------ old_docs/API_docs_v57/methods/invokeWithoutUpdates.md | 9 +++------ old_docs/API_docs_v57/methods/messages_addChatUser.md | 9 +++------ .../API_docs_v57/methods/messages_checkChatInvite.md | 9 +++------ .../API_docs_v57/methods/messages_clearRecentStickers.md | 9 +++------ old_docs/API_docs_v57/methods/messages_createChat.md | 9 +++------ old_docs/API_docs_v57/methods/messages_deleteChatUser.md | 9 +++------ old_docs/API_docs_v57/methods/messages_deleteHistory.md | 9 +++------ old_docs/API_docs_v57/methods/messages_deleteMessages.md | 9 +++------ old_docs/API_docs_v57/methods/messages_editChatAdmin.md | 9 +++------ old_docs/API_docs_v57/methods/messages_editChatPhoto.md | 9 +++------ old_docs/API_docs_v57/methods/messages_editChatTitle.md | 9 +++------ .../methods/messages_editInlineBotMessage.md | 9 +++------ old_docs/API_docs_v57/methods/messages_editMessage.md | 9 +++------ .../API_docs_v57/methods/messages_exportChatInvite.md | 9 +++------ old_docs/API_docs_v57/methods/messages_forwardMessage.md | 9 +++------ .../API_docs_v57/methods/messages_forwardMessages.md | 9 +++------ old_docs/API_docs_v57/methods/messages_getAllDrafts.md | 9 +++------ old_docs/API_docs_v57/methods/messages_getAllStickers.md | 9 +++------ .../API_docs_v57/methods/messages_getArchivedStickers.md | 9 +++------ .../API_docs_v57/methods/messages_getAttachedStickers.md | 9 +++------ .../methods/messages_getBotCallbackAnswer.md | 9 +++------ old_docs/API_docs_v57/methods/messages_getChats.md | 9 +++------ old_docs/API_docs_v57/methods/messages_getDhConfig.md | 9 +++------ old_docs/API_docs_v57/methods/messages_getDialogs.md | 9 +++------ .../API_docs_v57/methods/messages_getDocumentByHash.md | 9 +++------ .../API_docs_v57/methods/messages_getFeaturedStickers.md | 9 +++------ .../API_docs_v57/methods/messages_getGameHighScores.md | 9 +++------ old_docs/API_docs_v57/methods/messages_getHistory.md | 9 +++------ .../API_docs_v57/methods/messages_getInlineBotResults.md | 9 +++------ .../methods/messages_getInlineGameHighScores.md | 9 +++------ .../API_docs_v57/methods/messages_getMaskStickers.md | 9 +++------ .../API_docs_v57/methods/messages_getMessageEditData.md | 9 +++------ old_docs/API_docs_v57/methods/messages_getMessages.md | 9 +++------ .../API_docs_v57/methods/messages_getMessagesViews.md | 9 +++------ old_docs/API_docs_v57/methods/messages_getPeerDialogs.md | 9 +++------ .../API_docs_v57/methods/messages_getPeerSettings.md | 9 +++------ .../API_docs_v57/methods/messages_getRecentStickers.md | 9 +++------ old_docs/API_docs_v57/methods/messages_getSavedGifs.md | 9 +++------ old_docs/API_docs_v57/methods/messages_getStickerSet.md | 9 +++------ .../API_docs_v57/methods/messages_getWebPagePreview.md | 9 +++------ old_docs/API_docs_v57/methods/messages_hideReportSpam.md | 9 +++------ .../API_docs_v57/methods/messages_importChatInvite.md | 9 +++------ .../API_docs_v57/methods/messages_installStickerSet.md | 9 +++------ old_docs/API_docs_v57/methods/messages_migrateChat.md | 9 +++------ .../methods/messages_readEncryptedHistory.md | 9 +++------ .../methods/messages_readFeaturedStickers.md | 9 +++------ old_docs/API_docs_v57/methods/messages_readHistory.md | 9 +++------ .../API_docs_v57/methods/messages_readMessageContents.md | 9 +++------ .../API_docs_v57/methods/messages_receivedMessages.md | 9 +++------ old_docs/API_docs_v57/methods/messages_receivedQueue.md | 9 +++------ .../API_docs_v57/methods/messages_reorderStickerSets.md | 9 +++------ old_docs/API_docs_v57/methods/messages_reportSpam.md | 9 +++------ old_docs/API_docs_v57/methods/messages_saveDraft.md | 9 +++------ old_docs/API_docs_v57/methods/messages_saveGif.md | 9 +++------ .../API_docs_v57/methods/messages_saveRecentSticker.md | 9 +++------ old_docs/API_docs_v57/methods/messages_search.md | 9 +++------ old_docs/API_docs_v57/methods/messages_searchGifs.md | 9 +++------ old_docs/API_docs_v57/methods/messages_searchGlobal.md | 9 +++------ old_docs/API_docs_v57/methods/messages_sendEncrypted.md | 9 +++------ .../API_docs_v57/methods/messages_sendEncryptedFile.md | 9 +++------ .../methods/messages_sendEncryptedService.md | 9 +++------ .../API_docs_v57/methods/messages_sendInlineBotResult.md | 9 +++------ old_docs/API_docs_v57/methods/messages_sendMedia.md | 9 +++------ old_docs/API_docs_v57/methods/messages_sendMessage.md | 9 +++------ .../methods/messages_setBotCallbackAnswer.md | 9 +++------ .../API_docs_v57/methods/messages_setEncryptedTyping.md | 9 +++------ old_docs/API_docs_v57/methods/messages_setGameScore.md | 9 +++------ .../API_docs_v57/methods/messages_setInlineBotResults.md | 9 +++------ .../API_docs_v57/methods/messages_setInlineGameScore.md | 9 +++------ old_docs/API_docs_v57/methods/messages_setTyping.md | 9 +++------ old_docs/API_docs_v57/methods/messages_startBot.md | 9 +++------ .../API_docs_v57/methods/messages_toggleChatAdmins.md | 9 +++------ .../API_docs_v57/methods/messages_uninstallStickerSet.md | 9 +++------ old_docs/API_docs_v57/methods/photos_deletePhotos.md | 9 +++------ old_docs/API_docs_v57/methods/photos_getUserPhotos.md | 9 +++------ .../API_docs_v57/methods/photos_updateProfilePhoto.md | 9 +++------ .../API_docs_v57/methods/photos_uploadProfilePhoto.md | 9 +++------ old_docs/API_docs_v57/methods/users_getUsers.md | 9 +++------ old_docs/API_docs_v62/methods/account_changePhone.md | 9 +++------ old_docs/API_docs_v62/methods/account_checkUsername.md | 9 +++------ old_docs/API_docs_v62/methods/account_confirmPhone.md | 9 +++------ old_docs/API_docs_v62/methods/account_deleteAccount.md | 9 +++------ old_docs/API_docs_v62/methods/account_getAccountTTL.md | 9 +++------ .../API_docs_v62/methods/account_getAuthorizations.md | 9 +++------ .../API_docs_v62/methods/account_getNotifySettings.md | 9 +++------ old_docs/API_docs_v62/methods/account_getPassword.md | 9 +++------ .../API_docs_v62/methods/account_getPasswordSettings.md | 9 +++------ old_docs/API_docs_v62/methods/account_getPrivacy.md | 9 +++------ old_docs/API_docs_v62/methods/account_getWallPapers.md | 9 +++------ old_docs/API_docs_v62/methods/account_registerDevice.md | 9 +++------ old_docs/API_docs_v62/methods/account_reportPeer.md | 9 +++------ .../API_docs_v62/methods/account_resetAuthorization.md | 9 +++------ .../API_docs_v62/methods/account_resetNotifySettings.md | 9 +++------ .../API_docs_v62/methods/account_sendChangePhoneCode.md | 9 +++------ .../API_docs_v62/methods/account_sendConfirmPhoneCode.md | 9 +++------ old_docs/API_docs_v62/methods/account_setAccountTTL.md | 9 +++------ old_docs/API_docs_v62/methods/account_setPrivacy.md | 9 +++------ .../API_docs_v62/methods/account_unregisterDevice.md | 9 +++------ .../API_docs_v62/methods/account_updateDeviceLocked.md | 9 +++------ .../API_docs_v62/methods/account_updateNotifySettings.md | 9 +++------ .../methods/account_updatePasswordSettings.md | 9 +++------ old_docs/API_docs_v62/methods/account_updateProfile.md | 9 +++------ old_docs/API_docs_v62/methods/account_updateStatus.md | 9 +++------ old_docs/API_docs_v62/methods/account_updateUsername.md | 9 +++------ old_docs/API_docs_v62/methods/auth_bindTempAuthKey.md | 9 +++------ old_docs/API_docs_v62/methods/auth_cancelCode.md | 9 +++------ old_docs/API_docs_v62/methods/auth_checkPassword.md | 9 +++------ old_docs/API_docs_v62/methods/auth_checkPhone.md | 9 +++------ old_docs/API_docs_v62/methods/auth_dropTempAuthKeys.md | 9 +++------ .../API_docs_v62/methods/auth_exportAuthorization.md | 9 +++------ .../API_docs_v62/methods/auth_importAuthorization.md | 9 +++------ old_docs/API_docs_v62/methods/auth_recoverPassword.md | 9 +++------ .../API_docs_v62/methods/auth_requestPasswordRecovery.md | 9 +++------ old_docs/API_docs_v62/methods/auth_resendCode.md | 9 +++------ .../API_docs_v62/methods/auth_resetAuthorizations.md | 9 +++------ old_docs/API_docs_v62/methods/auth_sendInvites.md | 9 +++------ old_docs/API_docs_v62/methods/channels_checkUsername.md | 9 +++------ old_docs/API_docs_v62/methods/channels_createChannel.md | 9 +++------ old_docs/API_docs_v62/methods/channels_deleteChannel.md | 9 +++------ old_docs/API_docs_v62/methods/channels_deleteMessages.md | 9 +++------ .../API_docs_v62/methods/channels_deleteUserHistory.md | 9 +++------ old_docs/API_docs_v62/methods/channels_editAbout.md | 9 +++------ old_docs/API_docs_v62/methods/channels_editAdmin.md | 9 +++------ old_docs/API_docs_v62/methods/channels_editPhoto.md | 9 +++------ old_docs/API_docs_v62/methods/channels_editTitle.md | 9 +++------ old_docs/API_docs_v62/methods/channels_exportInvite.md | 9 +++------ .../API_docs_v62/methods/channels_exportMessageLink.md | 9 +++------ .../methods/channels_getAdminedPublicChannels.md | 9 +++------ old_docs/API_docs_v62/methods/channels_getChannels.md | 9 +++------ old_docs/API_docs_v62/methods/channels_getMessages.md | 9 +++------ old_docs/API_docs_v62/methods/channels_getParticipant.md | 9 +++------ .../API_docs_v62/methods/channels_inviteToChannel.md | 9 +++------ old_docs/API_docs_v62/methods/channels_joinChannel.md | 9 +++------ .../API_docs_v62/methods/channels_kickFromChannel.md | 9 +++------ old_docs/API_docs_v62/methods/channels_leaveChannel.md | 9 +++------ old_docs/API_docs_v62/methods/channels_readHistory.md | 9 +++------ old_docs/API_docs_v62/methods/channels_reportSpam.md | 9 +++------ old_docs/API_docs_v62/methods/channels_toggleInvites.md | 9 +++------ .../API_docs_v62/methods/channels_toggleSignatures.md | 9 +++------ .../API_docs_v62/methods/channels_updatePinnedMessage.md | 9 +++------ old_docs/API_docs_v62/methods/channels_updateUsername.md | 9 +++------ old_docs/API_docs_v62/methods/contacts_block.md | 9 +++------ old_docs/API_docs_v62/methods/contacts_deleteContact.md | 9 +++------ old_docs/API_docs_v62/methods/contacts_deleteContacts.md | 9 +++------ old_docs/API_docs_v62/methods/contacts_exportCard.md | 9 +++------ old_docs/API_docs_v62/methods/contacts_getBlocked.md | 9 +++------ old_docs/API_docs_v62/methods/contacts_getContacts.md | 9 +++------ old_docs/API_docs_v62/methods/contacts_getStatuses.md | 9 +++------ old_docs/API_docs_v62/methods/contacts_getTopPeers.md | 9 +++------ old_docs/API_docs_v62/methods/contacts_importCard.md | 9 +++------ old_docs/API_docs_v62/methods/contacts_importContacts.md | 9 +++------ .../API_docs_v62/methods/contacts_resetTopPeerRating.md | 9 +++------ old_docs/API_docs_v62/methods/contacts_search.md | 9 +++------ old_docs/API_docs_v62/methods/contacts_unblock.md | 9 +++------ old_docs/API_docs_v62/methods/destroy_auth_key.md | 9 +++------ old_docs/API_docs_v62/methods/help_getAppChangelog.md | 9 +++------ old_docs/API_docs_v62/methods/help_getAppUpdate.md | 9 +++------ old_docs/API_docs_v62/methods/help_getConfig.md | 9 +++------ old_docs/API_docs_v62/methods/help_getInviteText.md | 9 +++------ old_docs/API_docs_v62/methods/help_getNearestDc.md | 9 +++------ old_docs/API_docs_v62/methods/help_getSupport.md | 9 +++------ old_docs/API_docs_v62/methods/help_getTermsOfService.md | 9 +++------ old_docs/API_docs_v62/methods/help_saveAppLog.md | 9 +++------ .../API_docs_v62/methods/help_setBotUpdatesStatus.md | 9 +++------ old_docs/API_docs_v62/methods/initConnection.md | 9 +++------ old_docs/API_docs_v62/methods/invokeAfterMsg.md | 9 +++------ old_docs/API_docs_v62/methods/invokeAfterMsgs.md | 9 +++------ old_docs/API_docs_v62/methods/invokeWithLayer.md | 9 +++------ old_docs/API_docs_v62/methods/invokeWithoutUpdates.md | 9 +++------ old_docs/API_docs_v62/methods/messages_addChatUser.md | 9 +++------ .../API_docs_v62/methods/messages_checkChatInvite.md | 9 +++------ .../API_docs_v62/methods/messages_clearRecentStickers.md | 9 +++------ old_docs/API_docs_v62/methods/messages_createChat.md | 9 +++------ old_docs/API_docs_v62/methods/messages_deleteChatUser.md | 9 +++------ old_docs/API_docs_v62/methods/messages_deleteHistory.md | 9 +++------ old_docs/API_docs_v62/methods/messages_deleteMessages.md | 9 +++------ old_docs/API_docs_v62/methods/messages_editChatAdmin.md | 9 +++------ old_docs/API_docs_v62/methods/messages_editChatPhoto.md | 9 +++------ old_docs/API_docs_v62/methods/messages_editChatTitle.md | 9 +++------ .../methods/messages_editInlineBotMessage.md | 9 +++------ old_docs/API_docs_v62/methods/messages_editMessage.md | 9 +++------ .../API_docs_v62/methods/messages_exportChatInvite.md | 9 +++------ old_docs/API_docs_v62/methods/messages_forwardMessage.md | 9 +++------ .../API_docs_v62/methods/messages_forwardMessages.md | 9 +++------ old_docs/API_docs_v62/methods/messages_getAllChats.md | 9 +++------ old_docs/API_docs_v62/methods/messages_getAllDrafts.md | 9 +++------ old_docs/API_docs_v62/methods/messages_getAllStickers.md | 9 +++------ .../API_docs_v62/methods/messages_getArchivedStickers.md | 9 +++------ .../API_docs_v62/methods/messages_getAttachedStickers.md | 9 +++------ .../methods/messages_getBotCallbackAnswer.md | 9 +++------ old_docs/API_docs_v62/methods/messages_getChats.md | 9 +++------ old_docs/API_docs_v62/methods/messages_getCommonChats.md | 9 +++------ old_docs/API_docs_v62/methods/messages_getDhConfig.md | 9 +++------ old_docs/API_docs_v62/methods/messages_getDialogs.md | 9 +++------ .../API_docs_v62/methods/messages_getDocumentByHash.md | 9 +++------ .../API_docs_v62/methods/messages_getFeaturedStickers.md | 9 +++------ .../API_docs_v62/methods/messages_getGameHighScores.md | 9 +++------ old_docs/API_docs_v62/methods/messages_getHistory.md | 9 +++------ .../API_docs_v62/methods/messages_getInlineBotResults.md | 9 +++------ .../methods/messages_getInlineGameHighScores.md | 9 +++------ .../API_docs_v62/methods/messages_getMaskStickers.md | 9 +++------ .../API_docs_v62/methods/messages_getMessageEditData.md | 9 +++------ old_docs/API_docs_v62/methods/messages_getMessages.md | 9 +++------ .../API_docs_v62/methods/messages_getMessagesViews.md | 9 +++------ old_docs/API_docs_v62/methods/messages_getPeerDialogs.md | 9 +++------ .../API_docs_v62/methods/messages_getPeerSettings.md | 9 +++------ .../API_docs_v62/methods/messages_getPinnedDialogs.md | 9 +++------ .../API_docs_v62/methods/messages_getRecentStickers.md | 9 +++------ old_docs/API_docs_v62/methods/messages_getSavedGifs.md | 9 +++------ old_docs/API_docs_v62/methods/messages_getStickerSet.md | 9 +++------ old_docs/API_docs_v62/methods/messages_getWebPage.md | 9 +++------ .../API_docs_v62/methods/messages_getWebPagePreview.md | 9 +++------ old_docs/API_docs_v62/methods/messages_hideReportSpam.md | 9 +++------ .../API_docs_v62/methods/messages_importChatInvite.md | 9 +++------ .../API_docs_v62/methods/messages_installStickerSet.md | 9 +++------ old_docs/API_docs_v62/methods/messages_migrateChat.md | 9 +++------ .../methods/messages_readEncryptedHistory.md | 9 +++------ .../methods/messages_readFeaturedStickers.md | 9 +++------ old_docs/API_docs_v62/methods/messages_readHistory.md | 9 +++------ .../API_docs_v62/methods/messages_readMessageContents.md | 9 +++------ .../API_docs_v62/methods/messages_receivedMessages.md | 9 +++------ old_docs/API_docs_v62/methods/messages_receivedQueue.md | 9 +++------ .../methods/messages_reorderPinnedDialogs.md | 9 +++------ .../API_docs_v62/methods/messages_reorderStickerSets.md | 9 +++------ .../API_docs_v62/methods/messages_reportEncryptedSpam.md | 9 +++------ old_docs/API_docs_v62/methods/messages_reportSpam.md | 9 +++------ old_docs/API_docs_v62/methods/messages_saveDraft.md | 9 +++------ old_docs/API_docs_v62/methods/messages_saveGif.md | 9 +++------ .../API_docs_v62/methods/messages_saveRecentSticker.md | 9 +++------ old_docs/API_docs_v62/methods/messages_search.md | 9 +++------ old_docs/API_docs_v62/methods/messages_searchGifs.md | 9 +++------ old_docs/API_docs_v62/methods/messages_searchGlobal.md | 9 +++------ old_docs/API_docs_v62/methods/messages_sendEncrypted.md | 9 +++------ .../API_docs_v62/methods/messages_sendEncryptedFile.md | 9 +++------ .../methods/messages_sendEncryptedService.md | 9 +++------ .../API_docs_v62/methods/messages_sendInlineBotResult.md | 9 +++------ old_docs/API_docs_v62/methods/messages_sendMedia.md | 9 +++------ old_docs/API_docs_v62/methods/messages_sendMessage.md | 9 +++------ .../methods/messages_setBotCallbackAnswer.md | 9 +++------ .../API_docs_v62/methods/messages_setEncryptedTyping.md | 9 +++------ old_docs/API_docs_v62/methods/messages_setGameScore.md | 9 +++------ .../API_docs_v62/methods/messages_setInlineBotResults.md | 9 +++------ .../API_docs_v62/methods/messages_setInlineGameScore.md | 9 +++------ old_docs/API_docs_v62/methods/messages_setTyping.md | 9 +++------ old_docs/API_docs_v62/methods/messages_startBot.md | 9 +++------ .../API_docs_v62/methods/messages_toggleChatAdmins.md | 9 +++------ .../API_docs_v62/methods/messages_toggleDialogPin.md | 9 +++------ .../API_docs_v62/methods/messages_uninstallStickerSet.md | 9 +++------ old_docs/API_docs_v62/methods/phone_receivedCall.md | 9 +++------ old_docs/API_docs_v62/methods/photos_deletePhotos.md | 9 +++------ old_docs/API_docs_v62/methods/photos_getUserPhotos.md | 9 +++------ .../API_docs_v62/methods/photos_updateProfilePhoto.md | 9 +++------ .../API_docs_v62/methods/photos_uploadProfilePhoto.md | 9 +++------ old_docs/API_docs_v62/methods/users_getUsers.md | 9 +++------ old_docs/API_docs_v65/methods/account_changePhone.md | 9 +++------ old_docs/API_docs_v65/methods/account_checkUsername.md | 9 +++------ old_docs/API_docs_v65/methods/account_confirmPhone.md | 9 +++------ old_docs/API_docs_v65/methods/account_deleteAccount.md | 9 +++------ old_docs/API_docs_v65/methods/account_getAccountTTL.md | 9 +++------ .../API_docs_v65/methods/account_getAuthorizations.md | 9 +++------ .../API_docs_v65/methods/account_getNotifySettings.md | 9 +++------ old_docs/API_docs_v65/methods/account_getPassword.md | 9 +++------ .../API_docs_v65/methods/account_getPasswordSettings.md | 9 +++------ old_docs/API_docs_v65/methods/account_getPrivacy.md | 9 +++------ old_docs/API_docs_v65/methods/account_getTmpPassword.md | 9 +++------ old_docs/API_docs_v65/methods/account_getWallPapers.md | 9 +++------ old_docs/API_docs_v65/methods/account_registerDevice.md | 9 +++------ old_docs/API_docs_v65/methods/account_reportPeer.md | 9 +++------ .../API_docs_v65/methods/account_resetAuthorization.md | 9 +++------ .../API_docs_v65/methods/account_resetNotifySettings.md | 9 +++------ .../API_docs_v65/methods/account_sendChangePhoneCode.md | 9 +++------ .../API_docs_v65/methods/account_sendConfirmPhoneCode.md | 9 +++------ old_docs/API_docs_v65/methods/account_setAccountTTL.md | 9 +++------ old_docs/API_docs_v65/methods/account_setPrivacy.md | 9 +++------ .../API_docs_v65/methods/account_unregisterDevice.md | 9 +++------ .../API_docs_v65/methods/account_updateDeviceLocked.md | 9 +++------ .../API_docs_v65/methods/account_updateNotifySettings.md | 9 +++------ .../methods/account_updatePasswordSettings.md | 9 +++------ old_docs/API_docs_v65/methods/account_updateProfile.md | 9 +++------ old_docs/API_docs_v65/methods/account_updateStatus.md | 9 +++------ old_docs/API_docs_v65/methods/account_updateUsername.md | 9 +++------ old_docs/API_docs_v65/methods/auth_bindTempAuthKey.md | 9 +++------ old_docs/API_docs_v65/methods/auth_cancelCode.md | 9 +++------ old_docs/API_docs_v65/methods/auth_checkPassword.md | 9 +++------ old_docs/API_docs_v65/methods/auth_checkPhone.md | 9 +++------ old_docs/API_docs_v65/methods/auth_dropTempAuthKeys.md | 9 +++------ .../API_docs_v65/methods/auth_exportAuthorization.md | 9 +++------ .../API_docs_v65/methods/auth_importAuthorization.md | 9 +++------ old_docs/API_docs_v65/methods/auth_recoverPassword.md | 9 +++------ .../API_docs_v65/methods/auth_requestPasswordRecovery.md | 9 +++------ old_docs/API_docs_v65/methods/auth_resendCode.md | 9 +++------ .../API_docs_v65/methods/auth_resetAuthorizations.md | 9 +++------ old_docs/API_docs_v65/methods/auth_sendInvites.md | 9 +++------ .../API_docs_v65/methods/bots_answerWebhookJSONQuery.md | 9 +++------ old_docs/API_docs_v65/methods/bots_sendCustomRequest.md | 9 +++------ old_docs/API_docs_v65/methods/channels_checkUsername.md | 9 +++------ old_docs/API_docs_v65/methods/channels_createChannel.md | 9 +++------ old_docs/API_docs_v65/methods/channels_deleteChannel.md | 9 +++------ old_docs/API_docs_v65/methods/channels_deleteMessages.md | 9 +++------ .../API_docs_v65/methods/channels_deleteUserHistory.md | 9 +++------ old_docs/API_docs_v65/methods/channels_editAbout.md | 9 +++------ old_docs/API_docs_v65/methods/channels_editAdmin.md | 9 +++------ old_docs/API_docs_v65/methods/channels_editPhoto.md | 9 +++------ old_docs/API_docs_v65/methods/channels_editTitle.md | 9 +++------ old_docs/API_docs_v65/methods/channels_exportInvite.md | 9 +++------ .../API_docs_v65/methods/channels_exportMessageLink.md | 9 +++------ .../methods/channels_getAdminedPublicChannels.md | 9 +++------ old_docs/API_docs_v65/methods/channels_getChannels.md | 9 +++------ old_docs/API_docs_v65/methods/channels_getMessages.md | 9 +++------ old_docs/API_docs_v65/methods/channels_getParticipant.md | 9 +++------ .../API_docs_v65/methods/channels_inviteToChannel.md | 9 +++------ old_docs/API_docs_v65/methods/channels_joinChannel.md | 9 +++------ .../API_docs_v65/methods/channels_kickFromChannel.md | 9 +++------ old_docs/API_docs_v65/methods/channels_leaveChannel.md | 9 +++------ old_docs/API_docs_v65/methods/channels_readHistory.md | 9 +++------ old_docs/API_docs_v65/methods/channels_reportSpam.md | 9 +++------ old_docs/API_docs_v65/methods/channels_toggleInvites.md | 9 +++------ .../API_docs_v65/methods/channels_toggleSignatures.md | 9 +++------ .../API_docs_v65/methods/channels_updatePinnedMessage.md | 9 +++------ old_docs/API_docs_v65/methods/channels_updateUsername.md | 9 +++------ old_docs/API_docs_v65/methods/contacts_block.md | 9 +++------ old_docs/API_docs_v65/methods/contacts_deleteContact.md | 9 +++------ old_docs/API_docs_v65/methods/contacts_deleteContacts.md | 9 +++------ old_docs/API_docs_v65/methods/contacts_exportCard.md | 9 +++------ old_docs/API_docs_v65/methods/contacts_getBlocked.md | 9 +++------ old_docs/API_docs_v65/methods/contacts_getContacts.md | 9 +++------ old_docs/API_docs_v65/methods/contacts_getStatuses.md | 9 +++------ old_docs/API_docs_v65/methods/contacts_getTopPeers.md | 9 +++------ old_docs/API_docs_v65/methods/contacts_importCard.md | 9 +++------ old_docs/API_docs_v65/methods/contacts_importContacts.md | 9 +++------ .../API_docs_v65/methods/contacts_resetTopPeerRating.md | 9 +++------ old_docs/API_docs_v65/methods/contacts_search.md | 9 +++------ old_docs/API_docs_v65/methods/contacts_unblock.md | 9 +++------ .../API_docs_v65/methods/contest_saveDeveloperInfo.md | 9 +++------ old_docs/API_docs_v65/methods/destroy_auth_key.md | 9 +++------ old_docs/API_docs_v65/methods/destroy_session.md | 9 +++------ old_docs/API_docs_v65/methods/get_future_salts.md | 9 +++------ old_docs/API_docs_v65/methods/help_getAppChangelog.md | 9 +++------ old_docs/API_docs_v65/methods/help_getAppUpdate.md | 9 +++------ old_docs/API_docs_v65/methods/help_getConfig.md | 9 +++------ old_docs/API_docs_v65/methods/help_getInviteText.md | 9 +++------ old_docs/API_docs_v65/methods/help_getNearestDc.md | 9 +++------ old_docs/API_docs_v65/methods/help_getSupport.md | 9 +++------ old_docs/API_docs_v65/methods/help_getTermsOfService.md | 9 +++------ old_docs/API_docs_v65/methods/help_saveAppLog.md | 9 +++------ .../API_docs_v65/methods/help_setBotUpdatesStatus.md | 9 +++------ old_docs/API_docs_v65/methods/initConnection.md | 9 +++------ old_docs/API_docs_v65/methods/invokeAfterMsg.md | 9 +++------ old_docs/API_docs_v65/methods/invokeAfterMsgs.md | 9 +++------ old_docs/API_docs_v65/methods/invokeWithLayer.md | 9 +++------ old_docs/API_docs_v65/methods/invokeWithoutUpdates.md | 9 +++------ old_docs/API_docs_v65/methods/messages_addChatUser.md | 9 +++------ .../API_docs_v65/methods/messages_checkChatInvite.md | 9 +++------ .../API_docs_v65/methods/messages_clearRecentStickers.md | 9 +++------ old_docs/API_docs_v65/methods/messages_createChat.md | 9 +++------ old_docs/API_docs_v65/methods/messages_deleteChatUser.md | 9 +++------ old_docs/API_docs_v65/methods/messages_deleteHistory.md | 9 +++------ old_docs/API_docs_v65/methods/messages_deleteMessages.md | 9 +++------ old_docs/API_docs_v65/methods/messages_editChatAdmin.md | 9 +++------ old_docs/API_docs_v65/methods/messages_editChatPhoto.md | 9 +++------ old_docs/API_docs_v65/methods/messages_editChatTitle.md | 9 +++------ .../methods/messages_editInlineBotMessage.md | 9 +++------ old_docs/API_docs_v65/methods/messages_editMessage.md | 9 +++------ .../API_docs_v65/methods/messages_exportChatInvite.md | 9 +++------ old_docs/API_docs_v65/methods/messages_forwardMessage.md | 9 +++------ .../API_docs_v65/methods/messages_forwardMessages.md | 9 +++------ old_docs/API_docs_v65/methods/messages_getAllChats.md | 9 +++------ old_docs/API_docs_v65/methods/messages_getAllDrafts.md | 9 +++------ old_docs/API_docs_v65/methods/messages_getAllStickers.md | 9 +++------ .../API_docs_v65/methods/messages_getArchivedStickers.md | 9 +++------ .../API_docs_v65/methods/messages_getAttachedStickers.md | 9 +++------ .../methods/messages_getBotCallbackAnswer.md | 9 +++------ old_docs/API_docs_v65/methods/messages_getChats.md | 9 +++------ old_docs/API_docs_v65/methods/messages_getCommonChats.md | 9 +++------ old_docs/API_docs_v65/methods/messages_getDhConfig.md | 9 +++------ old_docs/API_docs_v65/methods/messages_getDialogs.md | 9 +++------ .../API_docs_v65/methods/messages_getDocumentByHash.md | 9 +++------ .../API_docs_v65/methods/messages_getFeaturedStickers.md | 9 +++------ .../API_docs_v65/methods/messages_getGameHighScores.md | 9 +++------ old_docs/API_docs_v65/methods/messages_getHistory.md | 9 +++------ .../API_docs_v65/methods/messages_getInlineBotResults.md | 9 +++------ .../methods/messages_getInlineGameHighScores.md | 9 +++------ .../API_docs_v65/methods/messages_getMaskStickers.md | 9 +++------ .../API_docs_v65/methods/messages_getMessageEditData.md | 9 +++------ old_docs/API_docs_v65/methods/messages_getMessages.md | 9 +++------ .../API_docs_v65/methods/messages_getMessagesViews.md | 9 +++------ old_docs/API_docs_v65/methods/messages_getPeerDialogs.md | 9 +++------ .../API_docs_v65/methods/messages_getPeerSettings.md | 9 +++------ .../API_docs_v65/methods/messages_getPinnedDialogs.md | 9 +++------ .../API_docs_v65/methods/messages_getRecentStickers.md | 9 +++------ old_docs/API_docs_v65/methods/messages_getSavedGifs.md | 9 +++------ old_docs/API_docs_v65/methods/messages_getStickerSet.md | 9 +++------ old_docs/API_docs_v65/methods/messages_getWebPage.md | 9 +++------ .../API_docs_v65/methods/messages_getWebPagePreview.md | 9 +++------ old_docs/API_docs_v65/methods/messages_hideReportSpam.md | 9 +++------ .../API_docs_v65/methods/messages_importChatInvite.md | 9 +++------ .../API_docs_v65/methods/messages_installStickerSet.md | 9 +++------ old_docs/API_docs_v65/methods/messages_migrateChat.md | 9 +++------ .../methods/messages_readEncryptedHistory.md | 9 +++------ .../methods/messages_readFeaturedStickers.md | 9 +++------ old_docs/API_docs_v65/methods/messages_readHistory.md | 9 +++------ .../API_docs_v65/methods/messages_readMessageContents.md | 9 +++------ .../API_docs_v65/methods/messages_receivedMessages.md | 9 +++------ old_docs/API_docs_v65/methods/messages_receivedQueue.md | 9 +++------ .../methods/messages_reorderPinnedDialogs.md | 9 +++------ .../API_docs_v65/methods/messages_reorderStickerSets.md | 9 +++------ .../API_docs_v65/methods/messages_reportEncryptedSpam.md | 9 +++------ old_docs/API_docs_v65/methods/messages_reportSpam.md | 9 +++------ old_docs/API_docs_v65/methods/messages_saveDraft.md | 9 +++------ old_docs/API_docs_v65/methods/messages_saveGif.md | 9 +++------ .../API_docs_v65/methods/messages_saveRecentSticker.md | 9 +++------ old_docs/API_docs_v65/methods/messages_search.md | 9 +++------ old_docs/API_docs_v65/methods/messages_searchGifs.md | 9 +++------ old_docs/API_docs_v65/methods/messages_searchGlobal.md | 9 +++------ old_docs/API_docs_v65/methods/messages_sendEncrypted.md | 9 +++------ .../API_docs_v65/methods/messages_sendEncryptedFile.md | 9 +++------ .../methods/messages_sendEncryptedService.md | 9 +++------ .../API_docs_v65/methods/messages_sendInlineBotResult.md | 9 +++------ old_docs/API_docs_v65/methods/messages_sendMedia.md | 9 +++------ old_docs/API_docs_v65/methods/messages_sendMessage.md | 9 +++------ .../methods/messages_setBotCallbackAnswer.md | 9 +++------ .../methods/messages_setBotPrecheckoutResults.md | 9 +++------ .../methods/messages_setBotShippingResults.md | 9 +++------ .../API_docs_v65/methods/messages_setEncryptedTyping.md | 9 +++------ old_docs/API_docs_v65/methods/messages_setGameScore.md | 9 +++------ .../API_docs_v65/methods/messages_setInlineBotResults.md | 9 +++------ .../API_docs_v65/methods/messages_setInlineGameScore.md | 9 +++------ old_docs/API_docs_v65/methods/messages_setTyping.md | 9 +++------ old_docs/API_docs_v65/methods/messages_startBot.md | 9 +++------ .../API_docs_v65/methods/messages_toggleChatAdmins.md | 9 +++------ .../API_docs_v65/methods/messages_toggleDialogPin.md | 9 +++------ .../API_docs_v65/methods/messages_uninstallStickerSet.md | 9 +++------ old_docs/API_docs_v65/methods/payments_clearSavedInfo.md | 9 +++------ old_docs/API_docs_v65/methods/payments_getPaymentForm.md | 9 +++------ .../API_docs_v65/methods/payments_getPaymentReceipt.md | 9 +++------ old_docs/API_docs_v65/methods/payments_getSavedInfo.md | 9 +++------ .../API_docs_v65/methods/payments_sendPaymentForm.md | 9 +++------ .../methods/payments_validateRequestedInfo.md | 9 +++------ old_docs/API_docs_v65/methods/phone_getCallConfig.md | 9 +++------ old_docs/API_docs_v65/methods/phone_receivedCall.md | 9 +++------ old_docs/API_docs_v65/methods/phone_saveCallDebug.md | 9 +++------ old_docs/API_docs_v65/methods/phone_setCallRating.md | 9 +++------ old_docs/API_docs_v65/methods/photos_deletePhotos.md | 9 +++------ old_docs/API_docs_v65/methods/photos_getUserPhotos.md | 9 +++------ .../API_docs_v65/methods/photos_updateProfilePhoto.md | 9 +++------ .../API_docs_v65/methods/photos_uploadProfilePhoto.md | 9 +++------ old_docs/API_docs_v65/methods/ping.md | 9 +++------ old_docs/API_docs_v65/methods/ping_delay_disconnect.md | 9 +++------ old_docs/API_docs_v65/methods/req_DH_params.md | 9 +++------ old_docs/API_docs_v65/methods/req_pq.md | 9 +++------ old_docs/API_docs_v65/methods/rpc_drop_answer.md | 9 +++------ old_docs/API_docs_v65/methods/set_client_DH_params.md | 9 +++------ old_docs/API_docs_v65/methods/upload_getWebFile.md | 9 +++------ old_docs/API_docs_v65/methods/users_getUsers.md | 9 +++------ old_docs/API_docs_v66/methods/account_changePhone.md | 9 +++------ old_docs/API_docs_v66/methods/account_checkUsername.md | 9 +++------ old_docs/API_docs_v66/methods/account_confirmPhone.md | 9 +++------ old_docs/API_docs_v66/methods/account_deleteAccount.md | 9 +++------ old_docs/API_docs_v66/methods/account_getAccountTTL.md | 9 +++------ .../API_docs_v66/methods/account_getAuthorizations.md | 9 +++------ .../API_docs_v66/methods/account_getNotifySettings.md | 9 +++------ old_docs/API_docs_v66/methods/account_getPassword.md | 9 +++------ .../API_docs_v66/methods/account_getPasswordSettings.md | 9 +++------ old_docs/API_docs_v66/methods/account_getPrivacy.md | 9 +++------ old_docs/API_docs_v66/methods/account_getTmpPassword.md | 9 +++------ old_docs/API_docs_v66/methods/account_getWallPapers.md | 9 +++------ old_docs/API_docs_v66/methods/account_registerDevice.md | 9 +++------ old_docs/API_docs_v66/methods/account_reportPeer.md | 9 +++------ .../API_docs_v66/methods/account_resetAuthorization.md | 9 +++------ .../API_docs_v66/methods/account_resetNotifySettings.md | 9 +++------ .../API_docs_v66/methods/account_sendChangePhoneCode.md | 9 +++------ .../API_docs_v66/methods/account_sendConfirmPhoneCode.md | 9 +++------ old_docs/API_docs_v66/methods/account_setAccountTTL.md | 9 +++------ old_docs/API_docs_v66/methods/account_setPrivacy.md | 9 +++------ .../API_docs_v66/methods/account_unregisterDevice.md | 9 +++------ .../API_docs_v66/methods/account_updateDeviceLocked.md | 9 +++------ .../API_docs_v66/methods/account_updateNotifySettings.md | 9 +++------ .../methods/account_updatePasswordSettings.md | 9 +++------ old_docs/API_docs_v66/methods/account_updateProfile.md | 9 +++------ old_docs/API_docs_v66/methods/account_updateStatus.md | 9 +++------ old_docs/API_docs_v66/methods/account_updateUsername.md | 9 +++------ old_docs/API_docs_v66/methods/auth_bindTempAuthKey.md | 9 +++------ old_docs/API_docs_v66/methods/auth_cancelCode.md | 9 +++------ old_docs/API_docs_v66/methods/auth_checkPassword.md | 9 +++------ old_docs/API_docs_v66/methods/auth_checkPhone.md | 9 +++------ old_docs/API_docs_v66/methods/auth_dropTempAuthKeys.md | 9 +++------ .../API_docs_v66/methods/auth_exportAuthorization.md | 9 +++------ .../API_docs_v66/methods/auth_importAuthorization.md | 9 +++------ old_docs/API_docs_v66/methods/auth_recoverPassword.md | 9 +++------ .../API_docs_v66/methods/auth_requestPasswordRecovery.md | 9 +++------ old_docs/API_docs_v66/methods/auth_resendCode.md | 9 +++------ .../API_docs_v66/methods/auth_resetAuthorizations.md | 9 +++------ old_docs/API_docs_v66/methods/auth_sendInvites.md | 9 +++------ .../API_docs_v66/methods/bots_answerWebhookJSONQuery.md | 9 +++------ old_docs/API_docs_v66/methods/bots_sendCustomRequest.md | 9 +++------ old_docs/API_docs_v66/methods/channels_checkUsername.md | 9 +++------ old_docs/API_docs_v66/methods/channels_createChannel.md | 9 +++------ old_docs/API_docs_v66/methods/channels_deleteChannel.md | 9 +++------ old_docs/API_docs_v66/methods/channels_deleteMessages.md | 9 +++------ .../API_docs_v66/methods/channels_deleteUserHistory.md | 9 +++------ old_docs/API_docs_v66/methods/channels_editAbout.md | 9 +++------ old_docs/API_docs_v66/methods/channels_editAdmin.md | 9 +++------ old_docs/API_docs_v66/methods/channels_editPhoto.md | 9 +++------ old_docs/API_docs_v66/methods/channels_editTitle.md | 9 +++------ old_docs/API_docs_v66/methods/channels_exportInvite.md | 9 +++------ .../API_docs_v66/methods/channels_exportMessageLink.md | 9 +++------ .../methods/channels_getAdminedPublicChannels.md | 9 +++------ old_docs/API_docs_v66/methods/channels_getChannels.md | 9 +++------ old_docs/API_docs_v66/methods/channels_getMessages.md | 9 +++------ old_docs/API_docs_v66/methods/channels_getParticipant.md | 9 +++------ .../API_docs_v66/methods/channels_inviteToChannel.md | 9 +++------ old_docs/API_docs_v66/methods/channels_joinChannel.md | 9 +++------ .../API_docs_v66/methods/channels_kickFromChannel.md | 9 +++------ old_docs/API_docs_v66/methods/channels_leaveChannel.md | 9 +++------ old_docs/API_docs_v66/methods/channels_readHistory.md | 9 +++------ old_docs/API_docs_v66/methods/channels_reportSpam.md | 9 +++------ old_docs/API_docs_v66/methods/channels_toggleInvites.md | 9 +++------ .../API_docs_v66/methods/channels_toggleSignatures.md | 9 +++------ .../API_docs_v66/methods/channels_updatePinnedMessage.md | 9 +++------ old_docs/API_docs_v66/methods/channels_updateUsername.md | 9 +++------ old_docs/API_docs_v66/methods/contacts_block.md | 9 +++------ old_docs/API_docs_v66/methods/contacts_deleteContact.md | 9 +++------ old_docs/API_docs_v66/methods/contacts_deleteContacts.md | 9 +++------ old_docs/API_docs_v66/methods/contacts_exportCard.md | 9 +++------ old_docs/API_docs_v66/methods/contacts_getBlocked.md | 9 +++------ old_docs/API_docs_v66/methods/contacts_getContacts.md | 9 +++------ old_docs/API_docs_v66/methods/contacts_getStatuses.md | 9 +++------ old_docs/API_docs_v66/methods/contacts_getTopPeers.md | 9 +++------ old_docs/API_docs_v66/methods/contacts_importCard.md | 9 +++------ old_docs/API_docs_v66/methods/contacts_importContacts.md | 9 +++------ .../API_docs_v66/methods/contacts_resetTopPeerRating.md | 9 +++------ old_docs/API_docs_v66/methods/contacts_search.md | 9 +++------ old_docs/API_docs_v66/methods/contacts_unblock.md | 9 +++------ .../API_docs_v66/methods/contest_saveDeveloperInfo.md | 9 +++------ old_docs/API_docs_v66/methods/destroy_auth_key.md | 9 +++------ old_docs/API_docs_v66/methods/destroy_session.md | 9 +++------ old_docs/API_docs_v66/methods/get_future_salts.md | 9 +++------ old_docs/API_docs_v66/methods/help_getAppChangelog.md | 9 +++------ old_docs/API_docs_v66/methods/help_getAppUpdate.md | 9 +++------ old_docs/API_docs_v66/methods/help_getCdnConfig.md | 9 +++------ old_docs/API_docs_v66/methods/help_getConfig.md | 9 +++------ old_docs/API_docs_v66/methods/help_getInviteText.md | 9 +++------ old_docs/API_docs_v66/methods/help_getNearestDc.md | 9 +++------ old_docs/API_docs_v66/methods/help_getSupport.md | 9 +++------ old_docs/API_docs_v66/methods/help_getTermsOfService.md | 9 +++------ old_docs/API_docs_v66/methods/help_saveAppLog.md | 9 +++------ .../API_docs_v66/methods/help_setBotUpdatesStatus.md | 9 +++------ old_docs/API_docs_v66/methods/initConnection.md | 9 +++------ old_docs/API_docs_v66/methods/invokeAfterMsg.md | 9 +++------ old_docs/API_docs_v66/methods/invokeAfterMsgs.md | 9 +++------ old_docs/API_docs_v66/methods/invokeWithLayer.md | 9 +++------ old_docs/API_docs_v66/methods/invokeWithoutUpdates.md | 9 +++------ old_docs/API_docs_v66/methods/messages_addChatUser.md | 9 +++------ .../API_docs_v66/methods/messages_checkChatInvite.md | 9 +++------ .../API_docs_v66/methods/messages_clearRecentStickers.md | 9 +++------ old_docs/API_docs_v66/methods/messages_createChat.md | 9 +++------ old_docs/API_docs_v66/methods/messages_deleteChatUser.md | 9 +++------ old_docs/API_docs_v66/methods/messages_deleteHistory.md | 9 +++------ old_docs/API_docs_v66/methods/messages_deleteMessages.md | 9 +++------ old_docs/API_docs_v66/methods/messages_editChatAdmin.md | 9 +++------ old_docs/API_docs_v66/methods/messages_editChatPhoto.md | 9 +++------ old_docs/API_docs_v66/methods/messages_editChatTitle.md | 9 +++------ .../methods/messages_editInlineBotMessage.md | 9 +++------ old_docs/API_docs_v66/methods/messages_editMessage.md | 9 +++------ .../API_docs_v66/methods/messages_exportChatInvite.md | 9 +++------ old_docs/API_docs_v66/methods/messages_forwardMessage.md | 9 +++------ .../API_docs_v66/methods/messages_forwardMessages.md | 9 +++------ old_docs/API_docs_v66/methods/messages_getAllChats.md | 9 +++------ old_docs/API_docs_v66/methods/messages_getAllDrafts.md | 9 +++------ old_docs/API_docs_v66/methods/messages_getAllStickers.md | 9 +++------ .../API_docs_v66/methods/messages_getArchivedStickers.md | 9 +++------ .../API_docs_v66/methods/messages_getAttachedStickers.md | 9 +++------ .../methods/messages_getBotCallbackAnswer.md | 9 +++------ old_docs/API_docs_v66/methods/messages_getChats.md | 9 +++------ old_docs/API_docs_v66/methods/messages_getCommonChats.md | 9 +++------ old_docs/API_docs_v66/methods/messages_getDhConfig.md | 9 +++------ old_docs/API_docs_v66/methods/messages_getDialogs.md | 9 +++------ .../API_docs_v66/methods/messages_getDocumentByHash.md | 9 +++------ .../API_docs_v66/methods/messages_getFeaturedStickers.md | 9 +++------ .../API_docs_v66/methods/messages_getGameHighScores.md | 9 +++------ old_docs/API_docs_v66/methods/messages_getHistory.md | 9 +++------ .../API_docs_v66/methods/messages_getInlineBotResults.md | 9 +++------ .../methods/messages_getInlineGameHighScores.md | 9 +++------ .../API_docs_v66/methods/messages_getMaskStickers.md | 9 +++------ .../API_docs_v66/methods/messages_getMessageEditData.md | 9 +++------ old_docs/API_docs_v66/methods/messages_getMessages.md | 9 +++------ .../API_docs_v66/methods/messages_getMessagesViews.md | 9 +++------ old_docs/API_docs_v66/methods/messages_getPeerDialogs.md | 9 +++------ .../API_docs_v66/methods/messages_getPeerSettings.md | 9 +++------ .../API_docs_v66/methods/messages_getPinnedDialogs.md | 9 +++------ .../API_docs_v66/methods/messages_getRecentStickers.md | 9 +++------ old_docs/API_docs_v66/methods/messages_getSavedGifs.md | 9 +++------ old_docs/API_docs_v66/methods/messages_getStickerSet.md | 9 +++------ old_docs/API_docs_v66/methods/messages_getWebPage.md | 9 +++------ .../API_docs_v66/methods/messages_getWebPagePreview.md | 9 +++------ old_docs/API_docs_v66/methods/messages_hideReportSpam.md | 9 +++------ .../API_docs_v66/methods/messages_importChatInvite.md | 9 +++------ .../API_docs_v66/methods/messages_installStickerSet.md | 9 +++------ old_docs/API_docs_v66/methods/messages_migrateChat.md | 9 +++------ .../methods/messages_readEncryptedHistory.md | 9 +++------ .../methods/messages_readFeaturedStickers.md | 9 +++------ old_docs/API_docs_v66/methods/messages_readHistory.md | 9 +++------ .../API_docs_v66/methods/messages_readMessageContents.md | 9 +++------ .../API_docs_v66/methods/messages_receivedMessages.md | 9 +++------ old_docs/API_docs_v66/methods/messages_receivedQueue.md | 9 +++------ .../methods/messages_reorderPinnedDialogs.md | 9 +++------ .../API_docs_v66/methods/messages_reorderStickerSets.md | 9 +++------ .../API_docs_v66/methods/messages_reportEncryptedSpam.md | 9 +++------ old_docs/API_docs_v66/methods/messages_reportSpam.md | 9 +++------ old_docs/API_docs_v66/methods/messages_saveDraft.md | 9 +++------ old_docs/API_docs_v66/methods/messages_saveGif.md | 9 +++------ .../API_docs_v66/methods/messages_saveRecentSticker.md | 9 +++------ old_docs/API_docs_v66/methods/messages_search.md | 9 +++------ old_docs/API_docs_v66/methods/messages_searchGifs.md | 9 +++------ old_docs/API_docs_v66/methods/messages_searchGlobal.md | 9 +++------ old_docs/API_docs_v66/methods/messages_sendEncrypted.md | 9 +++------ .../API_docs_v66/methods/messages_sendEncryptedFile.md | 9 +++------ .../methods/messages_sendEncryptedService.md | 9 +++------ .../API_docs_v66/methods/messages_sendInlineBotResult.md | 9 +++------ old_docs/API_docs_v66/methods/messages_sendMedia.md | 9 +++------ old_docs/API_docs_v66/methods/messages_sendMessage.md | 9 +++------ .../methods/messages_setBotCallbackAnswer.md | 9 +++------ .../methods/messages_setBotPrecheckoutResults.md | 9 +++------ .../methods/messages_setBotShippingResults.md | 9 +++------ .../API_docs_v66/methods/messages_setEncryptedTyping.md | 9 +++------ old_docs/API_docs_v66/methods/messages_setGameScore.md | 9 +++------ .../API_docs_v66/methods/messages_setInlineBotResults.md | 9 +++------ .../API_docs_v66/methods/messages_setInlineGameScore.md | 9 +++------ old_docs/API_docs_v66/methods/messages_setTyping.md | 9 +++------ old_docs/API_docs_v66/methods/messages_startBot.md | 9 +++------ .../API_docs_v66/methods/messages_toggleChatAdmins.md | 9 +++------ .../API_docs_v66/methods/messages_toggleDialogPin.md | 9 +++------ .../API_docs_v66/methods/messages_uninstallStickerSet.md | 9 +++------ old_docs/API_docs_v66/methods/payments_clearSavedInfo.md | 9 +++------ old_docs/API_docs_v66/methods/payments_getPaymentForm.md | 9 +++------ .../API_docs_v66/methods/payments_getPaymentReceipt.md | 9 +++------ old_docs/API_docs_v66/methods/payments_getSavedInfo.md | 9 +++------ .../API_docs_v66/methods/payments_sendPaymentForm.md | 9 +++------ .../methods/payments_validateRequestedInfo.md | 9 +++------ old_docs/API_docs_v66/methods/phone_getCallConfig.md | 9 +++------ old_docs/API_docs_v66/methods/phone_receivedCall.md | 9 +++------ old_docs/API_docs_v66/methods/phone_saveCallDebug.md | 9 +++------ old_docs/API_docs_v66/methods/phone_setCallRating.md | 9 +++------ old_docs/API_docs_v66/methods/photos_deletePhotos.md | 9 +++------ old_docs/API_docs_v66/methods/photos_getUserPhotos.md | 9 +++------ .../API_docs_v66/methods/photos_updateProfilePhoto.md | 9 +++------ .../API_docs_v66/methods/photos_uploadProfilePhoto.md | 9 +++------ old_docs/API_docs_v66/methods/ping.md | 9 +++------ old_docs/API_docs_v66/methods/ping_delay_disconnect.md | 9 +++------ old_docs/API_docs_v66/methods/req_DH_params.md | 9 +++------ old_docs/API_docs_v66/methods/req_pq.md | 9 +++------ old_docs/API_docs_v66/methods/rpc_drop_answer.md | 9 +++------ old_docs/API_docs_v66/methods/set_client_DH_params.md | 9 +++------ old_docs/API_docs_v66/methods/upload_getWebFile.md | 9 +++------ old_docs/API_docs_v66/methods/users_getUsers.md | 9 +++------ old_docs/API_docs_v68/methods/account_changePhone.md | 9 +++------ old_docs/API_docs_v68/methods/account_checkUsername.md | 9 +++------ old_docs/API_docs_v68/methods/account_confirmPhone.md | 9 +++------ old_docs/API_docs_v68/methods/account_deleteAccount.md | 9 +++------ old_docs/API_docs_v68/methods/account_getAccountTTL.md | 9 +++------ .../API_docs_v68/methods/account_getAuthorizations.md | 9 +++------ .../API_docs_v68/methods/account_getNotifySettings.md | 9 +++------ old_docs/API_docs_v68/methods/account_getPassword.md | 9 +++------ .../API_docs_v68/methods/account_getPasswordSettings.md | 9 +++------ old_docs/API_docs_v68/methods/account_getPrivacy.md | 9 +++------ old_docs/API_docs_v68/methods/account_getTmpPassword.md | 9 +++------ old_docs/API_docs_v68/methods/account_getWallPapers.md | 9 +++------ old_docs/API_docs_v68/methods/account_registerDevice.md | 9 +++------ old_docs/API_docs_v68/methods/account_reportPeer.md | 9 +++------ .../API_docs_v68/methods/account_resetAuthorization.md | 9 +++------ .../API_docs_v68/methods/account_resetNotifySettings.md | 9 +++------ .../API_docs_v68/methods/account_sendChangePhoneCode.md | 9 +++------ .../API_docs_v68/methods/account_sendConfirmPhoneCode.md | 9 +++------ old_docs/API_docs_v68/methods/account_setAccountTTL.md | 9 +++------ old_docs/API_docs_v68/methods/account_setPrivacy.md | 9 +++------ .../API_docs_v68/methods/account_unregisterDevice.md | 9 +++------ .../API_docs_v68/methods/account_updateDeviceLocked.md | 9 +++------ .../API_docs_v68/methods/account_updateNotifySettings.md | 9 +++------ .../methods/account_updatePasswordSettings.md | 9 +++------ old_docs/API_docs_v68/methods/account_updateProfile.md | 9 +++------ old_docs/API_docs_v68/methods/account_updateStatus.md | 9 +++------ old_docs/API_docs_v68/methods/account_updateUsername.md | 9 +++------ old_docs/API_docs_v68/methods/auth_bindTempAuthKey.md | 9 +++------ old_docs/API_docs_v68/methods/auth_cancelCode.md | 9 +++------ old_docs/API_docs_v68/methods/auth_checkPassword.md | 9 +++------ old_docs/API_docs_v68/methods/auth_checkPhone.md | 9 +++------ old_docs/API_docs_v68/methods/auth_dropTempAuthKeys.md | 9 +++------ .../API_docs_v68/methods/auth_exportAuthorization.md | 9 +++------ .../API_docs_v68/methods/auth_importAuthorization.md | 9 +++------ old_docs/API_docs_v68/methods/auth_recoverPassword.md | 9 +++------ .../API_docs_v68/methods/auth_requestPasswordRecovery.md | 9 +++------ old_docs/API_docs_v68/methods/auth_resendCode.md | 9 +++------ .../API_docs_v68/methods/auth_resetAuthorizations.md | 9 +++------ old_docs/API_docs_v68/methods/auth_sendInvites.md | 9 +++------ .../API_docs_v68/methods/bots_answerWebhookJSONQuery.md | 9 +++------ old_docs/API_docs_v68/methods/bots_sendCustomRequest.md | 9 +++------ old_docs/API_docs_v68/methods/channels_checkUsername.md | 9 +++------ old_docs/API_docs_v68/methods/channels_createChannel.md | 9 +++------ old_docs/API_docs_v68/methods/channels_deleteChannel.md | 9 +++------ old_docs/API_docs_v68/methods/channels_deleteMessages.md | 9 +++------ .../API_docs_v68/methods/channels_deleteUserHistory.md | 9 +++------ old_docs/API_docs_v68/methods/channels_editAbout.md | 9 +++------ old_docs/API_docs_v68/methods/channels_editAdmin.md | 9 +++------ old_docs/API_docs_v68/methods/channels_editBanned.md | 9 +++------ old_docs/API_docs_v68/methods/channels_editPhoto.md | 9 +++------ old_docs/API_docs_v68/methods/channels_editTitle.md | 9 +++------ old_docs/API_docs_v68/methods/channels_exportInvite.md | 9 +++------ .../API_docs_v68/methods/channels_exportMessageLink.md | 9 +++------ old_docs/API_docs_v68/methods/channels_getAdminLog.md | 9 +++------ .../methods/channels_getAdminedPublicChannels.md | 9 +++------ old_docs/API_docs_v68/methods/channels_getChannels.md | 9 +++------ old_docs/API_docs_v68/methods/channels_getMessages.md | 9 +++------ old_docs/API_docs_v68/methods/channels_getParticipant.md | 9 +++------ .../API_docs_v68/methods/channels_inviteToChannel.md | 9 +++------ old_docs/API_docs_v68/methods/channels_joinChannel.md | 9 +++------ old_docs/API_docs_v68/methods/channels_leaveChannel.md | 9 +++------ old_docs/API_docs_v68/methods/channels_readHistory.md | 9 +++------ old_docs/API_docs_v68/methods/channels_reportSpam.md | 9 +++------ old_docs/API_docs_v68/methods/channels_toggleInvites.md | 9 +++------ .../API_docs_v68/methods/channels_toggleSignatures.md | 9 +++------ .../API_docs_v68/methods/channels_updatePinnedMessage.md | 9 +++------ old_docs/API_docs_v68/methods/channels_updateUsername.md | 9 +++------ old_docs/API_docs_v68/methods/contacts_block.md | 9 +++------ old_docs/API_docs_v68/methods/contacts_deleteContact.md | 9 +++------ old_docs/API_docs_v68/methods/contacts_deleteContacts.md | 9 +++------ old_docs/API_docs_v68/methods/contacts_exportCard.md | 9 +++------ old_docs/API_docs_v68/methods/contacts_getBlocked.md | 9 +++------ old_docs/API_docs_v68/methods/contacts_getContacts.md | 9 +++------ old_docs/API_docs_v68/methods/contacts_getStatuses.md | 9 +++------ old_docs/API_docs_v68/methods/contacts_getTopPeers.md | 9 +++------ old_docs/API_docs_v68/methods/contacts_importCard.md | 9 +++------ old_docs/API_docs_v68/methods/contacts_importContacts.md | 9 +++------ .../API_docs_v68/methods/contacts_resetTopPeerRating.md | 9 +++------ old_docs/API_docs_v68/methods/contacts_search.md | 9 +++------ old_docs/API_docs_v68/methods/contacts_unblock.md | 9 +++------ .../API_docs_v68/methods/contest_saveDeveloperInfo.md | 9 +++------ old_docs/API_docs_v68/methods/destroy_auth_key.md | 9 +++------ old_docs/API_docs_v68/methods/destroy_session.md | 9 +++------ old_docs/API_docs_v68/methods/get_future_salts.md | 9 +++------ old_docs/API_docs_v68/methods/help_getAppChangelog.md | 9 +++------ old_docs/API_docs_v68/methods/help_getAppUpdate.md | 9 +++------ old_docs/API_docs_v68/methods/help_getCdnConfig.md | 9 +++------ old_docs/API_docs_v68/methods/help_getConfig.md | 9 +++------ old_docs/API_docs_v68/methods/help_getInviteText.md | 9 +++------ old_docs/API_docs_v68/methods/help_getNearestDc.md | 9 +++------ old_docs/API_docs_v68/methods/help_getSupport.md | 9 +++------ old_docs/API_docs_v68/methods/help_getTermsOfService.md | 9 +++------ old_docs/API_docs_v68/methods/help_saveAppLog.md | 9 +++------ .../API_docs_v68/methods/help_setBotUpdatesStatus.md | 9 +++------ old_docs/API_docs_v68/methods/initConnection.md | 9 +++------ old_docs/API_docs_v68/methods/invokeAfterMsg.md | 9 +++------ old_docs/API_docs_v68/methods/invokeAfterMsgs.md | 9 +++------ old_docs/API_docs_v68/methods/invokeWithLayer.md | 9 +++------ old_docs/API_docs_v68/methods/invokeWithoutUpdates.md | 9 +++------ old_docs/API_docs_v68/methods/langpack_getDifference.md | 9 +++------ old_docs/API_docs_v68/methods/langpack_getLangPack.md | 9 +++------ old_docs/API_docs_v68/methods/langpack_getLanguages.md | 9 +++------ old_docs/API_docs_v68/methods/langpack_getStrings.md | 9 +++------ old_docs/API_docs_v68/methods/messages_addChatUser.md | 9 +++------ .../API_docs_v68/methods/messages_checkChatInvite.md | 9 +++------ .../API_docs_v68/methods/messages_clearRecentStickers.md | 9 +++------ old_docs/API_docs_v68/methods/messages_createChat.md | 9 +++------ old_docs/API_docs_v68/methods/messages_deleteChatUser.md | 9 +++------ old_docs/API_docs_v68/methods/messages_deleteHistory.md | 9 +++------ old_docs/API_docs_v68/methods/messages_deleteMessages.md | 9 +++------ old_docs/API_docs_v68/methods/messages_editChatAdmin.md | 9 +++------ old_docs/API_docs_v68/methods/messages_editChatPhoto.md | 9 +++------ old_docs/API_docs_v68/methods/messages_editChatTitle.md | 9 +++------ .../methods/messages_editInlineBotMessage.md | 9 +++------ old_docs/API_docs_v68/methods/messages_editMessage.md | 9 +++------ .../API_docs_v68/methods/messages_exportChatInvite.md | 9 +++------ old_docs/API_docs_v68/methods/messages_forwardMessage.md | 9 +++------ .../API_docs_v68/methods/messages_forwardMessages.md | 9 +++------ old_docs/API_docs_v68/methods/messages_getAllChats.md | 9 +++------ old_docs/API_docs_v68/methods/messages_getAllDrafts.md | 9 +++------ old_docs/API_docs_v68/methods/messages_getAllStickers.md | 9 +++------ .../API_docs_v68/methods/messages_getArchivedStickers.md | 9 +++------ .../API_docs_v68/methods/messages_getAttachedStickers.md | 9 +++------ .../methods/messages_getBotCallbackAnswer.md | 9 +++------ old_docs/API_docs_v68/methods/messages_getChats.md | 9 +++------ old_docs/API_docs_v68/methods/messages_getCommonChats.md | 9 +++------ old_docs/API_docs_v68/methods/messages_getDhConfig.md | 9 +++------ old_docs/API_docs_v68/methods/messages_getDialogs.md | 9 +++------ .../API_docs_v68/methods/messages_getDocumentByHash.md | 9 +++------ .../API_docs_v68/methods/messages_getFeaturedStickers.md | 9 +++------ .../API_docs_v68/methods/messages_getGameHighScores.md | 9 +++------ old_docs/API_docs_v68/methods/messages_getHistory.md | 9 +++------ .../API_docs_v68/methods/messages_getInlineBotResults.md | 9 +++------ .../methods/messages_getInlineGameHighScores.md | 9 +++------ .../API_docs_v68/methods/messages_getMaskStickers.md | 9 +++------ .../API_docs_v68/methods/messages_getMessageEditData.md | 9 +++------ old_docs/API_docs_v68/methods/messages_getMessages.md | 9 +++------ .../API_docs_v68/methods/messages_getMessagesViews.md | 9 +++------ old_docs/API_docs_v68/methods/messages_getPeerDialogs.md | 9 +++------ .../API_docs_v68/methods/messages_getPeerSettings.md | 9 +++------ .../API_docs_v68/methods/messages_getPinnedDialogs.md | 9 +++------ .../API_docs_v68/methods/messages_getRecentStickers.md | 9 +++------ old_docs/API_docs_v68/methods/messages_getSavedGifs.md | 9 +++------ old_docs/API_docs_v68/methods/messages_getStickerSet.md | 9 +++------ old_docs/API_docs_v68/methods/messages_getWebPage.md | 9 +++------ .../API_docs_v68/methods/messages_getWebPagePreview.md | 9 +++------ old_docs/API_docs_v68/methods/messages_hideReportSpam.md | 9 +++------ .../API_docs_v68/methods/messages_importChatInvite.md | 9 +++------ .../API_docs_v68/methods/messages_installStickerSet.md | 9 +++------ old_docs/API_docs_v68/methods/messages_migrateChat.md | 9 +++------ .../methods/messages_readEncryptedHistory.md | 9 +++------ .../methods/messages_readFeaturedStickers.md | 9 +++------ old_docs/API_docs_v68/methods/messages_readHistory.md | 9 +++------ .../API_docs_v68/methods/messages_readMessageContents.md | 9 +++------ .../API_docs_v68/methods/messages_receivedMessages.md | 9 +++------ old_docs/API_docs_v68/methods/messages_receivedQueue.md | 9 +++------ .../methods/messages_reorderPinnedDialogs.md | 9 +++------ .../API_docs_v68/methods/messages_reorderStickerSets.md | 9 +++------ .../API_docs_v68/methods/messages_reportEncryptedSpam.md | 9 +++------ old_docs/API_docs_v68/methods/messages_reportSpam.md | 9 +++------ old_docs/API_docs_v68/methods/messages_saveDraft.md | 9 +++------ old_docs/API_docs_v68/methods/messages_saveGif.md | 9 +++------ .../API_docs_v68/methods/messages_saveRecentSticker.md | 9 +++------ old_docs/API_docs_v68/methods/messages_search.md | 9 +++------ old_docs/API_docs_v68/methods/messages_searchGifs.md | 9 +++------ old_docs/API_docs_v68/methods/messages_searchGlobal.md | 9 +++------ old_docs/API_docs_v68/methods/messages_sendEncrypted.md | 9 +++------ .../API_docs_v68/methods/messages_sendEncryptedFile.md | 9 +++------ .../methods/messages_sendEncryptedService.md | 9 +++------ .../API_docs_v68/methods/messages_sendInlineBotResult.md | 9 +++------ old_docs/API_docs_v68/methods/messages_sendMedia.md | 9 +++------ old_docs/API_docs_v68/methods/messages_sendMessage.md | 9 +++------ .../methods/messages_setBotCallbackAnswer.md | 9 +++------ .../methods/messages_setBotPrecheckoutResults.md | 9 +++------ .../methods/messages_setBotShippingResults.md | 9 +++------ .../API_docs_v68/methods/messages_setEncryptedTyping.md | 9 +++------ old_docs/API_docs_v68/methods/messages_setGameScore.md | 9 +++------ .../API_docs_v68/methods/messages_setInlineBotResults.md | 9 +++------ .../API_docs_v68/methods/messages_setInlineGameScore.md | 9 +++------ old_docs/API_docs_v68/methods/messages_setTyping.md | 9 +++------ old_docs/API_docs_v68/methods/messages_startBot.md | 9 +++------ .../API_docs_v68/methods/messages_toggleChatAdmins.md | 9 +++------ .../API_docs_v68/methods/messages_toggleDialogPin.md | 9 +++------ .../API_docs_v68/methods/messages_uninstallStickerSet.md | 9 +++------ old_docs/API_docs_v68/methods/messages_uploadMedia.md | 9 +++------ old_docs/API_docs_v68/methods/payments_clearSavedInfo.md | 9 +++------ old_docs/API_docs_v68/methods/payments_getPaymentForm.md | 9 +++------ .../API_docs_v68/methods/payments_getPaymentReceipt.md | 9 +++------ old_docs/API_docs_v68/methods/payments_getSavedInfo.md | 9 +++------ .../API_docs_v68/methods/payments_sendPaymentForm.md | 9 +++------ .../methods/payments_validateRequestedInfo.md | 9 +++------ old_docs/API_docs_v68/methods/phone_getCallConfig.md | 9 +++------ old_docs/API_docs_v68/methods/phone_receivedCall.md | 9 +++------ old_docs/API_docs_v68/methods/phone_saveCallDebug.md | 9 +++------ old_docs/API_docs_v68/methods/phone_setCallRating.md | 9 +++------ old_docs/API_docs_v68/methods/photos_deletePhotos.md | 9 +++------ old_docs/API_docs_v68/methods/photos_getUserPhotos.md | 9 +++------ .../API_docs_v68/methods/photos_updateProfilePhoto.md | 9 +++------ .../API_docs_v68/methods/photos_uploadProfilePhoto.md | 9 +++------ old_docs/API_docs_v68/methods/ping.md | 9 +++------ old_docs/API_docs_v68/methods/ping_delay_disconnect.md | 9 +++------ old_docs/API_docs_v68/methods/req_DH_params.md | 9 +++------ old_docs/API_docs_v68/methods/req_pq.md | 9 +++------ old_docs/API_docs_v68/methods/rpc_drop_answer.md | 9 +++------ old_docs/API_docs_v68/methods/set_client_DH_params.md | 9 +++------ .../API_docs_v68/methods/stickers_addStickerToSet.md | 9 +++------ .../methods/stickers_changeStickerPosition.md | 9 +++------ .../API_docs_v68/methods/stickers_createStickerSet.md | 9 +++------ .../methods/stickers_removeStickerFromSet.md | 9 +++------ old_docs/API_docs_v68/methods/upload_getWebFile.md | 9 +++------ old_docs/API_docs_v68/methods/users_getUsers.md | 9 +++------ old_docs/API_docs_v70/methods/account_changePhone.md | 9 +++------ old_docs/API_docs_v70/methods/account_checkUsername.md | 9 +++------ old_docs/API_docs_v70/methods/account_confirmPhone.md | 9 +++------ old_docs/API_docs_v70/methods/account_deleteAccount.md | 9 +++------ old_docs/API_docs_v70/methods/account_getAccountTTL.md | 9 +++------ .../API_docs_v70/methods/account_getAuthorizations.md | 9 +++------ .../API_docs_v70/methods/account_getNotifySettings.md | 9 +++------ old_docs/API_docs_v70/methods/account_getPassword.md | 9 +++------ .../API_docs_v70/methods/account_getPasswordSettings.md | 9 +++------ old_docs/API_docs_v70/methods/account_getPrivacy.md | 9 +++------ old_docs/API_docs_v70/methods/account_getTmpPassword.md | 9 +++------ old_docs/API_docs_v70/methods/account_getWallPapers.md | 9 +++------ old_docs/API_docs_v70/methods/account_registerDevice.md | 9 +++------ old_docs/API_docs_v70/methods/account_reportPeer.md | 9 +++------ .../API_docs_v70/methods/account_resetAuthorization.md | 9 +++------ .../API_docs_v70/methods/account_resetNotifySettings.md | 9 +++------ .../API_docs_v70/methods/account_sendChangePhoneCode.md | 9 +++------ .../API_docs_v70/methods/account_sendConfirmPhoneCode.md | 9 +++------ old_docs/API_docs_v70/methods/account_setAccountTTL.md | 9 +++------ old_docs/API_docs_v70/methods/account_setPrivacy.md | 9 +++------ .../API_docs_v70/methods/account_unregisterDevice.md | 9 +++------ .../API_docs_v70/methods/account_updateDeviceLocked.md | 9 +++------ .../API_docs_v70/methods/account_updateNotifySettings.md | 9 +++------ .../methods/account_updatePasswordSettings.md | 9 +++------ old_docs/API_docs_v70/methods/account_updateProfile.md | 9 +++------ old_docs/API_docs_v70/methods/account_updateStatus.md | 9 +++------ old_docs/API_docs_v70/methods/account_updateUsername.md | 9 +++------ old_docs/API_docs_v70/methods/auth_bindTempAuthKey.md | 9 +++------ old_docs/API_docs_v70/methods/auth_cancelCode.md | 9 +++------ old_docs/API_docs_v70/methods/auth_checkPassword.md | 9 +++------ old_docs/API_docs_v70/methods/auth_checkPhone.md | 9 +++------ old_docs/API_docs_v70/methods/auth_dropTempAuthKeys.md | 9 +++------ .../API_docs_v70/methods/auth_exportAuthorization.md | 9 +++------ .../API_docs_v70/methods/auth_importAuthorization.md | 9 +++------ old_docs/API_docs_v70/methods/auth_recoverPassword.md | 9 +++------ .../API_docs_v70/methods/auth_requestPasswordRecovery.md | 9 +++------ old_docs/API_docs_v70/methods/auth_resendCode.md | 9 +++------ .../API_docs_v70/methods/auth_resetAuthorizations.md | 9 +++------ old_docs/API_docs_v70/methods/auth_sendInvites.md | 9 +++------ .../API_docs_v70/methods/bots_answerWebhookJSONQuery.md | 9 +++------ old_docs/API_docs_v70/methods/bots_sendCustomRequest.md | 9 +++------ old_docs/API_docs_v70/methods/channels_checkUsername.md | 9 +++------ old_docs/API_docs_v70/methods/channels_createChannel.md | 9 +++------ old_docs/API_docs_v70/methods/channels_deleteChannel.md | 9 +++------ old_docs/API_docs_v70/methods/channels_deleteMessages.md | 9 +++------ .../API_docs_v70/methods/channels_deleteUserHistory.md | 9 +++------ old_docs/API_docs_v70/methods/channels_editAbout.md | 9 +++------ old_docs/API_docs_v70/methods/channels_editAdmin.md | 9 +++------ old_docs/API_docs_v70/methods/channels_editBanned.md | 9 +++------ old_docs/API_docs_v70/methods/channels_editPhoto.md | 9 +++------ old_docs/API_docs_v70/methods/channels_editTitle.md | 9 +++------ old_docs/API_docs_v70/methods/channels_exportInvite.md | 9 +++------ .../API_docs_v70/methods/channels_exportMessageLink.md | 9 +++------ old_docs/API_docs_v70/methods/channels_getAdminLog.md | 9 +++------ .../methods/channels_getAdminedPublicChannels.md | 9 +++------ old_docs/API_docs_v70/methods/channels_getChannels.md | 9 +++------ old_docs/API_docs_v70/methods/channels_getMessages.md | 9 +++------ old_docs/API_docs_v70/methods/channels_getParticipant.md | 9 +++------ .../API_docs_v70/methods/channels_inviteToChannel.md | 9 +++------ old_docs/API_docs_v70/methods/channels_joinChannel.md | 9 +++------ old_docs/API_docs_v70/methods/channels_leaveChannel.md | 9 +++------ old_docs/API_docs_v70/methods/channels_readHistory.md | 9 +++------ old_docs/API_docs_v70/methods/channels_reportSpam.md | 9 +++------ old_docs/API_docs_v70/methods/channels_toggleInvites.md | 9 +++------ .../API_docs_v70/methods/channels_toggleSignatures.md | 9 +++------ .../API_docs_v70/methods/channels_updatePinnedMessage.md | 9 +++------ old_docs/API_docs_v70/methods/channels_updateUsername.md | 9 +++------ old_docs/API_docs_v70/methods/contacts_block.md | 9 +++------ old_docs/API_docs_v70/methods/contacts_deleteContact.md | 9 +++------ old_docs/API_docs_v70/methods/contacts_deleteContacts.md | 9 +++------ old_docs/API_docs_v70/methods/contacts_exportCard.md | 9 +++------ old_docs/API_docs_v70/methods/contacts_getBlocked.md | 9 +++------ old_docs/API_docs_v70/methods/contacts_getContacts.md | 9 +++------ old_docs/API_docs_v70/methods/contacts_getStatuses.md | 9 +++------ old_docs/API_docs_v70/methods/contacts_getTopPeers.md | 9 +++------ old_docs/API_docs_v70/methods/contacts_importCard.md | 9 +++------ old_docs/API_docs_v70/methods/contacts_importContacts.md | 9 +++------ .../API_docs_v70/methods/contacts_resetTopPeerRating.md | 9 +++------ old_docs/API_docs_v70/methods/contacts_search.md | 9 +++------ old_docs/API_docs_v70/methods/contacts_unblock.md | 9 +++------ .../API_docs_v70/methods/contest_saveDeveloperInfo.md | 9 +++------ old_docs/API_docs_v70/methods/destroy_auth_key.md | 9 +++------ old_docs/API_docs_v70/methods/destroy_session.md | 9 +++------ old_docs/API_docs_v70/methods/get_future_salts.md | 9 +++------ old_docs/API_docs_v70/methods/help_getAppChangelog.md | 9 +++------ old_docs/API_docs_v70/methods/help_getAppUpdate.md | 9 +++------ old_docs/API_docs_v70/methods/help_getCdnConfig.md | 9 +++------ old_docs/API_docs_v70/methods/help_getConfig.md | 9 +++------ old_docs/API_docs_v70/methods/help_getInviteText.md | 9 +++------ old_docs/API_docs_v70/methods/help_getNearestDc.md | 9 +++------ old_docs/API_docs_v70/methods/help_getSupport.md | 9 +++------ old_docs/API_docs_v70/methods/help_getTermsOfService.md | 9 +++------ old_docs/API_docs_v70/methods/help_saveAppLog.md | 9 +++------ .../API_docs_v70/methods/help_setBotUpdatesStatus.md | 9 +++------ old_docs/API_docs_v70/methods/initConnection.md | 9 +++------ old_docs/API_docs_v70/methods/invokeAfterMsg.md | 9 +++------ old_docs/API_docs_v70/methods/invokeAfterMsgs.md | 9 +++------ old_docs/API_docs_v70/methods/invokeWithLayer.md | 9 +++------ old_docs/API_docs_v70/methods/invokeWithoutUpdates.md | 9 +++------ old_docs/API_docs_v70/methods/langpack_getDifference.md | 9 +++------ old_docs/API_docs_v70/methods/langpack_getLangPack.md | 9 +++------ old_docs/API_docs_v70/methods/langpack_getLanguages.md | 9 +++------ old_docs/API_docs_v70/methods/langpack_getStrings.md | 9 +++------ old_docs/API_docs_v70/methods/messages_addChatUser.md | 9 +++------ .../API_docs_v70/methods/messages_checkChatInvite.md | 9 +++------ .../API_docs_v70/methods/messages_clearRecentStickers.md | 9 +++------ old_docs/API_docs_v70/methods/messages_createChat.md | 9 +++------ old_docs/API_docs_v70/methods/messages_deleteChatUser.md | 9 +++------ old_docs/API_docs_v70/methods/messages_deleteHistory.md | 9 +++------ old_docs/API_docs_v70/methods/messages_deleteMessages.md | 9 +++------ old_docs/API_docs_v70/methods/messages_editChatAdmin.md | 9 +++------ old_docs/API_docs_v70/methods/messages_editChatPhoto.md | 9 +++------ old_docs/API_docs_v70/methods/messages_editChatTitle.md | 9 +++------ .../methods/messages_editInlineBotMessage.md | 9 +++------ old_docs/API_docs_v70/methods/messages_editMessage.md | 9 +++------ .../API_docs_v70/methods/messages_exportChatInvite.md | 9 +++------ old_docs/API_docs_v70/methods/messages_forwardMessage.md | 9 +++------ .../API_docs_v70/methods/messages_forwardMessages.md | 9 +++------ old_docs/API_docs_v70/methods/messages_getAllChats.md | 9 +++------ old_docs/API_docs_v70/methods/messages_getAllDrafts.md | 9 +++------ old_docs/API_docs_v70/methods/messages_getAllStickers.md | 9 +++------ .../API_docs_v70/methods/messages_getArchivedStickers.md | 9 +++------ .../API_docs_v70/methods/messages_getAttachedStickers.md | 9 +++------ .../methods/messages_getBotCallbackAnswer.md | 9 +++------ old_docs/API_docs_v70/methods/messages_getChats.md | 9 +++------ old_docs/API_docs_v70/methods/messages_getCommonChats.md | 9 +++------ old_docs/API_docs_v70/methods/messages_getDhConfig.md | 9 +++------ old_docs/API_docs_v70/methods/messages_getDialogs.md | 9 +++------ .../API_docs_v70/methods/messages_getDocumentByHash.md | 9 +++------ .../API_docs_v70/methods/messages_getFeaturedStickers.md | 9 +++------ .../API_docs_v70/methods/messages_getGameHighScores.md | 9 +++------ old_docs/API_docs_v70/methods/messages_getHistory.md | 9 +++------ .../API_docs_v70/methods/messages_getInlineBotResults.md | 9 +++------ .../methods/messages_getInlineGameHighScores.md | 9 +++------ .../API_docs_v70/methods/messages_getMaskStickers.md | 9 +++------ .../API_docs_v70/methods/messages_getMessageEditData.md | 9 +++------ old_docs/API_docs_v70/methods/messages_getMessages.md | 9 +++------ .../API_docs_v70/methods/messages_getMessagesViews.md | 9 +++------ old_docs/API_docs_v70/methods/messages_getPeerDialogs.md | 9 +++------ .../API_docs_v70/methods/messages_getPeerSettings.md | 9 +++------ .../API_docs_v70/methods/messages_getPinnedDialogs.md | 9 +++------ .../API_docs_v70/methods/messages_getRecentStickers.md | 9 +++------ old_docs/API_docs_v70/methods/messages_getSavedGifs.md | 9 +++------ old_docs/API_docs_v70/methods/messages_getStickerSet.md | 9 +++------ old_docs/API_docs_v70/methods/messages_getWebPage.md | 9 +++------ .../API_docs_v70/methods/messages_getWebPagePreview.md | 9 +++------ old_docs/API_docs_v70/methods/messages_hideReportSpam.md | 9 +++------ .../API_docs_v70/methods/messages_importChatInvite.md | 9 +++------ .../API_docs_v70/methods/messages_installStickerSet.md | 9 +++------ old_docs/API_docs_v70/methods/messages_migrateChat.md | 9 +++------ .../methods/messages_readEncryptedHistory.md | 9 +++------ .../methods/messages_readFeaturedStickers.md | 9 +++------ old_docs/API_docs_v70/methods/messages_readHistory.md | 9 +++------ .../API_docs_v70/methods/messages_readMessageContents.md | 9 +++------ .../API_docs_v70/methods/messages_receivedMessages.md | 9 +++------ old_docs/API_docs_v70/methods/messages_receivedQueue.md | 9 +++------ .../methods/messages_reorderPinnedDialogs.md | 9 +++------ .../API_docs_v70/methods/messages_reorderStickerSets.md | 9 +++------ .../API_docs_v70/methods/messages_reportEncryptedSpam.md | 9 +++------ old_docs/API_docs_v70/methods/messages_reportSpam.md | 9 +++------ old_docs/API_docs_v70/methods/messages_saveDraft.md | 9 +++------ old_docs/API_docs_v70/methods/messages_saveGif.md | 9 +++------ .../API_docs_v70/methods/messages_saveRecentSticker.md | 9 +++------ old_docs/API_docs_v70/methods/messages_search.md | 9 +++------ old_docs/API_docs_v70/methods/messages_searchGifs.md | 9 +++------ old_docs/API_docs_v70/methods/messages_searchGlobal.md | 9 +++------ old_docs/API_docs_v70/methods/messages_sendEncrypted.md | 9 +++------ .../API_docs_v70/methods/messages_sendEncryptedFile.md | 9 +++------ .../methods/messages_sendEncryptedService.md | 9 +++------ .../API_docs_v70/methods/messages_sendInlineBotResult.md | 9 +++------ old_docs/API_docs_v70/methods/messages_sendMedia.md | 9 +++------ old_docs/API_docs_v70/methods/messages_sendMessage.md | 9 +++------ .../methods/messages_sendScreenshotNotification.md | 9 +++------ .../methods/messages_setBotCallbackAnswer.md | 9 +++------ .../methods/messages_setBotPrecheckoutResults.md | 9 +++------ .../methods/messages_setBotShippingResults.md | 9 +++------ .../API_docs_v70/methods/messages_setEncryptedTyping.md | 9 +++------ old_docs/API_docs_v70/methods/messages_setGameScore.md | 9 +++------ .../API_docs_v70/methods/messages_setInlineBotResults.md | 9 +++------ .../API_docs_v70/methods/messages_setInlineGameScore.md | 9 +++------ old_docs/API_docs_v70/methods/messages_setTyping.md | 9 +++------ old_docs/API_docs_v70/methods/messages_startBot.md | 9 +++------ .../API_docs_v70/methods/messages_toggleChatAdmins.md | 9 +++------ .../API_docs_v70/methods/messages_toggleDialogPin.md | 9 +++------ .../API_docs_v70/methods/messages_uninstallStickerSet.md | 9 +++------ old_docs/API_docs_v70/methods/messages_uploadMedia.md | 9 +++------ old_docs/API_docs_v70/methods/payments_clearSavedInfo.md | 9 +++------ old_docs/API_docs_v70/methods/payments_getPaymentForm.md | 9 +++------ .../API_docs_v70/methods/payments_getPaymentReceipt.md | 9 +++------ old_docs/API_docs_v70/methods/payments_getSavedInfo.md | 9 +++------ .../API_docs_v70/methods/payments_sendPaymentForm.md | 9 +++------ .../methods/payments_validateRequestedInfo.md | 9 +++------ old_docs/API_docs_v70/methods/phone_getCallConfig.md | 9 +++------ old_docs/API_docs_v70/methods/phone_receivedCall.md | 9 +++------ old_docs/API_docs_v70/methods/phone_saveCallDebug.md | 9 +++------ old_docs/API_docs_v70/methods/phone_setCallRating.md | 9 +++------ old_docs/API_docs_v70/methods/photos_deletePhotos.md | 9 +++------ old_docs/API_docs_v70/methods/photos_getUserPhotos.md | 9 +++------ .../API_docs_v70/methods/photos_updateProfilePhoto.md | 9 +++------ .../API_docs_v70/methods/photos_uploadProfilePhoto.md | 9 +++------ old_docs/API_docs_v70/methods/ping.md | 9 +++------ old_docs/API_docs_v70/methods/ping_delay_disconnect.md | 9 +++------ old_docs/API_docs_v70/methods/req_DH_params.md | 9 +++------ old_docs/API_docs_v70/methods/req_pq.md | 9 +++------ old_docs/API_docs_v70/methods/rpc_drop_answer.md | 9 +++------ old_docs/API_docs_v70/methods/set_client_DH_params.md | 9 +++------ .../API_docs_v70/methods/stickers_addStickerToSet.md | 9 +++------ .../methods/stickers_changeStickerPosition.md | 9 +++------ .../API_docs_v70/methods/stickers_createStickerSet.md | 9 +++------ .../methods/stickers_removeStickerFromSet.md | 9 +++------ old_docs/API_docs_v70/methods/upload_getWebFile.md | 9 +++------ old_docs/API_docs_v70/methods/users_getUsers.md | 9 +++------ old_docs/API_docs_v71/methods/account_changePhone.md | 9 +++------ old_docs/API_docs_v71/methods/account_checkUsername.md | 9 +++------ old_docs/API_docs_v71/methods/account_confirmPhone.md | 9 +++------ old_docs/API_docs_v71/methods/account_deleteAccount.md | 9 +++------ old_docs/API_docs_v71/methods/account_getAccountTTL.md | 9 +++------ .../API_docs_v71/methods/account_getAuthorizations.md | 9 +++------ .../API_docs_v71/methods/account_getNotifySettings.md | 9 +++------ old_docs/API_docs_v71/methods/account_getPassword.md | 9 +++------ .../API_docs_v71/methods/account_getPasswordSettings.md | 9 +++------ old_docs/API_docs_v71/methods/account_getPrivacy.md | 9 +++------ old_docs/API_docs_v71/methods/account_getTmpPassword.md | 9 +++------ old_docs/API_docs_v71/methods/account_getWallPapers.md | 9 +++------ old_docs/API_docs_v71/methods/account_registerDevice.md | 9 +++------ old_docs/API_docs_v71/methods/account_reportPeer.md | 9 +++------ .../API_docs_v71/methods/account_resetAuthorization.md | 9 +++------ .../API_docs_v71/methods/account_resetNotifySettings.md | 9 +++------ .../API_docs_v71/methods/account_sendChangePhoneCode.md | 9 +++------ .../API_docs_v71/methods/account_sendConfirmPhoneCode.md | 9 +++------ old_docs/API_docs_v71/methods/account_setAccountTTL.md | 9 +++------ old_docs/API_docs_v71/methods/account_setPrivacy.md | 9 +++------ .../API_docs_v71/methods/account_unregisterDevice.md | 9 +++------ .../API_docs_v71/methods/account_updateDeviceLocked.md | 9 +++------ .../API_docs_v71/methods/account_updateNotifySettings.md | 9 +++------ .../methods/account_updatePasswordSettings.md | 9 +++------ old_docs/API_docs_v71/methods/account_updateProfile.md | 9 +++------ old_docs/API_docs_v71/methods/account_updateStatus.md | 9 +++------ old_docs/API_docs_v71/methods/account_updateUsername.md | 9 +++------ old_docs/API_docs_v71/methods/auth_bindTempAuthKey.md | 9 +++------ old_docs/API_docs_v71/methods/auth_cancelCode.md | 9 +++------ old_docs/API_docs_v71/methods/auth_checkPassword.md | 9 +++------ old_docs/API_docs_v71/methods/auth_checkPhone.md | 9 +++------ old_docs/API_docs_v71/methods/auth_dropTempAuthKeys.md | 9 +++------ .../API_docs_v71/methods/auth_exportAuthorization.md | 9 +++------ .../API_docs_v71/methods/auth_importAuthorization.md | 9 +++------ old_docs/API_docs_v71/methods/auth_recoverPassword.md | 9 +++------ .../API_docs_v71/methods/auth_requestPasswordRecovery.md | 9 +++------ old_docs/API_docs_v71/methods/auth_resendCode.md | 9 +++------ .../API_docs_v71/methods/auth_resetAuthorizations.md | 9 +++------ old_docs/API_docs_v71/methods/auth_sendInvites.md | 9 +++------ .../API_docs_v71/methods/bots_answerWebhookJSONQuery.md | 9 +++------ old_docs/API_docs_v71/methods/bots_sendCustomRequest.md | 9 +++------ old_docs/API_docs_v71/methods/channels_checkUsername.md | 9 +++------ old_docs/API_docs_v71/methods/channels_createChannel.md | 9 +++------ old_docs/API_docs_v71/methods/channels_deleteChannel.md | 9 +++------ old_docs/API_docs_v71/methods/channels_deleteMessages.md | 9 +++------ .../API_docs_v71/methods/channels_deleteUserHistory.md | 9 +++------ old_docs/API_docs_v71/methods/channels_editAbout.md | 9 +++------ old_docs/API_docs_v71/methods/channels_editAdmin.md | 9 +++------ old_docs/API_docs_v71/methods/channels_editBanned.md | 9 +++------ old_docs/API_docs_v71/methods/channels_editPhoto.md | 9 +++------ old_docs/API_docs_v71/methods/channels_editTitle.md | 9 +++------ old_docs/API_docs_v71/methods/channels_exportInvite.md | 9 +++------ .../API_docs_v71/methods/channels_exportMessageLink.md | 9 +++------ old_docs/API_docs_v71/methods/channels_getAdminLog.md | 9 +++------ .../methods/channels_getAdminedPublicChannels.md | 9 +++------ old_docs/API_docs_v71/methods/channels_getChannels.md | 9 +++------ old_docs/API_docs_v71/methods/channels_getMessages.md | 9 +++------ old_docs/API_docs_v71/methods/channels_getParticipant.md | 9 +++------ .../API_docs_v71/methods/channels_inviteToChannel.md | 9 +++------ old_docs/API_docs_v71/methods/channels_joinChannel.md | 9 +++------ old_docs/API_docs_v71/methods/channels_leaveChannel.md | 9 +++------ old_docs/API_docs_v71/methods/channels_readHistory.md | 9 +++------ .../API_docs_v71/methods/channels_readMessageContents.md | 9 +++------ old_docs/API_docs_v71/methods/channels_reportSpam.md | 9 +++------ old_docs/API_docs_v71/methods/channels_setStickers.md | 9 +++------ old_docs/API_docs_v71/methods/channels_toggleInvites.md | 9 +++------ .../API_docs_v71/methods/channels_toggleSignatures.md | 9 +++------ .../API_docs_v71/methods/channels_updatePinnedMessage.md | 9 +++------ old_docs/API_docs_v71/methods/channels_updateUsername.md | 9 +++------ old_docs/API_docs_v71/methods/contacts_block.md | 9 +++------ old_docs/API_docs_v71/methods/contacts_deleteContact.md | 9 +++------ old_docs/API_docs_v71/methods/contacts_deleteContacts.md | 9 +++------ old_docs/API_docs_v71/methods/contacts_exportCard.md | 9 +++------ old_docs/API_docs_v71/methods/contacts_getBlocked.md | 9 +++------ old_docs/API_docs_v71/methods/contacts_getContacts.md | 9 +++------ old_docs/API_docs_v71/methods/contacts_getStatuses.md | 9 +++------ old_docs/API_docs_v71/methods/contacts_getTopPeers.md | 9 +++------ old_docs/API_docs_v71/methods/contacts_importCard.md | 9 +++------ old_docs/API_docs_v71/methods/contacts_importContacts.md | 9 +++------ old_docs/API_docs_v71/methods/contacts_resetSaved.md | 9 +++------ .../API_docs_v71/methods/contacts_resetTopPeerRating.md | 9 +++------ old_docs/API_docs_v71/methods/contacts_search.md | 9 +++------ old_docs/API_docs_v71/methods/contacts_unblock.md | 9 +++------ .../API_docs_v71/methods/contest_saveDeveloperInfo.md | 9 +++------ old_docs/API_docs_v71/methods/destroy_auth_key.md | 9 +++------ old_docs/API_docs_v71/methods/destroy_session.md | 9 +++------ old_docs/API_docs_v71/methods/get_future_salts.md | 9 +++------ old_docs/API_docs_v71/methods/help_getAppChangelog.md | 9 +++------ old_docs/API_docs_v71/methods/help_getAppUpdate.md | 9 +++------ old_docs/API_docs_v71/methods/help_getCdnConfig.md | 9 +++------ old_docs/API_docs_v71/methods/help_getConfig.md | 9 +++------ old_docs/API_docs_v71/methods/help_getInviteText.md | 9 +++------ old_docs/API_docs_v71/methods/help_getNearestDc.md | 9 +++------ old_docs/API_docs_v71/methods/help_getSupport.md | 9 +++------ old_docs/API_docs_v71/methods/help_getTermsOfService.md | 9 +++------ old_docs/API_docs_v71/methods/help_saveAppLog.md | 9 +++------ .../API_docs_v71/methods/help_setBotUpdatesStatus.md | 9 +++------ old_docs/API_docs_v71/methods/initConnection.md | 9 +++------ old_docs/API_docs_v71/methods/invokeAfterMsg.md | 9 +++------ old_docs/API_docs_v71/methods/invokeAfterMsgs.md | 9 +++------ old_docs/API_docs_v71/methods/invokeWithLayer.md | 9 +++------ old_docs/API_docs_v71/methods/invokeWithoutUpdates.md | 9 +++------ old_docs/API_docs_v71/methods/langpack_getDifference.md | 9 +++------ old_docs/API_docs_v71/methods/langpack_getLangPack.md | 9 +++------ old_docs/API_docs_v71/methods/langpack_getLanguages.md | 9 +++------ old_docs/API_docs_v71/methods/langpack_getStrings.md | 9 +++------ old_docs/API_docs_v71/methods/messages_addChatUser.md | 9 +++------ .../API_docs_v71/methods/messages_checkChatInvite.md | 9 +++------ .../API_docs_v71/methods/messages_clearRecentStickers.md | 9 +++------ old_docs/API_docs_v71/methods/messages_createChat.md | 9 +++------ old_docs/API_docs_v71/methods/messages_deleteChatUser.md | 9 +++------ old_docs/API_docs_v71/methods/messages_deleteHistory.md | 9 +++------ old_docs/API_docs_v71/methods/messages_deleteMessages.md | 9 +++------ old_docs/API_docs_v71/methods/messages_editChatAdmin.md | 9 +++------ old_docs/API_docs_v71/methods/messages_editChatPhoto.md | 9 +++------ old_docs/API_docs_v71/methods/messages_editChatTitle.md | 9 +++------ .../methods/messages_editInlineBotMessage.md | 9 +++------ old_docs/API_docs_v71/methods/messages_editMessage.md | 9 +++------ .../API_docs_v71/methods/messages_exportChatInvite.md | 9 +++------ old_docs/API_docs_v71/methods/messages_faveSticker.md | 9 +++------ old_docs/API_docs_v71/methods/messages_forwardMessage.md | 9 +++------ .../API_docs_v71/methods/messages_forwardMessages.md | 9 +++------ old_docs/API_docs_v71/methods/messages_getAllChats.md | 9 +++------ old_docs/API_docs_v71/methods/messages_getAllDrafts.md | 9 +++------ old_docs/API_docs_v71/methods/messages_getAllStickers.md | 9 +++------ .../API_docs_v71/methods/messages_getArchivedStickers.md | 9 +++------ .../API_docs_v71/methods/messages_getAttachedStickers.md | 9 +++------ .../methods/messages_getBotCallbackAnswer.md | 9 +++------ old_docs/API_docs_v71/methods/messages_getChats.md | 9 +++------ old_docs/API_docs_v71/methods/messages_getCommonChats.md | 9 +++------ old_docs/API_docs_v71/methods/messages_getDhConfig.md | 9 +++------ old_docs/API_docs_v71/methods/messages_getDialogs.md | 9 +++------ .../API_docs_v71/methods/messages_getDocumentByHash.md | 9 +++------ .../API_docs_v71/methods/messages_getFavedStickers.md | 9 +++------ .../API_docs_v71/methods/messages_getFeaturedStickers.md | 9 +++------ .../API_docs_v71/methods/messages_getGameHighScores.md | 9 +++------ old_docs/API_docs_v71/methods/messages_getHistory.md | 9 +++------ .../API_docs_v71/methods/messages_getInlineBotResults.md | 9 +++------ .../methods/messages_getInlineGameHighScores.md | 9 +++------ .../API_docs_v71/methods/messages_getMaskStickers.md | 9 +++------ .../API_docs_v71/methods/messages_getMessageEditData.md | 9 +++------ old_docs/API_docs_v71/methods/messages_getMessages.md | 9 +++------ .../API_docs_v71/methods/messages_getMessagesViews.md | 9 +++------ old_docs/API_docs_v71/methods/messages_getPeerDialogs.md | 9 +++------ .../API_docs_v71/methods/messages_getPeerSettings.md | 9 +++------ .../API_docs_v71/methods/messages_getPinnedDialogs.md | 9 +++------ .../API_docs_v71/methods/messages_getRecentStickers.md | 9 +++------ old_docs/API_docs_v71/methods/messages_getSavedGifs.md | 9 +++------ old_docs/API_docs_v71/methods/messages_getStickerSet.md | 9 +++------ .../API_docs_v71/methods/messages_getUnreadMentions.md | 9 +++------ old_docs/API_docs_v71/methods/messages_getWebPage.md | 9 +++------ .../API_docs_v71/methods/messages_getWebPagePreview.md | 9 +++------ old_docs/API_docs_v71/methods/messages_hideReportSpam.md | 9 +++------ .../API_docs_v71/methods/messages_importChatInvite.md | 9 +++------ .../API_docs_v71/methods/messages_installStickerSet.md | 9 +++------ old_docs/API_docs_v71/methods/messages_migrateChat.md | 9 +++------ .../methods/messages_readEncryptedHistory.md | 9 +++------ .../methods/messages_readFeaturedStickers.md | 9 +++------ old_docs/API_docs_v71/methods/messages_readHistory.md | 9 +++------ .../API_docs_v71/methods/messages_readMessageContents.md | 9 +++------ .../API_docs_v71/methods/messages_receivedMessages.md | 9 +++------ old_docs/API_docs_v71/methods/messages_receivedQueue.md | 9 +++------ .../methods/messages_reorderPinnedDialogs.md | 9 +++------ .../API_docs_v71/methods/messages_reorderStickerSets.md | 9 +++------ .../API_docs_v71/methods/messages_reportEncryptedSpam.md | 9 +++------ old_docs/API_docs_v71/methods/messages_reportSpam.md | 9 +++------ old_docs/API_docs_v71/methods/messages_saveDraft.md | 9 +++------ old_docs/API_docs_v71/methods/messages_saveGif.md | 9 +++------ .../API_docs_v71/methods/messages_saveRecentSticker.md | 9 +++------ old_docs/API_docs_v71/methods/messages_search.md | 9 +++------ old_docs/API_docs_v71/methods/messages_searchGifs.md | 9 +++------ old_docs/API_docs_v71/methods/messages_searchGlobal.md | 9 +++------ old_docs/API_docs_v71/methods/messages_sendEncrypted.md | 9 +++------ .../API_docs_v71/methods/messages_sendEncryptedFile.md | 9 +++------ .../methods/messages_sendEncryptedService.md | 9 +++------ .../API_docs_v71/methods/messages_sendInlineBotResult.md | 9 +++------ old_docs/API_docs_v71/methods/messages_sendMedia.md | 9 +++------ old_docs/API_docs_v71/methods/messages_sendMessage.md | 9 +++------ .../methods/messages_sendScreenshotNotification.md | 9 +++------ .../methods/messages_setBotCallbackAnswer.md | 9 +++------ .../methods/messages_setBotPrecheckoutResults.md | 9 +++------ .../methods/messages_setBotShippingResults.md | 9 +++------ .../API_docs_v71/methods/messages_setEncryptedTyping.md | 9 +++------ old_docs/API_docs_v71/methods/messages_setGameScore.md | 9 +++------ .../API_docs_v71/methods/messages_setInlineBotResults.md | 9 +++------ .../API_docs_v71/methods/messages_setInlineGameScore.md | 9 +++------ old_docs/API_docs_v71/methods/messages_setTyping.md | 9 +++------ old_docs/API_docs_v71/methods/messages_startBot.md | 9 +++------ .../API_docs_v71/methods/messages_toggleChatAdmins.md | 9 +++------ .../API_docs_v71/methods/messages_toggleDialogPin.md | 9 +++------ .../API_docs_v71/methods/messages_uninstallStickerSet.md | 9 +++------ old_docs/API_docs_v71/methods/messages_uploadMedia.md | 9 +++------ old_docs/API_docs_v71/methods/payments_clearSavedInfo.md | 9 +++------ old_docs/API_docs_v71/methods/payments_getPaymentForm.md | 9 +++------ .../API_docs_v71/methods/payments_getPaymentReceipt.md | 9 +++------ old_docs/API_docs_v71/methods/payments_getSavedInfo.md | 9 +++------ .../API_docs_v71/methods/payments_sendPaymentForm.md | 9 +++------ .../methods/payments_validateRequestedInfo.md | 9 +++------ old_docs/API_docs_v71/methods/phone_getCallConfig.md | 9 +++------ old_docs/API_docs_v71/methods/phone_receivedCall.md | 9 +++------ old_docs/API_docs_v71/methods/phone_saveCallDebug.md | 9 +++------ old_docs/API_docs_v71/methods/phone_setCallRating.md | 9 +++------ old_docs/API_docs_v71/methods/photos_deletePhotos.md | 9 +++------ old_docs/API_docs_v71/methods/photos_getUserPhotos.md | 9 +++------ .../API_docs_v71/methods/photos_updateProfilePhoto.md | 9 +++------ .../API_docs_v71/methods/photos_uploadProfilePhoto.md | 9 +++------ old_docs/API_docs_v71/methods/ping.md | 9 +++------ old_docs/API_docs_v71/methods/ping_delay_disconnect.md | 9 +++------ old_docs/API_docs_v71/methods/req_DH_params.md | 9 +++------ old_docs/API_docs_v71/methods/req_pq.md | 9 +++------ old_docs/API_docs_v71/methods/rpc_drop_answer.md | 9 +++------ old_docs/API_docs_v71/methods/set_client_DH_params.md | 9 +++------ .../API_docs_v71/methods/stickers_addStickerToSet.md | 9 +++------ .../methods/stickers_changeStickerPosition.md | 9 +++------ .../API_docs_v71/methods/stickers_createStickerSet.md | 9 +++------ .../methods/stickers_removeStickerFromSet.md | 9 +++------ old_docs/API_docs_v71/methods/upload_getWebFile.md | 9 +++------ old_docs/API_docs_v71/methods/users_getUsers.md | 9 +++------ old_docs/API_docs_v72/methods/account_changePhone.md | 9 +++------ old_docs/API_docs_v72/methods/account_checkUsername.md | 9 +++------ old_docs/API_docs_v72/methods/account_confirmPhone.md | 9 +++------ old_docs/API_docs_v72/methods/account_deleteAccount.md | 9 +++------ old_docs/API_docs_v72/methods/account_getAccountTTL.md | 9 +++------ .../API_docs_v72/methods/account_getAuthorizations.md | 9 +++------ .../API_docs_v72/methods/account_getNotifySettings.md | 9 +++------ old_docs/API_docs_v72/methods/account_getPassword.md | 9 +++------ .../API_docs_v72/methods/account_getPasswordSettings.md | 9 +++------ old_docs/API_docs_v72/methods/account_getPrivacy.md | 9 +++------ old_docs/API_docs_v72/methods/account_getTmpPassword.md | 9 +++------ old_docs/API_docs_v72/methods/account_getWallPapers.md | 9 +++------ old_docs/API_docs_v72/methods/account_registerDevice.md | 9 +++------ old_docs/API_docs_v72/methods/account_reportPeer.md | 9 +++------ .../API_docs_v72/methods/account_resetAuthorization.md | 9 +++------ .../API_docs_v72/methods/account_resetNotifySettings.md | 9 +++------ .../API_docs_v72/methods/account_sendChangePhoneCode.md | 9 +++------ .../API_docs_v72/methods/account_sendConfirmPhoneCode.md | 9 +++------ old_docs/API_docs_v72/methods/account_setAccountTTL.md | 9 +++------ old_docs/API_docs_v72/methods/account_setPrivacy.md | 9 +++------ .../API_docs_v72/methods/account_unregisterDevice.md | 9 +++------ .../API_docs_v72/methods/account_updateDeviceLocked.md | 9 +++------ .../API_docs_v72/methods/account_updateNotifySettings.md | 9 +++------ .../methods/account_updatePasswordSettings.md | 9 +++------ old_docs/API_docs_v72/methods/account_updateProfile.md | 9 +++------ old_docs/API_docs_v72/methods/account_updateStatus.md | 9 +++------ old_docs/API_docs_v72/methods/account_updateUsername.md | 9 +++------ old_docs/API_docs_v72/methods/auth_bindTempAuthKey.md | 9 +++------ old_docs/API_docs_v72/methods/auth_cancelCode.md | 9 +++------ old_docs/API_docs_v72/methods/auth_checkPassword.md | 9 +++------ old_docs/API_docs_v72/methods/auth_checkPhone.md | 9 +++------ old_docs/API_docs_v72/methods/auth_dropTempAuthKeys.md | 9 +++------ .../API_docs_v72/methods/auth_exportAuthorization.md | 9 +++------ .../API_docs_v72/methods/auth_importAuthorization.md | 9 +++------ old_docs/API_docs_v72/methods/auth_recoverPassword.md | 9 +++------ .../API_docs_v72/methods/auth_requestPasswordRecovery.md | 9 +++------ old_docs/API_docs_v72/methods/auth_resendCode.md | 9 +++------ .../API_docs_v72/methods/auth_resetAuthorizations.md | 9 +++------ old_docs/API_docs_v72/methods/auth_sendInvites.md | 9 +++------ .../API_docs_v72/methods/bots_answerWebhookJSONQuery.md | 9 +++------ old_docs/API_docs_v72/methods/bots_sendCustomRequest.md | 9 +++------ old_docs/API_docs_v72/methods/channels_checkUsername.md | 9 +++------ old_docs/API_docs_v72/methods/channels_createChannel.md | 9 +++------ old_docs/API_docs_v72/methods/channels_deleteChannel.md | 9 +++------ old_docs/API_docs_v72/methods/channels_deleteHistory.md | 9 +++------ old_docs/API_docs_v72/methods/channels_deleteMessages.md | 9 +++------ .../API_docs_v72/methods/channels_deleteUserHistory.md | 9 +++------ old_docs/API_docs_v72/methods/channels_editAbout.md | 9 +++------ old_docs/API_docs_v72/methods/channels_editAdmin.md | 9 +++------ old_docs/API_docs_v72/methods/channels_editBanned.md | 9 +++------ old_docs/API_docs_v72/methods/channels_editPhoto.md | 9 +++------ old_docs/API_docs_v72/methods/channels_editTitle.md | 9 +++------ old_docs/API_docs_v72/methods/channels_exportInvite.md | 9 +++------ .../API_docs_v72/methods/channels_exportMessageLink.md | 9 +++------ old_docs/API_docs_v72/methods/channels_getAdminLog.md | 9 +++------ .../methods/channels_getAdminedPublicChannels.md | 9 +++------ old_docs/API_docs_v72/methods/channels_getChannels.md | 9 +++------ old_docs/API_docs_v72/methods/channels_getMessages.md | 9 +++------ old_docs/API_docs_v72/methods/channels_getParticipant.md | 9 +++------ .../API_docs_v72/methods/channels_inviteToChannel.md | 9 +++------ old_docs/API_docs_v72/methods/channels_joinChannel.md | 9 +++------ old_docs/API_docs_v72/methods/channels_leaveChannel.md | 9 +++------ old_docs/API_docs_v72/methods/channels_readHistory.md | 9 +++------ .../API_docs_v72/methods/channels_readMessageContents.md | 9 +++------ old_docs/API_docs_v72/methods/channels_reportSpam.md | 9 +++------ old_docs/API_docs_v72/methods/channels_setStickers.md | 9 +++------ old_docs/API_docs_v72/methods/channels_toggleInvites.md | 9 +++------ .../methods/channels_togglePreHistoryHidden.md | 9 +++------ .../API_docs_v72/methods/channels_toggleSignatures.md | 9 +++------ .../API_docs_v72/methods/channels_updatePinnedMessage.md | 9 +++------ old_docs/API_docs_v72/methods/channels_updateUsername.md | 9 +++------ old_docs/API_docs_v72/methods/contacts_block.md | 9 +++------ old_docs/API_docs_v72/methods/contacts_deleteContact.md | 9 +++------ old_docs/API_docs_v72/methods/contacts_deleteContacts.md | 9 +++------ old_docs/API_docs_v72/methods/contacts_exportCard.md | 9 +++------ old_docs/API_docs_v72/methods/contacts_getBlocked.md | 9 +++------ old_docs/API_docs_v72/methods/contacts_getContacts.md | 9 +++------ old_docs/API_docs_v72/methods/contacts_getStatuses.md | 9 +++------ old_docs/API_docs_v72/methods/contacts_getTopPeers.md | 9 +++------ old_docs/API_docs_v72/methods/contacts_importCard.md | 9 +++------ old_docs/API_docs_v72/methods/contacts_importContacts.md | 9 +++------ old_docs/API_docs_v72/methods/contacts_resetSaved.md | 9 +++------ .../API_docs_v72/methods/contacts_resetTopPeerRating.md | 9 +++------ old_docs/API_docs_v72/methods/contacts_search.md | 9 +++------ old_docs/API_docs_v72/methods/contacts_unblock.md | 9 +++------ .../API_docs_v72/methods/contest_saveDeveloperInfo.md | 9 +++------ old_docs/API_docs_v72/methods/destroy_auth_key.md | 9 +++------ old_docs/API_docs_v72/methods/destroy_session.md | 9 +++------ old_docs/API_docs_v72/methods/get_future_salts.md | 9 +++------ old_docs/API_docs_v72/methods/help_getAppChangelog.md | 9 +++------ old_docs/API_docs_v72/methods/help_getAppUpdate.md | 9 +++------ old_docs/API_docs_v72/methods/help_getCdnConfig.md | 9 +++------ old_docs/API_docs_v72/methods/help_getConfig.md | 9 +++------ old_docs/API_docs_v72/methods/help_getInviteText.md | 9 +++------ old_docs/API_docs_v72/methods/help_getNearestDc.md | 9 +++------ old_docs/API_docs_v72/methods/help_getRecentMeUrls.md | 9 +++------ old_docs/API_docs_v72/methods/help_getSupport.md | 9 +++------ old_docs/API_docs_v72/methods/help_getTermsOfService.md | 9 +++------ old_docs/API_docs_v72/methods/help_saveAppLog.md | 9 +++------ .../API_docs_v72/methods/help_setBotUpdatesStatus.md | 9 +++------ old_docs/API_docs_v72/methods/initConnection.md | 9 +++------ old_docs/API_docs_v72/methods/invokeAfterMsg.md | 9 +++------ old_docs/API_docs_v72/methods/invokeAfterMsgs.md | 9 +++------ old_docs/API_docs_v72/methods/invokeWithLayer.md | 9 +++------ old_docs/API_docs_v72/methods/invokeWithoutUpdates.md | 9 +++------ old_docs/API_docs_v72/methods/langpack_getDifference.md | 9 +++------ old_docs/API_docs_v72/methods/langpack_getLangPack.md | 9 +++------ old_docs/API_docs_v72/methods/langpack_getLanguages.md | 9 +++------ old_docs/API_docs_v72/methods/langpack_getStrings.md | 9 +++------ old_docs/API_docs_v72/methods/messages_addChatUser.md | 9 +++------ .../API_docs_v72/methods/messages_checkChatInvite.md | 9 +++------ .../API_docs_v72/methods/messages_clearRecentStickers.md | 9 +++------ old_docs/API_docs_v72/methods/messages_createChat.md | 9 +++------ old_docs/API_docs_v72/methods/messages_deleteChatUser.md | 9 +++------ old_docs/API_docs_v72/methods/messages_deleteHistory.md | 9 +++------ old_docs/API_docs_v72/methods/messages_deleteMessages.md | 9 +++------ old_docs/API_docs_v72/methods/messages_editChatAdmin.md | 9 +++------ old_docs/API_docs_v72/methods/messages_editChatPhoto.md | 9 +++------ old_docs/API_docs_v72/methods/messages_editChatTitle.md | 9 +++------ .../methods/messages_editInlineBotMessage.md | 9 +++------ old_docs/API_docs_v72/methods/messages_editMessage.md | 9 +++------ .../API_docs_v72/methods/messages_exportChatInvite.md | 9 +++------ old_docs/API_docs_v72/methods/messages_faveSticker.md | 9 +++------ old_docs/API_docs_v72/methods/messages_forwardMessage.md | 9 +++------ .../API_docs_v72/methods/messages_forwardMessages.md | 9 +++------ old_docs/API_docs_v72/methods/messages_getAllChats.md | 9 +++------ old_docs/API_docs_v72/methods/messages_getAllDrafts.md | 9 +++------ old_docs/API_docs_v72/methods/messages_getAllStickers.md | 9 +++------ .../API_docs_v72/methods/messages_getArchivedStickers.md | 9 +++------ .../API_docs_v72/methods/messages_getAttachedStickers.md | 9 +++------ .../methods/messages_getBotCallbackAnswer.md | 9 +++------ old_docs/API_docs_v72/methods/messages_getChats.md | 9 +++------ old_docs/API_docs_v72/methods/messages_getCommonChats.md | 9 +++------ old_docs/API_docs_v72/methods/messages_getDhConfig.md | 9 +++------ old_docs/API_docs_v72/methods/messages_getDialogs.md | 9 +++------ .../API_docs_v72/methods/messages_getDocumentByHash.md | 9 +++------ .../API_docs_v72/methods/messages_getFavedStickers.md | 9 +++------ .../API_docs_v72/methods/messages_getFeaturedStickers.md | 9 +++------ .../API_docs_v72/methods/messages_getGameHighScores.md | 9 +++------ old_docs/API_docs_v72/methods/messages_getHistory.md | 9 +++------ .../API_docs_v72/methods/messages_getInlineBotResults.md | 9 +++------ .../methods/messages_getInlineGameHighScores.md | 9 +++------ .../API_docs_v72/methods/messages_getMaskStickers.md | 9 +++------ .../API_docs_v72/methods/messages_getMessageEditData.md | 9 +++------ old_docs/API_docs_v72/methods/messages_getMessages.md | 9 +++------ .../API_docs_v72/methods/messages_getMessagesViews.md | 9 +++------ old_docs/API_docs_v72/methods/messages_getPeerDialogs.md | 9 +++------ .../API_docs_v72/methods/messages_getPeerSettings.md | 9 +++------ .../API_docs_v72/methods/messages_getPinnedDialogs.md | 9 +++------ .../API_docs_v72/methods/messages_getRecentLocations.md | 9 +++------ .../API_docs_v72/methods/messages_getRecentStickers.md | 9 +++------ old_docs/API_docs_v72/methods/messages_getSavedGifs.md | 9 +++------ old_docs/API_docs_v72/methods/messages_getStickerSet.md | 9 +++------ .../API_docs_v72/methods/messages_getUnreadMentions.md | 9 +++------ old_docs/API_docs_v72/methods/messages_getWebPage.md | 9 +++------ .../API_docs_v72/methods/messages_getWebPagePreview.md | 9 +++------ old_docs/API_docs_v72/methods/messages_hideReportSpam.md | 9 +++------ .../API_docs_v72/methods/messages_importChatInvite.md | 9 +++------ .../API_docs_v72/methods/messages_installStickerSet.md | 9 +++------ old_docs/API_docs_v72/methods/messages_migrateChat.md | 9 +++------ .../methods/messages_readEncryptedHistory.md | 9 +++------ .../methods/messages_readFeaturedStickers.md | 9 +++------ old_docs/API_docs_v72/methods/messages_readHistory.md | 9 +++------ old_docs/API_docs_v72/methods/messages_readMentions.md | 9 +++------ .../API_docs_v72/methods/messages_readMessageContents.md | 9 +++------ .../API_docs_v72/methods/messages_receivedMessages.md | 9 +++------ old_docs/API_docs_v72/methods/messages_receivedQueue.md | 9 +++------ .../methods/messages_reorderPinnedDialogs.md | 9 +++------ .../API_docs_v72/methods/messages_reorderStickerSets.md | 9 +++------ .../API_docs_v72/methods/messages_reportEncryptedSpam.md | 9 +++------ old_docs/API_docs_v72/methods/messages_reportSpam.md | 9 +++------ old_docs/API_docs_v72/methods/messages_saveDraft.md | 9 +++------ old_docs/API_docs_v72/methods/messages_saveGif.md | 9 +++------ .../API_docs_v72/methods/messages_saveRecentSticker.md | 9 +++------ old_docs/API_docs_v72/methods/messages_search.md | 9 +++------ old_docs/API_docs_v72/methods/messages_searchGifs.md | 9 +++------ old_docs/API_docs_v72/methods/messages_searchGlobal.md | 9 +++------ old_docs/API_docs_v72/methods/messages_sendEncrypted.md | 9 +++------ .../API_docs_v72/methods/messages_sendEncryptedFile.md | 9 +++------ .../methods/messages_sendEncryptedService.md | 9 +++------ .../API_docs_v72/methods/messages_sendInlineBotResult.md | 9 +++------ old_docs/API_docs_v72/methods/messages_sendMedia.md | 9 +++------ old_docs/API_docs_v72/methods/messages_sendMessage.md | 9 +++------ .../methods/messages_sendScreenshotNotification.md | 9 +++------ .../methods/messages_setBotCallbackAnswer.md | 9 +++------ .../methods/messages_setBotPrecheckoutResults.md | 9 +++------ .../methods/messages_setBotShippingResults.md | 9 +++------ .../API_docs_v72/methods/messages_setEncryptedTyping.md | 9 +++------ old_docs/API_docs_v72/methods/messages_setGameScore.md | 9 +++------ .../API_docs_v72/methods/messages_setInlineBotResults.md | 9 +++------ .../API_docs_v72/methods/messages_setInlineGameScore.md | 9 +++------ old_docs/API_docs_v72/methods/messages_setTyping.md | 9 +++------ old_docs/API_docs_v72/methods/messages_startBot.md | 9 +++------ .../API_docs_v72/methods/messages_toggleChatAdmins.md | 9 +++------ .../API_docs_v72/methods/messages_toggleDialogPin.md | 9 +++------ .../API_docs_v72/methods/messages_uninstallStickerSet.md | 9 +++------ old_docs/API_docs_v72/methods/messages_uploadMedia.md | 9 +++------ old_docs/API_docs_v72/methods/payments_clearSavedInfo.md | 9 +++------ old_docs/API_docs_v72/methods/payments_getPaymentForm.md | 9 +++------ .../API_docs_v72/methods/payments_getPaymentReceipt.md | 9 +++------ old_docs/API_docs_v72/methods/payments_getSavedInfo.md | 9 +++------ .../API_docs_v72/methods/payments_sendPaymentForm.md | 9 +++------ .../methods/payments_validateRequestedInfo.md | 9 +++------ old_docs/API_docs_v72/methods/phone_getCallConfig.md | 9 +++------ old_docs/API_docs_v72/methods/phone_receivedCall.md | 9 +++------ old_docs/API_docs_v72/methods/phone_saveCallDebug.md | 9 +++------ old_docs/API_docs_v72/methods/phone_setCallRating.md | 9 +++------ old_docs/API_docs_v72/methods/photos_deletePhotos.md | 9 +++------ old_docs/API_docs_v72/methods/photos_getUserPhotos.md | 9 +++------ .../API_docs_v72/methods/photos_updateProfilePhoto.md | 9 +++------ .../API_docs_v72/methods/photos_uploadProfilePhoto.md | 9 +++------ old_docs/API_docs_v72/methods/ping.md | 9 +++------ old_docs/API_docs_v72/methods/ping_delay_disconnect.md | 9 +++------ old_docs/API_docs_v72/methods/req_DH_params.md | 9 +++------ old_docs/API_docs_v72/methods/req_pq.md | 9 +++------ old_docs/API_docs_v72/methods/rpc_drop_answer.md | 9 +++------ old_docs/API_docs_v72/methods/set_client_DH_params.md | 9 +++------ .../API_docs_v72/methods/stickers_addStickerToSet.md | 9 +++------ .../methods/stickers_changeStickerPosition.md | 9 +++------ .../API_docs_v72/methods/stickers_createStickerSet.md | 9 +++------ .../methods/stickers_removeStickerFromSet.md | 9 +++------ old_docs/API_docs_v72/methods/upload_getWebFile.md | 9 +++------ old_docs/API_docs_v72/methods/users_getUsers.md | 9 +++------ src/danog/MadelineProto/DocsBuilder/Methods.php | 9 +++------ 3677 files changed, 11031 insertions(+), 22062 deletions(-) diff --git a/docs/API_docs/methods/account_changePhone.md b/docs/API_docs/methods/account_changePhone.md index 5d1801d0..e47ef6a7 100644 --- a/docs/API_docs/methods/account_changePhone.md +++ b/docs/API_docs/methods/account_changePhone.md @@ -32,13 +32,10 @@ description: account.changePhone parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/docs/API_docs/methods/account_checkUsername.md b/docs/API_docs/methods/account_checkUsername.md index afc59b6c..40cf822f 100644 --- a/docs/API_docs/methods/account_checkUsername.md +++ b/docs/API_docs/methods/account_checkUsername.md @@ -30,13 +30,10 @@ description: account.checkUsername parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/docs/API_docs/methods/account_confirmPhone.md b/docs/API_docs/methods/account_confirmPhone.md index 0d2dc5c6..8dd79d94 100644 --- a/docs/API_docs/methods/account_confirmPhone.md +++ b/docs/API_docs/methods/account_confirmPhone.md @@ -32,13 +32,10 @@ description: account.confirmPhone parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/docs/API_docs/methods/account_deleteAccount.md b/docs/API_docs/methods/account_deleteAccount.md index 5abcd0ec..6f1bbda9 100644 --- a/docs/API_docs/methods/account_deleteAccount.md +++ b/docs/API_docs/methods/account_deleteAccount.md @@ -23,13 +23,10 @@ description: account.deleteAccount parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/docs/API_docs/methods/account_getAccountTTL.md b/docs/API_docs/methods/account_getAccountTTL.md index 3520fbef..538b1d7a 100644 --- a/docs/API_docs/methods/account_getAccountTTL.md +++ b/docs/API_docs/methods/account_getAccountTTL.md @@ -18,13 +18,10 @@ description: account.getAccountTTL parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/docs/API_docs/methods/account_getAuthorizations.md b/docs/API_docs/methods/account_getAuthorizations.md index 91bbce5e..f138d517 100644 --- a/docs/API_docs/methods/account_getAuthorizations.md +++ b/docs/API_docs/methods/account_getAuthorizations.md @@ -18,13 +18,10 @@ description: account.getAuthorizations parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/docs/API_docs/methods/account_getNotifySettings.md b/docs/API_docs/methods/account_getNotifySettings.md index 8ee710d8..a48eed2f 100644 --- a/docs/API_docs/methods/account_getNotifySettings.md +++ b/docs/API_docs/methods/account_getNotifySettings.md @@ -30,13 +30,10 @@ description: account.getNotifySettings parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/docs/API_docs/methods/account_getPassword.md b/docs/API_docs/methods/account_getPassword.md index 4d9fd015..1abf6174 100644 --- a/docs/API_docs/methods/account_getPassword.md +++ b/docs/API_docs/methods/account_getPassword.md @@ -18,13 +18,10 @@ description: account.getPassword parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/docs/API_docs/methods/account_getPasswordSettings.md b/docs/API_docs/methods/account_getPasswordSettings.md index 02cb77f7..aec5b989 100644 --- a/docs/API_docs/methods/account_getPasswordSettings.md +++ b/docs/API_docs/methods/account_getPasswordSettings.md @@ -30,13 +30,10 @@ description: account.getPasswordSettings parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/docs/API_docs/methods/account_getPrivacy.md b/docs/API_docs/methods/account_getPrivacy.md index 52786b79..8bbe9795 100644 --- a/docs/API_docs/methods/account_getPrivacy.md +++ b/docs/API_docs/methods/account_getPrivacy.md @@ -30,13 +30,10 @@ description: account.getPrivacy parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/docs/API_docs/methods/account_getTmpPassword.md b/docs/API_docs/methods/account_getTmpPassword.md index 83ab09b1..d9bd30d8 100644 --- a/docs/API_docs/methods/account_getTmpPassword.md +++ b/docs/API_docs/methods/account_getTmpPassword.md @@ -32,13 +32,10 @@ description: account.getTmpPassword parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/docs/API_docs/methods/account_getWallPapers.md b/docs/API_docs/methods/account_getWallPapers.md index 88c8a701..a71543d0 100644 --- a/docs/API_docs/methods/account_getWallPapers.md +++ b/docs/API_docs/methods/account_getWallPapers.md @@ -18,13 +18,10 @@ description: account.getWallPapers parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/docs/API_docs/methods/account_registerDevice.md b/docs/API_docs/methods/account_registerDevice.md index 3cc7f98d..8be04ad2 100644 --- a/docs/API_docs/methods/account_registerDevice.md +++ b/docs/API_docs/methods/account_registerDevice.md @@ -31,13 +31,10 @@ description: account.registerDevice parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/docs/API_docs/methods/account_reportPeer.md b/docs/API_docs/methods/account_reportPeer.md index 1545c3b8..1ae9f4d4 100644 --- a/docs/API_docs/methods/account_reportPeer.md +++ b/docs/API_docs/methods/account_reportPeer.md @@ -31,13 +31,10 @@ description: account.reportPeer parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/docs/API_docs/methods/account_resetAuthorization.md b/docs/API_docs/methods/account_resetAuthorization.md index e44334f2..0438cba3 100644 --- a/docs/API_docs/methods/account_resetAuthorization.md +++ b/docs/API_docs/methods/account_resetAuthorization.md @@ -30,13 +30,10 @@ description: account.resetAuthorization parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/docs/API_docs/methods/account_resetNotifySettings.md b/docs/API_docs/methods/account_resetNotifySettings.md index 155ede68..92db4f4f 100644 --- a/docs/API_docs/methods/account_resetNotifySettings.md +++ b/docs/API_docs/methods/account_resetNotifySettings.md @@ -18,13 +18,10 @@ description: account.resetNotifySettings parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/docs/API_docs/methods/account_sendChangePhoneCode.md b/docs/API_docs/methods/account_sendChangePhoneCode.md index 4be218f2..017b5f7f 100644 --- a/docs/API_docs/methods/account_sendChangePhoneCode.md +++ b/docs/API_docs/methods/account_sendChangePhoneCode.md @@ -32,13 +32,10 @@ description: account.sendChangePhoneCode parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/docs/API_docs/methods/account_sendConfirmPhoneCode.md b/docs/API_docs/methods/account_sendConfirmPhoneCode.md index 009fcb09..3665bd50 100644 --- a/docs/API_docs/methods/account_sendConfirmPhoneCode.md +++ b/docs/API_docs/methods/account_sendConfirmPhoneCode.md @@ -32,13 +32,10 @@ description: account.sendConfirmPhoneCode parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/docs/API_docs/methods/account_setAccountTTL.md b/docs/API_docs/methods/account_setAccountTTL.md index f06eb676..d08f59fb 100644 --- a/docs/API_docs/methods/account_setAccountTTL.md +++ b/docs/API_docs/methods/account_setAccountTTL.md @@ -30,13 +30,10 @@ description: account.setAccountTTL parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/docs/API_docs/methods/account_setPrivacy.md b/docs/API_docs/methods/account_setPrivacy.md index 56aebbcc..401aa71c 100644 --- a/docs/API_docs/methods/account_setPrivacy.md +++ b/docs/API_docs/methods/account_setPrivacy.md @@ -31,13 +31,10 @@ description: account.setPrivacy parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/docs/API_docs/methods/account_unregisterDevice.md b/docs/API_docs/methods/account_unregisterDevice.md index 41899b6e..283ec7d2 100644 --- a/docs/API_docs/methods/account_unregisterDevice.md +++ b/docs/API_docs/methods/account_unregisterDevice.md @@ -31,13 +31,10 @@ description: account.unregisterDevice parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/docs/API_docs/methods/account_updateDeviceLocked.md b/docs/API_docs/methods/account_updateDeviceLocked.md index 37aeb59d..ae6125a5 100644 --- a/docs/API_docs/methods/account_updateDeviceLocked.md +++ b/docs/API_docs/methods/account_updateDeviceLocked.md @@ -23,13 +23,10 @@ description: account.updateDeviceLocked parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/docs/API_docs/methods/account_updateNotifySettings.md b/docs/API_docs/methods/account_updateNotifySettings.md index 8389b5c2..fb096250 100644 --- a/docs/API_docs/methods/account_updateNotifySettings.md +++ b/docs/API_docs/methods/account_updateNotifySettings.md @@ -31,13 +31,10 @@ description: account.updateNotifySettings parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/docs/API_docs/methods/account_updatePasswordSettings.md b/docs/API_docs/methods/account_updatePasswordSettings.md index b7c8da4b..ffa8dcd9 100644 --- a/docs/API_docs/methods/account_updatePasswordSettings.md +++ b/docs/API_docs/methods/account_updatePasswordSettings.md @@ -34,13 +34,10 @@ description: account.updatePasswordSettings parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/docs/API_docs/methods/account_updateProfile.md b/docs/API_docs/methods/account_updateProfile.md index a50eaea5..b3d468d1 100644 --- a/docs/API_docs/methods/account_updateProfile.md +++ b/docs/API_docs/methods/account_updateProfile.md @@ -33,13 +33,10 @@ description: account.updateProfile parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/docs/API_docs/methods/account_updateStatus.md b/docs/API_docs/methods/account_updateStatus.md index 7204e582..c8fa0a79 100644 --- a/docs/API_docs/methods/account_updateStatus.md +++ b/docs/API_docs/methods/account_updateStatus.md @@ -30,13 +30,10 @@ description: account.updateStatus parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/docs/API_docs/methods/account_updateUsername.md b/docs/API_docs/methods/account_updateUsername.md index 22be2fd4..2b7576a5 100644 --- a/docs/API_docs/methods/account_updateUsername.md +++ b/docs/API_docs/methods/account_updateUsername.md @@ -32,13 +32,10 @@ description: account.updateUsername parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/docs/API_docs/methods/auth_bindTempAuthKey.md b/docs/API_docs/methods/auth_bindTempAuthKey.md index e3d72dd5..7419abb0 100644 --- a/docs/API_docs/methods/auth_bindTempAuthKey.md +++ b/docs/API_docs/methods/auth_bindTempAuthKey.md @@ -35,16 +35,13 @@ description: auth.bindTempAuthKey parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/docs/API_docs/methods/auth_cancelCode.md b/docs/API_docs/methods/auth_cancelCode.md index dc390329..05d927a1 100644 --- a/docs/API_docs/methods/auth_cancelCode.md +++ b/docs/API_docs/methods/auth_cancelCode.md @@ -31,13 +31,10 @@ description: auth.cancelCode parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/docs/API_docs/methods/auth_checkPassword.md b/docs/API_docs/methods/auth_checkPassword.md index d5559186..6b6b21cc 100644 --- a/docs/API_docs/methods/auth_checkPassword.md +++ b/docs/API_docs/methods/auth_checkPassword.md @@ -30,13 +30,10 @@ description: auth.checkPassword parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/docs/API_docs/methods/auth_checkPhone.md b/docs/API_docs/methods/auth_checkPhone.md index 3455904d..f6cac2e6 100644 --- a/docs/API_docs/methods/auth_checkPhone.md +++ b/docs/API_docs/methods/auth_checkPhone.md @@ -32,13 +32,10 @@ description: auth.checkPhone parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/docs/API_docs/methods/auth_dropTempAuthKeys.md b/docs/API_docs/methods/auth_dropTempAuthKeys.md index aba76766..fedb7bf4 100644 --- a/docs/API_docs/methods/auth_dropTempAuthKeys.md +++ b/docs/API_docs/methods/auth_dropTempAuthKeys.md @@ -23,16 +23,13 @@ description: auth.dropTempAuthKeys parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/docs/API_docs/methods/auth_exportAuthorization.md b/docs/API_docs/methods/auth_exportAuthorization.md index 44c45b70..cbc8203b 100644 --- a/docs/API_docs/methods/auth_exportAuthorization.md +++ b/docs/API_docs/methods/auth_exportAuthorization.md @@ -30,16 +30,13 @@ description: auth.exportAuthorization parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/docs/API_docs/methods/auth_importAuthorization.md b/docs/API_docs/methods/auth_importAuthorization.md index e0fd534f..22166510 100644 --- a/docs/API_docs/methods/auth_importAuthorization.md +++ b/docs/API_docs/methods/auth_importAuthorization.md @@ -32,16 +32,13 @@ description: auth.importAuthorization parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/docs/API_docs/methods/auth_recoverPassword.md b/docs/API_docs/methods/auth_recoverPassword.md index c2ce3fed..931e99fd 100644 --- a/docs/API_docs/methods/auth_recoverPassword.md +++ b/docs/API_docs/methods/auth_recoverPassword.md @@ -30,13 +30,10 @@ description: auth.recoverPassword parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/docs/API_docs/methods/auth_requestPasswordRecovery.md b/docs/API_docs/methods/auth_requestPasswordRecovery.md index 101b1cf7..c6babcd9 100644 --- a/docs/API_docs/methods/auth_requestPasswordRecovery.md +++ b/docs/API_docs/methods/auth_requestPasswordRecovery.md @@ -25,13 +25,10 @@ description: auth.requestPasswordRecovery parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/docs/API_docs/methods/auth_resendCode.md b/docs/API_docs/methods/auth_resendCode.md index 14d08ddd..df4803b8 100644 --- a/docs/API_docs/methods/auth_resendCode.md +++ b/docs/API_docs/methods/auth_resendCode.md @@ -31,13 +31,10 @@ description: auth.resendCode parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/docs/API_docs/methods/auth_resetAuthorizations.md b/docs/API_docs/methods/auth_resetAuthorizations.md index 87a39a22..fe297fa7 100644 --- a/docs/API_docs/methods/auth_resetAuthorizations.md +++ b/docs/API_docs/methods/auth_resetAuthorizations.md @@ -25,13 +25,10 @@ description: auth.resetAuthorizations parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/docs/API_docs/methods/auth_sendInvites.md b/docs/API_docs/methods/auth_sendInvites.md index 604fc65d..ad9636c5 100644 --- a/docs/API_docs/methods/auth_sendInvites.md +++ b/docs/API_docs/methods/auth_sendInvites.md @@ -31,13 +31,10 @@ description: auth.sendInvites parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/docs/API_docs/methods/bots_answerWebhookJSONQuery.md b/docs/API_docs/methods/bots_answerWebhookJSONQuery.md index ae1efce3..d910db35 100644 --- a/docs/API_docs/methods/bots_answerWebhookJSONQuery.md +++ b/docs/API_docs/methods/bots_answerWebhookJSONQuery.md @@ -32,16 +32,13 @@ description: bots.answerWebhookJSONQuery parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/docs/API_docs/methods/bots_sendCustomRequest.md b/docs/API_docs/methods/bots_sendCustomRequest.md index 927f18c5..abb880ef 100644 --- a/docs/API_docs/methods/bots_sendCustomRequest.md +++ b/docs/API_docs/methods/bots_sendCustomRequest.md @@ -31,16 +31,13 @@ description: bots.sendCustomRequest parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/docs/API_docs/methods/channels_checkUsername.md b/docs/API_docs/methods/channels_checkUsername.md index d6ea876d..e29ee107 100644 --- a/docs/API_docs/methods/channels_checkUsername.md +++ b/docs/API_docs/methods/channels_checkUsername.md @@ -33,13 +33,10 @@ description: channels.checkUsername parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/docs/API_docs/methods/channels_createChannel.md b/docs/API_docs/methods/channels_createChannel.md index 9ba02e9e..58808b73 100644 --- a/docs/API_docs/methods/channels_createChannel.md +++ b/docs/API_docs/methods/channels_createChannel.md @@ -34,13 +34,10 @@ description: channels.createChannel parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/docs/API_docs/methods/channels_deleteChannel.md b/docs/API_docs/methods/channels_deleteChannel.md index 912ab080..532f3c6c 100644 --- a/docs/API_docs/methods/channels_deleteChannel.md +++ b/docs/API_docs/methods/channels_deleteChannel.md @@ -31,13 +31,10 @@ description: channels.deleteChannel parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/docs/API_docs/methods/channels_deleteHistory.md b/docs/API_docs/methods/channels_deleteHistory.md index d44d0a13..fac2e305 100644 --- a/docs/API_docs/methods/channels_deleteHistory.md +++ b/docs/API_docs/methods/channels_deleteHistory.md @@ -24,16 +24,13 @@ description: channels.deleteHistory parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/docs/API_docs/methods/channels_deleteMessages.md b/docs/API_docs/methods/channels_deleteMessages.md index b3481294..a42a47a5 100644 --- a/docs/API_docs/methods/channels_deleteMessages.md +++ b/docs/API_docs/methods/channels_deleteMessages.md @@ -33,16 +33,13 @@ description: channels.deleteMessages parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/docs/API_docs/methods/channels_deleteUserHistory.md b/docs/API_docs/methods/channels_deleteUserHistory.md index 66843269..73494485 100644 --- a/docs/API_docs/methods/channels_deleteUserHistory.md +++ b/docs/API_docs/methods/channels_deleteUserHistory.md @@ -32,13 +32,10 @@ description: channels.deleteUserHistory parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/docs/API_docs/methods/channels_editAbout.md b/docs/API_docs/methods/channels_editAbout.md index 4c759a8a..1c3ce933 100644 --- a/docs/API_docs/methods/channels_editAbout.md +++ b/docs/API_docs/methods/channels_editAbout.md @@ -34,16 +34,13 @@ description: channels.editAbout parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/docs/API_docs/methods/channels_editAdmin.md b/docs/API_docs/methods/channels_editAdmin.md index e68ba7ea..c6f5454c 100644 --- a/docs/API_docs/methods/channels_editAdmin.md +++ b/docs/API_docs/methods/channels_editAdmin.md @@ -41,16 +41,13 @@ description: channels.editAdmin parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/docs/API_docs/methods/channels_editBanned.md b/docs/API_docs/methods/channels_editBanned.md index 7fb904b9..02ed04bf 100644 --- a/docs/API_docs/methods/channels_editBanned.md +++ b/docs/API_docs/methods/channels_editBanned.md @@ -36,16 +36,13 @@ description: channels.editBanned parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/docs/API_docs/methods/channels_editPhoto.md b/docs/API_docs/methods/channels_editPhoto.md index 99873537..4a4aeb03 100644 --- a/docs/API_docs/methods/channels_editPhoto.md +++ b/docs/API_docs/methods/channels_editPhoto.md @@ -33,16 +33,13 @@ description: channels.editPhoto parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/docs/API_docs/methods/channels_editTitle.md b/docs/API_docs/methods/channels_editTitle.md index 04e8ce12..8a69d09b 100644 --- a/docs/API_docs/methods/channels_editTitle.md +++ b/docs/API_docs/methods/channels_editTitle.md @@ -33,16 +33,13 @@ description: channels.editTitle parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/docs/API_docs/methods/channels_exportInvite.md b/docs/API_docs/methods/channels_exportInvite.md index 2ed80f6c..79dc6401 100644 --- a/docs/API_docs/methods/channels_exportInvite.md +++ b/docs/API_docs/methods/channels_exportInvite.md @@ -32,16 +32,13 @@ description: channels.exportInvite parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/docs/API_docs/methods/channels_exportMessageLink.md b/docs/API_docs/methods/channels_exportMessageLink.md index 9831c9c0..5b824859 100644 --- a/docs/API_docs/methods/channels_exportMessageLink.md +++ b/docs/API_docs/methods/channels_exportMessageLink.md @@ -31,13 +31,10 @@ description: channels.exportMessageLink parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/docs/API_docs/methods/channels_getAdminLog.md b/docs/API_docs/methods/channels_getAdminLog.md index 5283563d..2f7327d1 100644 --- a/docs/API_docs/methods/channels_getAdminLog.md +++ b/docs/API_docs/methods/channels_getAdminLog.md @@ -38,13 +38,10 @@ description: channels.getAdminLog parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/docs/API_docs/methods/channels_getAdminedPublicChannels.md b/docs/API_docs/methods/channels_getAdminedPublicChannels.md index 7fceb026..283a9071 100644 --- a/docs/API_docs/methods/channels_getAdminedPublicChannels.md +++ b/docs/API_docs/methods/channels_getAdminedPublicChannels.md @@ -18,13 +18,10 @@ description: channels.getAdminedPublicChannels parameters, return type and examp ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/docs/API_docs/methods/channels_getChannels.md b/docs/API_docs/methods/channels_getChannels.md index 13304938..e80aa6a6 100644 --- a/docs/API_docs/methods/channels_getChannels.md +++ b/docs/API_docs/methods/channels_getChannels.md @@ -32,16 +32,13 @@ description: channels.getChannels parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/docs/API_docs/methods/channels_getMessages.md b/docs/API_docs/methods/channels_getMessages.md index 5480dd86..dc392773 100644 --- a/docs/API_docs/methods/channels_getMessages.md +++ b/docs/API_docs/methods/channels_getMessages.md @@ -33,16 +33,13 @@ description: channels.getMessages parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/docs/API_docs/methods/channels_getParticipant.md b/docs/API_docs/methods/channels_getParticipant.md index 8c7e3cbd..001bf115 100644 --- a/docs/API_docs/methods/channels_getParticipant.md +++ b/docs/API_docs/methods/channels_getParticipant.md @@ -35,16 +35,13 @@ description: channels.getParticipant parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/docs/API_docs/methods/channels_inviteToChannel.md b/docs/API_docs/methods/channels_inviteToChannel.md index cf5480e0..2448fb84 100644 --- a/docs/API_docs/methods/channels_inviteToChannel.md +++ b/docs/API_docs/methods/channels_inviteToChannel.md @@ -46,13 +46,10 @@ description: channels.inviteToChannel parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/docs/API_docs/methods/channels_joinChannel.md b/docs/API_docs/methods/channels_joinChannel.md index f31730a1..e746cf48 100644 --- a/docs/API_docs/methods/channels_joinChannel.md +++ b/docs/API_docs/methods/channels_joinChannel.md @@ -32,13 +32,10 @@ description: channels.joinChannel parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/docs/API_docs/methods/channels_leaveChannel.md b/docs/API_docs/methods/channels_leaveChannel.md index 12902f6d..ff244ded 100644 --- a/docs/API_docs/methods/channels_leaveChannel.md +++ b/docs/API_docs/methods/channels_leaveChannel.md @@ -34,16 +34,13 @@ description: channels.leaveChannel parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/docs/API_docs/methods/channels_readHistory.md b/docs/API_docs/methods/channels_readHistory.md index be979101..6fc6ec0e 100644 --- a/docs/API_docs/methods/channels_readHistory.md +++ b/docs/API_docs/methods/channels_readHistory.md @@ -32,13 +32,10 @@ description: channels.readHistory parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/docs/API_docs/methods/channels_readMessageContents.md b/docs/API_docs/methods/channels_readMessageContents.md index 90277593..66213852 100644 --- a/docs/API_docs/methods/channels_readMessageContents.md +++ b/docs/API_docs/methods/channels_readMessageContents.md @@ -32,13 +32,10 @@ description: channels.readMessageContents parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/docs/API_docs/methods/channels_reportSpam.md b/docs/API_docs/methods/channels_reportSpam.md index 22f34443..a37a5833 100644 --- a/docs/API_docs/methods/channels_reportSpam.md +++ b/docs/API_docs/methods/channels_reportSpam.md @@ -33,13 +33,10 @@ description: channels.reportSpam parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/docs/API_docs/methods/channels_setStickers.md b/docs/API_docs/methods/channels_setStickers.md index 6712ada0..a05165c2 100644 --- a/docs/API_docs/methods/channels_setStickers.md +++ b/docs/API_docs/methods/channels_setStickers.md @@ -32,16 +32,13 @@ description: channels.setStickers parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/docs/API_docs/methods/channels_toggleInvites.md b/docs/API_docs/methods/channels_toggleInvites.md index c2715b32..d0ae1136 100644 --- a/docs/API_docs/methods/channels_toggleInvites.md +++ b/docs/API_docs/methods/channels_toggleInvites.md @@ -33,13 +33,10 @@ description: channels.toggleInvites parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/docs/API_docs/methods/channels_togglePreHistoryHidden.md b/docs/API_docs/methods/channels_togglePreHistoryHidden.md index 892b4531..63fdebed 100644 --- a/docs/API_docs/methods/channels_togglePreHistoryHidden.md +++ b/docs/API_docs/methods/channels_togglePreHistoryHidden.md @@ -24,16 +24,13 @@ description: channels.togglePreHistoryHidden parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/docs/API_docs/methods/channels_toggleSignatures.md b/docs/API_docs/methods/channels_toggleSignatures.md index a214b849..6477bc6d 100644 --- a/docs/API_docs/methods/channels_toggleSignatures.md +++ b/docs/API_docs/methods/channels_toggleSignatures.md @@ -31,13 +31,10 @@ description: channels.toggleSignatures parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/docs/API_docs/methods/channels_updatePinnedMessage.md b/docs/API_docs/methods/channels_updatePinnedMessage.md index 6dcabf71..37a0a20d 100644 --- a/docs/API_docs/methods/channels_updatePinnedMessage.md +++ b/docs/API_docs/methods/channels_updatePinnedMessage.md @@ -35,16 +35,13 @@ description: channels.updatePinnedMessage parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/docs/API_docs/methods/channels_updateUsername.md b/docs/API_docs/methods/channels_updateUsername.md index c2ede724..1f1f111e 100644 --- a/docs/API_docs/methods/channels_updateUsername.md +++ b/docs/API_docs/methods/channels_updateUsername.md @@ -35,13 +35,10 @@ description: channels.updateUsername parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/docs/API_docs/methods/contacts_block.md b/docs/API_docs/methods/contacts_block.md index d9d58e37..1c7cbe26 100644 --- a/docs/API_docs/methods/contacts_block.md +++ b/docs/API_docs/methods/contacts_block.md @@ -30,13 +30,10 @@ description: contacts.block parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/docs/API_docs/methods/contacts_deleteContact.md b/docs/API_docs/methods/contacts_deleteContact.md index cd8c17ad..987a1be0 100644 --- a/docs/API_docs/methods/contacts_deleteContact.md +++ b/docs/API_docs/methods/contacts_deleteContact.md @@ -30,13 +30,10 @@ description: contacts.deleteContact parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/docs/API_docs/methods/contacts_deleteContacts.md b/docs/API_docs/methods/contacts_deleteContacts.md index fc65880d..67a922ed 100644 --- a/docs/API_docs/methods/contacts_deleteContacts.md +++ b/docs/API_docs/methods/contacts_deleteContacts.md @@ -31,13 +31,10 @@ description: contacts.deleteContacts parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/docs/API_docs/methods/contacts_exportCard.md b/docs/API_docs/methods/contacts_exportCard.md index 63508076..bf6d1f9f 100644 --- a/docs/API_docs/methods/contacts_exportCard.md +++ b/docs/API_docs/methods/contacts_exportCard.md @@ -18,13 +18,10 @@ description: contacts.exportCard parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/docs/API_docs/methods/contacts_getBlocked.md b/docs/API_docs/methods/contacts_getBlocked.md index f50792b4..faa719da 100644 --- a/docs/API_docs/methods/contacts_getBlocked.md +++ b/docs/API_docs/methods/contacts_getBlocked.md @@ -24,13 +24,10 @@ description: contacts.getBlocked parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/docs/API_docs/methods/contacts_getContacts.md b/docs/API_docs/methods/contacts_getContacts.md index dd231da2..e7783c1b 100644 --- a/docs/API_docs/methods/contacts_getContacts.md +++ b/docs/API_docs/methods/contacts_getContacts.md @@ -23,13 +23,10 @@ description: contacts.getContacts parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/docs/API_docs/methods/contacts_getStatuses.md b/docs/API_docs/methods/contacts_getStatuses.md index d914e08d..9bb7f263 100644 --- a/docs/API_docs/methods/contacts_getStatuses.md +++ b/docs/API_docs/methods/contacts_getStatuses.md @@ -18,13 +18,10 @@ description: contacts.getStatuses parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/docs/API_docs/methods/contacts_getTopPeers.md b/docs/API_docs/methods/contacts_getTopPeers.md index cbd64cc0..f72133a5 100644 --- a/docs/API_docs/methods/contacts_getTopPeers.md +++ b/docs/API_docs/methods/contacts_getTopPeers.md @@ -38,13 +38,10 @@ description: contacts.getTopPeers parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/docs/API_docs/methods/contacts_importCard.md b/docs/API_docs/methods/contacts_importCard.md index a6abf56d..7a2f34e1 100644 --- a/docs/API_docs/methods/contacts_importCard.md +++ b/docs/API_docs/methods/contacts_importCard.md @@ -31,13 +31,10 @@ description: contacts.importCard parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/docs/API_docs/methods/contacts_importContacts.md b/docs/API_docs/methods/contacts_importContacts.md index e7e84bea..7d580e83 100644 --- a/docs/API_docs/methods/contacts_importContacts.md +++ b/docs/API_docs/methods/contacts_importContacts.md @@ -23,13 +23,10 @@ description: contacts.importContacts parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/docs/API_docs/methods/contacts_resetSaved.md b/docs/API_docs/methods/contacts_resetSaved.md index 56838fd8..87f8db12 100644 --- a/docs/API_docs/methods/contacts_resetSaved.md +++ b/docs/API_docs/methods/contacts_resetSaved.md @@ -18,16 +18,13 @@ description: contacts.resetSaved parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/docs/API_docs/methods/contacts_resetTopPeerRating.md b/docs/API_docs/methods/contacts_resetTopPeerRating.md index 738494b2..711ea0cb 100644 --- a/docs/API_docs/methods/contacts_resetTopPeerRating.md +++ b/docs/API_docs/methods/contacts_resetTopPeerRating.md @@ -31,13 +31,10 @@ description: contacts.resetTopPeerRating parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/docs/API_docs/methods/contacts_search.md b/docs/API_docs/methods/contacts_search.md index 0203b160..70a0635e 100644 --- a/docs/API_docs/methods/contacts_search.md +++ b/docs/API_docs/methods/contacts_search.md @@ -33,13 +33,10 @@ description: contacts.search parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/docs/API_docs/methods/contacts_unblock.md b/docs/API_docs/methods/contacts_unblock.md index a1977c24..9c01e42a 100644 --- a/docs/API_docs/methods/contacts_unblock.md +++ b/docs/API_docs/methods/contacts_unblock.md @@ -30,13 +30,10 @@ description: contacts.unblock parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/docs/API_docs/methods/help_getAppChangelog.md b/docs/API_docs/methods/help_getAppChangelog.md index 9d8c3203..59916787 100644 --- a/docs/API_docs/methods/help_getAppChangelog.md +++ b/docs/API_docs/methods/help_getAppChangelog.md @@ -23,13 +23,10 @@ description: help.getAppChangelog parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/docs/API_docs/methods/help_getAppUpdate.md b/docs/API_docs/methods/help_getAppUpdate.md index 0871f59d..89ff22c3 100644 --- a/docs/API_docs/methods/help_getAppUpdate.md +++ b/docs/API_docs/methods/help_getAppUpdate.md @@ -18,13 +18,10 @@ description: help.getAppUpdate parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/docs/API_docs/methods/help_getCdnConfig.md b/docs/API_docs/methods/help_getCdnConfig.md index da446958..3079e605 100644 --- a/docs/API_docs/methods/help_getCdnConfig.md +++ b/docs/API_docs/methods/help_getCdnConfig.md @@ -25,16 +25,13 @@ description: help.getCdnConfig parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/docs/API_docs/methods/help_getConfig.md b/docs/API_docs/methods/help_getConfig.md index e3648b5a..bb51b362 100644 --- a/docs/API_docs/methods/help_getConfig.md +++ b/docs/API_docs/methods/help_getConfig.md @@ -25,16 +25,13 @@ description: help.getConfig parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/docs/API_docs/methods/help_getInviteText.md b/docs/API_docs/methods/help_getInviteText.md index 4bcbb77d..6d2674d6 100644 --- a/docs/API_docs/methods/help_getInviteText.md +++ b/docs/API_docs/methods/help_getInviteText.md @@ -18,13 +18,10 @@ description: help.getInviteText parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/docs/API_docs/methods/help_getNearestDc.md b/docs/API_docs/methods/help_getNearestDc.md index c6f5c555..6d8ed3f7 100644 --- a/docs/API_docs/methods/help_getNearestDc.md +++ b/docs/API_docs/methods/help_getNearestDc.md @@ -18,13 +18,10 @@ description: help.getNearestDc parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/docs/API_docs/methods/help_getRecentMeUrls.md b/docs/API_docs/methods/help_getRecentMeUrls.md index 4d7a2ce9..76d65594 100644 --- a/docs/API_docs/methods/help_getRecentMeUrls.md +++ b/docs/API_docs/methods/help_getRecentMeUrls.md @@ -23,16 +23,13 @@ description: help.getRecentMeUrls parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/docs/API_docs/methods/help_getSupport.md b/docs/API_docs/methods/help_getSupport.md index 209edf03..ca8db03c 100644 --- a/docs/API_docs/methods/help_getSupport.md +++ b/docs/API_docs/methods/help_getSupport.md @@ -18,13 +18,10 @@ description: help.getSupport parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/docs/API_docs/methods/help_getTermsOfService.md b/docs/API_docs/methods/help_getTermsOfService.md index 8bc2e2fa..eb686506 100644 --- a/docs/API_docs/methods/help_getTermsOfService.md +++ b/docs/API_docs/methods/help_getTermsOfService.md @@ -18,13 +18,10 @@ description: help.getTermsOfService parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/docs/API_docs/methods/help_saveAppLog.md b/docs/API_docs/methods/help_saveAppLog.md index 4f06434c..741b9aa1 100644 --- a/docs/API_docs/methods/help_saveAppLog.md +++ b/docs/API_docs/methods/help_saveAppLog.md @@ -23,13 +23,10 @@ description: help.saveAppLog parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/docs/API_docs/methods/help_setBotUpdatesStatus.md b/docs/API_docs/methods/help_setBotUpdatesStatus.md index 55e1d2fe..470187a0 100644 --- a/docs/API_docs/methods/help_setBotUpdatesStatus.md +++ b/docs/API_docs/methods/help_setBotUpdatesStatus.md @@ -24,16 +24,13 @@ description: help.setBotUpdatesStatus parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/docs/API_docs/methods/initConnection.md b/docs/API_docs/methods/initConnection.md index b66ab859..ef40e7f5 100644 --- a/docs/API_docs/methods/initConnection.md +++ b/docs/API_docs/methods/initConnection.md @@ -38,16 +38,13 @@ description: initConnection parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/docs/API_docs/methods/invokeAfterMsg.md b/docs/API_docs/methods/invokeAfterMsg.md index c139fe8c..a382429e 100644 --- a/docs/API_docs/methods/invokeAfterMsg.md +++ b/docs/API_docs/methods/invokeAfterMsg.md @@ -24,16 +24,13 @@ description: invokeAfterMsg parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/docs/API_docs/methods/invokeAfterMsgs.md b/docs/API_docs/methods/invokeAfterMsgs.md index 35004296..169eedaf 100644 --- a/docs/API_docs/methods/invokeAfterMsgs.md +++ b/docs/API_docs/methods/invokeAfterMsgs.md @@ -24,16 +24,13 @@ description: invokeAfterMsgs parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/docs/API_docs/methods/invokeWithLayer.md b/docs/API_docs/methods/invokeWithLayer.md index 706036c4..d9a2c74c 100644 --- a/docs/API_docs/methods/invokeWithLayer.md +++ b/docs/API_docs/methods/invokeWithLayer.md @@ -41,16 +41,13 @@ description: invokeWithLayer parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/docs/API_docs/methods/invokeWithoutUpdates.md b/docs/API_docs/methods/invokeWithoutUpdates.md index 10c6bfcf..f7d01765 100644 --- a/docs/API_docs/methods/invokeWithoutUpdates.md +++ b/docs/API_docs/methods/invokeWithoutUpdates.md @@ -23,16 +23,13 @@ description: invokeWithoutUpdates parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/docs/API_docs/methods/langpack_getDifference.md b/docs/API_docs/methods/langpack_getDifference.md index 2e77cc3b..116e78e2 100644 --- a/docs/API_docs/methods/langpack_getDifference.md +++ b/docs/API_docs/methods/langpack_getDifference.md @@ -30,13 +30,10 @@ description: langpack.getDifference parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/docs/API_docs/methods/langpack_getLangPack.md b/docs/API_docs/methods/langpack_getLangPack.md index 5d4d0b81..b5686e61 100644 --- a/docs/API_docs/methods/langpack_getLangPack.md +++ b/docs/API_docs/methods/langpack_getLangPack.md @@ -30,13 +30,10 @@ description: langpack.getLangPack parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/docs/API_docs/methods/langpack_getLanguages.md b/docs/API_docs/methods/langpack_getLanguages.md index abaa0de3..cb65e5a0 100644 --- a/docs/API_docs/methods/langpack_getLanguages.md +++ b/docs/API_docs/methods/langpack_getLanguages.md @@ -25,13 +25,10 @@ description: langpack.getLanguages parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/docs/API_docs/methods/langpack_getStrings.md b/docs/API_docs/methods/langpack_getStrings.md index 9bb740dc..ce58daf9 100644 --- a/docs/API_docs/methods/langpack_getStrings.md +++ b/docs/API_docs/methods/langpack_getStrings.md @@ -31,13 +31,10 @@ description: langpack.getStrings parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/docs/API_docs/methods/messages_addChatUser.md b/docs/API_docs/methods/messages_addChatUser.md index 00da5a61..b9e6243d 100644 --- a/docs/API_docs/methods/messages_addChatUser.md +++ b/docs/API_docs/methods/messages_addChatUser.md @@ -40,13 +40,10 @@ description: messages.addChatUser parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/docs/API_docs/methods/messages_checkChatInvite.md b/docs/API_docs/methods/messages_checkChatInvite.md index c5eb1c06..c4489469 100644 --- a/docs/API_docs/methods/messages_checkChatInvite.md +++ b/docs/API_docs/methods/messages_checkChatInvite.md @@ -32,13 +32,10 @@ description: messages.checkChatInvite parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/docs/API_docs/methods/messages_clearRecentStickers.md b/docs/API_docs/methods/messages_clearRecentStickers.md index dda76d14..ae45b249 100644 --- a/docs/API_docs/methods/messages_clearRecentStickers.md +++ b/docs/API_docs/methods/messages_clearRecentStickers.md @@ -23,13 +23,10 @@ description: messages.clearRecentStickers parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/docs/API_docs/methods/messages_createChat.md b/docs/API_docs/methods/messages_createChat.md index c643a022..c6c8f420 100644 --- a/docs/API_docs/methods/messages_createChat.md +++ b/docs/API_docs/methods/messages_createChat.md @@ -32,13 +32,10 @@ description: messages.createChat parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/docs/API_docs/methods/messages_deleteChatUser.md b/docs/API_docs/methods/messages_deleteChatUser.md index 3d75d9cf..4b8c2aa5 100644 --- a/docs/API_docs/methods/messages_deleteChatUser.md +++ b/docs/API_docs/methods/messages_deleteChatUser.md @@ -33,16 +33,13 @@ description: messages.deleteChatUser parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/docs/API_docs/methods/messages_deleteHistory.md b/docs/API_docs/methods/messages_deleteHistory.md index ce6ba6e7..ebe2c89c 100644 --- a/docs/API_docs/methods/messages_deleteHistory.md +++ b/docs/API_docs/methods/messages_deleteHistory.md @@ -32,13 +32,10 @@ description: messages.deleteHistory parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/docs/API_docs/methods/messages_deleteMessages.md b/docs/API_docs/methods/messages_deleteMessages.md index 2b88a73f..5472cc72 100644 --- a/docs/API_docs/methods/messages_deleteMessages.md +++ b/docs/API_docs/methods/messages_deleteMessages.md @@ -31,16 +31,13 @@ description: messages.deleteMessages parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/docs/API_docs/methods/messages_editChatAdmin.md b/docs/API_docs/methods/messages_editChatAdmin.md index e64d9da5..1b3ffa9f 100644 --- a/docs/API_docs/methods/messages_editChatAdmin.md +++ b/docs/API_docs/methods/messages_editChatAdmin.md @@ -32,13 +32,10 @@ description: messages.editChatAdmin parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/docs/API_docs/methods/messages_editChatPhoto.md b/docs/API_docs/methods/messages_editChatPhoto.md index d225962d..8c5d9d47 100644 --- a/docs/API_docs/methods/messages_editChatPhoto.md +++ b/docs/API_docs/methods/messages_editChatPhoto.md @@ -35,16 +35,13 @@ description: messages.editChatPhoto parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/docs/API_docs/methods/messages_editChatTitle.md b/docs/API_docs/methods/messages_editChatTitle.md index 5cb1c6d7..238c6d72 100644 --- a/docs/API_docs/methods/messages_editChatTitle.md +++ b/docs/API_docs/methods/messages_editChatTitle.md @@ -32,16 +32,13 @@ description: messages.editChatTitle parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/docs/API_docs/methods/messages_editInlineBotMessage.md b/docs/API_docs/methods/messages_editInlineBotMessage.md index 7212ca73..caa59b61 100644 --- a/docs/API_docs/methods/messages_editInlineBotMessage.md +++ b/docs/API_docs/methods/messages_editInlineBotMessage.md @@ -38,16 +38,13 @@ description: messages.editInlineBotMessage parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/docs/API_docs/methods/messages_editMessage.md b/docs/API_docs/methods/messages_editMessage.md index 63b7e690..7ea04dbf 100644 --- a/docs/API_docs/methods/messages_editMessage.md +++ b/docs/API_docs/methods/messages_editMessage.md @@ -47,16 +47,13 @@ description: messages.editMessage parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/docs/API_docs/methods/messages_exportChatInvite.md b/docs/API_docs/methods/messages_exportChatInvite.md index 4a6e28ff..78f2ff86 100644 --- a/docs/API_docs/methods/messages_exportChatInvite.md +++ b/docs/API_docs/methods/messages_exportChatInvite.md @@ -30,13 +30,10 @@ description: messages.exportChatInvite parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/docs/API_docs/methods/messages_faveSticker.md b/docs/API_docs/methods/messages_faveSticker.md index 4ac9d019..4164c935 100644 --- a/docs/API_docs/methods/messages_faveSticker.md +++ b/docs/API_docs/methods/messages_faveSticker.md @@ -31,16 +31,13 @@ description: messages.faveSticker parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/docs/API_docs/methods/messages_forwardMessage.md b/docs/API_docs/methods/messages_forwardMessage.md index 4e2362db..fbdbc955 100644 --- a/docs/API_docs/methods/messages_forwardMessage.md +++ b/docs/API_docs/methods/messages_forwardMessage.md @@ -34,16 +34,13 @@ description: messages.forwardMessage parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/docs/API_docs/methods/messages_forwardMessages.md b/docs/API_docs/methods/messages_forwardMessages.md index dd92db4d..9709e2fd 100644 --- a/docs/API_docs/methods/messages_forwardMessages.md +++ b/docs/API_docs/methods/messages_forwardMessages.md @@ -57,16 +57,13 @@ description: messages.forwardMessages parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/docs/API_docs/methods/messages_getAllChats.md b/docs/API_docs/methods/messages_getAllChats.md index c5037003..babcf17d 100644 --- a/docs/API_docs/methods/messages_getAllChats.md +++ b/docs/API_docs/methods/messages_getAllChats.md @@ -23,13 +23,10 @@ description: messages.getAllChats parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/docs/API_docs/methods/messages_getAllDrafts.md b/docs/API_docs/methods/messages_getAllDrafts.md index cc447864..8550c5b8 100644 --- a/docs/API_docs/methods/messages_getAllDrafts.md +++ b/docs/API_docs/methods/messages_getAllDrafts.md @@ -18,13 +18,10 @@ description: messages.getAllDrafts parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/docs/API_docs/methods/messages_getAllStickers.md b/docs/API_docs/methods/messages_getAllStickers.md index dc9e2432..034438a5 100644 --- a/docs/API_docs/methods/messages_getAllStickers.md +++ b/docs/API_docs/methods/messages_getAllStickers.md @@ -23,13 +23,10 @@ description: messages.getAllStickers parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/docs/API_docs/methods/messages_getArchivedStickers.md b/docs/API_docs/methods/messages_getArchivedStickers.md index dddcc748..cdb7f0af 100644 --- a/docs/API_docs/methods/messages_getArchivedStickers.md +++ b/docs/API_docs/methods/messages_getArchivedStickers.md @@ -25,13 +25,10 @@ description: messages.getArchivedStickers parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/docs/API_docs/methods/messages_getAttachedStickers.md b/docs/API_docs/methods/messages_getAttachedStickers.md index 250db6a8..79d4e30d 100644 --- a/docs/API_docs/methods/messages_getAttachedStickers.md +++ b/docs/API_docs/methods/messages_getAttachedStickers.md @@ -23,13 +23,10 @@ description: messages.getAttachedStickers parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/docs/API_docs/methods/messages_getBotCallbackAnswer.md b/docs/API_docs/methods/messages_getBotCallbackAnswer.md index e905723f..afa5358c 100644 --- a/docs/API_docs/methods/messages_getBotCallbackAnswer.md +++ b/docs/API_docs/methods/messages_getBotCallbackAnswer.md @@ -37,13 +37,10 @@ description: messages.getBotCallbackAnswer parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/docs/API_docs/methods/messages_getChats.md b/docs/API_docs/methods/messages_getChats.md index 6fa30cbd..c322613d 100644 --- a/docs/API_docs/methods/messages_getChats.md +++ b/docs/API_docs/methods/messages_getChats.md @@ -31,16 +31,13 @@ description: messages.getChats parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/docs/API_docs/methods/messages_getCommonChats.md b/docs/API_docs/methods/messages_getCommonChats.md index 0c601ca9..8c9e2834 100644 --- a/docs/API_docs/methods/messages_getCommonChats.md +++ b/docs/API_docs/methods/messages_getCommonChats.md @@ -32,13 +32,10 @@ description: messages.getCommonChats parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/docs/API_docs/methods/messages_getDhConfig.md b/docs/API_docs/methods/messages_getDhConfig.md index aac3354d..f97684d2 100644 --- a/docs/API_docs/methods/messages_getDhConfig.md +++ b/docs/API_docs/methods/messages_getDhConfig.md @@ -31,13 +31,10 @@ description: messages.getDhConfig parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/docs/API_docs/methods/messages_getDialogs.md b/docs/API_docs/methods/messages_getDialogs.md index 131b75b7..cef5ecc6 100644 --- a/docs/API_docs/methods/messages_getDialogs.md +++ b/docs/API_docs/methods/messages_getDialogs.md @@ -37,13 +37,10 @@ description: messages.getDialogs parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/docs/API_docs/methods/messages_getDocumentByHash.md b/docs/API_docs/methods/messages_getDocumentByHash.md index dda54bdd..3902ac44 100644 --- a/docs/API_docs/methods/messages_getDocumentByHash.md +++ b/docs/API_docs/methods/messages_getDocumentByHash.md @@ -32,16 +32,13 @@ description: messages.getDocumentByHash parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/docs/API_docs/methods/messages_getFavedStickers.md b/docs/API_docs/methods/messages_getFavedStickers.md index 482b8fc5..51701826 100644 --- a/docs/API_docs/methods/messages_getFavedStickers.md +++ b/docs/API_docs/methods/messages_getFavedStickers.md @@ -23,16 +23,13 @@ description: messages.getFavedStickers parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/docs/API_docs/methods/messages_getFeaturedStickers.md b/docs/API_docs/methods/messages_getFeaturedStickers.md index 9573464a..5aad1810 100644 --- a/docs/API_docs/methods/messages_getFeaturedStickers.md +++ b/docs/API_docs/methods/messages_getFeaturedStickers.md @@ -23,13 +23,10 @@ description: messages.getFeaturedStickers parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/docs/API_docs/methods/messages_getGameHighScores.md b/docs/API_docs/methods/messages_getGameHighScores.md index 935bb95a..d8a94ae3 100644 --- a/docs/API_docs/methods/messages_getGameHighScores.md +++ b/docs/API_docs/methods/messages_getGameHighScores.md @@ -33,16 +33,13 @@ description: messages.getGameHighScores parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/docs/API_docs/methods/messages_getHistory.md b/docs/API_docs/methods/messages_getHistory.md index 6a8e1de5..81ee1bff 100644 --- a/docs/API_docs/methods/messages_getHistory.md +++ b/docs/API_docs/methods/messages_getHistory.md @@ -42,13 +42,10 @@ description: messages.getHistory parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/docs/API_docs/methods/messages_getInlineBotResults.md b/docs/API_docs/methods/messages_getInlineBotResults.md index 61366580..61b927fc 100644 --- a/docs/API_docs/methods/messages_getInlineBotResults.md +++ b/docs/API_docs/methods/messages_getInlineBotResults.md @@ -37,13 +37,10 @@ description: messages.getInlineBotResults parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/docs/API_docs/methods/messages_getInlineGameHighScores.md b/docs/API_docs/methods/messages_getInlineGameHighScores.md index 7cc04d0d..40eff3a9 100644 --- a/docs/API_docs/methods/messages_getInlineGameHighScores.md +++ b/docs/API_docs/methods/messages_getInlineGameHighScores.md @@ -32,16 +32,13 @@ description: messages.getInlineGameHighScores parameters, return type and exampl ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/docs/API_docs/methods/messages_getMaskStickers.md b/docs/API_docs/methods/messages_getMaskStickers.md index 0ab194df..ca964647 100644 --- a/docs/API_docs/methods/messages_getMaskStickers.md +++ b/docs/API_docs/methods/messages_getMaskStickers.md @@ -23,13 +23,10 @@ description: messages.getMaskStickers parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/docs/API_docs/methods/messages_getMessageEditData.md b/docs/API_docs/methods/messages_getMessageEditData.md index a8b135c6..15085153 100644 --- a/docs/API_docs/methods/messages_getMessageEditData.md +++ b/docs/API_docs/methods/messages_getMessageEditData.md @@ -32,13 +32,10 @@ description: messages.getMessageEditData parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/docs/API_docs/methods/messages_getMessages.md b/docs/API_docs/methods/messages_getMessages.md index 5a970246..787c46dd 100644 --- a/docs/API_docs/methods/messages_getMessages.md +++ b/docs/API_docs/methods/messages_getMessages.md @@ -23,16 +23,13 @@ description: messages.getMessages parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/docs/API_docs/methods/messages_getMessagesViews.md b/docs/API_docs/methods/messages_getMessagesViews.md index 263f3f95..de5692dc 100644 --- a/docs/API_docs/methods/messages_getMessagesViews.md +++ b/docs/API_docs/methods/messages_getMessagesViews.md @@ -34,13 +34,10 @@ description: messages.getMessagesViews parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/docs/API_docs/methods/messages_getPeerDialogs.md b/docs/API_docs/methods/messages_getPeerDialogs.md index 3da60038..226948ae 100644 --- a/docs/API_docs/methods/messages_getPeerDialogs.md +++ b/docs/API_docs/methods/messages_getPeerDialogs.md @@ -31,13 +31,10 @@ description: messages.getPeerDialogs parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/docs/API_docs/methods/messages_getPeerSettings.md b/docs/API_docs/methods/messages_getPeerSettings.md index d3e3cfc3..2a92f2da 100644 --- a/docs/API_docs/methods/messages_getPeerSettings.md +++ b/docs/API_docs/methods/messages_getPeerSettings.md @@ -31,13 +31,10 @@ description: messages.getPeerSettings parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/docs/API_docs/methods/messages_getPinnedDialogs.md b/docs/API_docs/methods/messages_getPinnedDialogs.md index 110eab05..ec744f01 100644 --- a/docs/API_docs/methods/messages_getPinnedDialogs.md +++ b/docs/API_docs/methods/messages_getPinnedDialogs.md @@ -18,13 +18,10 @@ description: messages.getPinnedDialogs parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/docs/API_docs/methods/messages_getRecentLocations.md b/docs/API_docs/methods/messages_getRecentLocations.md index 7e7e0547..7c65ab83 100644 --- a/docs/API_docs/methods/messages_getRecentLocations.md +++ b/docs/API_docs/methods/messages_getRecentLocations.md @@ -24,16 +24,13 @@ description: messages.getRecentLocations parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/docs/API_docs/methods/messages_getRecentStickers.md b/docs/API_docs/methods/messages_getRecentStickers.md index 10d1a0df..a6ae162f 100644 --- a/docs/API_docs/methods/messages_getRecentStickers.md +++ b/docs/API_docs/methods/messages_getRecentStickers.md @@ -24,13 +24,10 @@ description: messages.getRecentStickers parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/docs/API_docs/methods/messages_getSavedGifs.md b/docs/API_docs/methods/messages_getSavedGifs.md index 7cce4ffe..4986d812 100644 --- a/docs/API_docs/methods/messages_getSavedGifs.md +++ b/docs/API_docs/methods/messages_getSavedGifs.md @@ -23,13 +23,10 @@ description: messages.getSavedGifs parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/docs/API_docs/methods/messages_getStickerSet.md b/docs/API_docs/methods/messages_getStickerSet.md index 59f33916..b480e0fe 100644 --- a/docs/API_docs/methods/messages_getStickerSet.md +++ b/docs/API_docs/methods/messages_getStickerSet.md @@ -30,16 +30,13 @@ description: messages.getStickerSet parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/docs/API_docs/methods/messages_getUnreadMentions.md b/docs/API_docs/methods/messages_getUnreadMentions.md index 54e8cabf..09b3633e 100644 --- a/docs/API_docs/methods/messages_getUnreadMentions.md +++ b/docs/API_docs/methods/messages_getUnreadMentions.md @@ -35,13 +35,10 @@ description: messages.getUnreadMentions parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/docs/API_docs/methods/messages_getWebPage.md b/docs/API_docs/methods/messages_getWebPage.md index 35f6e545..e886b020 100644 --- a/docs/API_docs/methods/messages_getWebPage.md +++ b/docs/API_docs/methods/messages_getWebPage.md @@ -31,13 +31,10 @@ description: messages.getWebPage parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/docs/API_docs/methods/messages_getWebPagePreview.md b/docs/API_docs/methods/messages_getWebPagePreview.md index a89600b1..d3908933 100644 --- a/docs/API_docs/methods/messages_getWebPagePreview.md +++ b/docs/API_docs/methods/messages_getWebPagePreview.md @@ -23,13 +23,10 @@ description: messages.getWebPagePreview parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/docs/API_docs/methods/messages_hideReportSpam.md b/docs/API_docs/methods/messages_hideReportSpam.md index 2dfe4dd7..5635665c 100644 --- a/docs/API_docs/methods/messages_hideReportSpam.md +++ b/docs/API_docs/methods/messages_hideReportSpam.md @@ -30,13 +30,10 @@ description: messages.hideReportSpam parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/docs/API_docs/methods/messages_importChatInvite.md b/docs/API_docs/methods/messages_importChatInvite.md index 9d77304d..9dcfa56d 100644 --- a/docs/API_docs/methods/messages_importChatInvite.md +++ b/docs/API_docs/methods/messages_importChatInvite.md @@ -36,13 +36,10 @@ description: messages.importChatInvite parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/docs/API_docs/methods/messages_installStickerSet.md b/docs/API_docs/methods/messages_installStickerSet.md index 3dde52a7..016d5ece 100644 --- a/docs/API_docs/methods/messages_installStickerSet.md +++ b/docs/API_docs/methods/messages_installStickerSet.md @@ -31,13 +31,10 @@ description: messages.installStickerSet parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/docs/API_docs/methods/messages_migrateChat.md b/docs/API_docs/methods/messages_migrateChat.md index 22d2fbf0..a8274e70 100644 --- a/docs/API_docs/methods/messages_migrateChat.md +++ b/docs/API_docs/methods/messages_migrateChat.md @@ -32,13 +32,10 @@ description: messages.migrateChat parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/docs/API_docs/methods/messages_readEncryptedHistory.md b/docs/API_docs/methods/messages_readEncryptedHistory.md index 766ee07d..f38f6b07 100644 --- a/docs/API_docs/methods/messages_readEncryptedHistory.md +++ b/docs/API_docs/methods/messages_readEncryptedHistory.md @@ -31,16 +31,13 @@ description: messages.readEncryptedHistory parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/docs/API_docs/methods/messages_readFeaturedStickers.md b/docs/API_docs/methods/messages_readFeaturedStickers.md index c7ce7aca..02055bf3 100644 --- a/docs/API_docs/methods/messages_readFeaturedStickers.md +++ b/docs/API_docs/methods/messages_readFeaturedStickers.md @@ -23,13 +23,10 @@ description: messages.readFeaturedStickers parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/docs/API_docs/methods/messages_readHistory.md b/docs/API_docs/methods/messages_readHistory.md index 1aa7830a..fef62130 100644 --- a/docs/API_docs/methods/messages_readHistory.md +++ b/docs/API_docs/methods/messages_readHistory.md @@ -32,13 +32,10 @@ description: messages.readHistory parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/docs/API_docs/methods/messages_readMentions.md b/docs/API_docs/methods/messages_readMentions.md index d0113d26..19d7dc30 100644 --- a/docs/API_docs/methods/messages_readMentions.md +++ b/docs/API_docs/methods/messages_readMentions.md @@ -23,16 +23,13 @@ description: messages.readMentions parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/docs/API_docs/methods/messages_readMessageContents.md b/docs/API_docs/methods/messages_readMessageContents.md index 4b1abda0..7a6055fc 100644 --- a/docs/API_docs/methods/messages_readMessageContents.md +++ b/docs/API_docs/methods/messages_readMessageContents.md @@ -23,13 +23,10 @@ description: messages.readMessageContents parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/docs/API_docs/methods/messages_receivedMessages.md b/docs/API_docs/methods/messages_receivedMessages.md index 588ac5cf..e2cf3a2f 100644 --- a/docs/API_docs/methods/messages_receivedMessages.md +++ b/docs/API_docs/methods/messages_receivedMessages.md @@ -23,13 +23,10 @@ description: messages.receivedMessages parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/docs/API_docs/methods/messages_receivedQueue.md b/docs/API_docs/methods/messages_receivedQueue.md index 3c7f1d4f..38f504b3 100644 --- a/docs/API_docs/methods/messages_receivedQueue.md +++ b/docs/API_docs/methods/messages_receivedQueue.md @@ -30,16 +30,13 @@ description: messages.receivedQueue parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/docs/API_docs/methods/messages_reorderPinnedDialogs.md b/docs/API_docs/methods/messages_reorderPinnedDialogs.md index 30102fd7..b4bfb84f 100644 --- a/docs/API_docs/methods/messages_reorderPinnedDialogs.md +++ b/docs/API_docs/methods/messages_reorderPinnedDialogs.md @@ -31,13 +31,10 @@ description: messages.reorderPinnedDialogs parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/docs/API_docs/methods/messages_reorderStickerSets.md b/docs/API_docs/methods/messages_reorderStickerSets.md index 5c47f174..fa094550 100644 --- a/docs/API_docs/methods/messages_reorderStickerSets.md +++ b/docs/API_docs/methods/messages_reorderStickerSets.md @@ -24,13 +24,10 @@ description: messages.reorderStickerSets parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/docs/API_docs/methods/messages_reportEncryptedSpam.md b/docs/API_docs/methods/messages_reportEncryptedSpam.md index 30ef3473..aed7a891 100644 --- a/docs/API_docs/methods/messages_reportEncryptedSpam.md +++ b/docs/API_docs/methods/messages_reportEncryptedSpam.md @@ -30,13 +30,10 @@ description: messages.reportEncryptedSpam parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/docs/API_docs/methods/messages_reportSpam.md b/docs/API_docs/methods/messages_reportSpam.md index bfadb9ab..08c96d44 100644 --- a/docs/API_docs/methods/messages_reportSpam.md +++ b/docs/API_docs/methods/messages_reportSpam.md @@ -30,13 +30,10 @@ description: messages.reportSpam parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/docs/API_docs/methods/messages_saveDraft.md b/docs/API_docs/methods/messages_saveDraft.md index 42308b46..f68090c0 100644 --- a/docs/API_docs/methods/messages_saveDraft.md +++ b/docs/API_docs/methods/messages_saveDraft.md @@ -35,13 +35,10 @@ description: messages.saveDraft parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/docs/API_docs/methods/messages_saveGif.md b/docs/API_docs/methods/messages_saveGif.md index 31e48632..d86d539a 100644 --- a/docs/API_docs/methods/messages_saveGif.md +++ b/docs/API_docs/methods/messages_saveGif.md @@ -31,13 +31,10 @@ description: messages.saveGif parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/docs/API_docs/methods/messages_saveRecentSticker.md b/docs/API_docs/methods/messages_saveRecentSticker.md index 8d45be5e..029ca763 100644 --- a/docs/API_docs/methods/messages_saveRecentSticker.md +++ b/docs/API_docs/methods/messages_saveRecentSticker.md @@ -32,13 +32,10 @@ description: messages.saveRecentSticker parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/docs/API_docs/methods/messages_search.md b/docs/API_docs/methods/messages_search.md index 14b02f8f..f3be635d 100644 --- a/docs/API_docs/methods/messages_search.md +++ b/docs/API_docs/methods/messages_search.md @@ -46,13 +46,10 @@ description: messages.search parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/docs/API_docs/methods/messages_searchGifs.md b/docs/API_docs/methods/messages_searchGifs.md index 3f4c4838..dd804c99 100644 --- a/docs/API_docs/methods/messages_searchGifs.md +++ b/docs/API_docs/methods/messages_searchGifs.md @@ -31,13 +31,10 @@ description: messages.searchGifs parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/docs/API_docs/methods/messages_searchGlobal.md b/docs/API_docs/methods/messages_searchGlobal.md index 0553dd7a..4b45eed2 100644 --- a/docs/API_docs/methods/messages_searchGlobal.md +++ b/docs/API_docs/methods/messages_searchGlobal.md @@ -34,13 +34,10 @@ description: messages.searchGlobal parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/docs/API_docs/methods/messages_sendEncrypted.md b/docs/API_docs/methods/messages_sendEncrypted.md index 82eeec92..ba9f796b 100644 --- a/docs/API_docs/methods/messages_sendEncrypted.md +++ b/docs/API_docs/methods/messages_sendEncrypted.md @@ -34,16 +34,13 @@ description: messages.sendEncrypted parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/docs/API_docs/methods/messages_sendEncryptedFile.md b/docs/API_docs/methods/messages_sendEncryptedFile.md index 8f7a73d9..db16bf2d 100644 --- a/docs/API_docs/methods/messages_sendEncryptedFile.md +++ b/docs/API_docs/methods/messages_sendEncryptedFile.md @@ -32,16 +32,13 @@ description: messages.sendEncryptedFile parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/docs/API_docs/methods/messages_sendEncryptedService.md b/docs/API_docs/methods/messages_sendEncryptedService.md index d427f6c3..fd4e2627 100644 --- a/docs/API_docs/methods/messages_sendEncryptedService.md +++ b/docs/API_docs/methods/messages_sendEncryptedService.md @@ -34,16 +34,13 @@ description: messages.sendEncryptedService parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/docs/API_docs/methods/messages_sendInlineBotResult.md b/docs/API_docs/methods/messages_sendInlineBotResult.md index 6aeeb67d..d974fe69 100644 --- a/docs/API_docs/methods/messages_sendInlineBotResult.md +++ b/docs/API_docs/methods/messages_sendInlineBotResult.md @@ -39,13 +39,10 @@ description: messages.sendInlineBotResult parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/docs/API_docs/methods/messages_sendMedia.md b/docs/API_docs/methods/messages_sendMedia.md index b3ceb5d4..b58bf325 100644 --- a/docs/API_docs/methods/messages_sendMedia.md +++ b/docs/API_docs/methods/messages_sendMedia.md @@ -59,16 +59,13 @@ description: messages.sendMedia parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/docs/API_docs/methods/messages_sendMessage.md b/docs/API_docs/methods/messages_sendMessage.md index 60b50412..3a515129 100644 --- a/docs/API_docs/methods/messages_sendMessage.md +++ b/docs/API_docs/methods/messages_sendMessage.md @@ -58,16 +58,13 @@ description: messages.sendMessage parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/docs/API_docs/methods/messages_sendMultiMedia.md b/docs/API_docs/methods/messages_sendMultiMedia.md index 2a8ad349..305b24e7 100644 --- a/docs/API_docs/methods/messages_sendMultiMedia.md +++ b/docs/API_docs/methods/messages_sendMultiMedia.md @@ -28,16 +28,13 @@ description: messages.sendMultiMedia parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/docs/API_docs/methods/messages_sendScreenshotNotification.md b/docs/API_docs/methods/messages_sendScreenshotNotification.md index a725a12b..890224e8 100644 --- a/docs/API_docs/methods/messages_sendScreenshotNotification.md +++ b/docs/API_docs/methods/messages_sendScreenshotNotification.md @@ -31,13 +31,10 @@ description: messages.sendScreenshotNotification parameters, return type and exa ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/docs/API_docs/methods/messages_setBotCallbackAnswer.md b/docs/API_docs/methods/messages_setBotCallbackAnswer.md index 2c51854f..2901a558 100644 --- a/docs/API_docs/methods/messages_setBotCallbackAnswer.md +++ b/docs/API_docs/methods/messages_setBotCallbackAnswer.md @@ -34,16 +34,13 @@ description: messages.setBotCallbackAnswer parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/docs/API_docs/methods/messages_setBotPrecheckoutResults.md b/docs/API_docs/methods/messages_setBotPrecheckoutResults.md index 25ed5ed5..5666e9ff 100644 --- a/docs/API_docs/methods/messages_setBotPrecheckoutResults.md +++ b/docs/API_docs/methods/messages_setBotPrecheckoutResults.md @@ -32,16 +32,13 @@ description: messages.setBotPrecheckoutResults parameters, return type and examp ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/docs/API_docs/methods/messages_setBotShippingResults.md b/docs/API_docs/methods/messages_setBotShippingResults.md index 49ac2896..95376b64 100644 --- a/docs/API_docs/methods/messages_setBotShippingResults.md +++ b/docs/API_docs/methods/messages_setBotShippingResults.md @@ -32,16 +32,13 @@ description: messages.setBotShippingResults parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/docs/API_docs/methods/messages_setEncryptedTyping.md b/docs/API_docs/methods/messages_setEncryptedTyping.md index a05b94dd..aeae6ff7 100644 --- a/docs/API_docs/methods/messages_setEncryptedTyping.md +++ b/docs/API_docs/methods/messages_setEncryptedTyping.md @@ -31,13 +31,10 @@ description: messages.setEncryptedTyping parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/docs/API_docs/methods/messages_setGameScore.md b/docs/API_docs/methods/messages_setGameScore.md index 3137f7c9..c8ef5c49 100644 --- a/docs/API_docs/methods/messages_setGameScore.md +++ b/docs/API_docs/methods/messages_setGameScore.md @@ -36,16 +36,13 @@ description: messages.setGameScore parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/docs/API_docs/methods/messages_setInlineBotResults.md b/docs/API_docs/methods/messages_setInlineBotResults.md index 8b5625f3..8b49c4c7 100644 --- a/docs/API_docs/methods/messages_setInlineBotResults.md +++ b/docs/API_docs/methods/messages_setInlineBotResults.md @@ -46,16 +46,13 @@ description: messages.setInlineBotResults parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/docs/API_docs/methods/messages_setInlineGameScore.md b/docs/API_docs/methods/messages_setInlineGameScore.md index 36752f35..4c43e7d2 100644 --- a/docs/API_docs/methods/messages_setInlineGameScore.md +++ b/docs/API_docs/methods/messages_setInlineGameScore.md @@ -35,16 +35,13 @@ description: messages.setInlineGameScore parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/docs/API_docs/methods/messages_setTyping.md b/docs/API_docs/methods/messages_setTyping.md index 9ef8caf5..f6b7b7b5 100644 --- a/docs/API_docs/methods/messages_setTyping.md +++ b/docs/API_docs/methods/messages_setTyping.md @@ -37,16 +37,13 @@ description: messages.setTyping parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/docs/API_docs/methods/messages_startBot.md b/docs/API_docs/methods/messages_startBot.md index 8d98e390..b33ab013 100644 --- a/docs/API_docs/methods/messages_startBot.md +++ b/docs/API_docs/methods/messages_startBot.md @@ -35,13 +35,10 @@ description: messages.startBot parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/docs/API_docs/methods/messages_toggleChatAdmins.md b/docs/API_docs/methods/messages_toggleChatAdmins.md index 3bf8a419..97328065 100644 --- a/docs/API_docs/methods/messages_toggleChatAdmins.md +++ b/docs/API_docs/methods/messages_toggleChatAdmins.md @@ -32,13 +32,10 @@ description: messages.toggleChatAdmins parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/docs/API_docs/methods/messages_toggleDialogPin.md b/docs/API_docs/methods/messages_toggleDialogPin.md index f35f2f40..7853df5e 100644 --- a/docs/API_docs/methods/messages_toggleDialogPin.md +++ b/docs/API_docs/methods/messages_toggleDialogPin.md @@ -31,13 +31,10 @@ description: messages.toggleDialogPin parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/docs/API_docs/methods/messages_uninstallStickerSet.md b/docs/API_docs/methods/messages_uninstallStickerSet.md index 6763e64f..76a3e3e2 100644 --- a/docs/API_docs/methods/messages_uninstallStickerSet.md +++ b/docs/API_docs/methods/messages_uninstallStickerSet.md @@ -30,13 +30,10 @@ description: messages.uninstallStickerSet parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/docs/API_docs/methods/messages_uploadEncryptedFile.md b/docs/API_docs/methods/messages_uploadEncryptedFile.md index 0706446d..276eb820 100644 --- a/docs/API_docs/methods/messages_uploadEncryptedFile.md +++ b/docs/API_docs/methods/messages_uploadEncryptedFile.md @@ -24,16 +24,13 @@ description: messages.uploadEncryptedFile parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/docs/API_docs/methods/messages_uploadMedia.md b/docs/API_docs/methods/messages_uploadMedia.md index 03f07c26..d4b5ee7d 100644 --- a/docs/API_docs/methods/messages_uploadMedia.md +++ b/docs/API_docs/methods/messages_uploadMedia.md @@ -33,16 +33,13 @@ description: messages.uploadMedia parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/docs/API_docs/methods/payments_clearSavedInfo.md b/docs/API_docs/methods/payments_clearSavedInfo.md index a77c50d9..fb9bae07 100644 --- a/docs/API_docs/methods/payments_clearSavedInfo.md +++ b/docs/API_docs/methods/payments_clearSavedInfo.md @@ -24,13 +24,10 @@ description: payments.clearSavedInfo parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/docs/API_docs/methods/payments_getPaymentForm.md b/docs/API_docs/methods/payments_getPaymentForm.md index 15f6e26b..141c47f2 100644 --- a/docs/API_docs/methods/payments_getPaymentForm.md +++ b/docs/API_docs/methods/payments_getPaymentForm.md @@ -30,13 +30,10 @@ description: payments.getPaymentForm parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/docs/API_docs/methods/payments_getPaymentReceipt.md b/docs/API_docs/methods/payments_getPaymentReceipt.md index 51433563..f6aa1ab6 100644 --- a/docs/API_docs/methods/payments_getPaymentReceipt.md +++ b/docs/API_docs/methods/payments_getPaymentReceipt.md @@ -30,13 +30,10 @@ description: payments.getPaymentReceipt parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/docs/API_docs/methods/payments_getSavedInfo.md b/docs/API_docs/methods/payments_getSavedInfo.md index a586dcd9..4104679a 100644 --- a/docs/API_docs/methods/payments_getSavedInfo.md +++ b/docs/API_docs/methods/payments_getSavedInfo.md @@ -18,13 +18,10 @@ description: payments.getSavedInfo parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/docs/API_docs/methods/payments_sendPaymentForm.md b/docs/API_docs/methods/payments_sendPaymentForm.md index a63a3980..180a7279 100644 --- a/docs/API_docs/methods/payments_sendPaymentForm.md +++ b/docs/API_docs/methods/payments_sendPaymentForm.md @@ -33,13 +33,10 @@ description: payments.sendPaymentForm parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/docs/API_docs/methods/payments_validateRequestedInfo.md b/docs/API_docs/methods/payments_validateRequestedInfo.md index d839a2df..acfd1852 100644 --- a/docs/API_docs/methods/payments_validateRequestedInfo.md +++ b/docs/API_docs/methods/payments_validateRequestedInfo.md @@ -32,13 +32,10 @@ description: payments.validateRequestedInfo parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/docs/API_docs/methods/phone_getCallConfig.md b/docs/API_docs/methods/phone_getCallConfig.md index a85fed0e..3f18d7ca 100644 --- a/docs/API_docs/methods/phone_getCallConfig.md +++ b/docs/API_docs/methods/phone_getCallConfig.md @@ -18,13 +18,10 @@ description: phone.getCallConfig parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/docs/API_docs/methods/phone_receivedCall.md b/docs/API_docs/methods/phone_receivedCall.md index 9d59b1ea..8ca6a4e1 100644 --- a/docs/API_docs/methods/phone_receivedCall.md +++ b/docs/API_docs/methods/phone_receivedCall.md @@ -31,13 +31,10 @@ description: phone.receivedCall parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/docs/API_docs/methods/phone_saveCallDebug.md b/docs/API_docs/methods/phone_saveCallDebug.md index 4dee5c97..ea3fa2d7 100644 --- a/docs/API_docs/methods/phone_saveCallDebug.md +++ b/docs/API_docs/methods/phone_saveCallDebug.md @@ -32,13 +32,10 @@ description: phone.saveCallDebug parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/docs/API_docs/methods/phone_setCallRating.md b/docs/API_docs/methods/phone_setCallRating.md index fea236d1..c6e5d7fa 100644 --- a/docs/API_docs/methods/phone_setCallRating.md +++ b/docs/API_docs/methods/phone_setCallRating.md @@ -32,13 +32,10 @@ description: phone.setCallRating parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/docs/API_docs/methods/photos_deletePhotos.md b/docs/API_docs/methods/photos_deletePhotos.md index e9cd459d..61768b1e 100644 --- a/docs/API_docs/methods/photos_deletePhotos.md +++ b/docs/API_docs/methods/photos_deletePhotos.md @@ -23,13 +23,10 @@ description: photos.deletePhotos parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/docs/API_docs/methods/photos_getUserPhotos.md b/docs/API_docs/methods/photos_getUserPhotos.md index d6c2a380..095363e7 100644 --- a/docs/API_docs/methods/photos_getUserPhotos.md +++ b/docs/API_docs/methods/photos_getUserPhotos.md @@ -34,16 +34,13 @@ description: photos.getUserPhotos parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/docs/API_docs/methods/photos_updateProfilePhoto.md b/docs/API_docs/methods/photos_updateProfilePhoto.md index ea3b78ec..d90aca22 100644 --- a/docs/API_docs/methods/photos_updateProfilePhoto.md +++ b/docs/API_docs/methods/photos_updateProfilePhoto.md @@ -23,13 +23,10 @@ description: photos.updateProfilePhoto parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/docs/API_docs/methods/photos_uploadProfilePhoto.md b/docs/API_docs/methods/photos_uploadProfilePhoto.md index 58541f23..987e721c 100644 --- a/docs/API_docs/methods/photos_uploadProfilePhoto.md +++ b/docs/API_docs/methods/photos_uploadProfilePhoto.md @@ -34,13 +34,10 @@ description: photos.uploadProfilePhoto parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/docs/API_docs/methods/stickers_addStickerToSet.md b/docs/API_docs/methods/stickers_addStickerToSet.md index bf62fa09..581eb1f1 100644 --- a/docs/API_docs/methods/stickers_addStickerToSet.md +++ b/docs/API_docs/methods/stickers_addStickerToSet.md @@ -32,16 +32,13 @@ description: stickers.addStickerToSet parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/docs/API_docs/methods/stickers_changeStickerPosition.md b/docs/API_docs/methods/stickers_changeStickerPosition.md index 942d3a33..391ee3d3 100644 --- a/docs/API_docs/methods/stickers_changeStickerPosition.md +++ b/docs/API_docs/methods/stickers_changeStickerPosition.md @@ -32,16 +32,13 @@ description: stickers.changeStickerPosition parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/docs/API_docs/methods/stickers_createStickerSet.md b/docs/API_docs/methods/stickers_createStickerSet.md index 7c5b6821..64a5a978 100644 --- a/docs/API_docs/methods/stickers_createStickerSet.md +++ b/docs/API_docs/methods/stickers_createStickerSet.md @@ -42,16 +42,13 @@ description: stickers.createStickerSet parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/docs/API_docs/methods/stickers_removeStickerFromSet.md b/docs/API_docs/methods/stickers_removeStickerFromSet.md index 51e52f95..68c2305f 100644 --- a/docs/API_docs/methods/stickers_removeStickerFromSet.md +++ b/docs/API_docs/methods/stickers_removeStickerFromSet.md @@ -31,16 +31,13 @@ description: stickers.removeStickerFromSet parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/docs/API_docs/methods/upload_getWebFile.md b/docs/API_docs/methods/upload_getWebFile.md index ec7c05b4..8744dac5 100644 --- a/docs/API_docs/methods/upload_getWebFile.md +++ b/docs/API_docs/methods/upload_getWebFile.md @@ -32,13 +32,10 @@ description: upload.getWebFile parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/docs/API_docs/methods/users_getUsers.md b/docs/API_docs/methods/users_getUsers.md index 6a44d258..3a981d57 100644 --- a/docs/API_docs/methods/users_getUsers.md +++ b/docs/API_docs/methods/users_getUsers.md @@ -33,16 +33,13 @@ description: users.getUsers parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/docs/MTProto_docs/methods/destroy_session.md b/docs/MTProto_docs/methods/destroy_session.md index 0b732694..39aa2c6e 100644 --- a/docs/MTProto_docs/methods/destroy_session.md +++ b/docs/MTProto_docs/methods/destroy_session.md @@ -23,16 +23,13 @@ description: destroy_session parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/docs/MTProto_docs/methods/get_future_salts.md b/docs/MTProto_docs/methods/get_future_salts.md index d3b306ce..fedf036c 100644 --- a/docs/MTProto_docs/methods/get_future_salts.md +++ b/docs/MTProto_docs/methods/get_future_salts.md @@ -23,16 +23,13 @@ description: get_future_salts parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/docs/MTProto_docs/methods/http_wait.md b/docs/MTProto_docs/methods/http_wait.md index 179a96e0..71d84d6b 100644 --- a/docs/MTProto_docs/methods/http_wait.md +++ b/docs/MTProto_docs/methods/http_wait.md @@ -25,16 +25,13 @@ description: http_wait parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/docs/MTProto_docs/methods/ping.md b/docs/MTProto_docs/methods/ping.md index 5bfe9dde..7c20ca86 100644 --- a/docs/MTProto_docs/methods/ping.md +++ b/docs/MTProto_docs/methods/ping.md @@ -23,16 +23,13 @@ description: ping parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/docs/MTProto_docs/methods/ping_delay_disconnect.md b/docs/MTProto_docs/methods/ping_delay_disconnect.md index b4b1e265..e8b62005 100644 --- a/docs/MTProto_docs/methods/ping_delay_disconnect.md +++ b/docs/MTProto_docs/methods/ping_delay_disconnect.md @@ -24,16 +24,13 @@ description: ping_delay_disconnect parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/docs/MTProto_docs/methods/req_DH_params.md b/docs/MTProto_docs/methods/req_DH_params.md index 34bc4846..9a1a9f81 100644 --- a/docs/MTProto_docs/methods/req_DH_params.md +++ b/docs/MTProto_docs/methods/req_DH_params.md @@ -28,16 +28,13 @@ description: req_DH_params parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/docs/MTProto_docs/methods/req_pq.md b/docs/MTProto_docs/methods/req_pq.md index 2f005ce2..7a583643 100644 --- a/docs/MTProto_docs/methods/req_pq.md +++ b/docs/MTProto_docs/methods/req_pq.md @@ -23,16 +23,13 @@ description: req_pq parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/docs/MTProto_docs/methods/rpc_drop_answer.md b/docs/MTProto_docs/methods/rpc_drop_answer.md index 48e894a9..e15ddca9 100644 --- a/docs/MTProto_docs/methods/rpc_drop_answer.md +++ b/docs/MTProto_docs/methods/rpc_drop_answer.md @@ -23,16 +23,13 @@ description: rpc_drop_answer parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/docs/MTProto_docs/methods/set_client_DH_params.md b/docs/MTProto_docs/methods/set_client_DH_params.md index e0a02dc2..74313ea0 100644 --- a/docs/MTProto_docs/methods/set_client_DH_params.md +++ b/docs/MTProto_docs/methods/set_client_DH_params.md @@ -25,16 +25,13 @@ description: set_client_DH_params parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v18/methods/account_checkUsername.md b/old_docs/API_docs_v18/methods/account_checkUsername.md index afc59b6c..40cf822f 100644 --- a/old_docs/API_docs_v18/methods/account_checkUsername.md +++ b/old_docs/API_docs_v18/methods/account_checkUsername.md @@ -30,13 +30,10 @@ description: account.checkUsername parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v18/methods/account_getNotifySettings.md b/old_docs/API_docs_v18/methods/account_getNotifySettings.md index 8ee710d8..a48eed2f 100644 --- a/old_docs/API_docs_v18/methods/account_getNotifySettings.md +++ b/old_docs/API_docs_v18/methods/account_getNotifySettings.md @@ -30,13 +30,10 @@ description: account.getNotifySettings parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v18/methods/account_getWallPapers.md b/old_docs/API_docs_v18/methods/account_getWallPapers.md index 88c8a701..a71543d0 100644 --- a/old_docs/API_docs_v18/methods/account_getWallPapers.md +++ b/old_docs/API_docs_v18/methods/account_getWallPapers.md @@ -18,13 +18,10 @@ description: account.getWallPapers parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v18/methods/account_registerDevice.md b/old_docs/API_docs_v18/methods/account_registerDevice.md index ab7ec933..cfa1546c 100644 --- a/old_docs/API_docs_v18/methods/account_registerDevice.md +++ b/old_docs/API_docs_v18/methods/account_registerDevice.md @@ -36,13 +36,10 @@ description: account.registerDevice parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v18/methods/account_resetNotifySettings.md b/old_docs/API_docs_v18/methods/account_resetNotifySettings.md index 155ede68..92db4f4f 100644 --- a/old_docs/API_docs_v18/methods/account_resetNotifySettings.md +++ b/old_docs/API_docs_v18/methods/account_resetNotifySettings.md @@ -18,13 +18,10 @@ description: account.resetNotifySettings parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v18/methods/account_unregisterDevice.md b/old_docs/API_docs_v18/methods/account_unregisterDevice.md index 41899b6e..283ec7d2 100644 --- a/old_docs/API_docs_v18/methods/account_unregisterDevice.md +++ b/old_docs/API_docs_v18/methods/account_unregisterDevice.md @@ -31,13 +31,10 @@ description: account.unregisterDevice parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v18/methods/account_updateNotifySettings.md b/old_docs/API_docs_v18/methods/account_updateNotifySettings.md index 8389b5c2..fb096250 100644 --- a/old_docs/API_docs_v18/methods/account_updateNotifySettings.md +++ b/old_docs/API_docs_v18/methods/account_updateNotifySettings.md @@ -31,13 +31,10 @@ description: account.updateNotifySettings parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v18/methods/account_updateProfile.md b/old_docs/API_docs_v18/methods/account_updateProfile.md index c8712074..123ed13a 100644 --- a/old_docs/API_docs_v18/methods/account_updateProfile.md +++ b/old_docs/API_docs_v18/methods/account_updateProfile.md @@ -32,13 +32,10 @@ description: account.updateProfile parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v18/methods/account_updateStatus.md b/old_docs/API_docs_v18/methods/account_updateStatus.md index 7204e582..c8fa0a79 100644 --- a/old_docs/API_docs_v18/methods/account_updateStatus.md +++ b/old_docs/API_docs_v18/methods/account_updateStatus.md @@ -30,13 +30,10 @@ description: account.updateStatus parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v18/methods/account_updateUsername.md b/old_docs/API_docs_v18/methods/account_updateUsername.md index 22be2fd4..2b7576a5 100644 --- a/old_docs/API_docs_v18/methods/account_updateUsername.md +++ b/old_docs/API_docs_v18/methods/account_updateUsername.md @@ -32,13 +32,10 @@ description: account.updateUsername parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v18/methods/auth_bindTempAuthKey.md b/old_docs/API_docs_v18/methods/auth_bindTempAuthKey.md index e3d72dd5..7419abb0 100644 --- a/old_docs/API_docs_v18/methods/auth_bindTempAuthKey.md +++ b/old_docs/API_docs_v18/methods/auth_bindTempAuthKey.md @@ -35,16 +35,13 @@ description: auth.bindTempAuthKey parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v18/methods/auth_checkPhone.md b/old_docs/API_docs_v18/methods/auth_checkPhone.md index 3455904d..f6cac2e6 100644 --- a/old_docs/API_docs_v18/methods/auth_checkPhone.md +++ b/old_docs/API_docs_v18/methods/auth_checkPhone.md @@ -32,13 +32,10 @@ description: auth.checkPhone parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v18/methods/auth_exportAuthorization.md b/old_docs/API_docs_v18/methods/auth_exportAuthorization.md index 44c45b70..cbc8203b 100644 --- a/old_docs/API_docs_v18/methods/auth_exportAuthorization.md +++ b/old_docs/API_docs_v18/methods/auth_exportAuthorization.md @@ -30,16 +30,13 @@ description: auth.exportAuthorization parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v18/methods/auth_importAuthorization.md b/old_docs/API_docs_v18/methods/auth_importAuthorization.md index e0fd534f..22166510 100644 --- a/old_docs/API_docs_v18/methods/auth_importAuthorization.md +++ b/old_docs/API_docs_v18/methods/auth_importAuthorization.md @@ -32,16 +32,13 @@ description: auth.importAuthorization parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v18/methods/auth_resetAuthorizations.md b/old_docs/API_docs_v18/methods/auth_resetAuthorizations.md index 87a39a22..fe297fa7 100644 --- a/old_docs/API_docs_v18/methods/auth_resetAuthorizations.md +++ b/old_docs/API_docs_v18/methods/auth_resetAuthorizations.md @@ -25,13 +25,10 @@ description: auth.resetAuthorizations parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v18/methods/auth_sendCall.md b/old_docs/API_docs_v18/methods/auth_sendCall.md index 00eaff4e..386cfad4 100644 --- a/old_docs/API_docs_v18/methods/auth_sendCall.md +++ b/old_docs/API_docs_v18/methods/auth_sendCall.md @@ -24,16 +24,13 @@ description: auth.sendCall parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v18/methods/auth_sendInvites.md b/old_docs/API_docs_v18/methods/auth_sendInvites.md index 604fc65d..ad9636c5 100644 --- a/old_docs/API_docs_v18/methods/auth_sendInvites.md +++ b/old_docs/API_docs_v18/methods/auth_sendInvites.md @@ -31,13 +31,10 @@ description: auth.sendInvites parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v18/methods/auth_sendSms.md b/old_docs/API_docs_v18/methods/auth_sendSms.md index 6d942e97..9a214e65 100644 --- a/old_docs/API_docs_v18/methods/auth_sendSms.md +++ b/old_docs/API_docs_v18/methods/auth_sendSms.md @@ -24,16 +24,13 @@ description: auth.sendSms parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v18/methods/contacts_block.md b/old_docs/API_docs_v18/methods/contacts_block.md index d9d58e37..1c7cbe26 100644 --- a/old_docs/API_docs_v18/methods/contacts_block.md +++ b/old_docs/API_docs_v18/methods/contacts_block.md @@ -30,13 +30,10 @@ description: contacts.block parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v18/methods/contacts_deleteContact.md b/old_docs/API_docs_v18/methods/contacts_deleteContact.md index cd8c17ad..987a1be0 100644 --- a/old_docs/API_docs_v18/methods/contacts_deleteContact.md +++ b/old_docs/API_docs_v18/methods/contacts_deleteContact.md @@ -30,13 +30,10 @@ description: contacts.deleteContact parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v18/methods/contacts_deleteContacts.md b/old_docs/API_docs_v18/methods/contacts_deleteContacts.md index fc65880d..67a922ed 100644 --- a/old_docs/API_docs_v18/methods/contacts_deleteContacts.md +++ b/old_docs/API_docs_v18/methods/contacts_deleteContacts.md @@ -31,13 +31,10 @@ description: contacts.deleteContacts parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v18/methods/contacts_exportCard.md b/old_docs/API_docs_v18/methods/contacts_exportCard.md index 63508076..bf6d1f9f 100644 --- a/old_docs/API_docs_v18/methods/contacts_exportCard.md +++ b/old_docs/API_docs_v18/methods/contacts_exportCard.md @@ -18,13 +18,10 @@ description: contacts.exportCard parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v18/methods/contacts_getBlocked.md b/old_docs/API_docs_v18/methods/contacts_getBlocked.md index f50792b4..faa719da 100644 --- a/old_docs/API_docs_v18/methods/contacts_getBlocked.md +++ b/old_docs/API_docs_v18/methods/contacts_getBlocked.md @@ -24,13 +24,10 @@ description: contacts.getBlocked parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v18/methods/contacts_getContacts.md b/old_docs/API_docs_v18/methods/contacts_getContacts.md index 71313bf2..a6779111 100644 --- a/old_docs/API_docs_v18/methods/contacts_getContacts.md +++ b/old_docs/API_docs_v18/methods/contacts_getContacts.md @@ -23,13 +23,10 @@ description: contacts.getContacts parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v18/methods/contacts_getStatuses.md b/old_docs/API_docs_v18/methods/contacts_getStatuses.md index d914e08d..9bb7f263 100644 --- a/old_docs/API_docs_v18/methods/contacts_getStatuses.md +++ b/old_docs/API_docs_v18/methods/contacts_getStatuses.md @@ -18,13 +18,10 @@ description: contacts.getStatuses parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v18/methods/contacts_getSuggested.md b/old_docs/API_docs_v18/methods/contacts_getSuggested.md index a29f4aff..2059c01b 100644 --- a/old_docs/API_docs_v18/methods/contacts_getSuggested.md +++ b/old_docs/API_docs_v18/methods/contacts_getSuggested.md @@ -23,16 +23,13 @@ description: contacts.getSuggested parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v18/methods/contacts_importCard.md b/old_docs/API_docs_v18/methods/contacts_importCard.md index a6abf56d..7a2f34e1 100644 --- a/old_docs/API_docs_v18/methods/contacts_importCard.md +++ b/old_docs/API_docs_v18/methods/contacts_importCard.md @@ -31,13 +31,10 @@ description: contacts.importCard parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v18/methods/contacts_importContacts.md b/old_docs/API_docs_v18/methods/contacts_importContacts.md index db2051ac..2f070493 100644 --- a/old_docs/API_docs_v18/methods/contacts_importContacts.md +++ b/old_docs/API_docs_v18/methods/contacts_importContacts.md @@ -24,13 +24,10 @@ description: contacts.importContacts parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v18/methods/contacts_search.md b/old_docs/API_docs_v18/methods/contacts_search.md index 0203b160..70a0635e 100644 --- a/old_docs/API_docs_v18/methods/contacts_search.md +++ b/old_docs/API_docs_v18/methods/contacts_search.md @@ -33,13 +33,10 @@ description: contacts.search parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v18/methods/contacts_unblock.md b/old_docs/API_docs_v18/methods/contacts_unblock.md index a1977c24..9c01e42a 100644 --- a/old_docs/API_docs_v18/methods/contacts_unblock.md +++ b/old_docs/API_docs_v18/methods/contacts_unblock.md @@ -30,13 +30,10 @@ description: contacts.unblock parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v18/methods/help_getAppUpdate.md b/old_docs/API_docs_v18/methods/help_getAppUpdate.md index c8e67402..7b3bdde9 100644 --- a/old_docs/API_docs_v18/methods/help_getAppUpdate.md +++ b/old_docs/API_docs_v18/methods/help_getAppUpdate.md @@ -26,13 +26,10 @@ description: help.getAppUpdate parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v18/methods/help_getConfig.md b/old_docs/API_docs_v18/methods/help_getConfig.md index e3648b5a..bb51b362 100644 --- a/old_docs/API_docs_v18/methods/help_getConfig.md +++ b/old_docs/API_docs_v18/methods/help_getConfig.md @@ -25,16 +25,13 @@ description: help.getConfig parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v18/methods/help_getInviteText.md b/old_docs/API_docs_v18/methods/help_getInviteText.md index 348de85d..40251dd5 100644 --- a/old_docs/API_docs_v18/methods/help_getInviteText.md +++ b/old_docs/API_docs_v18/methods/help_getInviteText.md @@ -23,13 +23,10 @@ description: help.getInviteText parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v18/methods/help_getNearestDc.md b/old_docs/API_docs_v18/methods/help_getNearestDc.md index c6f5c555..6d8ed3f7 100644 --- a/old_docs/API_docs_v18/methods/help_getNearestDc.md +++ b/old_docs/API_docs_v18/methods/help_getNearestDc.md @@ -18,13 +18,10 @@ description: help.getNearestDc parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v18/methods/help_getSupport.md b/old_docs/API_docs_v18/methods/help_getSupport.md index 209edf03..ca8db03c 100644 --- a/old_docs/API_docs_v18/methods/help_getSupport.md +++ b/old_docs/API_docs_v18/methods/help_getSupport.md @@ -18,13 +18,10 @@ description: help.getSupport parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v18/methods/help_saveAppLog.md b/old_docs/API_docs_v18/methods/help_saveAppLog.md index 4f06434c..741b9aa1 100644 --- a/old_docs/API_docs_v18/methods/help_saveAppLog.md +++ b/old_docs/API_docs_v18/methods/help_saveAppLog.md @@ -23,13 +23,10 @@ description: help.saveAppLog parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v18/methods/initConnection.md b/old_docs/API_docs_v18/methods/initConnection.md index 0d22a1cb..c0307677 100644 --- a/old_docs/API_docs_v18/methods/initConnection.md +++ b/old_docs/API_docs_v18/methods/initConnection.md @@ -36,16 +36,13 @@ description: initConnection parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v18/methods/invokeAfterMsg.md b/old_docs/API_docs_v18/methods/invokeAfterMsg.md index c139fe8c..a382429e 100644 --- a/old_docs/API_docs_v18/methods/invokeAfterMsg.md +++ b/old_docs/API_docs_v18/methods/invokeAfterMsg.md @@ -24,16 +24,13 @@ description: invokeAfterMsg parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v18/methods/invokeAfterMsgs.md b/old_docs/API_docs_v18/methods/invokeAfterMsgs.md index 35004296..169eedaf 100644 --- a/old_docs/API_docs_v18/methods/invokeAfterMsgs.md +++ b/old_docs/API_docs_v18/methods/invokeAfterMsgs.md @@ -24,16 +24,13 @@ description: invokeAfterMsgs parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v18/methods/invokeWithLayer18.md b/old_docs/API_docs_v18/methods/invokeWithLayer18.md index 1002a31d..c1a0c822 100644 --- a/old_docs/API_docs_v18/methods/invokeWithLayer18.md +++ b/old_docs/API_docs_v18/methods/invokeWithLayer18.md @@ -23,16 +23,13 @@ description: invokeWithLayer18 parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v18/methods/messages_addChatUser.md b/old_docs/API_docs_v18/methods/messages_addChatUser.md index 6b3051fa..01af0dca 100644 --- a/old_docs/API_docs_v18/methods/messages_addChatUser.md +++ b/old_docs/API_docs_v18/methods/messages_addChatUser.md @@ -40,13 +40,10 @@ description: messages.addChatUser parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v18/methods/messages_createChat.md b/old_docs/API_docs_v18/methods/messages_createChat.md index ce47d105..82527c2a 100644 --- a/old_docs/API_docs_v18/methods/messages_createChat.md +++ b/old_docs/API_docs_v18/methods/messages_createChat.md @@ -32,13 +32,10 @@ description: messages.createChat parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v18/methods/messages_deleteChatUser.md b/old_docs/API_docs_v18/methods/messages_deleteChatUser.md index 83eae12f..ec77d8b8 100644 --- a/old_docs/API_docs_v18/methods/messages_deleteChatUser.md +++ b/old_docs/API_docs_v18/methods/messages_deleteChatUser.md @@ -33,16 +33,13 @@ description: messages.deleteChatUser parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v18/methods/messages_deleteHistory.md b/old_docs/API_docs_v18/methods/messages_deleteHistory.md index b7a9417d..79b6c995 100644 --- a/old_docs/API_docs_v18/methods/messages_deleteHistory.md +++ b/old_docs/API_docs_v18/methods/messages_deleteHistory.md @@ -31,13 +31,10 @@ description: messages.deleteHistory parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v18/methods/messages_deleteMessages.md b/old_docs/API_docs_v18/methods/messages_deleteMessages.md index ae8ed6b1..a29c71e7 100644 --- a/old_docs/API_docs_v18/methods/messages_deleteMessages.md +++ b/old_docs/API_docs_v18/methods/messages_deleteMessages.md @@ -30,16 +30,13 @@ description: messages.deleteMessages parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v18/methods/messages_editChatPhoto.md b/old_docs/API_docs_v18/methods/messages_editChatPhoto.md index 1928f1cf..a0927f8e 100644 --- a/old_docs/API_docs_v18/methods/messages_editChatPhoto.md +++ b/old_docs/API_docs_v18/methods/messages_editChatPhoto.md @@ -35,16 +35,13 @@ description: messages.editChatPhoto parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v18/methods/messages_editChatTitle.md b/old_docs/API_docs_v18/methods/messages_editChatTitle.md index 25fd0467..ab795d48 100644 --- a/old_docs/API_docs_v18/methods/messages_editChatTitle.md +++ b/old_docs/API_docs_v18/methods/messages_editChatTitle.md @@ -32,16 +32,13 @@ description: messages.editChatTitle parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v18/methods/messages_forwardMessage.md b/old_docs/API_docs_v18/methods/messages_forwardMessage.md index 21015bd7..79ef7e5d 100644 --- a/old_docs/API_docs_v18/methods/messages_forwardMessage.md +++ b/old_docs/API_docs_v18/methods/messages_forwardMessage.md @@ -34,16 +34,13 @@ description: messages.forwardMessage parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v18/methods/messages_forwardMessages.md b/old_docs/API_docs_v18/methods/messages_forwardMessages.md index 8a8845c3..125172e9 100644 --- a/old_docs/API_docs_v18/methods/messages_forwardMessages.md +++ b/old_docs/API_docs_v18/methods/messages_forwardMessages.md @@ -52,16 +52,13 @@ description: messages.forwardMessages parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v18/methods/messages_getChats.md b/old_docs/API_docs_v18/methods/messages_getChats.md index 6fa30cbd..c322613d 100644 --- a/old_docs/API_docs_v18/methods/messages_getChats.md +++ b/old_docs/API_docs_v18/methods/messages_getChats.md @@ -31,16 +31,13 @@ description: messages.getChats parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v18/methods/messages_getDhConfig.md b/old_docs/API_docs_v18/methods/messages_getDhConfig.md index aac3354d..f97684d2 100644 --- a/old_docs/API_docs_v18/methods/messages_getDhConfig.md +++ b/old_docs/API_docs_v18/methods/messages_getDhConfig.md @@ -31,13 +31,10 @@ description: messages.getDhConfig parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v18/methods/messages_getDialogs.md b/old_docs/API_docs_v18/methods/messages_getDialogs.md index e6ba4b14..6295612b 100644 --- a/old_docs/API_docs_v18/methods/messages_getDialogs.md +++ b/old_docs/API_docs_v18/methods/messages_getDialogs.md @@ -35,13 +35,10 @@ description: messages.getDialogs parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v18/methods/messages_getHistory.md b/old_docs/API_docs_v18/methods/messages_getHistory.md index d06a05a7..a41dac19 100644 --- a/old_docs/API_docs_v18/methods/messages_getHistory.md +++ b/old_docs/API_docs_v18/methods/messages_getHistory.md @@ -38,13 +38,10 @@ description: messages.getHistory parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v18/methods/messages_getMessages.md b/old_docs/API_docs_v18/methods/messages_getMessages.md index 5a970246..787c46dd 100644 --- a/old_docs/API_docs_v18/methods/messages_getMessages.md +++ b/old_docs/API_docs_v18/methods/messages_getMessages.md @@ -23,16 +23,13 @@ description: messages.getMessages parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v18/methods/messages_readEncryptedHistory.md b/old_docs/API_docs_v18/methods/messages_readEncryptedHistory.md index 766ee07d..f38f6b07 100644 --- a/old_docs/API_docs_v18/methods/messages_readEncryptedHistory.md +++ b/old_docs/API_docs_v18/methods/messages_readEncryptedHistory.md @@ -31,16 +31,13 @@ description: messages.readEncryptedHistory parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v18/methods/messages_readHistory.md b/old_docs/API_docs_v18/methods/messages_readHistory.md index fc698ca6..12066526 100644 --- a/old_docs/API_docs_v18/methods/messages_readHistory.md +++ b/old_docs/API_docs_v18/methods/messages_readHistory.md @@ -34,13 +34,10 @@ description: messages.readHistory parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v18/methods/messages_readMessageContents.md b/old_docs/API_docs_v18/methods/messages_readMessageContents.md index 65564259..535d0425 100644 --- a/old_docs/API_docs_v18/methods/messages_readMessageContents.md +++ b/old_docs/API_docs_v18/methods/messages_readMessageContents.md @@ -23,13 +23,10 @@ description: messages.readMessageContents parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v18/methods/messages_receivedMessages.md b/old_docs/API_docs_v18/methods/messages_receivedMessages.md index 82db50eb..bd47c49c 100644 --- a/old_docs/API_docs_v18/methods/messages_receivedMessages.md +++ b/old_docs/API_docs_v18/methods/messages_receivedMessages.md @@ -23,13 +23,10 @@ description: messages.receivedMessages parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v18/methods/messages_receivedQueue.md b/old_docs/API_docs_v18/methods/messages_receivedQueue.md index 3c7f1d4f..38f504b3 100644 --- a/old_docs/API_docs_v18/methods/messages_receivedQueue.md +++ b/old_docs/API_docs_v18/methods/messages_receivedQueue.md @@ -30,16 +30,13 @@ description: messages.receivedQueue parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v18/methods/messages_reportSpam.md b/old_docs/API_docs_v18/methods/messages_reportSpam.md index bfadb9ab..08c96d44 100644 --- a/old_docs/API_docs_v18/methods/messages_reportSpam.md +++ b/old_docs/API_docs_v18/methods/messages_reportSpam.md @@ -30,13 +30,10 @@ description: messages.reportSpam parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v18/methods/messages_search.md b/old_docs/API_docs_v18/methods/messages_search.md index 87073d00..1e809cf2 100644 --- a/old_docs/API_docs_v18/methods/messages_search.md +++ b/old_docs/API_docs_v18/methods/messages_search.md @@ -43,13 +43,10 @@ description: messages.search parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v18/methods/messages_sendBroadcast.md b/old_docs/API_docs_v18/methods/messages_sendBroadcast.md index 5d976ae6..c9b7289b 100644 --- a/old_docs/API_docs_v18/methods/messages_sendBroadcast.md +++ b/old_docs/API_docs_v18/methods/messages_sendBroadcast.md @@ -25,16 +25,13 @@ description: messages.sendBroadcast parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v18/methods/messages_sendEncrypted.md b/old_docs/API_docs_v18/methods/messages_sendEncrypted.md index 82eeec92..ba9f796b 100644 --- a/old_docs/API_docs_v18/methods/messages_sendEncrypted.md +++ b/old_docs/API_docs_v18/methods/messages_sendEncrypted.md @@ -34,16 +34,13 @@ description: messages.sendEncrypted parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v18/methods/messages_sendEncryptedFile.md b/old_docs/API_docs_v18/methods/messages_sendEncryptedFile.md index 8f7a73d9..db16bf2d 100644 --- a/old_docs/API_docs_v18/methods/messages_sendEncryptedFile.md +++ b/old_docs/API_docs_v18/methods/messages_sendEncryptedFile.md @@ -32,16 +32,13 @@ description: messages.sendEncryptedFile parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v18/methods/messages_sendEncryptedService.md b/old_docs/API_docs_v18/methods/messages_sendEncryptedService.md index d427f6c3..fd4e2627 100644 --- a/old_docs/API_docs_v18/methods/messages_sendEncryptedService.md +++ b/old_docs/API_docs_v18/methods/messages_sendEncryptedService.md @@ -34,16 +34,13 @@ description: messages.sendEncryptedService parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v18/methods/messages_sendMedia.md b/old_docs/API_docs_v18/methods/messages_sendMedia.md index 1da82820..f57adcf7 100644 --- a/old_docs/API_docs_v18/methods/messages_sendMedia.md +++ b/old_docs/API_docs_v18/methods/messages_sendMedia.md @@ -54,16 +54,13 @@ description: messages.sendMedia parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v18/methods/messages_sendMessage.md b/old_docs/API_docs_v18/methods/messages_sendMessage.md index d91c6275..41f5332d 100644 --- a/old_docs/API_docs_v18/methods/messages_sendMessage.md +++ b/old_docs/API_docs_v18/methods/messages_sendMessage.md @@ -50,16 +50,13 @@ description: messages.sendMessage parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v18/methods/messages_setEncryptedTyping.md b/old_docs/API_docs_v18/methods/messages_setEncryptedTyping.md index a05b94dd..aeae6ff7 100644 --- a/old_docs/API_docs_v18/methods/messages_setEncryptedTyping.md +++ b/old_docs/API_docs_v18/methods/messages_setEncryptedTyping.md @@ -31,13 +31,10 @@ description: messages.setEncryptedTyping parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v18/methods/messages_setTyping.md b/old_docs/API_docs_v18/methods/messages_setTyping.md index 9ef8caf5..f6b7b7b5 100644 --- a/old_docs/API_docs_v18/methods/messages_setTyping.md +++ b/old_docs/API_docs_v18/methods/messages_setTyping.md @@ -37,16 +37,13 @@ description: messages.setTyping parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v18/methods/photos_deletePhotos.md b/old_docs/API_docs_v18/methods/photos_deletePhotos.md index e9cd459d..61768b1e 100644 --- a/old_docs/API_docs_v18/methods/photos_deletePhotos.md +++ b/old_docs/API_docs_v18/methods/photos_deletePhotos.md @@ -23,13 +23,10 @@ description: photos.deletePhotos parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v18/methods/photos_getUserPhotos.md b/old_docs/API_docs_v18/methods/photos_getUserPhotos.md index 56c76d8b..2cad4b30 100644 --- a/old_docs/API_docs_v18/methods/photos_getUserPhotos.md +++ b/old_docs/API_docs_v18/methods/photos_getUserPhotos.md @@ -34,16 +34,13 @@ description: photos.getUserPhotos parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v18/methods/photos_updateProfilePhoto.md b/old_docs/API_docs_v18/methods/photos_updateProfilePhoto.md index abb031d4..add6028f 100644 --- a/old_docs/API_docs_v18/methods/photos_updateProfilePhoto.md +++ b/old_docs/API_docs_v18/methods/photos_updateProfilePhoto.md @@ -24,13 +24,10 @@ description: photos.updateProfilePhoto parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v18/methods/photos_uploadProfilePhoto.md b/old_docs/API_docs_v18/methods/photos_uploadProfilePhoto.md index ae20fdfc..048a1d32 100644 --- a/old_docs/API_docs_v18/methods/photos_uploadProfilePhoto.md +++ b/old_docs/API_docs_v18/methods/photos_uploadProfilePhoto.md @@ -37,13 +37,10 @@ description: photos.uploadProfilePhoto parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v18/methods/users_getUsers.md b/old_docs/API_docs_v18/methods/users_getUsers.md index 6a44d258..3a981d57 100644 --- a/old_docs/API_docs_v18/methods/users_getUsers.md +++ b/old_docs/API_docs_v18/methods/users_getUsers.md @@ -33,16 +33,13 @@ description: users.getUsers parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v23/methods/account_changePhone.md b/old_docs/API_docs_v23/methods/account_changePhone.md index 5d1801d0..e47ef6a7 100644 --- a/old_docs/API_docs_v23/methods/account_changePhone.md +++ b/old_docs/API_docs_v23/methods/account_changePhone.md @@ -32,13 +32,10 @@ description: account.changePhone parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v23/methods/account_checkUsername.md b/old_docs/API_docs_v23/methods/account_checkUsername.md index afc59b6c..40cf822f 100644 --- a/old_docs/API_docs_v23/methods/account_checkUsername.md +++ b/old_docs/API_docs_v23/methods/account_checkUsername.md @@ -30,13 +30,10 @@ description: account.checkUsername parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v23/methods/account_deleteAccount.md b/old_docs/API_docs_v23/methods/account_deleteAccount.md index 5abcd0ec..6f1bbda9 100644 --- a/old_docs/API_docs_v23/methods/account_deleteAccount.md +++ b/old_docs/API_docs_v23/methods/account_deleteAccount.md @@ -23,13 +23,10 @@ description: account.deleteAccount parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v23/methods/account_getAccountTTL.md b/old_docs/API_docs_v23/methods/account_getAccountTTL.md index 3520fbef..538b1d7a 100644 --- a/old_docs/API_docs_v23/methods/account_getAccountTTL.md +++ b/old_docs/API_docs_v23/methods/account_getAccountTTL.md @@ -18,13 +18,10 @@ description: account.getAccountTTL parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v23/methods/account_getNotifySettings.md b/old_docs/API_docs_v23/methods/account_getNotifySettings.md index 8ee710d8..a48eed2f 100644 --- a/old_docs/API_docs_v23/methods/account_getNotifySettings.md +++ b/old_docs/API_docs_v23/methods/account_getNotifySettings.md @@ -30,13 +30,10 @@ description: account.getNotifySettings parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v23/methods/account_getPrivacy.md b/old_docs/API_docs_v23/methods/account_getPrivacy.md index 52786b79..8bbe9795 100644 --- a/old_docs/API_docs_v23/methods/account_getPrivacy.md +++ b/old_docs/API_docs_v23/methods/account_getPrivacy.md @@ -30,13 +30,10 @@ description: account.getPrivacy parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v23/methods/account_getWallPapers.md b/old_docs/API_docs_v23/methods/account_getWallPapers.md index 88c8a701..a71543d0 100644 --- a/old_docs/API_docs_v23/methods/account_getWallPapers.md +++ b/old_docs/API_docs_v23/methods/account_getWallPapers.md @@ -18,13 +18,10 @@ description: account.getWallPapers parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v23/methods/account_registerDevice.md b/old_docs/API_docs_v23/methods/account_registerDevice.md index ab7ec933..cfa1546c 100644 --- a/old_docs/API_docs_v23/methods/account_registerDevice.md +++ b/old_docs/API_docs_v23/methods/account_registerDevice.md @@ -36,13 +36,10 @@ description: account.registerDevice parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v23/methods/account_reportPeer.md b/old_docs/API_docs_v23/methods/account_reportPeer.md index 1545c3b8..1ae9f4d4 100644 --- a/old_docs/API_docs_v23/methods/account_reportPeer.md +++ b/old_docs/API_docs_v23/methods/account_reportPeer.md @@ -31,13 +31,10 @@ description: account.reportPeer parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v23/methods/account_resetNotifySettings.md b/old_docs/API_docs_v23/methods/account_resetNotifySettings.md index 155ede68..92db4f4f 100644 --- a/old_docs/API_docs_v23/methods/account_resetNotifySettings.md +++ b/old_docs/API_docs_v23/methods/account_resetNotifySettings.md @@ -18,13 +18,10 @@ description: account.resetNotifySettings parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v23/methods/account_sendChangePhoneCode.md b/old_docs/API_docs_v23/methods/account_sendChangePhoneCode.md index 650dba72..ad611a8b 100644 --- a/old_docs/API_docs_v23/methods/account_sendChangePhoneCode.md +++ b/old_docs/API_docs_v23/methods/account_sendChangePhoneCode.md @@ -30,13 +30,10 @@ description: account.sendChangePhoneCode parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v23/methods/account_setAccountTTL.md b/old_docs/API_docs_v23/methods/account_setAccountTTL.md index f06eb676..d08f59fb 100644 --- a/old_docs/API_docs_v23/methods/account_setAccountTTL.md +++ b/old_docs/API_docs_v23/methods/account_setAccountTTL.md @@ -30,13 +30,10 @@ description: account.setAccountTTL parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v23/methods/account_setPrivacy.md b/old_docs/API_docs_v23/methods/account_setPrivacy.md index 56aebbcc..401aa71c 100644 --- a/old_docs/API_docs_v23/methods/account_setPrivacy.md +++ b/old_docs/API_docs_v23/methods/account_setPrivacy.md @@ -31,13 +31,10 @@ description: account.setPrivacy parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v23/methods/account_unregisterDevice.md b/old_docs/API_docs_v23/methods/account_unregisterDevice.md index 41899b6e..283ec7d2 100644 --- a/old_docs/API_docs_v23/methods/account_unregisterDevice.md +++ b/old_docs/API_docs_v23/methods/account_unregisterDevice.md @@ -31,13 +31,10 @@ description: account.unregisterDevice parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v23/methods/account_updateDeviceLocked.md b/old_docs/API_docs_v23/methods/account_updateDeviceLocked.md index 37aeb59d..ae6125a5 100644 --- a/old_docs/API_docs_v23/methods/account_updateDeviceLocked.md +++ b/old_docs/API_docs_v23/methods/account_updateDeviceLocked.md @@ -23,13 +23,10 @@ description: account.updateDeviceLocked parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v23/methods/account_updateNotifySettings.md b/old_docs/API_docs_v23/methods/account_updateNotifySettings.md index 8389b5c2..fb096250 100644 --- a/old_docs/API_docs_v23/methods/account_updateNotifySettings.md +++ b/old_docs/API_docs_v23/methods/account_updateNotifySettings.md @@ -31,13 +31,10 @@ description: account.updateNotifySettings parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v23/methods/account_updateProfile.md b/old_docs/API_docs_v23/methods/account_updateProfile.md index c8712074..123ed13a 100644 --- a/old_docs/API_docs_v23/methods/account_updateProfile.md +++ b/old_docs/API_docs_v23/methods/account_updateProfile.md @@ -32,13 +32,10 @@ description: account.updateProfile parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v23/methods/account_updateStatus.md b/old_docs/API_docs_v23/methods/account_updateStatus.md index 7204e582..c8fa0a79 100644 --- a/old_docs/API_docs_v23/methods/account_updateStatus.md +++ b/old_docs/API_docs_v23/methods/account_updateStatus.md @@ -30,13 +30,10 @@ description: account.updateStatus parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v23/methods/account_updateUsername.md b/old_docs/API_docs_v23/methods/account_updateUsername.md index 22be2fd4..2b7576a5 100644 --- a/old_docs/API_docs_v23/methods/account_updateUsername.md +++ b/old_docs/API_docs_v23/methods/account_updateUsername.md @@ -32,13 +32,10 @@ description: account.updateUsername parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v23/methods/auth_bindTempAuthKey.md b/old_docs/API_docs_v23/methods/auth_bindTempAuthKey.md index e3d72dd5..7419abb0 100644 --- a/old_docs/API_docs_v23/methods/auth_bindTempAuthKey.md +++ b/old_docs/API_docs_v23/methods/auth_bindTempAuthKey.md @@ -35,16 +35,13 @@ description: auth.bindTempAuthKey parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v23/methods/auth_checkPhone.md b/old_docs/API_docs_v23/methods/auth_checkPhone.md index 3455904d..f6cac2e6 100644 --- a/old_docs/API_docs_v23/methods/auth_checkPhone.md +++ b/old_docs/API_docs_v23/methods/auth_checkPhone.md @@ -32,13 +32,10 @@ description: auth.checkPhone parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v23/methods/auth_exportAuthorization.md b/old_docs/API_docs_v23/methods/auth_exportAuthorization.md index 44c45b70..cbc8203b 100644 --- a/old_docs/API_docs_v23/methods/auth_exportAuthorization.md +++ b/old_docs/API_docs_v23/methods/auth_exportAuthorization.md @@ -30,16 +30,13 @@ description: auth.exportAuthorization parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v23/methods/auth_importAuthorization.md b/old_docs/API_docs_v23/methods/auth_importAuthorization.md index e0fd534f..22166510 100644 --- a/old_docs/API_docs_v23/methods/auth_importAuthorization.md +++ b/old_docs/API_docs_v23/methods/auth_importAuthorization.md @@ -32,16 +32,13 @@ description: auth.importAuthorization parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v23/methods/auth_resetAuthorizations.md b/old_docs/API_docs_v23/methods/auth_resetAuthorizations.md index 87a39a22..fe297fa7 100644 --- a/old_docs/API_docs_v23/methods/auth_resetAuthorizations.md +++ b/old_docs/API_docs_v23/methods/auth_resetAuthorizations.md @@ -25,13 +25,10 @@ description: auth.resetAuthorizations parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v23/methods/auth_sendCall.md b/old_docs/API_docs_v23/methods/auth_sendCall.md index 00eaff4e..386cfad4 100644 --- a/old_docs/API_docs_v23/methods/auth_sendCall.md +++ b/old_docs/API_docs_v23/methods/auth_sendCall.md @@ -24,16 +24,13 @@ description: auth.sendCall parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v23/methods/auth_sendInvites.md b/old_docs/API_docs_v23/methods/auth_sendInvites.md index 604fc65d..ad9636c5 100644 --- a/old_docs/API_docs_v23/methods/auth_sendInvites.md +++ b/old_docs/API_docs_v23/methods/auth_sendInvites.md @@ -31,13 +31,10 @@ description: auth.sendInvites parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v23/methods/auth_sendSms.md b/old_docs/API_docs_v23/methods/auth_sendSms.md index 6d942e97..9a214e65 100644 --- a/old_docs/API_docs_v23/methods/auth_sendSms.md +++ b/old_docs/API_docs_v23/methods/auth_sendSms.md @@ -24,16 +24,13 @@ description: auth.sendSms parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v23/methods/contacts_block.md b/old_docs/API_docs_v23/methods/contacts_block.md index d9d58e37..1c7cbe26 100644 --- a/old_docs/API_docs_v23/methods/contacts_block.md +++ b/old_docs/API_docs_v23/methods/contacts_block.md @@ -30,13 +30,10 @@ description: contacts.block parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v23/methods/contacts_deleteContact.md b/old_docs/API_docs_v23/methods/contacts_deleteContact.md index cd8c17ad..987a1be0 100644 --- a/old_docs/API_docs_v23/methods/contacts_deleteContact.md +++ b/old_docs/API_docs_v23/methods/contacts_deleteContact.md @@ -30,13 +30,10 @@ description: contacts.deleteContact parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v23/methods/contacts_deleteContacts.md b/old_docs/API_docs_v23/methods/contacts_deleteContacts.md index fc65880d..67a922ed 100644 --- a/old_docs/API_docs_v23/methods/contacts_deleteContacts.md +++ b/old_docs/API_docs_v23/methods/contacts_deleteContacts.md @@ -31,13 +31,10 @@ description: contacts.deleteContacts parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v23/methods/contacts_exportCard.md b/old_docs/API_docs_v23/methods/contacts_exportCard.md index 63508076..bf6d1f9f 100644 --- a/old_docs/API_docs_v23/methods/contacts_exportCard.md +++ b/old_docs/API_docs_v23/methods/contacts_exportCard.md @@ -18,13 +18,10 @@ description: contacts.exportCard parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v23/methods/contacts_getBlocked.md b/old_docs/API_docs_v23/methods/contacts_getBlocked.md index f50792b4..faa719da 100644 --- a/old_docs/API_docs_v23/methods/contacts_getBlocked.md +++ b/old_docs/API_docs_v23/methods/contacts_getBlocked.md @@ -24,13 +24,10 @@ description: contacts.getBlocked parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v23/methods/contacts_getContacts.md b/old_docs/API_docs_v23/methods/contacts_getContacts.md index 71313bf2..a6779111 100644 --- a/old_docs/API_docs_v23/methods/contacts_getContacts.md +++ b/old_docs/API_docs_v23/methods/contacts_getContacts.md @@ -23,13 +23,10 @@ description: contacts.getContacts parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v23/methods/contacts_getStatuses.md b/old_docs/API_docs_v23/methods/contacts_getStatuses.md index d914e08d..9bb7f263 100644 --- a/old_docs/API_docs_v23/methods/contacts_getStatuses.md +++ b/old_docs/API_docs_v23/methods/contacts_getStatuses.md @@ -18,13 +18,10 @@ description: contacts.getStatuses parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v23/methods/contacts_getSuggested.md b/old_docs/API_docs_v23/methods/contacts_getSuggested.md index a29f4aff..2059c01b 100644 --- a/old_docs/API_docs_v23/methods/contacts_getSuggested.md +++ b/old_docs/API_docs_v23/methods/contacts_getSuggested.md @@ -23,16 +23,13 @@ description: contacts.getSuggested parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v23/methods/contacts_importCard.md b/old_docs/API_docs_v23/methods/contacts_importCard.md index a6abf56d..7a2f34e1 100644 --- a/old_docs/API_docs_v23/methods/contacts_importCard.md +++ b/old_docs/API_docs_v23/methods/contacts_importCard.md @@ -31,13 +31,10 @@ description: contacts.importCard parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v23/methods/contacts_importContacts.md b/old_docs/API_docs_v23/methods/contacts_importContacts.md index db2051ac..2f070493 100644 --- a/old_docs/API_docs_v23/methods/contacts_importContacts.md +++ b/old_docs/API_docs_v23/methods/contacts_importContacts.md @@ -24,13 +24,10 @@ description: contacts.importContacts parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v23/methods/contacts_search.md b/old_docs/API_docs_v23/methods/contacts_search.md index 0203b160..70a0635e 100644 --- a/old_docs/API_docs_v23/methods/contacts_search.md +++ b/old_docs/API_docs_v23/methods/contacts_search.md @@ -33,13 +33,10 @@ description: contacts.search parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v23/methods/contacts_unblock.md b/old_docs/API_docs_v23/methods/contacts_unblock.md index a1977c24..9c01e42a 100644 --- a/old_docs/API_docs_v23/methods/contacts_unblock.md +++ b/old_docs/API_docs_v23/methods/contacts_unblock.md @@ -30,13 +30,10 @@ description: contacts.unblock parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v23/methods/help_getAppUpdate.md b/old_docs/API_docs_v23/methods/help_getAppUpdate.md index c8e67402..7b3bdde9 100644 --- a/old_docs/API_docs_v23/methods/help_getAppUpdate.md +++ b/old_docs/API_docs_v23/methods/help_getAppUpdate.md @@ -26,13 +26,10 @@ description: help.getAppUpdate parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v23/methods/help_getConfig.md b/old_docs/API_docs_v23/methods/help_getConfig.md index e3648b5a..bb51b362 100644 --- a/old_docs/API_docs_v23/methods/help_getConfig.md +++ b/old_docs/API_docs_v23/methods/help_getConfig.md @@ -25,16 +25,13 @@ description: help.getConfig parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v23/methods/help_getInviteText.md b/old_docs/API_docs_v23/methods/help_getInviteText.md index 348de85d..40251dd5 100644 --- a/old_docs/API_docs_v23/methods/help_getInviteText.md +++ b/old_docs/API_docs_v23/methods/help_getInviteText.md @@ -23,13 +23,10 @@ description: help.getInviteText parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v23/methods/help_getNearestDc.md b/old_docs/API_docs_v23/methods/help_getNearestDc.md index c6f5c555..6d8ed3f7 100644 --- a/old_docs/API_docs_v23/methods/help_getNearestDc.md +++ b/old_docs/API_docs_v23/methods/help_getNearestDc.md @@ -18,13 +18,10 @@ description: help.getNearestDc parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v23/methods/help_getSupport.md b/old_docs/API_docs_v23/methods/help_getSupport.md index 209edf03..ca8db03c 100644 --- a/old_docs/API_docs_v23/methods/help_getSupport.md +++ b/old_docs/API_docs_v23/methods/help_getSupport.md @@ -18,13 +18,10 @@ description: help.getSupport parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v23/methods/help_saveAppLog.md b/old_docs/API_docs_v23/methods/help_saveAppLog.md index 4f06434c..741b9aa1 100644 --- a/old_docs/API_docs_v23/methods/help_saveAppLog.md +++ b/old_docs/API_docs_v23/methods/help_saveAppLog.md @@ -23,13 +23,10 @@ description: help.saveAppLog parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v23/methods/initConnection.md b/old_docs/API_docs_v23/methods/initConnection.md index 0d22a1cb..c0307677 100644 --- a/old_docs/API_docs_v23/methods/initConnection.md +++ b/old_docs/API_docs_v23/methods/initConnection.md @@ -36,16 +36,13 @@ description: initConnection parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v23/methods/invokeAfterMsg.md b/old_docs/API_docs_v23/methods/invokeAfterMsg.md index c139fe8c..a382429e 100644 --- a/old_docs/API_docs_v23/methods/invokeAfterMsg.md +++ b/old_docs/API_docs_v23/methods/invokeAfterMsg.md @@ -24,16 +24,13 @@ description: invokeAfterMsg parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v23/methods/invokeAfterMsgs.md b/old_docs/API_docs_v23/methods/invokeAfterMsgs.md index 35004296..169eedaf 100644 --- a/old_docs/API_docs_v23/methods/invokeAfterMsgs.md +++ b/old_docs/API_docs_v23/methods/invokeAfterMsgs.md @@ -24,16 +24,13 @@ description: invokeAfterMsgs parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v23/methods/invokeWithLayer.md b/old_docs/API_docs_v23/methods/invokeWithLayer.md index 706036c4..d9a2c74c 100644 --- a/old_docs/API_docs_v23/methods/invokeWithLayer.md +++ b/old_docs/API_docs_v23/methods/invokeWithLayer.md @@ -41,16 +41,13 @@ description: invokeWithLayer parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v23/methods/messages_addChatUser.md b/old_docs/API_docs_v23/methods/messages_addChatUser.md index 6b3051fa..01af0dca 100644 --- a/old_docs/API_docs_v23/methods/messages_addChatUser.md +++ b/old_docs/API_docs_v23/methods/messages_addChatUser.md @@ -40,13 +40,10 @@ description: messages.addChatUser parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v23/methods/messages_createChat.md b/old_docs/API_docs_v23/methods/messages_createChat.md index ce47d105..82527c2a 100644 --- a/old_docs/API_docs_v23/methods/messages_createChat.md +++ b/old_docs/API_docs_v23/methods/messages_createChat.md @@ -32,13 +32,10 @@ description: messages.createChat parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v23/methods/messages_deleteChatUser.md b/old_docs/API_docs_v23/methods/messages_deleteChatUser.md index 83eae12f..ec77d8b8 100644 --- a/old_docs/API_docs_v23/methods/messages_deleteChatUser.md +++ b/old_docs/API_docs_v23/methods/messages_deleteChatUser.md @@ -33,16 +33,13 @@ description: messages.deleteChatUser parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v23/methods/messages_deleteHistory.md b/old_docs/API_docs_v23/methods/messages_deleteHistory.md index b7a9417d..79b6c995 100644 --- a/old_docs/API_docs_v23/methods/messages_deleteHistory.md +++ b/old_docs/API_docs_v23/methods/messages_deleteHistory.md @@ -31,13 +31,10 @@ description: messages.deleteHistory parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v23/methods/messages_deleteMessages.md b/old_docs/API_docs_v23/methods/messages_deleteMessages.md index ae8ed6b1..a29c71e7 100644 --- a/old_docs/API_docs_v23/methods/messages_deleteMessages.md +++ b/old_docs/API_docs_v23/methods/messages_deleteMessages.md @@ -30,16 +30,13 @@ description: messages.deleteMessages parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v23/methods/messages_editChatPhoto.md b/old_docs/API_docs_v23/methods/messages_editChatPhoto.md index 1928f1cf..a0927f8e 100644 --- a/old_docs/API_docs_v23/methods/messages_editChatPhoto.md +++ b/old_docs/API_docs_v23/methods/messages_editChatPhoto.md @@ -35,16 +35,13 @@ description: messages.editChatPhoto parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v23/methods/messages_editChatTitle.md b/old_docs/API_docs_v23/methods/messages_editChatTitle.md index 25fd0467..ab795d48 100644 --- a/old_docs/API_docs_v23/methods/messages_editChatTitle.md +++ b/old_docs/API_docs_v23/methods/messages_editChatTitle.md @@ -32,16 +32,13 @@ description: messages.editChatTitle parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v23/methods/messages_forwardMessage.md b/old_docs/API_docs_v23/methods/messages_forwardMessage.md index 21015bd7..79ef7e5d 100644 --- a/old_docs/API_docs_v23/methods/messages_forwardMessage.md +++ b/old_docs/API_docs_v23/methods/messages_forwardMessage.md @@ -34,16 +34,13 @@ description: messages.forwardMessage parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v23/methods/messages_forwardMessages.md b/old_docs/API_docs_v23/methods/messages_forwardMessages.md index 8a8845c3..125172e9 100644 --- a/old_docs/API_docs_v23/methods/messages_forwardMessages.md +++ b/old_docs/API_docs_v23/methods/messages_forwardMessages.md @@ -52,16 +52,13 @@ description: messages.forwardMessages parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v23/methods/messages_getAllStickers.md b/old_docs/API_docs_v23/methods/messages_getAllStickers.md index defe31c1..3a0b3781 100644 --- a/old_docs/API_docs_v23/methods/messages_getAllStickers.md +++ b/old_docs/API_docs_v23/methods/messages_getAllStickers.md @@ -23,13 +23,10 @@ description: messages.getAllStickers parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v23/methods/messages_getChats.md b/old_docs/API_docs_v23/methods/messages_getChats.md index 6fa30cbd..c322613d 100644 --- a/old_docs/API_docs_v23/methods/messages_getChats.md +++ b/old_docs/API_docs_v23/methods/messages_getChats.md @@ -31,16 +31,13 @@ description: messages.getChats parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v23/methods/messages_getDhConfig.md b/old_docs/API_docs_v23/methods/messages_getDhConfig.md index aac3354d..f97684d2 100644 --- a/old_docs/API_docs_v23/methods/messages_getDhConfig.md +++ b/old_docs/API_docs_v23/methods/messages_getDhConfig.md @@ -31,13 +31,10 @@ description: messages.getDhConfig parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v23/methods/messages_getDialogs.md b/old_docs/API_docs_v23/methods/messages_getDialogs.md index e6ba4b14..6295612b 100644 --- a/old_docs/API_docs_v23/methods/messages_getDialogs.md +++ b/old_docs/API_docs_v23/methods/messages_getDialogs.md @@ -35,13 +35,10 @@ description: messages.getDialogs parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v23/methods/messages_getHistory.md b/old_docs/API_docs_v23/methods/messages_getHistory.md index d06a05a7..a41dac19 100644 --- a/old_docs/API_docs_v23/methods/messages_getHistory.md +++ b/old_docs/API_docs_v23/methods/messages_getHistory.md @@ -38,13 +38,10 @@ description: messages.getHistory parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v23/methods/messages_getMessages.md b/old_docs/API_docs_v23/methods/messages_getMessages.md index 5a970246..787c46dd 100644 --- a/old_docs/API_docs_v23/methods/messages_getMessages.md +++ b/old_docs/API_docs_v23/methods/messages_getMessages.md @@ -23,16 +23,13 @@ description: messages.getMessages parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v23/methods/messages_getStickers.md b/old_docs/API_docs_v23/methods/messages_getStickers.md index be61a120..1587cd01 100644 --- a/old_docs/API_docs_v23/methods/messages_getStickers.md +++ b/old_docs/API_docs_v23/methods/messages_getStickers.md @@ -24,16 +24,13 @@ description: messages.getStickers parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v23/methods/messages_readEncryptedHistory.md b/old_docs/API_docs_v23/methods/messages_readEncryptedHistory.md index 766ee07d..f38f6b07 100644 --- a/old_docs/API_docs_v23/methods/messages_readEncryptedHistory.md +++ b/old_docs/API_docs_v23/methods/messages_readEncryptedHistory.md @@ -31,16 +31,13 @@ description: messages.readEncryptedHistory parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v23/methods/messages_readHistory.md b/old_docs/API_docs_v23/methods/messages_readHistory.md index fc698ca6..12066526 100644 --- a/old_docs/API_docs_v23/methods/messages_readHistory.md +++ b/old_docs/API_docs_v23/methods/messages_readHistory.md @@ -34,13 +34,10 @@ description: messages.readHistory parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v23/methods/messages_readMessageContents.md b/old_docs/API_docs_v23/methods/messages_readMessageContents.md index 65564259..535d0425 100644 --- a/old_docs/API_docs_v23/methods/messages_readMessageContents.md +++ b/old_docs/API_docs_v23/methods/messages_readMessageContents.md @@ -23,13 +23,10 @@ description: messages.readMessageContents parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v23/methods/messages_receivedMessages.md b/old_docs/API_docs_v23/methods/messages_receivedMessages.md index 82db50eb..bd47c49c 100644 --- a/old_docs/API_docs_v23/methods/messages_receivedMessages.md +++ b/old_docs/API_docs_v23/methods/messages_receivedMessages.md @@ -23,13 +23,10 @@ description: messages.receivedMessages parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v23/methods/messages_receivedQueue.md b/old_docs/API_docs_v23/methods/messages_receivedQueue.md index 3c7f1d4f..38f504b3 100644 --- a/old_docs/API_docs_v23/methods/messages_receivedQueue.md +++ b/old_docs/API_docs_v23/methods/messages_receivedQueue.md @@ -30,16 +30,13 @@ description: messages.receivedQueue parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v23/methods/messages_reportSpam.md b/old_docs/API_docs_v23/methods/messages_reportSpam.md index bfadb9ab..08c96d44 100644 --- a/old_docs/API_docs_v23/methods/messages_reportSpam.md +++ b/old_docs/API_docs_v23/methods/messages_reportSpam.md @@ -30,13 +30,10 @@ description: messages.reportSpam parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v23/methods/messages_search.md b/old_docs/API_docs_v23/methods/messages_search.md index 87073d00..1e809cf2 100644 --- a/old_docs/API_docs_v23/methods/messages_search.md +++ b/old_docs/API_docs_v23/methods/messages_search.md @@ -43,13 +43,10 @@ description: messages.search parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v23/methods/messages_sendBroadcast.md b/old_docs/API_docs_v23/methods/messages_sendBroadcast.md index 5d976ae6..c9b7289b 100644 --- a/old_docs/API_docs_v23/methods/messages_sendBroadcast.md +++ b/old_docs/API_docs_v23/methods/messages_sendBroadcast.md @@ -25,16 +25,13 @@ description: messages.sendBroadcast parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v23/methods/messages_sendEncrypted.md b/old_docs/API_docs_v23/methods/messages_sendEncrypted.md index 82eeec92..ba9f796b 100644 --- a/old_docs/API_docs_v23/methods/messages_sendEncrypted.md +++ b/old_docs/API_docs_v23/methods/messages_sendEncrypted.md @@ -34,16 +34,13 @@ description: messages.sendEncrypted parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v23/methods/messages_sendEncryptedFile.md b/old_docs/API_docs_v23/methods/messages_sendEncryptedFile.md index 8f7a73d9..db16bf2d 100644 --- a/old_docs/API_docs_v23/methods/messages_sendEncryptedFile.md +++ b/old_docs/API_docs_v23/methods/messages_sendEncryptedFile.md @@ -32,16 +32,13 @@ description: messages.sendEncryptedFile parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v23/methods/messages_sendEncryptedService.md b/old_docs/API_docs_v23/methods/messages_sendEncryptedService.md index d427f6c3..fd4e2627 100644 --- a/old_docs/API_docs_v23/methods/messages_sendEncryptedService.md +++ b/old_docs/API_docs_v23/methods/messages_sendEncryptedService.md @@ -34,16 +34,13 @@ description: messages.sendEncryptedService parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v23/methods/messages_sendMedia.md b/old_docs/API_docs_v23/methods/messages_sendMedia.md index 1da82820..f57adcf7 100644 --- a/old_docs/API_docs_v23/methods/messages_sendMedia.md +++ b/old_docs/API_docs_v23/methods/messages_sendMedia.md @@ -54,16 +54,13 @@ description: messages.sendMedia parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v23/methods/messages_sendMessage.md b/old_docs/API_docs_v23/methods/messages_sendMessage.md index d91c6275..41f5332d 100644 --- a/old_docs/API_docs_v23/methods/messages_sendMessage.md +++ b/old_docs/API_docs_v23/methods/messages_sendMessage.md @@ -50,16 +50,13 @@ description: messages.sendMessage parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v23/methods/messages_setEncryptedTyping.md b/old_docs/API_docs_v23/methods/messages_setEncryptedTyping.md index a05b94dd..aeae6ff7 100644 --- a/old_docs/API_docs_v23/methods/messages_setEncryptedTyping.md +++ b/old_docs/API_docs_v23/methods/messages_setEncryptedTyping.md @@ -31,13 +31,10 @@ description: messages.setEncryptedTyping parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v23/methods/messages_setTyping.md b/old_docs/API_docs_v23/methods/messages_setTyping.md index 9ef8caf5..f6b7b7b5 100644 --- a/old_docs/API_docs_v23/methods/messages_setTyping.md +++ b/old_docs/API_docs_v23/methods/messages_setTyping.md @@ -37,16 +37,13 @@ description: messages.setTyping parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v23/methods/photos_deletePhotos.md b/old_docs/API_docs_v23/methods/photos_deletePhotos.md index e9cd459d..61768b1e 100644 --- a/old_docs/API_docs_v23/methods/photos_deletePhotos.md +++ b/old_docs/API_docs_v23/methods/photos_deletePhotos.md @@ -23,13 +23,10 @@ description: photos.deletePhotos parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v23/methods/photos_getUserPhotos.md b/old_docs/API_docs_v23/methods/photos_getUserPhotos.md index 56c76d8b..2cad4b30 100644 --- a/old_docs/API_docs_v23/methods/photos_getUserPhotos.md +++ b/old_docs/API_docs_v23/methods/photos_getUserPhotos.md @@ -34,16 +34,13 @@ description: photos.getUserPhotos parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v23/methods/photos_updateProfilePhoto.md b/old_docs/API_docs_v23/methods/photos_updateProfilePhoto.md index abb031d4..add6028f 100644 --- a/old_docs/API_docs_v23/methods/photos_updateProfilePhoto.md +++ b/old_docs/API_docs_v23/methods/photos_updateProfilePhoto.md @@ -24,13 +24,10 @@ description: photos.updateProfilePhoto parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v23/methods/photos_uploadProfilePhoto.md b/old_docs/API_docs_v23/methods/photos_uploadProfilePhoto.md index ae20fdfc..048a1d32 100644 --- a/old_docs/API_docs_v23/methods/photos_uploadProfilePhoto.md +++ b/old_docs/API_docs_v23/methods/photos_uploadProfilePhoto.md @@ -37,13 +37,10 @@ description: photos.uploadProfilePhoto parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v23/methods/users_getUsers.md b/old_docs/API_docs_v23/methods/users_getUsers.md index 6a44d258..3a981d57 100644 --- a/old_docs/API_docs_v23/methods/users_getUsers.md +++ b/old_docs/API_docs_v23/methods/users_getUsers.md @@ -33,16 +33,13 @@ description: users.getUsers parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v25/methods/account_changePhone.md b/old_docs/API_docs_v25/methods/account_changePhone.md index 5d1801d0..e47ef6a7 100644 --- a/old_docs/API_docs_v25/methods/account_changePhone.md +++ b/old_docs/API_docs_v25/methods/account_changePhone.md @@ -32,13 +32,10 @@ description: account.changePhone parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v25/methods/account_checkUsername.md b/old_docs/API_docs_v25/methods/account_checkUsername.md index afc59b6c..40cf822f 100644 --- a/old_docs/API_docs_v25/methods/account_checkUsername.md +++ b/old_docs/API_docs_v25/methods/account_checkUsername.md @@ -30,13 +30,10 @@ description: account.checkUsername parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v25/methods/account_deleteAccount.md b/old_docs/API_docs_v25/methods/account_deleteAccount.md index 5abcd0ec..6f1bbda9 100644 --- a/old_docs/API_docs_v25/methods/account_deleteAccount.md +++ b/old_docs/API_docs_v25/methods/account_deleteAccount.md @@ -23,13 +23,10 @@ description: account.deleteAccount parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v25/methods/account_getAccountTTL.md b/old_docs/API_docs_v25/methods/account_getAccountTTL.md index 3520fbef..538b1d7a 100644 --- a/old_docs/API_docs_v25/methods/account_getAccountTTL.md +++ b/old_docs/API_docs_v25/methods/account_getAccountTTL.md @@ -18,13 +18,10 @@ description: account.getAccountTTL parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v25/methods/account_getNotifySettings.md b/old_docs/API_docs_v25/methods/account_getNotifySettings.md index 8ee710d8..a48eed2f 100644 --- a/old_docs/API_docs_v25/methods/account_getNotifySettings.md +++ b/old_docs/API_docs_v25/methods/account_getNotifySettings.md @@ -30,13 +30,10 @@ description: account.getNotifySettings parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v25/methods/account_getPassword.md b/old_docs/API_docs_v25/methods/account_getPassword.md index 4d9fd015..1abf6174 100644 --- a/old_docs/API_docs_v25/methods/account_getPassword.md +++ b/old_docs/API_docs_v25/methods/account_getPassword.md @@ -18,13 +18,10 @@ description: account.getPassword parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v25/methods/account_getPrivacy.md b/old_docs/API_docs_v25/methods/account_getPrivacy.md index 52786b79..8bbe9795 100644 --- a/old_docs/API_docs_v25/methods/account_getPrivacy.md +++ b/old_docs/API_docs_v25/methods/account_getPrivacy.md @@ -30,13 +30,10 @@ description: account.getPrivacy parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v25/methods/account_getWallPapers.md b/old_docs/API_docs_v25/methods/account_getWallPapers.md index 88c8a701..a71543d0 100644 --- a/old_docs/API_docs_v25/methods/account_getWallPapers.md +++ b/old_docs/API_docs_v25/methods/account_getWallPapers.md @@ -18,13 +18,10 @@ description: account.getWallPapers parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v25/methods/account_registerDevice.md b/old_docs/API_docs_v25/methods/account_registerDevice.md index ab7ec933..cfa1546c 100644 --- a/old_docs/API_docs_v25/methods/account_registerDevice.md +++ b/old_docs/API_docs_v25/methods/account_registerDevice.md @@ -36,13 +36,10 @@ description: account.registerDevice parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v25/methods/account_resetNotifySettings.md b/old_docs/API_docs_v25/methods/account_resetNotifySettings.md index 155ede68..92db4f4f 100644 --- a/old_docs/API_docs_v25/methods/account_resetNotifySettings.md +++ b/old_docs/API_docs_v25/methods/account_resetNotifySettings.md @@ -18,13 +18,10 @@ description: account.resetNotifySettings parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v25/methods/account_sendChangePhoneCode.md b/old_docs/API_docs_v25/methods/account_sendChangePhoneCode.md index 650dba72..ad611a8b 100644 --- a/old_docs/API_docs_v25/methods/account_sendChangePhoneCode.md +++ b/old_docs/API_docs_v25/methods/account_sendChangePhoneCode.md @@ -30,13 +30,10 @@ description: account.sendChangePhoneCode parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v25/methods/account_setAccountTTL.md b/old_docs/API_docs_v25/methods/account_setAccountTTL.md index f06eb676..d08f59fb 100644 --- a/old_docs/API_docs_v25/methods/account_setAccountTTL.md +++ b/old_docs/API_docs_v25/methods/account_setAccountTTL.md @@ -30,13 +30,10 @@ description: account.setAccountTTL parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v25/methods/account_setPassword.md b/old_docs/API_docs_v25/methods/account_setPassword.md index 046a15a2..b651189d 100644 --- a/old_docs/API_docs_v25/methods/account_setPassword.md +++ b/old_docs/API_docs_v25/methods/account_setPassword.md @@ -26,16 +26,13 @@ description: account.setPassword parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v25/methods/account_setPrivacy.md b/old_docs/API_docs_v25/methods/account_setPrivacy.md index 56aebbcc..401aa71c 100644 --- a/old_docs/API_docs_v25/methods/account_setPrivacy.md +++ b/old_docs/API_docs_v25/methods/account_setPrivacy.md @@ -31,13 +31,10 @@ description: account.setPrivacy parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v25/methods/account_unregisterDevice.md b/old_docs/API_docs_v25/methods/account_unregisterDevice.md index 41899b6e..283ec7d2 100644 --- a/old_docs/API_docs_v25/methods/account_unregisterDevice.md +++ b/old_docs/API_docs_v25/methods/account_unregisterDevice.md @@ -31,13 +31,10 @@ description: account.unregisterDevice parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v25/methods/account_updateDeviceLocked.md b/old_docs/API_docs_v25/methods/account_updateDeviceLocked.md index 37aeb59d..ae6125a5 100644 --- a/old_docs/API_docs_v25/methods/account_updateDeviceLocked.md +++ b/old_docs/API_docs_v25/methods/account_updateDeviceLocked.md @@ -23,13 +23,10 @@ description: account.updateDeviceLocked parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v25/methods/account_updateNotifySettings.md b/old_docs/API_docs_v25/methods/account_updateNotifySettings.md index 8389b5c2..fb096250 100644 --- a/old_docs/API_docs_v25/methods/account_updateNotifySettings.md +++ b/old_docs/API_docs_v25/methods/account_updateNotifySettings.md @@ -31,13 +31,10 @@ description: account.updateNotifySettings parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v25/methods/account_updateProfile.md b/old_docs/API_docs_v25/methods/account_updateProfile.md index c8712074..123ed13a 100644 --- a/old_docs/API_docs_v25/methods/account_updateProfile.md +++ b/old_docs/API_docs_v25/methods/account_updateProfile.md @@ -32,13 +32,10 @@ description: account.updateProfile parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v25/methods/account_updateStatus.md b/old_docs/API_docs_v25/methods/account_updateStatus.md index 7204e582..c8fa0a79 100644 --- a/old_docs/API_docs_v25/methods/account_updateStatus.md +++ b/old_docs/API_docs_v25/methods/account_updateStatus.md @@ -30,13 +30,10 @@ description: account.updateStatus parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v25/methods/account_updateUsername.md b/old_docs/API_docs_v25/methods/account_updateUsername.md index 22be2fd4..2b7576a5 100644 --- a/old_docs/API_docs_v25/methods/account_updateUsername.md +++ b/old_docs/API_docs_v25/methods/account_updateUsername.md @@ -32,13 +32,10 @@ description: account.updateUsername parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v25/methods/auth_bindTempAuthKey.md b/old_docs/API_docs_v25/methods/auth_bindTempAuthKey.md index e3d72dd5..7419abb0 100644 --- a/old_docs/API_docs_v25/methods/auth_bindTempAuthKey.md +++ b/old_docs/API_docs_v25/methods/auth_bindTempAuthKey.md @@ -35,16 +35,13 @@ description: auth.bindTempAuthKey parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v25/methods/auth_checkPassword.md b/old_docs/API_docs_v25/methods/auth_checkPassword.md index d5559186..6b6b21cc 100644 --- a/old_docs/API_docs_v25/methods/auth_checkPassword.md +++ b/old_docs/API_docs_v25/methods/auth_checkPassword.md @@ -30,13 +30,10 @@ description: auth.checkPassword parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v25/methods/auth_checkPhone.md b/old_docs/API_docs_v25/methods/auth_checkPhone.md index 3455904d..f6cac2e6 100644 --- a/old_docs/API_docs_v25/methods/auth_checkPhone.md +++ b/old_docs/API_docs_v25/methods/auth_checkPhone.md @@ -32,13 +32,10 @@ description: auth.checkPhone parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v25/methods/auth_exportAuthorization.md b/old_docs/API_docs_v25/methods/auth_exportAuthorization.md index 44c45b70..cbc8203b 100644 --- a/old_docs/API_docs_v25/methods/auth_exportAuthorization.md +++ b/old_docs/API_docs_v25/methods/auth_exportAuthorization.md @@ -30,16 +30,13 @@ description: auth.exportAuthorization parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v25/methods/auth_importAuthorization.md b/old_docs/API_docs_v25/methods/auth_importAuthorization.md index e0fd534f..22166510 100644 --- a/old_docs/API_docs_v25/methods/auth_importAuthorization.md +++ b/old_docs/API_docs_v25/methods/auth_importAuthorization.md @@ -32,16 +32,13 @@ description: auth.importAuthorization parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v25/methods/auth_resetAuthorizations.md b/old_docs/API_docs_v25/methods/auth_resetAuthorizations.md index 87a39a22..fe297fa7 100644 --- a/old_docs/API_docs_v25/methods/auth_resetAuthorizations.md +++ b/old_docs/API_docs_v25/methods/auth_resetAuthorizations.md @@ -25,13 +25,10 @@ description: auth.resetAuthorizations parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v25/methods/auth_sendCall.md b/old_docs/API_docs_v25/methods/auth_sendCall.md index 00eaff4e..386cfad4 100644 --- a/old_docs/API_docs_v25/methods/auth_sendCall.md +++ b/old_docs/API_docs_v25/methods/auth_sendCall.md @@ -24,16 +24,13 @@ description: auth.sendCall parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v25/methods/auth_sendInvites.md b/old_docs/API_docs_v25/methods/auth_sendInvites.md index 604fc65d..ad9636c5 100644 --- a/old_docs/API_docs_v25/methods/auth_sendInvites.md +++ b/old_docs/API_docs_v25/methods/auth_sendInvites.md @@ -31,13 +31,10 @@ description: auth.sendInvites parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v25/methods/auth_sendSms.md b/old_docs/API_docs_v25/methods/auth_sendSms.md index 6d942e97..9a214e65 100644 --- a/old_docs/API_docs_v25/methods/auth_sendSms.md +++ b/old_docs/API_docs_v25/methods/auth_sendSms.md @@ -24,16 +24,13 @@ description: auth.sendSms parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v25/methods/contacts_block.md b/old_docs/API_docs_v25/methods/contacts_block.md index d9d58e37..1c7cbe26 100644 --- a/old_docs/API_docs_v25/methods/contacts_block.md +++ b/old_docs/API_docs_v25/methods/contacts_block.md @@ -30,13 +30,10 @@ description: contacts.block parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v25/methods/contacts_deleteContact.md b/old_docs/API_docs_v25/methods/contacts_deleteContact.md index cd8c17ad..987a1be0 100644 --- a/old_docs/API_docs_v25/methods/contacts_deleteContact.md +++ b/old_docs/API_docs_v25/methods/contacts_deleteContact.md @@ -30,13 +30,10 @@ description: contacts.deleteContact parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v25/methods/contacts_deleteContacts.md b/old_docs/API_docs_v25/methods/contacts_deleteContacts.md index fc65880d..67a922ed 100644 --- a/old_docs/API_docs_v25/methods/contacts_deleteContacts.md +++ b/old_docs/API_docs_v25/methods/contacts_deleteContacts.md @@ -31,13 +31,10 @@ description: contacts.deleteContacts parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v25/methods/contacts_exportCard.md b/old_docs/API_docs_v25/methods/contacts_exportCard.md index 63508076..bf6d1f9f 100644 --- a/old_docs/API_docs_v25/methods/contacts_exportCard.md +++ b/old_docs/API_docs_v25/methods/contacts_exportCard.md @@ -18,13 +18,10 @@ description: contacts.exportCard parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v25/methods/contacts_getBlocked.md b/old_docs/API_docs_v25/methods/contacts_getBlocked.md index f50792b4..faa719da 100644 --- a/old_docs/API_docs_v25/methods/contacts_getBlocked.md +++ b/old_docs/API_docs_v25/methods/contacts_getBlocked.md @@ -24,13 +24,10 @@ description: contacts.getBlocked parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v25/methods/contacts_getContacts.md b/old_docs/API_docs_v25/methods/contacts_getContacts.md index 71313bf2..a6779111 100644 --- a/old_docs/API_docs_v25/methods/contacts_getContacts.md +++ b/old_docs/API_docs_v25/methods/contacts_getContacts.md @@ -23,13 +23,10 @@ description: contacts.getContacts parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v25/methods/contacts_getStatuses.md b/old_docs/API_docs_v25/methods/contacts_getStatuses.md index d914e08d..9bb7f263 100644 --- a/old_docs/API_docs_v25/methods/contacts_getStatuses.md +++ b/old_docs/API_docs_v25/methods/contacts_getStatuses.md @@ -18,13 +18,10 @@ description: contacts.getStatuses parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v25/methods/contacts_getSuggested.md b/old_docs/API_docs_v25/methods/contacts_getSuggested.md index a29f4aff..2059c01b 100644 --- a/old_docs/API_docs_v25/methods/contacts_getSuggested.md +++ b/old_docs/API_docs_v25/methods/contacts_getSuggested.md @@ -23,16 +23,13 @@ description: contacts.getSuggested parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v25/methods/contacts_importCard.md b/old_docs/API_docs_v25/methods/contacts_importCard.md index a6abf56d..7a2f34e1 100644 --- a/old_docs/API_docs_v25/methods/contacts_importCard.md +++ b/old_docs/API_docs_v25/methods/contacts_importCard.md @@ -31,13 +31,10 @@ description: contacts.importCard parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v25/methods/contacts_importContacts.md b/old_docs/API_docs_v25/methods/contacts_importContacts.md index db2051ac..2f070493 100644 --- a/old_docs/API_docs_v25/methods/contacts_importContacts.md +++ b/old_docs/API_docs_v25/methods/contacts_importContacts.md @@ -24,13 +24,10 @@ description: contacts.importContacts parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v25/methods/contacts_search.md b/old_docs/API_docs_v25/methods/contacts_search.md index 0203b160..70a0635e 100644 --- a/old_docs/API_docs_v25/methods/contacts_search.md +++ b/old_docs/API_docs_v25/methods/contacts_search.md @@ -33,13 +33,10 @@ description: contacts.search parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v25/methods/contacts_unblock.md b/old_docs/API_docs_v25/methods/contacts_unblock.md index a1977c24..9c01e42a 100644 --- a/old_docs/API_docs_v25/methods/contacts_unblock.md +++ b/old_docs/API_docs_v25/methods/contacts_unblock.md @@ -30,13 +30,10 @@ description: contacts.unblock parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v25/methods/geochats_checkin.md b/old_docs/API_docs_v25/methods/geochats_checkin.md index 68bff3b1..01559b90 100644 --- a/old_docs/API_docs_v25/methods/geochats_checkin.md +++ b/old_docs/API_docs_v25/methods/geochats_checkin.md @@ -23,16 +23,13 @@ description: geochats.checkin parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v25/methods/geochats_createGeoChat.md b/old_docs/API_docs_v25/methods/geochats_createGeoChat.md index ff5d0bcd..2916269c 100644 --- a/old_docs/API_docs_v25/methods/geochats_createGeoChat.md +++ b/old_docs/API_docs_v25/methods/geochats_createGeoChat.md @@ -26,16 +26,13 @@ description: geochats.createGeoChat parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v25/methods/geochats_editChatPhoto.md b/old_docs/API_docs_v25/methods/geochats_editChatPhoto.md index c7b8249f..f297ccaf 100644 --- a/old_docs/API_docs_v25/methods/geochats_editChatPhoto.md +++ b/old_docs/API_docs_v25/methods/geochats_editChatPhoto.md @@ -24,16 +24,13 @@ description: geochats.editChatPhoto parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v25/methods/geochats_editChatTitle.md b/old_docs/API_docs_v25/methods/geochats_editChatTitle.md index a3c4736a..1ec5a99d 100644 --- a/old_docs/API_docs_v25/methods/geochats_editChatTitle.md +++ b/old_docs/API_docs_v25/methods/geochats_editChatTitle.md @@ -25,16 +25,13 @@ description: geochats.editChatTitle parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v25/methods/geochats_getFullChat.md b/old_docs/API_docs_v25/methods/geochats_getFullChat.md index 168cc2df..cfd4e4a1 100644 --- a/old_docs/API_docs_v25/methods/geochats_getFullChat.md +++ b/old_docs/API_docs_v25/methods/geochats_getFullChat.md @@ -23,16 +23,13 @@ description: geochats.getFullChat parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v25/methods/geochats_getHistory.md b/old_docs/API_docs_v25/methods/geochats_getHistory.md index a2e065a1..03ecbccc 100644 --- a/old_docs/API_docs_v25/methods/geochats_getHistory.md +++ b/old_docs/API_docs_v25/methods/geochats_getHistory.md @@ -26,16 +26,13 @@ description: geochats.getHistory parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v25/methods/geochats_getLocated.md b/old_docs/API_docs_v25/methods/geochats_getLocated.md index 244ae266..0eff12c3 100644 --- a/old_docs/API_docs_v25/methods/geochats_getLocated.md +++ b/old_docs/API_docs_v25/methods/geochats_getLocated.md @@ -25,16 +25,13 @@ description: geochats.getLocated parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v25/methods/geochats_getRecents.md b/old_docs/API_docs_v25/methods/geochats_getRecents.md index c6e59ab0..eeb8cdf2 100644 --- a/old_docs/API_docs_v25/methods/geochats_getRecents.md +++ b/old_docs/API_docs_v25/methods/geochats_getRecents.md @@ -24,16 +24,13 @@ description: geochats.getRecents parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v25/methods/geochats_search.md b/old_docs/API_docs_v25/methods/geochats_search.md index dc73e068..d11b0cbd 100644 --- a/old_docs/API_docs_v25/methods/geochats_search.md +++ b/old_docs/API_docs_v25/methods/geochats_search.md @@ -30,16 +30,13 @@ description: geochats.search parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v25/methods/geochats_sendMedia.md b/old_docs/API_docs_v25/methods/geochats_sendMedia.md index 77de3f08..15389b39 100644 --- a/old_docs/API_docs_v25/methods/geochats_sendMedia.md +++ b/old_docs/API_docs_v25/methods/geochats_sendMedia.md @@ -24,16 +24,13 @@ description: geochats.sendMedia parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v25/methods/geochats_sendMessage.md b/old_docs/API_docs_v25/methods/geochats_sendMessage.md index cb9c3942..a7216056 100644 --- a/old_docs/API_docs_v25/methods/geochats_sendMessage.md +++ b/old_docs/API_docs_v25/methods/geochats_sendMessage.md @@ -24,16 +24,13 @@ description: geochats.sendMessage parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v25/methods/geochats_setTyping.md b/old_docs/API_docs_v25/methods/geochats_setTyping.md index 9aeaf274..12cb55fe 100644 --- a/old_docs/API_docs_v25/methods/geochats_setTyping.md +++ b/old_docs/API_docs_v25/methods/geochats_setTyping.md @@ -24,16 +24,13 @@ description: geochats.setTyping parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v25/methods/help_getAppUpdate.md b/old_docs/API_docs_v25/methods/help_getAppUpdate.md index c8e67402..7b3bdde9 100644 --- a/old_docs/API_docs_v25/methods/help_getAppUpdate.md +++ b/old_docs/API_docs_v25/methods/help_getAppUpdate.md @@ -26,13 +26,10 @@ description: help.getAppUpdate parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v25/methods/help_getConfig.md b/old_docs/API_docs_v25/methods/help_getConfig.md index e3648b5a..bb51b362 100644 --- a/old_docs/API_docs_v25/methods/help_getConfig.md +++ b/old_docs/API_docs_v25/methods/help_getConfig.md @@ -25,16 +25,13 @@ description: help.getConfig parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v25/methods/help_getInviteText.md b/old_docs/API_docs_v25/methods/help_getInviteText.md index 348de85d..40251dd5 100644 --- a/old_docs/API_docs_v25/methods/help_getInviteText.md +++ b/old_docs/API_docs_v25/methods/help_getInviteText.md @@ -23,13 +23,10 @@ description: help.getInviteText parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v25/methods/help_getNearestDc.md b/old_docs/API_docs_v25/methods/help_getNearestDc.md index c6f5c555..6d8ed3f7 100644 --- a/old_docs/API_docs_v25/methods/help_getNearestDc.md +++ b/old_docs/API_docs_v25/methods/help_getNearestDc.md @@ -18,13 +18,10 @@ description: help.getNearestDc parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v25/methods/help_getSupport.md b/old_docs/API_docs_v25/methods/help_getSupport.md index 209edf03..ca8db03c 100644 --- a/old_docs/API_docs_v25/methods/help_getSupport.md +++ b/old_docs/API_docs_v25/methods/help_getSupport.md @@ -18,13 +18,10 @@ description: help.getSupport parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v25/methods/help_saveAppLog.md b/old_docs/API_docs_v25/methods/help_saveAppLog.md index 4f06434c..741b9aa1 100644 --- a/old_docs/API_docs_v25/methods/help_saveAppLog.md +++ b/old_docs/API_docs_v25/methods/help_saveAppLog.md @@ -23,13 +23,10 @@ description: help.saveAppLog parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v25/methods/initConnection.md b/old_docs/API_docs_v25/methods/initConnection.md index 0d22a1cb..c0307677 100644 --- a/old_docs/API_docs_v25/methods/initConnection.md +++ b/old_docs/API_docs_v25/methods/initConnection.md @@ -36,16 +36,13 @@ description: initConnection parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v25/methods/invokeAfterMsg.md b/old_docs/API_docs_v25/methods/invokeAfterMsg.md index c139fe8c..a382429e 100644 --- a/old_docs/API_docs_v25/methods/invokeAfterMsg.md +++ b/old_docs/API_docs_v25/methods/invokeAfterMsg.md @@ -24,16 +24,13 @@ description: invokeAfterMsg parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v25/methods/invokeAfterMsgs.md b/old_docs/API_docs_v25/methods/invokeAfterMsgs.md index 35004296..169eedaf 100644 --- a/old_docs/API_docs_v25/methods/invokeAfterMsgs.md +++ b/old_docs/API_docs_v25/methods/invokeAfterMsgs.md @@ -24,16 +24,13 @@ description: invokeAfterMsgs parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v25/methods/invokeWithLayer.md b/old_docs/API_docs_v25/methods/invokeWithLayer.md index 706036c4..d9a2c74c 100644 --- a/old_docs/API_docs_v25/methods/invokeWithLayer.md +++ b/old_docs/API_docs_v25/methods/invokeWithLayer.md @@ -41,16 +41,13 @@ description: invokeWithLayer parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v25/methods/messages_addChatUser.md b/old_docs/API_docs_v25/methods/messages_addChatUser.md index 6b3051fa..01af0dca 100644 --- a/old_docs/API_docs_v25/methods/messages_addChatUser.md +++ b/old_docs/API_docs_v25/methods/messages_addChatUser.md @@ -40,13 +40,10 @@ description: messages.addChatUser parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v25/methods/messages_createChat.md b/old_docs/API_docs_v25/methods/messages_createChat.md index ce47d105..82527c2a 100644 --- a/old_docs/API_docs_v25/methods/messages_createChat.md +++ b/old_docs/API_docs_v25/methods/messages_createChat.md @@ -32,13 +32,10 @@ description: messages.createChat parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v25/methods/messages_deleteChatUser.md b/old_docs/API_docs_v25/methods/messages_deleteChatUser.md index 83eae12f..ec77d8b8 100644 --- a/old_docs/API_docs_v25/methods/messages_deleteChatUser.md +++ b/old_docs/API_docs_v25/methods/messages_deleteChatUser.md @@ -33,16 +33,13 @@ description: messages.deleteChatUser parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v25/methods/messages_deleteHistory.md b/old_docs/API_docs_v25/methods/messages_deleteHistory.md index b7a9417d..79b6c995 100644 --- a/old_docs/API_docs_v25/methods/messages_deleteHistory.md +++ b/old_docs/API_docs_v25/methods/messages_deleteHistory.md @@ -31,13 +31,10 @@ description: messages.deleteHistory parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v25/methods/messages_deleteMessages.md b/old_docs/API_docs_v25/methods/messages_deleteMessages.md index 65dbbc4a..38b3ca09 100644 --- a/old_docs/API_docs_v25/methods/messages_deleteMessages.md +++ b/old_docs/API_docs_v25/methods/messages_deleteMessages.md @@ -30,16 +30,13 @@ description: messages.deleteMessages parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v25/methods/messages_editChatPhoto.md b/old_docs/API_docs_v25/methods/messages_editChatPhoto.md index 1928f1cf..a0927f8e 100644 --- a/old_docs/API_docs_v25/methods/messages_editChatPhoto.md +++ b/old_docs/API_docs_v25/methods/messages_editChatPhoto.md @@ -35,16 +35,13 @@ description: messages.editChatPhoto parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v25/methods/messages_editChatTitle.md b/old_docs/API_docs_v25/methods/messages_editChatTitle.md index 25fd0467..ab795d48 100644 --- a/old_docs/API_docs_v25/methods/messages_editChatTitle.md +++ b/old_docs/API_docs_v25/methods/messages_editChatTitle.md @@ -32,16 +32,13 @@ description: messages.editChatTitle parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v25/methods/messages_forwardMessage.md b/old_docs/API_docs_v25/methods/messages_forwardMessage.md index 21015bd7..79ef7e5d 100644 --- a/old_docs/API_docs_v25/methods/messages_forwardMessage.md +++ b/old_docs/API_docs_v25/methods/messages_forwardMessage.md @@ -34,16 +34,13 @@ description: messages.forwardMessage parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v25/methods/messages_forwardMessages.md b/old_docs/API_docs_v25/methods/messages_forwardMessages.md index 8a8845c3..125172e9 100644 --- a/old_docs/API_docs_v25/methods/messages_forwardMessages.md +++ b/old_docs/API_docs_v25/methods/messages_forwardMessages.md @@ -52,16 +52,13 @@ description: messages.forwardMessages parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v25/methods/messages_getAllStickers.md b/old_docs/API_docs_v25/methods/messages_getAllStickers.md index defe31c1..3a0b3781 100644 --- a/old_docs/API_docs_v25/methods/messages_getAllStickers.md +++ b/old_docs/API_docs_v25/methods/messages_getAllStickers.md @@ -23,13 +23,10 @@ description: messages.getAllStickers parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v25/methods/messages_getChats.md b/old_docs/API_docs_v25/methods/messages_getChats.md index 6fa30cbd..c322613d 100644 --- a/old_docs/API_docs_v25/methods/messages_getChats.md +++ b/old_docs/API_docs_v25/methods/messages_getChats.md @@ -31,16 +31,13 @@ description: messages.getChats parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v25/methods/messages_getDhConfig.md b/old_docs/API_docs_v25/methods/messages_getDhConfig.md index aac3354d..f97684d2 100644 --- a/old_docs/API_docs_v25/methods/messages_getDhConfig.md +++ b/old_docs/API_docs_v25/methods/messages_getDhConfig.md @@ -31,13 +31,10 @@ description: messages.getDhConfig parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v25/methods/messages_getDialogs.md b/old_docs/API_docs_v25/methods/messages_getDialogs.md index e6ba4b14..6295612b 100644 --- a/old_docs/API_docs_v25/methods/messages_getDialogs.md +++ b/old_docs/API_docs_v25/methods/messages_getDialogs.md @@ -35,13 +35,10 @@ description: messages.getDialogs parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v25/methods/messages_getHistory.md b/old_docs/API_docs_v25/methods/messages_getHistory.md index d06a05a7..a41dac19 100644 --- a/old_docs/API_docs_v25/methods/messages_getHistory.md +++ b/old_docs/API_docs_v25/methods/messages_getHistory.md @@ -38,13 +38,10 @@ description: messages.getHistory parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v25/methods/messages_getMessages.md b/old_docs/API_docs_v25/methods/messages_getMessages.md index 5a970246..787c46dd 100644 --- a/old_docs/API_docs_v25/methods/messages_getMessages.md +++ b/old_docs/API_docs_v25/methods/messages_getMessages.md @@ -23,16 +23,13 @@ description: messages.getMessages parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v25/methods/messages_getStickers.md b/old_docs/API_docs_v25/methods/messages_getStickers.md index be61a120..1587cd01 100644 --- a/old_docs/API_docs_v25/methods/messages_getStickers.md +++ b/old_docs/API_docs_v25/methods/messages_getStickers.md @@ -24,16 +24,13 @@ description: messages.getStickers parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v25/methods/messages_readEncryptedHistory.md b/old_docs/API_docs_v25/methods/messages_readEncryptedHistory.md index 766ee07d..f38f6b07 100644 --- a/old_docs/API_docs_v25/methods/messages_readEncryptedHistory.md +++ b/old_docs/API_docs_v25/methods/messages_readEncryptedHistory.md @@ -31,16 +31,13 @@ description: messages.readEncryptedHistory parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v25/methods/messages_readHistory.md b/old_docs/API_docs_v25/methods/messages_readHistory.md index da833be8..fe332529 100644 --- a/old_docs/API_docs_v25/methods/messages_readHistory.md +++ b/old_docs/API_docs_v25/methods/messages_readHistory.md @@ -33,13 +33,10 @@ description: messages.readHistory parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v25/methods/messages_readMessageContents.md b/old_docs/API_docs_v25/methods/messages_readMessageContents.md index 4b1abda0..7a6055fc 100644 --- a/old_docs/API_docs_v25/methods/messages_readMessageContents.md +++ b/old_docs/API_docs_v25/methods/messages_readMessageContents.md @@ -23,13 +23,10 @@ description: messages.readMessageContents parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v25/methods/messages_receivedMessages.md b/old_docs/API_docs_v25/methods/messages_receivedMessages.md index 82db50eb..bd47c49c 100644 --- a/old_docs/API_docs_v25/methods/messages_receivedMessages.md +++ b/old_docs/API_docs_v25/methods/messages_receivedMessages.md @@ -23,13 +23,10 @@ description: messages.receivedMessages parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v25/methods/messages_receivedQueue.md b/old_docs/API_docs_v25/methods/messages_receivedQueue.md index 3c7f1d4f..38f504b3 100644 --- a/old_docs/API_docs_v25/methods/messages_receivedQueue.md +++ b/old_docs/API_docs_v25/methods/messages_receivedQueue.md @@ -30,16 +30,13 @@ description: messages.receivedQueue parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v25/methods/messages_search.md b/old_docs/API_docs_v25/methods/messages_search.md index 87073d00..1e809cf2 100644 --- a/old_docs/API_docs_v25/methods/messages_search.md +++ b/old_docs/API_docs_v25/methods/messages_search.md @@ -43,13 +43,10 @@ description: messages.search parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v25/methods/messages_sendBroadcast.md b/old_docs/API_docs_v25/methods/messages_sendBroadcast.md index 5d976ae6..c9b7289b 100644 --- a/old_docs/API_docs_v25/methods/messages_sendBroadcast.md +++ b/old_docs/API_docs_v25/methods/messages_sendBroadcast.md @@ -25,16 +25,13 @@ description: messages.sendBroadcast parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v25/methods/messages_sendEncrypted.md b/old_docs/API_docs_v25/methods/messages_sendEncrypted.md index 82eeec92..ba9f796b 100644 --- a/old_docs/API_docs_v25/methods/messages_sendEncrypted.md +++ b/old_docs/API_docs_v25/methods/messages_sendEncrypted.md @@ -34,16 +34,13 @@ description: messages.sendEncrypted parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v25/methods/messages_sendEncryptedFile.md b/old_docs/API_docs_v25/methods/messages_sendEncryptedFile.md index 8f7a73d9..db16bf2d 100644 --- a/old_docs/API_docs_v25/methods/messages_sendEncryptedFile.md +++ b/old_docs/API_docs_v25/methods/messages_sendEncryptedFile.md @@ -32,16 +32,13 @@ description: messages.sendEncryptedFile parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v25/methods/messages_sendEncryptedService.md b/old_docs/API_docs_v25/methods/messages_sendEncryptedService.md index d427f6c3..fd4e2627 100644 --- a/old_docs/API_docs_v25/methods/messages_sendEncryptedService.md +++ b/old_docs/API_docs_v25/methods/messages_sendEncryptedService.md @@ -34,16 +34,13 @@ description: messages.sendEncryptedService parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v25/methods/messages_sendMedia.md b/old_docs/API_docs_v25/methods/messages_sendMedia.md index 2c65b180..52b300d1 100644 --- a/old_docs/API_docs_v25/methods/messages_sendMedia.md +++ b/old_docs/API_docs_v25/methods/messages_sendMedia.md @@ -55,16 +55,13 @@ description: messages.sendMedia parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v25/methods/messages_sendMessage.md b/old_docs/API_docs_v25/methods/messages_sendMessage.md index b445baa9..a2ad47bc 100644 --- a/old_docs/API_docs_v25/methods/messages_sendMessage.md +++ b/old_docs/API_docs_v25/methods/messages_sendMessage.md @@ -51,16 +51,13 @@ description: messages.sendMessage parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v25/methods/messages_setEncryptedTyping.md b/old_docs/API_docs_v25/methods/messages_setEncryptedTyping.md index a05b94dd..aeae6ff7 100644 --- a/old_docs/API_docs_v25/methods/messages_setEncryptedTyping.md +++ b/old_docs/API_docs_v25/methods/messages_setEncryptedTyping.md @@ -31,13 +31,10 @@ description: messages.setEncryptedTyping parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v25/methods/messages_setTyping.md b/old_docs/API_docs_v25/methods/messages_setTyping.md index 9ef8caf5..f6b7b7b5 100644 --- a/old_docs/API_docs_v25/methods/messages_setTyping.md +++ b/old_docs/API_docs_v25/methods/messages_setTyping.md @@ -37,16 +37,13 @@ description: messages.setTyping parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v25/methods/photos_deletePhotos.md b/old_docs/API_docs_v25/methods/photos_deletePhotos.md index e9cd459d..61768b1e 100644 --- a/old_docs/API_docs_v25/methods/photos_deletePhotos.md +++ b/old_docs/API_docs_v25/methods/photos_deletePhotos.md @@ -23,13 +23,10 @@ description: photos.deletePhotos parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v25/methods/photos_getUserPhotos.md b/old_docs/API_docs_v25/methods/photos_getUserPhotos.md index 56c76d8b..2cad4b30 100644 --- a/old_docs/API_docs_v25/methods/photos_getUserPhotos.md +++ b/old_docs/API_docs_v25/methods/photos_getUserPhotos.md @@ -34,16 +34,13 @@ description: photos.getUserPhotos parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v25/methods/photos_updateProfilePhoto.md b/old_docs/API_docs_v25/methods/photos_updateProfilePhoto.md index abb031d4..add6028f 100644 --- a/old_docs/API_docs_v25/methods/photos_updateProfilePhoto.md +++ b/old_docs/API_docs_v25/methods/photos_updateProfilePhoto.md @@ -24,13 +24,10 @@ description: photos.updateProfilePhoto parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v25/methods/photos_uploadProfilePhoto.md b/old_docs/API_docs_v25/methods/photos_uploadProfilePhoto.md index ae20fdfc..048a1d32 100644 --- a/old_docs/API_docs_v25/methods/photos_uploadProfilePhoto.md +++ b/old_docs/API_docs_v25/methods/photos_uploadProfilePhoto.md @@ -37,13 +37,10 @@ description: photos.uploadProfilePhoto parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v25/methods/users_getUsers.md b/old_docs/API_docs_v25/methods/users_getUsers.md index 6a44d258..3a981d57 100644 --- a/old_docs/API_docs_v25/methods/users_getUsers.md +++ b/old_docs/API_docs_v25/methods/users_getUsers.md @@ -33,16 +33,13 @@ description: users.getUsers parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v27/methods/account_changePhone.md b/old_docs/API_docs_v27/methods/account_changePhone.md index 5d1801d0..e47ef6a7 100644 --- a/old_docs/API_docs_v27/methods/account_changePhone.md +++ b/old_docs/API_docs_v27/methods/account_changePhone.md @@ -32,13 +32,10 @@ description: account.changePhone parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v27/methods/account_checkUsername.md b/old_docs/API_docs_v27/methods/account_checkUsername.md index afc59b6c..40cf822f 100644 --- a/old_docs/API_docs_v27/methods/account_checkUsername.md +++ b/old_docs/API_docs_v27/methods/account_checkUsername.md @@ -30,13 +30,10 @@ description: account.checkUsername parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v27/methods/account_deleteAccount.md b/old_docs/API_docs_v27/methods/account_deleteAccount.md index 5abcd0ec..6f1bbda9 100644 --- a/old_docs/API_docs_v27/methods/account_deleteAccount.md +++ b/old_docs/API_docs_v27/methods/account_deleteAccount.md @@ -23,13 +23,10 @@ description: account.deleteAccount parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v27/methods/account_getAccountTTL.md b/old_docs/API_docs_v27/methods/account_getAccountTTL.md index 3520fbef..538b1d7a 100644 --- a/old_docs/API_docs_v27/methods/account_getAccountTTL.md +++ b/old_docs/API_docs_v27/methods/account_getAccountTTL.md @@ -18,13 +18,10 @@ description: account.getAccountTTL parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v27/methods/account_getAuthorizations.md b/old_docs/API_docs_v27/methods/account_getAuthorizations.md index 91bbce5e..f138d517 100644 --- a/old_docs/API_docs_v27/methods/account_getAuthorizations.md +++ b/old_docs/API_docs_v27/methods/account_getAuthorizations.md @@ -18,13 +18,10 @@ description: account.getAuthorizations parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v27/methods/account_getNotifySettings.md b/old_docs/API_docs_v27/methods/account_getNotifySettings.md index 8ee710d8..a48eed2f 100644 --- a/old_docs/API_docs_v27/methods/account_getNotifySettings.md +++ b/old_docs/API_docs_v27/methods/account_getNotifySettings.md @@ -30,13 +30,10 @@ description: account.getNotifySettings parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v27/methods/account_getPassword.md b/old_docs/API_docs_v27/methods/account_getPassword.md index 4d9fd015..1abf6174 100644 --- a/old_docs/API_docs_v27/methods/account_getPassword.md +++ b/old_docs/API_docs_v27/methods/account_getPassword.md @@ -18,13 +18,10 @@ description: account.getPassword parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v27/methods/account_getPasswordSettings.md b/old_docs/API_docs_v27/methods/account_getPasswordSettings.md index 02cb77f7..aec5b989 100644 --- a/old_docs/API_docs_v27/methods/account_getPasswordSettings.md +++ b/old_docs/API_docs_v27/methods/account_getPasswordSettings.md @@ -30,13 +30,10 @@ description: account.getPasswordSettings parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v27/methods/account_getPrivacy.md b/old_docs/API_docs_v27/methods/account_getPrivacy.md index 52786b79..8bbe9795 100644 --- a/old_docs/API_docs_v27/methods/account_getPrivacy.md +++ b/old_docs/API_docs_v27/methods/account_getPrivacy.md @@ -30,13 +30,10 @@ description: account.getPrivacy parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v27/methods/account_getWallPapers.md b/old_docs/API_docs_v27/methods/account_getWallPapers.md index 88c8a701..a71543d0 100644 --- a/old_docs/API_docs_v27/methods/account_getWallPapers.md +++ b/old_docs/API_docs_v27/methods/account_getWallPapers.md @@ -18,13 +18,10 @@ description: account.getWallPapers parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v27/methods/account_registerDevice.md b/old_docs/API_docs_v27/methods/account_registerDevice.md index ab7ec933..cfa1546c 100644 --- a/old_docs/API_docs_v27/methods/account_registerDevice.md +++ b/old_docs/API_docs_v27/methods/account_registerDevice.md @@ -36,13 +36,10 @@ description: account.registerDevice parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v27/methods/account_resetAuthorization.md b/old_docs/API_docs_v27/methods/account_resetAuthorization.md index e44334f2..0438cba3 100644 --- a/old_docs/API_docs_v27/methods/account_resetAuthorization.md +++ b/old_docs/API_docs_v27/methods/account_resetAuthorization.md @@ -30,13 +30,10 @@ description: account.resetAuthorization parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v27/methods/account_resetNotifySettings.md b/old_docs/API_docs_v27/methods/account_resetNotifySettings.md index 155ede68..92db4f4f 100644 --- a/old_docs/API_docs_v27/methods/account_resetNotifySettings.md +++ b/old_docs/API_docs_v27/methods/account_resetNotifySettings.md @@ -18,13 +18,10 @@ description: account.resetNotifySettings parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v27/methods/account_sendChangePhoneCode.md b/old_docs/API_docs_v27/methods/account_sendChangePhoneCode.md index 650dba72..ad611a8b 100644 --- a/old_docs/API_docs_v27/methods/account_sendChangePhoneCode.md +++ b/old_docs/API_docs_v27/methods/account_sendChangePhoneCode.md @@ -30,13 +30,10 @@ description: account.sendChangePhoneCode parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v27/methods/account_setAccountTTL.md b/old_docs/API_docs_v27/methods/account_setAccountTTL.md index f06eb676..d08f59fb 100644 --- a/old_docs/API_docs_v27/methods/account_setAccountTTL.md +++ b/old_docs/API_docs_v27/methods/account_setAccountTTL.md @@ -30,13 +30,10 @@ description: account.setAccountTTL parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v27/methods/account_setPrivacy.md b/old_docs/API_docs_v27/methods/account_setPrivacy.md index 56aebbcc..401aa71c 100644 --- a/old_docs/API_docs_v27/methods/account_setPrivacy.md +++ b/old_docs/API_docs_v27/methods/account_setPrivacy.md @@ -31,13 +31,10 @@ description: account.setPrivacy parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v27/methods/account_unregisterDevice.md b/old_docs/API_docs_v27/methods/account_unregisterDevice.md index 41899b6e..283ec7d2 100644 --- a/old_docs/API_docs_v27/methods/account_unregisterDevice.md +++ b/old_docs/API_docs_v27/methods/account_unregisterDevice.md @@ -31,13 +31,10 @@ description: account.unregisterDevice parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v27/methods/account_updateDeviceLocked.md b/old_docs/API_docs_v27/methods/account_updateDeviceLocked.md index 37aeb59d..ae6125a5 100644 --- a/old_docs/API_docs_v27/methods/account_updateDeviceLocked.md +++ b/old_docs/API_docs_v27/methods/account_updateDeviceLocked.md @@ -23,13 +23,10 @@ description: account.updateDeviceLocked parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v27/methods/account_updateNotifySettings.md b/old_docs/API_docs_v27/methods/account_updateNotifySettings.md index 8389b5c2..fb096250 100644 --- a/old_docs/API_docs_v27/methods/account_updateNotifySettings.md +++ b/old_docs/API_docs_v27/methods/account_updateNotifySettings.md @@ -31,13 +31,10 @@ description: account.updateNotifySettings parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v27/methods/account_updatePasswordSettings.md b/old_docs/API_docs_v27/methods/account_updatePasswordSettings.md index b7c8da4b..ffa8dcd9 100644 --- a/old_docs/API_docs_v27/methods/account_updatePasswordSettings.md +++ b/old_docs/API_docs_v27/methods/account_updatePasswordSettings.md @@ -34,13 +34,10 @@ description: account.updatePasswordSettings parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v27/methods/account_updateProfile.md b/old_docs/API_docs_v27/methods/account_updateProfile.md index c8712074..123ed13a 100644 --- a/old_docs/API_docs_v27/methods/account_updateProfile.md +++ b/old_docs/API_docs_v27/methods/account_updateProfile.md @@ -32,13 +32,10 @@ description: account.updateProfile parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v27/methods/account_updateStatus.md b/old_docs/API_docs_v27/methods/account_updateStatus.md index 7204e582..c8fa0a79 100644 --- a/old_docs/API_docs_v27/methods/account_updateStatus.md +++ b/old_docs/API_docs_v27/methods/account_updateStatus.md @@ -30,13 +30,10 @@ description: account.updateStatus parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v27/methods/account_updateUsername.md b/old_docs/API_docs_v27/methods/account_updateUsername.md index 22be2fd4..2b7576a5 100644 --- a/old_docs/API_docs_v27/methods/account_updateUsername.md +++ b/old_docs/API_docs_v27/methods/account_updateUsername.md @@ -32,13 +32,10 @@ description: account.updateUsername parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v27/methods/auth_bindTempAuthKey.md b/old_docs/API_docs_v27/methods/auth_bindTempAuthKey.md index e3d72dd5..7419abb0 100644 --- a/old_docs/API_docs_v27/methods/auth_bindTempAuthKey.md +++ b/old_docs/API_docs_v27/methods/auth_bindTempAuthKey.md @@ -35,16 +35,13 @@ description: auth.bindTempAuthKey parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v27/methods/auth_checkPassword.md b/old_docs/API_docs_v27/methods/auth_checkPassword.md index d5559186..6b6b21cc 100644 --- a/old_docs/API_docs_v27/methods/auth_checkPassword.md +++ b/old_docs/API_docs_v27/methods/auth_checkPassword.md @@ -30,13 +30,10 @@ description: auth.checkPassword parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v27/methods/auth_checkPhone.md b/old_docs/API_docs_v27/methods/auth_checkPhone.md index 3455904d..f6cac2e6 100644 --- a/old_docs/API_docs_v27/methods/auth_checkPhone.md +++ b/old_docs/API_docs_v27/methods/auth_checkPhone.md @@ -32,13 +32,10 @@ description: auth.checkPhone parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v27/methods/auth_exportAuthorization.md b/old_docs/API_docs_v27/methods/auth_exportAuthorization.md index 44c45b70..cbc8203b 100644 --- a/old_docs/API_docs_v27/methods/auth_exportAuthorization.md +++ b/old_docs/API_docs_v27/methods/auth_exportAuthorization.md @@ -30,16 +30,13 @@ description: auth.exportAuthorization parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v27/methods/auth_importAuthorization.md b/old_docs/API_docs_v27/methods/auth_importAuthorization.md index e0fd534f..22166510 100644 --- a/old_docs/API_docs_v27/methods/auth_importAuthorization.md +++ b/old_docs/API_docs_v27/methods/auth_importAuthorization.md @@ -32,16 +32,13 @@ description: auth.importAuthorization parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v27/methods/auth_recoverPassword.md b/old_docs/API_docs_v27/methods/auth_recoverPassword.md index c2ce3fed..931e99fd 100644 --- a/old_docs/API_docs_v27/methods/auth_recoverPassword.md +++ b/old_docs/API_docs_v27/methods/auth_recoverPassword.md @@ -30,13 +30,10 @@ description: auth.recoverPassword parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v27/methods/auth_requestPasswordRecovery.md b/old_docs/API_docs_v27/methods/auth_requestPasswordRecovery.md index 101b1cf7..c6babcd9 100644 --- a/old_docs/API_docs_v27/methods/auth_requestPasswordRecovery.md +++ b/old_docs/API_docs_v27/methods/auth_requestPasswordRecovery.md @@ -25,13 +25,10 @@ description: auth.requestPasswordRecovery parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v27/methods/auth_resetAuthorizations.md b/old_docs/API_docs_v27/methods/auth_resetAuthorizations.md index 87a39a22..fe297fa7 100644 --- a/old_docs/API_docs_v27/methods/auth_resetAuthorizations.md +++ b/old_docs/API_docs_v27/methods/auth_resetAuthorizations.md @@ -25,13 +25,10 @@ description: auth.resetAuthorizations parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v27/methods/auth_sendCall.md b/old_docs/API_docs_v27/methods/auth_sendCall.md index 00eaff4e..386cfad4 100644 --- a/old_docs/API_docs_v27/methods/auth_sendCall.md +++ b/old_docs/API_docs_v27/methods/auth_sendCall.md @@ -24,16 +24,13 @@ description: auth.sendCall parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v27/methods/auth_sendInvites.md b/old_docs/API_docs_v27/methods/auth_sendInvites.md index 604fc65d..ad9636c5 100644 --- a/old_docs/API_docs_v27/methods/auth_sendInvites.md +++ b/old_docs/API_docs_v27/methods/auth_sendInvites.md @@ -31,13 +31,10 @@ description: auth.sendInvites parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v27/methods/auth_sendSms.md b/old_docs/API_docs_v27/methods/auth_sendSms.md index 6d942e97..9a214e65 100644 --- a/old_docs/API_docs_v27/methods/auth_sendSms.md +++ b/old_docs/API_docs_v27/methods/auth_sendSms.md @@ -24,16 +24,13 @@ description: auth.sendSms parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v27/methods/contacts_block.md b/old_docs/API_docs_v27/methods/contacts_block.md index d9d58e37..1c7cbe26 100644 --- a/old_docs/API_docs_v27/methods/contacts_block.md +++ b/old_docs/API_docs_v27/methods/contacts_block.md @@ -30,13 +30,10 @@ description: contacts.block parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v27/methods/contacts_deleteContact.md b/old_docs/API_docs_v27/methods/contacts_deleteContact.md index cd8c17ad..987a1be0 100644 --- a/old_docs/API_docs_v27/methods/contacts_deleteContact.md +++ b/old_docs/API_docs_v27/methods/contacts_deleteContact.md @@ -30,13 +30,10 @@ description: contacts.deleteContact parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v27/methods/contacts_deleteContacts.md b/old_docs/API_docs_v27/methods/contacts_deleteContacts.md index fc65880d..67a922ed 100644 --- a/old_docs/API_docs_v27/methods/contacts_deleteContacts.md +++ b/old_docs/API_docs_v27/methods/contacts_deleteContacts.md @@ -31,13 +31,10 @@ description: contacts.deleteContacts parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v27/methods/contacts_exportCard.md b/old_docs/API_docs_v27/methods/contacts_exportCard.md index 63508076..bf6d1f9f 100644 --- a/old_docs/API_docs_v27/methods/contacts_exportCard.md +++ b/old_docs/API_docs_v27/methods/contacts_exportCard.md @@ -18,13 +18,10 @@ description: contacts.exportCard parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v27/methods/contacts_getBlocked.md b/old_docs/API_docs_v27/methods/contacts_getBlocked.md index f50792b4..faa719da 100644 --- a/old_docs/API_docs_v27/methods/contacts_getBlocked.md +++ b/old_docs/API_docs_v27/methods/contacts_getBlocked.md @@ -24,13 +24,10 @@ description: contacts.getBlocked parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v27/methods/contacts_getContacts.md b/old_docs/API_docs_v27/methods/contacts_getContacts.md index 71313bf2..a6779111 100644 --- a/old_docs/API_docs_v27/methods/contacts_getContacts.md +++ b/old_docs/API_docs_v27/methods/contacts_getContacts.md @@ -23,13 +23,10 @@ description: contacts.getContacts parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v27/methods/contacts_getStatuses.md b/old_docs/API_docs_v27/methods/contacts_getStatuses.md index d914e08d..9bb7f263 100644 --- a/old_docs/API_docs_v27/methods/contacts_getStatuses.md +++ b/old_docs/API_docs_v27/methods/contacts_getStatuses.md @@ -18,13 +18,10 @@ description: contacts.getStatuses parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v27/methods/contacts_getSuggested.md b/old_docs/API_docs_v27/methods/contacts_getSuggested.md index a29f4aff..2059c01b 100644 --- a/old_docs/API_docs_v27/methods/contacts_getSuggested.md +++ b/old_docs/API_docs_v27/methods/contacts_getSuggested.md @@ -23,16 +23,13 @@ description: contacts.getSuggested parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v27/methods/contacts_importCard.md b/old_docs/API_docs_v27/methods/contacts_importCard.md index a6abf56d..7a2f34e1 100644 --- a/old_docs/API_docs_v27/methods/contacts_importCard.md +++ b/old_docs/API_docs_v27/methods/contacts_importCard.md @@ -31,13 +31,10 @@ description: contacts.importCard parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v27/methods/contacts_importContacts.md b/old_docs/API_docs_v27/methods/contacts_importContacts.md index db2051ac..2f070493 100644 --- a/old_docs/API_docs_v27/methods/contacts_importContacts.md +++ b/old_docs/API_docs_v27/methods/contacts_importContacts.md @@ -24,13 +24,10 @@ description: contacts.importContacts parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v27/methods/contacts_search.md b/old_docs/API_docs_v27/methods/contacts_search.md index 0203b160..70a0635e 100644 --- a/old_docs/API_docs_v27/methods/contacts_search.md +++ b/old_docs/API_docs_v27/methods/contacts_search.md @@ -33,13 +33,10 @@ description: contacts.search parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v27/methods/contacts_unblock.md b/old_docs/API_docs_v27/methods/contacts_unblock.md index a1977c24..9c01e42a 100644 --- a/old_docs/API_docs_v27/methods/contacts_unblock.md +++ b/old_docs/API_docs_v27/methods/contacts_unblock.md @@ -30,13 +30,10 @@ description: contacts.unblock parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v27/methods/geochats_checkin.md b/old_docs/API_docs_v27/methods/geochats_checkin.md index 68bff3b1..01559b90 100644 --- a/old_docs/API_docs_v27/methods/geochats_checkin.md +++ b/old_docs/API_docs_v27/methods/geochats_checkin.md @@ -23,16 +23,13 @@ description: geochats.checkin parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v27/methods/geochats_createGeoChat.md b/old_docs/API_docs_v27/methods/geochats_createGeoChat.md index ff5d0bcd..2916269c 100644 --- a/old_docs/API_docs_v27/methods/geochats_createGeoChat.md +++ b/old_docs/API_docs_v27/methods/geochats_createGeoChat.md @@ -26,16 +26,13 @@ description: geochats.createGeoChat parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v27/methods/geochats_editChatPhoto.md b/old_docs/API_docs_v27/methods/geochats_editChatPhoto.md index c7b8249f..f297ccaf 100644 --- a/old_docs/API_docs_v27/methods/geochats_editChatPhoto.md +++ b/old_docs/API_docs_v27/methods/geochats_editChatPhoto.md @@ -24,16 +24,13 @@ description: geochats.editChatPhoto parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v27/methods/geochats_editChatTitle.md b/old_docs/API_docs_v27/methods/geochats_editChatTitle.md index a3c4736a..1ec5a99d 100644 --- a/old_docs/API_docs_v27/methods/geochats_editChatTitle.md +++ b/old_docs/API_docs_v27/methods/geochats_editChatTitle.md @@ -25,16 +25,13 @@ description: geochats.editChatTitle parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v27/methods/geochats_getFullChat.md b/old_docs/API_docs_v27/methods/geochats_getFullChat.md index 168cc2df..cfd4e4a1 100644 --- a/old_docs/API_docs_v27/methods/geochats_getFullChat.md +++ b/old_docs/API_docs_v27/methods/geochats_getFullChat.md @@ -23,16 +23,13 @@ description: geochats.getFullChat parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v27/methods/geochats_getHistory.md b/old_docs/API_docs_v27/methods/geochats_getHistory.md index a2e065a1..03ecbccc 100644 --- a/old_docs/API_docs_v27/methods/geochats_getHistory.md +++ b/old_docs/API_docs_v27/methods/geochats_getHistory.md @@ -26,16 +26,13 @@ description: geochats.getHistory parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v27/methods/geochats_getLocated.md b/old_docs/API_docs_v27/methods/geochats_getLocated.md index 244ae266..0eff12c3 100644 --- a/old_docs/API_docs_v27/methods/geochats_getLocated.md +++ b/old_docs/API_docs_v27/methods/geochats_getLocated.md @@ -25,16 +25,13 @@ description: geochats.getLocated parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v27/methods/geochats_getRecents.md b/old_docs/API_docs_v27/methods/geochats_getRecents.md index c6e59ab0..eeb8cdf2 100644 --- a/old_docs/API_docs_v27/methods/geochats_getRecents.md +++ b/old_docs/API_docs_v27/methods/geochats_getRecents.md @@ -24,16 +24,13 @@ description: geochats.getRecents parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v27/methods/geochats_search.md b/old_docs/API_docs_v27/methods/geochats_search.md index dc73e068..d11b0cbd 100644 --- a/old_docs/API_docs_v27/methods/geochats_search.md +++ b/old_docs/API_docs_v27/methods/geochats_search.md @@ -30,16 +30,13 @@ description: geochats.search parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v27/methods/geochats_sendMedia.md b/old_docs/API_docs_v27/methods/geochats_sendMedia.md index 77de3f08..15389b39 100644 --- a/old_docs/API_docs_v27/methods/geochats_sendMedia.md +++ b/old_docs/API_docs_v27/methods/geochats_sendMedia.md @@ -24,16 +24,13 @@ description: geochats.sendMedia parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v27/methods/geochats_sendMessage.md b/old_docs/API_docs_v27/methods/geochats_sendMessage.md index cb9c3942..a7216056 100644 --- a/old_docs/API_docs_v27/methods/geochats_sendMessage.md +++ b/old_docs/API_docs_v27/methods/geochats_sendMessage.md @@ -24,16 +24,13 @@ description: geochats.sendMessage parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v27/methods/geochats_setTyping.md b/old_docs/API_docs_v27/methods/geochats_setTyping.md index 9aeaf274..12cb55fe 100644 --- a/old_docs/API_docs_v27/methods/geochats_setTyping.md +++ b/old_docs/API_docs_v27/methods/geochats_setTyping.md @@ -24,16 +24,13 @@ description: geochats.setTyping parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v27/methods/help_getAppUpdate.md b/old_docs/API_docs_v27/methods/help_getAppUpdate.md index c8e67402..7b3bdde9 100644 --- a/old_docs/API_docs_v27/methods/help_getAppUpdate.md +++ b/old_docs/API_docs_v27/methods/help_getAppUpdate.md @@ -26,13 +26,10 @@ description: help.getAppUpdate parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v27/methods/help_getConfig.md b/old_docs/API_docs_v27/methods/help_getConfig.md index e3648b5a..bb51b362 100644 --- a/old_docs/API_docs_v27/methods/help_getConfig.md +++ b/old_docs/API_docs_v27/methods/help_getConfig.md @@ -25,16 +25,13 @@ description: help.getConfig parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v27/methods/help_getInviteText.md b/old_docs/API_docs_v27/methods/help_getInviteText.md index 348de85d..40251dd5 100644 --- a/old_docs/API_docs_v27/methods/help_getInviteText.md +++ b/old_docs/API_docs_v27/methods/help_getInviteText.md @@ -23,13 +23,10 @@ description: help.getInviteText parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v27/methods/help_getNearestDc.md b/old_docs/API_docs_v27/methods/help_getNearestDc.md index c6f5c555..6d8ed3f7 100644 --- a/old_docs/API_docs_v27/methods/help_getNearestDc.md +++ b/old_docs/API_docs_v27/methods/help_getNearestDc.md @@ -18,13 +18,10 @@ description: help.getNearestDc parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v27/methods/help_getSupport.md b/old_docs/API_docs_v27/methods/help_getSupport.md index 209edf03..ca8db03c 100644 --- a/old_docs/API_docs_v27/methods/help_getSupport.md +++ b/old_docs/API_docs_v27/methods/help_getSupport.md @@ -18,13 +18,10 @@ description: help.getSupport parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v27/methods/help_saveAppLog.md b/old_docs/API_docs_v27/methods/help_saveAppLog.md index 4f06434c..741b9aa1 100644 --- a/old_docs/API_docs_v27/methods/help_saveAppLog.md +++ b/old_docs/API_docs_v27/methods/help_saveAppLog.md @@ -23,13 +23,10 @@ description: help.saveAppLog parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v27/methods/initConnection.md b/old_docs/API_docs_v27/methods/initConnection.md index 0d22a1cb..c0307677 100644 --- a/old_docs/API_docs_v27/methods/initConnection.md +++ b/old_docs/API_docs_v27/methods/initConnection.md @@ -36,16 +36,13 @@ description: initConnection parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v27/methods/invokeAfterMsg.md b/old_docs/API_docs_v27/methods/invokeAfterMsg.md index c139fe8c..a382429e 100644 --- a/old_docs/API_docs_v27/methods/invokeAfterMsg.md +++ b/old_docs/API_docs_v27/methods/invokeAfterMsg.md @@ -24,16 +24,13 @@ description: invokeAfterMsg parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v27/methods/invokeAfterMsgs.md b/old_docs/API_docs_v27/methods/invokeAfterMsgs.md index 35004296..169eedaf 100644 --- a/old_docs/API_docs_v27/methods/invokeAfterMsgs.md +++ b/old_docs/API_docs_v27/methods/invokeAfterMsgs.md @@ -24,16 +24,13 @@ description: invokeAfterMsgs parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v27/methods/invokeWithLayer.md b/old_docs/API_docs_v27/methods/invokeWithLayer.md index 706036c4..d9a2c74c 100644 --- a/old_docs/API_docs_v27/methods/invokeWithLayer.md +++ b/old_docs/API_docs_v27/methods/invokeWithLayer.md @@ -41,16 +41,13 @@ description: invokeWithLayer parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v27/methods/messages_addChatUser.md b/old_docs/API_docs_v27/methods/messages_addChatUser.md index 00da5a61..b9e6243d 100644 --- a/old_docs/API_docs_v27/methods/messages_addChatUser.md +++ b/old_docs/API_docs_v27/methods/messages_addChatUser.md @@ -40,13 +40,10 @@ description: messages.addChatUser parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v27/methods/messages_createChat.md b/old_docs/API_docs_v27/methods/messages_createChat.md index c643a022..c6c8f420 100644 --- a/old_docs/API_docs_v27/methods/messages_createChat.md +++ b/old_docs/API_docs_v27/methods/messages_createChat.md @@ -32,13 +32,10 @@ description: messages.createChat parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v27/methods/messages_deleteChatUser.md b/old_docs/API_docs_v27/methods/messages_deleteChatUser.md index 3d75d9cf..4b8c2aa5 100644 --- a/old_docs/API_docs_v27/methods/messages_deleteChatUser.md +++ b/old_docs/API_docs_v27/methods/messages_deleteChatUser.md @@ -33,16 +33,13 @@ description: messages.deleteChatUser parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v27/methods/messages_deleteHistory.md b/old_docs/API_docs_v27/methods/messages_deleteHistory.md index b7a9417d..79b6c995 100644 --- a/old_docs/API_docs_v27/methods/messages_deleteHistory.md +++ b/old_docs/API_docs_v27/methods/messages_deleteHistory.md @@ -31,13 +31,10 @@ description: messages.deleteHistory parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v27/methods/messages_deleteMessages.md b/old_docs/API_docs_v27/methods/messages_deleteMessages.md index 65dbbc4a..38b3ca09 100644 --- a/old_docs/API_docs_v27/methods/messages_deleteMessages.md +++ b/old_docs/API_docs_v27/methods/messages_deleteMessages.md @@ -30,16 +30,13 @@ description: messages.deleteMessages parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v27/methods/messages_editChatPhoto.md b/old_docs/API_docs_v27/methods/messages_editChatPhoto.md index d225962d..8c5d9d47 100644 --- a/old_docs/API_docs_v27/methods/messages_editChatPhoto.md +++ b/old_docs/API_docs_v27/methods/messages_editChatPhoto.md @@ -35,16 +35,13 @@ description: messages.editChatPhoto parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v27/methods/messages_editChatTitle.md b/old_docs/API_docs_v27/methods/messages_editChatTitle.md index 5cb1c6d7..238c6d72 100644 --- a/old_docs/API_docs_v27/methods/messages_editChatTitle.md +++ b/old_docs/API_docs_v27/methods/messages_editChatTitle.md @@ -32,16 +32,13 @@ description: messages.editChatTitle parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v27/methods/messages_forwardMessage.md b/old_docs/API_docs_v27/methods/messages_forwardMessage.md index 4e2362db..fbdbc955 100644 --- a/old_docs/API_docs_v27/methods/messages_forwardMessage.md +++ b/old_docs/API_docs_v27/methods/messages_forwardMessage.md @@ -34,16 +34,13 @@ description: messages.forwardMessage parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v27/methods/messages_forwardMessages.md b/old_docs/API_docs_v27/methods/messages_forwardMessages.md index 05131a0d..bb100295 100644 --- a/old_docs/API_docs_v27/methods/messages_forwardMessages.md +++ b/old_docs/API_docs_v27/methods/messages_forwardMessages.md @@ -52,16 +52,13 @@ description: messages.forwardMessages parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v27/methods/messages_getAllStickers.md b/old_docs/API_docs_v27/methods/messages_getAllStickers.md index defe31c1..3a0b3781 100644 --- a/old_docs/API_docs_v27/methods/messages_getAllStickers.md +++ b/old_docs/API_docs_v27/methods/messages_getAllStickers.md @@ -23,13 +23,10 @@ description: messages.getAllStickers parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v27/methods/messages_getChats.md b/old_docs/API_docs_v27/methods/messages_getChats.md index 6fa30cbd..c322613d 100644 --- a/old_docs/API_docs_v27/methods/messages_getChats.md +++ b/old_docs/API_docs_v27/methods/messages_getChats.md @@ -31,16 +31,13 @@ description: messages.getChats parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v27/methods/messages_getDhConfig.md b/old_docs/API_docs_v27/methods/messages_getDhConfig.md index aac3354d..f97684d2 100644 --- a/old_docs/API_docs_v27/methods/messages_getDhConfig.md +++ b/old_docs/API_docs_v27/methods/messages_getDhConfig.md @@ -31,13 +31,10 @@ description: messages.getDhConfig parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v27/methods/messages_getDialogs.md b/old_docs/API_docs_v27/methods/messages_getDialogs.md index e6ba4b14..6295612b 100644 --- a/old_docs/API_docs_v27/methods/messages_getDialogs.md +++ b/old_docs/API_docs_v27/methods/messages_getDialogs.md @@ -35,13 +35,10 @@ description: messages.getDialogs parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v27/methods/messages_getHistory.md b/old_docs/API_docs_v27/methods/messages_getHistory.md index d06a05a7..a41dac19 100644 --- a/old_docs/API_docs_v27/methods/messages_getHistory.md +++ b/old_docs/API_docs_v27/methods/messages_getHistory.md @@ -38,13 +38,10 @@ description: messages.getHistory parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v27/methods/messages_getMessages.md b/old_docs/API_docs_v27/methods/messages_getMessages.md index 5a970246..787c46dd 100644 --- a/old_docs/API_docs_v27/methods/messages_getMessages.md +++ b/old_docs/API_docs_v27/methods/messages_getMessages.md @@ -23,16 +23,13 @@ description: messages.getMessages parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v27/methods/messages_getStickers.md b/old_docs/API_docs_v27/methods/messages_getStickers.md index be61a120..1587cd01 100644 --- a/old_docs/API_docs_v27/methods/messages_getStickers.md +++ b/old_docs/API_docs_v27/methods/messages_getStickers.md @@ -24,16 +24,13 @@ description: messages.getStickers parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v27/methods/messages_getWebPagePreview.md b/old_docs/API_docs_v27/methods/messages_getWebPagePreview.md index a89600b1..d3908933 100644 --- a/old_docs/API_docs_v27/methods/messages_getWebPagePreview.md +++ b/old_docs/API_docs_v27/methods/messages_getWebPagePreview.md @@ -23,13 +23,10 @@ description: messages.getWebPagePreview parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v27/methods/messages_readEncryptedHistory.md b/old_docs/API_docs_v27/methods/messages_readEncryptedHistory.md index 766ee07d..f38f6b07 100644 --- a/old_docs/API_docs_v27/methods/messages_readEncryptedHistory.md +++ b/old_docs/API_docs_v27/methods/messages_readEncryptedHistory.md @@ -31,16 +31,13 @@ description: messages.readEncryptedHistory parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v27/methods/messages_readHistory.md b/old_docs/API_docs_v27/methods/messages_readHistory.md index da833be8..fe332529 100644 --- a/old_docs/API_docs_v27/methods/messages_readHistory.md +++ b/old_docs/API_docs_v27/methods/messages_readHistory.md @@ -33,13 +33,10 @@ description: messages.readHistory parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v27/methods/messages_readMessageContents.md b/old_docs/API_docs_v27/methods/messages_readMessageContents.md index 4b1abda0..7a6055fc 100644 --- a/old_docs/API_docs_v27/methods/messages_readMessageContents.md +++ b/old_docs/API_docs_v27/methods/messages_readMessageContents.md @@ -23,13 +23,10 @@ description: messages.readMessageContents parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v27/methods/messages_receivedMessages.md b/old_docs/API_docs_v27/methods/messages_receivedMessages.md index 82db50eb..bd47c49c 100644 --- a/old_docs/API_docs_v27/methods/messages_receivedMessages.md +++ b/old_docs/API_docs_v27/methods/messages_receivedMessages.md @@ -23,13 +23,10 @@ description: messages.receivedMessages parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v27/methods/messages_receivedQueue.md b/old_docs/API_docs_v27/methods/messages_receivedQueue.md index 3c7f1d4f..38f504b3 100644 --- a/old_docs/API_docs_v27/methods/messages_receivedQueue.md +++ b/old_docs/API_docs_v27/methods/messages_receivedQueue.md @@ -30,16 +30,13 @@ description: messages.receivedQueue parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v27/methods/messages_search.md b/old_docs/API_docs_v27/methods/messages_search.md index 87073d00..1e809cf2 100644 --- a/old_docs/API_docs_v27/methods/messages_search.md +++ b/old_docs/API_docs_v27/methods/messages_search.md @@ -43,13 +43,10 @@ description: messages.search parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v27/methods/messages_sendBroadcast.md b/old_docs/API_docs_v27/methods/messages_sendBroadcast.md index ac13d0bf..537166ab 100644 --- a/old_docs/API_docs_v27/methods/messages_sendBroadcast.md +++ b/old_docs/API_docs_v27/methods/messages_sendBroadcast.md @@ -25,16 +25,13 @@ description: messages.sendBroadcast parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v27/methods/messages_sendEncrypted.md b/old_docs/API_docs_v27/methods/messages_sendEncrypted.md index 82eeec92..ba9f796b 100644 --- a/old_docs/API_docs_v27/methods/messages_sendEncrypted.md +++ b/old_docs/API_docs_v27/methods/messages_sendEncrypted.md @@ -34,16 +34,13 @@ description: messages.sendEncrypted parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v27/methods/messages_sendEncryptedFile.md b/old_docs/API_docs_v27/methods/messages_sendEncryptedFile.md index 8f7a73d9..db16bf2d 100644 --- a/old_docs/API_docs_v27/methods/messages_sendEncryptedFile.md +++ b/old_docs/API_docs_v27/methods/messages_sendEncryptedFile.md @@ -32,16 +32,13 @@ description: messages.sendEncryptedFile parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v27/methods/messages_sendEncryptedService.md b/old_docs/API_docs_v27/methods/messages_sendEncryptedService.md index d427f6c3..fd4e2627 100644 --- a/old_docs/API_docs_v27/methods/messages_sendEncryptedService.md +++ b/old_docs/API_docs_v27/methods/messages_sendEncryptedService.md @@ -34,16 +34,13 @@ description: messages.sendEncryptedService parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v27/methods/messages_sendMedia.md b/old_docs/API_docs_v27/methods/messages_sendMedia.md index 153ceded..b17671ea 100644 --- a/old_docs/API_docs_v27/methods/messages_sendMedia.md +++ b/old_docs/API_docs_v27/methods/messages_sendMedia.md @@ -55,16 +55,13 @@ description: messages.sendMedia parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v27/methods/messages_sendMessage.md b/old_docs/API_docs_v27/methods/messages_sendMessage.md index 3d0e332c..aab9fd03 100644 --- a/old_docs/API_docs_v27/methods/messages_sendMessage.md +++ b/old_docs/API_docs_v27/methods/messages_sendMessage.md @@ -51,16 +51,13 @@ description: messages.sendMessage parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v27/methods/messages_setEncryptedTyping.md b/old_docs/API_docs_v27/methods/messages_setEncryptedTyping.md index a05b94dd..aeae6ff7 100644 --- a/old_docs/API_docs_v27/methods/messages_setEncryptedTyping.md +++ b/old_docs/API_docs_v27/methods/messages_setEncryptedTyping.md @@ -31,13 +31,10 @@ description: messages.setEncryptedTyping parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v27/methods/messages_setTyping.md b/old_docs/API_docs_v27/methods/messages_setTyping.md index 9ef8caf5..f6b7b7b5 100644 --- a/old_docs/API_docs_v27/methods/messages_setTyping.md +++ b/old_docs/API_docs_v27/methods/messages_setTyping.md @@ -37,16 +37,13 @@ description: messages.setTyping parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v27/methods/photos_deletePhotos.md b/old_docs/API_docs_v27/methods/photos_deletePhotos.md index e9cd459d..61768b1e 100644 --- a/old_docs/API_docs_v27/methods/photos_deletePhotos.md +++ b/old_docs/API_docs_v27/methods/photos_deletePhotos.md @@ -23,13 +23,10 @@ description: photos.deletePhotos parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v27/methods/photos_getUserPhotos.md b/old_docs/API_docs_v27/methods/photos_getUserPhotos.md index 56c76d8b..2cad4b30 100644 --- a/old_docs/API_docs_v27/methods/photos_getUserPhotos.md +++ b/old_docs/API_docs_v27/methods/photos_getUserPhotos.md @@ -34,16 +34,13 @@ description: photos.getUserPhotos parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v27/methods/photos_updateProfilePhoto.md b/old_docs/API_docs_v27/methods/photos_updateProfilePhoto.md index abb031d4..add6028f 100644 --- a/old_docs/API_docs_v27/methods/photos_updateProfilePhoto.md +++ b/old_docs/API_docs_v27/methods/photos_updateProfilePhoto.md @@ -24,13 +24,10 @@ description: photos.updateProfilePhoto parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v27/methods/photos_uploadProfilePhoto.md b/old_docs/API_docs_v27/methods/photos_uploadProfilePhoto.md index ae20fdfc..048a1d32 100644 --- a/old_docs/API_docs_v27/methods/photos_uploadProfilePhoto.md +++ b/old_docs/API_docs_v27/methods/photos_uploadProfilePhoto.md @@ -37,13 +37,10 @@ description: photos.uploadProfilePhoto parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v27/methods/users_getUsers.md b/old_docs/API_docs_v27/methods/users_getUsers.md index 6a44d258..3a981d57 100644 --- a/old_docs/API_docs_v27/methods/users_getUsers.md +++ b/old_docs/API_docs_v27/methods/users_getUsers.md @@ -33,16 +33,13 @@ description: users.getUsers parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v33/methods/account_changePhone.md b/old_docs/API_docs_v33/methods/account_changePhone.md index 5d1801d0..e47ef6a7 100644 --- a/old_docs/API_docs_v33/methods/account_changePhone.md +++ b/old_docs/API_docs_v33/methods/account_changePhone.md @@ -32,13 +32,10 @@ description: account.changePhone parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v33/methods/account_checkUsername.md b/old_docs/API_docs_v33/methods/account_checkUsername.md index afc59b6c..40cf822f 100644 --- a/old_docs/API_docs_v33/methods/account_checkUsername.md +++ b/old_docs/API_docs_v33/methods/account_checkUsername.md @@ -30,13 +30,10 @@ description: account.checkUsername parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v33/methods/account_deleteAccount.md b/old_docs/API_docs_v33/methods/account_deleteAccount.md index 5abcd0ec..6f1bbda9 100644 --- a/old_docs/API_docs_v33/methods/account_deleteAccount.md +++ b/old_docs/API_docs_v33/methods/account_deleteAccount.md @@ -23,13 +23,10 @@ description: account.deleteAccount parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v33/methods/account_getAccountTTL.md b/old_docs/API_docs_v33/methods/account_getAccountTTL.md index 3520fbef..538b1d7a 100644 --- a/old_docs/API_docs_v33/methods/account_getAccountTTL.md +++ b/old_docs/API_docs_v33/methods/account_getAccountTTL.md @@ -18,13 +18,10 @@ description: account.getAccountTTL parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v33/methods/account_getAuthorizations.md b/old_docs/API_docs_v33/methods/account_getAuthorizations.md index 91bbce5e..f138d517 100644 --- a/old_docs/API_docs_v33/methods/account_getAuthorizations.md +++ b/old_docs/API_docs_v33/methods/account_getAuthorizations.md @@ -18,13 +18,10 @@ description: account.getAuthorizations parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v33/methods/account_getNotifySettings.md b/old_docs/API_docs_v33/methods/account_getNotifySettings.md index 8ee710d8..a48eed2f 100644 --- a/old_docs/API_docs_v33/methods/account_getNotifySettings.md +++ b/old_docs/API_docs_v33/methods/account_getNotifySettings.md @@ -30,13 +30,10 @@ description: account.getNotifySettings parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v33/methods/account_getPassword.md b/old_docs/API_docs_v33/methods/account_getPassword.md index 4d9fd015..1abf6174 100644 --- a/old_docs/API_docs_v33/methods/account_getPassword.md +++ b/old_docs/API_docs_v33/methods/account_getPassword.md @@ -18,13 +18,10 @@ description: account.getPassword parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v33/methods/account_getPasswordSettings.md b/old_docs/API_docs_v33/methods/account_getPasswordSettings.md index 02cb77f7..aec5b989 100644 --- a/old_docs/API_docs_v33/methods/account_getPasswordSettings.md +++ b/old_docs/API_docs_v33/methods/account_getPasswordSettings.md @@ -30,13 +30,10 @@ description: account.getPasswordSettings parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v33/methods/account_getPrivacy.md b/old_docs/API_docs_v33/methods/account_getPrivacy.md index 52786b79..8bbe9795 100644 --- a/old_docs/API_docs_v33/methods/account_getPrivacy.md +++ b/old_docs/API_docs_v33/methods/account_getPrivacy.md @@ -30,13 +30,10 @@ description: account.getPrivacy parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v33/methods/account_getWallPapers.md b/old_docs/API_docs_v33/methods/account_getWallPapers.md index 88c8a701..a71543d0 100644 --- a/old_docs/API_docs_v33/methods/account_getWallPapers.md +++ b/old_docs/API_docs_v33/methods/account_getWallPapers.md @@ -18,13 +18,10 @@ description: account.getWallPapers parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v33/methods/account_registerDevice.md b/old_docs/API_docs_v33/methods/account_registerDevice.md index ab7ec933..cfa1546c 100644 --- a/old_docs/API_docs_v33/methods/account_registerDevice.md +++ b/old_docs/API_docs_v33/methods/account_registerDevice.md @@ -36,13 +36,10 @@ description: account.registerDevice parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v33/methods/account_resetAuthorization.md b/old_docs/API_docs_v33/methods/account_resetAuthorization.md index e44334f2..0438cba3 100644 --- a/old_docs/API_docs_v33/methods/account_resetAuthorization.md +++ b/old_docs/API_docs_v33/methods/account_resetAuthorization.md @@ -30,13 +30,10 @@ description: account.resetAuthorization parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v33/methods/account_resetNotifySettings.md b/old_docs/API_docs_v33/methods/account_resetNotifySettings.md index 155ede68..92db4f4f 100644 --- a/old_docs/API_docs_v33/methods/account_resetNotifySettings.md +++ b/old_docs/API_docs_v33/methods/account_resetNotifySettings.md @@ -18,13 +18,10 @@ description: account.resetNotifySettings parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v33/methods/account_sendChangePhoneCode.md b/old_docs/API_docs_v33/methods/account_sendChangePhoneCode.md index 650dba72..ad611a8b 100644 --- a/old_docs/API_docs_v33/methods/account_sendChangePhoneCode.md +++ b/old_docs/API_docs_v33/methods/account_sendChangePhoneCode.md @@ -30,13 +30,10 @@ description: account.sendChangePhoneCode parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v33/methods/account_setAccountTTL.md b/old_docs/API_docs_v33/methods/account_setAccountTTL.md index f06eb676..d08f59fb 100644 --- a/old_docs/API_docs_v33/methods/account_setAccountTTL.md +++ b/old_docs/API_docs_v33/methods/account_setAccountTTL.md @@ -30,13 +30,10 @@ description: account.setAccountTTL parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v33/methods/account_setPrivacy.md b/old_docs/API_docs_v33/methods/account_setPrivacy.md index 56aebbcc..401aa71c 100644 --- a/old_docs/API_docs_v33/methods/account_setPrivacy.md +++ b/old_docs/API_docs_v33/methods/account_setPrivacy.md @@ -31,13 +31,10 @@ description: account.setPrivacy parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v33/methods/account_unregisterDevice.md b/old_docs/API_docs_v33/methods/account_unregisterDevice.md index 41899b6e..283ec7d2 100644 --- a/old_docs/API_docs_v33/methods/account_unregisterDevice.md +++ b/old_docs/API_docs_v33/methods/account_unregisterDevice.md @@ -31,13 +31,10 @@ description: account.unregisterDevice parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v33/methods/account_updateDeviceLocked.md b/old_docs/API_docs_v33/methods/account_updateDeviceLocked.md index 37aeb59d..ae6125a5 100644 --- a/old_docs/API_docs_v33/methods/account_updateDeviceLocked.md +++ b/old_docs/API_docs_v33/methods/account_updateDeviceLocked.md @@ -23,13 +23,10 @@ description: account.updateDeviceLocked parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v33/methods/account_updateNotifySettings.md b/old_docs/API_docs_v33/methods/account_updateNotifySettings.md index 8389b5c2..fb096250 100644 --- a/old_docs/API_docs_v33/methods/account_updateNotifySettings.md +++ b/old_docs/API_docs_v33/methods/account_updateNotifySettings.md @@ -31,13 +31,10 @@ description: account.updateNotifySettings parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v33/methods/account_updatePasswordSettings.md b/old_docs/API_docs_v33/methods/account_updatePasswordSettings.md index b7c8da4b..ffa8dcd9 100644 --- a/old_docs/API_docs_v33/methods/account_updatePasswordSettings.md +++ b/old_docs/API_docs_v33/methods/account_updatePasswordSettings.md @@ -34,13 +34,10 @@ description: account.updatePasswordSettings parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v33/methods/account_updateProfile.md b/old_docs/API_docs_v33/methods/account_updateProfile.md index c8712074..123ed13a 100644 --- a/old_docs/API_docs_v33/methods/account_updateProfile.md +++ b/old_docs/API_docs_v33/methods/account_updateProfile.md @@ -32,13 +32,10 @@ description: account.updateProfile parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v33/methods/account_updateStatus.md b/old_docs/API_docs_v33/methods/account_updateStatus.md index 7204e582..c8fa0a79 100644 --- a/old_docs/API_docs_v33/methods/account_updateStatus.md +++ b/old_docs/API_docs_v33/methods/account_updateStatus.md @@ -30,13 +30,10 @@ description: account.updateStatus parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v33/methods/account_updateUsername.md b/old_docs/API_docs_v33/methods/account_updateUsername.md index 22be2fd4..2b7576a5 100644 --- a/old_docs/API_docs_v33/methods/account_updateUsername.md +++ b/old_docs/API_docs_v33/methods/account_updateUsername.md @@ -32,13 +32,10 @@ description: account.updateUsername parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v33/methods/auth_bindTempAuthKey.md b/old_docs/API_docs_v33/methods/auth_bindTempAuthKey.md index e3d72dd5..7419abb0 100644 --- a/old_docs/API_docs_v33/methods/auth_bindTempAuthKey.md +++ b/old_docs/API_docs_v33/methods/auth_bindTempAuthKey.md @@ -35,16 +35,13 @@ description: auth.bindTempAuthKey parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v33/methods/auth_checkPassword.md b/old_docs/API_docs_v33/methods/auth_checkPassword.md index d5559186..6b6b21cc 100644 --- a/old_docs/API_docs_v33/methods/auth_checkPassword.md +++ b/old_docs/API_docs_v33/methods/auth_checkPassword.md @@ -30,13 +30,10 @@ description: auth.checkPassword parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v33/methods/auth_checkPhone.md b/old_docs/API_docs_v33/methods/auth_checkPhone.md index 3455904d..f6cac2e6 100644 --- a/old_docs/API_docs_v33/methods/auth_checkPhone.md +++ b/old_docs/API_docs_v33/methods/auth_checkPhone.md @@ -32,13 +32,10 @@ description: auth.checkPhone parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v33/methods/auth_exportAuthorization.md b/old_docs/API_docs_v33/methods/auth_exportAuthorization.md index 44c45b70..cbc8203b 100644 --- a/old_docs/API_docs_v33/methods/auth_exportAuthorization.md +++ b/old_docs/API_docs_v33/methods/auth_exportAuthorization.md @@ -30,16 +30,13 @@ description: auth.exportAuthorization parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v33/methods/auth_importAuthorization.md b/old_docs/API_docs_v33/methods/auth_importAuthorization.md index e0fd534f..22166510 100644 --- a/old_docs/API_docs_v33/methods/auth_importAuthorization.md +++ b/old_docs/API_docs_v33/methods/auth_importAuthorization.md @@ -32,16 +32,13 @@ description: auth.importAuthorization parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v33/methods/auth_recoverPassword.md b/old_docs/API_docs_v33/methods/auth_recoverPassword.md index c2ce3fed..931e99fd 100644 --- a/old_docs/API_docs_v33/methods/auth_recoverPassword.md +++ b/old_docs/API_docs_v33/methods/auth_recoverPassword.md @@ -30,13 +30,10 @@ description: auth.recoverPassword parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v33/methods/auth_requestPasswordRecovery.md b/old_docs/API_docs_v33/methods/auth_requestPasswordRecovery.md index 101b1cf7..c6babcd9 100644 --- a/old_docs/API_docs_v33/methods/auth_requestPasswordRecovery.md +++ b/old_docs/API_docs_v33/methods/auth_requestPasswordRecovery.md @@ -25,13 +25,10 @@ description: auth.requestPasswordRecovery parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v33/methods/auth_resetAuthorizations.md b/old_docs/API_docs_v33/methods/auth_resetAuthorizations.md index 87a39a22..fe297fa7 100644 --- a/old_docs/API_docs_v33/methods/auth_resetAuthorizations.md +++ b/old_docs/API_docs_v33/methods/auth_resetAuthorizations.md @@ -25,13 +25,10 @@ description: auth.resetAuthorizations parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v33/methods/auth_sendCall.md b/old_docs/API_docs_v33/methods/auth_sendCall.md index 00eaff4e..386cfad4 100644 --- a/old_docs/API_docs_v33/methods/auth_sendCall.md +++ b/old_docs/API_docs_v33/methods/auth_sendCall.md @@ -24,16 +24,13 @@ description: auth.sendCall parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v33/methods/auth_sendInvites.md b/old_docs/API_docs_v33/methods/auth_sendInvites.md index 604fc65d..ad9636c5 100644 --- a/old_docs/API_docs_v33/methods/auth_sendInvites.md +++ b/old_docs/API_docs_v33/methods/auth_sendInvites.md @@ -31,13 +31,10 @@ description: auth.sendInvites parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v33/methods/auth_sendSms.md b/old_docs/API_docs_v33/methods/auth_sendSms.md index 6d942e97..9a214e65 100644 --- a/old_docs/API_docs_v33/methods/auth_sendSms.md +++ b/old_docs/API_docs_v33/methods/auth_sendSms.md @@ -24,16 +24,13 @@ description: auth.sendSms parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v33/methods/contacts_block.md b/old_docs/API_docs_v33/methods/contacts_block.md index d9d58e37..1c7cbe26 100644 --- a/old_docs/API_docs_v33/methods/contacts_block.md +++ b/old_docs/API_docs_v33/methods/contacts_block.md @@ -30,13 +30,10 @@ description: contacts.block parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v33/methods/contacts_deleteContact.md b/old_docs/API_docs_v33/methods/contacts_deleteContact.md index cd8c17ad..987a1be0 100644 --- a/old_docs/API_docs_v33/methods/contacts_deleteContact.md +++ b/old_docs/API_docs_v33/methods/contacts_deleteContact.md @@ -30,13 +30,10 @@ description: contacts.deleteContact parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v33/methods/contacts_deleteContacts.md b/old_docs/API_docs_v33/methods/contacts_deleteContacts.md index fc65880d..67a922ed 100644 --- a/old_docs/API_docs_v33/methods/contacts_deleteContacts.md +++ b/old_docs/API_docs_v33/methods/contacts_deleteContacts.md @@ -31,13 +31,10 @@ description: contacts.deleteContacts parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v33/methods/contacts_exportCard.md b/old_docs/API_docs_v33/methods/contacts_exportCard.md index 63508076..bf6d1f9f 100644 --- a/old_docs/API_docs_v33/methods/contacts_exportCard.md +++ b/old_docs/API_docs_v33/methods/contacts_exportCard.md @@ -18,13 +18,10 @@ description: contacts.exportCard parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v33/methods/contacts_getBlocked.md b/old_docs/API_docs_v33/methods/contacts_getBlocked.md index f50792b4..faa719da 100644 --- a/old_docs/API_docs_v33/methods/contacts_getBlocked.md +++ b/old_docs/API_docs_v33/methods/contacts_getBlocked.md @@ -24,13 +24,10 @@ description: contacts.getBlocked parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v33/methods/contacts_getContacts.md b/old_docs/API_docs_v33/methods/contacts_getContacts.md index 71313bf2..a6779111 100644 --- a/old_docs/API_docs_v33/methods/contacts_getContacts.md +++ b/old_docs/API_docs_v33/methods/contacts_getContacts.md @@ -23,13 +23,10 @@ description: contacts.getContacts parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v33/methods/contacts_getStatuses.md b/old_docs/API_docs_v33/methods/contacts_getStatuses.md index d914e08d..9bb7f263 100644 --- a/old_docs/API_docs_v33/methods/contacts_getStatuses.md +++ b/old_docs/API_docs_v33/methods/contacts_getStatuses.md @@ -18,13 +18,10 @@ description: contacts.getStatuses parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v33/methods/contacts_getSuggested.md b/old_docs/API_docs_v33/methods/contacts_getSuggested.md index a29f4aff..2059c01b 100644 --- a/old_docs/API_docs_v33/methods/contacts_getSuggested.md +++ b/old_docs/API_docs_v33/methods/contacts_getSuggested.md @@ -23,16 +23,13 @@ description: contacts.getSuggested parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v33/methods/contacts_importCard.md b/old_docs/API_docs_v33/methods/contacts_importCard.md index a6abf56d..7a2f34e1 100644 --- a/old_docs/API_docs_v33/methods/contacts_importCard.md +++ b/old_docs/API_docs_v33/methods/contacts_importCard.md @@ -31,13 +31,10 @@ description: contacts.importCard parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v33/methods/contacts_importContacts.md b/old_docs/API_docs_v33/methods/contacts_importContacts.md index db2051ac..2f070493 100644 --- a/old_docs/API_docs_v33/methods/contacts_importContacts.md +++ b/old_docs/API_docs_v33/methods/contacts_importContacts.md @@ -24,13 +24,10 @@ description: contacts.importContacts parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v33/methods/contacts_search.md b/old_docs/API_docs_v33/methods/contacts_search.md index 0203b160..70a0635e 100644 --- a/old_docs/API_docs_v33/methods/contacts_search.md +++ b/old_docs/API_docs_v33/methods/contacts_search.md @@ -33,13 +33,10 @@ description: contacts.search parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v33/methods/contacts_unblock.md b/old_docs/API_docs_v33/methods/contacts_unblock.md index a1977c24..9c01e42a 100644 --- a/old_docs/API_docs_v33/methods/contacts_unblock.md +++ b/old_docs/API_docs_v33/methods/contacts_unblock.md @@ -30,13 +30,10 @@ description: contacts.unblock parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v33/methods/geochats_checkin.md b/old_docs/API_docs_v33/methods/geochats_checkin.md index 68bff3b1..01559b90 100644 --- a/old_docs/API_docs_v33/methods/geochats_checkin.md +++ b/old_docs/API_docs_v33/methods/geochats_checkin.md @@ -23,16 +23,13 @@ description: geochats.checkin parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v33/methods/geochats_createGeoChat.md b/old_docs/API_docs_v33/methods/geochats_createGeoChat.md index ff5d0bcd..2916269c 100644 --- a/old_docs/API_docs_v33/methods/geochats_createGeoChat.md +++ b/old_docs/API_docs_v33/methods/geochats_createGeoChat.md @@ -26,16 +26,13 @@ description: geochats.createGeoChat parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v33/methods/geochats_editChatPhoto.md b/old_docs/API_docs_v33/methods/geochats_editChatPhoto.md index c7b8249f..f297ccaf 100644 --- a/old_docs/API_docs_v33/methods/geochats_editChatPhoto.md +++ b/old_docs/API_docs_v33/methods/geochats_editChatPhoto.md @@ -24,16 +24,13 @@ description: geochats.editChatPhoto parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v33/methods/geochats_editChatTitle.md b/old_docs/API_docs_v33/methods/geochats_editChatTitle.md index a3c4736a..1ec5a99d 100644 --- a/old_docs/API_docs_v33/methods/geochats_editChatTitle.md +++ b/old_docs/API_docs_v33/methods/geochats_editChatTitle.md @@ -25,16 +25,13 @@ description: geochats.editChatTitle parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v33/methods/geochats_getFullChat.md b/old_docs/API_docs_v33/methods/geochats_getFullChat.md index 168cc2df..cfd4e4a1 100644 --- a/old_docs/API_docs_v33/methods/geochats_getFullChat.md +++ b/old_docs/API_docs_v33/methods/geochats_getFullChat.md @@ -23,16 +23,13 @@ description: geochats.getFullChat parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v33/methods/geochats_getHistory.md b/old_docs/API_docs_v33/methods/geochats_getHistory.md index a2e065a1..03ecbccc 100644 --- a/old_docs/API_docs_v33/methods/geochats_getHistory.md +++ b/old_docs/API_docs_v33/methods/geochats_getHistory.md @@ -26,16 +26,13 @@ description: geochats.getHistory parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v33/methods/geochats_getLocated.md b/old_docs/API_docs_v33/methods/geochats_getLocated.md index 244ae266..0eff12c3 100644 --- a/old_docs/API_docs_v33/methods/geochats_getLocated.md +++ b/old_docs/API_docs_v33/methods/geochats_getLocated.md @@ -25,16 +25,13 @@ description: geochats.getLocated parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v33/methods/geochats_getRecents.md b/old_docs/API_docs_v33/methods/geochats_getRecents.md index c6e59ab0..eeb8cdf2 100644 --- a/old_docs/API_docs_v33/methods/geochats_getRecents.md +++ b/old_docs/API_docs_v33/methods/geochats_getRecents.md @@ -24,16 +24,13 @@ description: geochats.getRecents parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v33/methods/geochats_search.md b/old_docs/API_docs_v33/methods/geochats_search.md index dc73e068..d11b0cbd 100644 --- a/old_docs/API_docs_v33/methods/geochats_search.md +++ b/old_docs/API_docs_v33/methods/geochats_search.md @@ -30,16 +30,13 @@ description: geochats.search parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v33/methods/geochats_sendMedia.md b/old_docs/API_docs_v33/methods/geochats_sendMedia.md index 77de3f08..15389b39 100644 --- a/old_docs/API_docs_v33/methods/geochats_sendMedia.md +++ b/old_docs/API_docs_v33/methods/geochats_sendMedia.md @@ -24,16 +24,13 @@ description: geochats.sendMedia parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v33/methods/geochats_sendMessage.md b/old_docs/API_docs_v33/methods/geochats_sendMessage.md index cb9c3942..a7216056 100644 --- a/old_docs/API_docs_v33/methods/geochats_sendMessage.md +++ b/old_docs/API_docs_v33/methods/geochats_sendMessage.md @@ -24,16 +24,13 @@ description: geochats.sendMessage parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v33/methods/geochats_setTyping.md b/old_docs/API_docs_v33/methods/geochats_setTyping.md index 9aeaf274..12cb55fe 100644 --- a/old_docs/API_docs_v33/methods/geochats_setTyping.md +++ b/old_docs/API_docs_v33/methods/geochats_setTyping.md @@ -24,16 +24,13 @@ description: geochats.setTyping parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v33/methods/help_getAppChangelog.md b/old_docs/API_docs_v33/methods/help_getAppChangelog.md index 302809aa..b27cc9f0 100644 --- a/old_docs/API_docs_v33/methods/help_getAppChangelog.md +++ b/old_docs/API_docs_v33/methods/help_getAppChangelog.md @@ -26,13 +26,10 @@ description: help.getAppChangelog parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v33/methods/help_getAppUpdate.md b/old_docs/API_docs_v33/methods/help_getAppUpdate.md index c8e67402..7b3bdde9 100644 --- a/old_docs/API_docs_v33/methods/help_getAppUpdate.md +++ b/old_docs/API_docs_v33/methods/help_getAppUpdate.md @@ -26,13 +26,10 @@ description: help.getAppUpdate parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v33/methods/help_getConfig.md b/old_docs/API_docs_v33/methods/help_getConfig.md index e3648b5a..bb51b362 100644 --- a/old_docs/API_docs_v33/methods/help_getConfig.md +++ b/old_docs/API_docs_v33/methods/help_getConfig.md @@ -25,16 +25,13 @@ description: help.getConfig parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v33/methods/help_getInviteText.md b/old_docs/API_docs_v33/methods/help_getInviteText.md index 348de85d..40251dd5 100644 --- a/old_docs/API_docs_v33/methods/help_getInviteText.md +++ b/old_docs/API_docs_v33/methods/help_getInviteText.md @@ -23,13 +23,10 @@ description: help.getInviteText parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v33/methods/help_getNearestDc.md b/old_docs/API_docs_v33/methods/help_getNearestDc.md index c6f5c555..6d8ed3f7 100644 --- a/old_docs/API_docs_v33/methods/help_getNearestDc.md +++ b/old_docs/API_docs_v33/methods/help_getNearestDc.md @@ -18,13 +18,10 @@ description: help.getNearestDc parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v33/methods/help_getSupport.md b/old_docs/API_docs_v33/methods/help_getSupport.md index 209edf03..ca8db03c 100644 --- a/old_docs/API_docs_v33/methods/help_getSupport.md +++ b/old_docs/API_docs_v33/methods/help_getSupport.md @@ -18,13 +18,10 @@ description: help.getSupport parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v33/methods/help_saveAppLog.md b/old_docs/API_docs_v33/methods/help_saveAppLog.md index 4f06434c..741b9aa1 100644 --- a/old_docs/API_docs_v33/methods/help_saveAppLog.md +++ b/old_docs/API_docs_v33/methods/help_saveAppLog.md @@ -23,13 +23,10 @@ description: help.saveAppLog parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v33/methods/initConnection.md b/old_docs/API_docs_v33/methods/initConnection.md index 0d22a1cb..c0307677 100644 --- a/old_docs/API_docs_v33/methods/initConnection.md +++ b/old_docs/API_docs_v33/methods/initConnection.md @@ -36,16 +36,13 @@ description: initConnection parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v33/methods/invokeAfterMsg.md b/old_docs/API_docs_v33/methods/invokeAfterMsg.md index c139fe8c..a382429e 100644 --- a/old_docs/API_docs_v33/methods/invokeAfterMsg.md +++ b/old_docs/API_docs_v33/methods/invokeAfterMsg.md @@ -24,16 +24,13 @@ description: invokeAfterMsg parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v33/methods/invokeAfterMsgs.md b/old_docs/API_docs_v33/methods/invokeAfterMsgs.md index 35004296..169eedaf 100644 --- a/old_docs/API_docs_v33/methods/invokeAfterMsgs.md +++ b/old_docs/API_docs_v33/methods/invokeAfterMsgs.md @@ -24,16 +24,13 @@ description: invokeAfterMsgs parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v33/methods/invokeWithLayer.md b/old_docs/API_docs_v33/methods/invokeWithLayer.md index 706036c4..d9a2c74c 100644 --- a/old_docs/API_docs_v33/methods/invokeWithLayer.md +++ b/old_docs/API_docs_v33/methods/invokeWithLayer.md @@ -41,16 +41,13 @@ description: invokeWithLayer parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v33/methods/invokeWithoutUpdates.md b/old_docs/API_docs_v33/methods/invokeWithoutUpdates.md index 10c6bfcf..f7d01765 100644 --- a/old_docs/API_docs_v33/methods/invokeWithoutUpdates.md +++ b/old_docs/API_docs_v33/methods/invokeWithoutUpdates.md @@ -23,16 +23,13 @@ description: invokeWithoutUpdates parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v33/methods/messages_addChatUser.md b/old_docs/API_docs_v33/methods/messages_addChatUser.md index 00da5a61..b9e6243d 100644 --- a/old_docs/API_docs_v33/methods/messages_addChatUser.md +++ b/old_docs/API_docs_v33/methods/messages_addChatUser.md @@ -40,13 +40,10 @@ description: messages.addChatUser parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v33/methods/messages_checkChatInvite.md b/old_docs/API_docs_v33/methods/messages_checkChatInvite.md index c5eb1c06..c4489469 100644 --- a/old_docs/API_docs_v33/methods/messages_checkChatInvite.md +++ b/old_docs/API_docs_v33/methods/messages_checkChatInvite.md @@ -32,13 +32,10 @@ description: messages.checkChatInvite parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v33/methods/messages_createChat.md b/old_docs/API_docs_v33/methods/messages_createChat.md index c643a022..c6c8f420 100644 --- a/old_docs/API_docs_v33/methods/messages_createChat.md +++ b/old_docs/API_docs_v33/methods/messages_createChat.md @@ -32,13 +32,10 @@ description: messages.createChat parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v33/methods/messages_deleteChatUser.md b/old_docs/API_docs_v33/methods/messages_deleteChatUser.md index 3d75d9cf..4b8c2aa5 100644 --- a/old_docs/API_docs_v33/methods/messages_deleteChatUser.md +++ b/old_docs/API_docs_v33/methods/messages_deleteChatUser.md @@ -33,16 +33,13 @@ description: messages.deleteChatUser parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v33/methods/messages_deleteHistory.md b/old_docs/API_docs_v33/methods/messages_deleteHistory.md index b7a9417d..79b6c995 100644 --- a/old_docs/API_docs_v33/methods/messages_deleteHistory.md +++ b/old_docs/API_docs_v33/methods/messages_deleteHistory.md @@ -31,13 +31,10 @@ description: messages.deleteHistory parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v33/methods/messages_deleteMessages.md b/old_docs/API_docs_v33/methods/messages_deleteMessages.md index 65dbbc4a..38b3ca09 100644 --- a/old_docs/API_docs_v33/methods/messages_deleteMessages.md +++ b/old_docs/API_docs_v33/methods/messages_deleteMessages.md @@ -30,16 +30,13 @@ description: messages.deleteMessages parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v33/methods/messages_editChatPhoto.md b/old_docs/API_docs_v33/methods/messages_editChatPhoto.md index d225962d..8c5d9d47 100644 --- a/old_docs/API_docs_v33/methods/messages_editChatPhoto.md +++ b/old_docs/API_docs_v33/methods/messages_editChatPhoto.md @@ -35,16 +35,13 @@ description: messages.editChatPhoto parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v33/methods/messages_editChatTitle.md b/old_docs/API_docs_v33/methods/messages_editChatTitle.md index 5cb1c6d7..238c6d72 100644 --- a/old_docs/API_docs_v33/methods/messages_editChatTitle.md +++ b/old_docs/API_docs_v33/methods/messages_editChatTitle.md @@ -32,16 +32,13 @@ description: messages.editChatTitle parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v33/methods/messages_exportChatInvite.md b/old_docs/API_docs_v33/methods/messages_exportChatInvite.md index 4a6e28ff..78f2ff86 100644 --- a/old_docs/API_docs_v33/methods/messages_exportChatInvite.md +++ b/old_docs/API_docs_v33/methods/messages_exportChatInvite.md @@ -30,13 +30,10 @@ description: messages.exportChatInvite parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v33/methods/messages_forwardMessage.md b/old_docs/API_docs_v33/methods/messages_forwardMessage.md index 4e2362db..fbdbc955 100644 --- a/old_docs/API_docs_v33/methods/messages_forwardMessage.md +++ b/old_docs/API_docs_v33/methods/messages_forwardMessage.md @@ -34,16 +34,13 @@ description: messages.forwardMessage parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v33/methods/messages_forwardMessages.md b/old_docs/API_docs_v33/methods/messages_forwardMessages.md index 05131a0d..bb100295 100644 --- a/old_docs/API_docs_v33/methods/messages_forwardMessages.md +++ b/old_docs/API_docs_v33/methods/messages_forwardMessages.md @@ -52,16 +52,13 @@ description: messages.forwardMessages parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v33/methods/messages_getAllStickers.md b/old_docs/API_docs_v33/methods/messages_getAllStickers.md index defe31c1..3a0b3781 100644 --- a/old_docs/API_docs_v33/methods/messages_getAllStickers.md +++ b/old_docs/API_docs_v33/methods/messages_getAllStickers.md @@ -23,13 +23,10 @@ description: messages.getAllStickers parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v33/methods/messages_getChats.md b/old_docs/API_docs_v33/methods/messages_getChats.md index 6fa30cbd..c322613d 100644 --- a/old_docs/API_docs_v33/methods/messages_getChats.md +++ b/old_docs/API_docs_v33/methods/messages_getChats.md @@ -31,16 +31,13 @@ description: messages.getChats parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v33/methods/messages_getDhConfig.md b/old_docs/API_docs_v33/methods/messages_getDhConfig.md index aac3354d..f97684d2 100644 --- a/old_docs/API_docs_v33/methods/messages_getDhConfig.md +++ b/old_docs/API_docs_v33/methods/messages_getDhConfig.md @@ -31,13 +31,10 @@ description: messages.getDhConfig parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v33/methods/messages_getDialogs.md b/old_docs/API_docs_v33/methods/messages_getDialogs.md index e6ba4b14..6295612b 100644 --- a/old_docs/API_docs_v33/methods/messages_getDialogs.md +++ b/old_docs/API_docs_v33/methods/messages_getDialogs.md @@ -35,13 +35,10 @@ description: messages.getDialogs parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v33/methods/messages_getHistory.md b/old_docs/API_docs_v33/methods/messages_getHistory.md index d06a05a7..a41dac19 100644 --- a/old_docs/API_docs_v33/methods/messages_getHistory.md +++ b/old_docs/API_docs_v33/methods/messages_getHistory.md @@ -38,13 +38,10 @@ description: messages.getHistory parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v33/methods/messages_getMessages.md b/old_docs/API_docs_v33/methods/messages_getMessages.md index 5a970246..787c46dd 100644 --- a/old_docs/API_docs_v33/methods/messages_getMessages.md +++ b/old_docs/API_docs_v33/methods/messages_getMessages.md @@ -23,16 +23,13 @@ description: messages.getMessages parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v33/methods/messages_getStickerSet.md b/old_docs/API_docs_v33/methods/messages_getStickerSet.md index 59f33916..b480e0fe 100644 --- a/old_docs/API_docs_v33/methods/messages_getStickerSet.md +++ b/old_docs/API_docs_v33/methods/messages_getStickerSet.md @@ -30,16 +30,13 @@ description: messages.getStickerSet parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v33/methods/messages_getStickers.md b/old_docs/API_docs_v33/methods/messages_getStickers.md index be61a120..1587cd01 100644 --- a/old_docs/API_docs_v33/methods/messages_getStickers.md +++ b/old_docs/API_docs_v33/methods/messages_getStickers.md @@ -24,16 +24,13 @@ description: messages.getStickers parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v33/methods/messages_getWebPagePreview.md b/old_docs/API_docs_v33/methods/messages_getWebPagePreview.md index a89600b1..d3908933 100644 --- a/old_docs/API_docs_v33/methods/messages_getWebPagePreview.md +++ b/old_docs/API_docs_v33/methods/messages_getWebPagePreview.md @@ -23,13 +23,10 @@ description: messages.getWebPagePreview parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v33/methods/messages_importChatInvite.md b/old_docs/API_docs_v33/methods/messages_importChatInvite.md index 9d77304d..9dcfa56d 100644 --- a/old_docs/API_docs_v33/methods/messages_importChatInvite.md +++ b/old_docs/API_docs_v33/methods/messages_importChatInvite.md @@ -36,13 +36,10 @@ description: messages.importChatInvite parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v33/methods/messages_installStickerSet.md b/old_docs/API_docs_v33/methods/messages_installStickerSet.md index 1969d008..cf1865a8 100644 --- a/old_docs/API_docs_v33/methods/messages_installStickerSet.md +++ b/old_docs/API_docs_v33/methods/messages_installStickerSet.md @@ -31,13 +31,10 @@ description: messages.installStickerSet parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v33/methods/messages_readEncryptedHistory.md b/old_docs/API_docs_v33/methods/messages_readEncryptedHistory.md index 766ee07d..f38f6b07 100644 --- a/old_docs/API_docs_v33/methods/messages_readEncryptedHistory.md +++ b/old_docs/API_docs_v33/methods/messages_readEncryptedHistory.md @@ -31,16 +31,13 @@ description: messages.readEncryptedHistory parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v33/methods/messages_readHistory.md b/old_docs/API_docs_v33/methods/messages_readHistory.md index da833be8..fe332529 100644 --- a/old_docs/API_docs_v33/methods/messages_readHistory.md +++ b/old_docs/API_docs_v33/methods/messages_readHistory.md @@ -33,13 +33,10 @@ description: messages.readHistory parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v33/methods/messages_readMessageContents.md b/old_docs/API_docs_v33/methods/messages_readMessageContents.md index 4b1abda0..7a6055fc 100644 --- a/old_docs/API_docs_v33/methods/messages_readMessageContents.md +++ b/old_docs/API_docs_v33/methods/messages_readMessageContents.md @@ -23,13 +23,10 @@ description: messages.readMessageContents parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v33/methods/messages_receivedMessages.md b/old_docs/API_docs_v33/methods/messages_receivedMessages.md index 588ac5cf..e2cf3a2f 100644 --- a/old_docs/API_docs_v33/methods/messages_receivedMessages.md +++ b/old_docs/API_docs_v33/methods/messages_receivedMessages.md @@ -23,13 +23,10 @@ description: messages.receivedMessages parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v33/methods/messages_receivedQueue.md b/old_docs/API_docs_v33/methods/messages_receivedQueue.md index 3c7f1d4f..38f504b3 100644 --- a/old_docs/API_docs_v33/methods/messages_receivedQueue.md +++ b/old_docs/API_docs_v33/methods/messages_receivedQueue.md @@ -30,16 +30,13 @@ description: messages.receivedQueue parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v33/methods/messages_search.md b/old_docs/API_docs_v33/methods/messages_search.md index 87073d00..1e809cf2 100644 --- a/old_docs/API_docs_v33/methods/messages_search.md +++ b/old_docs/API_docs_v33/methods/messages_search.md @@ -43,13 +43,10 @@ description: messages.search parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v33/methods/messages_sendBroadcast.md b/old_docs/API_docs_v33/methods/messages_sendBroadcast.md index ac13d0bf..537166ab 100644 --- a/old_docs/API_docs_v33/methods/messages_sendBroadcast.md +++ b/old_docs/API_docs_v33/methods/messages_sendBroadcast.md @@ -25,16 +25,13 @@ description: messages.sendBroadcast parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v33/methods/messages_sendEncrypted.md b/old_docs/API_docs_v33/methods/messages_sendEncrypted.md index 82eeec92..ba9f796b 100644 --- a/old_docs/API_docs_v33/methods/messages_sendEncrypted.md +++ b/old_docs/API_docs_v33/methods/messages_sendEncrypted.md @@ -34,16 +34,13 @@ description: messages.sendEncrypted parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v33/methods/messages_sendEncryptedFile.md b/old_docs/API_docs_v33/methods/messages_sendEncryptedFile.md index 8f7a73d9..db16bf2d 100644 --- a/old_docs/API_docs_v33/methods/messages_sendEncryptedFile.md +++ b/old_docs/API_docs_v33/methods/messages_sendEncryptedFile.md @@ -32,16 +32,13 @@ description: messages.sendEncryptedFile parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v33/methods/messages_sendEncryptedService.md b/old_docs/API_docs_v33/methods/messages_sendEncryptedService.md index d427f6c3..fd4e2627 100644 --- a/old_docs/API_docs_v33/methods/messages_sendEncryptedService.md +++ b/old_docs/API_docs_v33/methods/messages_sendEncryptedService.md @@ -34,16 +34,13 @@ description: messages.sendEncryptedService parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v33/methods/messages_sendMedia.md b/old_docs/API_docs_v33/methods/messages_sendMedia.md index ba40b16f..689469e0 100644 --- a/old_docs/API_docs_v33/methods/messages_sendMedia.md +++ b/old_docs/API_docs_v33/methods/messages_sendMedia.md @@ -56,16 +56,13 @@ description: messages.sendMedia parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v33/methods/messages_sendMessage.md b/old_docs/API_docs_v33/methods/messages_sendMessage.md index c3bc8d9e..9396e712 100644 --- a/old_docs/API_docs_v33/methods/messages_sendMessage.md +++ b/old_docs/API_docs_v33/methods/messages_sendMessage.md @@ -52,16 +52,13 @@ description: messages.sendMessage parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v33/methods/messages_setEncryptedTyping.md b/old_docs/API_docs_v33/methods/messages_setEncryptedTyping.md index a05b94dd..aeae6ff7 100644 --- a/old_docs/API_docs_v33/methods/messages_setEncryptedTyping.md +++ b/old_docs/API_docs_v33/methods/messages_setEncryptedTyping.md @@ -31,13 +31,10 @@ description: messages.setEncryptedTyping parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v33/methods/messages_setTyping.md b/old_docs/API_docs_v33/methods/messages_setTyping.md index 9ef8caf5..f6b7b7b5 100644 --- a/old_docs/API_docs_v33/methods/messages_setTyping.md +++ b/old_docs/API_docs_v33/methods/messages_setTyping.md @@ -37,16 +37,13 @@ description: messages.setTyping parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v33/methods/messages_startBot.md b/old_docs/API_docs_v33/methods/messages_startBot.md index b4b18673..b5dc2d63 100644 --- a/old_docs/API_docs_v33/methods/messages_startBot.md +++ b/old_docs/API_docs_v33/methods/messages_startBot.md @@ -35,13 +35,10 @@ description: messages.startBot parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v33/methods/messages_uninstallStickerSet.md b/old_docs/API_docs_v33/methods/messages_uninstallStickerSet.md index 6763e64f..76a3e3e2 100644 --- a/old_docs/API_docs_v33/methods/messages_uninstallStickerSet.md +++ b/old_docs/API_docs_v33/methods/messages_uninstallStickerSet.md @@ -30,13 +30,10 @@ description: messages.uninstallStickerSet parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v33/methods/photos_deletePhotos.md b/old_docs/API_docs_v33/methods/photos_deletePhotos.md index e9cd459d..61768b1e 100644 --- a/old_docs/API_docs_v33/methods/photos_deletePhotos.md +++ b/old_docs/API_docs_v33/methods/photos_deletePhotos.md @@ -23,13 +23,10 @@ description: photos.deletePhotos parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v33/methods/photos_getUserPhotos.md b/old_docs/API_docs_v33/methods/photos_getUserPhotos.md index d6c2a380..095363e7 100644 --- a/old_docs/API_docs_v33/methods/photos_getUserPhotos.md +++ b/old_docs/API_docs_v33/methods/photos_getUserPhotos.md @@ -34,16 +34,13 @@ description: photos.getUserPhotos parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v33/methods/photos_updateProfilePhoto.md b/old_docs/API_docs_v33/methods/photos_updateProfilePhoto.md index abb031d4..add6028f 100644 --- a/old_docs/API_docs_v33/methods/photos_updateProfilePhoto.md +++ b/old_docs/API_docs_v33/methods/photos_updateProfilePhoto.md @@ -24,13 +24,10 @@ description: photos.updateProfilePhoto parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v33/methods/photos_uploadProfilePhoto.md b/old_docs/API_docs_v33/methods/photos_uploadProfilePhoto.md index ae20fdfc..048a1d32 100644 --- a/old_docs/API_docs_v33/methods/photos_uploadProfilePhoto.md +++ b/old_docs/API_docs_v33/methods/photos_uploadProfilePhoto.md @@ -37,13 +37,10 @@ description: photos.uploadProfilePhoto parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v33/methods/users_getUsers.md b/old_docs/API_docs_v33/methods/users_getUsers.md index 6a44d258..3a981d57 100644 --- a/old_docs/API_docs_v33/methods/users_getUsers.md +++ b/old_docs/API_docs_v33/methods/users_getUsers.md @@ -33,16 +33,13 @@ description: users.getUsers parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v38/methods/account_changePhone.md b/old_docs/API_docs_v38/methods/account_changePhone.md index 5d1801d0..e47ef6a7 100644 --- a/old_docs/API_docs_v38/methods/account_changePhone.md +++ b/old_docs/API_docs_v38/methods/account_changePhone.md @@ -32,13 +32,10 @@ description: account.changePhone parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v38/methods/account_checkUsername.md b/old_docs/API_docs_v38/methods/account_checkUsername.md index afc59b6c..40cf822f 100644 --- a/old_docs/API_docs_v38/methods/account_checkUsername.md +++ b/old_docs/API_docs_v38/methods/account_checkUsername.md @@ -30,13 +30,10 @@ description: account.checkUsername parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v38/methods/account_deleteAccount.md b/old_docs/API_docs_v38/methods/account_deleteAccount.md index 5abcd0ec..6f1bbda9 100644 --- a/old_docs/API_docs_v38/methods/account_deleteAccount.md +++ b/old_docs/API_docs_v38/methods/account_deleteAccount.md @@ -23,13 +23,10 @@ description: account.deleteAccount parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v38/methods/account_getAccountTTL.md b/old_docs/API_docs_v38/methods/account_getAccountTTL.md index 3520fbef..538b1d7a 100644 --- a/old_docs/API_docs_v38/methods/account_getAccountTTL.md +++ b/old_docs/API_docs_v38/methods/account_getAccountTTL.md @@ -18,13 +18,10 @@ description: account.getAccountTTL parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v38/methods/account_getAuthorizations.md b/old_docs/API_docs_v38/methods/account_getAuthorizations.md index 91bbce5e..f138d517 100644 --- a/old_docs/API_docs_v38/methods/account_getAuthorizations.md +++ b/old_docs/API_docs_v38/methods/account_getAuthorizations.md @@ -18,13 +18,10 @@ description: account.getAuthorizations parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v38/methods/account_getNotifySettings.md b/old_docs/API_docs_v38/methods/account_getNotifySettings.md index 8ee710d8..a48eed2f 100644 --- a/old_docs/API_docs_v38/methods/account_getNotifySettings.md +++ b/old_docs/API_docs_v38/methods/account_getNotifySettings.md @@ -30,13 +30,10 @@ description: account.getNotifySettings parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v38/methods/account_getPassword.md b/old_docs/API_docs_v38/methods/account_getPassword.md index 4d9fd015..1abf6174 100644 --- a/old_docs/API_docs_v38/methods/account_getPassword.md +++ b/old_docs/API_docs_v38/methods/account_getPassword.md @@ -18,13 +18,10 @@ description: account.getPassword parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v38/methods/account_getPasswordSettings.md b/old_docs/API_docs_v38/methods/account_getPasswordSettings.md index 02cb77f7..aec5b989 100644 --- a/old_docs/API_docs_v38/methods/account_getPasswordSettings.md +++ b/old_docs/API_docs_v38/methods/account_getPasswordSettings.md @@ -30,13 +30,10 @@ description: account.getPasswordSettings parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v38/methods/account_getPrivacy.md b/old_docs/API_docs_v38/methods/account_getPrivacy.md index 52786b79..8bbe9795 100644 --- a/old_docs/API_docs_v38/methods/account_getPrivacy.md +++ b/old_docs/API_docs_v38/methods/account_getPrivacy.md @@ -30,13 +30,10 @@ description: account.getPrivacy parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v38/methods/account_getWallPapers.md b/old_docs/API_docs_v38/methods/account_getWallPapers.md index 88c8a701..a71543d0 100644 --- a/old_docs/API_docs_v38/methods/account_getWallPapers.md +++ b/old_docs/API_docs_v38/methods/account_getWallPapers.md @@ -18,13 +18,10 @@ description: account.getWallPapers parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v38/methods/account_registerDevice.md b/old_docs/API_docs_v38/methods/account_registerDevice.md index ab7ec933..cfa1546c 100644 --- a/old_docs/API_docs_v38/methods/account_registerDevice.md +++ b/old_docs/API_docs_v38/methods/account_registerDevice.md @@ -36,13 +36,10 @@ description: account.registerDevice parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v38/methods/account_resetAuthorization.md b/old_docs/API_docs_v38/methods/account_resetAuthorization.md index e44334f2..0438cba3 100644 --- a/old_docs/API_docs_v38/methods/account_resetAuthorization.md +++ b/old_docs/API_docs_v38/methods/account_resetAuthorization.md @@ -30,13 +30,10 @@ description: account.resetAuthorization parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v38/methods/account_resetNotifySettings.md b/old_docs/API_docs_v38/methods/account_resetNotifySettings.md index 155ede68..92db4f4f 100644 --- a/old_docs/API_docs_v38/methods/account_resetNotifySettings.md +++ b/old_docs/API_docs_v38/methods/account_resetNotifySettings.md @@ -18,13 +18,10 @@ description: account.resetNotifySettings parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v38/methods/account_sendChangePhoneCode.md b/old_docs/API_docs_v38/methods/account_sendChangePhoneCode.md index 650dba72..ad611a8b 100644 --- a/old_docs/API_docs_v38/methods/account_sendChangePhoneCode.md +++ b/old_docs/API_docs_v38/methods/account_sendChangePhoneCode.md @@ -30,13 +30,10 @@ description: account.sendChangePhoneCode parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v38/methods/account_setAccountTTL.md b/old_docs/API_docs_v38/methods/account_setAccountTTL.md index f06eb676..d08f59fb 100644 --- a/old_docs/API_docs_v38/methods/account_setAccountTTL.md +++ b/old_docs/API_docs_v38/methods/account_setAccountTTL.md @@ -30,13 +30,10 @@ description: account.setAccountTTL parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v38/methods/account_setPrivacy.md b/old_docs/API_docs_v38/methods/account_setPrivacy.md index 56aebbcc..401aa71c 100644 --- a/old_docs/API_docs_v38/methods/account_setPrivacy.md +++ b/old_docs/API_docs_v38/methods/account_setPrivacy.md @@ -31,13 +31,10 @@ description: account.setPrivacy parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v38/methods/account_unregisterDevice.md b/old_docs/API_docs_v38/methods/account_unregisterDevice.md index 41899b6e..283ec7d2 100644 --- a/old_docs/API_docs_v38/methods/account_unregisterDevice.md +++ b/old_docs/API_docs_v38/methods/account_unregisterDevice.md @@ -31,13 +31,10 @@ description: account.unregisterDevice parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v38/methods/account_updateDeviceLocked.md b/old_docs/API_docs_v38/methods/account_updateDeviceLocked.md index 37aeb59d..ae6125a5 100644 --- a/old_docs/API_docs_v38/methods/account_updateDeviceLocked.md +++ b/old_docs/API_docs_v38/methods/account_updateDeviceLocked.md @@ -23,13 +23,10 @@ description: account.updateDeviceLocked parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v38/methods/account_updateNotifySettings.md b/old_docs/API_docs_v38/methods/account_updateNotifySettings.md index 8389b5c2..fb096250 100644 --- a/old_docs/API_docs_v38/methods/account_updateNotifySettings.md +++ b/old_docs/API_docs_v38/methods/account_updateNotifySettings.md @@ -31,13 +31,10 @@ description: account.updateNotifySettings parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v38/methods/account_updatePasswordSettings.md b/old_docs/API_docs_v38/methods/account_updatePasswordSettings.md index b7c8da4b..ffa8dcd9 100644 --- a/old_docs/API_docs_v38/methods/account_updatePasswordSettings.md +++ b/old_docs/API_docs_v38/methods/account_updatePasswordSettings.md @@ -34,13 +34,10 @@ description: account.updatePasswordSettings parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v38/methods/account_updateProfile.md b/old_docs/API_docs_v38/methods/account_updateProfile.md index c8712074..123ed13a 100644 --- a/old_docs/API_docs_v38/methods/account_updateProfile.md +++ b/old_docs/API_docs_v38/methods/account_updateProfile.md @@ -32,13 +32,10 @@ description: account.updateProfile parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v38/methods/account_updateStatus.md b/old_docs/API_docs_v38/methods/account_updateStatus.md index 7204e582..c8fa0a79 100644 --- a/old_docs/API_docs_v38/methods/account_updateStatus.md +++ b/old_docs/API_docs_v38/methods/account_updateStatus.md @@ -30,13 +30,10 @@ description: account.updateStatus parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v38/methods/account_updateUsername.md b/old_docs/API_docs_v38/methods/account_updateUsername.md index 22be2fd4..2b7576a5 100644 --- a/old_docs/API_docs_v38/methods/account_updateUsername.md +++ b/old_docs/API_docs_v38/methods/account_updateUsername.md @@ -32,13 +32,10 @@ description: account.updateUsername parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v38/methods/auth_bindTempAuthKey.md b/old_docs/API_docs_v38/methods/auth_bindTempAuthKey.md index e3d72dd5..7419abb0 100644 --- a/old_docs/API_docs_v38/methods/auth_bindTempAuthKey.md +++ b/old_docs/API_docs_v38/methods/auth_bindTempAuthKey.md @@ -35,16 +35,13 @@ description: auth.bindTempAuthKey parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v38/methods/auth_checkPassword.md b/old_docs/API_docs_v38/methods/auth_checkPassword.md index d5559186..6b6b21cc 100644 --- a/old_docs/API_docs_v38/methods/auth_checkPassword.md +++ b/old_docs/API_docs_v38/methods/auth_checkPassword.md @@ -30,13 +30,10 @@ description: auth.checkPassword parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v38/methods/auth_checkPhone.md b/old_docs/API_docs_v38/methods/auth_checkPhone.md index 3455904d..f6cac2e6 100644 --- a/old_docs/API_docs_v38/methods/auth_checkPhone.md +++ b/old_docs/API_docs_v38/methods/auth_checkPhone.md @@ -32,13 +32,10 @@ description: auth.checkPhone parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v38/methods/auth_exportAuthorization.md b/old_docs/API_docs_v38/methods/auth_exportAuthorization.md index 44c45b70..cbc8203b 100644 --- a/old_docs/API_docs_v38/methods/auth_exportAuthorization.md +++ b/old_docs/API_docs_v38/methods/auth_exportAuthorization.md @@ -30,16 +30,13 @@ description: auth.exportAuthorization parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v38/methods/auth_importAuthorization.md b/old_docs/API_docs_v38/methods/auth_importAuthorization.md index e0fd534f..22166510 100644 --- a/old_docs/API_docs_v38/methods/auth_importAuthorization.md +++ b/old_docs/API_docs_v38/methods/auth_importAuthorization.md @@ -32,16 +32,13 @@ description: auth.importAuthorization parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v38/methods/auth_recoverPassword.md b/old_docs/API_docs_v38/methods/auth_recoverPassword.md index c2ce3fed..931e99fd 100644 --- a/old_docs/API_docs_v38/methods/auth_recoverPassword.md +++ b/old_docs/API_docs_v38/methods/auth_recoverPassword.md @@ -30,13 +30,10 @@ description: auth.recoverPassword parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v38/methods/auth_requestPasswordRecovery.md b/old_docs/API_docs_v38/methods/auth_requestPasswordRecovery.md index 101b1cf7..c6babcd9 100644 --- a/old_docs/API_docs_v38/methods/auth_requestPasswordRecovery.md +++ b/old_docs/API_docs_v38/methods/auth_requestPasswordRecovery.md @@ -25,13 +25,10 @@ description: auth.requestPasswordRecovery parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v38/methods/auth_resetAuthorizations.md b/old_docs/API_docs_v38/methods/auth_resetAuthorizations.md index 87a39a22..fe297fa7 100644 --- a/old_docs/API_docs_v38/methods/auth_resetAuthorizations.md +++ b/old_docs/API_docs_v38/methods/auth_resetAuthorizations.md @@ -25,13 +25,10 @@ description: auth.resetAuthorizations parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v38/methods/auth_sendCall.md b/old_docs/API_docs_v38/methods/auth_sendCall.md index 00eaff4e..386cfad4 100644 --- a/old_docs/API_docs_v38/methods/auth_sendCall.md +++ b/old_docs/API_docs_v38/methods/auth_sendCall.md @@ -24,16 +24,13 @@ description: auth.sendCall parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v38/methods/auth_sendInvites.md b/old_docs/API_docs_v38/methods/auth_sendInvites.md index 604fc65d..ad9636c5 100644 --- a/old_docs/API_docs_v38/methods/auth_sendInvites.md +++ b/old_docs/API_docs_v38/methods/auth_sendInvites.md @@ -31,13 +31,10 @@ description: auth.sendInvites parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v38/methods/auth_sendSms.md b/old_docs/API_docs_v38/methods/auth_sendSms.md index 6d942e97..9a214e65 100644 --- a/old_docs/API_docs_v38/methods/auth_sendSms.md +++ b/old_docs/API_docs_v38/methods/auth_sendSms.md @@ -24,16 +24,13 @@ description: auth.sendSms parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v38/methods/channels_checkUsername.md b/old_docs/API_docs_v38/methods/channels_checkUsername.md index d6ea876d..e29ee107 100644 --- a/old_docs/API_docs_v38/methods/channels_checkUsername.md +++ b/old_docs/API_docs_v38/methods/channels_checkUsername.md @@ -33,13 +33,10 @@ description: channels.checkUsername parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v38/methods/channels_createChannel.md b/old_docs/API_docs_v38/methods/channels_createChannel.md index 728d7e8a..dbe68d1f 100644 --- a/old_docs/API_docs_v38/methods/channels_createChannel.md +++ b/old_docs/API_docs_v38/methods/channels_createChannel.md @@ -33,13 +33,10 @@ description: channels.createChannel parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v38/methods/channels_deleteChannel.md b/old_docs/API_docs_v38/methods/channels_deleteChannel.md index 912ab080..532f3c6c 100644 --- a/old_docs/API_docs_v38/methods/channels_deleteChannel.md +++ b/old_docs/API_docs_v38/methods/channels_deleteChannel.md @@ -31,13 +31,10 @@ description: channels.deleteChannel parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v38/methods/channels_deleteMessages.md b/old_docs/API_docs_v38/methods/channels_deleteMessages.md index b3481294..a42a47a5 100644 --- a/old_docs/API_docs_v38/methods/channels_deleteMessages.md +++ b/old_docs/API_docs_v38/methods/channels_deleteMessages.md @@ -33,16 +33,13 @@ description: channels.deleteMessages parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v38/methods/channels_deleteUserHistory.md b/old_docs/API_docs_v38/methods/channels_deleteUserHistory.md index 66843269..73494485 100644 --- a/old_docs/API_docs_v38/methods/channels_deleteUserHistory.md +++ b/old_docs/API_docs_v38/methods/channels_deleteUserHistory.md @@ -32,13 +32,10 @@ description: channels.deleteUserHistory parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v38/methods/channels_editAbout.md b/old_docs/API_docs_v38/methods/channels_editAbout.md index 4c759a8a..1c3ce933 100644 --- a/old_docs/API_docs_v38/methods/channels_editAbout.md +++ b/old_docs/API_docs_v38/methods/channels_editAbout.md @@ -34,16 +34,13 @@ description: channels.editAbout parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v38/methods/channels_editAdmin.md b/old_docs/API_docs_v38/methods/channels_editAdmin.md index fda46a3b..e6f63218 100644 --- a/old_docs/API_docs_v38/methods/channels_editAdmin.md +++ b/old_docs/API_docs_v38/methods/channels_editAdmin.md @@ -41,16 +41,13 @@ description: channels.editAdmin parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v38/methods/channels_editPhoto.md b/old_docs/API_docs_v38/methods/channels_editPhoto.md index 99873537..4a4aeb03 100644 --- a/old_docs/API_docs_v38/methods/channels_editPhoto.md +++ b/old_docs/API_docs_v38/methods/channels_editPhoto.md @@ -33,16 +33,13 @@ description: channels.editPhoto parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v38/methods/channels_editTitle.md b/old_docs/API_docs_v38/methods/channels_editTitle.md index 04e8ce12..8a69d09b 100644 --- a/old_docs/API_docs_v38/methods/channels_editTitle.md +++ b/old_docs/API_docs_v38/methods/channels_editTitle.md @@ -33,16 +33,13 @@ description: channels.editTitle parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v38/methods/channels_exportInvite.md b/old_docs/API_docs_v38/methods/channels_exportInvite.md index 2ed80f6c..79dc6401 100644 --- a/old_docs/API_docs_v38/methods/channels_exportInvite.md +++ b/old_docs/API_docs_v38/methods/channels_exportInvite.md @@ -32,16 +32,13 @@ description: channels.exportInvite parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v38/methods/channels_getChannels.md b/old_docs/API_docs_v38/methods/channels_getChannels.md index 13304938..e80aa6a6 100644 --- a/old_docs/API_docs_v38/methods/channels_getChannels.md +++ b/old_docs/API_docs_v38/methods/channels_getChannels.md @@ -32,16 +32,13 @@ description: channels.getChannels parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v38/methods/channels_getDialogs.md b/old_docs/API_docs_v38/methods/channels_getDialogs.md index 854372f6..916f9b34 100644 --- a/old_docs/API_docs_v38/methods/channels_getDialogs.md +++ b/old_docs/API_docs_v38/methods/channels_getDialogs.md @@ -24,16 +24,13 @@ description: channels.getDialogs parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v38/methods/channels_getImportantHistory.md b/old_docs/API_docs_v38/methods/channels_getImportantHistory.md index 076315a3..a7c73057 100644 --- a/old_docs/API_docs_v38/methods/channels_getImportantHistory.md +++ b/old_docs/API_docs_v38/methods/channels_getImportantHistory.md @@ -28,16 +28,13 @@ description: channels.getImportantHistory parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v38/methods/channels_getMessages.md b/old_docs/API_docs_v38/methods/channels_getMessages.md index 5480dd86..dc392773 100644 --- a/old_docs/API_docs_v38/methods/channels_getMessages.md +++ b/old_docs/API_docs_v38/methods/channels_getMessages.md @@ -33,16 +33,13 @@ description: channels.getMessages parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v38/methods/channels_getParticipant.md b/old_docs/API_docs_v38/methods/channels_getParticipant.md index 8c7e3cbd..001bf115 100644 --- a/old_docs/API_docs_v38/methods/channels_getParticipant.md +++ b/old_docs/API_docs_v38/methods/channels_getParticipant.md @@ -35,16 +35,13 @@ description: channels.getParticipant parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v38/methods/channels_inviteToChannel.md b/old_docs/API_docs_v38/methods/channels_inviteToChannel.md index cf5480e0..2448fb84 100644 --- a/old_docs/API_docs_v38/methods/channels_inviteToChannel.md +++ b/old_docs/API_docs_v38/methods/channels_inviteToChannel.md @@ -46,13 +46,10 @@ description: channels.inviteToChannel parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v38/methods/channels_joinChannel.md b/old_docs/API_docs_v38/methods/channels_joinChannel.md index f31730a1..e746cf48 100644 --- a/old_docs/API_docs_v38/methods/channels_joinChannel.md +++ b/old_docs/API_docs_v38/methods/channels_joinChannel.md @@ -32,13 +32,10 @@ description: channels.joinChannel parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v38/methods/channels_kickFromChannel.md b/old_docs/API_docs_v38/methods/channels_kickFromChannel.md index c903caa4..c85833ce 100644 --- a/old_docs/API_docs_v38/methods/channels_kickFromChannel.md +++ b/old_docs/API_docs_v38/methods/channels_kickFromChannel.md @@ -25,16 +25,13 @@ description: channels.kickFromChannel parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v38/methods/channels_leaveChannel.md b/old_docs/API_docs_v38/methods/channels_leaveChannel.md index 12902f6d..ff244ded 100644 --- a/old_docs/API_docs_v38/methods/channels_leaveChannel.md +++ b/old_docs/API_docs_v38/methods/channels_leaveChannel.md @@ -34,16 +34,13 @@ description: channels.leaveChannel parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v38/methods/channels_readHistory.md b/old_docs/API_docs_v38/methods/channels_readHistory.md index be979101..6fc6ec0e 100644 --- a/old_docs/API_docs_v38/methods/channels_readHistory.md +++ b/old_docs/API_docs_v38/methods/channels_readHistory.md @@ -32,13 +32,10 @@ description: channels.readHistory parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v38/methods/channels_reportSpam.md b/old_docs/API_docs_v38/methods/channels_reportSpam.md index 22f34443..a37a5833 100644 --- a/old_docs/API_docs_v38/methods/channels_reportSpam.md +++ b/old_docs/API_docs_v38/methods/channels_reportSpam.md @@ -33,13 +33,10 @@ description: channels.reportSpam parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v38/methods/channels_toggleComments.md b/old_docs/API_docs_v38/methods/channels_toggleComments.md index 55da95b5..1b304615 100644 --- a/old_docs/API_docs_v38/methods/channels_toggleComments.md +++ b/old_docs/API_docs_v38/methods/channels_toggleComments.md @@ -24,16 +24,13 @@ description: channels.toggleComments parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v38/methods/channels_updateUsername.md b/old_docs/API_docs_v38/methods/channels_updateUsername.md index c2ede724..1f1f111e 100644 --- a/old_docs/API_docs_v38/methods/channels_updateUsername.md +++ b/old_docs/API_docs_v38/methods/channels_updateUsername.md @@ -35,13 +35,10 @@ description: channels.updateUsername parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v38/methods/contacts_block.md b/old_docs/API_docs_v38/methods/contacts_block.md index d9d58e37..1c7cbe26 100644 --- a/old_docs/API_docs_v38/methods/contacts_block.md +++ b/old_docs/API_docs_v38/methods/contacts_block.md @@ -30,13 +30,10 @@ description: contacts.block parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v38/methods/contacts_deleteContact.md b/old_docs/API_docs_v38/methods/contacts_deleteContact.md index cd8c17ad..987a1be0 100644 --- a/old_docs/API_docs_v38/methods/contacts_deleteContact.md +++ b/old_docs/API_docs_v38/methods/contacts_deleteContact.md @@ -30,13 +30,10 @@ description: contacts.deleteContact parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v38/methods/contacts_deleteContacts.md b/old_docs/API_docs_v38/methods/contacts_deleteContacts.md index fc65880d..67a922ed 100644 --- a/old_docs/API_docs_v38/methods/contacts_deleteContacts.md +++ b/old_docs/API_docs_v38/methods/contacts_deleteContacts.md @@ -31,13 +31,10 @@ description: contacts.deleteContacts parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v38/methods/contacts_exportCard.md b/old_docs/API_docs_v38/methods/contacts_exportCard.md index 63508076..bf6d1f9f 100644 --- a/old_docs/API_docs_v38/methods/contacts_exportCard.md +++ b/old_docs/API_docs_v38/methods/contacts_exportCard.md @@ -18,13 +18,10 @@ description: contacts.exportCard parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v38/methods/contacts_getBlocked.md b/old_docs/API_docs_v38/methods/contacts_getBlocked.md index f50792b4..faa719da 100644 --- a/old_docs/API_docs_v38/methods/contacts_getBlocked.md +++ b/old_docs/API_docs_v38/methods/contacts_getBlocked.md @@ -24,13 +24,10 @@ description: contacts.getBlocked parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v38/methods/contacts_getContacts.md b/old_docs/API_docs_v38/methods/contacts_getContacts.md index 71313bf2..a6779111 100644 --- a/old_docs/API_docs_v38/methods/contacts_getContacts.md +++ b/old_docs/API_docs_v38/methods/contacts_getContacts.md @@ -23,13 +23,10 @@ description: contacts.getContacts parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v38/methods/contacts_getStatuses.md b/old_docs/API_docs_v38/methods/contacts_getStatuses.md index d914e08d..9bb7f263 100644 --- a/old_docs/API_docs_v38/methods/contacts_getStatuses.md +++ b/old_docs/API_docs_v38/methods/contacts_getStatuses.md @@ -18,13 +18,10 @@ description: contacts.getStatuses parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v38/methods/contacts_getSuggested.md b/old_docs/API_docs_v38/methods/contacts_getSuggested.md index a29f4aff..2059c01b 100644 --- a/old_docs/API_docs_v38/methods/contacts_getSuggested.md +++ b/old_docs/API_docs_v38/methods/contacts_getSuggested.md @@ -23,16 +23,13 @@ description: contacts.getSuggested parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v38/methods/contacts_importCard.md b/old_docs/API_docs_v38/methods/contacts_importCard.md index a6abf56d..7a2f34e1 100644 --- a/old_docs/API_docs_v38/methods/contacts_importCard.md +++ b/old_docs/API_docs_v38/methods/contacts_importCard.md @@ -31,13 +31,10 @@ description: contacts.importCard parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v38/methods/contacts_importContacts.md b/old_docs/API_docs_v38/methods/contacts_importContacts.md index db2051ac..2f070493 100644 --- a/old_docs/API_docs_v38/methods/contacts_importContacts.md +++ b/old_docs/API_docs_v38/methods/contacts_importContacts.md @@ -24,13 +24,10 @@ description: contacts.importContacts parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v38/methods/contacts_search.md b/old_docs/API_docs_v38/methods/contacts_search.md index 0203b160..70a0635e 100644 --- a/old_docs/API_docs_v38/methods/contacts_search.md +++ b/old_docs/API_docs_v38/methods/contacts_search.md @@ -33,13 +33,10 @@ description: contacts.search parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v38/methods/contacts_unblock.md b/old_docs/API_docs_v38/methods/contacts_unblock.md index a1977c24..9c01e42a 100644 --- a/old_docs/API_docs_v38/methods/contacts_unblock.md +++ b/old_docs/API_docs_v38/methods/contacts_unblock.md @@ -30,13 +30,10 @@ description: contacts.unblock parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v38/methods/help_getAppChangelog.md b/old_docs/API_docs_v38/methods/help_getAppChangelog.md index 302809aa..b27cc9f0 100644 --- a/old_docs/API_docs_v38/methods/help_getAppChangelog.md +++ b/old_docs/API_docs_v38/methods/help_getAppChangelog.md @@ -26,13 +26,10 @@ description: help.getAppChangelog parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v38/methods/help_getAppUpdate.md b/old_docs/API_docs_v38/methods/help_getAppUpdate.md index c8e67402..7b3bdde9 100644 --- a/old_docs/API_docs_v38/methods/help_getAppUpdate.md +++ b/old_docs/API_docs_v38/methods/help_getAppUpdate.md @@ -26,13 +26,10 @@ description: help.getAppUpdate parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v38/methods/help_getConfig.md b/old_docs/API_docs_v38/methods/help_getConfig.md index e3648b5a..bb51b362 100644 --- a/old_docs/API_docs_v38/methods/help_getConfig.md +++ b/old_docs/API_docs_v38/methods/help_getConfig.md @@ -25,16 +25,13 @@ description: help.getConfig parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v38/methods/help_getInviteText.md b/old_docs/API_docs_v38/methods/help_getInviteText.md index 348de85d..40251dd5 100644 --- a/old_docs/API_docs_v38/methods/help_getInviteText.md +++ b/old_docs/API_docs_v38/methods/help_getInviteText.md @@ -23,13 +23,10 @@ description: help.getInviteText parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v38/methods/help_getNearestDc.md b/old_docs/API_docs_v38/methods/help_getNearestDc.md index c6f5c555..6d8ed3f7 100644 --- a/old_docs/API_docs_v38/methods/help_getNearestDc.md +++ b/old_docs/API_docs_v38/methods/help_getNearestDc.md @@ -18,13 +18,10 @@ description: help.getNearestDc parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v38/methods/help_getSupport.md b/old_docs/API_docs_v38/methods/help_getSupport.md index 209edf03..ca8db03c 100644 --- a/old_docs/API_docs_v38/methods/help_getSupport.md +++ b/old_docs/API_docs_v38/methods/help_getSupport.md @@ -18,13 +18,10 @@ description: help.getSupport parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v38/methods/help_saveAppLog.md b/old_docs/API_docs_v38/methods/help_saveAppLog.md index 4f06434c..741b9aa1 100644 --- a/old_docs/API_docs_v38/methods/help_saveAppLog.md +++ b/old_docs/API_docs_v38/methods/help_saveAppLog.md @@ -23,13 +23,10 @@ description: help.saveAppLog parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v38/methods/initConnection.md b/old_docs/API_docs_v38/methods/initConnection.md index 0d22a1cb..c0307677 100644 --- a/old_docs/API_docs_v38/methods/initConnection.md +++ b/old_docs/API_docs_v38/methods/initConnection.md @@ -36,16 +36,13 @@ description: initConnection parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v38/methods/invokeAfterMsg.md b/old_docs/API_docs_v38/methods/invokeAfterMsg.md index c139fe8c..a382429e 100644 --- a/old_docs/API_docs_v38/methods/invokeAfterMsg.md +++ b/old_docs/API_docs_v38/methods/invokeAfterMsg.md @@ -24,16 +24,13 @@ description: invokeAfterMsg parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v38/methods/invokeAfterMsgs.md b/old_docs/API_docs_v38/methods/invokeAfterMsgs.md index 35004296..169eedaf 100644 --- a/old_docs/API_docs_v38/methods/invokeAfterMsgs.md +++ b/old_docs/API_docs_v38/methods/invokeAfterMsgs.md @@ -24,16 +24,13 @@ description: invokeAfterMsgs parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v38/methods/invokeWithLayer.md b/old_docs/API_docs_v38/methods/invokeWithLayer.md index 706036c4..d9a2c74c 100644 --- a/old_docs/API_docs_v38/methods/invokeWithLayer.md +++ b/old_docs/API_docs_v38/methods/invokeWithLayer.md @@ -41,16 +41,13 @@ description: invokeWithLayer parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v38/methods/invokeWithoutUpdates.md b/old_docs/API_docs_v38/methods/invokeWithoutUpdates.md index 10c6bfcf..f7d01765 100644 --- a/old_docs/API_docs_v38/methods/invokeWithoutUpdates.md +++ b/old_docs/API_docs_v38/methods/invokeWithoutUpdates.md @@ -23,16 +23,13 @@ description: invokeWithoutUpdates parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v38/methods/messages_addChatUser.md b/old_docs/API_docs_v38/methods/messages_addChatUser.md index 00da5a61..b9e6243d 100644 --- a/old_docs/API_docs_v38/methods/messages_addChatUser.md +++ b/old_docs/API_docs_v38/methods/messages_addChatUser.md @@ -40,13 +40,10 @@ description: messages.addChatUser parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v38/methods/messages_checkChatInvite.md b/old_docs/API_docs_v38/methods/messages_checkChatInvite.md index c5eb1c06..c4489469 100644 --- a/old_docs/API_docs_v38/methods/messages_checkChatInvite.md +++ b/old_docs/API_docs_v38/methods/messages_checkChatInvite.md @@ -32,13 +32,10 @@ description: messages.checkChatInvite parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v38/methods/messages_createChat.md b/old_docs/API_docs_v38/methods/messages_createChat.md index c643a022..c6c8f420 100644 --- a/old_docs/API_docs_v38/methods/messages_createChat.md +++ b/old_docs/API_docs_v38/methods/messages_createChat.md @@ -32,13 +32,10 @@ description: messages.createChat parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v38/methods/messages_deleteChatUser.md b/old_docs/API_docs_v38/methods/messages_deleteChatUser.md index 3d75d9cf..4b8c2aa5 100644 --- a/old_docs/API_docs_v38/methods/messages_deleteChatUser.md +++ b/old_docs/API_docs_v38/methods/messages_deleteChatUser.md @@ -33,16 +33,13 @@ description: messages.deleteChatUser parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v38/methods/messages_deleteHistory.md b/old_docs/API_docs_v38/methods/messages_deleteHistory.md index b7a9417d..79b6c995 100644 --- a/old_docs/API_docs_v38/methods/messages_deleteHistory.md +++ b/old_docs/API_docs_v38/methods/messages_deleteHistory.md @@ -31,13 +31,10 @@ description: messages.deleteHistory parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v38/methods/messages_deleteMessages.md b/old_docs/API_docs_v38/methods/messages_deleteMessages.md index 65dbbc4a..38b3ca09 100644 --- a/old_docs/API_docs_v38/methods/messages_deleteMessages.md +++ b/old_docs/API_docs_v38/methods/messages_deleteMessages.md @@ -30,16 +30,13 @@ description: messages.deleteMessages parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v38/methods/messages_editChatPhoto.md b/old_docs/API_docs_v38/methods/messages_editChatPhoto.md index d225962d..8c5d9d47 100644 --- a/old_docs/API_docs_v38/methods/messages_editChatPhoto.md +++ b/old_docs/API_docs_v38/methods/messages_editChatPhoto.md @@ -35,16 +35,13 @@ description: messages.editChatPhoto parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v38/methods/messages_editChatTitle.md b/old_docs/API_docs_v38/methods/messages_editChatTitle.md index 5cb1c6d7..238c6d72 100644 --- a/old_docs/API_docs_v38/methods/messages_editChatTitle.md +++ b/old_docs/API_docs_v38/methods/messages_editChatTitle.md @@ -32,16 +32,13 @@ description: messages.editChatTitle parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v38/methods/messages_exportChatInvite.md b/old_docs/API_docs_v38/methods/messages_exportChatInvite.md index 4a6e28ff..78f2ff86 100644 --- a/old_docs/API_docs_v38/methods/messages_exportChatInvite.md +++ b/old_docs/API_docs_v38/methods/messages_exportChatInvite.md @@ -30,13 +30,10 @@ description: messages.exportChatInvite parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v38/methods/messages_forwardMessage.md b/old_docs/API_docs_v38/methods/messages_forwardMessage.md index 4e2362db..fbdbc955 100644 --- a/old_docs/API_docs_v38/methods/messages_forwardMessage.md +++ b/old_docs/API_docs_v38/methods/messages_forwardMessage.md @@ -34,16 +34,13 @@ description: messages.forwardMessage parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v38/methods/messages_forwardMessages.md b/old_docs/API_docs_v38/methods/messages_forwardMessages.md index baf71832..e69fc8fd 100644 --- a/old_docs/API_docs_v38/methods/messages_forwardMessages.md +++ b/old_docs/API_docs_v38/methods/messages_forwardMessages.md @@ -53,16 +53,13 @@ description: messages.forwardMessages parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v38/methods/messages_getAllStickers.md b/old_docs/API_docs_v38/methods/messages_getAllStickers.md index defe31c1..3a0b3781 100644 --- a/old_docs/API_docs_v38/methods/messages_getAllStickers.md +++ b/old_docs/API_docs_v38/methods/messages_getAllStickers.md @@ -23,13 +23,10 @@ description: messages.getAllStickers parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v38/methods/messages_getChats.md b/old_docs/API_docs_v38/methods/messages_getChats.md index 6fa30cbd..c322613d 100644 --- a/old_docs/API_docs_v38/methods/messages_getChats.md +++ b/old_docs/API_docs_v38/methods/messages_getChats.md @@ -31,16 +31,13 @@ description: messages.getChats parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v38/methods/messages_getDhConfig.md b/old_docs/API_docs_v38/methods/messages_getDhConfig.md index aac3354d..f97684d2 100644 --- a/old_docs/API_docs_v38/methods/messages_getDhConfig.md +++ b/old_docs/API_docs_v38/methods/messages_getDhConfig.md @@ -31,13 +31,10 @@ description: messages.getDhConfig parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v38/methods/messages_getDialogs.md b/old_docs/API_docs_v38/methods/messages_getDialogs.md index 6b0e807d..50f2b9d5 100644 --- a/old_docs/API_docs_v38/methods/messages_getDialogs.md +++ b/old_docs/API_docs_v38/methods/messages_getDialogs.md @@ -34,13 +34,10 @@ description: messages.getDialogs parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v38/methods/messages_getHistory.md b/old_docs/API_docs_v38/methods/messages_getHistory.md index ba9ed92d..23955a96 100644 --- a/old_docs/API_docs_v38/methods/messages_getHistory.md +++ b/old_docs/API_docs_v38/methods/messages_getHistory.md @@ -40,13 +40,10 @@ description: messages.getHistory parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v38/methods/messages_getMessages.md b/old_docs/API_docs_v38/methods/messages_getMessages.md index 5a970246..787c46dd 100644 --- a/old_docs/API_docs_v38/methods/messages_getMessages.md +++ b/old_docs/API_docs_v38/methods/messages_getMessages.md @@ -23,16 +23,13 @@ description: messages.getMessages parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v38/methods/messages_getMessagesViews.md b/old_docs/API_docs_v38/methods/messages_getMessagesViews.md index 263f3f95..de5692dc 100644 --- a/old_docs/API_docs_v38/methods/messages_getMessagesViews.md +++ b/old_docs/API_docs_v38/methods/messages_getMessagesViews.md @@ -34,13 +34,10 @@ description: messages.getMessagesViews parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v38/methods/messages_getStickerSet.md b/old_docs/API_docs_v38/methods/messages_getStickerSet.md index 59f33916..b480e0fe 100644 --- a/old_docs/API_docs_v38/methods/messages_getStickerSet.md +++ b/old_docs/API_docs_v38/methods/messages_getStickerSet.md @@ -30,16 +30,13 @@ description: messages.getStickerSet parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v38/methods/messages_getStickers.md b/old_docs/API_docs_v38/methods/messages_getStickers.md index be61a120..1587cd01 100644 --- a/old_docs/API_docs_v38/methods/messages_getStickers.md +++ b/old_docs/API_docs_v38/methods/messages_getStickers.md @@ -24,16 +24,13 @@ description: messages.getStickers parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v38/methods/messages_getWebPagePreview.md b/old_docs/API_docs_v38/methods/messages_getWebPagePreview.md index a89600b1..d3908933 100644 --- a/old_docs/API_docs_v38/methods/messages_getWebPagePreview.md +++ b/old_docs/API_docs_v38/methods/messages_getWebPagePreview.md @@ -23,13 +23,10 @@ description: messages.getWebPagePreview parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v38/methods/messages_importChatInvite.md b/old_docs/API_docs_v38/methods/messages_importChatInvite.md index 9d77304d..9dcfa56d 100644 --- a/old_docs/API_docs_v38/methods/messages_importChatInvite.md +++ b/old_docs/API_docs_v38/methods/messages_importChatInvite.md @@ -36,13 +36,10 @@ description: messages.importChatInvite parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v38/methods/messages_installStickerSet.md b/old_docs/API_docs_v38/methods/messages_installStickerSet.md index 1969d008..cf1865a8 100644 --- a/old_docs/API_docs_v38/methods/messages_installStickerSet.md +++ b/old_docs/API_docs_v38/methods/messages_installStickerSet.md @@ -31,13 +31,10 @@ description: messages.installStickerSet parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v38/methods/messages_readEncryptedHistory.md b/old_docs/API_docs_v38/methods/messages_readEncryptedHistory.md index 766ee07d..f38f6b07 100644 --- a/old_docs/API_docs_v38/methods/messages_readEncryptedHistory.md +++ b/old_docs/API_docs_v38/methods/messages_readEncryptedHistory.md @@ -31,16 +31,13 @@ description: messages.readEncryptedHistory parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v38/methods/messages_readHistory.md b/old_docs/API_docs_v38/methods/messages_readHistory.md index da833be8..fe332529 100644 --- a/old_docs/API_docs_v38/methods/messages_readHistory.md +++ b/old_docs/API_docs_v38/methods/messages_readHistory.md @@ -33,13 +33,10 @@ description: messages.readHistory parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v38/methods/messages_readMessageContents.md b/old_docs/API_docs_v38/methods/messages_readMessageContents.md index 4b1abda0..7a6055fc 100644 --- a/old_docs/API_docs_v38/methods/messages_readMessageContents.md +++ b/old_docs/API_docs_v38/methods/messages_readMessageContents.md @@ -23,13 +23,10 @@ description: messages.readMessageContents parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v38/methods/messages_receivedMessages.md b/old_docs/API_docs_v38/methods/messages_receivedMessages.md index 588ac5cf..e2cf3a2f 100644 --- a/old_docs/API_docs_v38/methods/messages_receivedMessages.md +++ b/old_docs/API_docs_v38/methods/messages_receivedMessages.md @@ -23,13 +23,10 @@ description: messages.receivedMessages parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v38/methods/messages_receivedQueue.md b/old_docs/API_docs_v38/methods/messages_receivedQueue.md index 3c7f1d4f..38f504b3 100644 --- a/old_docs/API_docs_v38/methods/messages_receivedQueue.md +++ b/old_docs/API_docs_v38/methods/messages_receivedQueue.md @@ -30,16 +30,13 @@ description: messages.receivedQueue parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v38/methods/messages_reportSpam.md b/old_docs/API_docs_v38/methods/messages_reportSpam.md index bfadb9ab..08c96d44 100644 --- a/old_docs/API_docs_v38/methods/messages_reportSpam.md +++ b/old_docs/API_docs_v38/methods/messages_reportSpam.md @@ -30,13 +30,10 @@ description: messages.reportSpam parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v38/methods/messages_search.md b/old_docs/API_docs_v38/methods/messages_search.md index 87073d00..1e809cf2 100644 --- a/old_docs/API_docs_v38/methods/messages_search.md +++ b/old_docs/API_docs_v38/methods/messages_search.md @@ -43,13 +43,10 @@ description: messages.search parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v38/methods/messages_sendBroadcast.md b/old_docs/API_docs_v38/methods/messages_sendBroadcast.md index ac13d0bf..537166ab 100644 --- a/old_docs/API_docs_v38/methods/messages_sendBroadcast.md +++ b/old_docs/API_docs_v38/methods/messages_sendBroadcast.md @@ -25,16 +25,13 @@ description: messages.sendBroadcast parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v38/methods/messages_sendEncrypted.md b/old_docs/API_docs_v38/methods/messages_sendEncrypted.md index 82eeec92..ba9f796b 100644 --- a/old_docs/API_docs_v38/methods/messages_sendEncrypted.md +++ b/old_docs/API_docs_v38/methods/messages_sendEncrypted.md @@ -34,16 +34,13 @@ description: messages.sendEncrypted parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v38/methods/messages_sendEncryptedFile.md b/old_docs/API_docs_v38/methods/messages_sendEncryptedFile.md index 8f7a73d9..db16bf2d 100644 --- a/old_docs/API_docs_v38/methods/messages_sendEncryptedFile.md +++ b/old_docs/API_docs_v38/methods/messages_sendEncryptedFile.md @@ -32,16 +32,13 @@ description: messages.sendEncryptedFile parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v38/methods/messages_sendEncryptedService.md b/old_docs/API_docs_v38/methods/messages_sendEncryptedService.md index d427f6c3..fd4e2627 100644 --- a/old_docs/API_docs_v38/methods/messages_sendEncryptedService.md +++ b/old_docs/API_docs_v38/methods/messages_sendEncryptedService.md @@ -34,16 +34,13 @@ description: messages.sendEncryptedService parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v38/methods/messages_sendMedia.md b/old_docs/API_docs_v38/methods/messages_sendMedia.md index ba40b16f..689469e0 100644 --- a/old_docs/API_docs_v38/methods/messages_sendMedia.md +++ b/old_docs/API_docs_v38/methods/messages_sendMedia.md @@ -56,16 +56,13 @@ description: messages.sendMedia parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v38/methods/messages_sendMessage.md b/old_docs/API_docs_v38/methods/messages_sendMessage.md index ec066c9f..020aa0a6 100644 --- a/old_docs/API_docs_v38/methods/messages_sendMessage.md +++ b/old_docs/API_docs_v38/methods/messages_sendMessage.md @@ -54,16 +54,13 @@ description: messages.sendMessage parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v38/methods/messages_setEncryptedTyping.md b/old_docs/API_docs_v38/methods/messages_setEncryptedTyping.md index a05b94dd..aeae6ff7 100644 --- a/old_docs/API_docs_v38/methods/messages_setEncryptedTyping.md +++ b/old_docs/API_docs_v38/methods/messages_setEncryptedTyping.md @@ -31,13 +31,10 @@ description: messages.setEncryptedTyping parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v38/methods/messages_setTyping.md b/old_docs/API_docs_v38/methods/messages_setTyping.md index 9ef8caf5..f6b7b7b5 100644 --- a/old_docs/API_docs_v38/methods/messages_setTyping.md +++ b/old_docs/API_docs_v38/methods/messages_setTyping.md @@ -37,16 +37,13 @@ description: messages.setTyping parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v38/methods/messages_startBot.md b/old_docs/API_docs_v38/methods/messages_startBot.md index b4b18673..b5dc2d63 100644 --- a/old_docs/API_docs_v38/methods/messages_startBot.md +++ b/old_docs/API_docs_v38/methods/messages_startBot.md @@ -35,13 +35,10 @@ description: messages.startBot parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v38/methods/messages_uninstallStickerSet.md b/old_docs/API_docs_v38/methods/messages_uninstallStickerSet.md index 6763e64f..76a3e3e2 100644 --- a/old_docs/API_docs_v38/methods/messages_uninstallStickerSet.md +++ b/old_docs/API_docs_v38/methods/messages_uninstallStickerSet.md @@ -30,13 +30,10 @@ description: messages.uninstallStickerSet parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v38/methods/photos_deletePhotos.md b/old_docs/API_docs_v38/methods/photos_deletePhotos.md index e9cd459d..61768b1e 100644 --- a/old_docs/API_docs_v38/methods/photos_deletePhotos.md +++ b/old_docs/API_docs_v38/methods/photos_deletePhotos.md @@ -23,13 +23,10 @@ description: photos.deletePhotos parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v38/methods/photos_getUserPhotos.md b/old_docs/API_docs_v38/methods/photos_getUserPhotos.md index d6c2a380..095363e7 100644 --- a/old_docs/API_docs_v38/methods/photos_getUserPhotos.md +++ b/old_docs/API_docs_v38/methods/photos_getUserPhotos.md @@ -34,16 +34,13 @@ description: photos.getUserPhotos parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v38/methods/photos_updateProfilePhoto.md b/old_docs/API_docs_v38/methods/photos_updateProfilePhoto.md index abb031d4..add6028f 100644 --- a/old_docs/API_docs_v38/methods/photos_updateProfilePhoto.md +++ b/old_docs/API_docs_v38/methods/photos_updateProfilePhoto.md @@ -24,13 +24,10 @@ description: photos.updateProfilePhoto parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v38/methods/photos_uploadProfilePhoto.md b/old_docs/API_docs_v38/methods/photos_uploadProfilePhoto.md index ae20fdfc..048a1d32 100644 --- a/old_docs/API_docs_v38/methods/photos_uploadProfilePhoto.md +++ b/old_docs/API_docs_v38/methods/photos_uploadProfilePhoto.md @@ -37,13 +37,10 @@ description: photos.uploadProfilePhoto parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v38/methods/users_getUsers.md b/old_docs/API_docs_v38/methods/users_getUsers.md index 6a44d258..3a981d57 100644 --- a/old_docs/API_docs_v38/methods/users_getUsers.md +++ b/old_docs/API_docs_v38/methods/users_getUsers.md @@ -33,16 +33,13 @@ description: users.getUsers parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v40/methods/account_changePhone.md b/old_docs/API_docs_v40/methods/account_changePhone.md index 5d1801d0..e47ef6a7 100644 --- a/old_docs/API_docs_v40/methods/account_changePhone.md +++ b/old_docs/API_docs_v40/methods/account_changePhone.md @@ -32,13 +32,10 @@ description: account.changePhone parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v40/methods/account_checkUsername.md b/old_docs/API_docs_v40/methods/account_checkUsername.md index afc59b6c..40cf822f 100644 --- a/old_docs/API_docs_v40/methods/account_checkUsername.md +++ b/old_docs/API_docs_v40/methods/account_checkUsername.md @@ -30,13 +30,10 @@ description: account.checkUsername parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v40/methods/account_deleteAccount.md b/old_docs/API_docs_v40/methods/account_deleteAccount.md index 5abcd0ec..6f1bbda9 100644 --- a/old_docs/API_docs_v40/methods/account_deleteAccount.md +++ b/old_docs/API_docs_v40/methods/account_deleteAccount.md @@ -23,13 +23,10 @@ description: account.deleteAccount parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v40/methods/account_getAccountTTL.md b/old_docs/API_docs_v40/methods/account_getAccountTTL.md index 3520fbef..538b1d7a 100644 --- a/old_docs/API_docs_v40/methods/account_getAccountTTL.md +++ b/old_docs/API_docs_v40/methods/account_getAccountTTL.md @@ -18,13 +18,10 @@ description: account.getAccountTTL parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v40/methods/account_getAuthorizations.md b/old_docs/API_docs_v40/methods/account_getAuthorizations.md index 91bbce5e..f138d517 100644 --- a/old_docs/API_docs_v40/methods/account_getAuthorizations.md +++ b/old_docs/API_docs_v40/methods/account_getAuthorizations.md @@ -18,13 +18,10 @@ description: account.getAuthorizations parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v40/methods/account_getNotifySettings.md b/old_docs/API_docs_v40/methods/account_getNotifySettings.md index 8ee710d8..a48eed2f 100644 --- a/old_docs/API_docs_v40/methods/account_getNotifySettings.md +++ b/old_docs/API_docs_v40/methods/account_getNotifySettings.md @@ -30,13 +30,10 @@ description: account.getNotifySettings parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v40/methods/account_getPassword.md b/old_docs/API_docs_v40/methods/account_getPassword.md index 4d9fd015..1abf6174 100644 --- a/old_docs/API_docs_v40/methods/account_getPassword.md +++ b/old_docs/API_docs_v40/methods/account_getPassword.md @@ -18,13 +18,10 @@ description: account.getPassword parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v40/methods/account_getPasswordSettings.md b/old_docs/API_docs_v40/methods/account_getPasswordSettings.md index 02cb77f7..aec5b989 100644 --- a/old_docs/API_docs_v40/methods/account_getPasswordSettings.md +++ b/old_docs/API_docs_v40/methods/account_getPasswordSettings.md @@ -30,13 +30,10 @@ description: account.getPasswordSettings parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v40/methods/account_getPrivacy.md b/old_docs/API_docs_v40/methods/account_getPrivacy.md index 52786b79..8bbe9795 100644 --- a/old_docs/API_docs_v40/methods/account_getPrivacy.md +++ b/old_docs/API_docs_v40/methods/account_getPrivacy.md @@ -30,13 +30,10 @@ description: account.getPrivacy parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v40/methods/account_getWallPapers.md b/old_docs/API_docs_v40/methods/account_getWallPapers.md index 88c8a701..a71543d0 100644 --- a/old_docs/API_docs_v40/methods/account_getWallPapers.md +++ b/old_docs/API_docs_v40/methods/account_getWallPapers.md @@ -18,13 +18,10 @@ description: account.getWallPapers parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v40/methods/account_registerDevice.md b/old_docs/API_docs_v40/methods/account_registerDevice.md index ab7ec933..cfa1546c 100644 --- a/old_docs/API_docs_v40/methods/account_registerDevice.md +++ b/old_docs/API_docs_v40/methods/account_registerDevice.md @@ -36,13 +36,10 @@ description: account.registerDevice parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v40/methods/account_resetAuthorization.md b/old_docs/API_docs_v40/methods/account_resetAuthorization.md index e44334f2..0438cba3 100644 --- a/old_docs/API_docs_v40/methods/account_resetAuthorization.md +++ b/old_docs/API_docs_v40/methods/account_resetAuthorization.md @@ -30,13 +30,10 @@ description: account.resetAuthorization parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v40/methods/account_resetNotifySettings.md b/old_docs/API_docs_v40/methods/account_resetNotifySettings.md index 155ede68..92db4f4f 100644 --- a/old_docs/API_docs_v40/methods/account_resetNotifySettings.md +++ b/old_docs/API_docs_v40/methods/account_resetNotifySettings.md @@ -18,13 +18,10 @@ description: account.resetNotifySettings parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v40/methods/account_sendChangePhoneCode.md b/old_docs/API_docs_v40/methods/account_sendChangePhoneCode.md index 650dba72..ad611a8b 100644 --- a/old_docs/API_docs_v40/methods/account_sendChangePhoneCode.md +++ b/old_docs/API_docs_v40/methods/account_sendChangePhoneCode.md @@ -30,13 +30,10 @@ description: account.sendChangePhoneCode parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v40/methods/account_setAccountTTL.md b/old_docs/API_docs_v40/methods/account_setAccountTTL.md index f06eb676..d08f59fb 100644 --- a/old_docs/API_docs_v40/methods/account_setAccountTTL.md +++ b/old_docs/API_docs_v40/methods/account_setAccountTTL.md @@ -30,13 +30,10 @@ description: account.setAccountTTL parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v40/methods/account_setPrivacy.md b/old_docs/API_docs_v40/methods/account_setPrivacy.md index 56aebbcc..401aa71c 100644 --- a/old_docs/API_docs_v40/methods/account_setPrivacy.md +++ b/old_docs/API_docs_v40/methods/account_setPrivacy.md @@ -31,13 +31,10 @@ description: account.setPrivacy parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v40/methods/account_unregisterDevice.md b/old_docs/API_docs_v40/methods/account_unregisterDevice.md index 41899b6e..283ec7d2 100644 --- a/old_docs/API_docs_v40/methods/account_unregisterDevice.md +++ b/old_docs/API_docs_v40/methods/account_unregisterDevice.md @@ -31,13 +31,10 @@ description: account.unregisterDevice parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v40/methods/account_updateDeviceLocked.md b/old_docs/API_docs_v40/methods/account_updateDeviceLocked.md index 37aeb59d..ae6125a5 100644 --- a/old_docs/API_docs_v40/methods/account_updateDeviceLocked.md +++ b/old_docs/API_docs_v40/methods/account_updateDeviceLocked.md @@ -23,13 +23,10 @@ description: account.updateDeviceLocked parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v40/methods/account_updateNotifySettings.md b/old_docs/API_docs_v40/methods/account_updateNotifySettings.md index 8389b5c2..fb096250 100644 --- a/old_docs/API_docs_v40/methods/account_updateNotifySettings.md +++ b/old_docs/API_docs_v40/methods/account_updateNotifySettings.md @@ -31,13 +31,10 @@ description: account.updateNotifySettings parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v40/methods/account_updatePasswordSettings.md b/old_docs/API_docs_v40/methods/account_updatePasswordSettings.md index b7c8da4b..ffa8dcd9 100644 --- a/old_docs/API_docs_v40/methods/account_updatePasswordSettings.md +++ b/old_docs/API_docs_v40/methods/account_updatePasswordSettings.md @@ -34,13 +34,10 @@ description: account.updatePasswordSettings parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v40/methods/account_updateProfile.md b/old_docs/API_docs_v40/methods/account_updateProfile.md index c8712074..123ed13a 100644 --- a/old_docs/API_docs_v40/methods/account_updateProfile.md +++ b/old_docs/API_docs_v40/methods/account_updateProfile.md @@ -32,13 +32,10 @@ description: account.updateProfile parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v40/methods/account_updateStatus.md b/old_docs/API_docs_v40/methods/account_updateStatus.md index 7204e582..c8fa0a79 100644 --- a/old_docs/API_docs_v40/methods/account_updateStatus.md +++ b/old_docs/API_docs_v40/methods/account_updateStatus.md @@ -30,13 +30,10 @@ description: account.updateStatus parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v40/methods/account_updateUsername.md b/old_docs/API_docs_v40/methods/account_updateUsername.md index 22be2fd4..2b7576a5 100644 --- a/old_docs/API_docs_v40/methods/account_updateUsername.md +++ b/old_docs/API_docs_v40/methods/account_updateUsername.md @@ -32,13 +32,10 @@ description: account.updateUsername parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v40/methods/auth_bindTempAuthKey.md b/old_docs/API_docs_v40/methods/auth_bindTempAuthKey.md index e3d72dd5..7419abb0 100644 --- a/old_docs/API_docs_v40/methods/auth_bindTempAuthKey.md +++ b/old_docs/API_docs_v40/methods/auth_bindTempAuthKey.md @@ -35,16 +35,13 @@ description: auth.bindTempAuthKey parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v40/methods/auth_checkPassword.md b/old_docs/API_docs_v40/methods/auth_checkPassword.md index d5559186..6b6b21cc 100644 --- a/old_docs/API_docs_v40/methods/auth_checkPassword.md +++ b/old_docs/API_docs_v40/methods/auth_checkPassword.md @@ -30,13 +30,10 @@ description: auth.checkPassword parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v40/methods/auth_checkPhone.md b/old_docs/API_docs_v40/methods/auth_checkPhone.md index 3455904d..f6cac2e6 100644 --- a/old_docs/API_docs_v40/methods/auth_checkPhone.md +++ b/old_docs/API_docs_v40/methods/auth_checkPhone.md @@ -32,13 +32,10 @@ description: auth.checkPhone parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v40/methods/auth_exportAuthorization.md b/old_docs/API_docs_v40/methods/auth_exportAuthorization.md index 44c45b70..cbc8203b 100644 --- a/old_docs/API_docs_v40/methods/auth_exportAuthorization.md +++ b/old_docs/API_docs_v40/methods/auth_exportAuthorization.md @@ -30,16 +30,13 @@ description: auth.exportAuthorization parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v40/methods/auth_importAuthorization.md b/old_docs/API_docs_v40/methods/auth_importAuthorization.md index e0fd534f..22166510 100644 --- a/old_docs/API_docs_v40/methods/auth_importAuthorization.md +++ b/old_docs/API_docs_v40/methods/auth_importAuthorization.md @@ -32,16 +32,13 @@ description: auth.importAuthorization parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v40/methods/auth_recoverPassword.md b/old_docs/API_docs_v40/methods/auth_recoverPassword.md index c2ce3fed..931e99fd 100644 --- a/old_docs/API_docs_v40/methods/auth_recoverPassword.md +++ b/old_docs/API_docs_v40/methods/auth_recoverPassword.md @@ -30,13 +30,10 @@ description: auth.recoverPassword parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v40/methods/auth_requestPasswordRecovery.md b/old_docs/API_docs_v40/methods/auth_requestPasswordRecovery.md index 101b1cf7..c6babcd9 100644 --- a/old_docs/API_docs_v40/methods/auth_requestPasswordRecovery.md +++ b/old_docs/API_docs_v40/methods/auth_requestPasswordRecovery.md @@ -25,13 +25,10 @@ description: auth.requestPasswordRecovery parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v40/methods/auth_resetAuthorizations.md b/old_docs/API_docs_v40/methods/auth_resetAuthorizations.md index 87a39a22..fe297fa7 100644 --- a/old_docs/API_docs_v40/methods/auth_resetAuthorizations.md +++ b/old_docs/API_docs_v40/methods/auth_resetAuthorizations.md @@ -25,13 +25,10 @@ description: auth.resetAuthorizations parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v40/methods/auth_sendCall.md b/old_docs/API_docs_v40/methods/auth_sendCall.md index 00eaff4e..386cfad4 100644 --- a/old_docs/API_docs_v40/methods/auth_sendCall.md +++ b/old_docs/API_docs_v40/methods/auth_sendCall.md @@ -24,16 +24,13 @@ description: auth.sendCall parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v40/methods/auth_sendInvites.md b/old_docs/API_docs_v40/methods/auth_sendInvites.md index 604fc65d..ad9636c5 100644 --- a/old_docs/API_docs_v40/methods/auth_sendInvites.md +++ b/old_docs/API_docs_v40/methods/auth_sendInvites.md @@ -31,13 +31,10 @@ description: auth.sendInvites parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v40/methods/auth_sendSms.md b/old_docs/API_docs_v40/methods/auth_sendSms.md index 6d942e97..9a214e65 100644 --- a/old_docs/API_docs_v40/methods/auth_sendSms.md +++ b/old_docs/API_docs_v40/methods/auth_sendSms.md @@ -24,16 +24,13 @@ description: auth.sendSms parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v40/methods/contacts_block.md b/old_docs/API_docs_v40/methods/contacts_block.md index d9d58e37..1c7cbe26 100644 --- a/old_docs/API_docs_v40/methods/contacts_block.md +++ b/old_docs/API_docs_v40/methods/contacts_block.md @@ -30,13 +30,10 @@ description: contacts.block parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v40/methods/contacts_deleteContact.md b/old_docs/API_docs_v40/methods/contacts_deleteContact.md index cd8c17ad..987a1be0 100644 --- a/old_docs/API_docs_v40/methods/contacts_deleteContact.md +++ b/old_docs/API_docs_v40/methods/contacts_deleteContact.md @@ -30,13 +30,10 @@ description: contacts.deleteContact parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v40/methods/contacts_deleteContacts.md b/old_docs/API_docs_v40/methods/contacts_deleteContacts.md index fc65880d..67a922ed 100644 --- a/old_docs/API_docs_v40/methods/contacts_deleteContacts.md +++ b/old_docs/API_docs_v40/methods/contacts_deleteContacts.md @@ -31,13 +31,10 @@ description: contacts.deleteContacts parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v40/methods/contacts_exportCard.md b/old_docs/API_docs_v40/methods/contacts_exportCard.md index 63508076..bf6d1f9f 100644 --- a/old_docs/API_docs_v40/methods/contacts_exportCard.md +++ b/old_docs/API_docs_v40/methods/contacts_exportCard.md @@ -18,13 +18,10 @@ description: contacts.exportCard parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v40/methods/contacts_getBlocked.md b/old_docs/API_docs_v40/methods/contacts_getBlocked.md index f50792b4..faa719da 100644 --- a/old_docs/API_docs_v40/methods/contacts_getBlocked.md +++ b/old_docs/API_docs_v40/methods/contacts_getBlocked.md @@ -24,13 +24,10 @@ description: contacts.getBlocked parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v40/methods/contacts_getContacts.md b/old_docs/API_docs_v40/methods/contacts_getContacts.md index 71313bf2..a6779111 100644 --- a/old_docs/API_docs_v40/methods/contacts_getContacts.md +++ b/old_docs/API_docs_v40/methods/contacts_getContacts.md @@ -23,13 +23,10 @@ description: contacts.getContacts parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v40/methods/contacts_getStatuses.md b/old_docs/API_docs_v40/methods/contacts_getStatuses.md index d914e08d..9bb7f263 100644 --- a/old_docs/API_docs_v40/methods/contacts_getStatuses.md +++ b/old_docs/API_docs_v40/methods/contacts_getStatuses.md @@ -18,13 +18,10 @@ description: contacts.getStatuses parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v40/methods/contacts_getSuggested.md b/old_docs/API_docs_v40/methods/contacts_getSuggested.md index a29f4aff..2059c01b 100644 --- a/old_docs/API_docs_v40/methods/contacts_getSuggested.md +++ b/old_docs/API_docs_v40/methods/contacts_getSuggested.md @@ -23,16 +23,13 @@ description: contacts.getSuggested parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v40/methods/contacts_importCard.md b/old_docs/API_docs_v40/methods/contacts_importCard.md index a6abf56d..7a2f34e1 100644 --- a/old_docs/API_docs_v40/methods/contacts_importCard.md +++ b/old_docs/API_docs_v40/methods/contacts_importCard.md @@ -31,13 +31,10 @@ description: contacts.importCard parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v40/methods/contacts_importContacts.md b/old_docs/API_docs_v40/methods/contacts_importContacts.md index db2051ac..2f070493 100644 --- a/old_docs/API_docs_v40/methods/contacts_importContacts.md +++ b/old_docs/API_docs_v40/methods/contacts_importContacts.md @@ -24,13 +24,10 @@ description: contacts.importContacts parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v40/methods/contacts_search.md b/old_docs/API_docs_v40/methods/contacts_search.md index 0203b160..70a0635e 100644 --- a/old_docs/API_docs_v40/methods/contacts_search.md +++ b/old_docs/API_docs_v40/methods/contacts_search.md @@ -33,13 +33,10 @@ description: contacts.search parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v40/methods/contacts_unblock.md b/old_docs/API_docs_v40/methods/contacts_unblock.md index a1977c24..9c01e42a 100644 --- a/old_docs/API_docs_v40/methods/contacts_unblock.md +++ b/old_docs/API_docs_v40/methods/contacts_unblock.md @@ -30,13 +30,10 @@ description: contacts.unblock parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v40/methods/help_getAppChangelog.md b/old_docs/API_docs_v40/methods/help_getAppChangelog.md index 302809aa..b27cc9f0 100644 --- a/old_docs/API_docs_v40/methods/help_getAppChangelog.md +++ b/old_docs/API_docs_v40/methods/help_getAppChangelog.md @@ -26,13 +26,10 @@ description: help.getAppChangelog parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v40/methods/help_getAppUpdate.md b/old_docs/API_docs_v40/methods/help_getAppUpdate.md index c8e67402..7b3bdde9 100644 --- a/old_docs/API_docs_v40/methods/help_getAppUpdate.md +++ b/old_docs/API_docs_v40/methods/help_getAppUpdate.md @@ -26,13 +26,10 @@ description: help.getAppUpdate parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v40/methods/help_getConfig.md b/old_docs/API_docs_v40/methods/help_getConfig.md index e3648b5a..bb51b362 100644 --- a/old_docs/API_docs_v40/methods/help_getConfig.md +++ b/old_docs/API_docs_v40/methods/help_getConfig.md @@ -25,16 +25,13 @@ description: help.getConfig parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v40/methods/help_getInviteText.md b/old_docs/API_docs_v40/methods/help_getInviteText.md index 348de85d..40251dd5 100644 --- a/old_docs/API_docs_v40/methods/help_getInviteText.md +++ b/old_docs/API_docs_v40/methods/help_getInviteText.md @@ -23,13 +23,10 @@ description: help.getInviteText parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v40/methods/help_getNearestDc.md b/old_docs/API_docs_v40/methods/help_getNearestDc.md index c6f5c555..6d8ed3f7 100644 --- a/old_docs/API_docs_v40/methods/help_getNearestDc.md +++ b/old_docs/API_docs_v40/methods/help_getNearestDc.md @@ -18,13 +18,10 @@ description: help.getNearestDc parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v40/methods/help_getSupport.md b/old_docs/API_docs_v40/methods/help_getSupport.md index 209edf03..ca8db03c 100644 --- a/old_docs/API_docs_v40/methods/help_getSupport.md +++ b/old_docs/API_docs_v40/methods/help_getSupport.md @@ -18,13 +18,10 @@ description: help.getSupport parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v40/methods/help_saveAppLog.md b/old_docs/API_docs_v40/methods/help_saveAppLog.md index 4f06434c..741b9aa1 100644 --- a/old_docs/API_docs_v40/methods/help_saveAppLog.md +++ b/old_docs/API_docs_v40/methods/help_saveAppLog.md @@ -23,13 +23,10 @@ description: help.saveAppLog parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v40/methods/initConnection.md b/old_docs/API_docs_v40/methods/initConnection.md index 0d22a1cb..c0307677 100644 --- a/old_docs/API_docs_v40/methods/initConnection.md +++ b/old_docs/API_docs_v40/methods/initConnection.md @@ -36,16 +36,13 @@ description: initConnection parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v40/methods/invokeAfterMsg.md b/old_docs/API_docs_v40/methods/invokeAfterMsg.md index c139fe8c..a382429e 100644 --- a/old_docs/API_docs_v40/methods/invokeAfterMsg.md +++ b/old_docs/API_docs_v40/methods/invokeAfterMsg.md @@ -24,16 +24,13 @@ description: invokeAfterMsg parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v40/methods/invokeAfterMsgs.md b/old_docs/API_docs_v40/methods/invokeAfterMsgs.md index 35004296..169eedaf 100644 --- a/old_docs/API_docs_v40/methods/invokeAfterMsgs.md +++ b/old_docs/API_docs_v40/methods/invokeAfterMsgs.md @@ -24,16 +24,13 @@ description: invokeAfterMsgs parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v40/methods/invokeWithLayer.md b/old_docs/API_docs_v40/methods/invokeWithLayer.md index 706036c4..d9a2c74c 100644 --- a/old_docs/API_docs_v40/methods/invokeWithLayer.md +++ b/old_docs/API_docs_v40/methods/invokeWithLayer.md @@ -41,16 +41,13 @@ description: invokeWithLayer parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v40/methods/invokeWithoutUpdates.md b/old_docs/API_docs_v40/methods/invokeWithoutUpdates.md index 10c6bfcf..f7d01765 100644 --- a/old_docs/API_docs_v40/methods/invokeWithoutUpdates.md +++ b/old_docs/API_docs_v40/methods/invokeWithoutUpdates.md @@ -23,16 +23,13 @@ description: invokeWithoutUpdates parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v40/methods/messages_addChatUser.md b/old_docs/API_docs_v40/methods/messages_addChatUser.md index 00da5a61..b9e6243d 100644 --- a/old_docs/API_docs_v40/methods/messages_addChatUser.md +++ b/old_docs/API_docs_v40/methods/messages_addChatUser.md @@ -40,13 +40,10 @@ description: messages.addChatUser parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v40/methods/messages_checkChatInvite.md b/old_docs/API_docs_v40/methods/messages_checkChatInvite.md index c5eb1c06..c4489469 100644 --- a/old_docs/API_docs_v40/methods/messages_checkChatInvite.md +++ b/old_docs/API_docs_v40/methods/messages_checkChatInvite.md @@ -32,13 +32,10 @@ description: messages.checkChatInvite parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v40/methods/messages_createChannel.md b/old_docs/API_docs_v40/methods/messages_createChannel.md index 974eaa4a..d932f145 100644 --- a/old_docs/API_docs_v40/methods/messages_createChannel.md +++ b/old_docs/API_docs_v40/methods/messages_createChannel.md @@ -23,16 +23,13 @@ description: messages.createChannel parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v40/methods/messages_createChat.md b/old_docs/API_docs_v40/methods/messages_createChat.md index c643a022..c6c8f420 100644 --- a/old_docs/API_docs_v40/methods/messages_createChat.md +++ b/old_docs/API_docs_v40/methods/messages_createChat.md @@ -32,13 +32,10 @@ description: messages.createChat parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v40/methods/messages_deleteChannelMessages.md b/old_docs/API_docs_v40/methods/messages_deleteChannelMessages.md index df8ddc8a..69854a5f 100644 --- a/old_docs/API_docs_v40/methods/messages_deleteChannelMessages.md +++ b/old_docs/API_docs_v40/methods/messages_deleteChannelMessages.md @@ -24,16 +24,13 @@ description: messages.deleteChannelMessages parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v40/methods/messages_deleteChatUser.md b/old_docs/API_docs_v40/methods/messages_deleteChatUser.md index 3d75d9cf..4b8c2aa5 100644 --- a/old_docs/API_docs_v40/methods/messages_deleteChatUser.md +++ b/old_docs/API_docs_v40/methods/messages_deleteChatUser.md @@ -33,16 +33,13 @@ description: messages.deleteChatUser parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v40/methods/messages_deleteHistory.md b/old_docs/API_docs_v40/methods/messages_deleteHistory.md index b7a9417d..79b6c995 100644 --- a/old_docs/API_docs_v40/methods/messages_deleteHistory.md +++ b/old_docs/API_docs_v40/methods/messages_deleteHistory.md @@ -31,13 +31,10 @@ description: messages.deleteHistory parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v40/methods/messages_deleteMessages.md b/old_docs/API_docs_v40/methods/messages_deleteMessages.md index 65dbbc4a..38b3ca09 100644 --- a/old_docs/API_docs_v40/methods/messages_deleteMessages.md +++ b/old_docs/API_docs_v40/methods/messages_deleteMessages.md @@ -30,16 +30,13 @@ description: messages.deleteMessages parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v40/methods/messages_editChatPhoto.md b/old_docs/API_docs_v40/methods/messages_editChatPhoto.md index d225962d..8c5d9d47 100644 --- a/old_docs/API_docs_v40/methods/messages_editChatPhoto.md +++ b/old_docs/API_docs_v40/methods/messages_editChatPhoto.md @@ -35,16 +35,13 @@ description: messages.editChatPhoto parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v40/methods/messages_editChatTitle.md b/old_docs/API_docs_v40/methods/messages_editChatTitle.md index 5cb1c6d7..238c6d72 100644 --- a/old_docs/API_docs_v40/methods/messages_editChatTitle.md +++ b/old_docs/API_docs_v40/methods/messages_editChatTitle.md @@ -32,16 +32,13 @@ description: messages.editChatTitle parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v40/methods/messages_exportChatInvite.md b/old_docs/API_docs_v40/methods/messages_exportChatInvite.md index 4a6e28ff..78f2ff86 100644 --- a/old_docs/API_docs_v40/methods/messages_exportChatInvite.md +++ b/old_docs/API_docs_v40/methods/messages_exportChatInvite.md @@ -30,13 +30,10 @@ description: messages.exportChatInvite parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v40/methods/messages_forwardMessage.md b/old_docs/API_docs_v40/methods/messages_forwardMessage.md index 4e2362db..fbdbc955 100644 --- a/old_docs/API_docs_v40/methods/messages_forwardMessage.md +++ b/old_docs/API_docs_v40/methods/messages_forwardMessage.md @@ -34,16 +34,13 @@ description: messages.forwardMessage parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v40/methods/messages_forwardMessages.md b/old_docs/API_docs_v40/methods/messages_forwardMessages.md index 05131a0d..bb100295 100644 --- a/old_docs/API_docs_v40/methods/messages_forwardMessages.md +++ b/old_docs/API_docs_v40/methods/messages_forwardMessages.md @@ -52,16 +52,13 @@ description: messages.forwardMessages parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v40/methods/messages_getAllStickers.md b/old_docs/API_docs_v40/methods/messages_getAllStickers.md index defe31c1..3a0b3781 100644 --- a/old_docs/API_docs_v40/methods/messages_getAllStickers.md +++ b/old_docs/API_docs_v40/methods/messages_getAllStickers.md @@ -23,13 +23,10 @@ description: messages.getAllStickers parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v40/methods/messages_getChannelDialogs.md b/old_docs/API_docs_v40/methods/messages_getChannelDialogs.md index f4411b31..dfeb85b8 100644 --- a/old_docs/API_docs_v40/methods/messages_getChannelDialogs.md +++ b/old_docs/API_docs_v40/methods/messages_getChannelDialogs.md @@ -24,16 +24,13 @@ description: messages.getChannelDialogs parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v40/methods/messages_getChats.md b/old_docs/API_docs_v40/methods/messages_getChats.md index d3e82fa4..384c8d0e 100644 --- a/old_docs/API_docs_v40/methods/messages_getChats.md +++ b/old_docs/API_docs_v40/methods/messages_getChats.md @@ -31,16 +31,13 @@ description: messages.getChats parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v40/methods/messages_getDhConfig.md b/old_docs/API_docs_v40/methods/messages_getDhConfig.md index aac3354d..f97684d2 100644 --- a/old_docs/API_docs_v40/methods/messages_getDhConfig.md +++ b/old_docs/API_docs_v40/methods/messages_getDhConfig.md @@ -31,13 +31,10 @@ description: messages.getDhConfig parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v40/methods/messages_getDialogs.md b/old_docs/API_docs_v40/methods/messages_getDialogs.md index 6b0e807d..50f2b9d5 100644 --- a/old_docs/API_docs_v40/methods/messages_getDialogs.md +++ b/old_docs/API_docs_v40/methods/messages_getDialogs.md @@ -34,13 +34,10 @@ description: messages.getDialogs parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v40/methods/messages_getHistory.md b/old_docs/API_docs_v40/methods/messages_getHistory.md index ab034582..d68f44d6 100644 --- a/old_docs/API_docs_v40/methods/messages_getHistory.md +++ b/old_docs/API_docs_v40/methods/messages_getHistory.md @@ -39,13 +39,10 @@ description: messages.getHistory parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v40/methods/messages_getImportantHistory.md b/old_docs/API_docs_v40/methods/messages_getImportantHistory.md index 7523b1e7..5e6144a0 100644 --- a/old_docs/API_docs_v40/methods/messages_getImportantHistory.md +++ b/old_docs/API_docs_v40/methods/messages_getImportantHistory.md @@ -26,16 +26,13 @@ description: messages.getImportantHistory parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v40/methods/messages_getMessages.md b/old_docs/API_docs_v40/methods/messages_getMessages.md index 5a970246..787c46dd 100644 --- a/old_docs/API_docs_v40/methods/messages_getMessages.md +++ b/old_docs/API_docs_v40/methods/messages_getMessages.md @@ -23,16 +23,13 @@ description: messages.getMessages parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v40/methods/messages_getStickerSet.md b/old_docs/API_docs_v40/methods/messages_getStickerSet.md index 59f33916..b480e0fe 100644 --- a/old_docs/API_docs_v40/methods/messages_getStickerSet.md +++ b/old_docs/API_docs_v40/methods/messages_getStickerSet.md @@ -30,16 +30,13 @@ description: messages.getStickerSet parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v40/methods/messages_getStickers.md b/old_docs/API_docs_v40/methods/messages_getStickers.md index be61a120..1587cd01 100644 --- a/old_docs/API_docs_v40/methods/messages_getStickers.md +++ b/old_docs/API_docs_v40/methods/messages_getStickers.md @@ -24,16 +24,13 @@ description: messages.getStickers parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v40/methods/messages_getWebPagePreview.md b/old_docs/API_docs_v40/methods/messages_getWebPagePreview.md index a89600b1..d3908933 100644 --- a/old_docs/API_docs_v40/methods/messages_getWebPagePreview.md +++ b/old_docs/API_docs_v40/methods/messages_getWebPagePreview.md @@ -23,13 +23,10 @@ description: messages.getWebPagePreview parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v40/methods/messages_importChatInvite.md b/old_docs/API_docs_v40/methods/messages_importChatInvite.md index 9d77304d..9dcfa56d 100644 --- a/old_docs/API_docs_v40/methods/messages_importChatInvite.md +++ b/old_docs/API_docs_v40/methods/messages_importChatInvite.md @@ -36,13 +36,10 @@ description: messages.importChatInvite parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v40/methods/messages_installStickerSet.md b/old_docs/API_docs_v40/methods/messages_installStickerSet.md index 1969d008..cf1865a8 100644 --- a/old_docs/API_docs_v40/methods/messages_installStickerSet.md +++ b/old_docs/API_docs_v40/methods/messages_installStickerSet.md @@ -31,13 +31,10 @@ description: messages.installStickerSet parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v40/methods/messages_readChannelHistory.md b/old_docs/API_docs_v40/methods/messages_readChannelHistory.md index 8fed9af7..49c78738 100644 --- a/old_docs/API_docs_v40/methods/messages_readChannelHistory.md +++ b/old_docs/API_docs_v40/methods/messages_readChannelHistory.md @@ -24,16 +24,13 @@ description: messages.readChannelHistory parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v40/methods/messages_readEncryptedHistory.md b/old_docs/API_docs_v40/methods/messages_readEncryptedHistory.md index 766ee07d..f38f6b07 100644 --- a/old_docs/API_docs_v40/methods/messages_readEncryptedHistory.md +++ b/old_docs/API_docs_v40/methods/messages_readEncryptedHistory.md @@ -31,16 +31,13 @@ description: messages.readEncryptedHistory parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v40/methods/messages_readHistory.md b/old_docs/API_docs_v40/methods/messages_readHistory.md index da833be8..fe332529 100644 --- a/old_docs/API_docs_v40/methods/messages_readHistory.md +++ b/old_docs/API_docs_v40/methods/messages_readHistory.md @@ -33,13 +33,10 @@ description: messages.readHistory parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v40/methods/messages_readMessageContents.md b/old_docs/API_docs_v40/methods/messages_readMessageContents.md index 4b1abda0..7a6055fc 100644 --- a/old_docs/API_docs_v40/methods/messages_readMessageContents.md +++ b/old_docs/API_docs_v40/methods/messages_readMessageContents.md @@ -23,13 +23,10 @@ description: messages.readMessageContents parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v40/methods/messages_receivedMessages.md b/old_docs/API_docs_v40/methods/messages_receivedMessages.md index 588ac5cf..e2cf3a2f 100644 --- a/old_docs/API_docs_v40/methods/messages_receivedMessages.md +++ b/old_docs/API_docs_v40/methods/messages_receivedMessages.md @@ -23,13 +23,10 @@ description: messages.receivedMessages parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v40/methods/messages_receivedQueue.md b/old_docs/API_docs_v40/methods/messages_receivedQueue.md index 3c7f1d4f..38f504b3 100644 --- a/old_docs/API_docs_v40/methods/messages_receivedQueue.md +++ b/old_docs/API_docs_v40/methods/messages_receivedQueue.md @@ -30,16 +30,13 @@ description: messages.receivedQueue parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v40/methods/messages_search.md b/old_docs/API_docs_v40/methods/messages_search.md index 87073d00..1e809cf2 100644 --- a/old_docs/API_docs_v40/methods/messages_search.md +++ b/old_docs/API_docs_v40/methods/messages_search.md @@ -43,13 +43,10 @@ description: messages.search parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v40/methods/messages_sendBroadcast.md b/old_docs/API_docs_v40/methods/messages_sendBroadcast.md index ac13d0bf..537166ab 100644 --- a/old_docs/API_docs_v40/methods/messages_sendBroadcast.md +++ b/old_docs/API_docs_v40/methods/messages_sendBroadcast.md @@ -25,16 +25,13 @@ description: messages.sendBroadcast parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v40/methods/messages_sendEncrypted.md b/old_docs/API_docs_v40/methods/messages_sendEncrypted.md index 82eeec92..ba9f796b 100644 --- a/old_docs/API_docs_v40/methods/messages_sendEncrypted.md +++ b/old_docs/API_docs_v40/methods/messages_sendEncrypted.md @@ -34,16 +34,13 @@ description: messages.sendEncrypted parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v40/methods/messages_sendEncryptedFile.md b/old_docs/API_docs_v40/methods/messages_sendEncryptedFile.md index 8f7a73d9..db16bf2d 100644 --- a/old_docs/API_docs_v40/methods/messages_sendEncryptedFile.md +++ b/old_docs/API_docs_v40/methods/messages_sendEncryptedFile.md @@ -32,16 +32,13 @@ description: messages.sendEncryptedFile parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v40/methods/messages_sendEncryptedService.md b/old_docs/API_docs_v40/methods/messages_sendEncryptedService.md index d427f6c3..fd4e2627 100644 --- a/old_docs/API_docs_v40/methods/messages_sendEncryptedService.md +++ b/old_docs/API_docs_v40/methods/messages_sendEncryptedService.md @@ -34,16 +34,13 @@ description: messages.sendEncryptedService parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v40/methods/messages_sendMedia.md b/old_docs/API_docs_v40/methods/messages_sendMedia.md index ba40b16f..689469e0 100644 --- a/old_docs/API_docs_v40/methods/messages_sendMedia.md +++ b/old_docs/API_docs_v40/methods/messages_sendMedia.md @@ -56,16 +56,13 @@ description: messages.sendMedia parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v40/methods/messages_sendMessage.md b/old_docs/API_docs_v40/methods/messages_sendMessage.md index ec066c9f..020aa0a6 100644 --- a/old_docs/API_docs_v40/methods/messages_sendMessage.md +++ b/old_docs/API_docs_v40/methods/messages_sendMessage.md @@ -54,16 +54,13 @@ description: messages.sendMessage parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v40/methods/messages_setEncryptedTyping.md b/old_docs/API_docs_v40/methods/messages_setEncryptedTyping.md index a05b94dd..aeae6ff7 100644 --- a/old_docs/API_docs_v40/methods/messages_setEncryptedTyping.md +++ b/old_docs/API_docs_v40/methods/messages_setEncryptedTyping.md @@ -31,13 +31,10 @@ description: messages.setEncryptedTyping parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v40/methods/messages_setTyping.md b/old_docs/API_docs_v40/methods/messages_setTyping.md index 9ef8caf5..f6b7b7b5 100644 --- a/old_docs/API_docs_v40/methods/messages_setTyping.md +++ b/old_docs/API_docs_v40/methods/messages_setTyping.md @@ -37,16 +37,13 @@ description: messages.setTyping parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v40/methods/messages_startBot.md b/old_docs/API_docs_v40/methods/messages_startBot.md index b4b18673..b5dc2d63 100644 --- a/old_docs/API_docs_v40/methods/messages_startBot.md +++ b/old_docs/API_docs_v40/methods/messages_startBot.md @@ -35,13 +35,10 @@ description: messages.startBot parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v40/methods/messages_uninstallStickerSet.md b/old_docs/API_docs_v40/methods/messages_uninstallStickerSet.md index 6763e64f..76a3e3e2 100644 --- a/old_docs/API_docs_v40/methods/messages_uninstallStickerSet.md +++ b/old_docs/API_docs_v40/methods/messages_uninstallStickerSet.md @@ -30,13 +30,10 @@ description: messages.uninstallStickerSet parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v40/methods/photos_deletePhotos.md b/old_docs/API_docs_v40/methods/photos_deletePhotos.md index e9cd459d..61768b1e 100644 --- a/old_docs/API_docs_v40/methods/photos_deletePhotos.md +++ b/old_docs/API_docs_v40/methods/photos_deletePhotos.md @@ -23,13 +23,10 @@ description: photos.deletePhotos parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v40/methods/photos_getUserPhotos.md b/old_docs/API_docs_v40/methods/photos_getUserPhotos.md index d6c2a380..095363e7 100644 --- a/old_docs/API_docs_v40/methods/photos_getUserPhotos.md +++ b/old_docs/API_docs_v40/methods/photos_getUserPhotos.md @@ -34,16 +34,13 @@ description: photos.getUserPhotos parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v40/methods/photos_updateProfilePhoto.md b/old_docs/API_docs_v40/methods/photos_updateProfilePhoto.md index abb031d4..add6028f 100644 --- a/old_docs/API_docs_v40/methods/photos_updateProfilePhoto.md +++ b/old_docs/API_docs_v40/methods/photos_updateProfilePhoto.md @@ -24,13 +24,10 @@ description: photos.updateProfilePhoto parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v40/methods/photos_uploadProfilePhoto.md b/old_docs/API_docs_v40/methods/photos_uploadProfilePhoto.md index ae20fdfc..048a1d32 100644 --- a/old_docs/API_docs_v40/methods/photos_uploadProfilePhoto.md +++ b/old_docs/API_docs_v40/methods/photos_uploadProfilePhoto.md @@ -37,13 +37,10 @@ description: photos.uploadProfilePhoto parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v40/methods/users_getUsers.md b/old_docs/API_docs_v40/methods/users_getUsers.md index 6a44d258..3a981d57 100644 --- a/old_docs/API_docs_v40/methods/users_getUsers.md +++ b/old_docs/API_docs_v40/methods/users_getUsers.md @@ -33,16 +33,13 @@ description: users.getUsers parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v41/methods/account_changePhone.md b/old_docs/API_docs_v41/methods/account_changePhone.md index 5d1801d0..e47ef6a7 100644 --- a/old_docs/API_docs_v41/methods/account_changePhone.md +++ b/old_docs/API_docs_v41/methods/account_changePhone.md @@ -32,13 +32,10 @@ description: account.changePhone parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v41/methods/account_checkUsername.md b/old_docs/API_docs_v41/methods/account_checkUsername.md index afc59b6c..40cf822f 100644 --- a/old_docs/API_docs_v41/methods/account_checkUsername.md +++ b/old_docs/API_docs_v41/methods/account_checkUsername.md @@ -30,13 +30,10 @@ description: account.checkUsername parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v41/methods/account_deleteAccount.md b/old_docs/API_docs_v41/methods/account_deleteAccount.md index 5abcd0ec..6f1bbda9 100644 --- a/old_docs/API_docs_v41/methods/account_deleteAccount.md +++ b/old_docs/API_docs_v41/methods/account_deleteAccount.md @@ -23,13 +23,10 @@ description: account.deleteAccount parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v41/methods/account_getAccountTTL.md b/old_docs/API_docs_v41/methods/account_getAccountTTL.md index 3520fbef..538b1d7a 100644 --- a/old_docs/API_docs_v41/methods/account_getAccountTTL.md +++ b/old_docs/API_docs_v41/methods/account_getAccountTTL.md @@ -18,13 +18,10 @@ description: account.getAccountTTL parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v41/methods/account_getAuthorizations.md b/old_docs/API_docs_v41/methods/account_getAuthorizations.md index 91bbce5e..f138d517 100644 --- a/old_docs/API_docs_v41/methods/account_getAuthorizations.md +++ b/old_docs/API_docs_v41/methods/account_getAuthorizations.md @@ -18,13 +18,10 @@ description: account.getAuthorizations parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v41/methods/account_getNotifySettings.md b/old_docs/API_docs_v41/methods/account_getNotifySettings.md index 8ee710d8..a48eed2f 100644 --- a/old_docs/API_docs_v41/methods/account_getNotifySettings.md +++ b/old_docs/API_docs_v41/methods/account_getNotifySettings.md @@ -30,13 +30,10 @@ description: account.getNotifySettings parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v41/methods/account_getPassword.md b/old_docs/API_docs_v41/methods/account_getPassword.md index 4d9fd015..1abf6174 100644 --- a/old_docs/API_docs_v41/methods/account_getPassword.md +++ b/old_docs/API_docs_v41/methods/account_getPassword.md @@ -18,13 +18,10 @@ description: account.getPassword parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v41/methods/account_getPasswordSettings.md b/old_docs/API_docs_v41/methods/account_getPasswordSettings.md index 02cb77f7..aec5b989 100644 --- a/old_docs/API_docs_v41/methods/account_getPasswordSettings.md +++ b/old_docs/API_docs_v41/methods/account_getPasswordSettings.md @@ -30,13 +30,10 @@ description: account.getPasswordSettings parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v41/methods/account_getPrivacy.md b/old_docs/API_docs_v41/methods/account_getPrivacy.md index 52786b79..8bbe9795 100644 --- a/old_docs/API_docs_v41/methods/account_getPrivacy.md +++ b/old_docs/API_docs_v41/methods/account_getPrivacy.md @@ -30,13 +30,10 @@ description: account.getPrivacy parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v41/methods/account_getWallPapers.md b/old_docs/API_docs_v41/methods/account_getWallPapers.md index 88c8a701..a71543d0 100644 --- a/old_docs/API_docs_v41/methods/account_getWallPapers.md +++ b/old_docs/API_docs_v41/methods/account_getWallPapers.md @@ -18,13 +18,10 @@ description: account.getWallPapers parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v41/methods/account_registerDevice.md b/old_docs/API_docs_v41/methods/account_registerDevice.md index ab7ec933..cfa1546c 100644 --- a/old_docs/API_docs_v41/methods/account_registerDevice.md +++ b/old_docs/API_docs_v41/methods/account_registerDevice.md @@ -36,13 +36,10 @@ description: account.registerDevice parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v41/methods/account_resetAuthorization.md b/old_docs/API_docs_v41/methods/account_resetAuthorization.md index e44334f2..0438cba3 100644 --- a/old_docs/API_docs_v41/methods/account_resetAuthorization.md +++ b/old_docs/API_docs_v41/methods/account_resetAuthorization.md @@ -30,13 +30,10 @@ description: account.resetAuthorization parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v41/methods/account_resetNotifySettings.md b/old_docs/API_docs_v41/methods/account_resetNotifySettings.md index 155ede68..92db4f4f 100644 --- a/old_docs/API_docs_v41/methods/account_resetNotifySettings.md +++ b/old_docs/API_docs_v41/methods/account_resetNotifySettings.md @@ -18,13 +18,10 @@ description: account.resetNotifySettings parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v41/methods/account_sendChangePhoneCode.md b/old_docs/API_docs_v41/methods/account_sendChangePhoneCode.md index 650dba72..ad611a8b 100644 --- a/old_docs/API_docs_v41/methods/account_sendChangePhoneCode.md +++ b/old_docs/API_docs_v41/methods/account_sendChangePhoneCode.md @@ -30,13 +30,10 @@ description: account.sendChangePhoneCode parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v41/methods/account_setAccountTTL.md b/old_docs/API_docs_v41/methods/account_setAccountTTL.md index f06eb676..d08f59fb 100644 --- a/old_docs/API_docs_v41/methods/account_setAccountTTL.md +++ b/old_docs/API_docs_v41/methods/account_setAccountTTL.md @@ -30,13 +30,10 @@ description: account.setAccountTTL parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v41/methods/account_setPrivacy.md b/old_docs/API_docs_v41/methods/account_setPrivacy.md index 56aebbcc..401aa71c 100644 --- a/old_docs/API_docs_v41/methods/account_setPrivacy.md +++ b/old_docs/API_docs_v41/methods/account_setPrivacy.md @@ -31,13 +31,10 @@ description: account.setPrivacy parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v41/methods/account_unregisterDevice.md b/old_docs/API_docs_v41/methods/account_unregisterDevice.md index 41899b6e..283ec7d2 100644 --- a/old_docs/API_docs_v41/methods/account_unregisterDevice.md +++ b/old_docs/API_docs_v41/methods/account_unregisterDevice.md @@ -31,13 +31,10 @@ description: account.unregisterDevice parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v41/methods/account_updateDeviceLocked.md b/old_docs/API_docs_v41/methods/account_updateDeviceLocked.md index 37aeb59d..ae6125a5 100644 --- a/old_docs/API_docs_v41/methods/account_updateDeviceLocked.md +++ b/old_docs/API_docs_v41/methods/account_updateDeviceLocked.md @@ -23,13 +23,10 @@ description: account.updateDeviceLocked parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v41/methods/account_updateNotifySettings.md b/old_docs/API_docs_v41/methods/account_updateNotifySettings.md index 8389b5c2..fb096250 100644 --- a/old_docs/API_docs_v41/methods/account_updateNotifySettings.md +++ b/old_docs/API_docs_v41/methods/account_updateNotifySettings.md @@ -31,13 +31,10 @@ description: account.updateNotifySettings parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v41/methods/account_updatePasswordSettings.md b/old_docs/API_docs_v41/methods/account_updatePasswordSettings.md index b7c8da4b..ffa8dcd9 100644 --- a/old_docs/API_docs_v41/methods/account_updatePasswordSettings.md +++ b/old_docs/API_docs_v41/methods/account_updatePasswordSettings.md @@ -34,13 +34,10 @@ description: account.updatePasswordSettings parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v41/methods/account_updateProfile.md b/old_docs/API_docs_v41/methods/account_updateProfile.md index c8712074..123ed13a 100644 --- a/old_docs/API_docs_v41/methods/account_updateProfile.md +++ b/old_docs/API_docs_v41/methods/account_updateProfile.md @@ -32,13 +32,10 @@ description: account.updateProfile parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v41/methods/account_updateStatus.md b/old_docs/API_docs_v41/methods/account_updateStatus.md index 7204e582..c8fa0a79 100644 --- a/old_docs/API_docs_v41/methods/account_updateStatus.md +++ b/old_docs/API_docs_v41/methods/account_updateStatus.md @@ -30,13 +30,10 @@ description: account.updateStatus parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v41/methods/account_updateUsername.md b/old_docs/API_docs_v41/methods/account_updateUsername.md index 22be2fd4..2b7576a5 100644 --- a/old_docs/API_docs_v41/methods/account_updateUsername.md +++ b/old_docs/API_docs_v41/methods/account_updateUsername.md @@ -32,13 +32,10 @@ description: account.updateUsername parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v41/methods/auth_bindTempAuthKey.md b/old_docs/API_docs_v41/methods/auth_bindTempAuthKey.md index e3d72dd5..7419abb0 100644 --- a/old_docs/API_docs_v41/methods/auth_bindTempAuthKey.md +++ b/old_docs/API_docs_v41/methods/auth_bindTempAuthKey.md @@ -35,16 +35,13 @@ description: auth.bindTempAuthKey parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v41/methods/auth_checkPassword.md b/old_docs/API_docs_v41/methods/auth_checkPassword.md index d5559186..6b6b21cc 100644 --- a/old_docs/API_docs_v41/methods/auth_checkPassword.md +++ b/old_docs/API_docs_v41/methods/auth_checkPassword.md @@ -30,13 +30,10 @@ description: auth.checkPassword parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v41/methods/auth_checkPhone.md b/old_docs/API_docs_v41/methods/auth_checkPhone.md index 3455904d..f6cac2e6 100644 --- a/old_docs/API_docs_v41/methods/auth_checkPhone.md +++ b/old_docs/API_docs_v41/methods/auth_checkPhone.md @@ -32,13 +32,10 @@ description: auth.checkPhone parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v41/methods/auth_exportAuthorization.md b/old_docs/API_docs_v41/methods/auth_exportAuthorization.md index 44c45b70..cbc8203b 100644 --- a/old_docs/API_docs_v41/methods/auth_exportAuthorization.md +++ b/old_docs/API_docs_v41/methods/auth_exportAuthorization.md @@ -30,16 +30,13 @@ description: auth.exportAuthorization parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v41/methods/auth_importAuthorization.md b/old_docs/API_docs_v41/methods/auth_importAuthorization.md index e0fd534f..22166510 100644 --- a/old_docs/API_docs_v41/methods/auth_importAuthorization.md +++ b/old_docs/API_docs_v41/methods/auth_importAuthorization.md @@ -32,16 +32,13 @@ description: auth.importAuthorization parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v41/methods/auth_recoverPassword.md b/old_docs/API_docs_v41/methods/auth_recoverPassword.md index c2ce3fed..931e99fd 100644 --- a/old_docs/API_docs_v41/methods/auth_recoverPassword.md +++ b/old_docs/API_docs_v41/methods/auth_recoverPassword.md @@ -30,13 +30,10 @@ description: auth.recoverPassword parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v41/methods/auth_requestPasswordRecovery.md b/old_docs/API_docs_v41/methods/auth_requestPasswordRecovery.md index 101b1cf7..c6babcd9 100644 --- a/old_docs/API_docs_v41/methods/auth_requestPasswordRecovery.md +++ b/old_docs/API_docs_v41/methods/auth_requestPasswordRecovery.md @@ -25,13 +25,10 @@ description: auth.requestPasswordRecovery parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v41/methods/auth_resetAuthorizations.md b/old_docs/API_docs_v41/methods/auth_resetAuthorizations.md index 87a39a22..fe297fa7 100644 --- a/old_docs/API_docs_v41/methods/auth_resetAuthorizations.md +++ b/old_docs/API_docs_v41/methods/auth_resetAuthorizations.md @@ -25,13 +25,10 @@ description: auth.resetAuthorizations parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v41/methods/auth_sendCall.md b/old_docs/API_docs_v41/methods/auth_sendCall.md index 00eaff4e..386cfad4 100644 --- a/old_docs/API_docs_v41/methods/auth_sendCall.md +++ b/old_docs/API_docs_v41/methods/auth_sendCall.md @@ -24,16 +24,13 @@ description: auth.sendCall parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v41/methods/auth_sendInvites.md b/old_docs/API_docs_v41/methods/auth_sendInvites.md index 604fc65d..ad9636c5 100644 --- a/old_docs/API_docs_v41/methods/auth_sendInvites.md +++ b/old_docs/API_docs_v41/methods/auth_sendInvites.md @@ -31,13 +31,10 @@ description: auth.sendInvites parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v41/methods/auth_sendSms.md b/old_docs/API_docs_v41/methods/auth_sendSms.md index 6d942e97..9a214e65 100644 --- a/old_docs/API_docs_v41/methods/auth_sendSms.md +++ b/old_docs/API_docs_v41/methods/auth_sendSms.md @@ -24,16 +24,13 @@ description: auth.sendSms parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v41/methods/channels_checkUsername.md b/old_docs/API_docs_v41/methods/channels_checkUsername.md index d6ea876d..e29ee107 100644 --- a/old_docs/API_docs_v41/methods/channels_checkUsername.md +++ b/old_docs/API_docs_v41/methods/channels_checkUsername.md @@ -33,13 +33,10 @@ description: channels.checkUsername parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v41/methods/channels_createChannel.md b/old_docs/API_docs_v41/methods/channels_createChannel.md index 9ba02e9e..58808b73 100644 --- a/old_docs/API_docs_v41/methods/channels_createChannel.md +++ b/old_docs/API_docs_v41/methods/channels_createChannel.md @@ -34,13 +34,10 @@ description: channels.createChannel parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v41/methods/channels_deleteChannel.md b/old_docs/API_docs_v41/methods/channels_deleteChannel.md index 912ab080..532f3c6c 100644 --- a/old_docs/API_docs_v41/methods/channels_deleteChannel.md +++ b/old_docs/API_docs_v41/methods/channels_deleteChannel.md @@ -31,13 +31,10 @@ description: channels.deleteChannel parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v41/methods/channels_deleteMessages.md b/old_docs/API_docs_v41/methods/channels_deleteMessages.md index b3481294..a42a47a5 100644 --- a/old_docs/API_docs_v41/methods/channels_deleteMessages.md +++ b/old_docs/API_docs_v41/methods/channels_deleteMessages.md @@ -33,16 +33,13 @@ description: channels.deleteMessages parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v41/methods/channels_deleteUserHistory.md b/old_docs/API_docs_v41/methods/channels_deleteUserHistory.md index 66843269..73494485 100644 --- a/old_docs/API_docs_v41/methods/channels_deleteUserHistory.md +++ b/old_docs/API_docs_v41/methods/channels_deleteUserHistory.md @@ -32,13 +32,10 @@ description: channels.deleteUserHistory parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v41/methods/channels_editAbout.md b/old_docs/API_docs_v41/methods/channels_editAbout.md index 4c759a8a..1c3ce933 100644 --- a/old_docs/API_docs_v41/methods/channels_editAbout.md +++ b/old_docs/API_docs_v41/methods/channels_editAbout.md @@ -34,16 +34,13 @@ description: channels.editAbout parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v41/methods/channels_editAdmin.md b/old_docs/API_docs_v41/methods/channels_editAdmin.md index fda46a3b..e6f63218 100644 --- a/old_docs/API_docs_v41/methods/channels_editAdmin.md +++ b/old_docs/API_docs_v41/methods/channels_editAdmin.md @@ -41,16 +41,13 @@ description: channels.editAdmin parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v41/methods/channels_editPhoto.md b/old_docs/API_docs_v41/methods/channels_editPhoto.md index 99873537..4a4aeb03 100644 --- a/old_docs/API_docs_v41/methods/channels_editPhoto.md +++ b/old_docs/API_docs_v41/methods/channels_editPhoto.md @@ -33,16 +33,13 @@ description: channels.editPhoto parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v41/methods/channels_editTitle.md b/old_docs/API_docs_v41/methods/channels_editTitle.md index 04e8ce12..8a69d09b 100644 --- a/old_docs/API_docs_v41/methods/channels_editTitle.md +++ b/old_docs/API_docs_v41/methods/channels_editTitle.md @@ -33,16 +33,13 @@ description: channels.editTitle parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v41/methods/channels_exportInvite.md b/old_docs/API_docs_v41/methods/channels_exportInvite.md index 2ed80f6c..79dc6401 100644 --- a/old_docs/API_docs_v41/methods/channels_exportInvite.md +++ b/old_docs/API_docs_v41/methods/channels_exportInvite.md @@ -32,16 +32,13 @@ description: channels.exportInvite parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v41/methods/channels_getChannels.md b/old_docs/API_docs_v41/methods/channels_getChannels.md index 13304938..e80aa6a6 100644 --- a/old_docs/API_docs_v41/methods/channels_getChannels.md +++ b/old_docs/API_docs_v41/methods/channels_getChannels.md @@ -32,16 +32,13 @@ description: channels.getChannels parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v41/methods/channels_getDialogs.md b/old_docs/API_docs_v41/methods/channels_getDialogs.md index 854372f6..916f9b34 100644 --- a/old_docs/API_docs_v41/methods/channels_getDialogs.md +++ b/old_docs/API_docs_v41/methods/channels_getDialogs.md @@ -24,16 +24,13 @@ description: channels.getDialogs parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v41/methods/channels_getImportantHistory.md b/old_docs/API_docs_v41/methods/channels_getImportantHistory.md index 076315a3..a7c73057 100644 --- a/old_docs/API_docs_v41/methods/channels_getImportantHistory.md +++ b/old_docs/API_docs_v41/methods/channels_getImportantHistory.md @@ -28,16 +28,13 @@ description: channels.getImportantHistory parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v41/methods/channels_getMessages.md b/old_docs/API_docs_v41/methods/channels_getMessages.md index 5480dd86..dc392773 100644 --- a/old_docs/API_docs_v41/methods/channels_getMessages.md +++ b/old_docs/API_docs_v41/methods/channels_getMessages.md @@ -33,16 +33,13 @@ description: channels.getMessages parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v41/methods/channels_getParticipant.md b/old_docs/API_docs_v41/methods/channels_getParticipant.md index 8c7e3cbd..001bf115 100644 --- a/old_docs/API_docs_v41/methods/channels_getParticipant.md +++ b/old_docs/API_docs_v41/methods/channels_getParticipant.md @@ -35,16 +35,13 @@ description: channels.getParticipant parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v41/methods/channels_inviteToChannel.md b/old_docs/API_docs_v41/methods/channels_inviteToChannel.md index cf5480e0..2448fb84 100644 --- a/old_docs/API_docs_v41/methods/channels_inviteToChannel.md +++ b/old_docs/API_docs_v41/methods/channels_inviteToChannel.md @@ -46,13 +46,10 @@ description: channels.inviteToChannel parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v41/methods/channels_joinChannel.md b/old_docs/API_docs_v41/methods/channels_joinChannel.md index f31730a1..e746cf48 100644 --- a/old_docs/API_docs_v41/methods/channels_joinChannel.md +++ b/old_docs/API_docs_v41/methods/channels_joinChannel.md @@ -32,13 +32,10 @@ description: channels.joinChannel parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v41/methods/channels_kickFromChannel.md b/old_docs/API_docs_v41/methods/channels_kickFromChannel.md index c903caa4..c85833ce 100644 --- a/old_docs/API_docs_v41/methods/channels_kickFromChannel.md +++ b/old_docs/API_docs_v41/methods/channels_kickFromChannel.md @@ -25,16 +25,13 @@ description: channels.kickFromChannel parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v41/methods/channels_leaveChannel.md b/old_docs/API_docs_v41/methods/channels_leaveChannel.md index 12902f6d..ff244ded 100644 --- a/old_docs/API_docs_v41/methods/channels_leaveChannel.md +++ b/old_docs/API_docs_v41/methods/channels_leaveChannel.md @@ -34,16 +34,13 @@ description: channels.leaveChannel parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v41/methods/channels_readHistory.md b/old_docs/API_docs_v41/methods/channels_readHistory.md index be979101..6fc6ec0e 100644 --- a/old_docs/API_docs_v41/methods/channels_readHistory.md +++ b/old_docs/API_docs_v41/methods/channels_readHistory.md @@ -32,13 +32,10 @@ description: channels.readHistory parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v41/methods/channels_reportSpam.md b/old_docs/API_docs_v41/methods/channels_reportSpam.md index 22f34443..a37a5833 100644 --- a/old_docs/API_docs_v41/methods/channels_reportSpam.md +++ b/old_docs/API_docs_v41/methods/channels_reportSpam.md @@ -33,13 +33,10 @@ description: channels.reportSpam parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v41/methods/channels_toggleComments.md b/old_docs/API_docs_v41/methods/channels_toggleComments.md index 55da95b5..1b304615 100644 --- a/old_docs/API_docs_v41/methods/channels_toggleComments.md +++ b/old_docs/API_docs_v41/methods/channels_toggleComments.md @@ -24,16 +24,13 @@ description: channels.toggleComments parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v41/methods/channels_updateUsername.md b/old_docs/API_docs_v41/methods/channels_updateUsername.md index c2ede724..1f1f111e 100644 --- a/old_docs/API_docs_v41/methods/channels_updateUsername.md +++ b/old_docs/API_docs_v41/methods/channels_updateUsername.md @@ -35,13 +35,10 @@ description: channels.updateUsername parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v41/methods/contacts_block.md b/old_docs/API_docs_v41/methods/contacts_block.md index d9d58e37..1c7cbe26 100644 --- a/old_docs/API_docs_v41/methods/contacts_block.md +++ b/old_docs/API_docs_v41/methods/contacts_block.md @@ -30,13 +30,10 @@ description: contacts.block parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v41/methods/contacts_deleteContact.md b/old_docs/API_docs_v41/methods/contacts_deleteContact.md index cd8c17ad..987a1be0 100644 --- a/old_docs/API_docs_v41/methods/contacts_deleteContact.md +++ b/old_docs/API_docs_v41/methods/contacts_deleteContact.md @@ -30,13 +30,10 @@ description: contacts.deleteContact parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v41/methods/contacts_deleteContacts.md b/old_docs/API_docs_v41/methods/contacts_deleteContacts.md index fc65880d..67a922ed 100644 --- a/old_docs/API_docs_v41/methods/contacts_deleteContacts.md +++ b/old_docs/API_docs_v41/methods/contacts_deleteContacts.md @@ -31,13 +31,10 @@ description: contacts.deleteContacts parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v41/methods/contacts_exportCard.md b/old_docs/API_docs_v41/methods/contacts_exportCard.md index 63508076..bf6d1f9f 100644 --- a/old_docs/API_docs_v41/methods/contacts_exportCard.md +++ b/old_docs/API_docs_v41/methods/contacts_exportCard.md @@ -18,13 +18,10 @@ description: contacts.exportCard parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v41/methods/contacts_getBlocked.md b/old_docs/API_docs_v41/methods/contacts_getBlocked.md index f50792b4..faa719da 100644 --- a/old_docs/API_docs_v41/methods/contacts_getBlocked.md +++ b/old_docs/API_docs_v41/methods/contacts_getBlocked.md @@ -24,13 +24,10 @@ description: contacts.getBlocked parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v41/methods/contacts_getContacts.md b/old_docs/API_docs_v41/methods/contacts_getContacts.md index 71313bf2..a6779111 100644 --- a/old_docs/API_docs_v41/methods/contacts_getContacts.md +++ b/old_docs/API_docs_v41/methods/contacts_getContacts.md @@ -23,13 +23,10 @@ description: contacts.getContacts parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v41/methods/contacts_getStatuses.md b/old_docs/API_docs_v41/methods/contacts_getStatuses.md index d914e08d..9bb7f263 100644 --- a/old_docs/API_docs_v41/methods/contacts_getStatuses.md +++ b/old_docs/API_docs_v41/methods/contacts_getStatuses.md @@ -18,13 +18,10 @@ description: contacts.getStatuses parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v41/methods/contacts_getSuggested.md b/old_docs/API_docs_v41/methods/contacts_getSuggested.md index a29f4aff..2059c01b 100644 --- a/old_docs/API_docs_v41/methods/contacts_getSuggested.md +++ b/old_docs/API_docs_v41/methods/contacts_getSuggested.md @@ -23,16 +23,13 @@ description: contacts.getSuggested parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v41/methods/contacts_importCard.md b/old_docs/API_docs_v41/methods/contacts_importCard.md index a6abf56d..7a2f34e1 100644 --- a/old_docs/API_docs_v41/methods/contacts_importCard.md +++ b/old_docs/API_docs_v41/methods/contacts_importCard.md @@ -31,13 +31,10 @@ description: contacts.importCard parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v41/methods/contacts_importContacts.md b/old_docs/API_docs_v41/methods/contacts_importContacts.md index db2051ac..2f070493 100644 --- a/old_docs/API_docs_v41/methods/contacts_importContacts.md +++ b/old_docs/API_docs_v41/methods/contacts_importContacts.md @@ -24,13 +24,10 @@ description: contacts.importContacts parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v41/methods/contacts_search.md b/old_docs/API_docs_v41/methods/contacts_search.md index 0203b160..70a0635e 100644 --- a/old_docs/API_docs_v41/methods/contacts_search.md +++ b/old_docs/API_docs_v41/methods/contacts_search.md @@ -33,13 +33,10 @@ description: contacts.search parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v41/methods/contacts_unblock.md b/old_docs/API_docs_v41/methods/contacts_unblock.md index a1977c24..9c01e42a 100644 --- a/old_docs/API_docs_v41/methods/contacts_unblock.md +++ b/old_docs/API_docs_v41/methods/contacts_unblock.md @@ -30,13 +30,10 @@ description: contacts.unblock parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v41/methods/help_getAppChangelog.md b/old_docs/API_docs_v41/methods/help_getAppChangelog.md index 302809aa..b27cc9f0 100644 --- a/old_docs/API_docs_v41/methods/help_getAppChangelog.md +++ b/old_docs/API_docs_v41/methods/help_getAppChangelog.md @@ -26,13 +26,10 @@ description: help.getAppChangelog parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v41/methods/help_getAppUpdate.md b/old_docs/API_docs_v41/methods/help_getAppUpdate.md index c8e67402..7b3bdde9 100644 --- a/old_docs/API_docs_v41/methods/help_getAppUpdate.md +++ b/old_docs/API_docs_v41/methods/help_getAppUpdate.md @@ -26,13 +26,10 @@ description: help.getAppUpdate parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v41/methods/help_getConfig.md b/old_docs/API_docs_v41/methods/help_getConfig.md index e3648b5a..bb51b362 100644 --- a/old_docs/API_docs_v41/methods/help_getConfig.md +++ b/old_docs/API_docs_v41/methods/help_getConfig.md @@ -25,16 +25,13 @@ description: help.getConfig parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v41/methods/help_getInviteText.md b/old_docs/API_docs_v41/methods/help_getInviteText.md index 348de85d..40251dd5 100644 --- a/old_docs/API_docs_v41/methods/help_getInviteText.md +++ b/old_docs/API_docs_v41/methods/help_getInviteText.md @@ -23,13 +23,10 @@ description: help.getInviteText parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v41/methods/help_getNearestDc.md b/old_docs/API_docs_v41/methods/help_getNearestDc.md index c6f5c555..6d8ed3f7 100644 --- a/old_docs/API_docs_v41/methods/help_getNearestDc.md +++ b/old_docs/API_docs_v41/methods/help_getNearestDc.md @@ -18,13 +18,10 @@ description: help.getNearestDc parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v41/methods/help_getSupport.md b/old_docs/API_docs_v41/methods/help_getSupport.md index 209edf03..ca8db03c 100644 --- a/old_docs/API_docs_v41/methods/help_getSupport.md +++ b/old_docs/API_docs_v41/methods/help_getSupport.md @@ -18,13 +18,10 @@ description: help.getSupport parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v41/methods/help_saveAppLog.md b/old_docs/API_docs_v41/methods/help_saveAppLog.md index 4f06434c..741b9aa1 100644 --- a/old_docs/API_docs_v41/methods/help_saveAppLog.md +++ b/old_docs/API_docs_v41/methods/help_saveAppLog.md @@ -23,13 +23,10 @@ description: help.saveAppLog parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v41/methods/initConnection.md b/old_docs/API_docs_v41/methods/initConnection.md index 0d22a1cb..c0307677 100644 --- a/old_docs/API_docs_v41/methods/initConnection.md +++ b/old_docs/API_docs_v41/methods/initConnection.md @@ -36,16 +36,13 @@ description: initConnection parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v41/methods/invokeAfterMsg.md b/old_docs/API_docs_v41/methods/invokeAfterMsg.md index c139fe8c..a382429e 100644 --- a/old_docs/API_docs_v41/methods/invokeAfterMsg.md +++ b/old_docs/API_docs_v41/methods/invokeAfterMsg.md @@ -24,16 +24,13 @@ description: invokeAfterMsg parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v41/methods/invokeAfterMsgs.md b/old_docs/API_docs_v41/methods/invokeAfterMsgs.md index 35004296..169eedaf 100644 --- a/old_docs/API_docs_v41/methods/invokeAfterMsgs.md +++ b/old_docs/API_docs_v41/methods/invokeAfterMsgs.md @@ -24,16 +24,13 @@ description: invokeAfterMsgs parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v41/methods/invokeWithLayer.md b/old_docs/API_docs_v41/methods/invokeWithLayer.md index 706036c4..d9a2c74c 100644 --- a/old_docs/API_docs_v41/methods/invokeWithLayer.md +++ b/old_docs/API_docs_v41/methods/invokeWithLayer.md @@ -41,16 +41,13 @@ description: invokeWithLayer parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v41/methods/invokeWithoutUpdates.md b/old_docs/API_docs_v41/methods/invokeWithoutUpdates.md index 10c6bfcf..f7d01765 100644 --- a/old_docs/API_docs_v41/methods/invokeWithoutUpdates.md +++ b/old_docs/API_docs_v41/methods/invokeWithoutUpdates.md @@ -23,16 +23,13 @@ description: invokeWithoutUpdates parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v41/methods/messages_addChatUser.md b/old_docs/API_docs_v41/methods/messages_addChatUser.md index 00da5a61..b9e6243d 100644 --- a/old_docs/API_docs_v41/methods/messages_addChatUser.md +++ b/old_docs/API_docs_v41/methods/messages_addChatUser.md @@ -40,13 +40,10 @@ description: messages.addChatUser parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v41/methods/messages_checkChatInvite.md b/old_docs/API_docs_v41/methods/messages_checkChatInvite.md index c5eb1c06..c4489469 100644 --- a/old_docs/API_docs_v41/methods/messages_checkChatInvite.md +++ b/old_docs/API_docs_v41/methods/messages_checkChatInvite.md @@ -32,13 +32,10 @@ description: messages.checkChatInvite parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v41/methods/messages_createChat.md b/old_docs/API_docs_v41/methods/messages_createChat.md index c643a022..c6c8f420 100644 --- a/old_docs/API_docs_v41/methods/messages_createChat.md +++ b/old_docs/API_docs_v41/methods/messages_createChat.md @@ -32,13 +32,10 @@ description: messages.createChat parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v41/methods/messages_deactivateChat.md b/old_docs/API_docs_v41/methods/messages_deactivateChat.md index ab35c01e..1363dbce 100644 --- a/old_docs/API_docs_v41/methods/messages_deactivateChat.md +++ b/old_docs/API_docs_v41/methods/messages_deactivateChat.md @@ -24,16 +24,13 @@ description: messages.deactivateChat parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v41/methods/messages_deleteChatUser.md b/old_docs/API_docs_v41/methods/messages_deleteChatUser.md index 3d75d9cf..4b8c2aa5 100644 --- a/old_docs/API_docs_v41/methods/messages_deleteChatUser.md +++ b/old_docs/API_docs_v41/methods/messages_deleteChatUser.md @@ -33,16 +33,13 @@ description: messages.deleteChatUser parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v41/methods/messages_deleteHistory.md b/old_docs/API_docs_v41/methods/messages_deleteHistory.md index c8081e79..6ae145d8 100644 --- a/old_docs/API_docs_v41/methods/messages_deleteHistory.md +++ b/old_docs/API_docs_v41/methods/messages_deleteHistory.md @@ -31,13 +31,10 @@ description: messages.deleteHistory parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v41/methods/messages_deleteMessages.md b/old_docs/API_docs_v41/methods/messages_deleteMessages.md index 65dbbc4a..38b3ca09 100644 --- a/old_docs/API_docs_v41/methods/messages_deleteMessages.md +++ b/old_docs/API_docs_v41/methods/messages_deleteMessages.md @@ -30,16 +30,13 @@ description: messages.deleteMessages parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v41/methods/messages_editChatAdmin.md b/old_docs/API_docs_v41/methods/messages_editChatAdmin.md index e64d9da5..1b3ffa9f 100644 --- a/old_docs/API_docs_v41/methods/messages_editChatAdmin.md +++ b/old_docs/API_docs_v41/methods/messages_editChatAdmin.md @@ -32,13 +32,10 @@ description: messages.editChatAdmin parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v41/methods/messages_editChatPhoto.md b/old_docs/API_docs_v41/methods/messages_editChatPhoto.md index d225962d..8c5d9d47 100644 --- a/old_docs/API_docs_v41/methods/messages_editChatPhoto.md +++ b/old_docs/API_docs_v41/methods/messages_editChatPhoto.md @@ -35,16 +35,13 @@ description: messages.editChatPhoto parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v41/methods/messages_editChatTitle.md b/old_docs/API_docs_v41/methods/messages_editChatTitle.md index 5cb1c6d7..238c6d72 100644 --- a/old_docs/API_docs_v41/methods/messages_editChatTitle.md +++ b/old_docs/API_docs_v41/methods/messages_editChatTitle.md @@ -32,16 +32,13 @@ description: messages.editChatTitle parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v41/methods/messages_exportChatInvite.md b/old_docs/API_docs_v41/methods/messages_exportChatInvite.md index 4a6e28ff..78f2ff86 100644 --- a/old_docs/API_docs_v41/methods/messages_exportChatInvite.md +++ b/old_docs/API_docs_v41/methods/messages_exportChatInvite.md @@ -30,13 +30,10 @@ description: messages.exportChatInvite parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v41/methods/messages_forwardMessage.md b/old_docs/API_docs_v41/methods/messages_forwardMessage.md index 4e2362db..fbdbc955 100644 --- a/old_docs/API_docs_v41/methods/messages_forwardMessage.md +++ b/old_docs/API_docs_v41/methods/messages_forwardMessage.md @@ -34,16 +34,13 @@ description: messages.forwardMessage parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v41/methods/messages_forwardMessages.md b/old_docs/API_docs_v41/methods/messages_forwardMessages.md index 2ea31ccf..6e5dee90 100644 --- a/old_docs/API_docs_v41/methods/messages_forwardMessages.md +++ b/old_docs/API_docs_v41/methods/messages_forwardMessages.md @@ -54,16 +54,13 @@ description: messages.forwardMessages parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v41/methods/messages_getAllStickers.md b/old_docs/API_docs_v41/methods/messages_getAllStickers.md index defe31c1..3a0b3781 100644 --- a/old_docs/API_docs_v41/methods/messages_getAllStickers.md +++ b/old_docs/API_docs_v41/methods/messages_getAllStickers.md @@ -23,13 +23,10 @@ description: messages.getAllStickers parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v41/methods/messages_getChats.md b/old_docs/API_docs_v41/methods/messages_getChats.md index 6fa30cbd..c322613d 100644 --- a/old_docs/API_docs_v41/methods/messages_getChats.md +++ b/old_docs/API_docs_v41/methods/messages_getChats.md @@ -31,16 +31,13 @@ description: messages.getChats parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v41/methods/messages_getDhConfig.md b/old_docs/API_docs_v41/methods/messages_getDhConfig.md index aac3354d..f97684d2 100644 --- a/old_docs/API_docs_v41/methods/messages_getDhConfig.md +++ b/old_docs/API_docs_v41/methods/messages_getDhConfig.md @@ -31,13 +31,10 @@ description: messages.getDhConfig parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v41/methods/messages_getDialogs.md b/old_docs/API_docs_v41/methods/messages_getDialogs.md index 6b0e807d..50f2b9d5 100644 --- a/old_docs/API_docs_v41/methods/messages_getDialogs.md +++ b/old_docs/API_docs_v41/methods/messages_getDialogs.md @@ -34,13 +34,10 @@ description: messages.getDialogs parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v41/methods/messages_getHistory.md b/old_docs/API_docs_v41/methods/messages_getHistory.md index ba9ed92d..23955a96 100644 --- a/old_docs/API_docs_v41/methods/messages_getHistory.md +++ b/old_docs/API_docs_v41/methods/messages_getHistory.md @@ -40,13 +40,10 @@ description: messages.getHistory parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v41/methods/messages_getMessages.md b/old_docs/API_docs_v41/methods/messages_getMessages.md index 5a970246..787c46dd 100644 --- a/old_docs/API_docs_v41/methods/messages_getMessages.md +++ b/old_docs/API_docs_v41/methods/messages_getMessages.md @@ -23,16 +23,13 @@ description: messages.getMessages parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v41/methods/messages_getMessagesViews.md b/old_docs/API_docs_v41/methods/messages_getMessagesViews.md index 263f3f95..de5692dc 100644 --- a/old_docs/API_docs_v41/methods/messages_getMessagesViews.md +++ b/old_docs/API_docs_v41/methods/messages_getMessagesViews.md @@ -34,13 +34,10 @@ description: messages.getMessagesViews parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v41/methods/messages_getStickerSet.md b/old_docs/API_docs_v41/methods/messages_getStickerSet.md index 59f33916..b480e0fe 100644 --- a/old_docs/API_docs_v41/methods/messages_getStickerSet.md +++ b/old_docs/API_docs_v41/methods/messages_getStickerSet.md @@ -30,16 +30,13 @@ description: messages.getStickerSet parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v41/methods/messages_getStickers.md b/old_docs/API_docs_v41/methods/messages_getStickers.md index be61a120..1587cd01 100644 --- a/old_docs/API_docs_v41/methods/messages_getStickers.md +++ b/old_docs/API_docs_v41/methods/messages_getStickers.md @@ -24,16 +24,13 @@ description: messages.getStickers parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v41/methods/messages_getWebPagePreview.md b/old_docs/API_docs_v41/methods/messages_getWebPagePreview.md index a89600b1..d3908933 100644 --- a/old_docs/API_docs_v41/methods/messages_getWebPagePreview.md +++ b/old_docs/API_docs_v41/methods/messages_getWebPagePreview.md @@ -23,13 +23,10 @@ description: messages.getWebPagePreview parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v41/methods/messages_importChatInvite.md b/old_docs/API_docs_v41/methods/messages_importChatInvite.md index 9d77304d..9dcfa56d 100644 --- a/old_docs/API_docs_v41/methods/messages_importChatInvite.md +++ b/old_docs/API_docs_v41/methods/messages_importChatInvite.md @@ -36,13 +36,10 @@ description: messages.importChatInvite parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v41/methods/messages_installStickerSet.md b/old_docs/API_docs_v41/methods/messages_installStickerSet.md index 1969d008..cf1865a8 100644 --- a/old_docs/API_docs_v41/methods/messages_installStickerSet.md +++ b/old_docs/API_docs_v41/methods/messages_installStickerSet.md @@ -31,13 +31,10 @@ description: messages.installStickerSet parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v41/methods/messages_migrateChat.md b/old_docs/API_docs_v41/methods/messages_migrateChat.md index 22d2fbf0..a8274e70 100644 --- a/old_docs/API_docs_v41/methods/messages_migrateChat.md +++ b/old_docs/API_docs_v41/methods/messages_migrateChat.md @@ -32,13 +32,10 @@ description: messages.migrateChat parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v41/methods/messages_readEncryptedHistory.md b/old_docs/API_docs_v41/methods/messages_readEncryptedHistory.md index 766ee07d..f38f6b07 100644 --- a/old_docs/API_docs_v41/methods/messages_readEncryptedHistory.md +++ b/old_docs/API_docs_v41/methods/messages_readEncryptedHistory.md @@ -31,16 +31,13 @@ description: messages.readEncryptedHistory parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v41/methods/messages_readHistory.md b/old_docs/API_docs_v41/methods/messages_readHistory.md index 1aa7830a..fef62130 100644 --- a/old_docs/API_docs_v41/methods/messages_readHistory.md +++ b/old_docs/API_docs_v41/methods/messages_readHistory.md @@ -32,13 +32,10 @@ description: messages.readHistory parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v41/methods/messages_readMessageContents.md b/old_docs/API_docs_v41/methods/messages_readMessageContents.md index 4b1abda0..7a6055fc 100644 --- a/old_docs/API_docs_v41/methods/messages_readMessageContents.md +++ b/old_docs/API_docs_v41/methods/messages_readMessageContents.md @@ -23,13 +23,10 @@ description: messages.readMessageContents parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v41/methods/messages_receivedMessages.md b/old_docs/API_docs_v41/methods/messages_receivedMessages.md index 588ac5cf..e2cf3a2f 100644 --- a/old_docs/API_docs_v41/methods/messages_receivedMessages.md +++ b/old_docs/API_docs_v41/methods/messages_receivedMessages.md @@ -23,13 +23,10 @@ description: messages.receivedMessages parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v41/methods/messages_receivedQueue.md b/old_docs/API_docs_v41/methods/messages_receivedQueue.md index 3c7f1d4f..38f504b3 100644 --- a/old_docs/API_docs_v41/methods/messages_receivedQueue.md +++ b/old_docs/API_docs_v41/methods/messages_receivedQueue.md @@ -30,16 +30,13 @@ description: messages.receivedQueue parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v41/methods/messages_reportSpam.md b/old_docs/API_docs_v41/methods/messages_reportSpam.md index bfadb9ab..08c96d44 100644 --- a/old_docs/API_docs_v41/methods/messages_reportSpam.md +++ b/old_docs/API_docs_v41/methods/messages_reportSpam.md @@ -30,13 +30,10 @@ description: messages.reportSpam parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v41/methods/messages_search.md b/old_docs/API_docs_v41/methods/messages_search.md index 8ea63f65..87f282e3 100644 --- a/old_docs/API_docs_v41/methods/messages_search.md +++ b/old_docs/API_docs_v41/methods/messages_search.md @@ -44,13 +44,10 @@ description: messages.search parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v41/methods/messages_searchGlobal.md b/old_docs/API_docs_v41/methods/messages_searchGlobal.md index 0553dd7a..4b45eed2 100644 --- a/old_docs/API_docs_v41/methods/messages_searchGlobal.md +++ b/old_docs/API_docs_v41/methods/messages_searchGlobal.md @@ -34,13 +34,10 @@ description: messages.searchGlobal parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v41/methods/messages_sendBroadcast.md b/old_docs/API_docs_v41/methods/messages_sendBroadcast.md index ac13d0bf..537166ab 100644 --- a/old_docs/API_docs_v41/methods/messages_sendBroadcast.md +++ b/old_docs/API_docs_v41/methods/messages_sendBroadcast.md @@ -25,16 +25,13 @@ description: messages.sendBroadcast parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v41/methods/messages_sendEncrypted.md b/old_docs/API_docs_v41/methods/messages_sendEncrypted.md index 82eeec92..ba9f796b 100644 --- a/old_docs/API_docs_v41/methods/messages_sendEncrypted.md +++ b/old_docs/API_docs_v41/methods/messages_sendEncrypted.md @@ -34,16 +34,13 @@ description: messages.sendEncrypted parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v41/methods/messages_sendEncryptedFile.md b/old_docs/API_docs_v41/methods/messages_sendEncryptedFile.md index 8f7a73d9..db16bf2d 100644 --- a/old_docs/API_docs_v41/methods/messages_sendEncryptedFile.md +++ b/old_docs/API_docs_v41/methods/messages_sendEncryptedFile.md @@ -32,16 +32,13 @@ description: messages.sendEncryptedFile parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v41/methods/messages_sendEncryptedService.md b/old_docs/API_docs_v41/methods/messages_sendEncryptedService.md index d427f6c3..fd4e2627 100644 --- a/old_docs/API_docs_v41/methods/messages_sendEncryptedService.md +++ b/old_docs/API_docs_v41/methods/messages_sendEncryptedService.md @@ -34,16 +34,13 @@ description: messages.sendEncryptedService parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v41/methods/messages_sendMedia.md b/old_docs/API_docs_v41/methods/messages_sendMedia.md index 4b924e7e..2bc63256 100644 --- a/old_docs/API_docs_v41/methods/messages_sendMedia.md +++ b/old_docs/API_docs_v41/methods/messages_sendMedia.md @@ -57,16 +57,13 @@ description: messages.sendMedia parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v41/methods/messages_sendMessage.md b/old_docs/API_docs_v41/methods/messages_sendMessage.md index 723c2f65..1a735df3 100644 --- a/old_docs/API_docs_v41/methods/messages_sendMessage.md +++ b/old_docs/API_docs_v41/methods/messages_sendMessage.md @@ -56,16 +56,13 @@ description: messages.sendMessage parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v41/methods/messages_setEncryptedTyping.md b/old_docs/API_docs_v41/methods/messages_setEncryptedTyping.md index a05b94dd..aeae6ff7 100644 --- a/old_docs/API_docs_v41/methods/messages_setEncryptedTyping.md +++ b/old_docs/API_docs_v41/methods/messages_setEncryptedTyping.md @@ -31,13 +31,10 @@ description: messages.setEncryptedTyping parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v41/methods/messages_setTyping.md b/old_docs/API_docs_v41/methods/messages_setTyping.md index 9ef8caf5..f6b7b7b5 100644 --- a/old_docs/API_docs_v41/methods/messages_setTyping.md +++ b/old_docs/API_docs_v41/methods/messages_setTyping.md @@ -37,16 +37,13 @@ description: messages.setTyping parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v41/methods/messages_startBot.md b/old_docs/API_docs_v41/methods/messages_startBot.md index 8d98e390..b33ab013 100644 --- a/old_docs/API_docs_v41/methods/messages_startBot.md +++ b/old_docs/API_docs_v41/methods/messages_startBot.md @@ -35,13 +35,10 @@ description: messages.startBot parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v41/methods/messages_toggleChatAdmins.md b/old_docs/API_docs_v41/methods/messages_toggleChatAdmins.md index 3bf8a419..97328065 100644 --- a/old_docs/API_docs_v41/methods/messages_toggleChatAdmins.md +++ b/old_docs/API_docs_v41/methods/messages_toggleChatAdmins.md @@ -32,13 +32,10 @@ description: messages.toggleChatAdmins parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v41/methods/messages_uninstallStickerSet.md b/old_docs/API_docs_v41/methods/messages_uninstallStickerSet.md index 6763e64f..76a3e3e2 100644 --- a/old_docs/API_docs_v41/methods/messages_uninstallStickerSet.md +++ b/old_docs/API_docs_v41/methods/messages_uninstallStickerSet.md @@ -30,13 +30,10 @@ description: messages.uninstallStickerSet parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v41/methods/photos_deletePhotos.md b/old_docs/API_docs_v41/methods/photos_deletePhotos.md index e9cd459d..61768b1e 100644 --- a/old_docs/API_docs_v41/methods/photos_deletePhotos.md +++ b/old_docs/API_docs_v41/methods/photos_deletePhotos.md @@ -23,13 +23,10 @@ description: photos.deletePhotos parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v41/methods/photos_getUserPhotos.md b/old_docs/API_docs_v41/methods/photos_getUserPhotos.md index d6c2a380..095363e7 100644 --- a/old_docs/API_docs_v41/methods/photos_getUserPhotos.md +++ b/old_docs/API_docs_v41/methods/photos_getUserPhotos.md @@ -34,16 +34,13 @@ description: photos.getUserPhotos parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v41/methods/photos_updateProfilePhoto.md b/old_docs/API_docs_v41/methods/photos_updateProfilePhoto.md index abb031d4..add6028f 100644 --- a/old_docs/API_docs_v41/methods/photos_updateProfilePhoto.md +++ b/old_docs/API_docs_v41/methods/photos_updateProfilePhoto.md @@ -24,13 +24,10 @@ description: photos.updateProfilePhoto parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v41/methods/photos_uploadProfilePhoto.md b/old_docs/API_docs_v41/methods/photos_uploadProfilePhoto.md index ae20fdfc..048a1d32 100644 --- a/old_docs/API_docs_v41/methods/photos_uploadProfilePhoto.md +++ b/old_docs/API_docs_v41/methods/photos_uploadProfilePhoto.md @@ -37,13 +37,10 @@ description: photos.uploadProfilePhoto parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v41/methods/users_getUsers.md b/old_docs/API_docs_v41/methods/users_getUsers.md index 6a44d258..3a981d57 100644 --- a/old_docs/API_docs_v41/methods/users_getUsers.md +++ b/old_docs/API_docs_v41/methods/users_getUsers.md @@ -33,16 +33,13 @@ description: users.getUsers parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v42/methods/account_changePhone.md b/old_docs/API_docs_v42/methods/account_changePhone.md index 5d1801d0..e47ef6a7 100644 --- a/old_docs/API_docs_v42/methods/account_changePhone.md +++ b/old_docs/API_docs_v42/methods/account_changePhone.md @@ -32,13 +32,10 @@ description: account.changePhone parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v42/methods/account_checkUsername.md b/old_docs/API_docs_v42/methods/account_checkUsername.md index afc59b6c..40cf822f 100644 --- a/old_docs/API_docs_v42/methods/account_checkUsername.md +++ b/old_docs/API_docs_v42/methods/account_checkUsername.md @@ -30,13 +30,10 @@ description: account.checkUsername parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v42/methods/account_deleteAccount.md b/old_docs/API_docs_v42/methods/account_deleteAccount.md index 5abcd0ec..6f1bbda9 100644 --- a/old_docs/API_docs_v42/methods/account_deleteAccount.md +++ b/old_docs/API_docs_v42/methods/account_deleteAccount.md @@ -23,13 +23,10 @@ description: account.deleteAccount parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v42/methods/account_getAccountTTL.md b/old_docs/API_docs_v42/methods/account_getAccountTTL.md index 3520fbef..538b1d7a 100644 --- a/old_docs/API_docs_v42/methods/account_getAccountTTL.md +++ b/old_docs/API_docs_v42/methods/account_getAccountTTL.md @@ -18,13 +18,10 @@ description: account.getAccountTTL parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v42/methods/account_getAuthorizations.md b/old_docs/API_docs_v42/methods/account_getAuthorizations.md index 91bbce5e..f138d517 100644 --- a/old_docs/API_docs_v42/methods/account_getAuthorizations.md +++ b/old_docs/API_docs_v42/methods/account_getAuthorizations.md @@ -18,13 +18,10 @@ description: account.getAuthorizations parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v42/methods/account_getNotifySettings.md b/old_docs/API_docs_v42/methods/account_getNotifySettings.md index 8ee710d8..a48eed2f 100644 --- a/old_docs/API_docs_v42/methods/account_getNotifySettings.md +++ b/old_docs/API_docs_v42/methods/account_getNotifySettings.md @@ -30,13 +30,10 @@ description: account.getNotifySettings parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v42/methods/account_getPassword.md b/old_docs/API_docs_v42/methods/account_getPassword.md index 4d9fd015..1abf6174 100644 --- a/old_docs/API_docs_v42/methods/account_getPassword.md +++ b/old_docs/API_docs_v42/methods/account_getPassword.md @@ -18,13 +18,10 @@ description: account.getPassword parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v42/methods/account_getPasswordSettings.md b/old_docs/API_docs_v42/methods/account_getPasswordSettings.md index 02cb77f7..aec5b989 100644 --- a/old_docs/API_docs_v42/methods/account_getPasswordSettings.md +++ b/old_docs/API_docs_v42/methods/account_getPasswordSettings.md @@ -30,13 +30,10 @@ description: account.getPasswordSettings parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v42/methods/account_getPrivacy.md b/old_docs/API_docs_v42/methods/account_getPrivacy.md index 52786b79..8bbe9795 100644 --- a/old_docs/API_docs_v42/methods/account_getPrivacy.md +++ b/old_docs/API_docs_v42/methods/account_getPrivacy.md @@ -30,13 +30,10 @@ description: account.getPrivacy parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v42/methods/account_getWallPapers.md b/old_docs/API_docs_v42/methods/account_getWallPapers.md index 88c8a701..a71543d0 100644 --- a/old_docs/API_docs_v42/methods/account_getWallPapers.md +++ b/old_docs/API_docs_v42/methods/account_getWallPapers.md @@ -18,13 +18,10 @@ description: account.getWallPapers parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v42/methods/account_registerDevice.md b/old_docs/API_docs_v42/methods/account_registerDevice.md index ab7ec933..cfa1546c 100644 --- a/old_docs/API_docs_v42/methods/account_registerDevice.md +++ b/old_docs/API_docs_v42/methods/account_registerDevice.md @@ -36,13 +36,10 @@ description: account.registerDevice parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v42/methods/account_resetAuthorization.md b/old_docs/API_docs_v42/methods/account_resetAuthorization.md index e44334f2..0438cba3 100644 --- a/old_docs/API_docs_v42/methods/account_resetAuthorization.md +++ b/old_docs/API_docs_v42/methods/account_resetAuthorization.md @@ -30,13 +30,10 @@ description: account.resetAuthorization parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v42/methods/account_resetNotifySettings.md b/old_docs/API_docs_v42/methods/account_resetNotifySettings.md index 155ede68..92db4f4f 100644 --- a/old_docs/API_docs_v42/methods/account_resetNotifySettings.md +++ b/old_docs/API_docs_v42/methods/account_resetNotifySettings.md @@ -18,13 +18,10 @@ description: account.resetNotifySettings parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v42/methods/account_sendChangePhoneCode.md b/old_docs/API_docs_v42/methods/account_sendChangePhoneCode.md index 650dba72..ad611a8b 100644 --- a/old_docs/API_docs_v42/methods/account_sendChangePhoneCode.md +++ b/old_docs/API_docs_v42/methods/account_sendChangePhoneCode.md @@ -30,13 +30,10 @@ description: account.sendChangePhoneCode parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v42/methods/account_setAccountTTL.md b/old_docs/API_docs_v42/methods/account_setAccountTTL.md index f06eb676..d08f59fb 100644 --- a/old_docs/API_docs_v42/methods/account_setAccountTTL.md +++ b/old_docs/API_docs_v42/methods/account_setAccountTTL.md @@ -30,13 +30,10 @@ description: account.setAccountTTL parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v42/methods/account_setPrivacy.md b/old_docs/API_docs_v42/methods/account_setPrivacy.md index 56aebbcc..401aa71c 100644 --- a/old_docs/API_docs_v42/methods/account_setPrivacy.md +++ b/old_docs/API_docs_v42/methods/account_setPrivacy.md @@ -31,13 +31,10 @@ description: account.setPrivacy parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v42/methods/account_unregisterDevice.md b/old_docs/API_docs_v42/methods/account_unregisterDevice.md index 41899b6e..283ec7d2 100644 --- a/old_docs/API_docs_v42/methods/account_unregisterDevice.md +++ b/old_docs/API_docs_v42/methods/account_unregisterDevice.md @@ -31,13 +31,10 @@ description: account.unregisterDevice parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v42/methods/account_updateDeviceLocked.md b/old_docs/API_docs_v42/methods/account_updateDeviceLocked.md index 37aeb59d..ae6125a5 100644 --- a/old_docs/API_docs_v42/methods/account_updateDeviceLocked.md +++ b/old_docs/API_docs_v42/methods/account_updateDeviceLocked.md @@ -23,13 +23,10 @@ description: account.updateDeviceLocked parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v42/methods/account_updateNotifySettings.md b/old_docs/API_docs_v42/methods/account_updateNotifySettings.md index 8389b5c2..fb096250 100644 --- a/old_docs/API_docs_v42/methods/account_updateNotifySettings.md +++ b/old_docs/API_docs_v42/methods/account_updateNotifySettings.md @@ -31,13 +31,10 @@ description: account.updateNotifySettings parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v42/methods/account_updatePasswordSettings.md b/old_docs/API_docs_v42/methods/account_updatePasswordSettings.md index b7c8da4b..ffa8dcd9 100644 --- a/old_docs/API_docs_v42/methods/account_updatePasswordSettings.md +++ b/old_docs/API_docs_v42/methods/account_updatePasswordSettings.md @@ -34,13 +34,10 @@ description: account.updatePasswordSettings parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v42/methods/account_updateProfile.md b/old_docs/API_docs_v42/methods/account_updateProfile.md index c8712074..123ed13a 100644 --- a/old_docs/API_docs_v42/methods/account_updateProfile.md +++ b/old_docs/API_docs_v42/methods/account_updateProfile.md @@ -32,13 +32,10 @@ description: account.updateProfile parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v42/methods/account_updateStatus.md b/old_docs/API_docs_v42/methods/account_updateStatus.md index 7204e582..c8fa0a79 100644 --- a/old_docs/API_docs_v42/methods/account_updateStatus.md +++ b/old_docs/API_docs_v42/methods/account_updateStatus.md @@ -30,13 +30,10 @@ description: account.updateStatus parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v42/methods/account_updateUsername.md b/old_docs/API_docs_v42/methods/account_updateUsername.md index 22be2fd4..2b7576a5 100644 --- a/old_docs/API_docs_v42/methods/account_updateUsername.md +++ b/old_docs/API_docs_v42/methods/account_updateUsername.md @@ -32,13 +32,10 @@ description: account.updateUsername parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v42/methods/auth_bindTempAuthKey.md b/old_docs/API_docs_v42/methods/auth_bindTempAuthKey.md index e3d72dd5..7419abb0 100644 --- a/old_docs/API_docs_v42/methods/auth_bindTempAuthKey.md +++ b/old_docs/API_docs_v42/methods/auth_bindTempAuthKey.md @@ -35,16 +35,13 @@ description: auth.bindTempAuthKey parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v42/methods/auth_checkPassword.md b/old_docs/API_docs_v42/methods/auth_checkPassword.md index d5559186..6b6b21cc 100644 --- a/old_docs/API_docs_v42/methods/auth_checkPassword.md +++ b/old_docs/API_docs_v42/methods/auth_checkPassword.md @@ -30,13 +30,10 @@ description: auth.checkPassword parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v42/methods/auth_checkPhone.md b/old_docs/API_docs_v42/methods/auth_checkPhone.md index 3455904d..f6cac2e6 100644 --- a/old_docs/API_docs_v42/methods/auth_checkPhone.md +++ b/old_docs/API_docs_v42/methods/auth_checkPhone.md @@ -32,13 +32,10 @@ description: auth.checkPhone parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v42/methods/auth_exportAuthorization.md b/old_docs/API_docs_v42/methods/auth_exportAuthorization.md index 44c45b70..cbc8203b 100644 --- a/old_docs/API_docs_v42/methods/auth_exportAuthorization.md +++ b/old_docs/API_docs_v42/methods/auth_exportAuthorization.md @@ -30,16 +30,13 @@ description: auth.exportAuthorization parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v42/methods/auth_importAuthorization.md b/old_docs/API_docs_v42/methods/auth_importAuthorization.md index e0fd534f..22166510 100644 --- a/old_docs/API_docs_v42/methods/auth_importAuthorization.md +++ b/old_docs/API_docs_v42/methods/auth_importAuthorization.md @@ -32,16 +32,13 @@ description: auth.importAuthorization parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v42/methods/auth_recoverPassword.md b/old_docs/API_docs_v42/methods/auth_recoverPassword.md index c2ce3fed..931e99fd 100644 --- a/old_docs/API_docs_v42/methods/auth_recoverPassword.md +++ b/old_docs/API_docs_v42/methods/auth_recoverPassword.md @@ -30,13 +30,10 @@ description: auth.recoverPassword parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v42/methods/auth_requestPasswordRecovery.md b/old_docs/API_docs_v42/methods/auth_requestPasswordRecovery.md index 101b1cf7..c6babcd9 100644 --- a/old_docs/API_docs_v42/methods/auth_requestPasswordRecovery.md +++ b/old_docs/API_docs_v42/methods/auth_requestPasswordRecovery.md @@ -25,13 +25,10 @@ description: auth.requestPasswordRecovery parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v42/methods/auth_resetAuthorizations.md b/old_docs/API_docs_v42/methods/auth_resetAuthorizations.md index 87a39a22..fe297fa7 100644 --- a/old_docs/API_docs_v42/methods/auth_resetAuthorizations.md +++ b/old_docs/API_docs_v42/methods/auth_resetAuthorizations.md @@ -25,13 +25,10 @@ description: auth.resetAuthorizations parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v42/methods/auth_sendCall.md b/old_docs/API_docs_v42/methods/auth_sendCall.md index 00eaff4e..386cfad4 100644 --- a/old_docs/API_docs_v42/methods/auth_sendCall.md +++ b/old_docs/API_docs_v42/methods/auth_sendCall.md @@ -24,16 +24,13 @@ description: auth.sendCall parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v42/methods/auth_sendInvites.md b/old_docs/API_docs_v42/methods/auth_sendInvites.md index 604fc65d..ad9636c5 100644 --- a/old_docs/API_docs_v42/methods/auth_sendInvites.md +++ b/old_docs/API_docs_v42/methods/auth_sendInvites.md @@ -31,13 +31,10 @@ description: auth.sendInvites parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v42/methods/auth_sendSms.md b/old_docs/API_docs_v42/methods/auth_sendSms.md index 6d942e97..9a214e65 100644 --- a/old_docs/API_docs_v42/methods/auth_sendSms.md +++ b/old_docs/API_docs_v42/methods/auth_sendSms.md @@ -24,16 +24,13 @@ description: auth.sendSms parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v42/methods/channels_checkUsername.md b/old_docs/API_docs_v42/methods/channels_checkUsername.md index d6ea876d..e29ee107 100644 --- a/old_docs/API_docs_v42/methods/channels_checkUsername.md +++ b/old_docs/API_docs_v42/methods/channels_checkUsername.md @@ -33,13 +33,10 @@ description: channels.checkUsername parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v42/methods/channels_createChannel.md b/old_docs/API_docs_v42/methods/channels_createChannel.md index 9ba02e9e..58808b73 100644 --- a/old_docs/API_docs_v42/methods/channels_createChannel.md +++ b/old_docs/API_docs_v42/methods/channels_createChannel.md @@ -34,13 +34,10 @@ description: channels.createChannel parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v42/methods/channels_deleteChannel.md b/old_docs/API_docs_v42/methods/channels_deleteChannel.md index 912ab080..532f3c6c 100644 --- a/old_docs/API_docs_v42/methods/channels_deleteChannel.md +++ b/old_docs/API_docs_v42/methods/channels_deleteChannel.md @@ -31,13 +31,10 @@ description: channels.deleteChannel parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v42/methods/channels_deleteMessages.md b/old_docs/API_docs_v42/methods/channels_deleteMessages.md index b3481294..a42a47a5 100644 --- a/old_docs/API_docs_v42/methods/channels_deleteMessages.md +++ b/old_docs/API_docs_v42/methods/channels_deleteMessages.md @@ -33,16 +33,13 @@ description: channels.deleteMessages parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v42/methods/channels_deleteUserHistory.md b/old_docs/API_docs_v42/methods/channels_deleteUserHistory.md index 66843269..73494485 100644 --- a/old_docs/API_docs_v42/methods/channels_deleteUserHistory.md +++ b/old_docs/API_docs_v42/methods/channels_deleteUserHistory.md @@ -32,13 +32,10 @@ description: channels.deleteUserHistory parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v42/methods/channels_editAbout.md b/old_docs/API_docs_v42/methods/channels_editAbout.md index 4c759a8a..1c3ce933 100644 --- a/old_docs/API_docs_v42/methods/channels_editAbout.md +++ b/old_docs/API_docs_v42/methods/channels_editAbout.md @@ -34,16 +34,13 @@ description: channels.editAbout parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v42/methods/channels_editAdmin.md b/old_docs/API_docs_v42/methods/channels_editAdmin.md index 7707bdfe..42184227 100644 --- a/old_docs/API_docs_v42/methods/channels_editAdmin.md +++ b/old_docs/API_docs_v42/methods/channels_editAdmin.md @@ -41,16 +41,13 @@ description: channels.editAdmin parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v42/methods/channels_editPhoto.md b/old_docs/API_docs_v42/methods/channels_editPhoto.md index 99873537..4a4aeb03 100644 --- a/old_docs/API_docs_v42/methods/channels_editPhoto.md +++ b/old_docs/API_docs_v42/methods/channels_editPhoto.md @@ -33,16 +33,13 @@ description: channels.editPhoto parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v42/methods/channels_editTitle.md b/old_docs/API_docs_v42/methods/channels_editTitle.md index 04e8ce12..8a69d09b 100644 --- a/old_docs/API_docs_v42/methods/channels_editTitle.md +++ b/old_docs/API_docs_v42/methods/channels_editTitle.md @@ -33,16 +33,13 @@ description: channels.editTitle parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v42/methods/channels_exportInvite.md b/old_docs/API_docs_v42/methods/channels_exportInvite.md index 2ed80f6c..79dc6401 100644 --- a/old_docs/API_docs_v42/methods/channels_exportInvite.md +++ b/old_docs/API_docs_v42/methods/channels_exportInvite.md @@ -32,16 +32,13 @@ description: channels.exportInvite parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v42/methods/channels_getChannels.md b/old_docs/API_docs_v42/methods/channels_getChannels.md index 13304938..e80aa6a6 100644 --- a/old_docs/API_docs_v42/methods/channels_getChannels.md +++ b/old_docs/API_docs_v42/methods/channels_getChannels.md @@ -32,16 +32,13 @@ description: channels.getChannels parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v42/methods/channels_getDialogs.md b/old_docs/API_docs_v42/methods/channels_getDialogs.md index 854372f6..916f9b34 100644 --- a/old_docs/API_docs_v42/methods/channels_getDialogs.md +++ b/old_docs/API_docs_v42/methods/channels_getDialogs.md @@ -24,16 +24,13 @@ description: channels.getDialogs parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v42/methods/channels_getImportantHistory.md b/old_docs/API_docs_v42/methods/channels_getImportantHistory.md index 076315a3..a7c73057 100644 --- a/old_docs/API_docs_v42/methods/channels_getImportantHistory.md +++ b/old_docs/API_docs_v42/methods/channels_getImportantHistory.md @@ -28,16 +28,13 @@ description: channels.getImportantHistory parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v42/methods/channels_getMessages.md b/old_docs/API_docs_v42/methods/channels_getMessages.md index 5480dd86..dc392773 100644 --- a/old_docs/API_docs_v42/methods/channels_getMessages.md +++ b/old_docs/API_docs_v42/methods/channels_getMessages.md @@ -33,16 +33,13 @@ description: channels.getMessages parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v42/methods/channels_getParticipant.md b/old_docs/API_docs_v42/methods/channels_getParticipant.md index 8c7e3cbd..001bf115 100644 --- a/old_docs/API_docs_v42/methods/channels_getParticipant.md +++ b/old_docs/API_docs_v42/methods/channels_getParticipant.md @@ -35,16 +35,13 @@ description: channels.getParticipant parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v42/methods/channels_inviteToChannel.md b/old_docs/API_docs_v42/methods/channels_inviteToChannel.md index cf5480e0..2448fb84 100644 --- a/old_docs/API_docs_v42/methods/channels_inviteToChannel.md +++ b/old_docs/API_docs_v42/methods/channels_inviteToChannel.md @@ -46,13 +46,10 @@ description: channels.inviteToChannel parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v42/methods/channels_joinChannel.md b/old_docs/API_docs_v42/methods/channels_joinChannel.md index f31730a1..e746cf48 100644 --- a/old_docs/API_docs_v42/methods/channels_joinChannel.md +++ b/old_docs/API_docs_v42/methods/channels_joinChannel.md @@ -32,13 +32,10 @@ description: channels.joinChannel parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v42/methods/channels_kickFromChannel.md b/old_docs/API_docs_v42/methods/channels_kickFromChannel.md index c903caa4..c85833ce 100644 --- a/old_docs/API_docs_v42/methods/channels_kickFromChannel.md +++ b/old_docs/API_docs_v42/methods/channels_kickFromChannel.md @@ -25,16 +25,13 @@ description: channels.kickFromChannel parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v42/methods/channels_leaveChannel.md b/old_docs/API_docs_v42/methods/channels_leaveChannel.md index 12902f6d..ff244ded 100644 --- a/old_docs/API_docs_v42/methods/channels_leaveChannel.md +++ b/old_docs/API_docs_v42/methods/channels_leaveChannel.md @@ -34,16 +34,13 @@ description: channels.leaveChannel parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v42/methods/channels_readHistory.md b/old_docs/API_docs_v42/methods/channels_readHistory.md index be979101..6fc6ec0e 100644 --- a/old_docs/API_docs_v42/methods/channels_readHistory.md +++ b/old_docs/API_docs_v42/methods/channels_readHistory.md @@ -32,13 +32,10 @@ description: channels.readHistory parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v42/methods/channels_reportSpam.md b/old_docs/API_docs_v42/methods/channels_reportSpam.md index 22f34443..a37a5833 100644 --- a/old_docs/API_docs_v42/methods/channels_reportSpam.md +++ b/old_docs/API_docs_v42/methods/channels_reportSpam.md @@ -33,13 +33,10 @@ description: channels.reportSpam parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v42/methods/channels_toggleComments.md b/old_docs/API_docs_v42/methods/channels_toggleComments.md index 55da95b5..1b304615 100644 --- a/old_docs/API_docs_v42/methods/channels_toggleComments.md +++ b/old_docs/API_docs_v42/methods/channels_toggleComments.md @@ -24,16 +24,13 @@ description: channels.toggleComments parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v42/methods/channels_updateUsername.md b/old_docs/API_docs_v42/methods/channels_updateUsername.md index c2ede724..1f1f111e 100644 --- a/old_docs/API_docs_v42/methods/channels_updateUsername.md +++ b/old_docs/API_docs_v42/methods/channels_updateUsername.md @@ -35,13 +35,10 @@ description: channels.updateUsername parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v42/methods/contacts_block.md b/old_docs/API_docs_v42/methods/contacts_block.md index d9d58e37..1c7cbe26 100644 --- a/old_docs/API_docs_v42/methods/contacts_block.md +++ b/old_docs/API_docs_v42/methods/contacts_block.md @@ -30,13 +30,10 @@ description: contacts.block parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v42/methods/contacts_deleteContact.md b/old_docs/API_docs_v42/methods/contacts_deleteContact.md index cd8c17ad..987a1be0 100644 --- a/old_docs/API_docs_v42/methods/contacts_deleteContact.md +++ b/old_docs/API_docs_v42/methods/contacts_deleteContact.md @@ -30,13 +30,10 @@ description: contacts.deleteContact parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v42/methods/contacts_deleteContacts.md b/old_docs/API_docs_v42/methods/contacts_deleteContacts.md index fc65880d..67a922ed 100644 --- a/old_docs/API_docs_v42/methods/contacts_deleteContacts.md +++ b/old_docs/API_docs_v42/methods/contacts_deleteContacts.md @@ -31,13 +31,10 @@ description: contacts.deleteContacts parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v42/methods/contacts_exportCard.md b/old_docs/API_docs_v42/methods/contacts_exportCard.md index 63508076..bf6d1f9f 100644 --- a/old_docs/API_docs_v42/methods/contacts_exportCard.md +++ b/old_docs/API_docs_v42/methods/contacts_exportCard.md @@ -18,13 +18,10 @@ description: contacts.exportCard parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v42/methods/contacts_getBlocked.md b/old_docs/API_docs_v42/methods/contacts_getBlocked.md index f50792b4..faa719da 100644 --- a/old_docs/API_docs_v42/methods/contacts_getBlocked.md +++ b/old_docs/API_docs_v42/methods/contacts_getBlocked.md @@ -24,13 +24,10 @@ description: contacts.getBlocked parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v42/methods/contacts_getContacts.md b/old_docs/API_docs_v42/methods/contacts_getContacts.md index 71313bf2..a6779111 100644 --- a/old_docs/API_docs_v42/methods/contacts_getContacts.md +++ b/old_docs/API_docs_v42/methods/contacts_getContacts.md @@ -23,13 +23,10 @@ description: contacts.getContacts parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v42/methods/contacts_getStatuses.md b/old_docs/API_docs_v42/methods/contacts_getStatuses.md index d914e08d..9bb7f263 100644 --- a/old_docs/API_docs_v42/methods/contacts_getStatuses.md +++ b/old_docs/API_docs_v42/methods/contacts_getStatuses.md @@ -18,13 +18,10 @@ description: contacts.getStatuses parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v42/methods/contacts_getSuggested.md b/old_docs/API_docs_v42/methods/contacts_getSuggested.md index a29f4aff..2059c01b 100644 --- a/old_docs/API_docs_v42/methods/contacts_getSuggested.md +++ b/old_docs/API_docs_v42/methods/contacts_getSuggested.md @@ -23,16 +23,13 @@ description: contacts.getSuggested parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v42/methods/contacts_importCard.md b/old_docs/API_docs_v42/methods/contacts_importCard.md index a6abf56d..7a2f34e1 100644 --- a/old_docs/API_docs_v42/methods/contacts_importCard.md +++ b/old_docs/API_docs_v42/methods/contacts_importCard.md @@ -31,13 +31,10 @@ description: contacts.importCard parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v42/methods/contacts_importContacts.md b/old_docs/API_docs_v42/methods/contacts_importContacts.md index db2051ac..2f070493 100644 --- a/old_docs/API_docs_v42/methods/contacts_importContacts.md +++ b/old_docs/API_docs_v42/methods/contacts_importContacts.md @@ -24,13 +24,10 @@ description: contacts.importContacts parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v42/methods/contacts_search.md b/old_docs/API_docs_v42/methods/contacts_search.md index 0203b160..70a0635e 100644 --- a/old_docs/API_docs_v42/methods/contacts_search.md +++ b/old_docs/API_docs_v42/methods/contacts_search.md @@ -33,13 +33,10 @@ description: contacts.search parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v42/methods/contacts_unblock.md b/old_docs/API_docs_v42/methods/contacts_unblock.md index a1977c24..9c01e42a 100644 --- a/old_docs/API_docs_v42/methods/contacts_unblock.md +++ b/old_docs/API_docs_v42/methods/contacts_unblock.md @@ -30,13 +30,10 @@ description: contacts.unblock parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v42/methods/help_getAppChangelog.md b/old_docs/API_docs_v42/methods/help_getAppChangelog.md index 302809aa..b27cc9f0 100644 --- a/old_docs/API_docs_v42/methods/help_getAppChangelog.md +++ b/old_docs/API_docs_v42/methods/help_getAppChangelog.md @@ -26,13 +26,10 @@ description: help.getAppChangelog parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v42/methods/help_getAppUpdate.md b/old_docs/API_docs_v42/methods/help_getAppUpdate.md index c8e67402..7b3bdde9 100644 --- a/old_docs/API_docs_v42/methods/help_getAppUpdate.md +++ b/old_docs/API_docs_v42/methods/help_getAppUpdate.md @@ -26,13 +26,10 @@ description: help.getAppUpdate parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v42/methods/help_getConfig.md b/old_docs/API_docs_v42/methods/help_getConfig.md index e3648b5a..bb51b362 100644 --- a/old_docs/API_docs_v42/methods/help_getConfig.md +++ b/old_docs/API_docs_v42/methods/help_getConfig.md @@ -25,16 +25,13 @@ description: help.getConfig parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v42/methods/help_getInviteText.md b/old_docs/API_docs_v42/methods/help_getInviteText.md index 348de85d..40251dd5 100644 --- a/old_docs/API_docs_v42/methods/help_getInviteText.md +++ b/old_docs/API_docs_v42/methods/help_getInviteText.md @@ -23,13 +23,10 @@ description: help.getInviteText parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v42/methods/help_getNearestDc.md b/old_docs/API_docs_v42/methods/help_getNearestDc.md index c6f5c555..6d8ed3f7 100644 --- a/old_docs/API_docs_v42/methods/help_getNearestDc.md +++ b/old_docs/API_docs_v42/methods/help_getNearestDc.md @@ -18,13 +18,10 @@ description: help.getNearestDc parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v42/methods/help_getSupport.md b/old_docs/API_docs_v42/methods/help_getSupport.md index 209edf03..ca8db03c 100644 --- a/old_docs/API_docs_v42/methods/help_getSupport.md +++ b/old_docs/API_docs_v42/methods/help_getSupport.md @@ -18,13 +18,10 @@ description: help.getSupport parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v42/methods/help_saveAppLog.md b/old_docs/API_docs_v42/methods/help_saveAppLog.md index 4f06434c..741b9aa1 100644 --- a/old_docs/API_docs_v42/methods/help_saveAppLog.md +++ b/old_docs/API_docs_v42/methods/help_saveAppLog.md @@ -23,13 +23,10 @@ description: help.saveAppLog parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v42/methods/initConnection.md b/old_docs/API_docs_v42/methods/initConnection.md index 0d22a1cb..c0307677 100644 --- a/old_docs/API_docs_v42/methods/initConnection.md +++ b/old_docs/API_docs_v42/methods/initConnection.md @@ -36,16 +36,13 @@ description: initConnection parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v42/methods/invokeAfterMsg.md b/old_docs/API_docs_v42/methods/invokeAfterMsg.md index c139fe8c..a382429e 100644 --- a/old_docs/API_docs_v42/methods/invokeAfterMsg.md +++ b/old_docs/API_docs_v42/methods/invokeAfterMsg.md @@ -24,16 +24,13 @@ description: invokeAfterMsg parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v42/methods/invokeAfterMsgs.md b/old_docs/API_docs_v42/methods/invokeAfterMsgs.md index 35004296..169eedaf 100644 --- a/old_docs/API_docs_v42/methods/invokeAfterMsgs.md +++ b/old_docs/API_docs_v42/methods/invokeAfterMsgs.md @@ -24,16 +24,13 @@ description: invokeAfterMsgs parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v42/methods/invokeWithLayer.md b/old_docs/API_docs_v42/methods/invokeWithLayer.md index 706036c4..d9a2c74c 100644 --- a/old_docs/API_docs_v42/methods/invokeWithLayer.md +++ b/old_docs/API_docs_v42/methods/invokeWithLayer.md @@ -41,16 +41,13 @@ description: invokeWithLayer parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v42/methods/invokeWithoutUpdates.md b/old_docs/API_docs_v42/methods/invokeWithoutUpdates.md index 10c6bfcf..f7d01765 100644 --- a/old_docs/API_docs_v42/methods/invokeWithoutUpdates.md +++ b/old_docs/API_docs_v42/methods/invokeWithoutUpdates.md @@ -23,16 +23,13 @@ description: invokeWithoutUpdates parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v42/methods/messages_addChatUser.md b/old_docs/API_docs_v42/methods/messages_addChatUser.md index 00da5a61..b9e6243d 100644 --- a/old_docs/API_docs_v42/methods/messages_addChatUser.md +++ b/old_docs/API_docs_v42/methods/messages_addChatUser.md @@ -40,13 +40,10 @@ description: messages.addChatUser parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v42/methods/messages_checkChatInvite.md b/old_docs/API_docs_v42/methods/messages_checkChatInvite.md index c5eb1c06..c4489469 100644 --- a/old_docs/API_docs_v42/methods/messages_checkChatInvite.md +++ b/old_docs/API_docs_v42/methods/messages_checkChatInvite.md @@ -32,13 +32,10 @@ description: messages.checkChatInvite parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v42/methods/messages_createChat.md b/old_docs/API_docs_v42/methods/messages_createChat.md index c643a022..c6c8f420 100644 --- a/old_docs/API_docs_v42/methods/messages_createChat.md +++ b/old_docs/API_docs_v42/methods/messages_createChat.md @@ -32,13 +32,10 @@ description: messages.createChat parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v42/methods/messages_deleteChatUser.md b/old_docs/API_docs_v42/methods/messages_deleteChatUser.md index 3d75d9cf..4b8c2aa5 100644 --- a/old_docs/API_docs_v42/methods/messages_deleteChatUser.md +++ b/old_docs/API_docs_v42/methods/messages_deleteChatUser.md @@ -33,16 +33,13 @@ description: messages.deleteChatUser parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v42/methods/messages_deleteHistory.md b/old_docs/API_docs_v42/methods/messages_deleteHistory.md index c8081e79..6ae145d8 100644 --- a/old_docs/API_docs_v42/methods/messages_deleteHistory.md +++ b/old_docs/API_docs_v42/methods/messages_deleteHistory.md @@ -31,13 +31,10 @@ description: messages.deleteHistory parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v42/methods/messages_deleteMessages.md b/old_docs/API_docs_v42/methods/messages_deleteMessages.md index 65dbbc4a..38b3ca09 100644 --- a/old_docs/API_docs_v42/methods/messages_deleteMessages.md +++ b/old_docs/API_docs_v42/methods/messages_deleteMessages.md @@ -30,16 +30,13 @@ description: messages.deleteMessages parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v42/methods/messages_editChatAdmin.md b/old_docs/API_docs_v42/methods/messages_editChatAdmin.md index e64d9da5..1b3ffa9f 100644 --- a/old_docs/API_docs_v42/methods/messages_editChatAdmin.md +++ b/old_docs/API_docs_v42/methods/messages_editChatAdmin.md @@ -32,13 +32,10 @@ description: messages.editChatAdmin parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v42/methods/messages_editChatPhoto.md b/old_docs/API_docs_v42/methods/messages_editChatPhoto.md index d225962d..8c5d9d47 100644 --- a/old_docs/API_docs_v42/methods/messages_editChatPhoto.md +++ b/old_docs/API_docs_v42/methods/messages_editChatPhoto.md @@ -35,16 +35,13 @@ description: messages.editChatPhoto parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v42/methods/messages_editChatTitle.md b/old_docs/API_docs_v42/methods/messages_editChatTitle.md index 5cb1c6d7..238c6d72 100644 --- a/old_docs/API_docs_v42/methods/messages_editChatTitle.md +++ b/old_docs/API_docs_v42/methods/messages_editChatTitle.md @@ -32,16 +32,13 @@ description: messages.editChatTitle parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v42/methods/messages_exportChatInvite.md b/old_docs/API_docs_v42/methods/messages_exportChatInvite.md index 4a6e28ff..78f2ff86 100644 --- a/old_docs/API_docs_v42/methods/messages_exportChatInvite.md +++ b/old_docs/API_docs_v42/methods/messages_exportChatInvite.md @@ -30,13 +30,10 @@ description: messages.exportChatInvite parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v42/methods/messages_forwardMessage.md b/old_docs/API_docs_v42/methods/messages_forwardMessage.md index 4e2362db..fbdbc955 100644 --- a/old_docs/API_docs_v42/methods/messages_forwardMessage.md +++ b/old_docs/API_docs_v42/methods/messages_forwardMessage.md @@ -34,16 +34,13 @@ description: messages.forwardMessage parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v42/methods/messages_forwardMessages.md b/old_docs/API_docs_v42/methods/messages_forwardMessages.md index 2ea31ccf..6e5dee90 100644 --- a/old_docs/API_docs_v42/methods/messages_forwardMessages.md +++ b/old_docs/API_docs_v42/methods/messages_forwardMessages.md @@ -54,16 +54,13 @@ description: messages.forwardMessages parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v42/methods/messages_getAllStickers.md b/old_docs/API_docs_v42/methods/messages_getAllStickers.md index defe31c1..3a0b3781 100644 --- a/old_docs/API_docs_v42/methods/messages_getAllStickers.md +++ b/old_docs/API_docs_v42/methods/messages_getAllStickers.md @@ -23,13 +23,10 @@ description: messages.getAllStickers parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v42/methods/messages_getChats.md b/old_docs/API_docs_v42/methods/messages_getChats.md index 6fa30cbd..c322613d 100644 --- a/old_docs/API_docs_v42/methods/messages_getChats.md +++ b/old_docs/API_docs_v42/methods/messages_getChats.md @@ -31,16 +31,13 @@ description: messages.getChats parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v42/methods/messages_getDhConfig.md b/old_docs/API_docs_v42/methods/messages_getDhConfig.md index aac3354d..f97684d2 100644 --- a/old_docs/API_docs_v42/methods/messages_getDhConfig.md +++ b/old_docs/API_docs_v42/methods/messages_getDhConfig.md @@ -31,13 +31,10 @@ description: messages.getDhConfig parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v42/methods/messages_getDialogs.md b/old_docs/API_docs_v42/methods/messages_getDialogs.md index 4c278eae..4b86ed71 100644 --- a/old_docs/API_docs_v42/methods/messages_getDialogs.md +++ b/old_docs/API_docs_v42/methods/messages_getDialogs.md @@ -36,13 +36,10 @@ description: messages.getDialogs parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v42/methods/messages_getHistory.md b/old_docs/API_docs_v42/methods/messages_getHistory.md index ba9ed92d..23955a96 100644 --- a/old_docs/API_docs_v42/methods/messages_getHistory.md +++ b/old_docs/API_docs_v42/methods/messages_getHistory.md @@ -40,13 +40,10 @@ description: messages.getHistory parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v42/methods/messages_getMessages.md b/old_docs/API_docs_v42/methods/messages_getMessages.md index 5a970246..787c46dd 100644 --- a/old_docs/API_docs_v42/methods/messages_getMessages.md +++ b/old_docs/API_docs_v42/methods/messages_getMessages.md @@ -23,16 +23,13 @@ description: messages.getMessages parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v42/methods/messages_getMessagesViews.md b/old_docs/API_docs_v42/methods/messages_getMessagesViews.md index 263f3f95..de5692dc 100644 --- a/old_docs/API_docs_v42/methods/messages_getMessagesViews.md +++ b/old_docs/API_docs_v42/methods/messages_getMessagesViews.md @@ -34,13 +34,10 @@ description: messages.getMessagesViews parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v42/methods/messages_getStickerSet.md b/old_docs/API_docs_v42/methods/messages_getStickerSet.md index 59f33916..b480e0fe 100644 --- a/old_docs/API_docs_v42/methods/messages_getStickerSet.md +++ b/old_docs/API_docs_v42/methods/messages_getStickerSet.md @@ -30,16 +30,13 @@ description: messages.getStickerSet parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v42/methods/messages_getStickers.md b/old_docs/API_docs_v42/methods/messages_getStickers.md index be61a120..1587cd01 100644 --- a/old_docs/API_docs_v42/methods/messages_getStickers.md +++ b/old_docs/API_docs_v42/methods/messages_getStickers.md @@ -24,16 +24,13 @@ description: messages.getStickers parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v42/methods/messages_getWebPagePreview.md b/old_docs/API_docs_v42/methods/messages_getWebPagePreview.md index a89600b1..d3908933 100644 --- a/old_docs/API_docs_v42/methods/messages_getWebPagePreview.md +++ b/old_docs/API_docs_v42/methods/messages_getWebPagePreview.md @@ -23,13 +23,10 @@ description: messages.getWebPagePreview parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v42/methods/messages_importChatInvite.md b/old_docs/API_docs_v42/methods/messages_importChatInvite.md index 9d77304d..9dcfa56d 100644 --- a/old_docs/API_docs_v42/methods/messages_importChatInvite.md +++ b/old_docs/API_docs_v42/methods/messages_importChatInvite.md @@ -36,13 +36,10 @@ description: messages.importChatInvite parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v42/methods/messages_installStickerSet.md b/old_docs/API_docs_v42/methods/messages_installStickerSet.md index 1969d008..cf1865a8 100644 --- a/old_docs/API_docs_v42/methods/messages_installStickerSet.md +++ b/old_docs/API_docs_v42/methods/messages_installStickerSet.md @@ -31,13 +31,10 @@ description: messages.installStickerSet parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v42/methods/messages_migrateChat.md b/old_docs/API_docs_v42/methods/messages_migrateChat.md index 22d2fbf0..a8274e70 100644 --- a/old_docs/API_docs_v42/methods/messages_migrateChat.md +++ b/old_docs/API_docs_v42/methods/messages_migrateChat.md @@ -32,13 +32,10 @@ description: messages.migrateChat parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v42/methods/messages_readEncryptedHistory.md b/old_docs/API_docs_v42/methods/messages_readEncryptedHistory.md index 766ee07d..f38f6b07 100644 --- a/old_docs/API_docs_v42/methods/messages_readEncryptedHistory.md +++ b/old_docs/API_docs_v42/methods/messages_readEncryptedHistory.md @@ -31,16 +31,13 @@ description: messages.readEncryptedHistory parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v42/methods/messages_readHistory.md b/old_docs/API_docs_v42/methods/messages_readHistory.md index 1aa7830a..fef62130 100644 --- a/old_docs/API_docs_v42/methods/messages_readHistory.md +++ b/old_docs/API_docs_v42/methods/messages_readHistory.md @@ -32,13 +32,10 @@ description: messages.readHistory parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v42/methods/messages_readMessageContents.md b/old_docs/API_docs_v42/methods/messages_readMessageContents.md index 4b1abda0..7a6055fc 100644 --- a/old_docs/API_docs_v42/methods/messages_readMessageContents.md +++ b/old_docs/API_docs_v42/methods/messages_readMessageContents.md @@ -23,13 +23,10 @@ description: messages.readMessageContents parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v42/methods/messages_receivedMessages.md b/old_docs/API_docs_v42/methods/messages_receivedMessages.md index 588ac5cf..e2cf3a2f 100644 --- a/old_docs/API_docs_v42/methods/messages_receivedMessages.md +++ b/old_docs/API_docs_v42/methods/messages_receivedMessages.md @@ -23,13 +23,10 @@ description: messages.receivedMessages parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v42/methods/messages_receivedQueue.md b/old_docs/API_docs_v42/methods/messages_receivedQueue.md index 3c7f1d4f..38f504b3 100644 --- a/old_docs/API_docs_v42/methods/messages_receivedQueue.md +++ b/old_docs/API_docs_v42/methods/messages_receivedQueue.md @@ -30,16 +30,13 @@ description: messages.receivedQueue parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v42/methods/messages_reportSpam.md b/old_docs/API_docs_v42/methods/messages_reportSpam.md index bfadb9ab..08c96d44 100644 --- a/old_docs/API_docs_v42/methods/messages_reportSpam.md +++ b/old_docs/API_docs_v42/methods/messages_reportSpam.md @@ -30,13 +30,10 @@ description: messages.reportSpam parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v42/methods/messages_search.md b/old_docs/API_docs_v42/methods/messages_search.md index 8ea63f65..87f282e3 100644 --- a/old_docs/API_docs_v42/methods/messages_search.md +++ b/old_docs/API_docs_v42/methods/messages_search.md @@ -44,13 +44,10 @@ description: messages.search parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v42/methods/messages_searchGlobal.md b/old_docs/API_docs_v42/methods/messages_searchGlobal.md index 0553dd7a..4b45eed2 100644 --- a/old_docs/API_docs_v42/methods/messages_searchGlobal.md +++ b/old_docs/API_docs_v42/methods/messages_searchGlobal.md @@ -34,13 +34,10 @@ description: messages.searchGlobal parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v42/methods/messages_sendBroadcast.md b/old_docs/API_docs_v42/methods/messages_sendBroadcast.md index ac13d0bf..537166ab 100644 --- a/old_docs/API_docs_v42/methods/messages_sendBroadcast.md +++ b/old_docs/API_docs_v42/methods/messages_sendBroadcast.md @@ -25,16 +25,13 @@ description: messages.sendBroadcast parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v42/methods/messages_sendEncrypted.md b/old_docs/API_docs_v42/methods/messages_sendEncrypted.md index 82eeec92..ba9f796b 100644 --- a/old_docs/API_docs_v42/methods/messages_sendEncrypted.md +++ b/old_docs/API_docs_v42/methods/messages_sendEncrypted.md @@ -34,16 +34,13 @@ description: messages.sendEncrypted parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v42/methods/messages_sendEncryptedFile.md b/old_docs/API_docs_v42/methods/messages_sendEncryptedFile.md index 8f7a73d9..db16bf2d 100644 --- a/old_docs/API_docs_v42/methods/messages_sendEncryptedFile.md +++ b/old_docs/API_docs_v42/methods/messages_sendEncryptedFile.md @@ -32,16 +32,13 @@ description: messages.sendEncryptedFile parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v42/methods/messages_sendEncryptedService.md b/old_docs/API_docs_v42/methods/messages_sendEncryptedService.md index d427f6c3..fd4e2627 100644 --- a/old_docs/API_docs_v42/methods/messages_sendEncryptedService.md +++ b/old_docs/API_docs_v42/methods/messages_sendEncryptedService.md @@ -34,16 +34,13 @@ description: messages.sendEncryptedService parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v42/methods/messages_sendMedia.md b/old_docs/API_docs_v42/methods/messages_sendMedia.md index 4b924e7e..2bc63256 100644 --- a/old_docs/API_docs_v42/methods/messages_sendMedia.md +++ b/old_docs/API_docs_v42/methods/messages_sendMedia.md @@ -57,16 +57,13 @@ description: messages.sendMedia parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v42/methods/messages_sendMessage.md b/old_docs/API_docs_v42/methods/messages_sendMessage.md index 723c2f65..1a735df3 100644 --- a/old_docs/API_docs_v42/methods/messages_sendMessage.md +++ b/old_docs/API_docs_v42/methods/messages_sendMessage.md @@ -56,16 +56,13 @@ description: messages.sendMessage parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v42/methods/messages_setEncryptedTyping.md b/old_docs/API_docs_v42/methods/messages_setEncryptedTyping.md index a05b94dd..aeae6ff7 100644 --- a/old_docs/API_docs_v42/methods/messages_setEncryptedTyping.md +++ b/old_docs/API_docs_v42/methods/messages_setEncryptedTyping.md @@ -31,13 +31,10 @@ description: messages.setEncryptedTyping parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v42/methods/messages_setTyping.md b/old_docs/API_docs_v42/methods/messages_setTyping.md index 9ef8caf5..f6b7b7b5 100644 --- a/old_docs/API_docs_v42/methods/messages_setTyping.md +++ b/old_docs/API_docs_v42/methods/messages_setTyping.md @@ -37,16 +37,13 @@ description: messages.setTyping parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v42/methods/messages_startBot.md b/old_docs/API_docs_v42/methods/messages_startBot.md index 8d98e390..b33ab013 100644 --- a/old_docs/API_docs_v42/methods/messages_startBot.md +++ b/old_docs/API_docs_v42/methods/messages_startBot.md @@ -35,13 +35,10 @@ description: messages.startBot parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v42/methods/messages_toggleChatAdmins.md b/old_docs/API_docs_v42/methods/messages_toggleChatAdmins.md index 3bf8a419..97328065 100644 --- a/old_docs/API_docs_v42/methods/messages_toggleChatAdmins.md +++ b/old_docs/API_docs_v42/methods/messages_toggleChatAdmins.md @@ -32,13 +32,10 @@ description: messages.toggleChatAdmins parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v42/methods/messages_uninstallStickerSet.md b/old_docs/API_docs_v42/methods/messages_uninstallStickerSet.md index 6763e64f..76a3e3e2 100644 --- a/old_docs/API_docs_v42/methods/messages_uninstallStickerSet.md +++ b/old_docs/API_docs_v42/methods/messages_uninstallStickerSet.md @@ -30,13 +30,10 @@ description: messages.uninstallStickerSet parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v42/methods/photos_deletePhotos.md b/old_docs/API_docs_v42/methods/photos_deletePhotos.md index e9cd459d..61768b1e 100644 --- a/old_docs/API_docs_v42/methods/photos_deletePhotos.md +++ b/old_docs/API_docs_v42/methods/photos_deletePhotos.md @@ -23,13 +23,10 @@ description: photos.deletePhotos parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v42/methods/photos_getUserPhotos.md b/old_docs/API_docs_v42/methods/photos_getUserPhotos.md index d6c2a380..095363e7 100644 --- a/old_docs/API_docs_v42/methods/photos_getUserPhotos.md +++ b/old_docs/API_docs_v42/methods/photos_getUserPhotos.md @@ -34,16 +34,13 @@ description: photos.getUserPhotos parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v42/methods/photos_updateProfilePhoto.md b/old_docs/API_docs_v42/methods/photos_updateProfilePhoto.md index abb031d4..add6028f 100644 --- a/old_docs/API_docs_v42/methods/photos_updateProfilePhoto.md +++ b/old_docs/API_docs_v42/methods/photos_updateProfilePhoto.md @@ -24,13 +24,10 @@ description: photos.updateProfilePhoto parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v42/methods/photos_uploadProfilePhoto.md b/old_docs/API_docs_v42/methods/photos_uploadProfilePhoto.md index ae20fdfc..048a1d32 100644 --- a/old_docs/API_docs_v42/methods/photos_uploadProfilePhoto.md +++ b/old_docs/API_docs_v42/methods/photos_uploadProfilePhoto.md @@ -37,13 +37,10 @@ description: photos.uploadProfilePhoto parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v42/methods/users_getUsers.md b/old_docs/API_docs_v42/methods/users_getUsers.md index 6a44d258..3a981d57 100644 --- a/old_docs/API_docs_v42/methods/users_getUsers.md +++ b/old_docs/API_docs_v42/methods/users_getUsers.md @@ -33,16 +33,13 @@ description: users.getUsers parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v44/methods/account_changePhone.md b/old_docs/API_docs_v44/methods/account_changePhone.md index 5d1801d0..e47ef6a7 100644 --- a/old_docs/API_docs_v44/methods/account_changePhone.md +++ b/old_docs/API_docs_v44/methods/account_changePhone.md @@ -32,13 +32,10 @@ description: account.changePhone parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v44/methods/account_checkUsername.md b/old_docs/API_docs_v44/methods/account_checkUsername.md index afc59b6c..40cf822f 100644 --- a/old_docs/API_docs_v44/methods/account_checkUsername.md +++ b/old_docs/API_docs_v44/methods/account_checkUsername.md @@ -30,13 +30,10 @@ description: account.checkUsername parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v44/methods/account_deleteAccount.md b/old_docs/API_docs_v44/methods/account_deleteAccount.md index 5abcd0ec..6f1bbda9 100644 --- a/old_docs/API_docs_v44/methods/account_deleteAccount.md +++ b/old_docs/API_docs_v44/methods/account_deleteAccount.md @@ -23,13 +23,10 @@ description: account.deleteAccount parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v44/methods/account_getAccountTTL.md b/old_docs/API_docs_v44/methods/account_getAccountTTL.md index 3520fbef..538b1d7a 100644 --- a/old_docs/API_docs_v44/methods/account_getAccountTTL.md +++ b/old_docs/API_docs_v44/methods/account_getAccountTTL.md @@ -18,13 +18,10 @@ description: account.getAccountTTL parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v44/methods/account_getAuthorizations.md b/old_docs/API_docs_v44/methods/account_getAuthorizations.md index 91bbce5e..f138d517 100644 --- a/old_docs/API_docs_v44/methods/account_getAuthorizations.md +++ b/old_docs/API_docs_v44/methods/account_getAuthorizations.md @@ -18,13 +18,10 @@ description: account.getAuthorizations parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v44/methods/account_getNotifySettings.md b/old_docs/API_docs_v44/methods/account_getNotifySettings.md index 8ee710d8..a48eed2f 100644 --- a/old_docs/API_docs_v44/methods/account_getNotifySettings.md +++ b/old_docs/API_docs_v44/methods/account_getNotifySettings.md @@ -30,13 +30,10 @@ description: account.getNotifySettings parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v44/methods/account_getPassword.md b/old_docs/API_docs_v44/methods/account_getPassword.md index 4d9fd015..1abf6174 100644 --- a/old_docs/API_docs_v44/methods/account_getPassword.md +++ b/old_docs/API_docs_v44/methods/account_getPassword.md @@ -18,13 +18,10 @@ description: account.getPassword parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v44/methods/account_getPasswordSettings.md b/old_docs/API_docs_v44/methods/account_getPasswordSettings.md index 02cb77f7..aec5b989 100644 --- a/old_docs/API_docs_v44/methods/account_getPasswordSettings.md +++ b/old_docs/API_docs_v44/methods/account_getPasswordSettings.md @@ -30,13 +30,10 @@ description: account.getPasswordSettings parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v44/methods/account_getPrivacy.md b/old_docs/API_docs_v44/methods/account_getPrivacy.md index 52786b79..8bbe9795 100644 --- a/old_docs/API_docs_v44/methods/account_getPrivacy.md +++ b/old_docs/API_docs_v44/methods/account_getPrivacy.md @@ -30,13 +30,10 @@ description: account.getPrivacy parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v44/methods/account_getWallPapers.md b/old_docs/API_docs_v44/methods/account_getWallPapers.md index 88c8a701..a71543d0 100644 --- a/old_docs/API_docs_v44/methods/account_getWallPapers.md +++ b/old_docs/API_docs_v44/methods/account_getWallPapers.md @@ -18,13 +18,10 @@ description: account.getWallPapers parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v44/methods/account_registerDevice.md b/old_docs/API_docs_v44/methods/account_registerDevice.md index ab7ec933..cfa1546c 100644 --- a/old_docs/API_docs_v44/methods/account_registerDevice.md +++ b/old_docs/API_docs_v44/methods/account_registerDevice.md @@ -36,13 +36,10 @@ description: account.registerDevice parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v44/methods/account_reportPeer.md b/old_docs/API_docs_v44/methods/account_reportPeer.md index 1545c3b8..1ae9f4d4 100644 --- a/old_docs/API_docs_v44/methods/account_reportPeer.md +++ b/old_docs/API_docs_v44/methods/account_reportPeer.md @@ -31,13 +31,10 @@ description: account.reportPeer parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v44/methods/account_resetAuthorization.md b/old_docs/API_docs_v44/methods/account_resetAuthorization.md index e44334f2..0438cba3 100644 --- a/old_docs/API_docs_v44/methods/account_resetAuthorization.md +++ b/old_docs/API_docs_v44/methods/account_resetAuthorization.md @@ -30,13 +30,10 @@ description: account.resetAuthorization parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v44/methods/account_resetNotifySettings.md b/old_docs/API_docs_v44/methods/account_resetNotifySettings.md index 155ede68..92db4f4f 100644 --- a/old_docs/API_docs_v44/methods/account_resetNotifySettings.md +++ b/old_docs/API_docs_v44/methods/account_resetNotifySettings.md @@ -18,13 +18,10 @@ description: account.resetNotifySettings parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v44/methods/account_sendChangePhoneCode.md b/old_docs/API_docs_v44/methods/account_sendChangePhoneCode.md index 650dba72..ad611a8b 100644 --- a/old_docs/API_docs_v44/methods/account_sendChangePhoneCode.md +++ b/old_docs/API_docs_v44/methods/account_sendChangePhoneCode.md @@ -30,13 +30,10 @@ description: account.sendChangePhoneCode parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v44/methods/account_setAccountTTL.md b/old_docs/API_docs_v44/methods/account_setAccountTTL.md index f06eb676..d08f59fb 100644 --- a/old_docs/API_docs_v44/methods/account_setAccountTTL.md +++ b/old_docs/API_docs_v44/methods/account_setAccountTTL.md @@ -30,13 +30,10 @@ description: account.setAccountTTL parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v44/methods/account_setPrivacy.md b/old_docs/API_docs_v44/methods/account_setPrivacy.md index 56aebbcc..401aa71c 100644 --- a/old_docs/API_docs_v44/methods/account_setPrivacy.md +++ b/old_docs/API_docs_v44/methods/account_setPrivacy.md @@ -31,13 +31,10 @@ description: account.setPrivacy parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v44/methods/account_unregisterDevice.md b/old_docs/API_docs_v44/methods/account_unregisterDevice.md index 41899b6e..283ec7d2 100644 --- a/old_docs/API_docs_v44/methods/account_unregisterDevice.md +++ b/old_docs/API_docs_v44/methods/account_unregisterDevice.md @@ -31,13 +31,10 @@ description: account.unregisterDevice parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v44/methods/account_updateDeviceLocked.md b/old_docs/API_docs_v44/methods/account_updateDeviceLocked.md index 37aeb59d..ae6125a5 100644 --- a/old_docs/API_docs_v44/methods/account_updateDeviceLocked.md +++ b/old_docs/API_docs_v44/methods/account_updateDeviceLocked.md @@ -23,13 +23,10 @@ description: account.updateDeviceLocked parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v44/methods/account_updateNotifySettings.md b/old_docs/API_docs_v44/methods/account_updateNotifySettings.md index 8389b5c2..fb096250 100644 --- a/old_docs/API_docs_v44/methods/account_updateNotifySettings.md +++ b/old_docs/API_docs_v44/methods/account_updateNotifySettings.md @@ -31,13 +31,10 @@ description: account.updateNotifySettings parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v44/methods/account_updatePasswordSettings.md b/old_docs/API_docs_v44/methods/account_updatePasswordSettings.md index b7c8da4b..ffa8dcd9 100644 --- a/old_docs/API_docs_v44/methods/account_updatePasswordSettings.md +++ b/old_docs/API_docs_v44/methods/account_updatePasswordSettings.md @@ -34,13 +34,10 @@ description: account.updatePasswordSettings parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v44/methods/account_updateProfile.md b/old_docs/API_docs_v44/methods/account_updateProfile.md index c8712074..123ed13a 100644 --- a/old_docs/API_docs_v44/methods/account_updateProfile.md +++ b/old_docs/API_docs_v44/methods/account_updateProfile.md @@ -32,13 +32,10 @@ description: account.updateProfile parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v44/methods/account_updateStatus.md b/old_docs/API_docs_v44/methods/account_updateStatus.md index 7204e582..c8fa0a79 100644 --- a/old_docs/API_docs_v44/methods/account_updateStatus.md +++ b/old_docs/API_docs_v44/methods/account_updateStatus.md @@ -30,13 +30,10 @@ description: account.updateStatus parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v44/methods/account_updateUsername.md b/old_docs/API_docs_v44/methods/account_updateUsername.md index 22be2fd4..2b7576a5 100644 --- a/old_docs/API_docs_v44/methods/account_updateUsername.md +++ b/old_docs/API_docs_v44/methods/account_updateUsername.md @@ -32,13 +32,10 @@ description: account.updateUsername parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v44/methods/auth_bindTempAuthKey.md b/old_docs/API_docs_v44/methods/auth_bindTempAuthKey.md index e3d72dd5..7419abb0 100644 --- a/old_docs/API_docs_v44/methods/auth_bindTempAuthKey.md +++ b/old_docs/API_docs_v44/methods/auth_bindTempAuthKey.md @@ -35,16 +35,13 @@ description: auth.bindTempAuthKey parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v44/methods/auth_checkPassword.md b/old_docs/API_docs_v44/methods/auth_checkPassword.md index d5559186..6b6b21cc 100644 --- a/old_docs/API_docs_v44/methods/auth_checkPassword.md +++ b/old_docs/API_docs_v44/methods/auth_checkPassword.md @@ -30,13 +30,10 @@ description: auth.checkPassword parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v44/methods/auth_checkPhone.md b/old_docs/API_docs_v44/methods/auth_checkPhone.md index 3455904d..f6cac2e6 100644 --- a/old_docs/API_docs_v44/methods/auth_checkPhone.md +++ b/old_docs/API_docs_v44/methods/auth_checkPhone.md @@ -32,13 +32,10 @@ description: auth.checkPhone parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v44/methods/auth_exportAuthorization.md b/old_docs/API_docs_v44/methods/auth_exportAuthorization.md index 44c45b70..cbc8203b 100644 --- a/old_docs/API_docs_v44/methods/auth_exportAuthorization.md +++ b/old_docs/API_docs_v44/methods/auth_exportAuthorization.md @@ -30,16 +30,13 @@ description: auth.exportAuthorization parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v44/methods/auth_importAuthorization.md b/old_docs/API_docs_v44/methods/auth_importAuthorization.md index e0fd534f..22166510 100644 --- a/old_docs/API_docs_v44/methods/auth_importAuthorization.md +++ b/old_docs/API_docs_v44/methods/auth_importAuthorization.md @@ -32,16 +32,13 @@ description: auth.importAuthorization parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v44/methods/auth_recoverPassword.md b/old_docs/API_docs_v44/methods/auth_recoverPassword.md index c2ce3fed..931e99fd 100644 --- a/old_docs/API_docs_v44/methods/auth_recoverPassword.md +++ b/old_docs/API_docs_v44/methods/auth_recoverPassword.md @@ -30,13 +30,10 @@ description: auth.recoverPassword parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v44/methods/auth_requestPasswordRecovery.md b/old_docs/API_docs_v44/methods/auth_requestPasswordRecovery.md index 101b1cf7..c6babcd9 100644 --- a/old_docs/API_docs_v44/methods/auth_requestPasswordRecovery.md +++ b/old_docs/API_docs_v44/methods/auth_requestPasswordRecovery.md @@ -25,13 +25,10 @@ description: auth.requestPasswordRecovery parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v44/methods/auth_resetAuthorizations.md b/old_docs/API_docs_v44/methods/auth_resetAuthorizations.md index 87a39a22..fe297fa7 100644 --- a/old_docs/API_docs_v44/methods/auth_resetAuthorizations.md +++ b/old_docs/API_docs_v44/methods/auth_resetAuthorizations.md @@ -25,13 +25,10 @@ description: auth.resetAuthorizations parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v44/methods/auth_sendCall.md b/old_docs/API_docs_v44/methods/auth_sendCall.md index 00eaff4e..386cfad4 100644 --- a/old_docs/API_docs_v44/methods/auth_sendCall.md +++ b/old_docs/API_docs_v44/methods/auth_sendCall.md @@ -24,16 +24,13 @@ description: auth.sendCall parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v44/methods/auth_sendInvites.md b/old_docs/API_docs_v44/methods/auth_sendInvites.md index 604fc65d..ad9636c5 100644 --- a/old_docs/API_docs_v44/methods/auth_sendInvites.md +++ b/old_docs/API_docs_v44/methods/auth_sendInvites.md @@ -31,13 +31,10 @@ description: auth.sendInvites parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v44/methods/auth_sendSms.md b/old_docs/API_docs_v44/methods/auth_sendSms.md index 6d942e97..9a214e65 100644 --- a/old_docs/API_docs_v44/methods/auth_sendSms.md +++ b/old_docs/API_docs_v44/methods/auth_sendSms.md @@ -24,16 +24,13 @@ description: auth.sendSms parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v44/methods/channels_checkUsername.md b/old_docs/API_docs_v44/methods/channels_checkUsername.md index d6ea876d..e29ee107 100644 --- a/old_docs/API_docs_v44/methods/channels_checkUsername.md +++ b/old_docs/API_docs_v44/methods/channels_checkUsername.md @@ -33,13 +33,10 @@ description: channels.checkUsername parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v44/methods/channels_createChannel.md b/old_docs/API_docs_v44/methods/channels_createChannel.md index 9ba02e9e..58808b73 100644 --- a/old_docs/API_docs_v44/methods/channels_createChannel.md +++ b/old_docs/API_docs_v44/methods/channels_createChannel.md @@ -34,13 +34,10 @@ description: channels.createChannel parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v44/methods/channels_deleteChannel.md b/old_docs/API_docs_v44/methods/channels_deleteChannel.md index 912ab080..532f3c6c 100644 --- a/old_docs/API_docs_v44/methods/channels_deleteChannel.md +++ b/old_docs/API_docs_v44/methods/channels_deleteChannel.md @@ -31,13 +31,10 @@ description: channels.deleteChannel parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v44/methods/channels_deleteMessages.md b/old_docs/API_docs_v44/methods/channels_deleteMessages.md index b3481294..a42a47a5 100644 --- a/old_docs/API_docs_v44/methods/channels_deleteMessages.md +++ b/old_docs/API_docs_v44/methods/channels_deleteMessages.md @@ -33,16 +33,13 @@ description: channels.deleteMessages parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v44/methods/channels_deleteUserHistory.md b/old_docs/API_docs_v44/methods/channels_deleteUserHistory.md index 66843269..73494485 100644 --- a/old_docs/API_docs_v44/methods/channels_deleteUserHistory.md +++ b/old_docs/API_docs_v44/methods/channels_deleteUserHistory.md @@ -32,13 +32,10 @@ description: channels.deleteUserHistory parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v44/methods/channels_editAbout.md b/old_docs/API_docs_v44/methods/channels_editAbout.md index 4c759a8a..1c3ce933 100644 --- a/old_docs/API_docs_v44/methods/channels_editAbout.md +++ b/old_docs/API_docs_v44/methods/channels_editAbout.md @@ -34,16 +34,13 @@ description: channels.editAbout parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v44/methods/channels_editAdmin.md b/old_docs/API_docs_v44/methods/channels_editAdmin.md index 7707bdfe..42184227 100644 --- a/old_docs/API_docs_v44/methods/channels_editAdmin.md +++ b/old_docs/API_docs_v44/methods/channels_editAdmin.md @@ -41,16 +41,13 @@ description: channels.editAdmin parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v44/methods/channels_editPhoto.md b/old_docs/API_docs_v44/methods/channels_editPhoto.md index 99873537..4a4aeb03 100644 --- a/old_docs/API_docs_v44/methods/channels_editPhoto.md +++ b/old_docs/API_docs_v44/methods/channels_editPhoto.md @@ -33,16 +33,13 @@ description: channels.editPhoto parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v44/methods/channels_editTitle.md b/old_docs/API_docs_v44/methods/channels_editTitle.md index 04e8ce12..8a69d09b 100644 --- a/old_docs/API_docs_v44/methods/channels_editTitle.md +++ b/old_docs/API_docs_v44/methods/channels_editTitle.md @@ -33,16 +33,13 @@ description: channels.editTitle parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v44/methods/channels_exportInvite.md b/old_docs/API_docs_v44/methods/channels_exportInvite.md index 2ed80f6c..79dc6401 100644 --- a/old_docs/API_docs_v44/methods/channels_exportInvite.md +++ b/old_docs/API_docs_v44/methods/channels_exportInvite.md @@ -32,16 +32,13 @@ description: channels.exportInvite parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v44/methods/channels_getChannels.md b/old_docs/API_docs_v44/methods/channels_getChannels.md index 13304938..e80aa6a6 100644 --- a/old_docs/API_docs_v44/methods/channels_getChannels.md +++ b/old_docs/API_docs_v44/methods/channels_getChannels.md @@ -32,16 +32,13 @@ description: channels.getChannels parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v44/methods/channels_getDialogs.md b/old_docs/API_docs_v44/methods/channels_getDialogs.md index 854372f6..916f9b34 100644 --- a/old_docs/API_docs_v44/methods/channels_getDialogs.md +++ b/old_docs/API_docs_v44/methods/channels_getDialogs.md @@ -24,16 +24,13 @@ description: channels.getDialogs parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v44/methods/channels_getImportantHistory.md b/old_docs/API_docs_v44/methods/channels_getImportantHistory.md index 076315a3..a7c73057 100644 --- a/old_docs/API_docs_v44/methods/channels_getImportantHistory.md +++ b/old_docs/API_docs_v44/methods/channels_getImportantHistory.md @@ -28,16 +28,13 @@ description: channels.getImportantHistory parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v44/methods/channels_getMessages.md b/old_docs/API_docs_v44/methods/channels_getMessages.md index 5480dd86..dc392773 100644 --- a/old_docs/API_docs_v44/methods/channels_getMessages.md +++ b/old_docs/API_docs_v44/methods/channels_getMessages.md @@ -33,16 +33,13 @@ description: channels.getMessages parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v44/methods/channels_getParticipant.md b/old_docs/API_docs_v44/methods/channels_getParticipant.md index 8c7e3cbd..001bf115 100644 --- a/old_docs/API_docs_v44/methods/channels_getParticipant.md +++ b/old_docs/API_docs_v44/methods/channels_getParticipant.md @@ -35,16 +35,13 @@ description: channels.getParticipant parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v44/methods/channels_inviteToChannel.md b/old_docs/API_docs_v44/methods/channels_inviteToChannel.md index cf5480e0..2448fb84 100644 --- a/old_docs/API_docs_v44/methods/channels_inviteToChannel.md +++ b/old_docs/API_docs_v44/methods/channels_inviteToChannel.md @@ -46,13 +46,10 @@ description: channels.inviteToChannel parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v44/methods/channels_joinChannel.md b/old_docs/API_docs_v44/methods/channels_joinChannel.md index f31730a1..e746cf48 100644 --- a/old_docs/API_docs_v44/methods/channels_joinChannel.md +++ b/old_docs/API_docs_v44/methods/channels_joinChannel.md @@ -32,13 +32,10 @@ description: channels.joinChannel parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v44/methods/channels_kickFromChannel.md b/old_docs/API_docs_v44/methods/channels_kickFromChannel.md index c903caa4..c85833ce 100644 --- a/old_docs/API_docs_v44/methods/channels_kickFromChannel.md +++ b/old_docs/API_docs_v44/methods/channels_kickFromChannel.md @@ -25,16 +25,13 @@ description: channels.kickFromChannel parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v44/methods/channels_leaveChannel.md b/old_docs/API_docs_v44/methods/channels_leaveChannel.md index 12902f6d..ff244ded 100644 --- a/old_docs/API_docs_v44/methods/channels_leaveChannel.md +++ b/old_docs/API_docs_v44/methods/channels_leaveChannel.md @@ -34,16 +34,13 @@ description: channels.leaveChannel parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v44/methods/channels_readHistory.md b/old_docs/API_docs_v44/methods/channels_readHistory.md index be979101..6fc6ec0e 100644 --- a/old_docs/API_docs_v44/methods/channels_readHistory.md +++ b/old_docs/API_docs_v44/methods/channels_readHistory.md @@ -32,13 +32,10 @@ description: channels.readHistory parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v44/methods/channels_reportSpam.md b/old_docs/API_docs_v44/methods/channels_reportSpam.md index 22f34443..a37a5833 100644 --- a/old_docs/API_docs_v44/methods/channels_reportSpam.md +++ b/old_docs/API_docs_v44/methods/channels_reportSpam.md @@ -33,13 +33,10 @@ description: channels.reportSpam parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v44/methods/channels_toggleComments.md b/old_docs/API_docs_v44/methods/channels_toggleComments.md index 55da95b5..1b304615 100644 --- a/old_docs/API_docs_v44/methods/channels_toggleComments.md +++ b/old_docs/API_docs_v44/methods/channels_toggleComments.md @@ -24,16 +24,13 @@ description: channels.toggleComments parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v44/methods/channels_updateUsername.md b/old_docs/API_docs_v44/methods/channels_updateUsername.md index c2ede724..1f1f111e 100644 --- a/old_docs/API_docs_v44/methods/channels_updateUsername.md +++ b/old_docs/API_docs_v44/methods/channels_updateUsername.md @@ -35,13 +35,10 @@ description: channels.updateUsername parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v44/methods/contacts_block.md b/old_docs/API_docs_v44/methods/contacts_block.md index d9d58e37..1c7cbe26 100644 --- a/old_docs/API_docs_v44/methods/contacts_block.md +++ b/old_docs/API_docs_v44/methods/contacts_block.md @@ -30,13 +30,10 @@ description: contacts.block parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v44/methods/contacts_deleteContact.md b/old_docs/API_docs_v44/methods/contacts_deleteContact.md index cd8c17ad..987a1be0 100644 --- a/old_docs/API_docs_v44/methods/contacts_deleteContact.md +++ b/old_docs/API_docs_v44/methods/contacts_deleteContact.md @@ -30,13 +30,10 @@ description: contacts.deleteContact parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v44/methods/contacts_deleteContacts.md b/old_docs/API_docs_v44/methods/contacts_deleteContacts.md index fc65880d..67a922ed 100644 --- a/old_docs/API_docs_v44/methods/contacts_deleteContacts.md +++ b/old_docs/API_docs_v44/methods/contacts_deleteContacts.md @@ -31,13 +31,10 @@ description: contacts.deleteContacts parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v44/methods/contacts_exportCard.md b/old_docs/API_docs_v44/methods/contacts_exportCard.md index 63508076..bf6d1f9f 100644 --- a/old_docs/API_docs_v44/methods/contacts_exportCard.md +++ b/old_docs/API_docs_v44/methods/contacts_exportCard.md @@ -18,13 +18,10 @@ description: contacts.exportCard parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v44/methods/contacts_getBlocked.md b/old_docs/API_docs_v44/methods/contacts_getBlocked.md index f50792b4..faa719da 100644 --- a/old_docs/API_docs_v44/methods/contacts_getBlocked.md +++ b/old_docs/API_docs_v44/methods/contacts_getBlocked.md @@ -24,13 +24,10 @@ description: contacts.getBlocked parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v44/methods/contacts_getContacts.md b/old_docs/API_docs_v44/methods/contacts_getContacts.md index 71313bf2..a6779111 100644 --- a/old_docs/API_docs_v44/methods/contacts_getContacts.md +++ b/old_docs/API_docs_v44/methods/contacts_getContacts.md @@ -23,13 +23,10 @@ description: contacts.getContacts parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v44/methods/contacts_getStatuses.md b/old_docs/API_docs_v44/methods/contacts_getStatuses.md index d914e08d..9bb7f263 100644 --- a/old_docs/API_docs_v44/methods/contacts_getStatuses.md +++ b/old_docs/API_docs_v44/methods/contacts_getStatuses.md @@ -18,13 +18,10 @@ description: contacts.getStatuses parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v44/methods/contacts_getSuggested.md b/old_docs/API_docs_v44/methods/contacts_getSuggested.md index a29f4aff..2059c01b 100644 --- a/old_docs/API_docs_v44/methods/contacts_getSuggested.md +++ b/old_docs/API_docs_v44/methods/contacts_getSuggested.md @@ -23,16 +23,13 @@ description: contacts.getSuggested parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v44/methods/contacts_importCard.md b/old_docs/API_docs_v44/methods/contacts_importCard.md index a6abf56d..7a2f34e1 100644 --- a/old_docs/API_docs_v44/methods/contacts_importCard.md +++ b/old_docs/API_docs_v44/methods/contacts_importCard.md @@ -31,13 +31,10 @@ description: contacts.importCard parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v44/methods/contacts_importContacts.md b/old_docs/API_docs_v44/methods/contacts_importContacts.md index db2051ac..2f070493 100644 --- a/old_docs/API_docs_v44/methods/contacts_importContacts.md +++ b/old_docs/API_docs_v44/methods/contacts_importContacts.md @@ -24,13 +24,10 @@ description: contacts.importContacts parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v44/methods/contacts_search.md b/old_docs/API_docs_v44/methods/contacts_search.md index 0203b160..70a0635e 100644 --- a/old_docs/API_docs_v44/methods/contacts_search.md +++ b/old_docs/API_docs_v44/methods/contacts_search.md @@ -33,13 +33,10 @@ description: contacts.search parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v44/methods/contacts_unblock.md b/old_docs/API_docs_v44/methods/contacts_unblock.md index a1977c24..9c01e42a 100644 --- a/old_docs/API_docs_v44/methods/contacts_unblock.md +++ b/old_docs/API_docs_v44/methods/contacts_unblock.md @@ -30,13 +30,10 @@ description: contacts.unblock parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v44/methods/help_getAppChangelog.md b/old_docs/API_docs_v44/methods/help_getAppChangelog.md index 302809aa..b27cc9f0 100644 --- a/old_docs/API_docs_v44/methods/help_getAppChangelog.md +++ b/old_docs/API_docs_v44/methods/help_getAppChangelog.md @@ -26,13 +26,10 @@ description: help.getAppChangelog parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v44/methods/help_getAppUpdate.md b/old_docs/API_docs_v44/methods/help_getAppUpdate.md index c8e67402..7b3bdde9 100644 --- a/old_docs/API_docs_v44/methods/help_getAppUpdate.md +++ b/old_docs/API_docs_v44/methods/help_getAppUpdate.md @@ -26,13 +26,10 @@ description: help.getAppUpdate parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v44/methods/help_getConfig.md b/old_docs/API_docs_v44/methods/help_getConfig.md index e3648b5a..bb51b362 100644 --- a/old_docs/API_docs_v44/methods/help_getConfig.md +++ b/old_docs/API_docs_v44/methods/help_getConfig.md @@ -25,16 +25,13 @@ description: help.getConfig parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v44/methods/help_getInviteText.md b/old_docs/API_docs_v44/methods/help_getInviteText.md index 348de85d..40251dd5 100644 --- a/old_docs/API_docs_v44/methods/help_getInviteText.md +++ b/old_docs/API_docs_v44/methods/help_getInviteText.md @@ -23,13 +23,10 @@ description: help.getInviteText parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v44/methods/help_getNearestDc.md b/old_docs/API_docs_v44/methods/help_getNearestDc.md index c6f5c555..6d8ed3f7 100644 --- a/old_docs/API_docs_v44/methods/help_getNearestDc.md +++ b/old_docs/API_docs_v44/methods/help_getNearestDc.md @@ -18,13 +18,10 @@ description: help.getNearestDc parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v44/methods/help_getSupport.md b/old_docs/API_docs_v44/methods/help_getSupport.md index 209edf03..ca8db03c 100644 --- a/old_docs/API_docs_v44/methods/help_getSupport.md +++ b/old_docs/API_docs_v44/methods/help_getSupport.md @@ -18,13 +18,10 @@ description: help.getSupport parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v44/methods/help_getTermsOfService.md b/old_docs/API_docs_v44/methods/help_getTermsOfService.md index eb0ce476..1e8899a2 100644 --- a/old_docs/API_docs_v44/methods/help_getTermsOfService.md +++ b/old_docs/API_docs_v44/methods/help_getTermsOfService.md @@ -23,13 +23,10 @@ description: help.getTermsOfService parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v44/methods/help_saveAppLog.md b/old_docs/API_docs_v44/methods/help_saveAppLog.md index 4f06434c..741b9aa1 100644 --- a/old_docs/API_docs_v44/methods/help_saveAppLog.md +++ b/old_docs/API_docs_v44/methods/help_saveAppLog.md @@ -23,13 +23,10 @@ description: help.saveAppLog parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v44/methods/initConnection.md b/old_docs/API_docs_v44/methods/initConnection.md index 0d22a1cb..c0307677 100644 --- a/old_docs/API_docs_v44/methods/initConnection.md +++ b/old_docs/API_docs_v44/methods/initConnection.md @@ -36,16 +36,13 @@ description: initConnection parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v44/methods/invokeAfterMsg.md b/old_docs/API_docs_v44/methods/invokeAfterMsg.md index c139fe8c..a382429e 100644 --- a/old_docs/API_docs_v44/methods/invokeAfterMsg.md +++ b/old_docs/API_docs_v44/methods/invokeAfterMsg.md @@ -24,16 +24,13 @@ description: invokeAfterMsg parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v44/methods/invokeAfterMsgs.md b/old_docs/API_docs_v44/methods/invokeAfterMsgs.md index 35004296..169eedaf 100644 --- a/old_docs/API_docs_v44/methods/invokeAfterMsgs.md +++ b/old_docs/API_docs_v44/methods/invokeAfterMsgs.md @@ -24,16 +24,13 @@ description: invokeAfterMsgs parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v44/methods/invokeWithLayer.md b/old_docs/API_docs_v44/methods/invokeWithLayer.md index 706036c4..d9a2c74c 100644 --- a/old_docs/API_docs_v44/methods/invokeWithLayer.md +++ b/old_docs/API_docs_v44/methods/invokeWithLayer.md @@ -41,16 +41,13 @@ description: invokeWithLayer parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v44/methods/invokeWithoutUpdates.md b/old_docs/API_docs_v44/methods/invokeWithoutUpdates.md index 10c6bfcf..f7d01765 100644 --- a/old_docs/API_docs_v44/methods/invokeWithoutUpdates.md +++ b/old_docs/API_docs_v44/methods/invokeWithoutUpdates.md @@ -23,16 +23,13 @@ description: invokeWithoutUpdates parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v44/methods/messages_addChatUser.md b/old_docs/API_docs_v44/methods/messages_addChatUser.md index 00da5a61..b9e6243d 100644 --- a/old_docs/API_docs_v44/methods/messages_addChatUser.md +++ b/old_docs/API_docs_v44/methods/messages_addChatUser.md @@ -40,13 +40,10 @@ description: messages.addChatUser parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v44/methods/messages_checkChatInvite.md b/old_docs/API_docs_v44/methods/messages_checkChatInvite.md index c5eb1c06..c4489469 100644 --- a/old_docs/API_docs_v44/methods/messages_checkChatInvite.md +++ b/old_docs/API_docs_v44/methods/messages_checkChatInvite.md @@ -32,13 +32,10 @@ description: messages.checkChatInvite parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v44/methods/messages_createChat.md b/old_docs/API_docs_v44/methods/messages_createChat.md index c643a022..c6c8f420 100644 --- a/old_docs/API_docs_v44/methods/messages_createChat.md +++ b/old_docs/API_docs_v44/methods/messages_createChat.md @@ -32,13 +32,10 @@ description: messages.createChat parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v44/methods/messages_deleteChatUser.md b/old_docs/API_docs_v44/methods/messages_deleteChatUser.md index 3d75d9cf..4b8c2aa5 100644 --- a/old_docs/API_docs_v44/methods/messages_deleteChatUser.md +++ b/old_docs/API_docs_v44/methods/messages_deleteChatUser.md @@ -33,16 +33,13 @@ description: messages.deleteChatUser parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v44/methods/messages_deleteHistory.md b/old_docs/API_docs_v44/methods/messages_deleteHistory.md index c8081e79..6ae145d8 100644 --- a/old_docs/API_docs_v44/methods/messages_deleteHistory.md +++ b/old_docs/API_docs_v44/methods/messages_deleteHistory.md @@ -31,13 +31,10 @@ description: messages.deleteHistory parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v44/methods/messages_deleteMessages.md b/old_docs/API_docs_v44/methods/messages_deleteMessages.md index 65dbbc4a..38b3ca09 100644 --- a/old_docs/API_docs_v44/methods/messages_deleteMessages.md +++ b/old_docs/API_docs_v44/methods/messages_deleteMessages.md @@ -30,16 +30,13 @@ description: messages.deleteMessages parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v44/methods/messages_editChatAdmin.md b/old_docs/API_docs_v44/methods/messages_editChatAdmin.md index e64d9da5..1b3ffa9f 100644 --- a/old_docs/API_docs_v44/methods/messages_editChatAdmin.md +++ b/old_docs/API_docs_v44/methods/messages_editChatAdmin.md @@ -32,13 +32,10 @@ description: messages.editChatAdmin parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v44/methods/messages_editChatPhoto.md b/old_docs/API_docs_v44/methods/messages_editChatPhoto.md index d225962d..8c5d9d47 100644 --- a/old_docs/API_docs_v44/methods/messages_editChatPhoto.md +++ b/old_docs/API_docs_v44/methods/messages_editChatPhoto.md @@ -35,16 +35,13 @@ description: messages.editChatPhoto parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v44/methods/messages_editChatTitle.md b/old_docs/API_docs_v44/methods/messages_editChatTitle.md index 5cb1c6d7..238c6d72 100644 --- a/old_docs/API_docs_v44/methods/messages_editChatTitle.md +++ b/old_docs/API_docs_v44/methods/messages_editChatTitle.md @@ -32,16 +32,13 @@ description: messages.editChatTitle parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v44/methods/messages_exportChatInvite.md b/old_docs/API_docs_v44/methods/messages_exportChatInvite.md index 4a6e28ff..78f2ff86 100644 --- a/old_docs/API_docs_v44/methods/messages_exportChatInvite.md +++ b/old_docs/API_docs_v44/methods/messages_exportChatInvite.md @@ -30,13 +30,10 @@ description: messages.exportChatInvite parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v44/methods/messages_forwardMessage.md b/old_docs/API_docs_v44/methods/messages_forwardMessage.md index 4e2362db..fbdbc955 100644 --- a/old_docs/API_docs_v44/methods/messages_forwardMessage.md +++ b/old_docs/API_docs_v44/methods/messages_forwardMessage.md @@ -34,16 +34,13 @@ description: messages.forwardMessage parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v44/methods/messages_forwardMessages.md b/old_docs/API_docs_v44/methods/messages_forwardMessages.md index 2ea31ccf..6e5dee90 100644 --- a/old_docs/API_docs_v44/methods/messages_forwardMessages.md +++ b/old_docs/API_docs_v44/methods/messages_forwardMessages.md @@ -54,16 +54,13 @@ description: messages.forwardMessages parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v44/methods/messages_getAllStickers.md b/old_docs/API_docs_v44/methods/messages_getAllStickers.md index dc9e2432..034438a5 100644 --- a/old_docs/API_docs_v44/methods/messages_getAllStickers.md +++ b/old_docs/API_docs_v44/methods/messages_getAllStickers.md @@ -23,13 +23,10 @@ description: messages.getAllStickers parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v44/methods/messages_getChats.md b/old_docs/API_docs_v44/methods/messages_getChats.md index 6fa30cbd..c322613d 100644 --- a/old_docs/API_docs_v44/methods/messages_getChats.md +++ b/old_docs/API_docs_v44/methods/messages_getChats.md @@ -31,16 +31,13 @@ description: messages.getChats parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v44/methods/messages_getDhConfig.md b/old_docs/API_docs_v44/methods/messages_getDhConfig.md index aac3354d..f97684d2 100644 --- a/old_docs/API_docs_v44/methods/messages_getDhConfig.md +++ b/old_docs/API_docs_v44/methods/messages_getDhConfig.md @@ -31,13 +31,10 @@ description: messages.getDhConfig parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v44/methods/messages_getDialogs.md b/old_docs/API_docs_v44/methods/messages_getDialogs.md index 4c278eae..4b86ed71 100644 --- a/old_docs/API_docs_v44/methods/messages_getDialogs.md +++ b/old_docs/API_docs_v44/methods/messages_getDialogs.md @@ -36,13 +36,10 @@ description: messages.getDialogs parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v44/methods/messages_getDocumentByHash.md b/old_docs/API_docs_v44/methods/messages_getDocumentByHash.md index dda54bdd..3902ac44 100644 --- a/old_docs/API_docs_v44/methods/messages_getDocumentByHash.md +++ b/old_docs/API_docs_v44/methods/messages_getDocumentByHash.md @@ -32,16 +32,13 @@ description: messages.getDocumentByHash parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v44/methods/messages_getHistory.md b/old_docs/API_docs_v44/methods/messages_getHistory.md index ba9ed92d..23955a96 100644 --- a/old_docs/API_docs_v44/methods/messages_getHistory.md +++ b/old_docs/API_docs_v44/methods/messages_getHistory.md @@ -40,13 +40,10 @@ description: messages.getHistory parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v44/methods/messages_getMessages.md b/old_docs/API_docs_v44/methods/messages_getMessages.md index 5a970246..787c46dd 100644 --- a/old_docs/API_docs_v44/methods/messages_getMessages.md +++ b/old_docs/API_docs_v44/methods/messages_getMessages.md @@ -23,16 +23,13 @@ description: messages.getMessages parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v44/methods/messages_getMessagesViews.md b/old_docs/API_docs_v44/methods/messages_getMessagesViews.md index 263f3f95..de5692dc 100644 --- a/old_docs/API_docs_v44/methods/messages_getMessagesViews.md +++ b/old_docs/API_docs_v44/methods/messages_getMessagesViews.md @@ -34,13 +34,10 @@ description: messages.getMessagesViews parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v44/methods/messages_getStickerSet.md b/old_docs/API_docs_v44/methods/messages_getStickerSet.md index 59f33916..b480e0fe 100644 --- a/old_docs/API_docs_v44/methods/messages_getStickerSet.md +++ b/old_docs/API_docs_v44/methods/messages_getStickerSet.md @@ -30,16 +30,13 @@ description: messages.getStickerSet parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v44/methods/messages_getStickers.md b/old_docs/API_docs_v44/methods/messages_getStickers.md index be61a120..1587cd01 100644 --- a/old_docs/API_docs_v44/methods/messages_getStickers.md +++ b/old_docs/API_docs_v44/methods/messages_getStickers.md @@ -24,16 +24,13 @@ description: messages.getStickers parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v44/methods/messages_getWebPagePreview.md b/old_docs/API_docs_v44/methods/messages_getWebPagePreview.md index a89600b1..d3908933 100644 --- a/old_docs/API_docs_v44/methods/messages_getWebPagePreview.md +++ b/old_docs/API_docs_v44/methods/messages_getWebPagePreview.md @@ -23,13 +23,10 @@ description: messages.getWebPagePreview parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v44/methods/messages_importChatInvite.md b/old_docs/API_docs_v44/methods/messages_importChatInvite.md index 9d77304d..9dcfa56d 100644 --- a/old_docs/API_docs_v44/methods/messages_importChatInvite.md +++ b/old_docs/API_docs_v44/methods/messages_importChatInvite.md @@ -36,13 +36,10 @@ description: messages.importChatInvite parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v44/methods/messages_installStickerSet.md b/old_docs/API_docs_v44/methods/messages_installStickerSet.md index 1969d008..cf1865a8 100644 --- a/old_docs/API_docs_v44/methods/messages_installStickerSet.md +++ b/old_docs/API_docs_v44/methods/messages_installStickerSet.md @@ -31,13 +31,10 @@ description: messages.installStickerSet parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v44/methods/messages_migrateChat.md b/old_docs/API_docs_v44/methods/messages_migrateChat.md index 22d2fbf0..a8274e70 100644 --- a/old_docs/API_docs_v44/methods/messages_migrateChat.md +++ b/old_docs/API_docs_v44/methods/messages_migrateChat.md @@ -32,13 +32,10 @@ description: messages.migrateChat parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v44/methods/messages_readEncryptedHistory.md b/old_docs/API_docs_v44/methods/messages_readEncryptedHistory.md index 766ee07d..f38f6b07 100644 --- a/old_docs/API_docs_v44/methods/messages_readEncryptedHistory.md +++ b/old_docs/API_docs_v44/methods/messages_readEncryptedHistory.md @@ -31,16 +31,13 @@ description: messages.readEncryptedHistory parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v44/methods/messages_readHistory.md b/old_docs/API_docs_v44/methods/messages_readHistory.md index 1aa7830a..fef62130 100644 --- a/old_docs/API_docs_v44/methods/messages_readHistory.md +++ b/old_docs/API_docs_v44/methods/messages_readHistory.md @@ -32,13 +32,10 @@ description: messages.readHistory parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v44/methods/messages_readMessageContents.md b/old_docs/API_docs_v44/methods/messages_readMessageContents.md index 4b1abda0..7a6055fc 100644 --- a/old_docs/API_docs_v44/methods/messages_readMessageContents.md +++ b/old_docs/API_docs_v44/methods/messages_readMessageContents.md @@ -23,13 +23,10 @@ description: messages.readMessageContents parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v44/methods/messages_receivedMessages.md b/old_docs/API_docs_v44/methods/messages_receivedMessages.md index 588ac5cf..e2cf3a2f 100644 --- a/old_docs/API_docs_v44/methods/messages_receivedMessages.md +++ b/old_docs/API_docs_v44/methods/messages_receivedMessages.md @@ -23,13 +23,10 @@ description: messages.receivedMessages parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v44/methods/messages_receivedQueue.md b/old_docs/API_docs_v44/methods/messages_receivedQueue.md index 3c7f1d4f..38f504b3 100644 --- a/old_docs/API_docs_v44/methods/messages_receivedQueue.md +++ b/old_docs/API_docs_v44/methods/messages_receivedQueue.md @@ -30,16 +30,13 @@ description: messages.receivedQueue parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v44/methods/messages_reorderStickerSets.md b/old_docs/API_docs_v44/methods/messages_reorderStickerSets.md index cb35605a..e09057e7 100644 --- a/old_docs/API_docs_v44/methods/messages_reorderStickerSets.md +++ b/old_docs/API_docs_v44/methods/messages_reorderStickerSets.md @@ -23,13 +23,10 @@ description: messages.reorderStickerSets parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v44/methods/messages_reportSpam.md b/old_docs/API_docs_v44/methods/messages_reportSpam.md index bfadb9ab..08c96d44 100644 --- a/old_docs/API_docs_v44/methods/messages_reportSpam.md +++ b/old_docs/API_docs_v44/methods/messages_reportSpam.md @@ -30,13 +30,10 @@ description: messages.reportSpam parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v44/methods/messages_search.md b/old_docs/API_docs_v44/methods/messages_search.md index 8ea63f65..87f282e3 100644 --- a/old_docs/API_docs_v44/methods/messages_search.md +++ b/old_docs/API_docs_v44/methods/messages_search.md @@ -44,13 +44,10 @@ description: messages.search parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v44/methods/messages_searchGifs.md b/old_docs/API_docs_v44/methods/messages_searchGifs.md index 3f4c4838..dd804c99 100644 --- a/old_docs/API_docs_v44/methods/messages_searchGifs.md +++ b/old_docs/API_docs_v44/methods/messages_searchGifs.md @@ -31,13 +31,10 @@ description: messages.searchGifs parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v44/methods/messages_searchGlobal.md b/old_docs/API_docs_v44/methods/messages_searchGlobal.md index 0553dd7a..4b45eed2 100644 --- a/old_docs/API_docs_v44/methods/messages_searchGlobal.md +++ b/old_docs/API_docs_v44/methods/messages_searchGlobal.md @@ -34,13 +34,10 @@ description: messages.searchGlobal parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v44/methods/messages_sendBroadcast.md b/old_docs/API_docs_v44/methods/messages_sendBroadcast.md index ac13d0bf..537166ab 100644 --- a/old_docs/API_docs_v44/methods/messages_sendBroadcast.md +++ b/old_docs/API_docs_v44/methods/messages_sendBroadcast.md @@ -25,16 +25,13 @@ description: messages.sendBroadcast parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v44/methods/messages_sendEncrypted.md b/old_docs/API_docs_v44/methods/messages_sendEncrypted.md index 82eeec92..ba9f796b 100644 --- a/old_docs/API_docs_v44/methods/messages_sendEncrypted.md +++ b/old_docs/API_docs_v44/methods/messages_sendEncrypted.md @@ -34,16 +34,13 @@ description: messages.sendEncrypted parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v44/methods/messages_sendEncryptedFile.md b/old_docs/API_docs_v44/methods/messages_sendEncryptedFile.md index 8f7a73d9..db16bf2d 100644 --- a/old_docs/API_docs_v44/methods/messages_sendEncryptedFile.md +++ b/old_docs/API_docs_v44/methods/messages_sendEncryptedFile.md @@ -32,16 +32,13 @@ description: messages.sendEncryptedFile parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v44/methods/messages_sendEncryptedService.md b/old_docs/API_docs_v44/methods/messages_sendEncryptedService.md index d427f6c3..fd4e2627 100644 --- a/old_docs/API_docs_v44/methods/messages_sendEncryptedService.md +++ b/old_docs/API_docs_v44/methods/messages_sendEncryptedService.md @@ -34,16 +34,13 @@ description: messages.sendEncryptedService parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v44/methods/messages_sendMedia.md b/old_docs/API_docs_v44/methods/messages_sendMedia.md index 4b924e7e..2bc63256 100644 --- a/old_docs/API_docs_v44/methods/messages_sendMedia.md +++ b/old_docs/API_docs_v44/methods/messages_sendMedia.md @@ -57,16 +57,13 @@ description: messages.sendMedia parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v44/methods/messages_sendMessage.md b/old_docs/API_docs_v44/methods/messages_sendMessage.md index 723c2f65..1a735df3 100644 --- a/old_docs/API_docs_v44/methods/messages_sendMessage.md +++ b/old_docs/API_docs_v44/methods/messages_sendMessage.md @@ -56,16 +56,13 @@ description: messages.sendMessage parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v44/methods/messages_setEncryptedTyping.md b/old_docs/API_docs_v44/methods/messages_setEncryptedTyping.md index a05b94dd..aeae6ff7 100644 --- a/old_docs/API_docs_v44/methods/messages_setEncryptedTyping.md +++ b/old_docs/API_docs_v44/methods/messages_setEncryptedTyping.md @@ -31,13 +31,10 @@ description: messages.setEncryptedTyping parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v44/methods/messages_setTyping.md b/old_docs/API_docs_v44/methods/messages_setTyping.md index 9ef8caf5..f6b7b7b5 100644 --- a/old_docs/API_docs_v44/methods/messages_setTyping.md +++ b/old_docs/API_docs_v44/methods/messages_setTyping.md @@ -37,16 +37,13 @@ description: messages.setTyping parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v44/methods/messages_startBot.md b/old_docs/API_docs_v44/methods/messages_startBot.md index 8d98e390..b33ab013 100644 --- a/old_docs/API_docs_v44/methods/messages_startBot.md +++ b/old_docs/API_docs_v44/methods/messages_startBot.md @@ -35,13 +35,10 @@ description: messages.startBot parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v44/methods/messages_toggleChatAdmins.md b/old_docs/API_docs_v44/methods/messages_toggleChatAdmins.md index 3bf8a419..97328065 100644 --- a/old_docs/API_docs_v44/methods/messages_toggleChatAdmins.md +++ b/old_docs/API_docs_v44/methods/messages_toggleChatAdmins.md @@ -32,13 +32,10 @@ description: messages.toggleChatAdmins parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v44/methods/messages_uninstallStickerSet.md b/old_docs/API_docs_v44/methods/messages_uninstallStickerSet.md index 6763e64f..76a3e3e2 100644 --- a/old_docs/API_docs_v44/methods/messages_uninstallStickerSet.md +++ b/old_docs/API_docs_v44/methods/messages_uninstallStickerSet.md @@ -30,13 +30,10 @@ description: messages.uninstallStickerSet parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v44/methods/photos_deletePhotos.md b/old_docs/API_docs_v44/methods/photos_deletePhotos.md index e9cd459d..61768b1e 100644 --- a/old_docs/API_docs_v44/methods/photos_deletePhotos.md +++ b/old_docs/API_docs_v44/methods/photos_deletePhotos.md @@ -23,13 +23,10 @@ description: photos.deletePhotos parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v44/methods/photos_getUserPhotos.md b/old_docs/API_docs_v44/methods/photos_getUserPhotos.md index d6c2a380..095363e7 100644 --- a/old_docs/API_docs_v44/methods/photos_getUserPhotos.md +++ b/old_docs/API_docs_v44/methods/photos_getUserPhotos.md @@ -34,16 +34,13 @@ description: photos.getUserPhotos parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v44/methods/photos_updateProfilePhoto.md b/old_docs/API_docs_v44/methods/photos_updateProfilePhoto.md index abb031d4..add6028f 100644 --- a/old_docs/API_docs_v44/methods/photos_updateProfilePhoto.md +++ b/old_docs/API_docs_v44/methods/photos_updateProfilePhoto.md @@ -24,13 +24,10 @@ description: photos.updateProfilePhoto parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v44/methods/photos_uploadProfilePhoto.md b/old_docs/API_docs_v44/methods/photos_uploadProfilePhoto.md index ae20fdfc..048a1d32 100644 --- a/old_docs/API_docs_v44/methods/photos_uploadProfilePhoto.md +++ b/old_docs/API_docs_v44/methods/photos_uploadProfilePhoto.md @@ -37,13 +37,10 @@ description: photos.uploadProfilePhoto parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v44/methods/users_getUsers.md b/old_docs/API_docs_v44/methods/users_getUsers.md index 6a44d258..3a981d57 100644 --- a/old_docs/API_docs_v44/methods/users_getUsers.md +++ b/old_docs/API_docs_v44/methods/users_getUsers.md @@ -33,16 +33,13 @@ description: users.getUsers parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v45/methods/account_changePhone.md b/old_docs/API_docs_v45/methods/account_changePhone.md index 5d1801d0..e47ef6a7 100644 --- a/old_docs/API_docs_v45/methods/account_changePhone.md +++ b/old_docs/API_docs_v45/methods/account_changePhone.md @@ -32,13 +32,10 @@ description: account.changePhone parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v45/methods/account_checkUsername.md b/old_docs/API_docs_v45/methods/account_checkUsername.md index afc59b6c..40cf822f 100644 --- a/old_docs/API_docs_v45/methods/account_checkUsername.md +++ b/old_docs/API_docs_v45/methods/account_checkUsername.md @@ -30,13 +30,10 @@ description: account.checkUsername parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v45/methods/account_deleteAccount.md b/old_docs/API_docs_v45/methods/account_deleteAccount.md index 5abcd0ec..6f1bbda9 100644 --- a/old_docs/API_docs_v45/methods/account_deleteAccount.md +++ b/old_docs/API_docs_v45/methods/account_deleteAccount.md @@ -23,13 +23,10 @@ description: account.deleteAccount parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v45/methods/account_getAccountTTL.md b/old_docs/API_docs_v45/methods/account_getAccountTTL.md index 3520fbef..538b1d7a 100644 --- a/old_docs/API_docs_v45/methods/account_getAccountTTL.md +++ b/old_docs/API_docs_v45/methods/account_getAccountTTL.md @@ -18,13 +18,10 @@ description: account.getAccountTTL parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v45/methods/account_getAuthorizations.md b/old_docs/API_docs_v45/methods/account_getAuthorizations.md index 91bbce5e..f138d517 100644 --- a/old_docs/API_docs_v45/methods/account_getAuthorizations.md +++ b/old_docs/API_docs_v45/methods/account_getAuthorizations.md @@ -18,13 +18,10 @@ description: account.getAuthorizations parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v45/methods/account_getNotifySettings.md b/old_docs/API_docs_v45/methods/account_getNotifySettings.md index 8ee710d8..a48eed2f 100644 --- a/old_docs/API_docs_v45/methods/account_getNotifySettings.md +++ b/old_docs/API_docs_v45/methods/account_getNotifySettings.md @@ -30,13 +30,10 @@ description: account.getNotifySettings parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v45/methods/account_getPassword.md b/old_docs/API_docs_v45/methods/account_getPassword.md index 4d9fd015..1abf6174 100644 --- a/old_docs/API_docs_v45/methods/account_getPassword.md +++ b/old_docs/API_docs_v45/methods/account_getPassword.md @@ -18,13 +18,10 @@ description: account.getPassword parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v45/methods/account_getPasswordSettings.md b/old_docs/API_docs_v45/methods/account_getPasswordSettings.md index 02cb77f7..aec5b989 100644 --- a/old_docs/API_docs_v45/methods/account_getPasswordSettings.md +++ b/old_docs/API_docs_v45/methods/account_getPasswordSettings.md @@ -30,13 +30,10 @@ description: account.getPasswordSettings parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v45/methods/account_getPrivacy.md b/old_docs/API_docs_v45/methods/account_getPrivacy.md index 52786b79..8bbe9795 100644 --- a/old_docs/API_docs_v45/methods/account_getPrivacy.md +++ b/old_docs/API_docs_v45/methods/account_getPrivacy.md @@ -30,13 +30,10 @@ description: account.getPrivacy parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v45/methods/account_getWallPapers.md b/old_docs/API_docs_v45/methods/account_getWallPapers.md index 88c8a701..a71543d0 100644 --- a/old_docs/API_docs_v45/methods/account_getWallPapers.md +++ b/old_docs/API_docs_v45/methods/account_getWallPapers.md @@ -18,13 +18,10 @@ description: account.getWallPapers parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v45/methods/account_registerDevice.md b/old_docs/API_docs_v45/methods/account_registerDevice.md index ab7ec933..cfa1546c 100644 --- a/old_docs/API_docs_v45/methods/account_registerDevice.md +++ b/old_docs/API_docs_v45/methods/account_registerDevice.md @@ -36,13 +36,10 @@ description: account.registerDevice parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v45/methods/account_reportPeer.md b/old_docs/API_docs_v45/methods/account_reportPeer.md index 1545c3b8..1ae9f4d4 100644 --- a/old_docs/API_docs_v45/methods/account_reportPeer.md +++ b/old_docs/API_docs_v45/methods/account_reportPeer.md @@ -31,13 +31,10 @@ description: account.reportPeer parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v45/methods/account_resetAuthorization.md b/old_docs/API_docs_v45/methods/account_resetAuthorization.md index e44334f2..0438cba3 100644 --- a/old_docs/API_docs_v45/methods/account_resetAuthorization.md +++ b/old_docs/API_docs_v45/methods/account_resetAuthorization.md @@ -30,13 +30,10 @@ description: account.resetAuthorization parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v45/methods/account_resetNotifySettings.md b/old_docs/API_docs_v45/methods/account_resetNotifySettings.md index 155ede68..92db4f4f 100644 --- a/old_docs/API_docs_v45/methods/account_resetNotifySettings.md +++ b/old_docs/API_docs_v45/methods/account_resetNotifySettings.md @@ -18,13 +18,10 @@ description: account.resetNotifySettings parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v45/methods/account_sendChangePhoneCode.md b/old_docs/API_docs_v45/methods/account_sendChangePhoneCode.md index 650dba72..ad611a8b 100644 --- a/old_docs/API_docs_v45/methods/account_sendChangePhoneCode.md +++ b/old_docs/API_docs_v45/methods/account_sendChangePhoneCode.md @@ -30,13 +30,10 @@ description: account.sendChangePhoneCode parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v45/methods/account_setAccountTTL.md b/old_docs/API_docs_v45/methods/account_setAccountTTL.md index f06eb676..d08f59fb 100644 --- a/old_docs/API_docs_v45/methods/account_setAccountTTL.md +++ b/old_docs/API_docs_v45/methods/account_setAccountTTL.md @@ -30,13 +30,10 @@ description: account.setAccountTTL parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v45/methods/account_setPrivacy.md b/old_docs/API_docs_v45/methods/account_setPrivacy.md index 56aebbcc..401aa71c 100644 --- a/old_docs/API_docs_v45/methods/account_setPrivacy.md +++ b/old_docs/API_docs_v45/methods/account_setPrivacy.md @@ -31,13 +31,10 @@ description: account.setPrivacy parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v45/methods/account_unregisterDevice.md b/old_docs/API_docs_v45/methods/account_unregisterDevice.md index 41899b6e..283ec7d2 100644 --- a/old_docs/API_docs_v45/methods/account_unregisterDevice.md +++ b/old_docs/API_docs_v45/methods/account_unregisterDevice.md @@ -31,13 +31,10 @@ description: account.unregisterDevice parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v45/methods/account_updateDeviceLocked.md b/old_docs/API_docs_v45/methods/account_updateDeviceLocked.md index 37aeb59d..ae6125a5 100644 --- a/old_docs/API_docs_v45/methods/account_updateDeviceLocked.md +++ b/old_docs/API_docs_v45/methods/account_updateDeviceLocked.md @@ -23,13 +23,10 @@ description: account.updateDeviceLocked parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v45/methods/account_updateNotifySettings.md b/old_docs/API_docs_v45/methods/account_updateNotifySettings.md index 8389b5c2..fb096250 100644 --- a/old_docs/API_docs_v45/methods/account_updateNotifySettings.md +++ b/old_docs/API_docs_v45/methods/account_updateNotifySettings.md @@ -31,13 +31,10 @@ description: account.updateNotifySettings parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v45/methods/account_updatePasswordSettings.md b/old_docs/API_docs_v45/methods/account_updatePasswordSettings.md index b7c8da4b..ffa8dcd9 100644 --- a/old_docs/API_docs_v45/methods/account_updatePasswordSettings.md +++ b/old_docs/API_docs_v45/methods/account_updatePasswordSettings.md @@ -34,13 +34,10 @@ description: account.updatePasswordSettings parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v45/methods/account_updateProfile.md b/old_docs/API_docs_v45/methods/account_updateProfile.md index c8712074..123ed13a 100644 --- a/old_docs/API_docs_v45/methods/account_updateProfile.md +++ b/old_docs/API_docs_v45/methods/account_updateProfile.md @@ -32,13 +32,10 @@ description: account.updateProfile parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v45/methods/account_updateStatus.md b/old_docs/API_docs_v45/methods/account_updateStatus.md index 7204e582..c8fa0a79 100644 --- a/old_docs/API_docs_v45/methods/account_updateStatus.md +++ b/old_docs/API_docs_v45/methods/account_updateStatus.md @@ -30,13 +30,10 @@ description: account.updateStatus parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v45/methods/account_updateUsername.md b/old_docs/API_docs_v45/methods/account_updateUsername.md index 22be2fd4..2b7576a5 100644 --- a/old_docs/API_docs_v45/methods/account_updateUsername.md +++ b/old_docs/API_docs_v45/methods/account_updateUsername.md @@ -32,13 +32,10 @@ description: account.updateUsername parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v45/methods/auth_bindTempAuthKey.md b/old_docs/API_docs_v45/methods/auth_bindTempAuthKey.md index e3d72dd5..7419abb0 100644 --- a/old_docs/API_docs_v45/methods/auth_bindTempAuthKey.md +++ b/old_docs/API_docs_v45/methods/auth_bindTempAuthKey.md @@ -35,16 +35,13 @@ description: auth.bindTempAuthKey parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v45/methods/auth_checkPassword.md b/old_docs/API_docs_v45/methods/auth_checkPassword.md index d5559186..6b6b21cc 100644 --- a/old_docs/API_docs_v45/methods/auth_checkPassword.md +++ b/old_docs/API_docs_v45/methods/auth_checkPassword.md @@ -30,13 +30,10 @@ description: auth.checkPassword parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v45/methods/auth_checkPhone.md b/old_docs/API_docs_v45/methods/auth_checkPhone.md index 3455904d..f6cac2e6 100644 --- a/old_docs/API_docs_v45/methods/auth_checkPhone.md +++ b/old_docs/API_docs_v45/methods/auth_checkPhone.md @@ -32,13 +32,10 @@ description: auth.checkPhone parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v45/methods/auth_exportAuthorization.md b/old_docs/API_docs_v45/methods/auth_exportAuthorization.md index 44c45b70..cbc8203b 100644 --- a/old_docs/API_docs_v45/methods/auth_exportAuthorization.md +++ b/old_docs/API_docs_v45/methods/auth_exportAuthorization.md @@ -30,16 +30,13 @@ description: auth.exportAuthorization parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v45/methods/auth_importAuthorization.md b/old_docs/API_docs_v45/methods/auth_importAuthorization.md index e0fd534f..22166510 100644 --- a/old_docs/API_docs_v45/methods/auth_importAuthorization.md +++ b/old_docs/API_docs_v45/methods/auth_importAuthorization.md @@ -32,16 +32,13 @@ description: auth.importAuthorization parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v45/methods/auth_recoverPassword.md b/old_docs/API_docs_v45/methods/auth_recoverPassword.md index c2ce3fed..931e99fd 100644 --- a/old_docs/API_docs_v45/methods/auth_recoverPassword.md +++ b/old_docs/API_docs_v45/methods/auth_recoverPassword.md @@ -30,13 +30,10 @@ description: auth.recoverPassword parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v45/methods/auth_requestPasswordRecovery.md b/old_docs/API_docs_v45/methods/auth_requestPasswordRecovery.md index 101b1cf7..c6babcd9 100644 --- a/old_docs/API_docs_v45/methods/auth_requestPasswordRecovery.md +++ b/old_docs/API_docs_v45/methods/auth_requestPasswordRecovery.md @@ -25,13 +25,10 @@ description: auth.requestPasswordRecovery parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v45/methods/auth_resetAuthorizations.md b/old_docs/API_docs_v45/methods/auth_resetAuthorizations.md index 87a39a22..fe297fa7 100644 --- a/old_docs/API_docs_v45/methods/auth_resetAuthorizations.md +++ b/old_docs/API_docs_v45/methods/auth_resetAuthorizations.md @@ -25,13 +25,10 @@ description: auth.resetAuthorizations parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v45/methods/auth_sendCall.md b/old_docs/API_docs_v45/methods/auth_sendCall.md index 00eaff4e..386cfad4 100644 --- a/old_docs/API_docs_v45/methods/auth_sendCall.md +++ b/old_docs/API_docs_v45/methods/auth_sendCall.md @@ -24,16 +24,13 @@ description: auth.sendCall parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v45/methods/auth_sendInvites.md b/old_docs/API_docs_v45/methods/auth_sendInvites.md index 604fc65d..ad9636c5 100644 --- a/old_docs/API_docs_v45/methods/auth_sendInvites.md +++ b/old_docs/API_docs_v45/methods/auth_sendInvites.md @@ -31,13 +31,10 @@ description: auth.sendInvites parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v45/methods/auth_sendSms.md b/old_docs/API_docs_v45/methods/auth_sendSms.md index 6d942e97..9a214e65 100644 --- a/old_docs/API_docs_v45/methods/auth_sendSms.md +++ b/old_docs/API_docs_v45/methods/auth_sendSms.md @@ -24,16 +24,13 @@ description: auth.sendSms parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v45/methods/channels_checkUsername.md b/old_docs/API_docs_v45/methods/channels_checkUsername.md index d6ea876d..e29ee107 100644 --- a/old_docs/API_docs_v45/methods/channels_checkUsername.md +++ b/old_docs/API_docs_v45/methods/channels_checkUsername.md @@ -33,13 +33,10 @@ description: channels.checkUsername parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v45/methods/channels_createChannel.md b/old_docs/API_docs_v45/methods/channels_createChannel.md index 9ba02e9e..58808b73 100644 --- a/old_docs/API_docs_v45/methods/channels_createChannel.md +++ b/old_docs/API_docs_v45/methods/channels_createChannel.md @@ -34,13 +34,10 @@ description: channels.createChannel parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v45/methods/channels_deleteChannel.md b/old_docs/API_docs_v45/methods/channels_deleteChannel.md index 912ab080..532f3c6c 100644 --- a/old_docs/API_docs_v45/methods/channels_deleteChannel.md +++ b/old_docs/API_docs_v45/methods/channels_deleteChannel.md @@ -31,13 +31,10 @@ description: channels.deleteChannel parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v45/methods/channels_deleteMessages.md b/old_docs/API_docs_v45/methods/channels_deleteMessages.md index b3481294..a42a47a5 100644 --- a/old_docs/API_docs_v45/methods/channels_deleteMessages.md +++ b/old_docs/API_docs_v45/methods/channels_deleteMessages.md @@ -33,16 +33,13 @@ description: channels.deleteMessages parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v45/methods/channels_deleteUserHistory.md b/old_docs/API_docs_v45/methods/channels_deleteUserHistory.md index 66843269..73494485 100644 --- a/old_docs/API_docs_v45/methods/channels_deleteUserHistory.md +++ b/old_docs/API_docs_v45/methods/channels_deleteUserHistory.md @@ -32,13 +32,10 @@ description: channels.deleteUserHistory parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v45/methods/channels_editAbout.md b/old_docs/API_docs_v45/methods/channels_editAbout.md index 4c759a8a..1c3ce933 100644 --- a/old_docs/API_docs_v45/methods/channels_editAbout.md +++ b/old_docs/API_docs_v45/methods/channels_editAbout.md @@ -34,16 +34,13 @@ description: channels.editAbout parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v45/methods/channels_editAdmin.md b/old_docs/API_docs_v45/methods/channels_editAdmin.md index 7707bdfe..42184227 100644 --- a/old_docs/API_docs_v45/methods/channels_editAdmin.md +++ b/old_docs/API_docs_v45/methods/channels_editAdmin.md @@ -41,16 +41,13 @@ description: channels.editAdmin parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v45/methods/channels_editPhoto.md b/old_docs/API_docs_v45/methods/channels_editPhoto.md index 99873537..4a4aeb03 100644 --- a/old_docs/API_docs_v45/methods/channels_editPhoto.md +++ b/old_docs/API_docs_v45/methods/channels_editPhoto.md @@ -33,16 +33,13 @@ description: channels.editPhoto parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v45/methods/channels_editTitle.md b/old_docs/API_docs_v45/methods/channels_editTitle.md index 04e8ce12..8a69d09b 100644 --- a/old_docs/API_docs_v45/methods/channels_editTitle.md +++ b/old_docs/API_docs_v45/methods/channels_editTitle.md @@ -33,16 +33,13 @@ description: channels.editTitle parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v45/methods/channels_exportInvite.md b/old_docs/API_docs_v45/methods/channels_exportInvite.md index 2ed80f6c..79dc6401 100644 --- a/old_docs/API_docs_v45/methods/channels_exportInvite.md +++ b/old_docs/API_docs_v45/methods/channels_exportInvite.md @@ -32,16 +32,13 @@ description: channels.exportInvite parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v45/methods/channels_getChannels.md b/old_docs/API_docs_v45/methods/channels_getChannels.md index 13304938..e80aa6a6 100644 --- a/old_docs/API_docs_v45/methods/channels_getChannels.md +++ b/old_docs/API_docs_v45/methods/channels_getChannels.md @@ -32,16 +32,13 @@ description: channels.getChannels parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v45/methods/channels_getDialogs.md b/old_docs/API_docs_v45/methods/channels_getDialogs.md index 854372f6..916f9b34 100644 --- a/old_docs/API_docs_v45/methods/channels_getDialogs.md +++ b/old_docs/API_docs_v45/methods/channels_getDialogs.md @@ -24,16 +24,13 @@ description: channels.getDialogs parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v45/methods/channels_getImportantHistory.md b/old_docs/API_docs_v45/methods/channels_getImportantHistory.md index 076315a3..a7c73057 100644 --- a/old_docs/API_docs_v45/methods/channels_getImportantHistory.md +++ b/old_docs/API_docs_v45/methods/channels_getImportantHistory.md @@ -28,16 +28,13 @@ description: channels.getImportantHistory parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v45/methods/channels_getMessages.md b/old_docs/API_docs_v45/methods/channels_getMessages.md index 5480dd86..dc392773 100644 --- a/old_docs/API_docs_v45/methods/channels_getMessages.md +++ b/old_docs/API_docs_v45/methods/channels_getMessages.md @@ -33,16 +33,13 @@ description: channels.getMessages parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v45/methods/channels_getParticipant.md b/old_docs/API_docs_v45/methods/channels_getParticipant.md index 8c7e3cbd..001bf115 100644 --- a/old_docs/API_docs_v45/methods/channels_getParticipant.md +++ b/old_docs/API_docs_v45/methods/channels_getParticipant.md @@ -35,16 +35,13 @@ description: channels.getParticipant parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v45/methods/channels_inviteToChannel.md b/old_docs/API_docs_v45/methods/channels_inviteToChannel.md index cf5480e0..2448fb84 100644 --- a/old_docs/API_docs_v45/methods/channels_inviteToChannel.md +++ b/old_docs/API_docs_v45/methods/channels_inviteToChannel.md @@ -46,13 +46,10 @@ description: channels.inviteToChannel parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v45/methods/channels_joinChannel.md b/old_docs/API_docs_v45/methods/channels_joinChannel.md index f31730a1..e746cf48 100644 --- a/old_docs/API_docs_v45/methods/channels_joinChannel.md +++ b/old_docs/API_docs_v45/methods/channels_joinChannel.md @@ -32,13 +32,10 @@ description: channels.joinChannel parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v45/methods/channels_kickFromChannel.md b/old_docs/API_docs_v45/methods/channels_kickFromChannel.md index c903caa4..c85833ce 100644 --- a/old_docs/API_docs_v45/methods/channels_kickFromChannel.md +++ b/old_docs/API_docs_v45/methods/channels_kickFromChannel.md @@ -25,16 +25,13 @@ description: channels.kickFromChannel parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v45/methods/channels_leaveChannel.md b/old_docs/API_docs_v45/methods/channels_leaveChannel.md index 12902f6d..ff244ded 100644 --- a/old_docs/API_docs_v45/methods/channels_leaveChannel.md +++ b/old_docs/API_docs_v45/methods/channels_leaveChannel.md @@ -34,16 +34,13 @@ description: channels.leaveChannel parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v45/methods/channels_readHistory.md b/old_docs/API_docs_v45/methods/channels_readHistory.md index be979101..6fc6ec0e 100644 --- a/old_docs/API_docs_v45/methods/channels_readHistory.md +++ b/old_docs/API_docs_v45/methods/channels_readHistory.md @@ -32,13 +32,10 @@ description: channels.readHistory parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v45/methods/channels_reportSpam.md b/old_docs/API_docs_v45/methods/channels_reportSpam.md index 22f34443..a37a5833 100644 --- a/old_docs/API_docs_v45/methods/channels_reportSpam.md +++ b/old_docs/API_docs_v45/methods/channels_reportSpam.md @@ -33,13 +33,10 @@ description: channels.reportSpam parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v45/methods/channels_toggleComments.md b/old_docs/API_docs_v45/methods/channels_toggleComments.md index 55da95b5..1b304615 100644 --- a/old_docs/API_docs_v45/methods/channels_toggleComments.md +++ b/old_docs/API_docs_v45/methods/channels_toggleComments.md @@ -24,16 +24,13 @@ description: channels.toggleComments parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v45/methods/channels_updateUsername.md b/old_docs/API_docs_v45/methods/channels_updateUsername.md index c2ede724..1f1f111e 100644 --- a/old_docs/API_docs_v45/methods/channels_updateUsername.md +++ b/old_docs/API_docs_v45/methods/channels_updateUsername.md @@ -35,13 +35,10 @@ description: channels.updateUsername parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v45/methods/contacts_block.md b/old_docs/API_docs_v45/methods/contacts_block.md index d9d58e37..1c7cbe26 100644 --- a/old_docs/API_docs_v45/methods/contacts_block.md +++ b/old_docs/API_docs_v45/methods/contacts_block.md @@ -30,13 +30,10 @@ description: contacts.block parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v45/methods/contacts_deleteContact.md b/old_docs/API_docs_v45/methods/contacts_deleteContact.md index cd8c17ad..987a1be0 100644 --- a/old_docs/API_docs_v45/methods/contacts_deleteContact.md +++ b/old_docs/API_docs_v45/methods/contacts_deleteContact.md @@ -30,13 +30,10 @@ description: contacts.deleteContact parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v45/methods/contacts_deleteContacts.md b/old_docs/API_docs_v45/methods/contacts_deleteContacts.md index fc65880d..67a922ed 100644 --- a/old_docs/API_docs_v45/methods/contacts_deleteContacts.md +++ b/old_docs/API_docs_v45/methods/contacts_deleteContacts.md @@ -31,13 +31,10 @@ description: contacts.deleteContacts parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v45/methods/contacts_exportCard.md b/old_docs/API_docs_v45/methods/contacts_exportCard.md index 63508076..bf6d1f9f 100644 --- a/old_docs/API_docs_v45/methods/contacts_exportCard.md +++ b/old_docs/API_docs_v45/methods/contacts_exportCard.md @@ -18,13 +18,10 @@ description: contacts.exportCard parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v45/methods/contacts_getBlocked.md b/old_docs/API_docs_v45/methods/contacts_getBlocked.md index f50792b4..faa719da 100644 --- a/old_docs/API_docs_v45/methods/contacts_getBlocked.md +++ b/old_docs/API_docs_v45/methods/contacts_getBlocked.md @@ -24,13 +24,10 @@ description: contacts.getBlocked parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v45/methods/contacts_getContacts.md b/old_docs/API_docs_v45/methods/contacts_getContacts.md index 71313bf2..a6779111 100644 --- a/old_docs/API_docs_v45/methods/contacts_getContacts.md +++ b/old_docs/API_docs_v45/methods/contacts_getContacts.md @@ -23,13 +23,10 @@ description: contacts.getContacts parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v45/methods/contacts_getStatuses.md b/old_docs/API_docs_v45/methods/contacts_getStatuses.md index d914e08d..9bb7f263 100644 --- a/old_docs/API_docs_v45/methods/contacts_getStatuses.md +++ b/old_docs/API_docs_v45/methods/contacts_getStatuses.md @@ -18,13 +18,10 @@ description: contacts.getStatuses parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v45/methods/contacts_getSuggested.md b/old_docs/API_docs_v45/methods/contacts_getSuggested.md index a29f4aff..2059c01b 100644 --- a/old_docs/API_docs_v45/methods/contacts_getSuggested.md +++ b/old_docs/API_docs_v45/methods/contacts_getSuggested.md @@ -23,16 +23,13 @@ description: contacts.getSuggested parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v45/methods/contacts_importCard.md b/old_docs/API_docs_v45/methods/contacts_importCard.md index a6abf56d..7a2f34e1 100644 --- a/old_docs/API_docs_v45/methods/contacts_importCard.md +++ b/old_docs/API_docs_v45/methods/contacts_importCard.md @@ -31,13 +31,10 @@ description: contacts.importCard parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v45/methods/contacts_importContacts.md b/old_docs/API_docs_v45/methods/contacts_importContacts.md index db2051ac..2f070493 100644 --- a/old_docs/API_docs_v45/methods/contacts_importContacts.md +++ b/old_docs/API_docs_v45/methods/contacts_importContacts.md @@ -24,13 +24,10 @@ description: contacts.importContacts parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v45/methods/contacts_search.md b/old_docs/API_docs_v45/methods/contacts_search.md index 0203b160..70a0635e 100644 --- a/old_docs/API_docs_v45/methods/contacts_search.md +++ b/old_docs/API_docs_v45/methods/contacts_search.md @@ -33,13 +33,10 @@ description: contacts.search parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v45/methods/contacts_unblock.md b/old_docs/API_docs_v45/methods/contacts_unblock.md index a1977c24..9c01e42a 100644 --- a/old_docs/API_docs_v45/methods/contacts_unblock.md +++ b/old_docs/API_docs_v45/methods/contacts_unblock.md @@ -30,13 +30,10 @@ description: contacts.unblock parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v45/methods/help_getAppChangelog.md b/old_docs/API_docs_v45/methods/help_getAppChangelog.md index 302809aa..b27cc9f0 100644 --- a/old_docs/API_docs_v45/methods/help_getAppChangelog.md +++ b/old_docs/API_docs_v45/methods/help_getAppChangelog.md @@ -26,13 +26,10 @@ description: help.getAppChangelog parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v45/methods/help_getAppUpdate.md b/old_docs/API_docs_v45/methods/help_getAppUpdate.md index c8e67402..7b3bdde9 100644 --- a/old_docs/API_docs_v45/methods/help_getAppUpdate.md +++ b/old_docs/API_docs_v45/methods/help_getAppUpdate.md @@ -26,13 +26,10 @@ description: help.getAppUpdate parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v45/methods/help_getConfig.md b/old_docs/API_docs_v45/methods/help_getConfig.md index e3648b5a..bb51b362 100644 --- a/old_docs/API_docs_v45/methods/help_getConfig.md +++ b/old_docs/API_docs_v45/methods/help_getConfig.md @@ -25,16 +25,13 @@ description: help.getConfig parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v45/methods/help_getInviteText.md b/old_docs/API_docs_v45/methods/help_getInviteText.md index 348de85d..40251dd5 100644 --- a/old_docs/API_docs_v45/methods/help_getInviteText.md +++ b/old_docs/API_docs_v45/methods/help_getInviteText.md @@ -23,13 +23,10 @@ description: help.getInviteText parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v45/methods/help_getNearestDc.md b/old_docs/API_docs_v45/methods/help_getNearestDc.md index c6f5c555..6d8ed3f7 100644 --- a/old_docs/API_docs_v45/methods/help_getNearestDc.md +++ b/old_docs/API_docs_v45/methods/help_getNearestDc.md @@ -18,13 +18,10 @@ description: help.getNearestDc parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v45/methods/help_getSupport.md b/old_docs/API_docs_v45/methods/help_getSupport.md index 209edf03..ca8db03c 100644 --- a/old_docs/API_docs_v45/methods/help_getSupport.md +++ b/old_docs/API_docs_v45/methods/help_getSupport.md @@ -18,13 +18,10 @@ description: help.getSupport parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v45/methods/help_getTermsOfService.md b/old_docs/API_docs_v45/methods/help_getTermsOfService.md index eb0ce476..1e8899a2 100644 --- a/old_docs/API_docs_v45/methods/help_getTermsOfService.md +++ b/old_docs/API_docs_v45/methods/help_getTermsOfService.md @@ -23,13 +23,10 @@ description: help.getTermsOfService parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v45/methods/help_saveAppLog.md b/old_docs/API_docs_v45/methods/help_saveAppLog.md index 4f06434c..741b9aa1 100644 --- a/old_docs/API_docs_v45/methods/help_saveAppLog.md +++ b/old_docs/API_docs_v45/methods/help_saveAppLog.md @@ -23,13 +23,10 @@ description: help.saveAppLog parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v45/methods/initConnection.md b/old_docs/API_docs_v45/methods/initConnection.md index 0d22a1cb..c0307677 100644 --- a/old_docs/API_docs_v45/methods/initConnection.md +++ b/old_docs/API_docs_v45/methods/initConnection.md @@ -36,16 +36,13 @@ description: initConnection parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v45/methods/invokeAfterMsg.md b/old_docs/API_docs_v45/methods/invokeAfterMsg.md index c139fe8c..a382429e 100644 --- a/old_docs/API_docs_v45/methods/invokeAfterMsg.md +++ b/old_docs/API_docs_v45/methods/invokeAfterMsg.md @@ -24,16 +24,13 @@ description: invokeAfterMsg parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v45/methods/invokeAfterMsgs.md b/old_docs/API_docs_v45/methods/invokeAfterMsgs.md index 35004296..169eedaf 100644 --- a/old_docs/API_docs_v45/methods/invokeAfterMsgs.md +++ b/old_docs/API_docs_v45/methods/invokeAfterMsgs.md @@ -24,16 +24,13 @@ description: invokeAfterMsgs parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v45/methods/invokeWithLayer.md b/old_docs/API_docs_v45/methods/invokeWithLayer.md index 706036c4..d9a2c74c 100644 --- a/old_docs/API_docs_v45/methods/invokeWithLayer.md +++ b/old_docs/API_docs_v45/methods/invokeWithLayer.md @@ -41,16 +41,13 @@ description: invokeWithLayer parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v45/methods/invokeWithoutUpdates.md b/old_docs/API_docs_v45/methods/invokeWithoutUpdates.md index 10c6bfcf..f7d01765 100644 --- a/old_docs/API_docs_v45/methods/invokeWithoutUpdates.md +++ b/old_docs/API_docs_v45/methods/invokeWithoutUpdates.md @@ -23,16 +23,13 @@ description: invokeWithoutUpdates parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v45/methods/messages_addChatUser.md b/old_docs/API_docs_v45/methods/messages_addChatUser.md index 00da5a61..b9e6243d 100644 --- a/old_docs/API_docs_v45/methods/messages_addChatUser.md +++ b/old_docs/API_docs_v45/methods/messages_addChatUser.md @@ -40,13 +40,10 @@ description: messages.addChatUser parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v45/methods/messages_checkChatInvite.md b/old_docs/API_docs_v45/methods/messages_checkChatInvite.md index c5eb1c06..c4489469 100644 --- a/old_docs/API_docs_v45/methods/messages_checkChatInvite.md +++ b/old_docs/API_docs_v45/methods/messages_checkChatInvite.md @@ -32,13 +32,10 @@ description: messages.checkChatInvite parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v45/methods/messages_createChat.md b/old_docs/API_docs_v45/methods/messages_createChat.md index c643a022..c6c8f420 100644 --- a/old_docs/API_docs_v45/methods/messages_createChat.md +++ b/old_docs/API_docs_v45/methods/messages_createChat.md @@ -32,13 +32,10 @@ description: messages.createChat parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v45/methods/messages_deleteChatUser.md b/old_docs/API_docs_v45/methods/messages_deleteChatUser.md index 3d75d9cf..4b8c2aa5 100644 --- a/old_docs/API_docs_v45/methods/messages_deleteChatUser.md +++ b/old_docs/API_docs_v45/methods/messages_deleteChatUser.md @@ -33,16 +33,13 @@ description: messages.deleteChatUser parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v45/methods/messages_deleteHistory.md b/old_docs/API_docs_v45/methods/messages_deleteHistory.md index c8081e79..6ae145d8 100644 --- a/old_docs/API_docs_v45/methods/messages_deleteHistory.md +++ b/old_docs/API_docs_v45/methods/messages_deleteHistory.md @@ -31,13 +31,10 @@ description: messages.deleteHistory parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v45/methods/messages_deleteMessages.md b/old_docs/API_docs_v45/methods/messages_deleteMessages.md index 65dbbc4a..38b3ca09 100644 --- a/old_docs/API_docs_v45/methods/messages_deleteMessages.md +++ b/old_docs/API_docs_v45/methods/messages_deleteMessages.md @@ -30,16 +30,13 @@ description: messages.deleteMessages parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v45/methods/messages_editChatAdmin.md b/old_docs/API_docs_v45/methods/messages_editChatAdmin.md index e64d9da5..1b3ffa9f 100644 --- a/old_docs/API_docs_v45/methods/messages_editChatAdmin.md +++ b/old_docs/API_docs_v45/methods/messages_editChatAdmin.md @@ -32,13 +32,10 @@ description: messages.editChatAdmin parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v45/methods/messages_editChatPhoto.md b/old_docs/API_docs_v45/methods/messages_editChatPhoto.md index d225962d..8c5d9d47 100644 --- a/old_docs/API_docs_v45/methods/messages_editChatPhoto.md +++ b/old_docs/API_docs_v45/methods/messages_editChatPhoto.md @@ -35,16 +35,13 @@ description: messages.editChatPhoto parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v45/methods/messages_editChatTitle.md b/old_docs/API_docs_v45/methods/messages_editChatTitle.md index 5cb1c6d7..238c6d72 100644 --- a/old_docs/API_docs_v45/methods/messages_editChatTitle.md +++ b/old_docs/API_docs_v45/methods/messages_editChatTitle.md @@ -32,16 +32,13 @@ description: messages.editChatTitle parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v45/methods/messages_exportChatInvite.md b/old_docs/API_docs_v45/methods/messages_exportChatInvite.md index 4a6e28ff..78f2ff86 100644 --- a/old_docs/API_docs_v45/methods/messages_exportChatInvite.md +++ b/old_docs/API_docs_v45/methods/messages_exportChatInvite.md @@ -30,13 +30,10 @@ description: messages.exportChatInvite parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v45/methods/messages_forwardMessage.md b/old_docs/API_docs_v45/methods/messages_forwardMessage.md index 4e2362db..fbdbc955 100644 --- a/old_docs/API_docs_v45/methods/messages_forwardMessage.md +++ b/old_docs/API_docs_v45/methods/messages_forwardMessage.md @@ -34,16 +34,13 @@ description: messages.forwardMessage parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v45/methods/messages_forwardMessages.md b/old_docs/API_docs_v45/methods/messages_forwardMessages.md index 2ea31ccf..6e5dee90 100644 --- a/old_docs/API_docs_v45/methods/messages_forwardMessages.md +++ b/old_docs/API_docs_v45/methods/messages_forwardMessages.md @@ -54,16 +54,13 @@ description: messages.forwardMessages parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v45/methods/messages_getAllStickers.md b/old_docs/API_docs_v45/methods/messages_getAllStickers.md index dc9e2432..034438a5 100644 --- a/old_docs/API_docs_v45/methods/messages_getAllStickers.md +++ b/old_docs/API_docs_v45/methods/messages_getAllStickers.md @@ -23,13 +23,10 @@ description: messages.getAllStickers parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v45/methods/messages_getChats.md b/old_docs/API_docs_v45/methods/messages_getChats.md index 6fa30cbd..c322613d 100644 --- a/old_docs/API_docs_v45/methods/messages_getChats.md +++ b/old_docs/API_docs_v45/methods/messages_getChats.md @@ -31,16 +31,13 @@ description: messages.getChats parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v45/methods/messages_getDhConfig.md b/old_docs/API_docs_v45/methods/messages_getDhConfig.md index aac3354d..f97684d2 100644 --- a/old_docs/API_docs_v45/methods/messages_getDhConfig.md +++ b/old_docs/API_docs_v45/methods/messages_getDhConfig.md @@ -31,13 +31,10 @@ description: messages.getDhConfig parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v45/methods/messages_getDialogs.md b/old_docs/API_docs_v45/methods/messages_getDialogs.md index 4c278eae..4b86ed71 100644 --- a/old_docs/API_docs_v45/methods/messages_getDialogs.md +++ b/old_docs/API_docs_v45/methods/messages_getDialogs.md @@ -36,13 +36,10 @@ description: messages.getDialogs parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v45/methods/messages_getDocumentByHash.md b/old_docs/API_docs_v45/methods/messages_getDocumentByHash.md index dda54bdd..3902ac44 100644 --- a/old_docs/API_docs_v45/methods/messages_getDocumentByHash.md +++ b/old_docs/API_docs_v45/methods/messages_getDocumentByHash.md @@ -32,16 +32,13 @@ description: messages.getDocumentByHash parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v45/methods/messages_getHistory.md b/old_docs/API_docs_v45/methods/messages_getHistory.md index ba9ed92d..23955a96 100644 --- a/old_docs/API_docs_v45/methods/messages_getHistory.md +++ b/old_docs/API_docs_v45/methods/messages_getHistory.md @@ -40,13 +40,10 @@ description: messages.getHistory parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v45/methods/messages_getInlineBotResults.md b/old_docs/API_docs_v45/methods/messages_getInlineBotResults.md index fb592bcf..89a933f2 100644 --- a/old_docs/API_docs_v45/methods/messages_getInlineBotResults.md +++ b/old_docs/API_docs_v45/methods/messages_getInlineBotResults.md @@ -35,13 +35,10 @@ description: messages.getInlineBotResults parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v45/methods/messages_getMessages.md b/old_docs/API_docs_v45/methods/messages_getMessages.md index 5a970246..787c46dd 100644 --- a/old_docs/API_docs_v45/methods/messages_getMessages.md +++ b/old_docs/API_docs_v45/methods/messages_getMessages.md @@ -23,16 +23,13 @@ description: messages.getMessages parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v45/methods/messages_getMessagesViews.md b/old_docs/API_docs_v45/methods/messages_getMessagesViews.md index 263f3f95..de5692dc 100644 --- a/old_docs/API_docs_v45/methods/messages_getMessagesViews.md +++ b/old_docs/API_docs_v45/methods/messages_getMessagesViews.md @@ -34,13 +34,10 @@ description: messages.getMessagesViews parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v45/methods/messages_getSavedGifs.md b/old_docs/API_docs_v45/methods/messages_getSavedGifs.md index 7cce4ffe..4986d812 100644 --- a/old_docs/API_docs_v45/methods/messages_getSavedGifs.md +++ b/old_docs/API_docs_v45/methods/messages_getSavedGifs.md @@ -23,13 +23,10 @@ description: messages.getSavedGifs parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v45/methods/messages_getStickerSet.md b/old_docs/API_docs_v45/methods/messages_getStickerSet.md index 59f33916..b480e0fe 100644 --- a/old_docs/API_docs_v45/methods/messages_getStickerSet.md +++ b/old_docs/API_docs_v45/methods/messages_getStickerSet.md @@ -30,16 +30,13 @@ description: messages.getStickerSet parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v45/methods/messages_getStickers.md b/old_docs/API_docs_v45/methods/messages_getStickers.md index be61a120..1587cd01 100644 --- a/old_docs/API_docs_v45/methods/messages_getStickers.md +++ b/old_docs/API_docs_v45/methods/messages_getStickers.md @@ -24,16 +24,13 @@ description: messages.getStickers parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v45/methods/messages_getWebPagePreview.md b/old_docs/API_docs_v45/methods/messages_getWebPagePreview.md index a89600b1..d3908933 100644 --- a/old_docs/API_docs_v45/methods/messages_getWebPagePreview.md +++ b/old_docs/API_docs_v45/methods/messages_getWebPagePreview.md @@ -23,13 +23,10 @@ description: messages.getWebPagePreview parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v45/methods/messages_importChatInvite.md b/old_docs/API_docs_v45/methods/messages_importChatInvite.md index 9d77304d..9dcfa56d 100644 --- a/old_docs/API_docs_v45/methods/messages_importChatInvite.md +++ b/old_docs/API_docs_v45/methods/messages_importChatInvite.md @@ -36,13 +36,10 @@ description: messages.importChatInvite parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v45/methods/messages_installStickerSet.md b/old_docs/API_docs_v45/methods/messages_installStickerSet.md index 1969d008..cf1865a8 100644 --- a/old_docs/API_docs_v45/methods/messages_installStickerSet.md +++ b/old_docs/API_docs_v45/methods/messages_installStickerSet.md @@ -31,13 +31,10 @@ description: messages.installStickerSet parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v45/methods/messages_migrateChat.md b/old_docs/API_docs_v45/methods/messages_migrateChat.md index 22d2fbf0..a8274e70 100644 --- a/old_docs/API_docs_v45/methods/messages_migrateChat.md +++ b/old_docs/API_docs_v45/methods/messages_migrateChat.md @@ -32,13 +32,10 @@ description: messages.migrateChat parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v45/methods/messages_readEncryptedHistory.md b/old_docs/API_docs_v45/methods/messages_readEncryptedHistory.md index 766ee07d..f38f6b07 100644 --- a/old_docs/API_docs_v45/methods/messages_readEncryptedHistory.md +++ b/old_docs/API_docs_v45/methods/messages_readEncryptedHistory.md @@ -31,16 +31,13 @@ description: messages.readEncryptedHistory parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v45/methods/messages_readHistory.md b/old_docs/API_docs_v45/methods/messages_readHistory.md index 1aa7830a..fef62130 100644 --- a/old_docs/API_docs_v45/methods/messages_readHistory.md +++ b/old_docs/API_docs_v45/methods/messages_readHistory.md @@ -32,13 +32,10 @@ description: messages.readHistory parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v45/methods/messages_readMessageContents.md b/old_docs/API_docs_v45/methods/messages_readMessageContents.md index 4b1abda0..7a6055fc 100644 --- a/old_docs/API_docs_v45/methods/messages_readMessageContents.md +++ b/old_docs/API_docs_v45/methods/messages_readMessageContents.md @@ -23,13 +23,10 @@ description: messages.readMessageContents parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v45/methods/messages_receivedMessages.md b/old_docs/API_docs_v45/methods/messages_receivedMessages.md index 588ac5cf..e2cf3a2f 100644 --- a/old_docs/API_docs_v45/methods/messages_receivedMessages.md +++ b/old_docs/API_docs_v45/methods/messages_receivedMessages.md @@ -23,13 +23,10 @@ description: messages.receivedMessages parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v45/methods/messages_receivedQueue.md b/old_docs/API_docs_v45/methods/messages_receivedQueue.md index 3c7f1d4f..38f504b3 100644 --- a/old_docs/API_docs_v45/methods/messages_receivedQueue.md +++ b/old_docs/API_docs_v45/methods/messages_receivedQueue.md @@ -30,16 +30,13 @@ description: messages.receivedQueue parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v45/methods/messages_reorderStickerSets.md b/old_docs/API_docs_v45/methods/messages_reorderStickerSets.md index cb35605a..e09057e7 100644 --- a/old_docs/API_docs_v45/methods/messages_reorderStickerSets.md +++ b/old_docs/API_docs_v45/methods/messages_reorderStickerSets.md @@ -23,13 +23,10 @@ description: messages.reorderStickerSets parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v45/methods/messages_reportSpam.md b/old_docs/API_docs_v45/methods/messages_reportSpam.md index bfadb9ab..08c96d44 100644 --- a/old_docs/API_docs_v45/methods/messages_reportSpam.md +++ b/old_docs/API_docs_v45/methods/messages_reportSpam.md @@ -30,13 +30,10 @@ description: messages.reportSpam parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v45/methods/messages_saveGif.md b/old_docs/API_docs_v45/methods/messages_saveGif.md index 31e48632..d86d539a 100644 --- a/old_docs/API_docs_v45/methods/messages_saveGif.md +++ b/old_docs/API_docs_v45/methods/messages_saveGif.md @@ -31,13 +31,10 @@ description: messages.saveGif parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v45/methods/messages_search.md b/old_docs/API_docs_v45/methods/messages_search.md index 8ea63f65..87f282e3 100644 --- a/old_docs/API_docs_v45/methods/messages_search.md +++ b/old_docs/API_docs_v45/methods/messages_search.md @@ -44,13 +44,10 @@ description: messages.search parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v45/methods/messages_searchGifs.md b/old_docs/API_docs_v45/methods/messages_searchGifs.md index 3f4c4838..dd804c99 100644 --- a/old_docs/API_docs_v45/methods/messages_searchGifs.md +++ b/old_docs/API_docs_v45/methods/messages_searchGifs.md @@ -31,13 +31,10 @@ description: messages.searchGifs parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v45/methods/messages_searchGlobal.md b/old_docs/API_docs_v45/methods/messages_searchGlobal.md index 0553dd7a..4b45eed2 100644 --- a/old_docs/API_docs_v45/methods/messages_searchGlobal.md +++ b/old_docs/API_docs_v45/methods/messages_searchGlobal.md @@ -34,13 +34,10 @@ description: messages.searchGlobal parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v45/methods/messages_sendBroadcast.md b/old_docs/API_docs_v45/methods/messages_sendBroadcast.md index ac13d0bf..537166ab 100644 --- a/old_docs/API_docs_v45/methods/messages_sendBroadcast.md +++ b/old_docs/API_docs_v45/methods/messages_sendBroadcast.md @@ -25,16 +25,13 @@ description: messages.sendBroadcast parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v45/methods/messages_sendEncrypted.md b/old_docs/API_docs_v45/methods/messages_sendEncrypted.md index 82eeec92..ba9f796b 100644 --- a/old_docs/API_docs_v45/methods/messages_sendEncrypted.md +++ b/old_docs/API_docs_v45/methods/messages_sendEncrypted.md @@ -34,16 +34,13 @@ description: messages.sendEncrypted parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v45/methods/messages_sendEncryptedFile.md b/old_docs/API_docs_v45/methods/messages_sendEncryptedFile.md index 8f7a73d9..db16bf2d 100644 --- a/old_docs/API_docs_v45/methods/messages_sendEncryptedFile.md +++ b/old_docs/API_docs_v45/methods/messages_sendEncryptedFile.md @@ -32,16 +32,13 @@ description: messages.sendEncryptedFile parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v45/methods/messages_sendEncryptedService.md b/old_docs/API_docs_v45/methods/messages_sendEncryptedService.md index d427f6c3..fd4e2627 100644 --- a/old_docs/API_docs_v45/methods/messages_sendEncryptedService.md +++ b/old_docs/API_docs_v45/methods/messages_sendEncryptedService.md @@ -34,16 +34,13 @@ description: messages.sendEncryptedService parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v45/methods/messages_sendInlineBotResult.md b/old_docs/API_docs_v45/methods/messages_sendInlineBotResult.md index c4f8601f..b33c7860 100644 --- a/old_docs/API_docs_v45/methods/messages_sendInlineBotResult.md +++ b/old_docs/API_docs_v45/methods/messages_sendInlineBotResult.md @@ -37,13 +37,10 @@ description: messages.sendInlineBotResult parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v45/methods/messages_sendMedia.md b/old_docs/API_docs_v45/methods/messages_sendMedia.md index 4b924e7e..2bc63256 100644 --- a/old_docs/API_docs_v45/methods/messages_sendMedia.md +++ b/old_docs/API_docs_v45/methods/messages_sendMedia.md @@ -57,16 +57,13 @@ description: messages.sendMedia parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v45/methods/messages_sendMessage.md b/old_docs/API_docs_v45/methods/messages_sendMessage.md index 723c2f65..1a735df3 100644 --- a/old_docs/API_docs_v45/methods/messages_sendMessage.md +++ b/old_docs/API_docs_v45/methods/messages_sendMessage.md @@ -56,16 +56,13 @@ description: messages.sendMessage parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v45/methods/messages_setEncryptedTyping.md b/old_docs/API_docs_v45/methods/messages_setEncryptedTyping.md index a05b94dd..aeae6ff7 100644 --- a/old_docs/API_docs_v45/methods/messages_setEncryptedTyping.md +++ b/old_docs/API_docs_v45/methods/messages_setEncryptedTyping.md @@ -31,13 +31,10 @@ description: messages.setEncryptedTyping parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v45/methods/messages_setInlineBotResults.md b/old_docs/API_docs_v45/methods/messages_setInlineBotResults.md index e347494b..94fa85b8 100644 --- a/old_docs/API_docs_v45/methods/messages_setInlineBotResults.md +++ b/old_docs/API_docs_v45/methods/messages_setInlineBotResults.md @@ -45,16 +45,13 @@ description: messages.setInlineBotResults parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v45/methods/messages_setTyping.md b/old_docs/API_docs_v45/methods/messages_setTyping.md index 9ef8caf5..f6b7b7b5 100644 --- a/old_docs/API_docs_v45/methods/messages_setTyping.md +++ b/old_docs/API_docs_v45/methods/messages_setTyping.md @@ -37,16 +37,13 @@ description: messages.setTyping parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v45/methods/messages_startBot.md b/old_docs/API_docs_v45/methods/messages_startBot.md index 8d98e390..b33ab013 100644 --- a/old_docs/API_docs_v45/methods/messages_startBot.md +++ b/old_docs/API_docs_v45/methods/messages_startBot.md @@ -35,13 +35,10 @@ description: messages.startBot parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v45/methods/messages_toggleChatAdmins.md b/old_docs/API_docs_v45/methods/messages_toggleChatAdmins.md index 3bf8a419..97328065 100644 --- a/old_docs/API_docs_v45/methods/messages_toggleChatAdmins.md +++ b/old_docs/API_docs_v45/methods/messages_toggleChatAdmins.md @@ -32,13 +32,10 @@ description: messages.toggleChatAdmins parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v45/methods/messages_uninstallStickerSet.md b/old_docs/API_docs_v45/methods/messages_uninstallStickerSet.md index 6763e64f..76a3e3e2 100644 --- a/old_docs/API_docs_v45/methods/messages_uninstallStickerSet.md +++ b/old_docs/API_docs_v45/methods/messages_uninstallStickerSet.md @@ -30,13 +30,10 @@ description: messages.uninstallStickerSet parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v45/methods/photos_deletePhotos.md b/old_docs/API_docs_v45/methods/photos_deletePhotos.md index e9cd459d..61768b1e 100644 --- a/old_docs/API_docs_v45/methods/photos_deletePhotos.md +++ b/old_docs/API_docs_v45/methods/photos_deletePhotos.md @@ -23,13 +23,10 @@ description: photos.deletePhotos parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v45/methods/photos_getUserPhotos.md b/old_docs/API_docs_v45/methods/photos_getUserPhotos.md index d6c2a380..095363e7 100644 --- a/old_docs/API_docs_v45/methods/photos_getUserPhotos.md +++ b/old_docs/API_docs_v45/methods/photos_getUserPhotos.md @@ -34,16 +34,13 @@ description: photos.getUserPhotos parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v45/methods/photos_updateProfilePhoto.md b/old_docs/API_docs_v45/methods/photos_updateProfilePhoto.md index abb031d4..add6028f 100644 --- a/old_docs/API_docs_v45/methods/photos_updateProfilePhoto.md +++ b/old_docs/API_docs_v45/methods/photos_updateProfilePhoto.md @@ -24,13 +24,10 @@ description: photos.updateProfilePhoto parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v45/methods/photos_uploadProfilePhoto.md b/old_docs/API_docs_v45/methods/photos_uploadProfilePhoto.md index ae20fdfc..048a1d32 100644 --- a/old_docs/API_docs_v45/methods/photos_uploadProfilePhoto.md +++ b/old_docs/API_docs_v45/methods/photos_uploadProfilePhoto.md @@ -37,13 +37,10 @@ description: photos.uploadProfilePhoto parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v45/methods/users_getUsers.md b/old_docs/API_docs_v45/methods/users_getUsers.md index 6a44d258..3a981d57 100644 --- a/old_docs/API_docs_v45/methods/users_getUsers.md +++ b/old_docs/API_docs_v45/methods/users_getUsers.md @@ -33,16 +33,13 @@ description: users.getUsers parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v46/methods/account_changePhone.md b/old_docs/API_docs_v46/methods/account_changePhone.md index 5d1801d0..e47ef6a7 100644 --- a/old_docs/API_docs_v46/methods/account_changePhone.md +++ b/old_docs/API_docs_v46/methods/account_changePhone.md @@ -32,13 +32,10 @@ description: account.changePhone parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v46/methods/account_checkUsername.md b/old_docs/API_docs_v46/methods/account_checkUsername.md index afc59b6c..40cf822f 100644 --- a/old_docs/API_docs_v46/methods/account_checkUsername.md +++ b/old_docs/API_docs_v46/methods/account_checkUsername.md @@ -30,13 +30,10 @@ description: account.checkUsername parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v46/methods/account_deleteAccount.md b/old_docs/API_docs_v46/methods/account_deleteAccount.md index 5abcd0ec..6f1bbda9 100644 --- a/old_docs/API_docs_v46/methods/account_deleteAccount.md +++ b/old_docs/API_docs_v46/methods/account_deleteAccount.md @@ -23,13 +23,10 @@ description: account.deleteAccount parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v46/methods/account_getAccountTTL.md b/old_docs/API_docs_v46/methods/account_getAccountTTL.md index 3520fbef..538b1d7a 100644 --- a/old_docs/API_docs_v46/methods/account_getAccountTTL.md +++ b/old_docs/API_docs_v46/methods/account_getAccountTTL.md @@ -18,13 +18,10 @@ description: account.getAccountTTL parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v46/methods/account_getAuthorizations.md b/old_docs/API_docs_v46/methods/account_getAuthorizations.md index 91bbce5e..f138d517 100644 --- a/old_docs/API_docs_v46/methods/account_getAuthorizations.md +++ b/old_docs/API_docs_v46/methods/account_getAuthorizations.md @@ -18,13 +18,10 @@ description: account.getAuthorizations parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v46/methods/account_getNotifySettings.md b/old_docs/API_docs_v46/methods/account_getNotifySettings.md index 8ee710d8..a48eed2f 100644 --- a/old_docs/API_docs_v46/methods/account_getNotifySettings.md +++ b/old_docs/API_docs_v46/methods/account_getNotifySettings.md @@ -30,13 +30,10 @@ description: account.getNotifySettings parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v46/methods/account_getPassword.md b/old_docs/API_docs_v46/methods/account_getPassword.md index 4d9fd015..1abf6174 100644 --- a/old_docs/API_docs_v46/methods/account_getPassword.md +++ b/old_docs/API_docs_v46/methods/account_getPassword.md @@ -18,13 +18,10 @@ description: account.getPassword parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v46/methods/account_getPasswordSettings.md b/old_docs/API_docs_v46/methods/account_getPasswordSettings.md index 02cb77f7..aec5b989 100644 --- a/old_docs/API_docs_v46/methods/account_getPasswordSettings.md +++ b/old_docs/API_docs_v46/methods/account_getPasswordSettings.md @@ -30,13 +30,10 @@ description: account.getPasswordSettings parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v46/methods/account_getPrivacy.md b/old_docs/API_docs_v46/methods/account_getPrivacy.md index 52786b79..8bbe9795 100644 --- a/old_docs/API_docs_v46/methods/account_getPrivacy.md +++ b/old_docs/API_docs_v46/methods/account_getPrivacy.md @@ -30,13 +30,10 @@ description: account.getPrivacy parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v46/methods/account_getWallPapers.md b/old_docs/API_docs_v46/methods/account_getWallPapers.md index 88c8a701..a71543d0 100644 --- a/old_docs/API_docs_v46/methods/account_getWallPapers.md +++ b/old_docs/API_docs_v46/methods/account_getWallPapers.md @@ -18,13 +18,10 @@ description: account.getWallPapers parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v46/methods/account_registerDevice.md b/old_docs/API_docs_v46/methods/account_registerDevice.md index ab7ec933..cfa1546c 100644 --- a/old_docs/API_docs_v46/methods/account_registerDevice.md +++ b/old_docs/API_docs_v46/methods/account_registerDevice.md @@ -36,13 +36,10 @@ description: account.registerDevice parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v46/methods/account_reportPeer.md b/old_docs/API_docs_v46/methods/account_reportPeer.md index 1545c3b8..1ae9f4d4 100644 --- a/old_docs/API_docs_v46/methods/account_reportPeer.md +++ b/old_docs/API_docs_v46/methods/account_reportPeer.md @@ -31,13 +31,10 @@ description: account.reportPeer parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v46/methods/account_resetAuthorization.md b/old_docs/API_docs_v46/methods/account_resetAuthorization.md index e44334f2..0438cba3 100644 --- a/old_docs/API_docs_v46/methods/account_resetAuthorization.md +++ b/old_docs/API_docs_v46/methods/account_resetAuthorization.md @@ -30,13 +30,10 @@ description: account.resetAuthorization parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v46/methods/account_resetNotifySettings.md b/old_docs/API_docs_v46/methods/account_resetNotifySettings.md index 155ede68..92db4f4f 100644 --- a/old_docs/API_docs_v46/methods/account_resetNotifySettings.md +++ b/old_docs/API_docs_v46/methods/account_resetNotifySettings.md @@ -18,13 +18,10 @@ description: account.resetNotifySettings parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v46/methods/account_sendChangePhoneCode.md b/old_docs/API_docs_v46/methods/account_sendChangePhoneCode.md index 650dba72..ad611a8b 100644 --- a/old_docs/API_docs_v46/methods/account_sendChangePhoneCode.md +++ b/old_docs/API_docs_v46/methods/account_sendChangePhoneCode.md @@ -30,13 +30,10 @@ description: account.sendChangePhoneCode parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v46/methods/account_setAccountTTL.md b/old_docs/API_docs_v46/methods/account_setAccountTTL.md index f06eb676..d08f59fb 100644 --- a/old_docs/API_docs_v46/methods/account_setAccountTTL.md +++ b/old_docs/API_docs_v46/methods/account_setAccountTTL.md @@ -30,13 +30,10 @@ description: account.setAccountTTL parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v46/methods/account_setPrivacy.md b/old_docs/API_docs_v46/methods/account_setPrivacy.md index 56aebbcc..401aa71c 100644 --- a/old_docs/API_docs_v46/methods/account_setPrivacy.md +++ b/old_docs/API_docs_v46/methods/account_setPrivacy.md @@ -31,13 +31,10 @@ description: account.setPrivacy parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v46/methods/account_unregisterDevice.md b/old_docs/API_docs_v46/methods/account_unregisterDevice.md index 41899b6e..283ec7d2 100644 --- a/old_docs/API_docs_v46/methods/account_unregisterDevice.md +++ b/old_docs/API_docs_v46/methods/account_unregisterDevice.md @@ -31,13 +31,10 @@ description: account.unregisterDevice parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v46/methods/account_updateDeviceLocked.md b/old_docs/API_docs_v46/methods/account_updateDeviceLocked.md index 37aeb59d..ae6125a5 100644 --- a/old_docs/API_docs_v46/methods/account_updateDeviceLocked.md +++ b/old_docs/API_docs_v46/methods/account_updateDeviceLocked.md @@ -23,13 +23,10 @@ description: account.updateDeviceLocked parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v46/methods/account_updateNotifySettings.md b/old_docs/API_docs_v46/methods/account_updateNotifySettings.md index 8389b5c2..fb096250 100644 --- a/old_docs/API_docs_v46/methods/account_updateNotifySettings.md +++ b/old_docs/API_docs_v46/methods/account_updateNotifySettings.md @@ -31,13 +31,10 @@ description: account.updateNotifySettings parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v46/methods/account_updatePasswordSettings.md b/old_docs/API_docs_v46/methods/account_updatePasswordSettings.md index b7c8da4b..ffa8dcd9 100644 --- a/old_docs/API_docs_v46/methods/account_updatePasswordSettings.md +++ b/old_docs/API_docs_v46/methods/account_updatePasswordSettings.md @@ -34,13 +34,10 @@ description: account.updatePasswordSettings parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v46/methods/account_updateProfile.md b/old_docs/API_docs_v46/methods/account_updateProfile.md index c8712074..123ed13a 100644 --- a/old_docs/API_docs_v46/methods/account_updateProfile.md +++ b/old_docs/API_docs_v46/methods/account_updateProfile.md @@ -32,13 +32,10 @@ description: account.updateProfile parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v46/methods/account_updateStatus.md b/old_docs/API_docs_v46/methods/account_updateStatus.md index 7204e582..c8fa0a79 100644 --- a/old_docs/API_docs_v46/methods/account_updateStatus.md +++ b/old_docs/API_docs_v46/methods/account_updateStatus.md @@ -30,13 +30,10 @@ description: account.updateStatus parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v46/methods/account_updateUsername.md b/old_docs/API_docs_v46/methods/account_updateUsername.md index 22be2fd4..2b7576a5 100644 --- a/old_docs/API_docs_v46/methods/account_updateUsername.md +++ b/old_docs/API_docs_v46/methods/account_updateUsername.md @@ -32,13 +32,10 @@ description: account.updateUsername parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v46/methods/auth_bindTempAuthKey.md b/old_docs/API_docs_v46/methods/auth_bindTempAuthKey.md index e3d72dd5..7419abb0 100644 --- a/old_docs/API_docs_v46/methods/auth_bindTempAuthKey.md +++ b/old_docs/API_docs_v46/methods/auth_bindTempAuthKey.md @@ -35,16 +35,13 @@ description: auth.bindTempAuthKey parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v46/methods/auth_checkPassword.md b/old_docs/API_docs_v46/methods/auth_checkPassword.md index d5559186..6b6b21cc 100644 --- a/old_docs/API_docs_v46/methods/auth_checkPassword.md +++ b/old_docs/API_docs_v46/methods/auth_checkPassword.md @@ -30,13 +30,10 @@ description: auth.checkPassword parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v46/methods/auth_checkPhone.md b/old_docs/API_docs_v46/methods/auth_checkPhone.md index 3455904d..f6cac2e6 100644 --- a/old_docs/API_docs_v46/methods/auth_checkPhone.md +++ b/old_docs/API_docs_v46/methods/auth_checkPhone.md @@ -32,13 +32,10 @@ description: auth.checkPhone parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v46/methods/auth_exportAuthorization.md b/old_docs/API_docs_v46/methods/auth_exportAuthorization.md index 44c45b70..cbc8203b 100644 --- a/old_docs/API_docs_v46/methods/auth_exportAuthorization.md +++ b/old_docs/API_docs_v46/methods/auth_exportAuthorization.md @@ -30,16 +30,13 @@ description: auth.exportAuthorization parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v46/methods/auth_importAuthorization.md b/old_docs/API_docs_v46/methods/auth_importAuthorization.md index e0fd534f..22166510 100644 --- a/old_docs/API_docs_v46/methods/auth_importAuthorization.md +++ b/old_docs/API_docs_v46/methods/auth_importAuthorization.md @@ -32,16 +32,13 @@ description: auth.importAuthorization parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v46/methods/auth_recoverPassword.md b/old_docs/API_docs_v46/methods/auth_recoverPassword.md index c2ce3fed..931e99fd 100644 --- a/old_docs/API_docs_v46/methods/auth_recoverPassword.md +++ b/old_docs/API_docs_v46/methods/auth_recoverPassword.md @@ -30,13 +30,10 @@ description: auth.recoverPassword parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v46/methods/auth_requestPasswordRecovery.md b/old_docs/API_docs_v46/methods/auth_requestPasswordRecovery.md index 101b1cf7..c6babcd9 100644 --- a/old_docs/API_docs_v46/methods/auth_requestPasswordRecovery.md +++ b/old_docs/API_docs_v46/methods/auth_requestPasswordRecovery.md @@ -25,13 +25,10 @@ description: auth.requestPasswordRecovery parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v46/methods/auth_resetAuthorizations.md b/old_docs/API_docs_v46/methods/auth_resetAuthorizations.md index 87a39a22..fe297fa7 100644 --- a/old_docs/API_docs_v46/methods/auth_resetAuthorizations.md +++ b/old_docs/API_docs_v46/methods/auth_resetAuthorizations.md @@ -25,13 +25,10 @@ description: auth.resetAuthorizations parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v46/methods/auth_sendCall.md b/old_docs/API_docs_v46/methods/auth_sendCall.md index 00eaff4e..386cfad4 100644 --- a/old_docs/API_docs_v46/methods/auth_sendCall.md +++ b/old_docs/API_docs_v46/methods/auth_sendCall.md @@ -24,16 +24,13 @@ description: auth.sendCall parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v46/methods/auth_sendInvites.md b/old_docs/API_docs_v46/methods/auth_sendInvites.md index 604fc65d..ad9636c5 100644 --- a/old_docs/API_docs_v46/methods/auth_sendInvites.md +++ b/old_docs/API_docs_v46/methods/auth_sendInvites.md @@ -31,13 +31,10 @@ description: auth.sendInvites parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v46/methods/auth_sendSms.md b/old_docs/API_docs_v46/methods/auth_sendSms.md index 6d942e97..9a214e65 100644 --- a/old_docs/API_docs_v46/methods/auth_sendSms.md +++ b/old_docs/API_docs_v46/methods/auth_sendSms.md @@ -24,16 +24,13 @@ description: auth.sendSms parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v46/methods/channels_checkUsername.md b/old_docs/API_docs_v46/methods/channels_checkUsername.md index d6ea876d..e29ee107 100644 --- a/old_docs/API_docs_v46/methods/channels_checkUsername.md +++ b/old_docs/API_docs_v46/methods/channels_checkUsername.md @@ -33,13 +33,10 @@ description: channels.checkUsername parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v46/methods/channels_createChannel.md b/old_docs/API_docs_v46/methods/channels_createChannel.md index 9ba02e9e..58808b73 100644 --- a/old_docs/API_docs_v46/methods/channels_createChannel.md +++ b/old_docs/API_docs_v46/methods/channels_createChannel.md @@ -34,13 +34,10 @@ description: channels.createChannel parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v46/methods/channels_deleteChannel.md b/old_docs/API_docs_v46/methods/channels_deleteChannel.md index 912ab080..532f3c6c 100644 --- a/old_docs/API_docs_v46/methods/channels_deleteChannel.md +++ b/old_docs/API_docs_v46/methods/channels_deleteChannel.md @@ -31,13 +31,10 @@ description: channels.deleteChannel parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v46/methods/channels_deleteMessages.md b/old_docs/API_docs_v46/methods/channels_deleteMessages.md index b3481294..a42a47a5 100644 --- a/old_docs/API_docs_v46/methods/channels_deleteMessages.md +++ b/old_docs/API_docs_v46/methods/channels_deleteMessages.md @@ -33,16 +33,13 @@ description: channels.deleteMessages parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v46/methods/channels_deleteUserHistory.md b/old_docs/API_docs_v46/methods/channels_deleteUserHistory.md index 66843269..73494485 100644 --- a/old_docs/API_docs_v46/methods/channels_deleteUserHistory.md +++ b/old_docs/API_docs_v46/methods/channels_deleteUserHistory.md @@ -32,13 +32,10 @@ description: channels.deleteUserHistory parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v46/methods/channels_editAbout.md b/old_docs/API_docs_v46/methods/channels_editAbout.md index 4c759a8a..1c3ce933 100644 --- a/old_docs/API_docs_v46/methods/channels_editAbout.md +++ b/old_docs/API_docs_v46/methods/channels_editAbout.md @@ -34,16 +34,13 @@ description: channels.editAbout parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v46/methods/channels_editAdmin.md b/old_docs/API_docs_v46/methods/channels_editAdmin.md index 7707bdfe..42184227 100644 --- a/old_docs/API_docs_v46/methods/channels_editAdmin.md +++ b/old_docs/API_docs_v46/methods/channels_editAdmin.md @@ -41,16 +41,13 @@ description: channels.editAdmin parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v46/methods/channels_editPhoto.md b/old_docs/API_docs_v46/methods/channels_editPhoto.md index 99873537..4a4aeb03 100644 --- a/old_docs/API_docs_v46/methods/channels_editPhoto.md +++ b/old_docs/API_docs_v46/methods/channels_editPhoto.md @@ -33,16 +33,13 @@ description: channels.editPhoto parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v46/methods/channels_editTitle.md b/old_docs/API_docs_v46/methods/channels_editTitle.md index 04e8ce12..8a69d09b 100644 --- a/old_docs/API_docs_v46/methods/channels_editTitle.md +++ b/old_docs/API_docs_v46/methods/channels_editTitle.md @@ -33,16 +33,13 @@ description: channels.editTitle parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v46/methods/channels_exportInvite.md b/old_docs/API_docs_v46/methods/channels_exportInvite.md index 2ed80f6c..79dc6401 100644 --- a/old_docs/API_docs_v46/methods/channels_exportInvite.md +++ b/old_docs/API_docs_v46/methods/channels_exportInvite.md @@ -32,16 +32,13 @@ description: channels.exportInvite parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v46/methods/channels_getChannels.md b/old_docs/API_docs_v46/methods/channels_getChannels.md index 13304938..e80aa6a6 100644 --- a/old_docs/API_docs_v46/methods/channels_getChannels.md +++ b/old_docs/API_docs_v46/methods/channels_getChannels.md @@ -32,16 +32,13 @@ description: channels.getChannels parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v46/methods/channels_getDialogs.md b/old_docs/API_docs_v46/methods/channels_getDialogs.md index 854372f6..916f9b34 100644 --- a/old_docs/API_docs_v46/methods/channels_getDialogs.md +++ b/old_docs/API_docs_v46/methods/channels_getDialogs.md @@ -24,16 +24,13 @@ description: channels.getDialogs parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v46/methods/channels_getImportantHistory.md b/old_docs/API_docs_v46/methods/channels_getImportantHistory.md index 076315a3..a7c73057 100644 --- a/old_docs/API_docs_v46/methods/channels_getImportantHistory.md +++ b/old_docs/API_docs_v46/methods/channels_getImportantHistory.md @@ -28,16 +28,13 @@ description: channels.getImportantHistory parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v46/methods/channels_getMessages.md b/old_docs/API_docs_v46/methods/channels_getMessages.md index 5480dd86..dc392773 100644 --- a/old_docs/API_docs_v46/methods/channels_getMessages.md +++ b/old_docs/API_docs_v46/methods/channels_getMessages.md @@ -33,16 +33,13 @@ description: channels.getMessages parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v46/methods/channels_getParticipant.md b/old_docs/API_docs_v46/methods/channels_getParticipant.md index 8c7e3cbd..001bf115 100644 --- a/old_docs/API_docs_v46/methods/channels_getParticipant.md +++ b/old_docs/API_docs_v46/methods/channels_getParticipant.md @@ -35,16 +35,13 @@ description: channels.getParticipant parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v46/methods/channels_inviteToChannel.md b/old_docs/API_docs_v46/methods/channels_inviteToChannel.md index cf5480e0..2448fb84 100644 --- a/old_docs/API_docs_v46/methods/channels_inviteToChannel.md +++ b/old_docs/API_docs_v46/methods/channels_inviteToChannel.md @@ -46,13 +46,10 @@ description: channels.inviteToChannel parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v46/methods/channels_joinChannel.md b/old_docs/API_docs_v46/methods/channels_joinChannel.md index f31730a1..e746cf48 100644 --- a/old_docs/API_docs_v46/methods/channels_joinChannel.md +++ b/old_docs/API_docs_v46/methods/channels_joinChannel.md @@ -32,13 +32,10 @@ description: channels.joinChannel parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v46/methods/channels_kickFromChannel.md b/old_docs/API_docs_v46/methods/channels_kickFromChannel.md index c903caa4..c85833ce 100644 --- a/old_docs/API_docs_v46/methods/channels_kickFromChannel.md +++ b/old_docs/API_docs_v46/methods/channels_kickFromChannel.md @@ -25,16 +25,13 @@ description: channels.kickFromChannel parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v46/methods/channels_leaveChannel.md b/old_docs/API_docs_v46/methods/channels_leaveChannel.md index 12902f6d..ff244ded 100644 --- a/old_docs/API_docs_v46/methods/channels_leaveChannel.md +++ b/old_docs/API_docs_v46/methods/channels_leaveChannel.md @@ -34,16 +34,13 @@ description: channels.leaveChannel parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v46/methods/channels_readHistory.md b/old_docs/API_docs_v46/methods/channels_readHistory.md index be979101..6fc6ec0e 100644 --- a/old_docs/API_docs_v46/methods/channels_readHistory.md +++ b/old_docs/API_docs_v46/methods/channels_readHistory.md @@ -32,13 +32,10 @@ description: channels.readHistory parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v46/methods/channels_reportSpam.md b/old_docs/API_docs_v46/methods/channels_reportSpam.md index 22f34443..a37a5833 100644 --- a/old_docs/API_docs_v46/methods/channels_reportSpam.md +++ b/old_docs/API_docs_v46/methods/channels_reportSpam.md @@ -33,13 +33,10 @@ description: channels.reportSpam parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v46/methods/channels_toggleComments.md b/old_docs/API_docs_v46/methods/channels_toggleComments.md index 55da95b5..1b304615 100644 --- a/old_docs/API_docs_v46/methods/channels_toggleComments.md +++ b/old_docs/API_docs_v46/methods/channels_toggleComments.md @@ -24,16 +24,13 @@ description: channels.toggleComments parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v46/methods/channels_updateUsername.md b/old_docs/API_docs_v46/methods/channels_updateUsername.md index c2ede724..1f1f111e 100644 --- a/old_docs/API_docs_v46/methods/channels_updateUsername.md +++ b/old_docs/API_docs_v46/methods/channels_updateUsername.md @@ -35,13 +35,10 @@ description: channels.updateUsername parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v46/methods/contacts_block.md b/old_docs/API_docs_v46/methods/contacts_block.md index d9d58e37..1c7cbe26 100644 --- a/old_docs/API_docs_v46/methods/contacts_block.md +++ b/old_docs/API_docs_v46/methods/contacts_block.md @@ -30,13 +30,10 @@ description: contacts.block parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v46/methods/contacts_deleteContact.md b/old_docs/API_docs_v46/methods/contacts_deleteContact.md index cd8c17ad..987a1be0 100644 --- a/old_docs/API_docs_v46/methods/contacts_deleteContact.md +++ b/old_docs/API_docs_v46/methods/contacts_deleteContact.md @@ -30,13 +30,10 @@ description: contacts.deleteContact parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v46/methods/contacts_deleteContacts.md b/old_docs/API_docs_v46/methods/contacts_deleteContacts.md index fc65880d..67a922ed 100644 --- a/old_docs/API_docs_v46/methods/contacts_deleteContacts.md +++ b/old_docs/API_docs_v46/methods/contacts_deleteContacts.md @@ -31,13 +31,10 @@ description: contacts.deleteContacts parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v46/methods/contacts_exportCard.md b/old_docs/API_docs_v46/methods/contacts_exportCard.md index 63508076..bf6d1f9f 100644 --- a/old_docs/API_docs_v46/methods/contacts_exportCard.md +++ b/old_docs/API_docs_v46/methods/contacts_exportCard.md @@ -18,13 +18,10 @@ description: contacts.exportCard parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v46/methods/contacts_getBlocked.md b/old_docs/API_docs_v46/methods/contacts_getBlocked.md index f50792b4..faa719da 100644 --- a/old_docs/API_docs_v46/methods/contacts_getBlocked.md +++ b/old_docs/API_docs_v46/methods/contacts_getBlocked.md @@ -24,13 +24,10 @@ description: contacts.getBlocked parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v46/methods/contacts_getContacts.md b/old_docs/API_docs_v46/methods/contacts_getContacts.md index 71313bf2..a6779111 100644 --- a/old_docs/API_docs_v46/methods/contacts_getContacts.md +++ b/old_docs/API_docs_v46/methods/contacts_getContacts.md @@ -23,13 +23,10 @@ description: contacts.getContacts parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v46/methods/contacts_getStatuses.md b/old_docs/API_docs_v46/methods/contacts_getStatuses.md index d914e08d..9bb7f263 100644 --- a/old_docs/API_docs_v46/methods/contacts_getStatuses.md +++ b/old_docs/API_docs_v46/methods/contacts_getStatuses.md @@ -18,13 +18,10 @@ description: contacts.getStatuses parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v46/methods/contacts_getSuggested.md b/old_docs/API_docs_v46/methods/contacts_getSuggested.md index a29f4aff..2059c01b 100644 --- a/old_docs/API_docs_v46/methods/contacts_getSuggested.md +++ b/old_docs/API_docs_v46/methods/contacts_getSuggested.md @@ -23,16 +23,13 @@ description: contacts.getSuggested parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v46/methods/contacts_importCard.md b/old_docs/API_docs_v46/methods/contacts_importCard.md index a6abf56d..7a2f34e1 100644 --- a/old_docs/API_docs_v46/methods/contacts_importCard.md +++ b/old_docs/API_docs_v46/methods/contacts_importCard.md @@ -31,13 +31,10 @@ description: contacts.importCard parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v46/methods/contacts_importContacts.md b/old_docs/API_docs_v46/methods/contacts_importContacts.md index db2051ac..2f070493 100644 --- a/old_docs/API_docs_v46/methods/contacts_importContacts.md +++ b/old_docs/API_docs_v46/methods/contacts_importContacts.md @@ -24,13 +24,10 @@ description: contacts.importContacts parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v46/methods/contacts_search.md b/old_docs/API_docs_v46/methods/contacts_search.md index 0203b160..70a0635e 100644 --- a/old_docs/API_docs_v46/methods/contacts_search.md +++ b/old_docs/API_docs_v46/methods/contacts_search.md @@ -33,13 +33,10 @@ description: contacts.search parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v46/methods/contacts_unblock.md b/old_docs/API_docs_v46/methods/contacts_unblock.md index a1977c24..9c01e42a 100644 --- a/old_docs/API_docs_v46/methods/contacts_unblock.md +++ b/old_docs/API_docs_v46/methods/contacts_unblock.md @@ -30,13 +30,10 @@ description: contacts.unblock parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v46/methods/help_getAppChangelog.md b/old_docs/API_docs_v46/methods/help_getAppChangelog.md index 302809aa..b27cc9f0 100644 --- a/old_docs/API_docs_v46/methods/help_getAppChangelog.md +++ b/old_docs/API_docs_v46/methods/help_getAppChangelog.md @@ -26,13 +26,10 @@ description: help.getAppChangelog parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v46/methods/help_getAppUpdate.md b/old_docs/API_docs_v46/methods/help_getAppUpdate.md index c8e67402..7b3bdde9 100644 --- a/old_docs/API_docs_v46/methods/help_getAppUpdate.md +++ b/old_docs/API_docs_v46/methods/help_getAppUpdate.md @@ -26,13 +26,10 @@ description: help.getAppUpdate parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v46/methods/help_getConfig.md b/old_docs/API_docs_v46/methods/help_getConfig.md index e3648b5a..bb51b362 100644 --- a/old_docs/API_docs_v46/methods/help_getConfig.md +++ b/old_docs/API_docs_v46/methods/help_getConfig.md @@ -25,16 +25,13 @@ description: help.getConfig parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v46/methods/help_getInviteText.md b/old_docs/API_docs_v46/methods/help_getInviteText.md index 348de85d..40251dd5 100644 --- a/old_docs/API_docs_v46/methods/help_getInviteText.md +++ b/old_docs/API_docs_v46/methods/help_getInviteText.md @@ -23,13 +23,10 @@ description: help.getInviteText parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v46/methods/help_getNearestDc.md b/old_docs/API_docs_v46/methods/help_getNearestDc.md index c6f5c555..6d8ed3f7 100644 --- a/old_docs/API_docs_v46/methods/help_getNearestDc.md +++ b/old_docs/API_docs_v46/methods/help_getNearestDc.md @@ -18,13 +18,10 @@ description: help.getNearestDc parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v46/methods/help_getSupport.md b/old_docs/API_docs_v46/methods/help_getSupport.md index 209edf03..ca8db03c 100644 --- a/old_docs/API_docs_v46/methods/help_getSupport.md +++ b/old_docs/API_docs_v46/methods/help_getSupport.md @@ -18,13 +18,10 @@ description: help.getSupport parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v46/methods/help_getTermsOfService.md b/old_docs/API_docs_v46/methods/help_getTermsOfService.md index eb0ce476..1e8899a2 100644 --- a/old_docs/API_docs_v46/methods/help_getTermsOfService.md +++ b/old_docs/API_docs_v46/methods/help_getTermsOfService.md @@ -23,13 +23,10 @@ description: help.getTermsOfService parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v46/methods/help_saveAppLog.md b/old_docs/API_docs_v46/methods/help_saveAppLog.md index 4f06434c..741b9aa1 100644 --- a/old_docs/API_docs_v46/methods/help_saveAppLog.md +++ b/old_docs/API_docs_v46/methods/help_saveAppLog.md @@ -23,13 +23,10 @@ description: help.saveAppLog parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v46/methods/initConnection.md b/old_docs/API_docs_v46/methods/initConnection.md index 0d22a1cb..c0307677 100644 --- a/old_docs/API_docs_v46/methods/initConnection.md +++ b/old_docs/API_docs_v46/methods/initConnection.md @@ -36,16 +36,13 @@ description: initConnection parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v46/methods/invokeAfterMsg.md b/old_docs/API_docs_v46/methods/invokeAfterMsg.md index c139fe8c..a382429e 100644 --- a/old_docs/API_docs_v46/methods/invokeAfterMsg.md +++ b/old_docs/API_docs_v46/methods/invokeAfterMsg.md @@ -24,16 +24,13 @@ description: invokeAfterMsg parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v46/methods/invokeAfterMsgs.md b/old_docs/API_docs_v46/methods/invokeAfterMsgs.md index 35004296..169eedaf 100644 --- a/old_docs/API_docs_v46/methods/invokeAfterMsgs.md +++ b/old_docs/API_docs_v46/methods/invokeAfterMsgs.md @@ -24,16 +24,13 @@ description: invokeAfterMsgs parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v46/methods/invokeWithLayer.md b/old_docs/API_docs_v46/methods/invokeWithLayer.md index 706036c4..d9a2c74c 100644 --- a/old_docs/API_docs_v46/methods/invokeWithLayer.md +++ b/old_docs/API_docs_v46/methods/invokeWithLayer.md @@ -41,16 +41,13 @@ description: invokeWithLayer parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v46/methods/invokeWithoutUpdates.md b/old_docs/API_docs_v46/methods/invokeWithoutUpdates.md index 10c6bfcf..f7d01765 100644 --- a/old_docs/API_docs_v46/methods/invokeWithoutUpdates.md +++ b/old_docs/API_docs_v46/methods/invokeWithoutUpdates.md @@ -23,16 +23,13 @@ description: invokeWithoutUpdates parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v46/methods/messages_addChatUser.md b/old_docs/API_docs_v46/methods/messages_addChatUser.md index 00da5a61..b9e6243d 100644 --- a/old_docs/API_docs_v46/methods/messages_addChatUser.md +++ b/old_docs/API_docs_v46/methods/messages_addChatUser.md @@ -40,13 +40,10 @@ description: messages.addChatUser parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v46/methods/messages_checkChatInvite.md b/old_docs/API_docs_v46/methods/messages_checkChatInvite.md index c5eb1c06..c4489469 100644 --- a/old_docs/API_docs_v46/methods/messages_checkChatInvite.md +++ b/old_docs/API_docs_v46/methods/messages_checkChatInvite.md @@ -32,13 +32,10 @@ description: messages.checkChatInvite parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v46/methods/messages_createChat.md b/old_docs/API_docs_v46/methods/messages_createChat.md index c643a022..c6c8f420 100644 --- a/old_docs/API_docs_v46/methods/messages_createChat.md +++ b/old_docs/API_docs_v46/methods/messages_createChat.md @@ -32,13 +32,10 @@ description: messages.createChat parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v46/methods/messages_deleteChatUser.md b/old_docs/API_docs_v46/methods/messages_deleteChatUser.md index 3d75d9cf..4b8c2aa5 100644 --- a/old_docs/API_docs_v46/methods/messages_deleteChatUser.md +++ b/old_docs/API_docs_v46/methods/messages_deleteChatUser.md @@ -33,16 +33,13 @@ description: messages.deleteChatUser parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v46/methods/messages_deleteHistory.md b/old_docs/API_docs_v46/methods/messages_deleteHistory.md index c8081e79..6ae145d8 100644 --- a/old_docs/API_docs_v46/methods/messages_deleteHistory.md +++ b/old_docs/API_docs_v46/methods/messages_deleteHistory.md @@ -31,13 +31,10 @@ description: messages.deleteHistory parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v46/methods/messages_deleteMessages.md b/old_docs/API_docs_v46/methods/messages_deleteMessages.md index 65dbbc4a..38b3ca09 100644 --- a/old_docs/API_docs_v46/methods/messages_deleteMessages.md +++ b/old_docs/API_docs_v46/methods/messages_deleteMessages.md @@ -30,16 +30,13 @@ description: messages.deleteMessages parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v46/methods/messages_editChatAdmin.md b/old_docs/API_docs_v46/methods/messages_editChatAdmin.md index e64d9da5..1b3ffa9f 100644 --- a/old_docs/API_docs_v46/methods/messages_editChatAdmin.md +++ b/old_docs/API_docs_v46/methods/messages_editChatAdmin.md @@ -32,13 +32,10 @@ description: messages.editChatAdmin parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v46/methods/messages_editChatPhoto.md b/old_docs/API_docs_v46/methods/messages_editChatPhoto.md index d225962d..8c5d9d47 100644 --- a/old_docs/API_docs_v46/methods/messages_editChatPhoto.md +++ b/old_docs/API_docs_v46/methods/messages_editChatPhoto.md @@ -35,16 +35,13 @@ description: messages.editChatPhoto parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v46/methods/messages_editChatTitle.md b/old_docs/API_docs_v46/methods/messages_editChatTitle.md index 5cb1c6d7..238c6d72 100644 --- a/old_docs/API_docs_v46/methods/messages_editChatTitle.md +++ b/old_docs/API_docs_v46/methods/messages_editChatTitle.md @@ -32,16 +32,13 @@ description: messages.editChatTitle parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v46/methods/messages_exportChatInvite.md b/old_docs/API_docs_v46/methods/messages_exportChatInvite.md index 4a6e28ff..78f2ff86 100644 --- a/old_docs/API_docs_v46/methods/messages_exportChatInvite.md +++ b/old_docs/API_docs_v46/methods/messages_exportChatInvite.md @@ -30,13 +30,10 @@ description: messages.exportChatInvite parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v46/methods/messages_forwardMessage.md b/old_docs/API_docs_v46/methods/messages_forwardMessage.md index 4e2362db..fbdbc955 100644 --- a/old_docs/API_docs_v46/methods/messages_forwardMessage.md +++ b/old_docs/API_docs_v46/methods/messages_forwardMessage.md @@ -34,16 +34,13 @@ description: messages.forwardMessage parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v46/methods/messages_forwardMessages.md b/old_docs/API_docs_v46/methods/messages_forwardMessages.md index 2ea31ccf..6e5dee90 100644 --- a/old_docs/API_docs_v46/methods/messages_forwardMessages.md +++ b/old_docs/API_docs_v46/methods/messages_forwardMessages.md @@ -54,16 +54,13 @@ description: messages.forwardMessages parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v46/methods/messages_getAllStickers.md b/old_docs/API_docs_v46/methods/messages_getAllStickers.md index dc9e2432..034438a5 100644 --- a/old_docs/API_docs_v46/methods/messages_getAllStickers.md +++ b/old_docs/API_docs_v46/methods/messages_getAllStickers.md @@ -23,13 +23,10 @@ description: messages.getAllStickers parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v46/methods/messages_getChats.md b/old_docs/API_docs_v46/methods/messages_getChats.md index 6fa30cbd..c322613d 100644 --- a/old_docs/API_docs_v46/methods/messages_getChats.md +++ b/old_docs/API_docs_v46/methods/messages_getChats.md @@ -31,16 +31,13 @@ description: messages.getChats parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v46/methods/messages_getDhConfig.md b/old_docs/API_docs_v46/methods/messages_getDhConfig.md index aac3354d..f97684d2 100644 --- a/old_docs/API_docs_v46/methods/messages_getDhConfig.md +++ b/old_docs/API_docs_v46/methods/messages_getDhConfig.md @@ -31,13 +31,10 @@ description: messages.getDhConfig parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v46/methods/messages_getDialogs.md b/old_docs/API_docs_v46/methods/messages_getDialogs.md index 4c278eae..4b86ed71 100644 --- a/old_docs/API_docs_v46/methods/messages_getDialogs.md +++ b/old_docs/API_docs_v46/methods/messages_getDialogs.md @@ -36,13 +36,10 @@ description: messages.getDialogs parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v46/methods/messages_getDocumentByHash.md b/old_docs/API_docs_v46/methods/messages_getDocumentByHash.md index dda54bdd..3902ac44 100644 --- a/old_docs/API_docs_v46/methods/messages_getDocumentByHash.md +++ b/old_docs/API_docs_v46/methods/messages_getDocumentByHash.md @@ -32,16 +32,13 @@ description: messages.getDocumentByHash parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v46/methods/messages_getHistory.md b/old_docs/API_docs_v46/methods/messages_getHistory.md index ba9ed92d..23955a96 100644 --- a/old_docs/API_docs_v46/methods/messages_getHistory.md +++ b/old_docs/API_docs_v46/methods/messages_getHistory.md @@ -40,13 +40,10 @@ description: messages.getHistory parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v46/methods/messages_getInlineBotResults.md b/old_docs/API_docs_v46/methods/messages_getInlineBotResults.md index fb592bcf..89a933f2 100644 --- a/old_docs/API_docs_v46/methods/messages_getInlineBotResults.md +++ b/old_docs/API_docs_v46/methods/messages_getInlineBotResults.md @@ -35,13 +35,10 @@ description: messages.getInlineBotResults parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v46/methods/messages_getMessages.md b/old_docs/API_docs_v46/methods/messages_getMessages.md index 5a970246..787c46dd 100644 --- a/old_docs/API_docs_v46/methods/messages_getMessages.md +++ b/old_docs/API_docs_v46/methods/messages_getMessages.md @@ -23,16 +23,13 @@ description: messages.getMessages parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v46/methods/messages_getMessagesViews.md b/old_docs/API_docs_v46/methods/messages_getMessagesViews.md index 263f3f95..de5692dc 100644 --- a/old_docs/API_docs_v46/methods/messages_getMessagesViews.md +++ b/old_docs/API_docs_v46/methods/messages_getMessagesViews.md @@ -34,13 +34,10 @@ description: messages.getMessagesViews parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v46/methods/messages_getSavedGifs.md b/old_docs/API_docs_v46/methods/messages_getSavedGifs.md index 7cce4ffe..4986d812 100644 --- a/old_docs/API_docs_v46/methods/messages_getSavedGifs.md +++ b/old_docs/API_docs_v46/methods/messages_getSavedGifs.md @@ -23,13 +23,10 @@ description: messages.getSavedGifs parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v46/methods/messages_getStickerSet.md b/old_docs/API_docs_v46/methods/messages_getStickerSet.md index 59f33916..b480e0fe 100644 --- a/old_docs/API_docs_v46/methods/messages_getStickerSet.md +++ b/old_docs/API_docs_v46/methods/messages_getStickerSet.md @@ -30,16 +30,13 @@ description: messages.getStickerSet parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v46/methods/messages_getStickers.md b/old_docs/API_docs_v46/methods/messages_getStickers.md index be61a120..1587cd01 100644 --- a/old_docs/API_docs_v46/methods/messages_getStickers.md +++ b/old_docs/API_docs_v46/methods/messages_getStickers.md @@ -24,16 +24,13 @@ description: messages.getStickers parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v46/methods/messages_getWebPagePreview.md b/old_docs/API_docs_v46/methods/messages_getWebPagePreview.md index a89600b1..d3908933 100644 --- a/old_docs/API_docs_v46/methods/messages_getWebPagePreview.md +++ b/old_docs/API_docs_v46/methods/messages_getWebPagePreview.md @@ -23,13 +23,10 @@ description: messages.getWebPagePreview parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v46/methods/messages_importChatInvite.md b/old_docs/API_docs_v46/methods/messages_importChatInvite.md index 9d77304d..9dcfa56d 100644 --- a/old_docs/API_docs_v46/methods/messages_importChatInvite.md +++ b/old_docs/API_docs_v46/methods/messages_importChatInvite.md @@ -36,13 +36,10 @@ description: messages.importChatInvite parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v46/methods/messages_installStickerSet.md b/old_docs/API_docs_v46/methods/messages_installStickerSet.md index 1969d008..cf1865a8 100644 --- a/old_docs/API_docs_v46/methods/messages_installStickerSet.md +++ b/old_docs/API_docs_v46/methods/messages_installStickerSet.md @@ -31,13 +31,10 @@ description: messages.installStickerSet parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v46/methods/messages_migrateChat.md b/old_docs/API_docs_v46/methods/messages_migrateChat.md index 22d2fbf0..a8274e70 100644 --- a/old_docs/API_docs_v46/methods/messages_migrateChat.md +++ b/old_docs/API_docs_v46/methods/messages_migrateChat.md @@ -32,13 +32,10 @@ description: messages.migrateChat parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v46/methods/messages_readEncryptedHistory.md b/old_docs/API_docs_v46/methods/messages_readEncryptedHistory.md index 766ee07d..f38f6b07 100644 --- a/old_docs/API_docs_v46/methods/messages_readEncryptedHistory.md +++ b/old_docs/API_docs_v46/methods/messages_readEncryptedHistory.md @@ -31,16 +31,13 @@ description: messages.readEncryptedHistory parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v46/methods/messages_readHistory.md b/old_docs/API_docs_v46/methods/messages_readHistory.md index 1aa7830a..fef62130 100644 --- a/old_docs/API_docs_v46/methods/messages_readHistory.md +++ b/old_docs/API_docs_v46/methods/messages_readHistory.md @@ -32,13 +32,10 @@ description: messages.readHistory parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v46/methods/messages_readMessageContents.md b/old_docs/API_docs_v46/methods/messages_readMessageContents.md index 4b1abda0..7a6055fc 100644 --- a/old_docs/API_docs_v46/methods/messages_readMessageContents.md +++ b/old_docs/API_docs_v46/methods/messages_readMessageContents.md @@ -23,13 +23,10 @@ description: messages.readMessageContents parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v46/methods/messages_receivedMessages.md b/old_docs/API_docs_v46/methods/messages_receivedMessages.md index 588ac5cf..e2cf3a2f 100644 --- a/old_docs/API_docs_v46/methods/messages_receivedMessages.md +++ b/old_docs/API_docs_v46/methods/messages_receivedMessages.md @@ -23,13 +23,10 @@ description: messages.receivedMessages parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v46/methods/messages_receivedQueue.md b/old_docs/API_docs_v46/methods/messages_receivedQueue.md index 3c7f1d4f..38f504b3 100644 --- a/old_docs/API_docs_v46/methods/messages_receivedQueue.md +++ b/old_docs/API_docs_v46/methods/messages_receivedQueue.md @@ -30,16 +30,13 @@ description: messages.receivedQueue parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v46/methods/messages_reorderStickerSets.md b/old_docs/API_docs_v46/methods/messages_reorderStickerSets.md index cb35605a..e09057e7 100644 --- a/old_docs/API_docs_v46/methods/messages_reorderStickerSets.md +++ b/old_docs/API_docs_v46/methods/messages_reorderStickerSets.md @@ -23,13 +23,10 @@ description: messages.reorderStickerSets parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v46/methods/messages_reportSpam.md b/old_docs/API_docs_v46/methods/messages_reportSpam.md index bfadb9ab..08c96d44 100644 --- a/old_docs/API_docs_v46/methods/messages_reportSpam.md +++ b/old_docs/API_docs_v46/methods/messages_reportSpam.md @@ -30,13 +30,10 @@ description: messages.reportSpam parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v46/methods/messages_saveGif.md b/old_docs/API_docs_v46/methods/messages_saveGif.md index 31e48632..d86d539a 100644 --- a/old_docs/API_docs_v46/methods/messages_saveGif.md +++ b/old_docs/API_docs_v46/methods/messages_saveGif.md @@ -31,13 +31,10 @@ description: messages.saveGif parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v46/methods/messages_search.md b/old_docs/API_docs_v46/methods/messages_search.md index 8ea63f65..87f282e3 100644 --- a/old_docs/API_docs_v46/methods/messages_search.md +++ b/old_docs/API_docs_v46/methods/messages_search.md @@ -44,13 +44,10 @@ description: messages.search parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v46/methods/messages_searchGifs.md b/old_docs/API_docs_v46/methods/messages_searchGifs.md index 3f4c4838..dd804c99 100644 --- a/old_docs/API_docs_v46/methods/messages_searchGifs.md +++ b/old_docs/API_docs_v46/methods/messages_searchGifs.md @@ -31,13 +31,10 @@ description: messages.searchGifs parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v46/methods/messages_searchGlobal.md b/old_docs/API_docs_v46/methods/messages_searchGlobal.md index 0553dd7a..4b45eed2 100644 --- a/old_docs/API_docs_v46/methods/messages_searchGlobal.md +++ b/old_docs/API_docs_v46/methods/messages_searchGlobal.md @@ -34,13 +34,10 @@ description: messages.searchGlobal parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v46/methods/messages_sendBroadcast.md b/old_docs/API_docs_v46/methods/messages_sendBroadcast.md index ac13d0bf..537166ab 100644 --- a/old_docs/API_docs_v46/methods/messages_sendBroadcast.md +++ b/old_docs/API_docs_v46/methods/messages_sendBroadcast.md @@ -25,16 +25,13 @@ description: messages.sendBroadcast parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v46/methods/messages_sendEncrypted.md b/old_docs/API_docs_v46/methods/messages_sendEncrypted.md index 82eeec92..ba9f796b 100644 --- a/old_docs/API_docs_v46/methods/messages_sendEncrypted.md +++ b/old_docs/API_docs_v46/methods/messages_sendEncrypted.md @@ -34,16 +34,13 @@ description: messages.sendEncrypted parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v46/methods/messages_sendEncryptedFile.md b/old_docs/API_docs_v46/methods/messages_sendEncryptedFile.md index 8f7a73d9..db16bf2d 100644 --- a/old_docs/API_docs_v46/methods/messages_sendEncryptedFile.md +++ b/old_docs/API_docs_v46/methods/messages_sendEncryptedFile.md @@ -32,16 +32,13 @@ description: messages.sendEncryptedFile parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v46/methods/messages_sendEncryptedService.md b/old_docs/API_docs_v46/methods/messages_sendEncryptedService.md index d427f6c3..fd4e2627 100644 --- a/old_docs/API_docs_v46/methods/messages_sendEncryptedService.md +++ b/old_docs/API_docs_v46/methods/messages_sendEncryptedService.md @@ -34,16 +34,13 @@ description: messages.sendEncryptedService parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v46/methods/messages_sendInlineBotResult.md b/old_docs/API_docs_v46/methods/messages_sendInlineBotResult.md index c4f8601f..b33c7860 100644 --- a/old_docs/API_docs_v46/methods/messages_sendInlineBotResult.md +++ b/old_docs/API_docs_v46/methods/messages_sendInlineBotResult.md @@ -37,13 +37,10 @@ description: messages.sendInlineBotResult parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v46/methods/messages_sendMedia.md b/old_docs/API_docs_v46/methods/messages_sendMedia.md index 4b924e7e..2bc63256 100644 --- a/old_docs/API_docs_v46/methods/messages_sendMedia.md +++ b/old_docs/API_docs_v46/methods/messages_sendMedia.md @@ -57,16 +57,13 @@ description: messages.sendMedia parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v46/methods/messages_sendMessage.md b/old_docs/API_docs_v46/methods/messages_sendMessage.md index 723c2f65..1a735df3 100644 --- a/old_docs/API_docs_v46/methods/messages_sendMessage.md +++ b/old_docs/API_docs_v46/methods/messages_sendMessage.md @@ -56,16 +56,13 @@ description: messages.sendMessage parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v46/methods/messages_setEncryptedTyping.md b/old_docs/API_docs_v46/methods/messages_setEncryptedTyping.md index a05b94dd..aeae6ff7 100644 --- a/old_docs/API_docs_v46/methods/messages_setEncryptedTyping.md +++ b/old_docs/API_docs_v46/methods/messages_setEncryptedTyping.md @@ -31,13 +31,10 @@ description: messages.setEncryptedTyping parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v46/methods/messages_setInlineBotResults.md b/old_docs/API_docs_v46/methods/messages_setInlineBotResults.md index e347494b..94fa85b8 100644 --- a/old_docs/API_docs_v46/methods/messages_setInlineBotResults.md +++ b/old_docs/API_docs_v46/methods/messages_setInlineBotResults.md @@ -45,16 +45,13 @@ description: messages.setInlineBotResults parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v46/methods/messages_setTyping.md b/old_docs/API_docs_v46/methods/messages_setTyping.md index 9ef8caf5..f6b7b7b5 100644 --- a/old_docs/API_docs_v46/methods/messages_setTyping.md +++ b/old_docs/API_docs_v46/methods/messages_setTyping.md @@ -37,16 +37,13 @@ description: messages.setTyping parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v46/methods/messages_startBot.md b/old_docs/API_docs_v46/methods/messages_startBot.md index 8d98e390..b33ab013 100644 --- a/old_docs/API_docs_v46/methods/messages_startBot.md +++ b/old_docs/API_docs_v46/methods/messages_startBot.md @@ -35,13 +35,10 @@ description: messages.startBot parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v46/methods/messages_toggleChatAdmins.md b/old_docs/API_docs_v46/methods/messages_toggleChatAdmins.md index 3bf8a419..97328065 100644 --- a/old_docs/API_docs_v46/methods/messages_toggleChatAdmins.md +++ b/old_docs/API_docs_v46/methods/messages_toggleChatAdmins.md @@ -32,13 +32,10 @@ description: messages.toggleChatAdmins parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v46/methods/messages_uninstallStickerSet.md b/old_docs/API_docs_v46/methods/messages_uninstallStickerSet.md index 6763e64f..76a3e3e2 100644 --- a/old_docs/API_docs_v46/methods/messages_uninstallStickerSet.md +++ b/old_docs/API_docs_v46/methods/messages_uninstallStickerSet.md @@ -30,13 +30,10 @@ description: messages.uninstallStickerSet parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v46/methods/photos_deletePhotos.md b/old_docs/API_docs_v46/methods/photos_deletePhotos.md index e9cd459d..61768b1e 100644 --- a/old_docs/API_docs_v46/methods/photos_deletePhotos.md +++ b/old_docs/API_docs_v46/methods/photos_deletePhotos.md @@ -23,13 +23,10 @@ description: photos.deletePhotos parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v46/methods/photos_getUserPhotos.md b/old_docs/API_docs_v46/methods/photos_getUserPhotos.md index d6c2a380..095363e7 100644 --- a/old_docs/API_docs_v46/methods/photos_getUserPhotos.md +++ b/old_docs/API_docs_v46/methods/photos_getUserPhotos.md @@ -34,16 +34,13 @@ description: photos.getUserPhotos parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v46/methods/photos_updateProfilePhoto.md b/old_docs/API_docs_v46/methods/photos_updateProfilePhoto.md index abb031d4..add6028f 100644 --- a/old_docs/API_docs_v46/methods/photos_updateProfilePhoto.md +++ b/old_docs/API_docs_v46/methods/photos_updateProfilePhoto.md @@ -24,13 +24,10 @@ description: photos.updateProfilePhoto parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v46/methods/photos_uploadProfilePhoto.md b/old_docs/API_docs_v46/methods/photos_uploadProfilePhoto.md index ae20fdfc..048a1d32 100644 --- a/old_docs/API_docs_v46/methods/photos_uploadProfilePhoto.md +++ b/old_docs/API_docs_v46/methods/photos_uploadProfilePhoto.md @@ -37,13 +37,10 @@ description: photos.uploadProfilePhoto parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v46/methods/users_getUsers.md b/old_docs/API_docs_v46/methods/users_getUsers.md index 6a44d258..3a981d57 100644 --- a/old_docs/API_docs_v46/methods/users_getUsers.md +++ b/old_docs/API_docs_v46/methods/users_getUsers.md @@ -33,16 +33,13 @@ description: users.getUsers parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v51/methods/account_changePhone.md b/old_docs/API_docs_v51/methods/account_changePhone.md index 5d1801d0..e47ef6a7 100644 --- a/old_docs/API_docs_v51/methods/account_changePhone.md +++ b/old_docs/API_docs_v51/methods/account_changePhone.md @@ -32,13 +32,10 @@ description: account.changePhone parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v51/methods/account_checkUsername.md b/old_docs/API_docs_v51/methods/account_checkUsername.md index afc59b6c..40cf822f 100644 --- a/old_docs/API_docs_v51/methods/account_checkUsername.md +++ b/old_docs/API_docs_v51/methods/account_checkUsername.md @@ -30,13 +30,10 @@ description: account.checkUsername parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v51/methods/account_deleteAccount.md b/old_docs/API_docs_v51/methods/account_deleteAccount.md index 5abcd0ec..6f1bbda9 100644 --- a/old_docs/API_docs_v51/methods/account_deleteAccount.md +++ b/old_docs/API_docs_v51/methods/account_deleteAccount.md @@ -23,13 +23,10 @@ description: account.deleteAccount parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v51/methods/account_getAccountTTL.md b/old_docs/API_docs_v51/methods/account_getAccountTTL.md index 3520fbef..538b1d7a 100644 --- a/old_docs/API_docs_v51/methods/account_getAccountTTL.md +++ b/old_docs/API_docs_v51/methods/account_getAccountTTL.md @@ -18,13 +18,10 @@ description: account.getAccountTTL parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v51/methods/account_getAuthorizations.md b/old_docs/API_docs_v51/methods/account_getAuthorizations.md index 91bbce5e..f138d517 100644 --- a/old_docs/API_docs_v51/methods/account_getAuthorizations.md +++ b/old_docs/API_docs_v51/methods/account_getAuthorizations.md @@ -18,13 +18,10 @@ description: account.getAuthorizations parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v51/methods/account_getNotifySettings.md b/old_docs/API_docs_v51/methods/account_getNotifySettings.md index 8ee710d8..a48eed2f 100644 --- a/old_docs/API_docs_v51/methods/account_getNotifySettings.md +++ b/old_docs/API_docs_v51/methods/account_getNotifySettings.md @@ -30,13 +30,10 @@ description: account.getNotifySettings parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v51/methods/account_getPassword.md b/old_docs/API_docs_v51/methods/account_getPassword.md index 4d9fd015..1abf6174 100644 --- a/old_docs/API_docs_v51/methods/account_getPassword.md +++ b/old_docs/API_docs_v51/methods/account_getPassword.md @@ -18,13 +18,10 @@ description: account.getPassword parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v51/methods/account_getPasswordSettings.md b/old_docs/API_docs_v51/methods/account_getPasswordSettings.md index 02cb77f7..aec5b989 100644 --- a/old_docs/API_docs_v51/methods/account_getPasswordSettings.md +++ b/old_docs/API_docs_v51/methods/account_getPasswordSettings.md @@ -30,13 +30,10 @@ description: account.getPasswordSettings parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v51/methods/account_getPrivacy.md b/old_docs/API_docs_v51/methods/account_getPrivacy.md index 52786b79..8bbe9795 100644 --- a/old_docs/API_docs_v51/methods/account_getPrivacy.md +++ b/old_docs/API_docs_v51/methods/account_getPrivacy.md @@ -30,13 +30,10 @@ description: account.getPrivacy parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v51/methods/account_getWallPapers.md b/old_docs/API_docs_v51/methods/account_getWallPapers.md index 88c8a701..a71543d0 100644 --- a/old_docs/API_docs_v51/methods/account_getWallPapers.md +++ b/old_docs/API_docs_v51/methods/account_getWallPapers.md @@ -18,13 +18,10 @@ description: account.getWallPapers parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v51/methods/account_registerDevice.md b/old_docs/API_docs_v51/methods/account_registerDevice.md index ab7ec933..cfa1546c 100644 --- a/old_docs/API_docs_v51/methods/account_registerDevice.md +++ b/old_docs/API_docs_v51/methods/account_registerDevice.md @@ -36,13 +36,10 @@ description: account.registerDevice parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v51/methods/account_reportPeer.md b/old_docs/API_docs_v51/methods/account_reportPeer.md index 1545c3b8..1ae9f4d4 100644 --- a/old_docs/API_docs_v51/methods/account_reportPeer.md +++ b/old_docs/API_docs_v51/methods/account_reportPeer.md @@ -31,13 +31,10 @@ description: account.reportPeer parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v51/methods/account_resetAuthorization.md b/old_docs/API_docs_v51/methods/account_resetAuthorization.md index e44334f2..0438cba3 100644 --- a/old_docs/API_docs_v51/methods/account_resetAuthorization.md +++ b/old_docs/API_docs_v51/methods/account_resetAuthorization.md @@ -30,13 +30,10 @@ description: account.resetAuthorization parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v51/methods/account_resetNotifySettings.md b/old_docs/API_docs_v51/methods/account_resetNotifySettings.md index 155ede68..92db4f4f 100644 --- a/old_docs/API_docs_v51/methods/account_resetNotifySettings.md +++ b/old_docs/API_docs_v51/methods/account_resetNotifySettings.md @@ -18,13 +18,10 @@ description: account.resetNotifySettings parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v51/methods/account_sendChangePhoneCode.md b/old_docs/API_docs_v51/methods/account_sendChangePhoneCode.md index 4be218f2..017b5f7f 100644 --- a/old_docs/API_docs_v51/methods/account_sendChangePhoneCode.md +++ b/old_docs/API_docs_v51/methods/account_sendChangePhoneCode.md @@ -32,13 +32,10 @@ description: account.sendChangePhoneCode parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v51/methods/account_setAccountTTL.md b/old_docs/API_docs_v51/methods/account_setAccountTTL.md index f06eb676..d08f59fb 100644 --- a/old_docs/API_docs_v51/methods/account_setAccountTTL.md +++ b/old_docs/API_docs_v51/methods/account_setAccountTTL.md @@ -30,13 +30,10 @@ description: account.setAccountTTL parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v51/methods/account_setPrivacy.md b/old_docs/API_docs_v51/methods/account_setPrivacy.md index 56aebbcc..401aa71c 100644 --- a/old_docs/API_docs_v51/methods/account_setPrivacy.md +++ b/old_docs/API_docs_v51/methods/account_setPrivacy.md @@ -31,13 +31,10 @@ description: account.setPrivacy parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v51/methods/account_unregisterDevice.md b/old_docs/API_docs_v51/methods/account_unregisterDevice.md index 41899b6e..283ec7d2 100644 --- a/old_docs/API_docs_v51/methods/account_unregisterDevice.md +++ b/old_docs/API_docs_v51/methods/account_unregisterDevice.md @@ -31,13 +31,10 @@ description: account.unregisterDevice parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v51/methods/account_updateDeviceLocked.md b/old_docs/API_docs_v51/methods/account_updateDeviceLocked.md index 37aeb59d..ae6125a5 100644 --- a/old_docs/API_docs_v51/methods/account_updateDeviceLocked.md +++ b/old_docs/API_docs_v51/methods/account_updateDeviceLocked.md @@ -23,13 +23,10 @@ description: account.updateDeviceLocked parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v51/methods/account_updateNotifySettings.md b/old_docs/API_docs_v51/methods/account_updateNotifySettings.md index 8389b5c2..fb096250 100644 --- a/old_docs/API_docs_v51/methods/account_updateNotifySettings.md +++ b/old_docs/API_docs_v51/methods/account_updateNotifySettings.md @@ -31,13 +31,10 @@ description: account.updateNotifySettings parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v51/methods/account_updatePasswordSettings.md b/old_docs/API_docs_v51/methods/account_updatePasswordSettings.md index b7c8da4b..ffa8dcd9 100644 --- a/old_docs/API_docs_v51/methods/account_updatePasswordSettings.md +++ b/old_docs/API_docs_v51/methods/account_updatePasswordSettings.md @@ -34,13 +34,10 @@ description: account.updatePasswordSettings parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v51/methods/account_updateProfile.md b/old_docs/API_docs_v51/methods/account_updateProfile.md index a50eaea5..b3d468d1 100644 --- a/old_docs/API_docs_v51/methods/account_updateProfile.md +++ b/old_docs/API_docs_v51/methods/account_updateProfile.md @@ -33,13 +33,10 @@ description: account.updateProfile parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v51/methods/account_updateStatus.md b/old_docs/API_docs_v51/methods/account_updateStatus.md index 7204e582..c8fa0a79 100644 --- a/old_docs/API_docs_v51/methods/account_updateStatus.md +++ b/old_docs/API_docs_v51/methods/account_updateStatus.md @@ -30,13 +30,10 @@ description: account.updateStatus parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v51/methods/account_updateUsername.md b/old_docs/API_docs_v51/methods/account_updateUsername.md index 22be2fd4..2b7576a5 100644 --- a/old_docs/API_docs_v51/methods/account_updateUsername.md +++ b/old_docs/API_docs_v51/methods/account_updateUsername.md @@ -32,13 +32,10 @@ description: account.updateUsername parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v51/methods/auth_bindTempAuthKey.md b/old_docs/API_docs_v51/methods/auth_bindTempAuthKey.md index e3d72dd5..7419abb0 100644 --- a/old_docs/API_docs_v51/methods/auth_bindTempAuthKey.md +++ b/old_docs/API_docs_v51/methods/auth_bindTempAuthKey.md @@ -35,16 +35,13 @@ description: auth.bindTempAuthKey parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v51/methods/auth_cancelCode.md b/old_docs/API_docs_v51/methods/auth_cancelCode.md index dc390329..05d927a1 100644 --- a/old_docs/API_docs_v51/methods/auth_cancelCode.md +++ b/old_docs/API_docs_v51/methods/auth_cancelCode.md @@ -31,13 +31,10 @@ description: auth.cancelCode parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v51/methods/auth_checkPassword.md b/old_docs/API_docs_v51/methods/auth_checkPassword.md index d5559186..6b6b21cc 100644 --- a/old_docs/API_docs_v51/methods/auth_checkPassword.md +++ b/old_docs/API_docs_v51/methods/auth_checkPassword.md @@ -30,13 +30,10 @@ description: auth.checkPassword parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v51/methods/auth_checkPhone.md b/old_docs/API_docs_v51/methods/auth_checkPhone.md index 3455904d..f6cac2e6 100644 --- a/old_docs/API_docs_v51/methods/auth_checkPhone.md +++ b/old_docs/API_docs_v51/methods/auth_checkPhone.md @@ -32,13 +32,10 @@ description: auth.checkPhone parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v51/methods/auth_exportAuthorization.md b/old_docs/API_docs_v51/methods/auth_exportAuthorization.md index 44c45b70..cbc8203b 100644 --- a/old_docs/API_docs_v51/methods/auth_exportAuthorization.md +++ b/old_docs/API_docs_v51/methods/auth_exportAuthorization.md @@ -30,16 +30,13 @@ description: auth.exportAuthorization parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v51/methods/auth_importAuthorization.md b/old_docs/API_docs_v51/methods/auth_importAuthorization.md index e0fd534f..22166510 100644 --- a/old_docs/API_docs_v51/methods/auth_importAuthorization.md +++ b/old_docs/API_docs_v51/methods/auth_importAuthorization.md @@ -32,16 +32,13 @@ description: auth.importAuthorization parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v51/methods/auth_recoverPassword.md b/old_docs/API_docs_v51/methods/auth_recoverPassword.md index c2ce3fed..931e99fd 100644 --- a/old_docs/API_docs_v51/methods/auth_recoverPassword.md +++ b/old_docs/API_docs_v51/methods/auth_recoverPassword.md @@ -30,13 +30,10 @@ description: auth.recoverPassword parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v51/methods/auth_requestPasswordRecovery.md b/old_docs/API_docs_v51/methods/auth_requestPasswordRecovery.md index 101b1cf7..c6babcd9 100644 --- a/old_docs/API_docs_v51/methods/auth_requestPasswordRecovery.md +++ b/old_docs/API_docs_v51/methods/auth_requestPasswordRecovery.md @@ -25,13 +25,10 @@ description: auth.requestPasswordRecovery parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v51/methods/auth_resendCode.md b/old_docs/API_docs_v51/methods/auth_resendCode.md index 14d08ddd..df4803b8 100644 --- a/old_docs/API_docs_v51/methods/auth_resendCode.md +++ b/old_docs/API_docs_v51/methods/auth_resendCode.md @@ -31,13 +31,10 @@ description: auth.resendCode parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v51/methods/auth_resetAuthorizations.md b/old_docs/API_docs_v51/methods/auth_resetAuthorizations.md index 87a39a22..fe297fa7 100644 --- a/old_docs/API_docs_v51/methods/auth_resetAuthorizations.md +++ b/old_docs/API_docs_v51/methods/auth_resetAuthorizations.md @@ -25,13 +25,10 @@ description: auth.resetAuthorizations parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v51/methods/auth_sendInvites.md b/old_docs/API_docs_v51/methods/auth_sendInvites.md index 604fc65d..ad9636c5 100644 --- a/old_docs/API_docs_v51/methods/auth_sendInvites.md +++ b/old_docs/API_docs_v51/methods/auth_sendInvites.md @@ -31,13 +31,10 @@ description: auth.sendInvites parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v51/methods/channels_checkUsername.md b/old_docs/API_docs_v51/methods/channels_checkUsername.md index d6ea876d..e29ee107 100644 --- a/old_docs/API_docs_v51/methods/channels_checkUsername.md +++ b/old_docs/API_docs_v51/methods/channels_checkUsername.md @@ -33,13 +33,10 @@ description: channels.checkUsername parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v51/methods/channels_createChannel.md b/old_docs/API_docs_v51/methods/channels_createChannel.md index 9ba02e9e..58808b73 100644 --- a/old_docs/API_docs_v51/methods/channels_createChannel.md +++ b/old_docs/API_docs_v51/methods/channels_createChannel.md @@ -34,13 +34,10 @@ description: channels.createChannel parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v51/methods/channels_deleteChannel.md b/old_docs/API_docs_v51/methods/channels_deleteChannel.md index 912ab080..532f3c6c 100644 --- a/old_docs/API_docs_v51/methods/channels_deleteChannel.md +++ b/old_docs/API_docs_v51/methods/channels_deleteChannel.md @@ -31,13 +31,10 @@ description: channels.deleteChannel parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v51/methods/channels_deleteMessages.md b/old_docs/API_docs_v51/methods/channels_deleteMessages.md index b3481294..a42a47a5 100644 --- a/old_docs/API_docs_v51/methods/channels_deleteMessages.md +++ b/old_docs/API_docs_v51/methods/channels_deleteMessages.md @@ -33,16 +33,13 @@ description: channels.deleteMessages parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v51/methods/channels_deleteUserHistory.md b/old_docs/API_docs_v51/methods/channels_deleteUserHistory.md index 66843269..73494485 100644 --- a/old_docs/API_docs_v51/methods/channels_deleteUserHistory.md +++ b/old_docs/API_docs_v51/methods/channels_deleteUserHistory.md @@ -32,13 +32,10 @@ description: channels.deleteUserHistory parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v51/methods/channels_editAbout.md b/old_docs/API_docs_v51/methods/channels_editAbout.md index 4c759a8a..1c3ce933 100644 --- a/old_docs/API_docs_v51/methods/channels_editAbout.md +++ b/old_docs/API_docs_v51/methods/channels_editAbout.md @@ -34,16 +34,13 @@ description: channels.editAbout parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v51/methods/channels_editAdmin.md b/old_docs/API_docs_v51/methods/channels_editAdmin.md index 7707bdfe..42184227 100644 --- a/old_docs/API_docs_v51/methods/channels_editAdmin.md +++ b/old_docs/API_docs_v51/methods/channels_editAdmin.md @@ -41,16 +41,13 @@ description: channels.editAdmin parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v51/methods/channels_editPhoto.md b/old_docs/API_docs_v51/methods/channels_editPhoto.md index 99873537..4a4aeb03 100644 --- a/old_docs/API_docs_v51/methods/channels_editPhoto.md +++ b/old_docs/API_docs_v51/methods/channels_editPhoto.md @@ -33,16 +33,13 @@ description: channels.editPhoto parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v51/methods/channels_editTitle.md b/old_docs/API_docs_v51/methods/channels_editTitle.md index 04e8ce12..8a69d09b 100644 --- a/old_docs/API_docs_v51/methods/channels_editTitle.md +++ b/old_docs/API_docs_v51/methods/channels_editTitle.md @@ -33,16 +33,13 @@ description: channels.editTitle parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v51/methods/channels_exportInvite.md b/old_docs/API_docs_v51/methods/channels_exportInvite.md index 2ed80f6c..79dc6401 100644 --- a/old_docs/API_docs_v51/methods/channels_exportInvite.md +++ b/old_docs/API_docs_v51/methods/channels_exportInvite.md @@ -32,16 +32,13 @@ description: channels.exportInvite parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v51/methods/channels_exportMessageLink.md b/old_docs/API_docs_v51/methods/channels_exportMessageLink.md index 9831c9c0..5b824859 100644 --- a/old_docs/API_docs_v51/methods/channels_exportMessageLink.md +++ b/old_docs/API_docs_v51/methods/channels_exportMessageLink.md @@ -31,13 +31,10 @@ description: channels.exportMessageLink parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v51/methods/channels_getChannels.md b/old_docs/API_docs_v51/methods/channels_getChannels.md index 13304938..e80aa6a6 100644 --- a/old_docs/API_docs_v51/methods/channels_getChannels.md +++ b/old_docs/API_docs_v51/methods/channels_getChannels.md @@ -32,16 +32,13 @@ description: channels.getChannels parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v51/methods/channels_getDialogs.md b/old_docs/API_docs_v51/methods/channels_getDialogs.md index 854372f6..916f9b34 100644 --- a/old_docs/API_docs_v51/methods/channels_getDialogs.md +++ b/old_docs/API_docs_v51/methods/channels_getDialogs.md @@ -24,16 +24,13 @@ description: channels.getDialogs parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v51/methods/channels_getImportantHistory.md b/old_docs/API_docs_v51/methods/channels_getImportantHistory.md index 47dad75a..563228f2 100644 --- a/old_docs/API_docs_v51/methods/channels_getImportantHistory.md +++ b/old_docs/API_docs_v51/methods/channels_getImportantHistory.md @@ -29,16 +29,13 @@ description: channels.getImportantHistory parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v51/methods/channels_getMessages.md b/old_docs/API_docs_v51/methods/channels_getMessages.md index 5480dd86..dc392773 100644 --- a/old_docs/API_docs_v51/methods/channels_getMessages.md +++ b/old_docs/API_docs_v51/methods/channels_getMessages.md @@ -33,16 +33,13 @@ description: channels.getMessages parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v51/methods/channels_getParticipant.md b/old_docs/API_docs_v51/methods/channels_getParticipant.md index 8c7e3cbd..001bf115 100644 --- a/old_docs/API_docs_v51/methods/channels_getParticipant.md +++ b/old_docs/API_docs_v51/methods/channels_getParticipant.md @@ -35,16 +35,13 @@ description: channels.getParticipant parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v51/methods/channels_inviteToChannel.md b/old_docs/API_docs_v51/methods/channels_inviteToChannel.md index cf5480e0..2448fb84 100644 --- a/old_docs/API_docs_v51/methods/channels_inviteToChannel.md +++ b/old_docs/API_docs_v51/methods/channels_inviteToChannel.md @@ -46,13 +46,10 @@ description: channels.inviteToChannel parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v51/methods/channels_joinChannel.md b/old_docs/API_docs_v51/methods/channels_joinChannel.md index f31730a1..e746cf48 100644 --- a/old_docs/API_docs_v51/methods/channels_joinChannel.md +++ b/old_docs/API_docs_v51/methods/channels_joinChannel.md @@ -32,13 +32,10 @@ description: channels.joinChannel parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v51/methods/channels_kickFromChannel.md b/old_docs/API_docs_v51/methods/channels_kickFromChannel.md index c903caa4..c85833ce 100644 --- a/old_docs/API_docs_v51/methods/channels_kickFromChannel.md +++ b/old_docs/API_docs_v51/methods/channels_kickFromChannel.md @@ -25,16 +25,13 @@ description: channels.kickFromChannel parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v51/methods/channels_leaveChannel.md b/old_docs/API_docs_v51/methods/channels_leaveChannel.md index 12902f6d..ff244ded 100644 --- a/old_docs/API_docs_v51/methods/channels_leaveChannel.md +++ b/old_docs/API_docs_v51/methods/channels_leaveChannel.md @@ -34,16 +34,13 @@ description: channels.leaveChannel parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v51/methods/channels_readHistory.md b/old_docs/API_docs_v51/methods/channels_readHistory.md index be979101..6fc6ec0e 100644 --- a/old_docs/API_docs_v51/methods/channels_readHistory.md +++ b/old_docs/API_docs_v51/methods/channels_readHistory.md @@ -32,13 +32,10 @@ description: channels.readHistory parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v51/methods/channels_reportSpam.md b/old_docs/API_docs_v51/methods/channels_reportSpam.md index 22f34443..a37a5833 100644 --- a/old_docs/API_docs_v51/methods/channels_reportSpam.md +++ b/old_docs/API_docs_v51/methods/channels_reportSpam.md @@ -33,13 +33,10 @@ description: channels.reportSpam parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v51/methods/channels_toggleComments.md b/old_docs/API_docs_v51/methods/channels_toggleComments.md index 55da95b5..1b304615 100644 --- a/old_docs/API_docs_v51/methods/channels_toggleComments.md +++ b/old_docs/API_docs_v51/methods/channels_toggleComments.md @@ -24,16 +24,13 @@ description: channels.toggleComments parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v51/methods/channels_toggleInvites.md b/old_docs/API_docs_v51/methods/channels_toggleInvites.md index c2715b32..d0ae1136 100644 --- a/old_docs/API_docs_v51/methods/channels_toggleInvites.md +++ b/old_docs/API_docs_v51/methods/channels_toggleInvites.md @@ -33,13 +33,10 @@ description: channels.toggleInvites parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v51/methods/channels_toggleSignatures.md b/old_docs/API_docs_v51/methods/channels_toggleSignatures.md index a214b849..6477bc6d 100644 --- a/old_docs/API_docs_v51/methods/channels_toggleSignatures.md +++ b/old_docs/API_docs_v51/methods/channels_toggleSignatures.md @@ -31,13 +31,10 @@ description: channels.toggleSignatures parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v51/methods/channels_updatePinnedMessage.md b/old_docs/API_docs_v51/methods/channels_updatePinnedMessage.md index 6dcabf71..37a0a20d 100644 --- a/old_docs/API_docs_v51/methods/channels_updatePinnedMessage.md +++ b/old_docs/API_docs_v51/methods/channels_updatePinnedMessage.md @@ -35,16 +35,13 @@ description: channels.updatePinnedMessage parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v51/methods/channels_updateUsername.md b/old_docs/API_docs_v51/methods/channels_updateUsername.md index c2ede724..1f1f111e 100644 --- a/old_docs/API_docs_v51/methods/channels_updateUsername.md +++ b/old_docs/API_docs_v51/methods/channels_updateUsername.md @@ -35,13 +35,10 @@ description: channels.updateUsername parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v51/methods/contacts_block.md b/old_docs/API_docs_v51/methods/contacts_block.md index d9d58e37..1c7cbe26 100644 --- a/old_docs/API_docs_v51/methods/contacts_block.md +++ b/old_docs/API_docs_v51/methods/contacts_block.md @@ -30,13 +30,10 @@ description: contacts.block parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v51/methods/contacts_deleteContact.md b/old_docs/API_docs_v51/methods/contacts_deleteContact.md index cd8c17ad..987a1be0 100644 --- a/old_docs/API_docs_v51/methods/contacts_deleteContact.md +++ b/old_docs/API_docs_v51/methods/contacts_deleteContact.md @@ -30,13 +30,10 @@ description: contacts.deleteContact parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v51/methods/contacts_deleteContacts.md b/old_docs/API_docs_v51/methods/contacts_deleteContacts.md index fc65880d..67a922ed 100644 --- a/old_docs/API_docs_v51/methods/contacts_deleteContacts.md +++ b/old_docs/API_docs_v51/methods/contacts_deleteContacts.md @@ -31,13 +31,10 @@ description: contacts.deleteContacts parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v51/methods/contacts_exportCard.md b/old_docs/API_docs_v51/methods/contacts_exportCard.md index 63508076..bf6d1f9f 100644 --- a/old_docs/API_docs_v51/methods/contacts_exportCard.md +++ b/old_docs/API_docs_v51/methods/contacts_exportCard.md @@ -18,13 +18,10 @@ description: contacts.exportCard parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v51/methods/contacts_getBlocked.md b/old_docs/API_docs_v51/methods/contacts_getBlocked.md index f50792b4..faa719da 100644 --- a/old_docs/API_docs_v51/methods/contacts_getBlocked.md +++ b/old_docs/API_docs_v51/methods/contacts_getBlocked.md @@ -24,13 +24,10 @@ description: contacts.getBlocked parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v51/methods/contacts_getContacts.md b/old_docs/API_docs_v51/methods/contacts_getContacts.md index 71313bf2..a6779111 100644 --- a/old_docs/API_docs_v51/methods/contacts_getContacts.md +++ b/old_docs/API_docs_v51/methods/contacts_getContacts.md @@ -23,13 +23,10 @@ description: contacts.getContacts parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v51/methods/contacts_getStatuses.md b/old_docs/API_docs_v51/methods/contacts_getStatuses.md index d914e08d..9bb7f263 100644 --- a/old_docs/API_docs_v51/methods/contacts_getStatuses.md +++ b/old_docs/API_docs_v51/methods/contacts_getStatuses.md @@ -18,13 +18,10 @@ description: contacts.getStatuses parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v51/methods/contacts_importCard.md b/old_docs/API_docs_v51/methods/contacts_importCard.md index a6abf56d..7a2f34e1 100644 --- a/old_docs/API_docs_v51/methods/contacts_importCard.md +++ b/old_docs/API_docs_v51/methods/contacts_importCard.md @@ -31,13 +31,10 @@ description: contacts.importCard parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v51/methods/contacts_importContacts.md b/old_docs/API_docs_v51/methods/contacts_importContacts.md index db2051ac..2f070493 100644 --- a/old_docs/API_docs_v51/methods/contacts_importContacts.md +++ b/old_docs/API_docs_v51/methods/contacts_importContacts.md @@ -24,13 +24,10 @@ description: contacts.importContacts parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v51/methods/contacts_search.md b/old_docs/API_docs_v51/methods/contacts_search.md index 0203b160..70a0635e 100644 --- a/old_docs/API_docs_v51/methods/contacts_search.md +++ b/old_docs/API_docs_v51/methods/contacts_search.md @@ -33,13 +33,10 @@ description: contacts.search parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v51/methods/contacts_unblock.md b/old_docs/API_docs_v51/methods/contacts_unblock.md index a1977c24..9c01e42a 100644 --- a/old_docs/API_docs_v51/methods/contacts_unblock.md +++ b/old_docs/API_docs_v51/methods/contacts_unblock.md @@ -30,13 +30,10 @@ description: contacts.unblock parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v51/methods/help_getAppChangelog.md b/old_docs/API_docs_v51/methods/help_getAppChangelog.md index 302809aa..b27cc9f0 100644 --- a/old_docs/API_docs_v51/methods/help_getAppChangelog.md +++ b/old_docs/API_docs_v51/methods/help_getAppChangelog.md @@ -26,13 +26,10 @@ description: help.getAppChangelog parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v51/methods/help_getAppUpdate.md b/old_docs/API_docs_v51/methods/help_getAppUpdate.md index c8e67402..7b3bdde9 100644 --- a/old_docs/API_docs_v51/methods/help_getAppUpdate.md +++ b/old_docs/API_docs_v51/methods/help_getAppUpdate.md @@ -26,13 +26,10 @@ description: help.getAppUpdate parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v51/methods/help_getConfig.md b/old_docs/API_docs_v51/methods/help_getConfig.md index e3648b5a..bb51b362 100644 --- a/old_docs/API_docs_v51/methods/help_getConfig.md +++ b/old_docs/API_docs_v51/methods/help_getConfig.md @@ -25,16 +25,13 @@ description: help.getConfig parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v51/methods/help_getInviteText.md b/old_docs/API_docs_v51/methods/help_getInviteText.md index 348de85d..40251dd5 100644 --- a/old_docs/API_docs_v51/methods/help_getInviteText.md +++ b/old_docs/API_docs_v51/methods/help_getInviteText.md @@ -23,13 +23,10 @@ description: help.getInviteText parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v51/methods/help_getNearestDc.md b/old_docs/API_docs_v51/methods/help_getNearestDc.md index c6f5c555..6d8ed3f7 100644 --- a/old_docs/API_docs_v51/methods/help_getNearestDc.md +++ b/old_docs/API_docs_v51/methods/help_getNearestDc.md @@ -18,13 +18,10 @@ description: help.getNearestDc parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v51/methods/help_getSupport.md b/old_docs/API_docs_v51/methods/help_getSupport.md index 209edf03..ca8db03c 100644 --- a/old_docs/API_docs_v51/methods/help_getSupport.md +++ b/old_docs/API_docs_v51/methods/help_getSupport.md @@ -18,13 +18,10 @@ description: help.getSupport parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v51/methods/help_getTermsOfService.md b/old_docs/API_docs_v51/methods/help_getTermsOfService.md index eb0ce476..1e8899a2 100644 --- a/old_docs/API_docs_v51/methods/help_getTermsOfService.md +++ b/old_docs/API_docs_v51/methods/help_getTermsOfService.md @@ -23,13 +23,10 @@ description: help.getTermsOfService parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v51/methods/help_saveAppLog.md b/old_docs/API_docs_v51/methods/help_saveAppLog.md index 4f06434c..741b9aa1 100644 --- a/old_docs/API_docs_v51/methods/help_saveAppLog.md +++ b/old_docs/API_docs_v51/methods/help_saveAppLog.md @@ -23,13 +23,10 @@ description: help.saveAppLog parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v51/methods/initConnection.md b/old_docs/API_docs_v51/methods/initConnection.md index 0d22a1cb..c0307677 100644 --- a/old_docs/API_docs_v51/methods/initConnection.md +++ b/old_docs/API_docs_v51/methods/initConnection.md @@ -36,16 +36,13 @@ description: initConnection parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v51/methods/invokeAfterMsg.md b/old_docs/API_docs_v51/methods/invokeAfterMsg.md index c139fe8c..a382429e 100644 --- a/old_docs/API_docs_v51/methods/invokeAfterMsg.md +++ b/old_docs/API_docs_v51/methods/invokeAfterMsg.md @@ -24,16 +24,13 @@ description: invokeAfterMsg parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v51/methods/invokeAfterMsgs.md b/old_docs/API_docs_v51/methods/invokeAfterMsgs.md index 35004296..169eedaf 100644 --- a/old_docs/API_docs_v51/methods/invokeAfterMsgs.md +++ b/old_docs/API_docs_v51/methods/invokeAfterMsgs.md @@ -24,16 +24,13 @@ description: invokeAfterMsgs parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v51/methods/invokeWithLayer.md b/old_docs/API_docs_v51/methods/invokeWithLayer.md index 706036c4..d9a2c74c 100644 --- a/old_docs/API_docs_v51/methods/invokeWithLayer.md +++ b/old_docs/API_docs_v51/methods/invokeWithLayer.md @@ -41,16 +41,13 @@ description: invokeWithLayer parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v51/methods/invokeWithoutUpdates.md b/old_docs/API_docs_v51/methods/invokeWithoutUpdates.md index 10c6bfcf..f7d01765 100644 --- a/old_docs/API_docs_v51/methods/invokeWithoutUpdates.md +++ b/old_docs/API_docs_v51/methods/invokeWithoutUpdates.md @@ -23,16 +23,13 @@ description: invokeWithoutUpdates parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v51/methods/messages_addChatUser.md b/old_docs/API_docs_v51/methods/messages_addChatUser.md index 00da5a61..b9e6243d 100644 --- a/old_docs/API_docs_v51/methods/messages_addChatUser.md +++ b/old_docs/API_docs_v51/methods/messages_addChatUser.md @@ -40,13 +40,10 @@ description: messages.addChatUser parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v51/methods/messages_checkChatInvite.md b/old_docs/API_docs_v51/methods/messages_checkChatInvite.md index c5eb1c06..c4489469 100644 --- a/old_docs/API_docs_v51/methods/messages_checkChatInvite.md +++ b/old_docs/API_docs_v51/methods/messages_checkChatInvite.md @@ -32,13 +32,10 @@ description: messages.checkChatInvite parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v51/methods/messages_createChat.md b/old_docs/API_docs_v51/methods/messages_createChat.md index c643a022..c6c8f420 100644 --- a/old_docs/API_docs_v51/methods/messages_createChat.md +++ b/old_docs/API_docs_v51/methods/messages_createChat.md @@ -32,13 +32,10 @@ description: messages.createChat parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v51/methods/messages_deleteChatUser.md b/old_docs/API_docs_v51/methods/messages_deleteChatUser.md index 3d75d9cf..4b8c2aa5 100644 --- a/old_docs/API_docs_v51/methods/messages_deleteChatUser.md +++ b/old_docs/API_docs_v51/methods/messages_deleteChatUser.md @@ -33,16 +33,13 @@ description: messages.deleteChatUser parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v51/methods/messages_deleteHistory.md b/old_docs/API_docs_v51/methods/messages_deleteHistory.md index c8081e79..6ae145d8 100644 --- a/old_docs/API_docs_v51/methods/messages_deleteHistory.md +++ b/old_docs/API_docs_v51/methods/messages_deleteHistory.md @@ -31,13 +31,10 @@ description: messages.deleteHistory parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v51/methods/messages_deleteMessages.md b/old_docs/API_docs_v51/methods/messages_deleteMessages.md index 65dbbc4a..38b3ca09 100644 --- a/old_docs/API_docs_v51/methods/messages_deleteMessages.md +++ b/old_docs/API_docs_v51/methods/messages_deleteMessages.md @@ -30,16 +30,13 @@ description: messages.deleteMessages parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v51/methods/messages_editChatAdmin.md b/old_docs/API_docs_v51/methods/messages_editChatAdmin.md index e64d9da5..1b3ffa9f 100644 --- a/old_docs/API_docs_v51/methods/messages_editChatAdmin.md +++ b/old_docs/API_docs_v51/methods/messages_editChatAdmin.md @@ -32,13 +32,10 @@ description: messages.editChatAdmin parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v51/methods/messages_editChatPhoto.md b/old_docs/API_docs_v51/methods/messages_editChatPhoto.md index d225962d..8c5d9d47 100644 --- a/old_docs/API_docs_v51/methods/messages_editChatPhoto.md +++ b/old_docs/API_docs_v51/methods/messages_editChatPhoto.md @@ -35,16 +35,13 @@ description: messages.editChatPhoto parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v51/methods/messages_editChatTitle.md b/old_docs/API_docs_v51/methods/messages_editChatTitle.md index 5cb1c6d7..238c6d72 100644 --- a/old_docs/API_docs_v51/methods/messages_editChatTitle.md +++ b/old_docs/API_docs_v51/methods/messages_editChatTitle.md @@ -32,16 +32,13 @@ description: messages.editChatTitle parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v51/methods/messages_editInlineBotMessage.md b/old_docs/API_docs_v51/methods/messages_editInlineBotMessage.md index 621c81a3..c3489f9d 100644 --- a/old_docs/API_docs_v51/methods/messages_editInlineBotMessage.md +++ b/old_docs/API_docs_v51/methods/messages_editInlineBotMessage.md @@ -36,16 +36,13 @@ description: messages.editInlineBotMessage parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v51/methods/messages_editMessage.md b/old_docs/API_docs_v51/methods/messages_editMessage.md index b8cdda81..3a23c9ac 100644 --- a/old_docs/API_docs_v51/methods/messages_editMessage.md +++ b/old_docs/API_docs_v51/methods/messages_editMessage.md @@ -45,16 +45,13 @@ description: messages.editMessage parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v51/methods/messages_exportChatInvite.md b/old_docs/API_docs_v51/methods/messages_exportChatInvite.md index 4a6e28ff..78f2ff86 100644 --- a/old_docs/API_docs_v51/methods/messages_exportChatInvite.md +++ b/old_docs/API_docs_v51/methods/messages_exportChatInvite.md @@ -30,13 +30,10 @@ description: messages.exportChatInvite parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v51/methods/messages_forwardMessage.md b/old_docs/API_docs_v51/methods/messages_forwardMessage.md index 4e2362db..fbdbc955 100644 --- a/old_docs/API_docs_v51/methods/messages_forwardMessage.md +++ b/old_docs/API_docs_v51/methods/messages_forwardMessage.md @@ -34,16 +34,13 @@ description: messages.forwardMessage parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v51/methods/messages_forwardMessages.md b/old_docs/API_docs_v51/methods/messages_forwardMessages.md index 703e1072..9c94dc77 100644 --- a/old_docs/API_docs_v51/methods/messages_forwardMessages.md +++ b/old_docs/API_docs_v51/methods/messages_forwardMessages.md @@ -56,16 +56,13 @@ description: messages.forwardMessages parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v51/methods/messages_getAllStickers.md b/old_docs/API_docs_v51/methods/messages_getAllStickers.md index dc9e2432..034438a5 100644 --- a/old_docs/API_docs_v51/methods/messages_getAllStickers.md +++ b/old_docs/API_docs_v51/methods/messages_getAllStickers.md @@ -23,13 +23,10 @@ description: messages.getAllStickers parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v51/methods/messages_getBotCallbackAnswer.md b/old_docs/API_docs_v51/methods/messages_getBotCallbackAnswer.md index 66299f58..b3196b43 100644 --- a/old_docs/API_docs_v51/methods/messages_getBotCallbackAnswer.md +++ b/old_docs/API_docs_v51/methods/messages_getBotCallbackAnswer.md @@ -36,13 +36,10 @@ description: messages.getBotCallbackAnswer parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v51/methods/messages_getChats.md b/old_docs/API_docs_v51/methods/messages_getChats.md index 6fa30cbd..c322613d 100644 --- a/old_docs/API_docs_v51/methods/messages_getChats.md +++ b/old_docs/API_docs_v51/methods/messages_getChats.md @@ -31,16 +31,13 @@ description: messages.getChats parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v51/methods/messages_getDhConfig.md b/old_docs/API_docs_v51/methods/messages_getDhConfig.md index aac3354d..f97684d2 100644 --- a/old_docs/API_docs_v51/methods/messages_getDhConfig.md +++ b/old_docs/API_docs_v51/methods/messages_getDhConfig.md @@ -31,13 +31,10 @@ description: messages.getDhConfig parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v51/methods/messages_getDialogs.md b/old_docs/API_docs_v51/methods/messages_getDialogs.md index 4c278eae..4b86ed71 100644 --- a/old_docs/API_docs_v51/methods/messages_getDialogs.md +++ b/old_docs/API_docs_v51/methods/messages_getDialogs.md @@ -36,13 +36,10 @@ description: messages.getDialogs parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v51/methods/messages_getDocumentByHash.md b/old_docs/API_docs_v51/methods/messages_getDocumentByHash.md index dda54bdd..3902ac44 100644 --- a/old_docs/API_docs_v51/methods/messages_getDocumentByHash.md +++ b/old_docs/API_docs_v51/methods/messages_getDocumentByHash.md @@ -32,16 +32,13 @@ description: messages.getDocumentByHash parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v51/methods/messages_getHistory.md b/old_docs/API_docs_v51/methods/messages_getHistory.md index a48a465e..4c3ef2ee 100644 --- a/old_docs/API_docs_v51/methods/messages_getHistory.md +++ b/old_docs/API_docs_v51/methods/messages_getHistory.md @@ -41,13 +41,10 @@ description: messages.getHistory parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v51/methods/messages_getInlineBotResults.md b/old_docs/API_docs_v51/methods/messages_getInlineBotResults.md index 61366580..61b927fc 100644 --- a/old_docs/API_docs_v51/methods/messages_getInlineBotResults.md +++ b/old_docs/API_docs_v51/methods/messages_getInlineBotResults.md @@ -37,13 +37,10 @@ description: messages.getInlineBotResults parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v51/methods/messages_getMessageEditData.md b/old_docs/API_docs_v51/methods/messages_getMessageEditData.md index a8b135c6..15085153 100644 --- a/old_docs/API_docs_v51/methods/messages_getMessageEditData.md +++ b/old_docs/API_docs_v51/methods/messages_getMessageEditData.md @@ -32,13 +32,10 @@ description: messages.getMessageEditData parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v51/methods/messages_getMessages.md b/old_docs/API_docs_v51/methods/messages_getMessages.md index 5a970246..787c46dd 100644 --- a/old_docs/API_docs_v51/methods/messages_getMessages.md +++ b/old_docs/API_docs_v51/methods/messages_getMessages.md @@ -23,16 +23,13 @@ description: messages.getMessages parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v51/methods/messages_getMessagesViews.md b/old_docs/API_docs_v51/methods/messages_getMessagesViews.md index 263f3f95..de5692dc 100644 --- a/old_docs/API_docs_v51/methods/messages_getMessagesViews.md +++ b/old_docs/API_docs_v51/methods/messages_getMessagesViews.md @@ -34,13 +34,10 @@ description: messages.getMessagesViews parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v51/methods/messages_getPeerSettings.md b/old_docs/API_docs_v51/methods/messages_getPeerSettings.md index d3e3cfc3..2a92f2da 100644 --- a/old_docs/API_docs_v51/methods/messages_getPeerSettings.md +++ b/old_docs/API_docs_v51/methods/messages_getPeerSettings.md @@ -31,13 +31,10 @@ description: messages.getPeerSettings parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v51/methods/messages_getSavedGifs.md b/old_docs/API_docs_v51/methods/messages_getSavedGifs.md index 7cce4ffe..4986d812 100644 --- a/old_docs/API_docs_v51/methods/messages_getSavedGifs.md +++ b/old_docs/API_docs_v51/methods/messages_getSavedGifs.md @@ -23,13 +23,10 @@ description: messages.getSavedGifs parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v51/methods/messages_getStickerSet.md b/old_docs/API_docs_v51/methods/messages_getStickerSet.md index 59f33916..b480e0fe 100644 --- a/old_docs/API_docs_v51/methods/messages_getStickerSet.md +++ b/old_docs/API_docs_v51/methods/messages_getStickerSet.md @@ -30,16 +30,13 @@ description: messages.getStickerSet parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v51/methods/messages_getStickers.md b/old_docs/API_docs_v51/methods/messages_getStickers.md index be61a120..1587cd01 100644 --- a/old_docs/API_docs_v51/methods/messages_getStickers.md +++ b/old_docs/API_docs_v51/methods/messages_getStickers.md @@ -24,16 +24,13 @@ description: messages.getStickers parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v51/methods/messages_getWebPagePreview.md b/old_docs/API_docs_v51/methods/messages_getWebPagePreview.md index a89600b1..d3908933 100644 --- a/old_docs/API_docs_v51/methods/messages_getWebPagePreview.md +++ b/old_docs/API_docs_v51/methods/messages_getWebPagePreview.md @@ -23,13 +23,10 @@ description: messages.getWebPagePreview parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v51/methods/messages_hideReportSpam.md b/old_docs/API_docs_v51/methods/messages_hideReportSpam.md index 2dfe4dd7..5635665c 100644 --- a/old_docs/API_docs_v51/methods/messages_hideReportSpam.md +++ b/old_docs/API_docs_v51/methods/messages_hideReportSpam.md @@ -30,13 +30,10 @@ description: messages.hideReportSpam parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v51/methods/messages_importChatInvite.md b/old_docs/API_docs_v51/methods/messages_importChatInvite.md index 9d77304d..9dcfa56d 100644 --- a/old_docs/API_docs_v51/methods/messages_importChatInvite.md +++ b/old_docs/API_docs_v51/methods/messages_importChatInvite.md @@ -36,13 +36,10 @@ description: messages.importChatInvite parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v51/methods/messages_installStickerSet.md b/old_docs/API_docs_v51/methods/messages_installStickerSet.md index 1969d008..cf1865a8 100644 --- a/old_docs/API_docs_v51/methods/messages_installStickerSet.md +++ b/old_docs/API_docs_v51/methods/messages_installStickerSet.md @@ -31,13 +31,10 @@ description: messages.installStickerSet parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v51/methods/messages_migrateChat.md b/old_docs/API_docs_v51/methods/messages_migrateChat.md index 22d2fbf0..a8274e70 100644 --- a/old_docs/API_docs_v51/methods/messages_migrateChat.md +++ b/old_docs/API_docs_v51/methods/messages_migrateChat.md @@ -32,13 +32,10 @@ description: messages.migrateChat parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v51/methods/messages_readEncryptedHistory.md b/old_docs/API_docs_v51/methods/messages_readEncryptedHistory.md index 766ee07d..f38f6b07 100644 --- a/old_docs/API_docs_v51/methods/messages_readEncryptedHistory.md +++ b/old_docs/API_docs_v51/methods/messages_readEncryptedHistory.md @@ -31,16 +31,13 @@ description: messages.readEncryptedHistory parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v51/methods/messages_readHistory.md b/old_docs/API_docs_v51/methods/messages_readHistory.md index 1aa7830a..fef62130 100644 --- a/old_docs/API_docs_v51/methods/messages_readHistory.md +++ b/old_docs/API_docs_v51/methods/messages_readHistory.md @@ -32,13 +32,10 @@ description: messages.readHistory parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v51/methods/messages_readMessageContents.md b/old_docs/API_docs_v51/methods/messages_readMessageContents.md index 4b1abda0..7a6055fc 100644 --- a/old_docs/API_docs_v51/methods/messages_readMessageContents.md +++ b/old_docs/API_docs_v51/methods/messages_readMessageContents.md @@ -23,13 +23,10 @@ description: messages.readMessageContents parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v51/methods/messages_receivedMessages.md b/old_docs/API_docs_v51/methods/messages_receivedMessages.md index 588ac5cf..e2cf3a2f 100644 --- a/old_docs/API_docs_v51/methods/messages_receivedMessages.md +++ b/old_docs/API_docs_v51/methods/messages_receivedMessages.md @@ -23,13 +23,10 @@ description: messages.receivedMessages parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v51/methods/messages_receivedQueue.md b/old_docs/API_docs_v51/methods/messages_receivedQueue.md index 3c7f1d4f..38f504b3 100644 --- a/old_docs/API_docs_v51/methods/messages_receivedQueue.md +++ b/old_docs/API_docs_v51/methods/messages_receivedQueue.md @@ -30,16 +30,13 @@ description: messages.receivedQueue parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v51/methods/messages_reorderStickerSets.md b/old_docs/API_docs_v51/methods/messages_reorderStickerSets.md index cb35605a..e09057e7 100644 --- a/old_docs/API_docs_v51/methods/messages_reorderStickerSets.md +++ b/old_docs/API_docs_v51/methods/messages_reorderStickerSets.md @@ -23,13 +23,10 @@ description: messages.reorderStickerSets parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v51/methods/messages_reportSpam.md b/old_docs/API_docs_v51/methods/messages_reportSpam.md index bfadb9ab..08c96d44 100644 --- a/old_docs/API_docs_v51/methods/messages_reportSpam.md +++ b/old_docs/API_docs_v51/methods/messages_reportSpam.md @@ -30,13 +30,10 @@ description: messages.reportSpam parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v51/methods/messages_saveGif.md b/old_docs/API_docs_v51/methods/messages_saveGif.md index 31e48632..d86d539a 100644 --- a/old_docs/API_docs_v51/methods/messages_saveGif.md +++ b/old_docs/API_docs_v51/methods/messages_saveGif.md @@ -31,13 +31,10 @@ description: messages.saveGif parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v51/methods/messages_search.md b/old_docs/API_docs_v51/methods/messages_search.md index 8ea63f65..87f282e3 100644 --- a/old_docs/API_docs_v51/methods/messages_search.md +++ b/old_docs/API_docs_v51/methods/messages_search.md @@ -44,13 +44,10 @@ description: messages.search parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v51/methods/messages_searchGifs.md b/old_docs/API_docs_v51/methods/messages_searchGifs.md index 3f4c4838..dd804c99 100644 --- a/old_docs/API_docs_v51/methods/messages_searchGifs.md +++ b/old_docs/API_docs_v51/methods/messages_searchGifs.md @@ -31,13 +31,10 @@ description: messages.searchGifs parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v51/methods/messages_searchGlobal.md b/old_docs/API_docs_v51/methods/messages_searchGlobal.md index 0553dd7a..4b45eed2 100644 --- a/old_docs/API_docs_v51/methods/messages_searchGlobal.md +++ b/old_docs/API_docs_v51/methods/messages_searchGlobal.md @@ -34,13 +34,10 @@ description: messages.searchGlobal parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v51/methods/messages_sendBroadcast.md b/old_docs/API_docs_v51/methods/messages_sendBroadcast.md index ac13d0bf..537166ab 100644 --- a/old_docs/API_docs_v51/methods/messages_sendBroadcast.md +++ b/old_docs/API_docs_v51/methods/messages_sendBroadcast.md @@ -25,16 +25,13 @@ description: messages.sendBroadcast parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v51/methods/messages_sendEncrypted.md b/old_docs/API_docs_v51/methods/messages_sendEncrypted.md index 82eeec92..ba9f796b 100644 --- a/old_docs/API_docs_v51/methods/messages_sendEncrypted.md +++ b/old_docs/API_docs_v51/methods/messages_sendEncrypted.md @@ -34,16 +34,13 @@ description: messages.sendEncrypted parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v51/methods/messages_sendEncryptedFile.md b/old_docs/API_docs_v51/methods/messages_sendEncryptedFile.md index 8f7a73d9..db16bf2d 100644 --- a/old_docs/API_docs_v51/methods/messages_sendEncryptedFile.md +++ b/old_docs/API_docs_v51/methods/messages_sendEncryptedFile.md @@ -32,16 +32,13 @@ description: messages.sendEncryptedFile parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v51/methods/messages_sendEncryptedService.md b/old_docs/API_docs_v51/methods/messages_sendEncryptedService.md index d427f6c3..fd4e2627 100644 --- a/old_docs/API_docs_v51/methods/messages_sendEncryptedService.md +++ b/old_docs/API_docs_v51/methods/messages_sendEncryptedService.md @@ -34,16 +34,13 @@ description: messages.sendEncryptedService parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v51/methods/messages_sendInlineBotResult.md b/old_docs/API_docs_v51/methods/messages_sendInlineBotResult.md index 173075a0..bd76f1b1 100644 --- a/old_docs/API_docs_v51/methods/messages_sendInlineBotResult.md +++ b/old_docs/API_docs_v51/methods/messages_sendInlineBotResult.md @@ -39,13 +39,10 @@ description: messages.sendInlineBotResult parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v51/methods/messages_sendMedia.md b/old_docs/API_docs_v51/methods/messages_sendMedia.md index 7dd36764..f66eb49f 100644 --- a/old_docs/API_docs_v51/methods/messages_sendMedia.md +++ b/old_docs/API_docs_v51/methods/messages_sendMedia.md @@ -59,16 +59,13 @@ description: messages.sendMedia parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v51/methods/messages_sendMessage.md b/old_docs/API_docs_v51/methods/messages_sendMessage.md index 031aaee9..43b16396 100644 --- a/old_docs/API_docs_v51/methods/messages_sendMessage.md +++ b/old_docs/API_docs_v51/methods/messages_sendMessage.md @@ -58,16 +58,13 @@ description: messages.sendMessage parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v51/methods/messages_setBotCallbackAnswer.md b/old_docs/API_docs_v51/methods/messages_setBotCallbackAnswer.md index ea7cdd79..bf8cabb2 100644 --- a/old_docs/API_docs_v51/methods/messages_setBotCallbackAnswer.md +++ b/old_docs/API_docs_v51/methods/messages_setBotCallbackAnswer.md @@ -32,16 +32,13 @@ description: messages.setBotCallbackAnswer parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v51/methods/messages_setEncryptedTyping.md b/old_docs/API_docs_v51/methods/messages_setEncryptedTyping.md index a05b94dd..aeae6ff7 100644 --- a/old_docs/API_docs_v51/methods/messages_setEncryptedTyping.md +++ b/old_docs/API_docs_v51/methods/messages_setEncryptedTyping.md @@ -31,13 +31,10 @@ description: messages.setEncryptedTyping parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v51/methods/messages_setInlineBotResults.md b/old_docs/API_docs_v51/methods/messages_setInlineBotResults.md index 8b5625f3..8b49c4c7 100644 --- a/old_docs/API_docs_v51/methods/messages_setInlineBotResults.md +++ b/old_docs/API_docs_v51/methods/messages_setInlineBotResults.md @@ -46,16 +46,13 @@ description: messages.setInlineBotResults parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v51/methods/messages_setTyping.md b/old_docs/API_docs_v51/methods/messages_setTyping.md index 9ef8caf5..f6b7b7b5 100644 --- a/old_docs/API_docs_v51/methods/messages_setTyping.md +++ b/old_docs/API_docs_v51/methods/messages_setTyping.md @@ -37,16 +37,13 @@ description: messages.setTyping parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v51/methods/messages_startBot.md b/old_docs/API_docs_v51/methods/messages_startBot.md index 8d98e390..b33ab013 100644 --- a/old_docs/API_docs_v51/methods/messages_startBot.md +++ b/old_docs/API_docs_v51/methods/messages_startBot.md @@ -35,13 +35,10 @@ description: messages.startBot parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v51/methods/messages_toggleChatAdmins.md b/old_docs/API_docs_v51/methods/messages_toggleChatAdmins.md index 3bf8a419..97328065 100644 --- a/old_docs/API_docs_v51/methods/messages_toggleChatAdmins.md +++ b/old_docs/API_docs_v51/methods/messages_toggleChatAdmins.md @@ -32,13 +32,10 @@ description: messages.toggleChatAdmins parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v51/methods/messages_uninstallStickerSet.md b/old_docs/API_docs_v51/methods/messages_uninstallStickerSet.md index 6763e64f..76a3e3e2 100644 --- a/old_docs/API_docs_v51/methods/messages_uninstallStickerSet.md +++ b/old_docs/API_docs_v51/methods/messages_uninstallStickerSet.md @@ -30,13 +30,10 @@ description: messages.uninstallStickerSet parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v51/methods/photos_deletePhotos.md b/old_docs/API_docs_v51/methods/photos_deletePhotos.md index e9cd459d..61768b1e 100644 --- a/old_docs/API_docs_v51/methods/photos_deletePhotos.md +++ b/old_docs/API_docs_v51/methods/photos_deletePhotos.md @@ -23,13 +23,10 @@ description: photos.deletePhotos parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v51/methods/photos_getUserPhotos.md b/old_docs/API_docs_v51/methods/photos_getUserPhotos.md index d6c2a380..095363e7 100644 --- a/old_docs/API_docs_v51/methods/photos_getUserPhotos.md +++ b/old_docs/API_docs_v51/methods/photos_getUserPhotos.md @@ -34,16 +34,13 @@ description: photos.getUserPhotos parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v51/methods/photos_updateProfilePhoto.md b/old_docs/API_docs_v51/methods/photos_updateProfilePhoto.md index abb031d4..add6028f 100644 --- a/old_docs/API_docs_v51/methods/photos_updateProfilePhoto.md +++ b/old_docs/API_docs_v51/methods/photos_updateProfilePhoto.md @@ -24,13 +24,10 @@ description: photos.updateProfilePhoto parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v51/methods/photos_uploadProfilePhoto.md b/old_docs/API_docs_v51/methods/photos_uploadProfilePhoto.md index ae20fdfc..048a1d32 100644 --- a/old_docs/API_docs_v51/methods/photos_uploadProfilePhoto.md +++ b/old_docs/API_docs_v51/methods/photos_uploadProfilePhoto.md @@ -37,13 +37,10 @@ description: photos.uploadProfilePhoto parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v51/methods/users_getUsers.md b/old_docs/API_docs_v51/methods/users_getUsers.md index 6a44d258..3a981d57 100644 --- a/old_docs/API_docs_v51/methods/users_getUsers.md +++ b/old_docs/API_docs_v51/methods/users_getUsers.md @@ -33,16 +33,13 @@ description: users.getUsers parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v53/methods/account_changePhone.md b/old_docs/API_docs_v53/methods/account_changePhone.md index 5d1801d0..e47ef6a7 100644 --- a/old_docs/API_docs_v53/methods/account_changePhone.md +++ b/old_docs/API_docs_v53/methods/account_changePhone.md @@ -32,13 +32,10 @@ description: account.changePhone parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v53/methods/account_checkUsername.md b/old_docs/API_docs_v53/methods/account_checkUsername.md index afc59b6c..40cf822f 100644 --- a/old_docs/API_docs_v53/methods/account_checkUsername.md +++ b/old_docs/API_docs_v53/methods/account_checkUsername.md @@ -30,13 +30,10 @@ description: account.checkUsername parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v53/methods/account_deleteAccount.md b/old_docs/API_docs_v53/methods/account_deleteAccount.md index 5abcd0ec..6f1bbda9 100644 --- a/old_docs/API_docs_v53/methods/account_deleteAccount.md +++ b/old_docs/API_docs_v53/methods/account_deleteAccount.md @@ -23,13 +23,10 @@ description: account.deleteAccount parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v53/methods/account_getAccountTTL.md b/old_docs/API_docs_v53/methods/account_getAccountTTL.md index 3520fbef..538b1d7a 100644 --- a/old_docs/API_docs_v53/methods/account_getAccountTTL.md +++ b/old_docs/API_docs_v53/methods/account_getAccountTTL.md @@ -18,13 +18,10 @@ description: account.getAccountTTL parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v53/methods/account_getAuthorizations.md b/old_docs/API_docs_v53/methods/account_getAuthorizations.md index 91bbce5e..f138d517 100644 --- a/old_docs/API_docs_v53/methods/account_getAuthorizations.md +++ b/old_docs/API_docs_v53/methods/account_getAuthorizations.md @@ -18,13 +18,10 @@ description: account.getAuthorizations parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v53/methods/account_getNotifySettings.md b/old_docs/API_docs_v53/methods/account_getNotifySettings.md index 8ee710d8..a48eed2f 100644 --- a/old_docs/API_docs_v53/methods/account_getNotifySettings.md +++ b/old_docs/API_docs_v53/methods/account_getNotifySettings.md @@ -30,13 +30,10 @@ description: account.getNotifySettings parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v53/methods/account_getPassword.md b/old_docs/API_docs_v53/methods/account_getPassword.md index 4d9fd015..1abf6174 100644 --- a/old_docs/API_docs_v53/methods/account_getPassword.md +++ b/old_docs/API_docs_v53/methods/account_getPassword.md @@ -18,13 +18,10 @@ description: account.getPassword parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v53/methods/account_getPasswordSettings.md b/old_docs/API_docs_v53/methods/account_getPasswordSettings.md index 02cb77f7..aec5b989 100644 --- a/old_docs/API_docs_v53/methods/account_getPasswordSettings.md +++ b/old_docs/API_docs_v53/methods/account_getPasswordSettings.md @@ -30,13 +30,10 @@ description: account.getPasswordSettings parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v53/methods/account_getPrivacy.md b/old_docs/API_docs_v53/methods/account_getPrivacy.md index 52786b79..8bbe9795 100644 --- a/old_docs/API_docs_v53/methods/account_getPrivacy.md +++ b/old_docs/API_docs_v53/methods/account_getPrivacy.md @@ -30,13 +30,10 @@ description: account.getPrivacy parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v53/methods/account_getWallPapers.md b/old_docs/API_docs_v53/methods/account_getWallPapers.md index 88c8a701..a71543d0 100644 --- a/old_docs/API_docs_v53/methods/account_getWallPapers.md +++ b/old_docs/API_docs_v53/methods/account_getWallPapers.md @@ -18,13 +18,10 @@ description: account.getWallPapers parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v53/methods/account_registerDevice.md b/old_docs/API_docs_v53/methods/account_registerDevice.md index 3cc7f98d..8be04ad2 100644 --- a/old_docs/API_docs_v53/methods/account_registerDevice.md +++ b/old_docs/API_docs_v53/methods/account_registerDevice.md @@ -31,13 +31,10 @@ description: account.registerDevice parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v53/methods/account_reportPeer.md b/old_docs/API_docs_v53/methods/account_reportPeer.md index 1545c3b8..1ae9f4d4 100644 --- a/old_docs/API_docs_v53/methods/account_reportPeer.md +++ b/old_docs/API_docs_v53/methods/account_reportPeer.md @@ -31,13 +31,10 @@ description: account.reportPeer parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v53/methods/account_resetAuthorization.md b/old_docs/API_docs_v53/methods/account_resetAuthorization.md index e44334f2..0438cba3 100644 --- a/old_docs/API_docs_v53/methods/account_resetAuthorization.md +++ b/old_docs/API_docs_v53/methods/account_resetAuthorization.md @@ -30,13 +30,10 @@ description: account.resetAuthorization parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v53/methods/account_resetNotifySettings.md b/old_docs/API_docs_v53/methods/account_resetNotifySettings.md index 155ede68..92db4f4f 100644 --- a/old_docs/API_docs_v53/methods/account_resetNotifySettings.md +++ b/old_docs/API_docs_v53/methods/account_resetNotifySettings.md @@ -18,13 +18,10 @@ description: account.resetNotifySettings parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v53/methods/account_sendChangePhoneCode.md b/old_docs/API_docs_v53/methods/account_sendChangePhoneCode.md index 4be218f2..017b5f7f 100644 --- a/old_docs/API_docs_v53/methods/account_sendChangePhoneCode.md +++ b/old_docs/API_docs_v53/methods/account_sendChangePhoneCode.md @@ -32,13 +32,10 @@ description: account.sendChangePhoneCode parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v53/methods/account_setAccountTTL.md b/old_docs/API_docs_v53/methods/account_setAccountTTL.md index f06eb676..d08f59fb 100644 --- a/old_docs/API_docs_v53/methods/account_setAccountTTL.md +++ b/old_docs/API_docs_v53/methods/account_setAccountTTL.md @@ -30,13 +30,10 @@ description: account.setAccountTTL parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v53/methods/account_setPrivacy.md b/old_docs/API_docs_v53/methods/account_setPrivacy.md index 56aebbcc..401aa71c 100644 --- a/old_docs/API_docs_v53/methods/account_setPrivacy.md +++ b/old_docs/API_docs_v53/methods/account_setPrivacy.md @@ -31,13 +31,10 @@ description: account.setPrivacy parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v53/methods/account_unregisterDevice.md b/old_docs/API_docs_v53/methods/account_unregisterDevice.md index 41899b6e..283ec7d2 100644 --- a/old_docs/API_docs_v53/methods/account_unregisterDevice.md +++ b/old_docs/API_docs_v53/methods/account_unregisterDevice.md @@ -31,13 +31,10 @@ description: account.unregisterDevice parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v53/methods/account_updateDeviceLocked.md b/old_docs/API_docs_v53/methods/account_updateDeviceLocked.md index 37aeb59d..ae6125a5 100644 --- a/old_docs/API_docs_v53/methods/account_updateDeviceLocked.md +++ b/old_docs/API_docs_v53/methods/account_updateDeviceLocked.md @@ -23,13 +23,10 @@ description: account.updateDeviceLocked parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v53/methods/account_updateNotifySettings.md b/old_docs/API_docs_v53/methods/account_updateNotifySettings.md index 8389b5c2..fb096250 100644 --- a/old_docs/API_docs_v53/methods/account_updateNotifySettings.md +++ b/old_docs/API_docs_v53/methods/account_updateNotifySettings.md @@ -31,13 +31,10 @@ description: account.updateNotifySettings parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v53/methods/account_updatePasswordSettings.md b/old_docs/API_docs_v53/methods/account_updatePasswordSettings.md index b7c8da4b..ffa8dcd9 100644 --- a/old_docs/API_docs_v53/methods/account_updatePasswordSettings.md +++ b/old_docs/API_docs_v53/methods/account_updatePasswordSettings.md @@ -34,13 +34,10 @@ description: account.updatePasswordSettings parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v53/methods/account_updateProfile.md b/old_docs/API_docs_v53/methods/account_updateProfile.md index a50eaea5..b3d468d1 100644 --- a/old_docs/API_docs_v53/methods/account_updateProfile.md +++ b/old_docs/API_docs_v53/methods/account_updateProfile.md @@ -33,13 +33,10 @@ description: account.updateProfile parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v53/methods/account_updateStatus.md b/old_docs/API_docs_v53/methods/account_updateStatus.md index 7204e582..c8fa0a79 100644 --- a/old_docs/API_docs_v53/methods/account_updateStatus.md +++ b/old_docs/API_docs_v53/methods/account_updateStatus.md @@ -30,13 +30,10 @@ description: account.updateStatus parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v53/methods/account_updateUsername.md b/old_docs/API_docs_v53/methods/account_updateUsername.md index 22be2fd4..2b7576a5 100644 --- a/old_docs/API_docs_v53/methods/account_updateUsername.md +++ b/old_docs/API_docs_v53/methods/account_updateUsername.md @@ -32,13 +32,10 @@ description: account.updateUsername parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v53/methods/auth_bindTempAuthKey.md b/old_docs/API_docs_v53/methods/auth_bindTempAuthKey.md index e3d72dd5..7419abb0 100644 --- a/old_docs/API_docs_v53/methods/auth_bindTempAuthKey.md +++ b/old_docs/API_docs_v53/methods/auth_bindTempAuthKey.md @@ -35,16 +35,13 @@ description: auth.bindTempAuthKey parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v53/methods/auth_cancelCode.md b/old_docs/API_docs_v53/methods/auth_cancelCode.md index dc390329..05d927a1 100644 --- a/old_docs/API_docs_v53/methods/auth_cancelCode.md +++ b/old_docs/API_docs_v53/methods/auth_cancelCode.md @@ -31,13 +31,10 @@ description: auth.cancelCode parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v53/methods/auth_checkPassword.md b/old_docs/API_docs_v53/methods/auth_checkPassword.md index d5559186..6b6b21cc 100644 --- a/old_docs/API_docs_v53/methods/auth_checkPassword.md +++ b/old_docs/API_docs_v53/methods/auth_checkPassword.md @@ -30,13 +30,10 @@ description: auth.checkPassword parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v53/methods/auth_checkPhone.md b/old_docs/API_docs_v53/methods/auth_checkPhone.md index 3455904d..f6cac2e6 100644 --- a/old_docs/API_docs_v53/methods/auth_checkPhone.md +++ b/old_docs/API_docs_v53/methods/auth_checkPhone.md @@ -32,13 +32,10 @@ description: auth.checkPhone parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v53/methods/auth_exportAuthorization.md b/old_docs/API_docs_v53/methods/auth_exportAuthorization.md index 44c45b70..cbc8203b 100644 --- a/old_docs/API_docs_v53/methods/auth_exportAuthorization.md +++ b/old_docs/API_docs_v53/methods/auth_exportAuthorization.md @@ -30,16 +30,13 @@ description: auth.exportAuthorization parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v53/methods/auth_importAuthorization.md b/old_docs/API_docs_v53/methods/auth_importAuthorization.md index e0fd534f..22166510 100644 --- a/old_docs/API_docs_v53/methods/auth_importAuthorization.md +++ b/old_docs/API_docs_v53/methods/auth_importAuthorization.md @@ -32,16 +32,13 @@ description: auth.importAuthorization parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v53/methods/auth_recoverPassword.md b/old_docs/API_docs_v53/methods/auth_recoverPassword.md index c2ce3fed..931e99fd 100644 --- a/old_docs/API_docs_v53/methods/auth_recoverPassword.md +++ b/old_docs/API_docs_v53/methods/auth_recoverPassword.md @@ -30,13 +30,10 @@ description: auth.recoverPassword parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v53/methods/auth_requestPasswordRecovery.md b/old_docs/API_docs_v53/methods/auth_requestPasswordRecovery.md index 101b1cf7..c6babcd9 100644 --- a/old_docs/API_docs_v53/methods/auth_requestPasswordRecovery.md +++ b/old_docs/API_docs_v53/methods/auth_requestPasswordRecovery.md @@ -25,13 +25,10 @@ description: auth.requestPasswordRecovery parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v53/methods/auth_resendCode.md b/old_docs/API_docs_v53/methods/auth_resendCode.md index 14d08ddd..df4803b8 100644 --- a/old_docs/API_docs_v53/methods/auth_resendCode.md +++ b/old_docs/API_docs_v53/methods/auth_resendCode.md @@ -31,13 +31,10 @@ description: auth.resendCode parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v53/methods/auth_resetAuthorizations.md b/old_docs/API_docs_v53/methods/auth_resetAuthorizations.md index 87a39a22..fe297fa7 100644 --- a/old_docs/API_docs_v53/methods/auth_resetAuthorizations.md +++ b/old_docs/API_docs_v53/methods/auth_resetAuthorizations.md @@ -25,13 +25,10 @@ description: auth.resetAuthorizations parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v53/methods/auth_sendInvites.md b/old_docs/API_docs_v53/methods/auth_sendInvites.md index 604fc65d..ad9636c5 100644 --- a/old_docs/API_docs_v53/methods/auth_sendInvites.md +++ b/old_docs/API_docs_v53/methods/auth_sendInvites.md @@ -31,13 +31,10 @@ description: auth.sendInvites parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v53/methods/channels_checkUsername.md b/old_docs/API_docs_v53/methods/channels_checkUsername.md index d6ea876d..e29ee107 100644 --- a/old_docs/API_docs_v53/methods/channels_checkUsername.md +++ b/old_docs/API_docs_v53/methods/channels_checkUsername.md @@ -33,13 +33,10 @@ description: channels.checkUsername parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v53/methods/channels_createChannel.md b/old_docs/API_docs_v53/methods/channels_createChannel.md index 9ba02e9e..58808b73 100644 --- a/old_docs/API_docs_v53/methods/channels_createChannel.md +++ b/old_docs/API_docs_v53/methods/channels_createChannel.md @@ -34,13 +34,10 @@ description: channels.createChannel parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v53/methods/channels_deleteChannel.md b/old_docs/API_docs_v53/methods/channels_deleteChannel.md index 912ab080..532f3c6c 100644 --- a/old_docs/API_docs_v53/methods/channels_deleteChannel.md +++ b/old_docs/API_docs_v53/methods/channels_deleteChannel.md @@ -31,13 +31,10 @@ description: channels.deleteChannel parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v53/methods/channels_deleteMessages.md b/old_docs/API_docs_v53/methods/channels_deleteMessages.md index b3481294..a42a47a5 100644 --- a/old_docs/API_docs_v53/methods/channels_deleteMessages.md +++ b/old_docs/API_docs_v53/methods/channels_deleteMessages.md @@ -33,16 +33,13 @@ description: channels.deleteMessages parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v53/methods/channels_deleteUserHistory.md b/old_docs/API_docs_v53/methods/channels_deleteUserHistory.md index 66843269..73494485 100644 --- a/old_docs/API_docs_v53/methods/channels_deleteUserHistory.md +++ b/old_docs/API_docs_v53/methods/channels_deleteUserHistory.md @@ -32,13 +32,10 @@ description: channels.deleteUserHistory parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v53/methods/channels_editAbout.md b/old_docs/API_docs_v53/methods/channels_editAbout.md index 4c759a8a..1c3ce933 100644 --- a/old_docs/API_docs_v53/methods/channels_editAbout.md +++ b/old_docs/API_docs_v53/methods/channels_editAbout.md @@ -34,16 +34,13 @@ description: channels.editAbout parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v53/methods/channels_editAdmin.md b/old_docs/API_docs_v53/methods/channels_editAdmin.md index 7707bdfe..42184227 100644 --- a/old_docs/API_docs_v53/methods/channels_editAdmin.md +++ b/old_docs/API_docs_v53/methods/channels_editAdmin.md @@ -41,16 +41,13 @@ description: channels.editAdmin parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v53/methods/channels_editPhoto.md b/old_docs/API_docs_v53/methods/channels_editPhoto.md index 99873537..4a4aeb03 100644 --- a/old_docs/API_docs_v53/methods/channels_editPhoto.md +++ b/old_docs/API_docs_v53/methods/channels_editPhoto.md @@ -33,16 +33,13 @@ description: channels.editPhoto parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v53/methods/channels_editTitle.md b/old_docs/API_docs_v53/methods/channels_editTitle.md index 04e8ce12..8a69d09b 100644 --- a/old_docs/API_docs_v53/methods/channels_editTitle.md +++ b/old_docs/API_docs_v53/methods/channels_editTitle.md @@ -33,16 +33,13 @@ description: channels.editTitle parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v53/methods/channels_exportInvite.md b/old_docs/API_docs_v53/methods/channels_exportInvite.md index 2ed80f6c..79dc6401 100644 --- a/old_docs/API_docs_v53/methods/channels_exportInvite.md +++ b/old_docs/API_docs_v53/methods/channels_exportInvite.md @@ -32,16 +32,13 @@ description: channels.exportInvite parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v53/methods/channels_exportMessageLink.md b/old_docs/API_docs_v53/methods/channels_exportMessageLink.md index 9831c9c0..5b824859 100644 --- a/old_docs/API_docs_v53/methods/channels_exportMessageLink.md +++ b/old_docs/API_docs_v53/methods/channels_exportMessageLink.md @@ -31,13 +31,10 @@ description: channels.exportMessageLink parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v53/methods/channels_getChannels.md b/old_docs/API_docs_v53/methods/channels_getChannels.md index 13304938..e80aa6a6 100644 --- a/old_docs/API_docs_v53/methods/channels_getChannels.md +++ b/old_docs/API_docs_v53/methods/channels_getChannels.md @@ -32,16 +32,13 @@ description: channels.getChannels parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v53/methods/channels_getMessages.md b/old_docs/API_docs_v53/methods/channels_getMessages.md index 5480dd86..dc392773 100644 --- a/old_docs/API_docs_v53/methods/channels_getMessages.md +++ b/old_docs/API_docs_v53/methods/channels_getMessages.md @@ -33,16 +33,13 @@ description: channels.getMessages parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v53/methods/channels_getParticipant.md b/old_docs/API_docs_v53/methods/channels_getParticipant.md index 8c7e3cbd..001bf115 100644 --- a/old_docs/API_docs_v53/methods/channels_getParticipant.md +++ b/old_docs/API_docs_v53/methods/channels_getParticipant.md @@ -35,16 +35,13 @@ description: channels.getParticipant parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v53/methods/channels_inviteToChannel.md b/old_docs/API_docs_v53/methods/channels_inviteToChannel.md index cf5480e0..2448fb84 100644 --- a/old_docs/API_docs_v53/methods/channels_inviteToChannel.md +++ b/old_docs/API_docs_v53/methods/channels_inviteToChannel.md @@ -46,13 +46,10 @@ description: channels.inviteToChannel parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v53/methods/channels_joinChannel.md b/old_docs/API_docs_v53/methods/channels_joinChannel.md index f31730a1..e746cf48 100644 --- a/old_docs/API_docs_v53/methods/channels_joinChannel.md +++ b/old_docs/API_docs_v53/methods/channels_joinChannel.md @@ -32,13 +32,10 @@ description: channels.joinChannel parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v53/methods/channels_kickFromChannel.md b/old_docs/API_docs_v53/methods/channels_kickFromChannel.md index c903caa4..c85833ce 100644 --- a/old_docs/API_docs_v53/methods/channels_kickFromChannel.md +++ b/old_docs/API_docs_v53/methods/channels_kickFromChannel.md @@ -25,16 +25,13 @@ description: channels.kickFromChannel parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v53/methods/channels_leaveChannel.md b/old_docs/API_docs_v53/methods/channels_leaveChannel.md index 12902f6d..ff244ded 100644 --- a/old_docs/API_docs_v53/methods/channels_leaveChannel.md +++ b/old_docs/API_docs_v53/methods/channels_leaveChannel.md @@ -34,16 +34,13 @@ description: channels.leaveChannel parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v53/methods/channels_readHistory.md b/old_docs/API_docs_v53/methods/channels_readHistory.md index be979101..6fc6ec0e 100644 --- a/old_docs/API_docs_v53/methods/channels_readHistory.md +++ b/old_docs/API_docs_v53/methods/channels_readHistory.md @@ -32,13 +32,10 @@ description: channels.readHistory parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v53/methods/channels_reportSpam.md b/old_docs/API_docs_v53/methods/channels_reportSpam.md index 22f34443..a37a5833 100644 --- a/old_docs/API_docs_v53/methods/channels_reportSpam.md +++ b/old_docs/API_docs_v53/methods/channels_reportSpam.md @@ -33,13 +33,10 @@ description: channels.reportSpam parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v53/methods/channels_toggleInvites.md b/old_docs/API_docs_v53/methods/channels_toggleInvites.md index c2715b32..d0ae1136 100644 --- a/old_docs/API_docs_v53/methods/channels_toggleInvites.md +++ b/old_docs/API_docs_v53/methods/channels_toggleInvites.md @@ -33,13 +33,10 @@ description: channels.toggleInvites parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v53/methods/channels_toggleSignatures.md b/old_docs/API_docs_v53/methods/channels_toggleSignatures.md index a214b849..6477bc6d 100644 --- a/old_docs/API_docs_v53/methods/channels_toggleSignatures.md +++ b/old_docs/API_docs_v53/methods/channels_toggleSignatures.md @@ -31,13 +31,10 @@ description: channels.toggleSignatures parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v53/methods/channels_updatePinnedMessage.md b/old_docs/API_docs_v53/methods/channels_updatePinnedMessage.md index 6dcabf71..37a0a20d 100644 --- a/old_docs/API_docs_v53/methods/channels_updatePinnedMessage.md +++ b/old_docs/API_docs_v53/methods/channels_updatePinnedMessage.md @@ -35,16 +35,13 @@ description: channels.updatePinnedMessage parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v53/methods/channels_updateUsername.md b/old_docs/API_docs_v53/methods/channels_updateUsername.md index c2ede724..1f1f111e 100644 --- a/old_docs/API_docs_v53/methods/channels_updateUsername.md +++ b/old_docs/API_docs_v53/methods/channels_updateUsername.md @@ -35,13 +35,10 @@ description: channels.updateUsername parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v53/methods/contacts_block.md b/old_docs/API_docs_v53/methods/contacts_block.md index d9d58e37..1c7cbe26 100644 --- a/old_docs/API_docs_v53/methods/contacts_block.md +++ b/old_docs/API_docs_v53/methods/contacts_block.md @@ -30,13 +30,10 @@ description: contacts.block parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v53/methods/contacts_deleteContact.md b/old_docs/API_docs_v53/methods/contacts_deleteContact.md index cd8c17ad..987a1be0 100644 --- a/old_docs/API_docs_v53/methods/contacts_deleteContact.md +++ b/old_docs/API_docs_v53/methods/contacts_deleteContact.md @@ -30,13 +30,10 @@ description: contacts.deleteContact parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v53/methods/contacts_deleteContacts.md b/old_docs/API_docs_v53/methods/contacts_deleteContacts.md index fc65880d..67a922ed 100644 --- a/old_docs/API_docs_v53/methods/contacts_deleteContacts.md +++ b/old_docs/API_docs_v53/methods/contacts_deleteContacts.md @@ -31,13 +31,10 @@ description: contacts.deleteContacts parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v53/methods/contacts_exportCard.md b/old_docs/API_docs_v53/methods/contacts_exportCard.md index 63508076..bf6d1f9f 100644 --- a/old_docs/API_docs_v53/methods/contacts_exportCard.md +++ b/old_docs/API_docs_v53/methods/contacts_exportCard.md @@ -18,13 +18,10 @@ description: contacts.exportCard parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v53/methods/contacts_getBlocked.md b/old_docs/API_docs_v53/methods/contacts_getBlocked.md index f50792b4..faa719da 100644 --- a/old_docs/API_docs_v53/methods/contacts_getBlocked.md +++ b/old_docs/API_docs_v53/methods/contacts_getBlocked.md @@ -24,13 +24,10 @@ description: contacts.getBlocked parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v53/methods/contacts_getContacts.md b/old_docs/API_docs_v53/methods/contacts_getContacts.md index 71313bf2..a6779111 100644 --- a/old_docs/API_docs_v53/methods/contacts_getContacts.md +++ b/old_docs/API_docs_v53/methods/contacts_getContacts.md @@ -23,13 +23,10 @@ description: contacts.getContacts parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v53/methods/contacts_getStatuses.md b/old_docs/API_docs_v53/methods/contacts_getStatuses.md index d914e08d..9bb7f263 100644 --- a/old_docs/API_docs_v53/methods/contacts_getStatuses.md +++ b/old_docs/API_docs_v53/methods/contacts_getStatuses.md @@ -18,13 +18,10 @@ description: contacts.getStatuses parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v53/methods/contacts_getTopPeers.md b/old_docs/API_docs_v53/methods/contacts_getTopPeers.md index 1caa1d77..d29f6e02 100644 --- a/old_docs/API_docs_v53/methods/contacts_getTopPeers.md +++ b/old_docs/API_docs_v53/methods/contacts_getTopPeers.md @@ -37,13 +37,10 @@ description: contacts.getTopPeers parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v53/methods/contacts_importCard.md b/old_docs/API_docs_v53/methods/contacts_importCard.md index a6abf56d..7a2f34e1 100644 --- a/old_docs/API_docs_v53/methods/contacts_importCard.md +++ b/old_docs/API_docs_v53/methods/contacts_importCard.md @@ -31,13 +31,10 @@ description: contacts.importCard parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v53/methods/contacts_importContacts.md b/old_docs/API_docs_v53/methods/contacts_importContacts.md index db2051ac..2f070493 100644 --- a/old_docs/API_docs_v53/methods/contacts_importContacts.md +++ b/old_docs/API_docs_v53/methods/contacts_importContacts.md @@ -24,13 +24,10 @@ description: contacts.importContacts parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v53/methods/contacts_resetTopPeerRating.md b/old_docs/API_docs_v53/methods/contacts_resetTopPeerRating.md index 738494b2..711ea0cb 100644 --- a/old_docs/API_docs_v53/methods/contacts_resetTopPeerRating.md +++ b/old_docs/API_docs_v53/methods/contacts_resetTopPeerRating.md @@ -31,13 +31,10 @@ description: contacts.resetTopPeerRating parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v53/methods/contacts_search.md b/old_docs/API_docs_v53/methods/contacts_search.md index 0203b160..70a0635e 100644 --- a/old_docs/API_docs_v53/methods/contacts_search.md +++ b/old_docs/API_docs_v53/methods/contacts_search.md @@ -33,13 +33,10 @@ description: contacts.search parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v53/methods/contacts_unblock.md b/old_docs/API_docs_v53/methods/contacts_unblock.md index a1977c24..9c01e42a 100644 --- a/old_docs/API_docs_v53/methods/contacts_unblock.md +++ b/old_docs/API_docs_v53/methods/contacts_unblock.md @@ -30,13 +30,10 @@ description: contacts.unblock parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v53/methods/help_getAppChangelog.md b/old_docs/API_docs_v53/methods/help_getAppChangelog.md index b0ab53f1..0f8a12bd 100644 --- a/old_docs/API_docs_v53/methods/help_getAppChangelog.md +++ b/old_docs/API_docs_v53/methods/help_getAppChangelog.md @@ -18,13 +18,10 @@ description: help.getAppChangelog parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v53/methods/help_getAppUpdate.md b/old_docs/API_docs_v53/methods/help_getAppUpdate.md index 0871f59d..89ff22c3 100644 --- a/old_docs/API_docs_v53/methods/help_getAppUpdate.md +++ b/old_docs/API_docs_v53/methods/help_getAppUpdate.md @@ -18,13 +18,10 @@ description: help.getAppUpdate parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v53/methods/help_getConfig.md b/old_docs/API_docs_v53/methods/help_getConfig.md index e3648b5a..bb51b362 100644 --- a/old_docs/API_docs_v53/methods/help_getConfig.md +++ b/old_docs/API_docs_v53/methods/help_getConfig.md @@ -25,16 +25,13 @@ description: help.getConfig parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v53/methods/help_getInviteText.md b/old_docs/API_docs_v53/methods/help_getInviteText.md index 4bcbb77d..6d2674d6 100644 --- a/old_docs/API_docs_v53/methods/help_getInviteText.md +++ b/old_docs/API_docs_v53/methods/help_getInviteText.md @@ -18,13 +18,10 @@ description: help.getInviteText parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v53/methods/help_getNearestDc.md b/old_docs/API_docs_v53/methods/help_getNearestDc.md index c6f5c555..6d8ed3f7 100644 --- a/old_docs/API_docs_v53/methods/help_getNearestDc.md +++ b/old_docs/API_docs_v53/methods/help_getNearestDc.md @@ -18,13 +18,10 @@ description: help.getNearestDc parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v53/methods/help_getSupport.md b/old_docs/API_docs_v53/methods/help_getSupport.md index 209edf03..ca8db03c 100644 --- a/old_docs/API_docs_v53/methods/help_getSupport.md +++ b/old_docs/API_docs_v53/methods/help_getSupport.md @@ -18,13 +18,10 @@ description: help.getSupport parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v53/methods/help_getTermsOfService.md b/old_docs/API_docs_v53/methods/help_getTermsOfService.md index 8bc2e2fa..eb686506 100644 --- a/old_docs/API_docs_v53/methods/help_getTermsOfService.md +++ b/old_docs/API_docs_v53/methods/help_getTermsOfService.md @@ -18,13 +18,10 @@ description: help.getTermsOfService parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v53/methods/help_saveAppLog.md b/old_docs/API_docs_v53/methods/help_saveAppLog.md index 4f06434c..741b9aa1 100644 --- a/old_docs/API_docs_v53/methods/help_saveAppLog.md +++ b/old_docs/API_docs_v53/methods/help_saveAppLog.md @@ -23,13 +23,10 @@ description: help.saveAppLog parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v53/methods/initConnection.md b/old_docs/API_docs_v53/methods/initConnection.md index 0d22a1cb..c0307677 100644 --- a/old_docs/API_docs_v53/methods/initConnection.md +++ b/old_docs/API_docs_v53/methods/initConnection.md @@ -36,16 +36,13 @@ description: initConnection parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v53/methods/invokeAfterMsg.md b/old_docs/API_docs_v53/methods/invokeAfterMsg.md index c139fe8c..a382429e 100644 --- a/old_docs/API_docs_v53/methods/invokeAfterMsg.md +++ b/old_docs/API_docs_v53/methods/invokeAfterMsg.md @@ -24,16 +24,13 @@ description: invokeAfterMsg parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v53/methods/invokeAfterMsgs.md b/old_docs/API_docs_v53/methods/invokeAfterMsgs.md index 35004296..169eedaf 100644 --- a/old_docs/API_docs_v53/methods/invokeAfterMsgs.md +++ b/old_docs/API_docs_v53/methods/invokeAfterMsgs.md @@ -24,16 +24,13 @@ description: invokeAfterMsgs parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v53/methods/invokeWithLayer.md b/old_docs/API_docs_v53/methods/invokeWithLayer.md index 706036c4..d9a2c74c 100644 --- a/old_docs/API_docs_v53/methods/invokeWithLayer.md +++ b/old_docs/API_docs_v53/methods/invokeWithLayer.md @@ -41,16 +41,13 @@ description: invokeWithLayer parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v53/methods/invokeWithoutUpdates.md b/old_docs/API_docs_v53/methods/invokeWithoutUpdates.md index 10c6bfcf..f7d01765 100644 --- a/old_docs/API_docs_v53/methods/invokeWithoutUpdates.md +++ b/old_docs/API_docs_v53/methods/invokeWithoutUpdates.md @@ -23,16 +23,13 @@ description: invokeWithoutUpdates parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v53/methods/messages_addChatUser.md b/old_docs/API_docs_v53/methods/messages_addChatUser.md index 00da5a61..b9e6243d 100644 --- a/old_docs/API_docs_v53/methods/messages_addChatUser.md +++ b/old_docs/API_docs_v53/methods/messages_addChatUser.md @@ -40,13 +40,10 @@ description: messages.addChatUser parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v53/methods/messages_checkChatInvite.md b/old_docs/API_docs_v53/methods/messages_checkChatInvite.md index c5eb1c06..c4489469 100644 --- a/old_docs/API_docs_v53/methods/messages_checkChatInvite.md +++ b/old_docs/API_docs_v53/methods/messages_checkChatInvite.md @@ -32,13 +32,10 @@ description: messages.checkChatInvite parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v53/methods/messages_createChat.md b/old_docs/API_docs_v53/methods/messages_createChat.md index c643a022..c6c8f420 100644 --- a/old_docs/API_docs_v53/methods/messages_createChat.md +++ b/old_docs/API_docs_v53/methods/messages_createChat.md @@ -32,13 +32,10 @@ description: messages.createChat parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v53/methods/messages_deleteChatUser.md b/old_docs/API_docs_v53/methods/messages_deleteChatUser.md index 3d75d9cf..4b8c2aa5 100644 --- a/old_docs/API_docs_v53/methods/messages_deleteChatUser.md +++ b/old_docs/API_docs_v53/methods/messages_deleteChatUser.md @@ -33,16 +33,13 @@ description: messages.deleteChatUser parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v53/methods/messages_deleteHistory.md b/old_docs/API_docs_v53/methods/messages_deleteHistory.md index ce6ba6e7..ebe2c89c 100644 --- a/old_docs/API_docs_v53/methods/messages_deleteHistory.md +++ b/old_docs/API_docs_v53/methods/messages_deleteHistory.md @@ -32,13 +32,10 @@ description: messages.deleteHistory parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v53/methods/messages_deleteMessages.md b/old_docs/API_docs_v53/methods/messages_deleteMessages.md index 65dbbc4a..38b3ca09 100644 --- a/old_docs/API_docs_v53/methods/messages_deleteMessages.md +++ b/old_docs/API_docs_v53/methods/messages_deleteMessages.md @@ -30,16 +30,13 @@ description: messages.deleteMessages parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v53/methods/messages_editChatAdmin.md b/old_docs/API_docs_v53/methods/messages_editChatAdmin.md index e64d9da5..1b3ffa9f 100644 --- a/old_docs/API_docs_v53/methods/messages_editChatAdmin.md +++ b/old_docs/API_docs_v53/methods/messages_editChatAdmin.md @@ -32,13 +32,10 @@ description: messages.editChatAdmin parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v53/methods/messages_editChatPhoto.md b/old_docs/API_docs_v53/methods/messages_editChatPhoto.md index d225962d..8c5d9d47 100644 --- a/old_docs/API_docs_v53/methods/messages_editChatPhoto.md +++ b/old_docs/API_docs_v53/methods/messages_editChatPhoto.md @@ -35,16 +35,13 @@ description: messages.editChatPhoto parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v53/methods/messages_editChatTitle.md b/old_docs/API_docs_v53/methods/messages_editChatTitle.md index 5cb1c6d7..238c6d72 100644 --- a/old_docs/API_docs_v53/methods/messages_editChatTitle.md +++ b/old_docs/API_docs_v53/methods/messages_editChatTitle.md @@ -32,16 +32,13 @@ description: messages.editChatTitle parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v53/methods/messages_editInlineBotMessage.md b/old_docs/API_docs_v53/methods/messages_editInlineBotMessage.md index 621c81a3..c3489f9d 100644 --- a/old_docs/API_docs_v53/methods/messages_editInlineBotMessage.md +++ b/old_docs/API_docs_v53/methods/messages_editInlineBotMessage.md @@ -36,16 +36,13 @@ description: messages.editInlineBotMessage parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v53/methods/messages_editMessage.md b/old_docs/API_docs_v53/methods/messages_editMessage.md index b8cdda81..3a23c9ac 100644 --- a/old_docs/API_docs_v53/methods/messages_editMessage.md +++ b/old_docs/API_docs_v53/methods/messages_editMessage.md @@ -45,16 +45,13 @@ description: messages.editMessage parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v53/methods/messages_exportChatInvite.md b/old_docs/API_docs_v53/methods/messages_exportChatInvite.md index 4a6e28ff..78f2ff86 100644 --- a/old_docs/API_docs_v53/methods/messages_exportChatInvite.md +++ b/old_docs/API_docs_v53/methods/messages_exportChatInvite.md @@ -30,13 +30,10 @@ description: messages.exportChatInvite parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v53/methods/messages_forwardMessage.md b/old_docs/API_docs_v53/methods/messages_forwardMessage.md index 4e2362db..fbdbc955 100644 --- a/old_docs/API_docs_v53/methods/messages_forwardMessage.md +++ b/old_docs/API_docs_v53/methods/messages_forwardMessage.md @@ -34,16 +34,13 @@ description: messages.forwardMessage parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v53/methods/messages_forwardMessages.md b/old_docs/API_docs_v53/methods/messages_forwardMessages.md index 3f77a986..4ce0002f 100644 --- a/old_docs/API_docs_v53/methods/messages_forwardMessages.md +++ b/old_docs/API_docs_v53/methods/messages_forwardMessages.md @@ -55,16 +55,13 @@ description: messages.forwardMessages parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v53/methods/messages_getAllDrafts.md b/old_docs/API_docs_v53/methods/messages_getAllDrafts.md index cc447864..8550c5b8 100644 --- a/old_docs/API_docs_v53/methods/messages_getAllDrafts.md +++ b/old_docs/API_docs_v53/methods/messages_getAllDrafts.md @@ -18,13 +18,10 @@ description: messages.getAllDrafts parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v53/methods/messages_getAllStickers.md b/old_docs/API_docs_v53/methods/messages_getAllStickers.md index dc9e2432..034438a5 100644 --- a/old_docs/API_docs_v53/methods/messages_getAllStickers.md +++ b/old_docs/API_docs_v53/methods/messages_getAllStickers.md @@ -23,13 +23,10 @@ description: messages.getAllStickers parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v53/methods/messages_getBotCallbackAnswer.md b/old_docs/API_docs_v53/methods/messages_getBotCallbackAnswer.md index 66299f58..b3196b43 100644 --- a/old_docs/API_docs_v53/methods/messages_getBotCallbackAnswer.md +++ b/old_docs/API_docs_v53/methods/messages_getBotCallbackAnswer.md @@ -36,13 +36,10 @@ description: messages.getBotCallbackAnswer parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v53/methods/messages_getChats.md b/old_docs/API_docs_v53/methods/messages_getChats.md index 6fa30cbd..c322613d 100644 --- a/old_docs/API_docs_v53/methods/messages_getChats.md +++ b/old_docs/API_docs_v53/methods/messages_getChats.md @@ -31,16 +31,13 @@ description: messages.getChats parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v53/methods/messages_getDhConfig.md b/old_docs/API_docs_v53/methods/messages_getDhConfig.md index aac3354d..f97684d2 100644 --- a/old_docs/API_docs_v53/methods/messages_getDhConfig.md +++ b/old_docs/API_docs_v53/methods/messages_getDhConfig.md @@ -31,13 +31,10 @@ description: messages.getDhConfig parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v53/methods/messages_getDialogs.md b/old_docs/API_docs_v53/methods/messages_getDialogs.md index 4c278eae..4b86ed71 100644 --- a/old_docs/API_docs_v53/methods/messages_getDialogs.md +++ b/old_docs/API_docs_v53/methods/messages_getDialogs.md @@ -36,13 +36,10 @@ description: messages.getDialogs parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v53/methods/messages_getDocumentByHash.md b/old_docs/API_docs_v53/methods/messages_getDocumentByHash.md index dda54bdd..3902ac44 100644 --- a/old_docs/API_docs_v53/methods/messages_getDocumentByHash.md +++ b/old_docs/API_docs_v53/methods/messages_getDocumentByHash.md @@ -32,16 +32,13 @@ description: messages.getDocumentByHash parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v53/methods/messages_getHistory.md b/old_docs/API_docs_v53/methods/messages_getHistory.md index a48a465e..4c3ef2ee 100644 --- a/old_docs/API_docs_v53/methods/messages_getHistory.md +++ b/old_docs/API_docs_v53/methods/messages_getHistory.md @@ -41,13 +41,10 @@ description: messages.getHistory parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v53/methods/messages_getInlineBotResults.md b/old_docs/API_docs_v53/methods/messages_getInlineBotResults.md index 61366580..61b927fc 100644 --- a/old_docs/API_docs_v53/methods/messages_getInlineBotResults.md +++ b/old_docs/API_docs_v53/methods/messages_getInlineBotResults.md @@ -37,13 +37,10 @@ description: messages.getInlineBotResults parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v53/methods/messages_getMessageEditData.md b/old_docs/API_docs_v53/methods/messages_getMessageEditData.md index a8b135c6..15085153 100644 --- a/old_docs/API_docs_v53/methods/messages_getMessageEditData.md +++ b/old_docs/API_docs_v53/methods/messages_getMessageEditData.md @@ -32,13 +32,10 @@ description: messages.getMessageEditData parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v53/methods/messages_getMessages.md b/old_docs/API_docs_v53/methods/messages_getMessages.md index 5a970246..787c46dd 100644 --- a/old_docs/API_docs_v53/methods/messages_getMessages.md +++ b/old_docs/API_docs_v53/methods/messages_getMessages.md @@ -23,16 +23,13 @@ description: messages.getMessages parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v53/methods/messages_getMessagesViews.md b/old_docs/API_docs_v53/methods/messages_getMessagesViews.md index 263f3f95..de5692dc 100644 --- a/old_docs/API_docs_v53/methods/messages_getMessagesViews.md +++ b/old_docs/API_docs_v53/methods/messages_getMessagesViews.md @@ -34,13 +34,10 @@ description: messages.getMessagesViews parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v53/methods/messages_getPeerDialogs.md b/old_docs/API_docs_v53/methods/messages_getPeerDialogs.md index 3da60038..226948ae 100644 --- a/old_docs/API_docs_v53/methods/messages_getPeerDialogs.md +++ b/old_docs/API_docs_v53/methods/messages_getPeerDialogs.md @@ -31,13 +31,10 @@ description: messages.getPeerDialogs parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v53/methods/messages_getPeerSettings.md b/old_docs/API_docs_v53/methods/messages_getPeerSettings.md index d3e3cfc3..2a92f2da 100644 --- a/old_docs/API_docs_v53/methods/messages_getPeerSettings.md +++ b/old_docs/API_docs_v53/methods/messages_getPeerSettings.md @@ -31,13 +31,10 @@ description: messages.getPeerSettings parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v53/methods/messages_getSavedGifs.md b/old_docs/API_docs_v53/methods/messages_getSavedGifs.md index 7cce4ffe..4986d812 100644 --- a/old_docs/API_docs_v53/methods/messages_getSavedGifs.md +++ b/old_docs/API_docs_v53/methods/messages_getSavedGifs.md @@ -23,13 +23,10 @@ description: messages.getSavedGifs parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v53/methods/messages_getStickerSet.md b/old_docs/API_docs_v53/methods/messages_getStickerSet.md index 59f33916..b480e0fe 100644 --- a/old_docs/API_docs_v53/methods/messages_getStickerSet.md +++ b/old_docs/API_docs_v53/methods/messages_getStickerSet.md @@ -30,16 +30,13 @@ description: messages.getStickerSet parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v53/methods/messages_getStickers.md b/old_docs/API_docs_v53/methods/messages_getStickers.md index be61a120..1587cd01 100644 --- a/old_docs/API_docs_v53/methods/messages_getStickers.md +++ b/old_docs/API_docs_v53/methods/messages_getStickers.md @@ -24,16 +24,13 @@ description: messages.getStickers parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v53/methods/messages_getWebPagePreview.md b/old_docs/API_docs_v53/methods/messages_getWebPagePreview.md index a89600b1..d3908933 100644 --- a/old_docs/API_docs_v53/methods/messages_getWebPagePreview.md +++ b/old_docs/API_docs_v53/methods/messages_getWebPagePreview.md @@ -23,13 +23,10 @@ description: messages.getWebPagePreview parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v53/methods/messages_hideReportSpam.md b/old_docs/API_docs_v53/methods/messages_hideReportSpam.md index 2dfe4dd7..5635665c 100644 --- a/old_docs/API_docs_v53/methods/messages_hideReportSpam.md +++ b/old_docs/API_docs_v53/methods/messages_hideReportSpam.md @@ -30,13 +30,10 @@ description: messages.hideReportSpam parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v53/methods/messages_importChatInvite.md b/old_docs/API_docs_v53/methods/messages_importChatInvite.md index 9d77304d..9dcfa56d 100644 --- a/old_docs/API_docs_v53/methods/messages_importChatInvite.md +++ b/old_docs/API_docs_v53/methods/messages_importChatInvite.md @@ -36,13 +36,10 @@ description: messages.importChatInvite parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v53/methods/messages_installStickerSet.md b/old_docs/API_docs_v53/methods/messages_installStickerSet.md index 1969d008..cf1865a8 100644 --- a/old_docs/API_docs_v53/methods/messages_installStickerSet.md +++ b/old_docs/API_docs_v53/methods/messages_installStickerSet.md @@ -31,13 +31,10 @@ description: messages.installStickerSet parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v53/methods/messages_migrateChat.md b/old_docs/API_docs_v53/methods/messages_migrateChat.md index 22d2fbf0..a8274e70 100644 --- a/old_docs/API_docs_v53/methods/messages_migrateChat.md +++ b/old_docs/API_docs_v53/methods/messages_migrateChat.md @@ -32,13 +32,10 @@ description: messages.migrateChat parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v53/methods/messages_readEncryptedHistory.md b/old_docs/API_docs_v53/methods/messages_readEncryptedHistory.md index 766ee07d..f38f6b07 100644 --- a/old_docs/API_docs_v53/methods/messages_readEncryptedHistory.md +++ b/old_docs/API_docs_v53/methods/messages_readEncryptedHistory.md @@ -31,16 +31,13 @@ description: messages.readEncryptedHistory parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v53/methods/messages_readHistory.md b/old_docs/API_docs_v53/methods/messages_readHistory.md index 1aa7830a..fef62130 100644 --- a/old_docs/API_docs_v53/methods/messages_readHistory.md +++ b/old_docs/API_docs_v53/methods/messages_readHistory.md @@ -32,13 +32,10 @@ description: messages.readHistory parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v53/methods/messages_readMessageContents.md b/old_docs/API_docs_v53/methods/messages_readMessageContents.md index 4b1abda0..7a6055fc 100644 --- a/old_docs/API_docs_v53/methods/messages_readMessageContents.md +++ b/old_docs/API_docs_v53/methods/messages_readMessageContents.md @@ -23,13 +23,10 @@ description: messages.readMessageContents parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v53/methods/messages_receivedMessages.md b/old_docs/API_docs_v53/methods/messages_receivedMessages.md index 588ac5cf..e2cf3a2f 100644 --- a/old_docs/API_docs_v53/methods/messages_receivedMessages.md +++ b/old_docs/API_docs_v53/methods/messages_receivedMessages.md @@ -23,13 +23,10 @@ description: messages.receivedMessages parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v53/methods/messages_receivedQueue.md b/old_docs/API_docs_v53/methods/messages_receivedQueue.md index 3c7f1d4f..38f504b3 100644 --- a/old_docs/API_docs_v53/methods/messages_receivedQueue.md +++ b/old_docs/API_docs_v53/methods/messages_receivedQueue.md @@ -30,16 +30,13 @@ description: messages.receivedQueue parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v53/methods/messages_reorderStickerSets.md b/old_docs/API_docs_v53/methods/messages_reorderStickerSets.md index cb35605a..e09057e7 100644 --- a/old_docs/API_docs_v53/methods/messages_reorderStickerSets.md +++ b/old_docs/API_docs_v53/methods/messages_reorderStickerSets.md @@ -23,13 +23,10 @@ description: messages.reorderStickerSets parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v53/methods/messages_reportSpam.md b/old_docs/API_docs_v53/methods/messages_reportSpam.md index bfadb9ab..08c96d44 100644 --- a/old_docs/API_docs_v53/methods/messages_reportSpam.md +++ b/old_docs/API_docs_v53/methods/messages_reportSpam.md @@ -30,13 +30,10 @@ description: messages.reportSpam parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v53/methods/messages_saveDraft.md b/old_docs/API_docs_v53/methods/messages_saveDraft.md index 42308b46..f68090c0 100644 --- a/old_docs/API_docs_v53/methods/messages_saveDraft.md +++ b/old_docs/API_docs_v53/methods/messages_saveDraft.md @@ -35,13 +35,10 @@ description: messages.saveDraft parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v53/methods/messages_saveGif.md b/old_docs/API_docs_v53/methods/messages_saveGif.md index 31e48632..d86d539a 100644 --- a/old_docs/API_docs_v53/methods/messages_saveGif.md +++ b/old_docs/API_docs_v53/methods/messages_saveGif.md @@ -31,13 +31,10 @@ description: messages.saveGif parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v53/methods/messages_search.md b/old_docs/API_docs_v53/methods/messages_search.md index 87073d00..1e809cf2 100644 --- a/old_docs/API_docs_v53/methods/messages_search.md +++ b/old_docs/API_docs_v53/methods/messages_search.md @@ -43,13 +43,10 @@ description: messages.search parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v53/methods/messages_searchGifs.md b/old_docs/API_docs_v53/methods/messages_searchGifs.md index 3f4c4838..dd804c99 100644 --- a/old_docs/API_docs_v53/methods/messages_searchGifs.md +++ b/old_docs/API_docs_v53/methods/messages_searchGifs.md @@ -31,13 +31,10 @@ description: messages.searchGifs parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v53/methods/messages_searchGlobal.md b/old_docs/API_docs_v53/methods/messages_searchGlobal.md index 0553dd7a..4b45eed2 100644 --- a/old_docs/API_docs_v53/methods/messages_searchGlobal.md +++ b/old_docs/API_docs_v53/methods/messages_searchGlobal.md @@ -34,13 +34,10 @@ description: messages.searchGlobal parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v53/methods/messages_sendBroadcast.md b/old_docs/API_docs_v53/methods/messages_sendBroadcast.md index ac13d0bf..537166ab 100644 --- a/old_docs/API_docs_v53/methods/messages_sendBroadcast.md +++ b/old_docs/API_docs_v53/methods/messages_sendBroadcast.md @@ -25,16 +25,13 @@ description: messages.sendBroadcast parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v53/methods/messages_sendEncrypted.md b/old_docs/API_docs_v53/methods/messages_sendEncrypted.md index 82eeec92..ba9f796b 100644 --- a/old_docs/API_docs_v53/methods/messages_sendEncrypted.md +++ b/old_docs/API_docs_v53/methods/messages_sendEncrypted.md @@ -34,16 +34,13 @@ description: messages.sendEncrypted parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v53/methods/messages_sendEncryptedFile.md b/old_docs/API_docs_v53/methods/messages_sendEncryptedFile.md index 8f7a73d9..db16bf2d 100644 --- a/old_docs/API_docs_v53/methods/messages_sendEncryptedFile.md +++ b/old_docs/API_docs_v53/methods/messages_sendEncryptedFile.md @@ -32,16 +32,13 @@ description: messages.sendEncryptedFile parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v53/methods/messages_sendEncryptedService.md b/old_docs/API_docs_v53/methods/messages_sendEncryptedService.md index d427f6c3..fd4e2627 100644 --- a/old_docs/API_docs_v53/methods/messages_sendEncryptedService.md +++ b/old_docs/API_docs_v53/methods/messages_sendEncryptedService.md @@ -34,16 +34,13 @@ description: messages.sendEncryptedService parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v53/methods/messages_sendInlineBotResult.md b/old_docs/API_docs_v53/methods/messages_sendInlineBotResult.md index 6aeeb67d..d974fe69 100644 --- a/old_docs/API_docs_v53/methods/messages_sendInlineBotResult.md +++ b/old_docs/API_docs_v53/methods/messages_sendInlineBotResult.md @@ -39,13 +39,10 @@ description: messages.sendInlineBotResult parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v53/methods/messages_sendMedia.md b/old_docs/API_docs_v53/methods/messages_sendMedia.md index b3ceb5d4..b58bf325 100644 --- a/old_docs/API_docs_v53/methods/messages_sendMedia.md +++ b/old_docs/API_docs_v53/methods/messages_sendMedia.md @@ -59,16 +59,13 @@ description: messages.sendMedia parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v53/methods/messages_sendMessage.md b/old_docs/API_docs_v53/methods/messages_sendMessage.md index 60b50412..3a515129 100644 --- a/old_docs/API_docs_v53/methods/messages_sendMessage.md +++ b/old_docs/API_docs_v53/methods/messages_sendMessage.md @@ -58,16 +58,13 @@ description: messages.sendMessage parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v53/methods/messages_setBotCallbackAnswer.md b/old_docs/API_docs_v53/methods/messages_setBotCallbackAnswer.md index ea7cdd79..bf8cabb2 100644 --- a/old_docs/API_docs_v53/methods/messages_setBotCallbackAnswer.md +++ b/old_docs/API_docs_v53/methods/messages_setBotCallbackAnswer.md @@ -32,16 +32,13 @@ description: messages.setBotCallbackAnswer parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v53/methods/messages_setEncryptedTyping.md b/old_docs/API_docs_v53/methods/messages_setEncryptedTyping.md index a05b94dd..aeae6ff7 100644 --- a/old_docs/API_docs_v53/methods/messages_setEncryptedTyping.md +++ b/old_docs/API_docs_v53/methods/messages_setEncryptedTyping.md @@ -31,13 +31,10 @@ description: messages.setEncryptedTyping parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v53/methods/messages_setInlineBotResults.md b/old_docs/API_docs_v53/methods/messages_setInlineBotResults.md index 8b5625f3..8b49c4c7 100644 --- a/old_docs/API_docs_v53/methods/messages_setInlineBotResults.md +++ b/old_docs/API_docs_v53/methods/messages_setInlineBotResults.md @@ -46,16 +46,13 @@ description: messages.setInlineBotResults parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v53/methods/messages_setTyping.md b/old_docs/API_docs_v53/methods/messages_setTyping.md index 9ef8caf5..f6b7b7b5 100644 --- a/old_docs/API_docs_v53/methods/messages_setTyping.md +++ b/old_docs/API_docs_v53/methods/messages_setTyping.md @@ -37,16 +37,13 @@ description: messages.setTyping parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v53/methods/messages_startBot.md b/old_docs/API_docs_v53/methods/messages_startBot.md index 8d98e390..b33ab013 100644 --- a/old_docs/API_docs_v53/methods/messages_startBot.md +++ b/old_docs/API_docs_v53/methods/messages_startBot.md @@ -35,13 +35,10 @@ description: messages.startBot parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v53/methods/messages_toggleChatAdmins.md b/old_docs/API_docs_v53/methods/messages_toggleChatAdmins.md index 3bf8a419..97328065 100644 --- a/old_docs/API_docs_v53/methods/messages_toggleChatAdmins.md +++ b/old_docs/API_docs_v53/methods/messages_toggleChatAdmins.md @@ -32,13 +32,10 @@ description: messages.toggleChatAdmins parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v53/methods/messages_uninstallStickerSet.md b/old_docs/API_docs_v53/methods/messages_uninstallStickerSet.md index 6763e64f..76a3e3e2 100644 --- a/old_docs/API_docs_v53/methods/messages_uninstallStickerSet.md +++ b/old_docs/API_docs_v53/methods/messages_uninstallStickerSet.md @@ -30,13 +30,10 @@ description: messages.uninstallStickerSet parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v53/methods/photos_deletePhotos.md b/old_docs/API_docs_v53/methods/photos_deletePhotos.md index e9cd459d..61768b1e 100644 --- a/old_docs/API_docs_v53/methods/photos_deletePhotos.md +++ b/old_docs/API_docs_v53/methods/photos_deletePhotos.md @@ -23,13 +23,10 @@ description: photos.deletePhotos parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v53/methods/photos_getUserPhotos.md b/old_docs/API_docs_v53/methods/photos_getUserPhotos.md index d6c2a380..095363e7 100644 --- a/old_docs/API_docs_v53/methods/photos_getUserPhotos.md +++ b/old_docs/API_docs_v53/methods/photos_getUserPhotos.md @@ -34,16 +34,13 @@ description: photos.getUserPhotos parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v53/methods/photos_updateProfilePhoto.md b/old_docs/API_docs_v53/methods/photos_updateProfilePhoto.md index abb031d4..add6028f 100644 --- a/old_docs/API_docs_v53/methods/photos_updateProfilePhoto.md +++ b/old_docs/API_docs_v53/methods/photos_updateProfilePhoto.md @@ -24,13 +24,10 @@ description: photos.updateProfilePhoto parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v53/methods/photos_uploadProfilePhoto.md b/old_docs/API_docs_v53/methods/photos_uploadProfilePhoto.md index ae20fdfc..048a1d32 100644 --- a/old_docs/API_docs_v53/methods/photos_uploadProfilePhoto.md +++ b/old_docs/API_docs_v53/methods/photos_uploadProfilePhoto.md @@ -37,13 +37,10 @@ description: photos.uploadProfilePhoto parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v53/methods/users_getUsers.md b/old_docs/API_docs_v53/methods/users_getUsers.md index 6a44d258..3a981d57 100644 --- a/old_docs/API_docs_v53/methods/users_getUsers.md +++ b/old_docs/API_docs_v53/methods/users_getUsers.md @@ -33,16 +33,13 @@ description: users.getUsers parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v55/methods/account_changePhone.md b/old_docs/API_docs_v55/methods/account_changePhone.md index 5d1801d0..e47ef6a7 100644 --- a/old_docs/API_docs_v55/methods/account_changePhone.md +++ b/old_docs/API_docs_v55/methods/account_changePhone.md @@ -32,13 +32,10 @@ description: account.changePhone parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v55/methods/account_checkUsername.md b/old_docs/API_docs_v55/methods/account_checkUsername.md index afc59b6c..40cf822f 100644 --- a/old_docs/API_docs_v55/methods/account_checkUsername.md +++ b/old_docs/API_docs_v55/methods/account_checkUsername.md @@ -30,13 +30,10 @@ description: account.checkUsername parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v55/methods/account_confirmPhone.md b/old_docs/API_docs_v55/methods/account_confirmPhone.md index 0d2dc5c6..8dd79d94 100644 --- a/old_docs/API_docs_v55/methods/account_confirmPhone.md +++ b/old_docs/API_docs_v55/methods/account_confirmPhone.md @@ -32,13 +32,10 @@ description: account.confirmPhone parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v55/methods/account_deleteAccount.md b/old_docs/API_docs_v55/methods/account_deleteAccount.md index 5abcd0ec..6f1bbda9 100644 --- a/old_docs/API_docs_v55/methods/account_deleteAccount.md +++ b/old_docs/API_docs_v55/methods/account_deleteAccount.md @@ -23,13 +23,10 @@ description: account.deleteAccount parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v55/methods/account_getAccountTTL.md b/old_docs/API_docs_v55/methods/account_getAccountTTL.md index 3520fbef..538b1d7a 100644 --- a/old_docs/API_docs_v55/methods/account_getAccountTTL.md +++ b/old_docs/API_docs_v55/methods/account_getAccountTTL.md @@ -18,13 +18,10 @@ description: account.getAccountTTL parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v55/methods/account_getAuthorizations.md b/old_docs/API_docs_v55/methods/account_getAuthorizations.md index 91bbce5e..f138d517 100644 --- a/old_docs/API_docs_v55/methods/account_getAuthorizations.md +++ b/old_docs/API_docs_v55/methods/account_getAuthorizations.md @@ -18,13 +18,10 @@ description: account.getAuthorizations parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v55/methods/account_getNotifySettings.md b/old_docs/API_docs_v55/methods/account_getNotifySettings.md index 8ee710d8..a48eed2f 100644 --- a/old_docs/API_docs_v55/methods/account_getNotifySettings.md +++ b/old_docs/API_docs_v55/methods/account_getNotifySettings.md @@ -30,13 +30,10 @@ description: account.getNotifySettings parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v55/methods/account_getPassword.md b/old_docs/API_docs_v55/methods/account_getPassword.md index 4d9fd015..1abf6174 100644 --- a/old_docs/API_docs_v55/methods/account_getPassword.md +++ b/old_docs/API_docs_v55/methods/account_getPassword.md @@ -18,13 +18,10 @@ description: account.getPassword parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v55/methods/account_getPasswordSettings.md b/old_docs/API_docs_v55/methods/account_getPasswordSettings.md index 02cb77f7..aec5b989 100644 --- a/old_docs/API_docs_v55/methods/account_getPasswordSettings.md +++ b/old_docs/API_docs_v55/methods/account_getPasswordSettings.md @@ -30,13 +30,10 @@ description: account.getPasswordSettings parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v55/methods/account_getPrivacy.md b/old_docs/API_docs_v55/methods/account_getPrivacy.md index 52786b79..8bbe9795 100644 --- a/old_docs/API_docs_v55/methods/account_getPrivacy.md +++ b/old_docs/API_docs_v55/methods/account_getPrivacy.md @@ -30,13 +30,10 @@ description: account.getPrivacy parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v55/methods/account_getWallPapers.md b/old_docs/API_docs_v55/methods/account_getWallPapers.md index 88c8a701..a71543d0 100644 --- a/old_docs/API_docs_v55/methods/account_getWallPapers.md +++ b/old_docs/API_docs_v55/methods/account_getWallPapers.md @@ -18,13 +18,10 @@ description: account.getWallPapers parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v55/methods/account_registerDevice.md b/old_docs/API_docs_v55/methods/account_registerDevice.md index 3cc7f98d..8be04ad2 100644 --- a/old_docs/API_docs_v55/methods/account_registerDevice.md +++ b/old_docs/API_docs_v55/methods/account_registerDevice.md @@ -31,13 +31,10 @@ description: account.registerDevice parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v55/methods/account_reportPeer.md b/old_docs/API_docs_v55/methods/account_reportPeer.md index 1545c3b8..1ae9f4d4 100644 --- a/old_docs/API_docs_v55/methods/account_reportPeer.md +++ b/old_docs/API_docs_v55/methods/account_reportPeer.md @@ -31,13 +31,10 @@ description: account.reportPeer parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v55/methods/account_resetAuthorization.md b/old_docs/API_docs_v55/methods/account_resetAuthorization.md index e44334f2..0438cba3 100644 --- a/old_docs/API_docs_v55/methods/account_resetAuthorization.md +++ b/old_docs/API_docs_v55/methods/account_resetAuthorization.md @@ -30,13 +30,10 @@ description: account.resetAuthorization parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v55/methods/account_resetNotifySettings.md b/old_docs/API_docs_v55/methods/account_resetNotifySettings.md index 155ede68..92db4f4f 100644 --- a/old_docs/API_docs_v55/methods/account_resetNotifySettings.md +++ b/old_docs/API_docs_v55/methods/account_resetNotifySettings.md @@ -18,13 +18,10 @@ description: account.resetNotifySettings parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v55/methods/account_sendChangePhoneCode.md b/old_docs/API_docs_v55/methods/account_sendChangePhoneCode.md index 4be218f2..017b5f7f 100644 --- a/old_docs/API_docs_v55/methods/account_sendChangePhoneCode.md +++ b/old_docs/API_docs_v55/methods/account_sendChangePhoneCode.md @@ -32,13 +32,10 @@ description: account.sendChangePhoneCode parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v55/methods/account_sendConfirmPhoneCode.md b/old_docs/API_docs_v55/methods/account_sendConfirmPhoneCode.md index 009fcb09..3665bd50 100644 --- a/old_docs/API_docs_v55/methods/account_sendConfirmPhoneCode.md +++ b/old_docs/API_docs_v55/methods/account_sendConfirmPhoneCode.md @@ -32,13 +32,10 @@ description: account.sendConfirmPhoneCode parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v55/methods/account_setAccountTTL.md b/old_docs/API_docs_v55/methods/account_setAccountTTL.md index f06eb676..d08f59fb 100644 --- a/old_docs/API_docs_v55/methods/account_setAccountTTL.md +++ b/old_docs/API_docs_v55/methods/account_setAccountTTL.md @@ -30,13 +30,10 @@ description: account.setAccountTTL parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v55/methods/account_setPrivacy.md b/old_docs/API_docs_v55/methods/account_setPrivacy.md index 56aebbcc..401aa71c 100644 --- a/old_docs/API_docs_v55/methods/account_setPrivacy.md +++ b/old_docs/API_docs_v55/methods/account_setPrivacy.md @@ -31,13 +31,10 @@ description: account.setPrivacy parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v55/methods/account_unregisterDevice.md b/old_docs/API_docs_v55/methods/account_unregisterDevice.md index 41899b6e..283ec7d2 100644 --- a/old_docs/API_docs_v55/methods/account_unregisterDevice.md +++ b/old_docs/API_docs_v55/methods/account_unregisterDevice.md @@ -31,13 +31,10 @@ description: account.unregisterDevice parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v55/methods/account_updateDeviceLocked.md b/old_docs/API_docs_v55/methods/account_updateDeviceLocked.md index 37aeb59d..ae6125a5 100644 --- a/old_docs/API_docs_v55/methods/account_updateDeviceLocked.md +++ b/old_docs/API_docs_v55/methods/account_updateDeviceLocked.md @@ -23,13 +23,10 @@ description: account.updateDeviceLocked parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v55/methods/account_updateNotifySettings.md b/old_docs/API_docs_v55/methods/account_updateNotifySettings.md index 8389b5c2..fb096250 100644 --- a/old_docs/API_docs_v55/methods/account_updateNotifySettings.md +++ b/old_docs/API_docs_v55/methods/account_updateNotifySettings.md @@ -31,13 +31,10 @@ description: account.updateNotifySettings parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v55/methods/account_updatePasswordSettings.md b/old_docs/API_docs_v55/methods/account_updatePasswordSettings.md index b7c8da4b..ffa8dcd9 100644 --- a/old_docs/API_docs_v55/methods/account_updatePasswordSettings.md +++ b/old_docs/API_docs_v55/methods/account_updatePasswordSettings.md @@ -34,13 +34,10 @@ description: account.updatePasswordSettings parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v55/methods/account_updateProfile.md b/old_docs/API_docs_v55/methods/account_updateProfile.md index a50eaea5..b3d468d1 100644 --- a/old_docs/API_docs_v55/methods/account_updateProfile.md +++ b/old_docs/API_docs_v55/methods/account_updateProfile.md @@ -33,13 +33,10 @@ description: account.updateProfile parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v55/methods/account_updateStatus.md b/old_docs/API_docs_v55/methods/account_updateStatus.md index 7204e582..c8fa0a79 100644 --- a/old_docs/API_docs_v55/methods/account_updateStatus.md +++ b/old_docs/API_docs_v55/methods/account_updateStatus.md @@ -30,13 +30,10 @@ description: account.updateStatus parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v55/methods/account_updateUsername.md b/old_docs/API_docs_v55/methods/account_updateUsername.md index 22be2fd4..2b7576a5 100644 --- a/old_docs/API_docs_v55/methods/account_updateUsername.md +++ b/old_docs/API_docs_v55/methods/account_updateUsername.md @@ -32,13 +32,10 @@ description: account.updateUsername parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v55/methods/auth_bindTempAuthKey.md b/old_docs/API_docs_v55/methods/auth_bindTempAuthKey.md index e3d72dd5..7419abb0 100644 --- a/old_docs/API_docs_v55/methods/auth_bindTempAuthKey.md +++ b/old_docs/API_docs_v55/methods/auth_bindTempAuthKey.md @@ -35,16 +35,13 @@ description: auth.bindTempAuthKey parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v55/methods/auth_cancelCode.md b/old_docs/API_docs_v55/methods/auth_cancelCode.md index dc390329..05d927a1 100644 --- a/old_docs/API_docs_v55/methods/auth_cancelCode.md +++ b/old_docs/API_docs_v55/methods/auth_cancelCode.md @@ -31,13 +31,10 @@ description: auth.cancelCode parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v55/methods/auth_checkPassword.md b/old_docs/API_docs_v55/methods/auth_checkPassword.md index d5559186..6b6b21cc 100644 --- a/old_docs/API_docs_v55/methods/auth_checkPassword.md +++ b/old_docs/API_docs_v55/methods/auth_checkPassword.md @@ -30,13 +30,10 @@ description: auth.checkPassword parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v55/methods/auth_checkPhone.md b/old_docs/API_docs_v55/methods/auth_checkPhone.md index 3455904d..f6cac2e6 100644 --- a/old_docs/API_docs_v55/methods/auth_checkPhone.md +++ b/old_docs/API_docs_v55/methods/auth_checkPhone.md @@ -32,13 +32,10 @@ description: auth.checkPhone parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v55/methods/auth_exportAuthorization.md b/old_docs/API_docs_v55/methods/auth_exportAuthorization.md index 44c45b70..cbc8203b 100644 --- a/old_docs/API_docs_v55/methods/auth_exportAuthorization.md +++ b/old_docs/API_docs_v55/methods/auth_exportAuthorization.md @@ -30,16 +30,13 @@ description: auth.exportAuthorization parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v55/methods/auth_importAuthorization.md b/old_docs/API_docs_v55/methods/auth_importAuthorization.md index e0fd534f..22166510 100644 --- a/old_docs/API_docs_v55/methods/auth_importAuthorization.md +++ b/old_docs/API_docs_v55/methods/auth_importAuthorization.md @@ -32,16 +32,13 @@ description: auth.importAuthorization parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v55/methods/auth_recoverPassword.md b/old_docs/API_docs_v55/methods/auth_recoverPassword.md index c2ce3fed..931e99fd 100644 --- a/old_docs/API_docs_v55/methods/auth_recoverPassword.md +++ b/old_docs/API_docs_v55/methods/auth_recoverPassword.md @@ -30,13 +30,10 @@ description: auth.recoverPassword parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v55/methods/auth_requestPasswordRecovery.md b/old_docs/API_docs_v55/methods/auth_requestPasswordRecovery.md index 101b1cf7..c6babcd9 100644 --- a/old_docs/API_docs_v55/methods/auth_requestPasswordRecovery.md +++ b/old_docs/API_docs_v55/methods/auth_requestPasswordRecovery.md @@ -25,13 +25,10 @@ description: auth.requestPasswordRecovery parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v55/methods/auth_resendCode.md b/old_docs/API_docs_v55/methods/auth_resendCode.md index 14d08ddd..df4803b8 100644 --- a/old_docs/API_docs_v55/methods/auth_resendCode.md +++ b/old_docs/API_docs_v55/methods/auth_resendCode.md @@ -31,13 +31,10 @@ description: auth.resendCode parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v55/methods/auth_resetAuthorizations.md b/old_docs/API_docs_v55/methods/auth_resetAuthorizations.md index 87a39a22..fe297fa7 100644 --- a/old_docs/API_docs_v55/methods/auth_resetAuthorizations.md +++ b/old_docs/API_docs_v55/methods/auth_resetAuthorizations.md @@ -25,13 +25,10 @@ description: auth.resetAuthorizations parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v55/methods/auth_sendInvites.md b/old_docs/API_docs_v55/methods/auth_sendInvites.md index 604fc65d..ad9636c5 100644 --- a/old_docs/API_docs_v55/methods/auth_sendInvites.md +++ b/old_docs/API_docs_v55/methods/auth_sendInvites.md @@ -31,13 +31,10 @@ description: auth.sendInvites parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v55/methods/channels_checkUsername.md b/old_docs/API_docs_v55/methods/channels_checkUsername.md index d6ea876d..e29ee107 100644 --- a/old_docs/API_docs_v55/methods/channels_checkUsername.md +++ b/old_docs/API_docs_v55/methods/channels_checkUsername.md @@ -33,13 +33,10 @@ description: channels.checkUsername parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v55/methods/channels_createChannel.md b/old_docs/API_docs_v55/methods/channels_createChannel.md index 9ba02e9e..58808b73 100644 --- a/old_docs/API_docs_v55/methods/channels_createChannel.md +++ b/old_docs/API_docs_v55/methods/channels_createChannel.md @@ -34,13 +34,10 @@ description: channels.createChannel parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v55/methods/channels_deleteChannel.md b/old_docs/API_docs_v55/methods/channels_deleteChannel.md index 912ab080..532f3c6c 100644 --- a/old_docs/API_docs_v55/methods/channels_deleteChannel.md +++ b/old_docs/API_docs_v55/methods/channels_deleteChannel.md @@ -31,13 +31,10 @@ description: channels.deleteChannel parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v55/methods/channels_deleteMessages.md b/old_docs/API_docs_v55/methods/channels_deleteMessages.md index b3481294..a42a47a5 100644 --- a/old_docs/API_docs_v55/methods/channels_deleteMessages.md +++ b/old_docs/API_docs_v55/methods/channels_deleteMessages.md @@ -33,16 +33,13 @@ description: channels.deleteMessages parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v55/methods/channels_deleteUserHistory.md b/old_docs/API_docs_v55/methods/channels_deleteUserHistory.md index 66843269..73494485 100644 --- a/old_docs/API_docs_v55/methods/channels_deleteUserHistory.md +++ b/old_docs/API_docs_v55/methods/channels_deleteUserHistory.md @@ -32,13 +32,10 @@ description: channels.deleteUserHistory parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v55/methods/channels_editAbout.md b/old_docs/API_docs_v55/methods/channels_editAbout.md index 4c759a8a..1c3ce933 100644 --- a/old_docs/API_docs_v55/methods/channels_editAbout.md +++ b/old_docs/API_docs_v55/methods/channels_editAbout.md @@ -34,16 +34,13 @@ description: channels.editAbout parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v55/methods/channels_editAdmin.md b/old_docs/API_docs_v55/methods/channels_editAdmin.md index 7707bdfe..42184227 100644 --- a/old_docs/API_docs_v55/methods/channels_editAdmin.md +++ b/old_docs/API_docs_v55/methods/channels_editAdmin.md @@ -41,16 +41,13 @@ description: channels.editAdmin parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v55/methods/channels_editPhoto.md b/old_docs/API_docs_v55/methods/channels_editPhoto.md index 99873537..4a4aeb03 100644 --- a/old_docs/API_docs_v55/methods/channels_editPhoto.md +++ b/old_docs/API_docs_v55/methods/channels_editPhoto.md @@ -33,16 +33,13 @@ description: channels.editPhoto parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v55/methods/channels_editTitle.md b/old_docs/API_docs_v55/methods/channels_editTitle.md index 04e8ce12..8a69d09b 100644 --- a/old_docs/API_docs_v55/methods/channels_editTitle.md +++ b/old_docs/API_docs_v55/methods/channels_editTitle.md @@ -33,16 +33,13 @@ description: channels.editTitle parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v55/methods/channels_exportInvite.md b/old_docs/API_docs_v55/methods/channels_exportInvite.md index 2ed80f6c..79dc6401 100644 --- a/old_docs/API_docs_v55/methods/channels_exportInvite.md +++ b/old_docs/API_docs_v55/methods/channels_exportInvite.md @@ -32,16 +32,13 @@ description: channels.exportInvite parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v55/methods/channels_exportMessageLink.md b/old_docs/API_docs_v55/methods/channels_exportMessageLink.md index 9831c9c0..5b824859 100644 --- a/old_docs/API_docs_v55/methods/channels_exportMessageLink.md +++ b/old_docs/API_docs_v55/methods/channels_exportMessageLink.md @@ -31,13 +31,10 @@ description: channels.exportMessageLink parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v55/methods/channels_getChannels.md b/old_docs/API_docs_v55/methods/channels_getChannels.md index 13304938..e80aa6a6 100644 --- a/old_docs/API_docs_v55/methods/channels_getChannels.md +++ b/old_docs/API_docs_v55/methods/channels_getChannels.md @@ -32,16 +32,13 @@ description: channels.getChannels parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v55/methods/channels_getMessages.md b/old_docs/API_docs_v55/methods/channels_getMessages.md index 5480dd86..dc392773 100644 --- a/old_docs/API_docs_v55/methods/channels_getMessages.md +++ b/old_docs/API_docs_v55/methods/channels_getMessages.md @@ -33,16 +33,13 @@ description: channels.getMessages parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v55/methods/channels_getParticipant.md b/old_docs/API_docs_v55/methods/channels_getParticipant.md index 8c7e3cbd..001bf115 100644 --- a/old_docs/API_docs_v55/methods/channels_getParticipant.md +++ b/old_docs/API_docs_v55/methods/channels_getParticipant.md @@ -35,16 +35,13 @@ description: channels.getParticipant parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v55/methods/channels_inviteToChannel.md b/old_docs/API_docs_v55/methods/channels_inviteToChannel.md index cf5480e0..2448fb84 100644 --- a/old_docs/API_docs_v55/methods/channels_inviteToChannel.md +++ b/old_docs/API_docs_v55/methods/channels_inviteToChannel.md @@ -46,13 +46,10 @@ description: channels.inviteToChannel parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v55/methods/channels_joinChannel.md b/old_docs/API_docs_v55/methods/channels_joinChannel.md index f31730a1..e746cf48 100644 --- a/old_docs/API_docs_v55/methods/channels_joinChannel.md +++ b/old_docs/API_docs_v55/methods/channels_joinChannel.md @@ -32,13 +32,10 @@ description: channels.joinChannel parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v55/methods/channels_kickFromChannel.md b/old_docs/API_docs_v55/methods/channels_kickFromChannel.md index c903caa4..c85833ce 100644 --- a/old_docs/API_docs_v55/methods/channels_kickFromChannel.md +++ b/old_docs/API_docs_v55/methods/channels_kickFromChannel.md @@ -25,16 +25,13 @@ description: channels.kickFromChannel parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v55/methods/channels_leaveChannel.md b/old_docs/API_docs_v55/methods/channels_leaveChannel.md index 12902f6d..ff244ded 100644 --- a/old_docs/API_docs_v55/methods/channels_leaveChannel.md +++ b/old_docs/API_docs_v55/methods/channels_leaveChannel.md @@ -34,16 +34,13 @@ description: channels.leaveChannel parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v55/methods/channels_readHistory.md b/old_docs/API_docs_v55/methods/channels_readHistory.md index be979101..6fc6ec0e 100644 --- a/old_docs/API_docs_v55/methods/channels_readHistory.md +++ b/old_docs/API_docs_v55/methods/channels_readHistory.md @@ -32,13 +32,10 @@ description: channels.readHistory parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v55/methods/channels_reportSpam.md b/old_docs/API_docs_v55/methods/channels_reportSpam.md index 22f34443..a37a5833 100644 --- a/old_docs/API_docs_v55/methods/channels_reportSpam.md +++ b/old_docs/API_docs_v55/methods/channels_reportSpam.md @@ -33,13 +33,10 @@ description: channels.reportSpam parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v55/methods/channels_toggleInvites.md b/old_docs/API_docs_v55/methods/channels_toggleInvites.md index c2715b32..d0ae1136 100644 --- a/old_docs/API_docs_v55/methods/channels_toggleInvites.md +++ b/old_docs/API_docs_v55/methods/channels_toggleInvites.md @@ -33,13 +33,10 @@ description: channels.toggleInvites parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v55/methods/channels_toggleSignatures.md b/old_docs/API_docs_v55/methods/channels_toggleSignatures.md index a214b849..6477bc6d 100644 --- a/old_docs/API_docs_v55/methods/channels_toggleSignatures.md +++ b/old_docs/API_docs_v55/methods/channels_toggleSignatures.md @@ -31,13 +31,10 @@ description: channels.toggleSignatures parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v55/methods/channels_updatePinnedMessage.md b/old_docs/API_docs_v55/methods/channels_updatePinnedMessage.md index 6dcabf71..37a0a20d 100644 --- a/old_docs/API_docs_v55/methods/channels_updatePinnedMessage.md +++ b/old_docs/API_docs_v55/methods/channels_updatePinnedMessage.md @@ -35,16 +35,13 @@ description: channels.updatePinnedMessage parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v55/methods/channels_updateUsername.md b/old_docs/API_docs_v55/methods/channels_updateUsername.md index c2ede724..1f1f111e 100644 --- a/old_docs/API_docs_v55/methods/channels_updateUsername.md +++ b/old_docs/API_docs_v55/methods/channels_updateUsername.md @@ -35,13 +35,10 @@ description: channels.updateUsername parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v55/methods/contacts_block.md b/old_docs/API_docs_v55/methods/contacts_block.md index d9d58e37..1c7cbe26 100644 --- a/old_docs/API_docs_v55/methods/contacts_block.md +++ b/old_docs/API_docs_v55/methods/contacts_block.md @@ -30,13 +30,10 @@ description: contacts.block parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v55/methods/contacts_deleteContact.md b/old_docs/API_docs_v55/methods/contacts_deleteContact.md index cd8c17ad..987a1be0 100644 --- a/old_docs/API_docs_v55/methods/contacts_deleteContact.md +++ b/old_docs/API_docs_v55/methods/contacts_deleteContact.md @@ -30,13 +30,10 @@ description: contacts.deleteContact parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v55/methods/contacts_deleteContacts.md b/old_docs/API_docs_v55/methods/contacts_deleteContacts.md index fc65880d..67a922ed 100644 --- a/old_docs/API_docs_v55/methods/contacts_deleteContacts.md +++ b/old_docs/API_docs_v55/methods/contacts_deleteContacts.md @@ -31,13 +31,10 @@ description: contacts.deleteContacts parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v55/methods/contacts_exportCard.md b/old_docs/API_docs_v55/methods/contacts_exportCard.md index 63508076..bf6d1f9f 100644 --- a/old_docs/API_docs_v55/methods/contacts_exportCard.md +++ b/old_docs/API_docs_v55/methods/contacts_exportCard.md @@ -18,13 +18,10 @@ description: contacts.exportCard parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v55/methods/contacts_getBlocked.md b/old_docs/API_docs_v55/methods/contacts_getBlocked.md index f50792b4..faa719da 100644 --- a/old_docs/API_docs_v55/methods/contacts_getBlocked.md +++ b/old_docs/API_docs_v55/methods/contacts_getBlocked.md @@ -24,13 +24,10 @@ description: contacts.getBlocked parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v55/methods/contacts_getContacts.md b/old_docs/API_docs_v55/methods/contacts_getContacts.md index 71313bf2..a6779111 100644 --- a/old_docs/API_docs_v55/methods/contacts_getContacts.md +++ b/old_docs/API_docs_v55/methods/contacts_getContacts.md @@ -23,13 +23,10 @@ description: contacts.getContacts parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v55/methods/contacts_getStatuses.md b/old_docs/API_docs_v55/methods/contacts_getStatuses.md index d914e08d..9bb7f263 100644 --- a/old_docs/API_docs_v55/methods/contacts_getStatuses.md +++ b/old_docs/API_docs_v55/methods/contacts_getStatuses.md @@ -18,13 +18,10 @@ description: contacts.getStatuses parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v55/methods/contacts_getTopPeers.md b/old_docs/API_docs_v55/methods/contacts_getTopPeers.md index 1caa1d77..d29f6e02 100644 --- a/old_docs/API_docs_v55/methods/contacts_getTopPeers.md +++ b/old_docs/API_docs_v55/methods/contacts_getTopPeers.md @@ -37,13 +37,10 @@ description: contacts.getTopPeers parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v55/methods/contacts_importCard.md b/old_docs/API_docs_v55/methods/contacts_importCard.md index a6abf56d..7a2f34e1 100644 --- a/old_docs/API_docs_v55/methods/contacts_importCard.md +++ b/old_docs/API_docs_v55/methods/contacts_importCard.md @@ -31,13 +31,10 @@ description: contacts.importCard parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v55/methods/contacts_importContacts.md b/old_docs/API_docs_v55/methods/contacts_importContacts.md index db2051ac..2f070493 100644 --- a/old_docs/API_docs_v55/methods/contacts_importContacts.md +++ b/old_docs/API_docs_v55/methods/contacts_importContacts.md @@ -24,13 +24,10 @@ description: contacts.importContacts parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v55/methods/contacts_resetTopPeerRating.md b/old_docs/API_docs_v55/methods/contacts_resetTopPeerRating.md index 738494b2..711ea0cb 100644 --- a/old_docs/API_docs_v55/methods/contacts_resetTopPeerRating.md +++ b/old_docs/API_docs_v55/methods/contacts_resetTopPeerRating.md @@ -31,13 +31,10 @@ description: contacts.resetTopPeerRating parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v55/methods/contacts_search.md b/old_docs/API_docs_v55/methods/contacts_search.md index 0203b160..70a0635e 100644 --- a/old_docs/API_docs_v55/methods/contacts_search.md +++ b/old_docs/API_docs_v55/methods/contacts_search.md @@ -33,13 +33,10 @@ description: contacts.search parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v55/methods/contacts_unblock.md b/old_docs/API_docs_v55/methods/contacts_unblock.md index a1977c24..9c01e42a 100644 --- a/old_docs/API_docs_v55/methods/contacts_unblock.md +++ b/old_docs/API_docs_v55/methods/contacts_unblock.md @@ -30,13 +30,10 @@ description: contacts.unblock parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v55/methods/help_getAppChangelog.md b/old_docs/API_docs_v55/methods/help_getAppChangelog.md index b0ab53f1..0f8a12bd 100644 --- a/old_docs/API_docs_v55/methods/help_getAppChangelog.md +++ b/old_docs/API_docs_v55/methods/help_getAppChangelog.md @@ -18,13 +18,10 @@ description: help.getAppChangelog parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v55/methods/help_getAppUpdate.md b/old_docs/API_docs_v55/methods/help_getAppUpdate.md index 0871f59d..89ff22c3 100644 --- a/old_docs/API_docs_v55/methods/help_getAppUpdate.md +++ b/old_docs/API_docs_v55/methods/help_getAppUpdate.md @@ -18,13 +18,10 @@ description: help.getAppUpdate parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v55/methods/help_getConfig.md b/old_docs/API_docs_v55/methods/help_getConfig.md index e3648b5a..bb51b362 100644 --- a/old_docs/API_docs_v55/methods/help_getConfig.md +++ b/old_docs/API_docs_v55/methods/help_getConfig.md @@ -25,16 +25,13 @@ description: help.getConfig parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v55/methods/help_getInviteText.md b/old_docs/API_docs_v55/methods/help_getInviteText.md index 4bcbb77d..6d2674d6 100644 --- a/old_docs/API_docs_v55/methods/help_getInviteText.md +++ b/old_docs/API_docs_v55/methods/help_getInviteText.md @@ -18,13 +18,10 @@ description: help.getInviteText parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v55/methods/help_getNearestDc.md b/old_docs/API_docs_v55/methods/help_getNearestDc.md index c6f5c555..6d8ed3f7 100644 --- a/old_docs/API_docs_v55/methods/help_getNearestDc.md +++ b/old_docs/API_docs_v55/methods/help_getNearestDc.md @@ -18,13 +18,10 @@ description: help.getNearestDc parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v55/methods/help_getSupport.md b/old_docs/API_docs_v55/methods/help_getSupport.md index 209edf03..ca8db03c 100644 --- a/old_docs/API_docs_v55/methods/help_getSupport.md +++ b/old_docs/API_docs_v55/methods/help_getSupport.md @@ -18,13 +18,10 @@ description: help.getSupport parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v55/methods/help_getTermsOfService.md b/old_docs/API_docs_v55/methods/help_getTermsOfService.md index 8bc2e2fa..eb686506 100644 --- a/old_docs/API_docs_v55/methods/help_getTermsOfService.md +++ b/old_docs/API_docs_v55/methods/help_getTermsOfService.md @@ -18,13 +18,10 @@ description: help.getTermsOfService parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v55/methods/help_saveAppLog.md b/old_docs/API_docs_v55/methods/help_saveAppLog.md index 4f06434c..741b9aa1 100644 --- a/old_docs/API_docs_v55/methods/help_saveAppLog.md +++ b/old_docs/API_docs_v55/methods/help_saveAppLog.md @@ -23,13 +23,10 @@ description: help.saveAppLog parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v55/methods/initConnection.md b/old_docs/API_docs_v55/methods/initConnection.md index 0d22a1cb..c0307677 100644 --- a/old_docs/API_docs_v55/methods/initConnection.md +++ b/old_docs/API_docs_v55/methods/initConnection.md @@ -36,16 +36,13 @@ description: initConnection parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v55/methods/invokeAfterMsg.md b/old_docs/API_docs_v55/methods/invokeAfterMsg.md index c139fe8c..a382429e 100644 --- a/old_docs/API_docs_v55/methods/invokeAfterMsg.md +++ b/old_docs/API_docs_v55/methods/invokeAfterMsg.md @@ -24,16 +24,13 @@ description: invokeAfterMsg parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v55/methods/invokeAfterMsgs.md b/old_docs/API_docs_v55/methods/invokeAfterMsgs.md index 35004296..169eedaf 100644 --- a/old_docs/API_docs_v55/methods/invokeAfterMsgs.md +++ b/old_docs/API_docs_v55/methods/invokeAfterMsgs.md @@ -24,16 +24,13 @@ description: invokeAfterMsgs parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v55/methods/invokeWithLayer.md b/old_docs/API_docs_v55/methods/invokeWithLayer.md index 706036c4..d9a2c74c 100644 --- a/old_docs/API_docs_v55/methods/invokeWithLayer.md +++ b/old_docs/API_docs_v55/methods/invokeWithLayer.md @@ -41,16 +41,13 @@ description: invokeWithLayer parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v55/methods/invokeWithoutUpdates.md b/old_docs/API_docs_v55/methods/invokeWithoutUpdates.md index 10c6bfcf..f7d01765 100644 --- a/old_docs/API_docs_v55/methods/invokeWithoutUpdates.md +++ b/old_docs/API_docs_v55/methods/invokeWithoutUpdates.md @@ -23,16 +23,13 @@ description: invokeWithoutUpdates parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v55/methods/messages_addChatUser.md b/old_docs/API_docs_v55/methods/messages_addChatUser.md index 00da5a61..b9e6243d 100644 --- a/old_docs/API_docs_v55/methods/messages_addChatUser.md +++ b/old_docs/API_docs_v55/methods/messages_addChatUser.md @@ -40,13 +40,10 @@ description: messages.addChatUser parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v55/methods/messages_checkChatInvite.md b/old_docs/API_docs_v55/methods/messages_checkChatInvite.md index c5eb1c06..c4489469 100644 --- a/old_docs/API_docs_v55/methods/messages_checkChatInvite.md +++ b/old_docs/API_docs_v55/methods/messages_checkChatInvite.md @@ -32,13 +32,10 @@ description: messages.checkChatInvite parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v55/methods/messages_clearRecentStickers.md b/old_docs/API_docs_v55/methods/messages_clearRecentStickers.md index 892593b0..a9158503 100644 --- a/old_docs/API_docs_v55/methods/messages_clearRecentStickers.md +++ b/old_docs/API_docs_v55/methods/messages_clearRecentStickers.md @@ -18,13 +18,10 @@ description: messages.clearRecentStickers parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v55/methods/messages_createChat.md b/old_docs/API_docs_v55/methods/messages_createChat.md index c643a022..c6c8f420 100644 --- a/old_docs/API_docs_v55/methods/messages_createChat.md +++ b/old_docs/API_docs_v55/methods/messages_createChat.md @@ -32,13 +32,10 @@ description: messages.createChat parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v55/methods/messages_deleteChatUser.md b/old_docs/API_docs_v55/methods/messages_deleteChatUser.md index 3d75d9cf..4b8c2aa5 100644 --- a/old_docs/API_docs_v55/methods/messages_deleteChatUser.md +++ b/old_docs/API_docs_v55/methods/messages_deleteChatUser.md @@ -33,16 +33,13 @@ description: messages.deleteChatUser parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v55/methods/messages_deleteHistory.md b/old_docs/API_docs_v55/methods/messages_deleteHistory.md index ce6ba6e7..ebe2c89c 100644 --- a/old_docs/API_docs_v55/methods/messages_deleteHistory.md +++ b/old_docs/API_docs_v55/methods/messages_deleteHistory.md @@ -32,13 +32,10 @@ description: messages.deleteHistory parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v55/methods/messages_deleteMessages.md b/old_docs/API_docs_v55/methods/messages_deleteMessages.md index 65dbbc4a..38b3ca09 100644 --- a/old_docs/API_docs_v55/methods/messages_deleteMessages.md +++ b/old_docs/API_docs_v55/methods/messages_deleteMessages.md @@ -30,16 +30,13 @@ description: messages.deleteMessages parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v55/methods/messages_editChatAdmin.md b/old_docs/API_docs_v55/methods/messages_editChatAdmin.md index e64d9da5..1b3ffa9f 100644 --- a/old_docs/API_docs_v55/methods/messages_editChatAdmin.md +++ b/old_docs/API_docs_v55/methods/messages_editChatAdmin.md @@ -32,13 +32,10 @@ description: messages.editChatAdmin parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v55/methods/messages_editChatPhoto.md b/old_docs/API_docs_v55/methods/messages_editChatPhoto.md index d225962d..8c5d9d47 100644 --- a/old_docs/API_docs_v55/methods/messages_editChatPhoto.md +++ b/old_docs/API_docs_v55/methods/messages_editChatPhoto.md @@ -35,16 +35,13 @@ description: messages.editChatPhoto parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v55/methods/messages_editChatTitle.md b/old_docs/API_docs_v55/methods/messages_editChatTitle.md index 5cb1c6d7..238c6d72 100644 --- a/old_docs/API_docs_v55/methods/messages_editChatTitle.md +++ b/old_docs/API_docs_v55/methods/messages_editChatTitle.md @@ -32,16 +32,13 @@ description: messages.editChatTitle parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v55/methods/messages_editInlineBotMessage.md b/old_docs/API_docs_v55/methods/messages_editInlineBotMessage.md index 621c81a3..c3489f9d 100644 --- a/old_docs/API_docs_v55/methods/messages_editInlineBotMessage.md +++ b/old_docs/API_docs_v55/methods/messages_editInlineBotMessage.md @@ -36,16 +36,13 @@ description: messages.editInlineBotMessage parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v55/methods/messages_editMessage.md b/old_docs/API_docs_v55/methods/messages_editMessage.md index b8cdda81..3a23c9ac 100644 --- a/old_docs/API_docs_v55/methods/messages_editMessage.md +++ b/old_docs/API_docs_v55/methods/messages_editMessage.md @@ -45,16 +45,13 @@ description: messages.editMessage parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v55/methods/messages_exportChatInvite.md b/old_docs/API_docs_v55/methods/messages_exportChatInvite.md index 4a6e28ff..78f2ff86 100644 --- a/old_docs/API_docs_v55/methods/messages_exportChatInvite.md +++ b/old_docs/API_docs_v55/methods/messages_exportChatInvite.md @@ -30,13 +30,10 @@ description: messages.exportChatInvite parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v55/methods/messages_forwardMessage.md b/old_docs/API_docs_v55/methods/messages_forwardMessage.md index 4e2362db..fbdbc955 100644 --- a/old_docs/API_docs_v55/methods/messages_forwardMessage.md +++ b/old_docs/API_docs_v55/methods/messages_forwardMessage.md @@ -34,16 +34,13 @@ description: messages.forwardMessage parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v55/methods/messages_forwardMessages.md b/old_docs/API_docs_v55/methods/messages_forwardMessages.md index 3f77a986..4ce0002f 100644 --- a/old_docs/API_docs_v55/methods/messages_forwardMessages.md +++ b/old_docs/API_docs_v55/methods/messages_forwardMessages.md @@ -55,16 +55,13 @@ description: messages.forwardMessages parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v55/methods/messages_getAllDrafts.md b/old_docs/API_docs_v55/methods/messages_getAllDrafts.md index cc447864..8550c5b8 100644 --- a/old_docs/API_docs_v55/methods/messages_getAllDrafts.md +++ b/old_docs/API_docs_v55/methods/messages_getAllDrafts.md @@ -18,13 +18,10 @@ description: messages.getAllDrafts parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v55/methods/messages_getAllStickers.md b/old_docs/API_docs_v55/methods/messages_getAllStickers.md index dc9e2432..034438a5 100644 --- a/old_docs/API_docs_v55/methods/messages_getAllStickers.md +++ b/old_docs/API_docs_v55/methods/messages_getAllStickers.md @@ -23,13 +23,10 @@ description: messages.getAllStickers parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v55/methods/messages_getArchivedStickers.md b/old_docs/API_docs_v55/methods/messages_getArchivedStickers.md index 6e4c9e01..20a9c231 100644 --- a/old_docs/API_docs_v55/methods/messages_getArchivedStickers.md +++ b/old_docs/API_docs_v55/methods/messages_getArchivedStickers.md @@ -24,13 +24,10 @@ description: messages.getArchivedStickers parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v55/methods/messages_getBotCallbackAnswer.md b/old_docs/API_docs_v55/methods/messages_getBotCallbackAnswer.md index 66299f58..b3196b43 100644 --- a/old_docs/API_docs_v55/methods/messages_getBotCallbackAnswer.md +++ b/old_docs/API_docs_v55/methods/messages_getBotCallbackAnswer.md @@ -36,13 +36,10 @@ description: messages.getBotCallbackAnswer parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v55/methods/messages_getChats.md b/old_docs/API_docs_v55/methods/messages_getChats.md index 6fa30cbd..c322613d 100644 --- a/old_docs/API_docs_v55/methods/messages_getChats.md +++ b/old_docs/API_docs_v55/methods/messages_getChats.md @@ -31,16 +31,13 @@ description: messages.getChats parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v55/methods/messages_getDhConfig.md b/old_docs/API_docs_v55/methods/messages_getDhConfig.md index aac3354d..f97684d2 100644 --- a/old_docs/API_docs_v55/methods/messages_getDhConfig.md +++ b/old_docs/API_docs_v55/methods/messages_getDhConfig.md @@ -31,13 +31,10 @@ description: messages.getDhConfig parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v55/methods/messages_getDialogs.md b/old_docs/API_docs_v55/methods/messages_getDialogs.md index 4c278eae..4b86ed71 100644 --- a/old_docs/API_docs_v55/methods/messages_getDialogs.md +++ b/old_docs/API_docs_v55/methods/messages_getDialogs.md @@ -36,13 +36,10 @@ description: messages.getDialogs parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v55/methods/messages_getDocumentByHash.md b/old_docs/API_docs_v55/methods/messages_getDocumentByHash.md index dda54bdd..3902ac44 100644 --- a/old_docs/API_docs_v55/methods/messages_getDocumentByHash.md +++ b/old_docs/API_docs_v55/methods/messages_getDocumentByHash.md @@ -32,16 +32,13 @@ description: messages.getDocumentByHash parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v55/methods/messages_getFeaturedStickers.md b/old_docs/API_docs_v55/methods/messages_getFeaturedStickers.md index 9573464a..5aad1810 100644 --- a/old_docs/API_docs_v55/methods/messages_getFeaturedStickers.md +++ b/old_docs/API_docs_v55/methods/messages_getFeaturedStickers.md @@ -23,13 +23,10 @@ description: messages.getFeaturedStickers parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v55/methods/messages_getHistory.md b/old_docs/API_docs_v55/methods/messages_getHistory.md index a48a465e..4c3ef2ee 100644 --- a/old_docs/API_docs_v55/methods/messages_getHistory.md +++ b/old_docs/API_docs_v55/methods/messages_getHistory.md @@ -41,13 +41,10 @@ description: messages.getHistory parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v55/methods/messages_getInlineBotResults.md b/old_docs/API_docs_v55/methods/messages_getInlineBotResults.md index 61366580..61b927fc 100644 --- a/old_docs/API_docs_v55/methods/messages_getInlineBotResults.md +++ b/old_docs/API_docs_v55/methods/messages_getInlineBotResults.md @@ -37,13 +37,10 @@ description: messages.getInlineBotResults parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v55/methods/messages_getMessageEditData.md b/old_docs/API_docs_v55/methods/messages_getMessageEditData.md index a8b135c6..15085153 100644 --- a/old_docs/API_docs_v55/methods/messages_getMessageEditData.md +++ b/old_docs/API_docs_v55/methods/messages_getMessageEditData.md @@ -32,13 +32,10 @@ description: messages.getMessageEditData parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v55/methods/messages_getMessages.md b/old_docs/API_docs_v55/methods/messages_getMessages.md index 5a970246..787c46dd 100644 --- a/old_docs/API_docs_v55/methods/messages_getMessages.md +++ b/old_docs/API_docs_v55/methods/messages_getMessages.md @@ -23,16 +23,13 @@ description: messages.getMessages parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v55/methods/messages_getMessagesViews.md b/old_docs/API_docs_v55/methods/messages_getMessagesViews.md index 263f3f95..de5692dc 100644 --- a/old_docs/API_docs_v55/methods/messages_getMessagesViews.md +++ b/old_docs/API_docs_v55/methods/messages_getMessagesViews.md @@ -34,13 +34,10 @@ description: messages.getMessagesViews parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v55/methods/messages_getPeerDialogs.md b/old_docs/API_docs_v55/methods/messages_getPeerDialogs.md index 3da60038..226948ae 100644 --- a/old_docs/API_docs_v55/methods/messages_getPeerDialogs.md +++ b/old_docs/API_docs_v55/methods/messages_getPeerDialogs.md @@ -31,13 +31,10 @@ description: messages.getPeerDialogs parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v55/methods/messages_getPeerSettings.md b/old_docs/API_docs_v55/methods/messages_getPeerSettings.md index d3e3cfc3..2a92f2da 100644 --- a/old_docs/API_docs_v55/methods/messages_getPeerSettings.md +++ b/old_docs/API_docs_v55/methods/messages_getPeerSettings.md @@ -31,13 +31,10 @@ description: messages.getPeerSettings parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v55/methods/messages_getRecentStickers.md b/old_docs/API_docs_v55/methods/messages_getRecentStickers.md index 51ca5408..934a1291 100644 --- a/old_docs/API_docs_v55/methods/messages_getRecentStickers.md +++ b/old_docs/API_docs_v55/methods/messages_getRecentStickers.md @@ -23,13 +23,10 @@ description: messages.getRecentStickers parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v55/methods/messages_getSavedGifs.md b/old_docs/API_docs_v55/methods/messages_getSavedGifs.md index 7cce4ffe..4986d812 100644 --- a/old_docs/API_docs_v55/methods/messages_getSavedGifs.md +++ b/old_docs/API_docs_v55/methods/messages_getSavedGifs.md @@ -23,13 +23,10 @@ description: messages.getSavedGifs parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v55/methods/messages_getStickerSet.md b/old_docs/API_docs_v55/methods/messages_getStickerSet.md index 59f33916..b480e0fe 100644 --- a/old_docs/API_docs_v55/methods/messages_getStickerSet.md +++ b/old_docs/API_docs_v55/methods/messages_getStickerSet.md @@ -30,16 +30,13 @@ description: messages.getStickerSet parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v55/methods/messages_getStickers.md b/old_docs/API_docs_v55/methods/messages_getStickers.md index be61a120..1587cd01 100644 --- a/old_docs/API_docs_v55/methods/messages_getStickers.md +++ b/old_docs/API_docs_v55/methods/messages_getStickers.md @@ -24,16 +24,13 @@ description: messages.getStickers parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v55/methods/messages_getUnusedStickers.md b/old_docs/API_docs_v55/methods/messages_getUnusedStickers.md index a4c1fcd1..f2aa04e9 100644 --- a/old_docs/API_docs_v55/methods/messages_getUnusedStickers.md +++ b/old_docs/API_docs_v55/methods/messages_getUnusedStickers.md @@ -23,16 +23,13 @@ description: messages.getUnusedStickers parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v55/methods/messages_getWebPagePreview.md b/old_docs/API_docs_v55/methods/messages_getWebPagePreview.md index a89600b1..d3908933 100644 --- a/old_docs/API_docs_v55/methods/messages_getWebPagePreview.md +++ b/old_docs/API_docs_v55/methods/messages_getWebPagePreview.md @@ -23,13 +23,10 @@ description: messages.getWebPagePreview parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v55/methods/messages_hideReportSpam.md b/old_docs/API_docs_v55/methods/messages_hideReportSpam.md index 2dfe4dd7..5635665c 100644 --- a/old_docs/API_docs_v55/methods/messages_hideReportSpam.md +++ b/old_docs/API_docs_v55/methods/messages_hideReportSpam.md @@ -30,13 +30,10 @@ description: messages.hideReportSpam parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v55/methods/messages_importChatInvite.md b/old_docs/API_docs_v55/methods/messages_importChatInvite.md index 9d77304d..9dcfa56d 100644 --- a/old_docs/API_docs_v55/methods/messages_importChatInvite.md +++ b/old_docs/API_docs_v55/methods/messages_importChatInvite.md @@ -36,13 +36,10 @@ description: messages.importChatInvite parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v55/methods/messages_installStickerSet.md b/old_docs/API_docs_v55/methods/messages_installStickerSet.md index 3dde52a7..016d5ece 100644 --- a/old_docs/API_docs_v55/methods/messages_installStickerSet.md +++ b/old_docs/API_docs_v55/methods/messages_installStickerSet.md @@ -31,13 +31,10 @@ description: messages.installStickerSet parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v55/methods/messages_migrateChat.md b/old_docs/API_docs_v55/methods/messages_migrateChat.md index 22d2fbf0..a8274e70 100644 --- a/old_docs/API_docs_v55/methods/messages_migrateChat.md +++ b/old_docs/API_docs_v55/methods/messages_migrateChat.md @@ -32,13 +32,10 @@ description: messages.migrateChat parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v55/methods/messages_readEncryptedHistory.md b/old_docs/API_docs_v55/methods/messages_readEncryptedHistory.md index 766ee07d..f38f6b07 100644 --- a/old_docs/API_docs_v55/methods/messages_readEncryptedHistory.md +++ b/old_docs/API_docs_v55/methods/messages_readEncryptedHistory.md @@ -31,16 +31,13 @@ description: messages.readEncryptedHistory parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v55/methods/messages_readFeaturedStickers.md b/old_docs/API_docs_v55/methods/messages_readFeaturedStickers.md index 21157738..0efba5c3 100644 --- a/old_docs/API_docs_v55/methods/messages_readFeaturedStickers.md +++ b/old_docs/API_docs_v55/methods/messages_readFeaturedStickers.md @@ -18,13 +18,10 @@ description: messages.readFeaturedStickers parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v55/methods/messages_readHistory.md b/old_docs/API_docs_v55/methods/messages_readHistory.md index 1aa7830a..fef62130 100644 --- a/old_docs/API_docs_v55/methods/messages_readHistory.md +++ b/old_docs/API_docs_v55/methods/messages_readHistory.md @@ -32,13 +32,10 @@ description: messages.readHistory parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v55/methods/messages_readMessageContents.md b/old_docs/API_docs_v55/methods/messages_readMessageContents.md index 4b1abda0..7a6055fc 100644 --- a/old_docs/API_docs_v55/methods/messages_readMessageContents.md +++ b/old_docs/API_docs_v55/methods/messages_readMessageContents.md @@ -23,13 +23,10 @@ description: messages.readMessageContents parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v55/methods/messages_receivedMessages.md b/old_docs/API_docs_v55/methods/messages_receivedMessages.md index 588ac5cf..e2cf3a2f 100644 --- a/old_docs/API_docs_v55/methods/messages_receivedMessages.md +++ b/old_docs/API_docs_v55/methods/messages_receivedMessages.md @@ -23,13 +23,10 @@ description: messages.receivedMessages parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v55/methods/messages_receivedQueue.md b/old_docs/API_docs_v55/methods/messages_receivedQueue.md index 3c7f1d4f..38f504b3 100644 --- a/old_docs/API_docs_v55/methods/messages_receivedQueue.md +++ b/old_docs/API_docs_v55/methods/messages_receivedQueue.md @@ -30,16 +30,13 @@ description: messages.receivedQueue parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v55/methods/messages_reorderStickerSets.md b/old_docs/API_docs_v55/methods/messages_reorderStickerSets.md index cb35605a..e09057e7 100644 --- a/old_docs/API_docs_v55/methods/messages_reorderStickerSets.md +++ b/old_docs/API_docs_v55/methods/messages_reorderStickerSets.md @@ -23,13 +23,10 @@ description: messages.reorderStickerSets parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v55/methods/messages_reportSpam.md b/old_docs/API_docs_v55/methods/messages_reportSpam.md index bfadb9ab..08c96d44 100644 --- a/old_docs/API_docs_v55/methods/messages_reportSpam.md +++ b/old_docs/API_docs_v55/methods/messages_reportSpam.md @@ -30,13 +30,10 @@ description: messages.reportSpam parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v55/methods/messages_saveDraft.md b/old_docs/API_docs_v55/methods/messages_saveDraft.md index 42308b46..f68090c0 100644 --- a/old_docs/API_docs_v55/methods/messages_saveDraft.md +++ b/old_docs/API_docs_v55/methods/messages_saveDraft.md @@ -35,13 +35,10 @@ description: messages.saveDraft parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v55/methods/messages_saveGif.md b/old_docs/API_docs_v55/methods/messages_saveGif.md index 31e48632..d86d539a 100644 --- a/old_docs/API_docs_v55/methods/messages_saveGif.md +++ b/old_docs/API_docs_v55/methods/messages_saveGif.md @@ -31,13 +31,10 @@ description: messages.saveGif parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v55/methods/messages_saveRecentSticker.md b/old_docs/API_docs_v55/methods/messages_saveRecentSticker.md index 5e74b88f..11273fb2 100644 --- a/old_docs/API_docs_v55/methods/messages_saveRecentSticker.md +++ b/old_docs/API_docs_v55/methods/messages_saveRecentSticker.md @@ -31,13 +31,10 @@ description: messages.saveRecentSticker parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v55/methods/messages_search.md b/old_docs/API_docs_v55/methods/messages_search.md index 87073d00..1e809cf2 100644 --- a/old_docs/API_docs_v55/methods/messages_search.md +++ b/old_docs/API_docs_v55/methods/messages_search.md @@ -43,13 +43,10 @@ description: messages.search parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v55/methods/messages_searchGifs.md b/old_docs/API_docs_v55/methods/messages_searchGifs.md index 3f4c4838..dd804c99 100644 --- a/old_docs/API_docs_v55/methods/messages_searchGifs.md +++ b/old_docs/API_docs_v55/methods/messages_searchGifs.md @@ -31,13 +31,10 @@ description: messages.searchGifs parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v55/methods/messages_searchGlobal.md b/old_docs/API_docs_v55/methods/messages_searchGlobal.md index 0553dd7a..4b45eed2 100644 --- a/old_docs/API_docs_v55/methods/messages_searchGlobal.md +++ b/old_docs/API_docs_v55/methods/messages_searchGlobal.md @@ -34,13 +34,10 @@ description: messages.searchGlobal parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v55/methods/messages_sendBroadcast.md b/old_docs/API_docs_v55/methods/messages_sendBroadcast.md index ac13d0bf..537166ab 100644 --- a/old_docs/API_docs_v55/methods/messages_sendBroadcast.md +++ b/old_docs/API_docs_v55/methods/messages_sendBroadcast.md @@ -25,16 +25,13 @@ description: messages.sendBroadcast parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v55/methods/messages_sendEncrypted.md b/old_docs/API_docs_v55/methods/messages_sendEncrypted.md index 82eeec92..ba9f796b 100644 --- a/old_docs/API_docs_v55/methods/messages_sendEncrypted.md +++ b/old_docs/API_docs_v55/methods/messages_sendEncrypted.md @@ -34,16 +34,13 @@ description: messages.sendEncrypted parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v55/methods/messages_sendEncryptedFile.md b/old_docs/API_docs_v55/methods/messages_sendEncryptedFile.md index 8f7a73d9..db16bf2d 100644 --- a/old_docs/API_docs_v55/methods/messages_sendEncryptedFile.md +++ b/old_docs/API_docs_v55/methods/messages_sendEncryptedFile.md @@ -32,16 +32,13 @@ description: messages.sendEncryptedFile parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v55/methods/messages_sendEncryptedService.md b/old_docs/API_docs_v55/methods/messages_sendEncryptedService.md index d427f6c3..fd4e2627 100644 --- a/old_docs/API_docs_v55/methods/messages_sendEncryptedService.md +++ b/old_docs/API_docs_v55/methods/messages_sendEncryptedService.md @@ -34,16 +34,13 @@ description: messages.sendEncryptedService parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v55/methods/messages_sendInlineBotResult.md b/old_docs/API_docs_v55/methods/messages_sendInlineBotResult.md index 6aeeb67d..d974fe69 100644 --- a/old_docs/API_docs_v55/methods/messages_sendInlineBotResult.md +++ b/old_docs/API_docs_v55/methods/messages_sendInlineBotResult.md @@ -39,13 +39,10 @@ description: messages.sendInlineBotResult parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v55/methods/messages_sendMedia.md b/old_docs/API_docs_v55/methods/messages_sendMedia.md index b3ceb5d4..b58bf325 100644 --- a/old_docs/API_docs_v55/methods/messages_sendMedia.md +++ b/old_docs/API_docs_v55/methods/messages_sendMedia.md @@ -59,16 +59,13 @@ description: messages.sendMedia parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v55/methods/messages_sendMessage.md b/old_docs/API_docs_v55/methods/messages_sendMessage.md index 60b50412..3a515129 100644 --- a/old_docs/API_docs_v55/methods/messages_sendMessage.md +++ b/old_docs/API_docs_v55/methods/messages_sendMessage.md @@ -58,16 +58,13 @@ description: messages.sendMessage parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v55/methods/messages_setBotCallbackAnswer.md b/old_docs/API_docs_v55/methods/messages_setBotCallbackAnswer.md index fb10afe1..ad408378 100644 --- a/old_docs/API_docs_v55/methods/messages_setBotCallbackAnswer.md +++ b/old_docs/API_docs_v55/methods/messages_setBotCallbackAnswer.md @@ -33,16 +33,13 @@ description: messages.setBotCallbackAnswer parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v55/methods/messages_setEncryptedTyping.md b/old_docs/API_docs_v55/methods/messages_setEncryptedTyping.md index a05b94dd..aeae6ff7 100644 --- a/old_docs/API_docs_v55/methods/messages_setEncryptedTyping.md +++ b/old_docs/API_docs_v55/methods/messages_setEncryptedTyping.md @@ -31,13 +31,10 @@ description: messages.setEncryptedTyping parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v55/methods/messages_setInlineBotResults.md b/old_docs/API_docs_v55/methods/messages_setInlineBotResults.md index 8b5625f3..8b49c4c7 100644 --- a/old_docs/API_docs_v55/methods/messages_setInlineBotResults.md +++ b/old_docs/API_docs_v55/methods/messages_setInlineBotResults.md @@ -46,16 +46,13 @@ description: messages.setInlineBotResults parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v55/methods/messages_setTyping.md b/old_docs/API_docs_v55/methods/messages_setTyping.md index 9ef8caf5..f6b7b7b5 100644 --- a/old_docs/API_docs_v55/methods/messages_setTyping.md +++ b/old_docs/API_docs_v55/methods/messages_setTyping.md @@ -37,16 +37,13 @@ description: messages.setTyping parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v55/methods/messages_startBot.md b/old_docs/API_docs_v55/methods/messages_startBot.md index 8d98e390..b33ab013 100644 --- a/old_docs/API_docs_v55/methods/messages_startBot.md +++ b/old_docs/API_docs_v55/methods/messages_startBot.md @@ -35,13 +35,10 @@ description: messages.startBot parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v55/methods/messages_toggleChatAdmins.md b/old_docs/API_docs_v55/methods/messages_toggleChatAdmins.md index 3bf8a419..97328065 100644 --- a/old_docs/API_docs_v55/methods/messages_toggleChatAdmins.md +++ b/old_docs/API_docs_v55/methods/messages_toggleChatAdmins.md @@ -32,13 +32,10 @@ description: messages.toggleChatAdmins parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v55/methods/messages_uninstallStickerSet.md b/old_docs/API_docs_v55/methods/messages_uninstallStickerSet.md index 6763e64f..76a3e3e2 100644 --- a/old_docs/API_docs_v55/methods/messages_uninstallStickerSet.md +++ b/old_docs/API_docs_v55/methods/messages_uninstallStickerSet.md @@ -30,13 +30,10 @@ description: messages.uninstallStickerSet parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v55/methods/photos_deletePhotos.md b/old_docs/API_docs_v55/methods/photos_deletePhotos.md index e9cd459d..61768b1e 100644 --- a/old_docs/API_docs_v55/methods/photos_deletePhotos.md +++ b/old_docs/API_docs_v55/methods/photos_deletePhotos.md @@ -23,13 +23,10 @@ description: photos.deletePhotos parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v55/methods/photos_getUserPhotos.md b/old_docs/API_docs_v55/methods/photos_getUserPhotos.md index d6c2a380..095363e7 100644 --- a/old_docs/API_docs_v55/methods/photos_getUserPhotos.md +++ b/old_docs/API_docs_v55/methods/photos_getUserPhotos.md @@ -34,16 +34,13 @@ description: photos.getUserPhotos parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v55/methods/photos_updateProfilePhoto.md b/old_docs/API_docs_v55/methods/photos_updateProfilePhoto.md index abb031d4..add6028f 100644 --- a/old_docs/API_docs_v55/methods/photos_updateProfilePhoto.md +++ b/old_docs/API_docs_v55/methods/photos_updateProfilePhoto.md @@ -24,13 +24,10 @@ description: photos.updateProfilePhoto parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v55/methods/photos_uploadProfilePhoto.md b/old_docs/API_docs_v55/methods/photos_uploadProfilePhoto.md index ae20fdfc..048a1d32 100644 --- a/old_docs/API_docs_v55/methods/photos_uploadProfilePhoto.md +++ b/old_docs/API_docs_v55/methods/photos_uploadProfilePhoto.md @@ -37,13 +37,10 @@ description: photos.uploadProfilePhoto parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v55/methods/users_getUsers.md b/old_docs/API_docs_v55/methods/users_getUsers.md index 6a44d258..3a981d57 100644 --- a/old_docs/API_docs_v55/methods/users_getUsers.md +++ b/old_docs/API_docs_v55/methods/users_getUsers.md @@ -33,16 +33,13 @@ description: users.getUsers parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v57/methods/account_changePhone.md b/old_docs/API_docs_v57/methods/account_changePhone.md index 5d1801d0..e47ef6a7 100644 --- a/old_docs/API_docs_v57/methods/account_changePhone.md +++ b/old_docs/API_docs_v57/methods/account_changePhone.md @@ -32,13 +32,10 @@ description: account.changePhone parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v57/methods/account_checkUsername.md b/old_docs/API_docs_v57/methods/account_checkUsername.md index afc59b6c..40cf822f 100644 --- a/old_docs/API_docs_v57/methods/account_checkUsername.md +++ b/old_docs/API_docs_v57/methods/account_checkUsername.md @@ -30,13 +30,10 @@ description: account.checkUsername parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v57/methods/account_confirmPhone.md b/old_docs/API_docs_v57/methods/account_confirmPhone.md index 0d2dc5c6..8dd79d94 100644 --- a/old_docs/API_docs_v57/methods/account_confirmPhone.md +++ b/old_docs/API_docs_v57/methods/account_confirmPhone.md @@ -32,13 +32,10 @@ description: account.confirmPhone parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v57/methods/account_deleteAccount.md b/old_docs/API_docs_v57/methods/account_deleteAccount.md index 5abcd0ec..6f1bbda9 100644 --- a/old_docs/API_docs_v57/methods/account_deleteAccount.md +++ b/old_docs/API_docs_v57/methods/account_deleteAccount.md @@ -23,13 +23,10 @@ description: account.deleteAccount parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v57/methods/account_getAccountTTL.md b/old_docs/API_docs_v57/methods/account_getAccountTTL.md index 3520fbef..538b1d7a 100644 --- a/old_docs/API_docs_v57/methods/account_getAccountTTL.md +++ b/old_docs/API_docs_v57/methods/account_getAccountTTL.md @@ -18,13 +18,10 @@ description: account.getAccountTTL parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v57/methods/account_getAuthorizations.md b/old_docs/API_docs_v57/methods/account_getAuthorizations.md index 91bbce5e..f138d517 100644 --- a/old_docs/API_docs_v57/methods/account_getAuthorizations.md +++ b/old_docs/API_docs_v57/methods/account_getAuthorizations.md @@ -18,13 +18,10 @@ description: account.getAuthorizations parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v57/methods/account_getNotifySettings.md b/old_docs/API_docs_v57/methods/account_getNotifySettings.md index 8ee710d8..a48eed2f 100644 --- a/old_docs/API_docs_v57/methods/account_getNotifySettings.md +++ b/old_docs/API_docs_v57/methods/account_getNotifySettings.md @@ -30,13 +30,10 @@ description: account.getNotifySettings parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v57/methods/account_getPassword.md b/old_docs/API_docs_v57/methods/account_getPassword.md index 4d9fd015..1abf6174 100644 --- a/old_docs/API_docs_v57/methods/account_getPassword.md +++ b/old_docs/API_docs_v57/methods/account_getPassword.md @@ -18,13 +18,10 @@ description: account.getPassword parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v57/methods/account_getPasswordSettings.md b/old_docs/API_docs_v57/methods/account_getPasswordSettings.md index 02cb77f7..aec5b989 100644 --- a/old_docs/API_docs_v57/methods/account_getPasswordSettings.md +++ b/old_docs/API_docs_v57/methods/account_getPasswordSettings.md @@ -30,13 +30,10 @@ description: account.getPasswordSettings parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v57/methods/account_getPrivacy.md b/old_docs/API_docs_v57/methods/account_getPrivacy.md index 52786b79..8bbe9795 100644 --- a/old_docs/API_docs_v57/methods/account_getPrivacy.md +++ b/old_docs/API_docs_v57/methods/account_getPrivacy.md @@ -30,13 +30,10 @@ description: account.getPrivacy parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v57/methods/account_getWallPapers.md b/old_docs/API_docs_v57/methods/account_getWallPapers.md index 88c8a701..a71543d0 100644 --- a/old_docs/API_docs_v57/methods/account_getWallPapers.md +++ b/old_docs/API_docs_v57/methods/account_getWallPapers.md @@ -18,13 +18,10 @@ description: account.getWallPapers parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v57/methods/account_registerDevice.md b/old_docs/API_docs_v57/methods/account_registerDevice.md index 3cc7f98d..8be04ad2 100644 --- a/old_docs/API_docs_v57/methods/account_registerDevice.md +++ b/old_docs/API_docs_v57/methods/account_registerDevice.md @@ -31,13 +31,10 @@ description: account.registerDevice parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v57/methods/account_reportPeer.md b/old_docs/API_docs_v57/methods/account_reportPeer.md index 1545c3b8..1ae9f4d4 100644 --- a/old_docs/API_docs_v57/methods/account_reportPeer.md +++ b/old_docs/API_docs_v57/methods/account_reportPeer.md @@ -31,13 +31,10 @@ description: account.reportPeer parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v57/methods/account_resetAuthorization.md b/old_docs/API_docs_v57/methods/account_resetAuthorization.md index e44334f2..0438cba3 100644 --- a/old_docs/API_docs_v57/methods/account_resetAuthorization.md +++ b/old_docs/API_docs_v57/methods/account_resetAuthorization.md @@ -30,13 +30,10 @@ description: account.resetAuthorization parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v57/methods/account_resetNotifySettings.md b/old_docs/API_docs_v57/methods/account_resetNotifySettings.md index 155ede68..92db4f4f 100644 --- a/old_docs/API_docs_v57/methods/account_resetNotifySettings.md +++ b/old_docs/API_docs_v57/methods/account_resetNotifySettings.md @@ -18,13 +18,10 @@ description: account.resetNotifySettings parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v57/methods/account_sendChangePhoneCode.md b/old_docs/API_docs_v57/methods/account_sendChangePhoneCode.md index 4be218f2..017b5f7f 100644 --- a/old_docs/API_docs_v57/methods/account_sendChangePhoneCode.md +++ b/old_docs/API_docs_v57/methods/account_sendChangePhoneCode.md @@ -32,13 +32,10 @@ description: account.sendChangePhoneCode parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v57/methods/account_sendConfirmPhoneCode.md b/old_docs/API_docs_v57/methods/account_sendConfirmPhoneCode.md index 009fcb09..3665bd50 100644 --- a/old_docs/API_docs_v57/methods/account_sendConfirmPhoneCode.md +++ b/old_docs/API_docs_v57/methods/account_sendConfirmPhoneCode.md @@ -32,13 +32,10 @@ description: account.sendConfirmPhoneCode parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v57/methods/account_setAccountTTL.md b/old_docs/API_docs_v57/methods/account_setAccountTTL.md index f06eb676..d08f59fb 100644 --- a/old_docs/API_docs_v57/methods/account_setAccountTTL.md +++ b/old_docs/API_docs_v57/methods/account_setAccountTTL.md @@ -30,13 +30,10 @@ description: account.setAccountTTL parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v57/methods/account_setPrivacy.md b/old_docs/API_docs_v57/methods/account_setPrivacy.md index 56aebbcc..401aa71c 100644 --- a/old_docs/API_docs_v57/methods/account_setPrivacy.md +++ b/old_docs/API_docs_v57/methods/account_setPrivacy.md @@ -31,13 +31,10 @@ description: account.setPrivacy parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v57/methods/account_unregisterDevice.md b/old_docs/API_docs_v57/methods/account_unregisterDevice.md index 41899b6e..283ec7d2 100644 --- a/old_docs/API_docs_v57/methods/account_unregisterDevice.md +++ b/old_docs/API_docs_v57/methods/account_unregisterDevice.md @@ -31,13 +31,10 @@ description: account.unregisterDevice parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v57/methods/account_updateDeviceLocked.md b/old_docs/API_docs_v57/methods/account_updateDeviceLocked.md index 37aeb59d..ae6125a5 100644 --- a/old_docs/API_docs_v57/methods/account_updateDeviceLocked.md +++ b/old_docs/API_docs_v57/methods/account_updateDeviceLocked.md @@ -23,13 +23,10 @@ description: account.updateDeviceLocked parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v57/methods/account_updateNotifySettings.md b/old_docs/API_docs_v57/methods/account_updateNotifySettings.md index 8389b5c2..fb096250 100644 --- a/old_docs/API_docs_v57/methods/account_updateNotifySettings.md +++ b/old_docs/API_docs_v57/methods/account_updateNotifySettings.md @@ -31,13 +31,10 @@ description: account.updateNotifySettings parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v57/methods/account_updatePasswordSettings.md b/old_docs/API_docs_v57/methods/account_updatePasswordSettings.md index b7c8da4b..ffa8dcd9 100644 --- a/old_docs/API_docs_v57/methods/account_updatePasswordSettings.md +++ b/old_docs/API_docs_v57/methods/account_updatePasswordSettings.md @@ -34,13 +34,10 @@ description: account.updatePasswordSettings parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v57/methods/account_updateProfile.md b/old_docs/API_docs_v57/methods/account_updateProfile.md index a50eaea5..b3d468d1 100644 --- a/old_docs/API_docs_v57/methods/account_updateProfile.md +++ b/old_docs/API_docs_v57/methods/account_updateProfile.md @@ -33,13 +33,10 @@ description: account.updateProfile parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v57/methods/account_updateStatus.md b/old_docs/API_docs_v57/methods/account_updateStatus.md index 7204e582..c8fa0a79 100644 --- a/old_docs/API_docs_v57/methods/account_updateStatus.md +++ b/old_docs/API_docs_v57/methods/account_updateStatus.md @@ -30,13 +30,10 @@ description: account.updateStatus parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v57/methods/account_updateUsername.md b/old_docs/API_docs_v57/methods/account_updateUsername.md index 22be2fd4..2b7576a5 100644 --- a/old_docs/API_docs_v57/methods/account_updateUsername.md +++ b/old_docs/API_docs_v57/methods/account_updateUsername.md @@ -32,13 +32,10 @@ description: account.updateUsername parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v57/methods/auth_bindTempAuthKey.md b/old_docs/API_docs_v57/methods/auth_bindTempAuthKey.md index e3d72dd5..7419abb0 100644 --- a/old_docs/API_docs_v57/methods/auth_bindTempAuthKey.md +++ b/old_docs/API_docs_v57/methods/auth_bindTempAuthKey.md @@ -35,16 +35,13 @@ description: auth.bindTempAuthKey parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v57/methods/auth_cancelCode.md b/old_docs/API_docs_v57/methods/auth_cancelCode.md index dc390329..05d927a1 100644 --- a/old_docs/API_docs_v57/methods/auth_cancelCode.md +++ b/old_docs/API_docs_v57/methods/auth_cancelCode.md @@ -31,13 +31,10 @@ description: auth.cancelCode parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v57/methods/auth_checkPassword.md b/old_docs/API_docs_v57/methods/auth_checkPassword.md index d5559186..6b6b21cc 100644 --- a/old_docs/API_docs_v57/methods/auth_checkPassword.md +++ b/old_docs/API_docs_v57/methods/auth_checkPassword.md @@ -30,13 +30,10 @@ description: auth.checkPassword parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v57/methods/auth_checkPhone.md b/old_docs/API_docs_v57/methods/auth_checkPhone.md index 3455904d..f6cac2e6 100644 --- a/old_docs/API_docs_v57/methods/auth_checkPhone.md +++ b/old_docs/API_docs_v57/methods/auth_checkPhone.md @@ -32,13 +32,10 @@ description: auth.checkPhone parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v57/methods/auth_dropTempAuthKeys.md b/old_docs/API_docs_v57/methods/auth_dropTempAuthKeys.md index aba76766..fedb7bf4 100644 --- a/old_docs/API_docs_v57/methods/auth_dropTempAuthKeys.md +++ b/old_docs/API_docs_v57/methods/auth_dropTempAuthKeys.md @@ -23,16 +23,13 @@ description: auth.dropTempAuthKeys parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v57/methods/auth_exportAuthorization.md b/old_docs/API_docs_v57/methods/auth_exportAuthorization.md index 44c45b70..cbc8203b 100644 --- a/old_docs/API_docs_v57/methods/auth_exportAuthorization.md +++ b/old_docs/API_docs_v57/methods/auth_exportAuthorization.md @@ -30,16 +30,13 @@ description: auth.exportAuthorization parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v57/methods/auth_importAuthorization.md b/old_docs/API_docs_v57/methods/auth_importAuthorization.md index e0fd534f..22166510 100644 --- a/old_docs/API_docs_v57/methods/auth_importAuthorization.md +++ b/old_docs/API_docs_v57/methods/auth_importAuthorization.md @@ -32,16 +32,13 @@ description: auth.importAuthorization parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v57/methods/auth_recoverPassword.md b/old_docs/API_docs_v57/methods/auth_recoverPassword.md index c2ce3fed..931e99fd 100644 --- a/old_docs/API_docs_v57/methods/auth_recoverPassword.md +++ b/old_docs/API_docs_v57/methods/auth_recoverPassword.md @@ -30,13 +30,10 @@ description: auth.recoverPassword parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v57/methods/auth_requestPasswordRecovery.md b/old_docs/API_docs_v57/methods/auth_requestPasswordRecovery.md index 101b1cf7..c6babcd9 100644 --- a/old_docs/API_docs_v57/methods/auth_requestPasswordRecovery.md +++ b/old_docs/API_docs_v57/methods/auth_requestPasswordRecovery.md @@ -25,13 +25,10 @@ description: auth.requestPasswordRecovery parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v57/methods/auth_resendCode.md b/old_docs/API_docs_v57/methods/auth_resendCode.md index 14d08ddd..df4803b8 100644 --- a/old_docs/API_docs_v57/methods/auth_resendCode.md +++ b/old_docs/API_docs_v57/methods/auth_resendCode.md @@ -31,13 +31,10 @@ description: auth.resendCode parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v57/methods/auth_resetAuthorizations.md b/old_docs/API_docs_v57/methods/auth_resetAuthorizations.md index 87a39a22..fe297fa7 100644 --- a/old_docs/API_docs_v57/methods/auth_resetAuthorizations.md +++ b/old_docs/API_docs_v57/methods/auth_resetAuthorizations.md @@ -25,13 +25,10 @@ description: auth.resetAuthorizations parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v57/methods/auth_sendInvites.md b/old_docs/API_docs_v57/methods/auth_sendInvites.md index 604fc65d..ad9636c5 100644 --- a/old_docs/API_docs_v57/methods/auth_sendInvites.md +++ b/old_docs/API_docs_v57/methods/auth_sendInvites.md @@ -31,13 +31,10 @@ description: auth.sendInvites parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v57/methods/channels_checkUsername.md b/old_docs/API_docs_v57/methods/channels_checkUsername.md index d6ea876d..e29ee107 100644 --- a/old_docs/API_docs_v57/methods/channels_checkUsername.md +++ b/old_docs/API_docs_v57/methods/channels_checkUsername.md @@ -33,13 +33,10 @@ description: channels.checkUsername parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v57/methods/channels_createChannel.md b/old_docs/API_docs_v57/methods/channels_createChannel.md index 9ba02e9e..58808b73 100644 --- a/old_docs/API_docs_v57/methods/channels_createChannel.md +++ b/old_docs/API_docs_v57/methods/channels_createChannel.md @@ -34,13 +34,10 @@ description: channels.createChannel parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v57/methods/channels_deleteChannel.md b/old_docs/API_docs_v57/methods/channels_deleteChannel.md index 912ab080..532f3c6c 100644 --- a/old_docs/API_docs_v57/methods/channels_deleteChannel.md +++ b/old_docs/API_docs_v57/methods/channels_deleteChannel.md @@ -31,13 +31,10 @@ description: channels.deleteChannel parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v57/methods/channels_deleteMessages.md b/old_docs/API_docs_v57/methods/channels_deleteMessages.md index b3481294..a42a47a5 100644 --- a/old_docs/API_docs_v57/methods/channels_deleteMessages.md +++ b/old_docs/API_docs_v57/methods/channels_deleteMessages.md @@ -33,16 +33,13 @@ description: channels.deleteMessages parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v57/methods/channels_deleteUserHistory.md b/old_docs/API_docs_v57/methods/channels_deleteUserHistory.md index 66843269..73494485 100644 --- a/old_docs/API_docs_v57/methods/channels_deleteUserHistory.md +++ b/old_docs/API_docs_v57/methods/channels_deleteUserHistory.md @@ -32,13 +32,10 @@ description: channels.deleteUserHistory parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v57/methods/channels_editAbout.md b/old_docs/API_docs_v57/methods/channels_editAbout.md index 4c759a8a..1c3ce933 100644 --- a/old_docs/API_docs_v57/methods/channels_editAbout.md +++ b/old_docs/API_docs_v57/methods/channels_editAbout.md @@ -34,16 +34,13 @@ description: channels.editAbout parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v57/methods/channels_editAdmin.md b/old_docs/API_docs_v57/methods/channels_editAdmin.md index 7707bdfe..42184227 100644 --- a/old_docs/API_docs_v57/methods/channels_editAdmin.md +++ b/old_docs/API_docs_v57/methods/channels_editAdmin.md @@ -41,16 +41,13 @@ description: channels.editAdmin parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v57/methods/channels_editPhoto.md b/old_docs/API_docs_v57/methods/channels_editPhoto.md index 99873537..4a4aeb03 100644 --- a/old_docs/API_docs_v57/methods/channels_editPhoto.md +++ b/old_docs/API_docs_v57/methods/channels_editPhoto.md @@ -33,16 +33,13 @@ description: channels.editPhoto parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v57/methods/channels_editTitle.md b/old_docs/API_docs_v57/methods/channels_editTitle.md index 04e8ce12..8a69d09b 100644 --- a/old_docs/API_docs_v57/methods/channels_editTitle.md +++ b/old_docs/API_docs_v57/methods/channels_editTitle.md @@ -33,16 +33,13 @@ description: channels.editTitle parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v57/methods/channels_exportInvite.md b/old_docs/API_docs_v57/methods/channels_exportInvite.md index 2ed80f6c..79dc6401 100644 --- a/old_docs/API_docs_v57/methods/channels_exportInvite.md +++ b/old_docs/API_docs_v57/methods/channels_exportInvite.md @@ -32,16 +32,13 @@ description: channels.exportInvite parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v57/methods/channels_exportMessageLink.md b/old_docs/API_docs_v57/methods/channels_exportMessageLink.md index 9831c9c0..5b824859 100644 --- a/old_docs/API_docs_v57/methods/channels_exportMessageLink.md +++ b/old_docs/API_docs_v57/methods/channels_exportMessageLink.md @@ -31,13 +31,10 @@ description: channels.exportMessageLink parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v57/methods/channels_getAdminedPublicChannels.md b/old_docs/API_docs_v57/methods/channels_getAdminedPublicChannels.md index 7fceb026..283a9071 100644 --- a/old_docs/API_docs_v57/methods/channels_getAdminedPublicChannels.md +++ b/old_docs/API_docs_v57/methods/channels_getAdminedPublicChannels.md @@ -18,13 +18,10 @@ description: channels.getAdminedPublicChannels parameters, return type and examp ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v57/methods/channels_getChannels.md b/old_docs/API_docs_v57/methods/channels_getChannels.md index 13304938..e80aa6a6 100644 --- a/old_docs/API_docs_v57/methods/channels_getChannels.md +++ b/old_docs/API_docs_v57/methods/channels_getChannels.md @@ -32,16 +32,13 @@ description: channels.getChannels parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v57/methods/channels_getMessages.md b/old_docs/API_docs_v57/methods/channels_getMessages.md index 5480dd86..dc392773 100644 --- a/old_docs/API_docs_v57/methods/channels_getMessages.md +++ b/old_docs/API_docs_v57/methods/channels_getMessages.md @@ -33,16 +33,13 @@ description: channels.getMessages parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v57/methods/channels_getParticipant.md b/old_docs/API_docs_v57/methods/channels_getParticipant.md index 8c7e3cbd..001bf115 100644 --- a/old_docs/API_docs_v57/methods/channels_getParticipant.md +++ b/old_docs/API_docs_v57/methods/channels_getParticipant.md @@ -35,16 +35,13 @@ description: channels.getParticipant parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v57/methods/channels_inviteToChannel.md b/old_docs/API_docs_v57/methods/channels_inviteToChannel.md index cf5480e0..2448fb84 100644 --- a/old_docs/API_docs_v57/methods/channels_inviteToChannel.md +++ b/old_docs/API_docs_v57/methods/channels_inviteToChannel.md @@ -46,13 +46,10 @@ description: channels.inviteToChannel parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v57/methods/channels_joinChannel.md b/old_docs/API_docs_v57/methods/channels_joinChannel.md index f31730a1..e746cf48 100644 --- a/old_docs/API_docs_v57/methods/channels_joinChannel.md +++ b/old_docs/API_docs_v57/methods/channels_joinChannel.md @@ -32,13 +32,10 @@ description: channels.joinChannel parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v57/methods/channels_kickFromChannel.md b/old_docs/API_docs_v57/methods/channels_kickFromChannel.md index c903caa4..c85833ce 100644 --- a/old_docs/API_docs_v57/methods/channels_kickFromChannel.md +++ b/old_docs/API_docs_v57/methods/channels_kickFromChannel.md @@ -25,16 +25,13 @@ description: channels.kickFromChannel parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v57/methods/channels_leaveChannel.md b/old_docs/API_docs_v57/methods/channels_leaveChannel.md index 12902f6d..ff244ded 100644 --- a/old_docs/API_docs_v57/methods/channels_leaveChannel.md +++ b/old_docs/API_docs_v57/methods/channels_leaveChannel.md @@ -34,16 +34,13 @@ description: channels.leaveChannel parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v57/methods/channels_readHistory.md b/old_docs/API_docs_v57/methods/channels_readHistory.md index be979101..6fc6ec0e 100644 --- a/old_docs/API_docs_v57/methods/channels_readHistory.md +++ b/old_docs/API_docs_v57/methods/channels_readHistory.md @@ -32,13 +32,10 @@ description: channels.readHistory parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v57/methods/channels_reportSpam.md b/old_docs/API_docs_v57/methods/channels_reportSpam.md index 22f34443..a37a5833 100644 --- a/old_docs/API_docs_v57/methods/channels_reportSpam.md +++ b/old_docs/API_docs_v57/methods/channels_reportSpam.md @@ -33,13 +33,10 @@ description: channels.reportSpam parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v57/methods/channels_toggleInvites.md b/old_docs/API_docs_v57/methods/channels_toggleInvites.md index c2715b32..d0ae1136 100644 --- a/old_docs/API_docs_v57/methods/channels_toggleInvites.md +++ b/old_docs/API_docs_v57/methods/channels_toggleInvites.md @@ -33,13 +33,10 @@ description: channels.toggleInvites parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v57/methods/channels_toggleSignatures.md b/old_docs/API_docs_v57/methods/channels_toggleSignatures.md index a214b849..6477bc6d 100644 --- a/old_docs/API_docs_v57/methods/channels_toggleSignatures.md +++ b/old_docs/API_docs_v57/methods/channels_toggleSignatures.md @@ -31,13 +31,10 @@ description: channels.toggleSignatures parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v57/methods/channels_updatePinnedMessage.md b/old_docs/API_docs_v57/methods/channels_updatePinnedMessage.md index 6dcabf71..37a0a20d 100644 --- a/old_docs/API_docs_v57/methods/channels_updatePinnedMessage.md +++ b/old_docs/API_docs_v57/methods/channels_updatePinnedMessage.md @@ -35,16 +35,13 @@ description: channels.updatePinnedMessage parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v57/methods/channels_updateUsername.md b/old_docs/API_docs_v57/methods/channels_updateUsername.md index c2ede724..1f1f111e 100644 --- a/old_docs/API_docs_v57/methods/channels_updateUsername.md +++ b/old_docs/API_docs_v57/methods/channels_updateUsername.md @@ -35,13 +35,10 @@ description: channels.updateUsername parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v57/methods/contacts_block.md b/old_docs/API_docs_v57/methods/contacts_block.md index d9d58e37..1c7cbe26 100644 --- a/old_docs/API_docs_v57/methods/contacts_block.md +++ b/old_docs/API_docs_v57/methods/contacts_block.md @@ -30,13 +30,10 @@ description: contacts.block parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v57/methods/contacts_deleteContact.md b/old_docs/API_docs_v57/methods/contacts_deleteContact.md index cd8c17ad..987a1be0 100644 --- a/old_docs/API_docs_v57/methods/contacts_deleteContact.md +++ b/old_docs/API_docs_v57/methods/contacts_deleteContact.md @@ -30,13 +30,10 @@ description: contacts.deleteContact parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v57/methods/contacts_deleteContacts.md b/old_docs/API_docs_v57/methods/contacts_deleteContacts.md index fc65880d..67a922ed 100644 --- a/old_docs/API_docs_v57/methods/contacts_deleteContacts.md +++ b/old_docs/API_docs_v57/methods/contacts_deleteContacts.md @@ -31,13 +31,10 @@ description: contacts.deleteContacts parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v57/methods/contacts_exportCard.md b/old_docs/API_docs_v57/methods/contacts_exportCard.md index 63508076..bf6d1f9f 100644 --- a/old_docs/API_docs_v57/methods/contacts_exportCard.md +++ b/old_docs/API_docs_v57/methods/contacts_exportCard.md @@ -18,13 +18,10 @@ description: contacts.exportCard parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v57/methods/contacts_getBlocked.md b/old_docs/API_docs_v57/methods/contacts_getBlocked.md index f50792b4..faa719da 100644 --- a/old_docs/API_docs_v57/methods/contacts_getBlocked.md +++ b/old_docs/API_docs_v57/methods/contacts_getBlocked.md @@ -24,13 +24,10 @@ description: contacts.getBlocked parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v57/methods/contacts_getContacts.md b/old_docs/API_docs_v57/methods/contacts_getContacts.md index 71313bf2..a6779111 100644 --- a/old_docs/API_docs_v57/methods/contacts_getContacts.md +++ b/old_docs/API_docs_v57/methods/contacts_getContacts.md @@ -23,13 +23,10 @@ description: contacts.getContacts parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v57/methods/contacts_getStatuses.md b/old_docs/API_docs_v57/methods/contacts_getStatuses.md index d914e08d..9bb7f263 100644 --- a/old_docs/API_docs_v57/methods/contacts_getStatuses.md +++ b/old_docs/API_docs_v57/methods/contacts_getStatuses.md @@ -18,13 +18,10 @@ description: contacts.getStatuses parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v57/methods/contacts_getTopPeers.md b/old_docs/API_docs_v57/methods/contacts_getTopPeers.md index 1caa1d77..d29f6e02 100644 --- a/old_docs/API_docs_v57/methods/contacts_getTopPeers.md +++ b/old_docs/API_docs_v57/methods/contacts_getTopPeers.md @@ -37,13 +37,10 @@ description: contacts.getTopPeers parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v57/methods/contacts_importCard.md b/old_docs/API_docs_v57/methods/contacts_importCard.md index a6abf56d..7a2f34e1 100644 --- a/old_docs/API_docs_v57/methods/contacts_importCard.md +++ b/old_docs/API_docs_v57/methods/contacts_importCard.md @@ -31,13 +31,10 @@ description: contacts.importCard parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v57/methods/contacts_importContacts.md b/old_docs/API_docs_v57/methods/contacts_importContacts.md index db2051ac..2f070493 100644 --- a/old_docs/API_docs_v57/methods/contacts_importContacts.md +++ b/old_docs/API_docs_v57/methods/contacts_importContacts.md @@ -24,13 +24,10 @@ description: contacts.importContacts parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v57/methods/contacts_resetTopPeerRating.md b/old_docs/API_docs_v57/methods/contacts_resetTopPeerRating.md index 738494b2..711ea0cb 100644 --- a/old_docs/API_docs_v57/methods/contacts_resetTopPeerRating.md +++ b/old_docs/API_docs_v57/methods/contacts_resetTopPeerRating.md @@ -31,13 +31,10 @@ description: contacts.resetTopPeerRating parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v57/methods/contacts_search.md b/old_docs/API_docs_v57/methods/contacts_search.md index 0203b160..70a0635e 100644 --- a/old_docs/API_docs_v57/methods/contacts_search.md +++ b/old_docs/API_docs_v57/methods/contacts_search.md @@ -33,13 +33,10 @@ description: contacts.search parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v57/methods/contacts_unblock.md b/old_docs/API_docs_v57/methods/contacts_unblock.md index a1977c24..9c01e42a 100644 --- a/old_docs/API_docs_v57/methods/contacts_unblock.md +++ b/old_docs/API_docs_v57/methods/contacts_unblock.md @@ -30,13 +30,10 @@ description: contacts.unblock parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v57/methods/help_getAppChangelog.md b/old_docs/API_docs_v57/methods/help_getAppChangelog.md index b0ab53f1..0f8a12bd 100644 --- a/old_docs/API_docs_v57/methods/help_getAppChangelog.md +++ b/old_docs/API_docs_v57/methods/help_getAppChangelog.md @@ -18,13 +18,10 @@ description: help.getAppChangelog parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v57/methods/help_getAppUpdate.md b/old_docs/API_docs_v57/methods/help_getAppUpdate.md index 0871f59d..89ff22c3 100644 --- a/old_docs/API_docs_v57/methods/help_getAppUpdate.md +++ b/old_docs/API_docs_v57/methods/help_getAppUpdate.md @@ -18,13 +18,10 @@ description: help.getAppUpdate parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v57/methods/help_getConfig.md b/old_docs/API_docs_v57/methods/help_getConfig.md index e3648b5a..bb51b362 100644 --- a/old_docs/API_docs_v57/methods/help_getConfig.md +++ b/old_docs/API_docs_v57/methods/help_getConfig.md @@ -25,16 +25,13 @@ description: help.getConfig parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v57/methods/help_getInviteText.md b/old_docs/API_docs_v57/methods/help_getInviteText.md index 4bcbb77d..6d2674d6 100644 --- a/old_docs/API_docs_v57/methods/help_getInviteText.md +++ b/old_docs/API_docs_v57/methods/help_getInviteText.md @@ -18,13 +18,10 @@ description: help.getInviteText parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v57/methods/help_getNearestDc.md b/old_docs/API_docs_v57/methods/help_getNearestDc.md index c6f5c555..6d8ed3f7 100644 --- a/old_docs/API_docs_v57/methods/help_getNearestDc.md +++ b/old_docs/API_docs_v57/methods/help_getNearestDc.md @@ -18,13 +18,10 @@ description: help.getNearestDc parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v57/methods/help_getSupport.md b/old_docs/API_docs_v57/methods/help_getSupport.md index 209edf03..ca8db03c 100644 --- a/old_docs/API_docs_v57/methods/help_getSupport.md +++ b/old_docs/API_docs_v57/methods/help_getSupport.md @@ -18,13 +18,10 @@ description: help.getSupport parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v57/methods/help_getTermsOfService.md b/old_docs/API_docs_v57/methods/help_getTermsOfService.md index 8bc2e2fa..eb686506 100644 --- a/old_docs/API_docs_v57/methods/help_getTermsOfService.md +++ b/old_docs/API_docs_v57/methods/help_getTermsOfService.md @@ -18,13 +18,10 @@ description: help.getTermsOfService parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v57/methods/help_saveAppLog.md b/old_docs/API_docs_v57/methods/help_saveAppLog.md index 4f06434c..741b9aa1 100644 --- a/old_docs/API_docs_v57/methods/help_saveAppLog.md +++ b/old_docs/API_docs_v57/methods/help_saveAppLog.md @@ -23,13 +23,10 @@ description: help.saveAppLog parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v57/methods/initConnection.md b/old_docs/API_docs_v57/methods/initConnection.md index 0d22a1cb..c0307677 100644 --- a/old_docs/API_docs_v57/methods/initConnection.md +++ b/old_docs/API_docs_v57/methods/initConnection.md @@ -36,16 +36,13 @@ description: initConnection parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v57/methods/invokeAfterMsg.md b/old_docs/API_docs_v57/methods/invokeAfterMsg.md index c139fe8c..a382429e 100644 --- a/old_docs/API_docs_v57/methods/invokeAfterMsg.md +++ b/old_docs/API_docs_v57/methods/invokeAfterMsg.md @@ -24,16 +24,13 @@ description: invokeAfterMsg parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v57/methods/invokeAfterMsgs.md b/old_docs/API_docs_v57/methods/invokeAfterMsgs.md index 35004296..169eedaf 100644 --- a/old_docs/API_docs_v57/methods/invokeAfterMsgs.md +++ b/old_docs/API_docs_v57/methods/invokeAfterMsgs.md @@ -24,16 +24,13 @@ description: invokeAfterMsgs parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v57/methods/invokeWithLayer.md b/old_docs/API_docs_v57/methods/invokeWithLayer.md index 706036c4..d9a2c74c 100644 --- a/old_docs/API_docs_v57/methods/invokeWithLayer.md +++ b/old_docs/API_docs_v57/methods/invokeWithLayer.md @@ -41,16 +41,13 @@ description: invokeWithLayer parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v57/methods/invokeWithoutUpdates.md b/old_docs/API_docs_v57/methods/invokeWithoutUpdates.md index 10c6bfcf..f7d01765 100644 --- a/old_docs/API_docs_v57/methods/invokeWithoutUpdates.md +++ b/old_docs/API_docs_v57/methods/invokeWithoutUpdates.md @@ -23,16 +23,13 @@ description: invokeWithoutUpdates parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v57/methods/messages_addChatUser.md b/old_docs/API_docs_v57/methods/messages_addChatUser.md index 00da5a61..b9e6243d 100644 --- a/old_docs/API_docs_v57/methods/messages_addChatUser.md +++ b/old_docs/API_docs_v57/methods/messages_addChatUser.md @@ -40,13 +40,10 @@ description: messages.addChatUser parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v57/methods/messages_checkChatInvite.md b/old_docs/API_docs_v57/methods/messages_checkChatInvite.md index c5eb1c06..c4489469 100644 --- a/old_docs/API_docs_v57/methods/messages_checkChatInvite.md +++ b/old_docs/API_docs_v57/methods/messages_checkChatInvite.md @@ -32,13 +32,10 @@ description: messages.checkChatInvite parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v57/methods/messages_clearRecentStickers.md b/old_docs/API_docs_v57/methods/messages_clearRecentStickers.md index dda76d14..ae45b249 100644 --- a/old_docs/API_docs_v57/methods/messages_clearRecentStickers.md +++ b/old_docs/API_docs_v57/methods/messages_clearRecentStickers.md @@ -23,13 +23,10 @@ description: messages.clearRecentStickers parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v57/methods/messages_createChat.md b/old_docs/API_docs_v57/methods/messages_createChat.md index c643a022..c6c8f420 100644 --- a/old_docs/API_docs_v57/methods/messages_createChat.md +++ b/old_docs/API_docs_v57/methods/messages_createChat.md @@ -32,13 +32,10 @@ description: messages.createChat parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v57/methods/messages_deleteChatUser.md b/old_docs/API_docs_v57/methods/messages_deleteChatUser.md index 3d75d9cf..4b8c2aa5 100644 --- a/old_docs/API_docs_v57/methods/messages_deleteChatUser.md +++ b/old_docs/API_docs_v57/methods/messages_deleteChatUser.md @@ -33,16 +33,13 @@ description: messages.deleteChatUser parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v57/methods/messages_deleteHistory.md b/old_docs/API_docs_v57/methods/messages_deleteHistory.md index ce6ba6e7..ebe2c89c 100644 --- a/old_docs/API_docs_v57/methods/messages_deleteHistory.md +++ b/old_docs/API_docs_v57/methods/messages_deleteHistory.md @@ -32,13 +32,10 @@ description: messages.deleteHistory parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v57/methods/messages_deleteMessages.md b/old_docs/API_docs_v57/methods/messages_deleteMessages.md index 65dbbc4a..38b3ca09 100644 --- a/old_docs/API_docs_v57/methods/messages_deleteMessages.md +++ b/old_docs/API_docs_v57/methods/messages_deleteMessages.md @@ -30,16 +30,13 @@ description: messages.deleteMessages parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v57/methods/messages_editChatAdmin.md b/old_docs/API_docs_v57/methods/messages_editChatAdmin.md index e64d9da5..1b3ffa9f 100644 --- a/old_docs/API_docs_v57/methods/messages_editChatAdmin.md +++ b/old_docs/API_docs_v57/methods/messages_editChatAdmin.md @@ -32,13 +32,10 @@ description: messages.editChatAdmin parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v57/methods/messages_editChatPhoto.md b/old_docs/API_docs_v57/methods/messages_editChatPhoto.md index d225962d..8c5d9d47 100644 --- a/old_docs/API_docs_v57/methods/messages_editChatPhoto.md +++ b/old_docs/API_docs_v57/methods/messages_editChatPhoto.md @@ -35,16 +35,13 @@ description: messages.editChatPhoto parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v57/methods/messages_editChatTitle.md b/old_docs/API_docs_v57/methods/messages_editChatTitle.md index 5cb1c6d7..238c6d72 100644 --- a/old_docs/API_docs_v57/methods/messages_editChatTitle.md +++ b/old_docs/API_docs_v57/methods/messages_editChatTitle.md @@ -32,16 +32,13 @@ description: messages.editChatTitle parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v57/methods/messages_editInlineBotMessage.md b/old_docs/API_docs_v57/methods/messages_editInlineBotMessage.md index 621c81a3..c3489f9d 100644 --- a/old_docs/API_docs_v57/methods/messages_editInlineBotMessage.md +++ b/old_docs/API_docs_v57/methods/messages_editInlineBotMessage.md @@ -36,16 +36,13 @@ description: messages.editInlineBotMessage parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v57/methods/messages_editMessage.md b/old_docs/API_docs_v57/methods/messages_editMessage.md index b8cdda81..3a23c9ac 100644 --- a/old_docs/API_docs_v57/methods/messages_editMessage.md +++ b/old_docs/API_docs_v57/methods/messages_editMessage.md @@ -45,16 +45,13 @@ description: messages.editMessage parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v57/methods/messages_exportChatInvite.md b/old_docs/API_docs_v57/methods/messages_exportChatInvite.md index 4a6e28ff..78f2ff86 100644 --- a/old_docs/API_docs_v57/methods/messages_exportChatInvite.md +++ b/old_docs/API_docs_v57/methods/messages_exportChatInvite.md @@ -30,13 +30,10 @@ description: messages.exportChatInvite parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v57/methods/messages_forwardMessage.md b/old_docs/API_docs_v57/methods/messages_forwardMessage.md index 4e2362db..fbdbc955 100644 --- a/old_docs/API_docs_v57/methods/messages_forwardMessage.md +++ b/old_docs/API_docs_v57/methods/messages_forwardMessage.md @@ -34,16 +34,13 @@ description: messages.forwardMessage parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v57/methods/messages_forwardMessages.md b/old_docs/API_docs_v57/methods/messages_forwardMessages.md index b5e9b7e7..5a609390 100644 --- a/old_docs/API_docs_v57/methods/messages_forwardMessages.md +++ b/old_docs/API_docs_v57/methods/messages_forwardMessages.md @@ -56,16 +56,13 @@ description: messages.forwardMessages parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v57/methods/messages_getAllDrafts.md b/old_docs/API_docs_v57/methods/messages_getAllDrafts.md index cc447864..8550c5b8 100644 --- a/old_docs/API_docs_v57/methods/messages_getAllDrafts.md +++ b/old_docs/API_docs_v57/methods/messages_getAllDrafts.md @@ -18,13 +18,10 @@ description: messages.getAllDrafts parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v57/methods/messages_getAllStickers.md b/old_docs/API_docs_v57/methods/messages_getAllStickers.md index dc9e2432..034438a5 100644 --- a/old_docs/API_docs_v57/methods/messages_getAllStickers.md +++ b/old_docs/API_docs_v57/methods/messages_getAllStickers.md @@ -23,13 +23,10 @@ description: messages.getAllStickers parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v57/methods/messages_getArchivedStickers.md b/old_docs/API_docs_v57/methods/messages_getArchivedStickers.md index dddcc748..cdb7f0af 100644 --- a/old_docs/API_docs_v57/methods/messages_getArchivedStickers.md +++ b/old_docs/API_docs_v57/methods/messages_getArchivedStickers.md @@ -25,13 +25,10 @@ description: messages.getArchivedStickers parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v57/methods/messages_getAttachedStickers.md b/old_docs/API_docs_v57/methods/messages_getAttachedStickers.md index 250db6a8..79d4e30d 100644 --- a/old_docs/API_docs_v57/methods/messages_getAttachedStickers.md +++ b/old_docs/API_docs_v57/methods/messages_getAttachedStickers.md @@ -23,13 +23,10 @@ description: messages.getAttachedStickers parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v57/methods/messages_getBotCallbackAnswer.md b/old_docs/API_docs_v57/methods/messages_getBotCallbackAnswer.md index e905723f..afa5358c 100644 --- a/old_docs/API_docs_v57/methods/messages_getBotCallbackAnswer.md +++ b/old_docs/API_docs_v57/methods/messages_getBotCallbackAnswer.md @@ -37,13 +37,10 @@ description: messages.getBotCallbackAnswer parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v57/methods/messages_getChats.md b/old_docs/API_docs_v57/methods/messages_getChats.md index 6fa30cbd..c322613d 100644 --- a/old_docs/API_docs_v57/methods/messages_getChats.md +++ b/old_docs/API_docs_v57/methods/messages_getChats.md @@ -31,16 +31,13 @@ description: messages.getChats parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v57/methods/messages_getDhConfig.md b/old_docs/API_docs_v57/methods/messages_getDhConfig.md index aac3354d..f97684d2 100644 --- a/old_docs/API_docs_v57/methods/messages_getDhConfig.md +++ b/old_docs/API_docs_v57/methods/messages_getDhConfig.md @@ -31,13 +31,10 @@ description: messages.getDhConfig parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v57/methods/messages_getDialogs.md b/old_docs/API_docs_v57/methods/messages_getDialogs.md index 4c278eae..4b86ed71 100644 --- a/old_docs/API_docs_v57/methods/messages_getDialogs.md +++ b/old_docs/API_docs_v57/methods/messages_getDialogs.md @@ -36,13 +36,10 @@ description: messages.getDialogs parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v57/methods/messages_getDocumentByHash.md b/old_docs/API_docs_v57/methods/messages_getDocumentByHash.md index dda54bdd..3902ac44 100644 --- a/old_docs/API_docs_v57/methods/messages_getDocumentByHash.md +++ b/old_docs/API_docs_v57/methods/messages_getDocumentByHash.md @@ -32,16 +32,13 @@ description: messages.getDocumentByHash parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v57/methods/messages_getFeaturedStickers.md b/old_docs/API_docs_v57/methods/messages_getFeaturedStickers.md index 9573464a..5aad1810 100644 --- a/old_docs/API_docs_v57/methods/messages_getFeaturedStickers.md +++ b/old_docs/API_docs_v57/methods/messages_getFeaturedStickers.md @@ -23,13 +23,10 @@ description: messages.getFeaturedStickers parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v57/methods/messages_getGameHighScores.md b/old_docs/API_docs_v57/methods/messages_getGameHighScores.md index 935bb95a..d8a94ae3 100644 --- a/old_docs/API_docs_v57/methods/messages_getGameHighScores.md +++ b/old_docs/API_docs_v57/methods/messages_getGameHighScores.md @@ -33,16 +33,13 @@ description: messages.getGameHighScores parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v57/methods/messages_getHistory.md b/old_docs/API_docs_v57/methods/messages_getHistory.md index a48a465e..4c3ef2ee 100644 --- a/old_docs/API_docs_v57/methods/messages_getHistory.md +++ b/old_docs/API_docs_v57/methods/messages_getHistory.md @@ -41,13 +41,10 @@ description: messages.getHistory parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v57/methods/messages_getInlineBotResults.md b/old_docs/API_docs_v57/methods/messages_getInlineBotResults.md index 61366580..61b927fc 100644 --- a/old_docs/API_docs_v57/methods/messages_getInlineBotResults.md +++ b/old_docs/API_docs_v57/methods/messages_getInlineBotResults.md @@ -37,13 +37,10 @@ description: messages.getInlineBotResults parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v57/methods/messages_getInlineGameHighScores.md b/old_docs/API_docs_v57/methods/messages_getInlineGameHighScores.md index 7cc04d0d..40eff3a9 100644 --- a/old_docs/API_docs_v57/methods/messages_getInlineGameHighScores.md +++ b/old_docs/API_docs_v57/methods/messages_getInlineGameHighScores.md @@ -32,16 +32,13 @@ description: messages.getInlineGameHighScores parameters, return type and exampl ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v57/methods/messages_getMaskStickers.md b/old_docs/API_docs_v57/methods/messages_getMaskStickers.md index 0ab194df..ca964647 100644 --- a/old_docs/API_docs_v57/methods/messages_getMaskStickers.md +++ b/old_docs/API_docs_v57/methods/messages_getMaskStickers.md @@ -23,13 +23,10 @@ description: messages.getMaskStickers parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v57/methods/messages_getMessageEditData.md b/old_docs/API_docs_v57/methods/messages_getMessageEditData.md index a8b135c6..15085153 100644 --- a/old_docs/API_docs_v57/methods/messages_getMessageEditData.md +++ b/old_docs/API_docs_v57/methods/messages_getMessageEditData.md @@ -32,13 +32,10 @@ description: messages.getMessageEditData parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v57/methods/messages_getMessages.md b/old_docs/API_docs_v57/methods/messages_getMessages.md index 5a970246..787c46dd 100644 --- a/old_docs/API_docs_v57/methods/messages_getMessages.md +++ b/old_docs/API_docs_v57/methods/messages_getMessages.md @@ -23,16 +23,13 @@ description: messages.getMessages parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v57/methods/messages_getMessagesViews.md b/old_docs/API_docs_v57/methods/messages_getMessagesViews.md index 263f3f95..de5692dc 100644 --- a/old_docs/API_docs_v57/methods/messages_getMessagesViews.md +++ b/old_docs/API_docs_v57/methods/messages_getMessagesViews.md @@ -34,13 +34,10 @@ description: messages.getMessagesViews parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v57/methods/messages_getPeerDialogs.md b/old_docs/API_docs_v57/methods/messages_getPeerDialogs.md index 3da60038..226948ae 100644 --- a/old_docs/API_docs_v57/methods/messages_getPeerDialogs.md +++ b/old_docs/API_docs_v57/methods/messages_getPeerDialogs.md @@ -31,13 +31,10 @@ description: messages.getPeerDialogs parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v57/methods/messages_getPeerSettings.md b/old_docs/API_docs_v57/methods/messages_getPeerSettings.md index d3e3cfc3..2a92f2da 100644 --- a/old_docs/API_docs_v57/methods/messages_getPeerSettings.md +++ b/old_docs/API_docs_v57/methods/messages_getPeerSettings.md @@ -31,13 +31,10 @@ description: messages.getPeerSettings parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v57/methods/messages_getRecentStickers.md b/old_docs/API_docs_v57/methods/messages_getRecentStickers.md index 10d1a0df..a6ae162f 100644 --- a/old_docs/API_docs_v57/methods/messages_getRecentStickers.md +++ b/old_docs/API_docs_v57/methods/messages_getRecentStickers.md @@ -24,13 +24,10 @@ description: messages.getRecentStickers parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v57/methods/messages_getSavedGifs.md b/old_docs/API_docs_v57/methods/messages_getSavedGifs.md index 7cce4ffe..4986d812 100644 --- a/old_docs/API_docs_v57/methods/messages_getSavedGifs.md +++ b/old_docs/API_docs_v57/methods/messages_getSavedGifs.md @@ -23,13 +23,10 @@ description: messages.getSavedGifs parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v57/methods/messages_getStickerSet.md b/old_docs/API_docs_v57/methods/messages_getStickerSet.md index 59f33916..b480e0fe 100644 --- a/old_docs/API_docs_v57/methods/messages_getStickerSet.md +++ b/old_docs/API_docs_v57/methods/messages_getStickerSet.md @@ -30,16 +30,13 @@ description: messages.getStickerSet parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v57/methods/messages_getWebPagePreview.md b/old_docs/API_docs_v57/methods/messages_getWebPagePreview.md index a89600b1..d3908933 100644 --- a/old_docs/API_docs_v57/methods/messages_getWebPagePreview.md +++ b/old_docs/API_docs_v57/methods/messages_getWebPagePreview.md @@ -23,13 +23,10 @@ description: messages.getWebPagePreview parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v57/methods/messages_hideReportSpam.md b/old_docs/API_docs_v57/methods/messages_hideReportSpam.md index 2dfe4dd7..5635665c 100644 --- a/old_docs/API_docs_v57/methods/messages_hideReportSpam.md +++ b/old_docs/API_docs_v57/methods/messages_hideReportSpam.md @@ -30,13 +30,10 @@ description: messages.hideReportSpam parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v57/methods/messages_importChatInvite.md b/old_docs/API_docs_v57/methods/messages_importChatInvite.md index 9d77304d..9dcfa56d 100644 --- a/old_docs/API_docs_v57/methods/messages_importChatInvite.md +++ b/old_docs/API_docs_v57/methods/messages_importChatInvite.md @@ -36,13 +36,10 @@ description: messages.importChatInvite parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v57/methods/messages_installStickerSet.md b/old_docs/API_docs_v57/methods/messages_installStickerSet.md index 3dde52a7..016d5ece 100644 --- a/old_docs/API_docs_v57/methods/messages_installStickerSet.md +++ b/old_docs/API_docs_v57/methods/messages_installStickerSet.md @@ -31,13 +31,10 @@ description: messages.installStickerSet parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v57/methods/messages_migrateChat.md b/old_docs/API_docs_v57/methods/messages_migrateChat.md index 22d2fbf0..a8274e70 100644 --- a/old_docs/API_docs_v57/methods/messages_migrateChat.md +++ b/old_docs/API_docs_v57/methods/messages_migrateChat.md @@ -32,13 +32,10 @@ description: messages.migrateChat parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v57/methods/messages_readEncryptedHistory.md b/old_docs/API_docs_v57/methods/messages_readEncryptedHistory.md index 766ee07d..f38f6b07 100644 --- a/old_docs/API_docs_v57/methods/messages_readEncryptedHistory.md +++ b/old_docs/API_docs_v57/methods/messages_readEncryptedHistory.md @@ -31,16 +31,13 @@ description: messages.readEncryptedHistory parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v57/methods/messages_readFeaturedStickers.md b/old_docs/API_docs_v57/methods/messages_readFeaturedStickers.md index c7ce7aca..02055bf3 100644 --- a/old_docs/API_docs_v57/methods/messages_readFeaturedStickers.md +++ b/old_docs/API_docs_v57/methods/messages_readFeaturedStickers.md @@ -23,13 +23,10 @@ description: messages.readFeaturedStickers parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v57/methods/messages_readHistory.md b/old_docs/API_docs_v57/methods/messages_readHistory.md index 1aa7830a..fef62130 100644 --- a/old_docs/API_docs_v57/methods/messages_readHistory.md +++ b/old_docs/API_docs_v57/methods/messages_readHistory.md @@ -32,13 +32,10 @@ description: messages.readHistory parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v57/methods/messages_readMessageContents.md b/old_docs/API_docs_v57/methods/messages_readMessageContents.md index 4b1abda0..7a6055fc 100644 --- a/old_docs/API_docs_v57/methods/messages_readMessageContents.md +++ b/old_docs/API_docs_v57/methods/messages_readMessageContents.md @@ -23,13 +23,10 @@ description: messages.readMessageContents parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v57/methods/messages_receivedMessages.md b/old_docs/API_docs_v57/methods/messages_receivedMessages.md index 588ac5cf..e2cf3a2f 100644 --- a/old_docs/API_docs_v57/methods/messages_receivedMessages.md +++ b/old_docs/API_docs_v57/methods/messages_receivedMessages.md @@ -23,13 +23,10 @@ description: messages.receivedMessages parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v57/methods/messages_receivedQueue.md b/old_docs/API_docs_v57/methods/messages_receivedQueue.md index 3c7f1d4f..38f504b3 100644 --- a/old_docs/API_docs_v57/methods/messages_receivedQueue.md +++ b/old_docs/API_docs_v57/methods/messages_receivedQueue.md @@ -30,16 +30,13 @@ description: messages.receivedQueue parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v57/methods/messages_reorderStickerSets.md b/old_docs/API_docs_v57/methods/messages_reorderStickerSets.md index 5c47f174..fa094550 100644 --- a/old_docs/API_docs_v57/methods/messages_reorderStickerSets.md +++ b/old_docs/API_docs_v57/methods/messages_reorderStickerSets.md @@ -24,13 +24,10 @@ description: messages.reorderStickerSets parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v57/methods/messages_reportSpam.md b/old_docs/API_docs_v57/methods/messages_reportSpam.md index bfadb9ab..08c96d44 100644 --- a/old_docs/API_docs_v57/methods/messages_reportSpam.md +++ b/old_docs/API_docs_v57/methods/messages_reportSpam.md @@ -30,13 +30,10 @@ description: messages.reportSpam parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v57/methods/messages_saveDraft.md b/old_docs/API_docs_v57/methods/messages_saveDraft.md index 42308b46..f68090c0 100644 --- a/old_docs/API_docs_v57/methods/messages_saveDraft.md +++ b/old_docs/API_docs_v57/methods/messages_saveDraft.md @@ -35,13 +35,10 @@ description: messages.saveDraft parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v57/methods/messages_saveGif.md b/old_docs/API_docs_v57/methods/messages_saveGif.md index 31e48632..d86d539a 100644 --- a/old_docs/API_docs_v57/methods/messages_saveGif.md +++ b/old_docs/API_docs_v57/methods/messages_saveGif.md @@ -31,13 +31,10 @@ description: messages.saveGif parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v57/methods/messages_saveRecentSticker.md b/old_docs/API_docs_v57/methods/messages_saveRecentSticker.md index 8d45be5e..029ca763 100644 --- a/old_docs/API_docs_v57/methods/messages_saveRecentSticker.md +++ b/old_docs/API_docs_v57/methods/messages_saveRecentSticker.md @@ -32,13 +32,10 @@ description: messages.saveRecentSticker parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v57/methods/messages_search.md b/old_docs/API_docs_v57/methods/messages_search.md index 87073d00..1e809cf2 100644 --- a/old_docs/API_docs_v57/methods/messages_search.md +++ b/old_docs/API_docs_v57/methods/messages_search.md @@ -43,13 +43,10 @@ description: messages.search parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v57/methods/messages_searchGifs.md b/old_docs/API_docs_v57/methods/messages_searchGifs.md index 3f4c4838..dd804c99 100644 --- a/old_docs/API_docs_v57/methods/messages_searchGifs.md +++ b/old_docs/API_docs_v57/methods/messages_searchGifs.md @@ -31,13 +31,10 @@ description: messages.searchGifs parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v57/methods/messages_searchGlobal.md b/old_docs/API_docs_v57/methods/messages_searchGlobal.md index 0553dd7a..4b45eed2 100644 --- a/old_docs/API_docs_v57/methods/messages_searchGlobal.md +++ b/old_docs/API_docs_v57/methods/messages_searchGlobal.md @@ -34,13 +34,10 @@ description: messages.searchGlobal parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v57/methods/messages_sendEncrypted.md b/old_docs/API_docs_v57/methods/messages_sendEncrypted.md index 82eeec92..ba9f796b 100644 --- a/old_docs/API_docs_v57/methods/messages_sendEncrypted.md +++ b/old_docs/API_docs_v57/methods/messages_sendEncrypted.md @@ -34,16 +34,13 @@ description: messages.sendEncrypted parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v57/methods/messages_sendEncryptedFile.md b/old_docs/API_docs_v57/methods/messages_sendEncryptedFile.md index 8f7a73d9..db16bf2d 100644 --- a/old_docs/API_docs_v57/methods/messages_sendEncryptedFile.md +++ b/old_docs/API_docs_v57/methods/messages_sendEncryptedFile.md @@ -32,16 +32,13 @@ description: messages.sendEncryptedFile parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v57/methods/messages_sendEncryptedService.md b/old_docs/API_docs_v57/methods/messages_sendEncryptedService.md index d427f6c3..fd4e2627 100644 --- a/old_docs/API_docs_v57/methods/messages_sendEncryptedService.md +++ b/old_docs/API_docs_v57/methods/messages_sendEncryptedService.md @@ -34,16 +34,13 @@ description: messages.sendEncryptedService parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v57/methods/messages_sendInlineBotResult.md b/old_docs/API_docs_v57/methods/messages_sendInlineBotResult.md index 6aeeb67d..d974fe69 100644 --- a/old_docs/API_docs_v57/methods/messages_sendInlineBotResult.md +++ b/old_docs/API_docs_v57/methods/messages_sendInlineBotResult.md @@ -39,13 +39,10 @@ description: messages.sendInlineBotResult parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v57/methods/messages_sendMedia.md b/old_docs/API_docs_v57/methods/messages_sendMedia.md index b3ceb5d4..b58bf325 100644 --- a/old_docs/API_docs_v57/methods/messages_sendMedia.md +++ b/old_docs/API_docs_v57/methods/messages_sendMedia.md @@ -59,16 +59,13 @@ description: messages.sendMedia parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v57/methods/messages_sendMessage.md b/old_docs/API_docs_v57/methods/messages_sendMessage.md index 60b50412..3a515129 100644 --- a/old_docs/API_docs_v57/methods/messages_sendMessage.md +++ b/old_docs/API_docs_v57/methods/messages_sendMessage.md @@ -58,16 +58,13 @@ description: messages.sendMessage parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v57/methods/messages_setBotCallbackAnswer.md b/old_docs/API_docs_v57/methods/messages_setBotCallbackAnswer.md index fb10afe1..ad408378 100644 --- a/old_docs/API_docs_v57/methods/messages_setBotCallbackAnswer.md +++ b/old_docs/API_docs_v57/methods/messages_setBotCallbackAnswer.md @@ -33,16 +33,13 @@ description: messages.setBotCallbackAnswer parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v57/methods/messages_setEncryptedTyping.md b/old_docs/API_docs_v57/methods/messages_setEncryptedTyping.md index a05b94dd..aeae6ff7 100644 --- a/old_docs/API_docs_v57/methods/messages_setEncryptedTyping.md +++ b/old_docs/API_docs_v57/methods/messages_setEncryptedTyping.md @@ -31,13 +31,10 @@ description: messages.setEncryptedTyping parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v57/methods/messages_setGameScore.md b/old_docs/API_docs_v57/methods/messages_setGameScore.md index 795974e9..c8ab44a1 100644 --- a/old_docs/API_docs_v57/methods/messages_setGameScore.md +++ b/old_docs/API_docs_v57/methods/messages_setGameScore.md @@ -35,16 +35,13 @@ description: messages.setGameScore parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v57/methods/messages_setInlineBotResults.md b/old_docs/API_docs_v57/methods/messages_setInlineBotResults.md index 8b5625f3..8b49c4c7 100644 --- a/old_docs/API_docs_v57/methods/messages_setInlineBotResults.md +++ b/old_docs/API_docs_v57/methods/messages_setInlineBotResults.md @@ -46,16 +46,13 @@ description: messages.setInlineBotResults parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v57/methods/messages_setInlineGameScore.md b/old_docs/API_docs_v57/methods/messages_setInlineGameScore.md index a91ad6a7..efa8c4f0 100644 --- a/old_docs/API_docs_v57/methods/messages_setInlineGameScore.md +++ b/old_docs/API_docs_v57/methods/messages_setInlineGameScore.md @@ -34,16 +34,13 @@ description: messages.setInlineGameScore parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v57/methods/messages_setTyping.md b/old_docs/API_docs_v57/methods/messages_setTyping.md index 9ef8caf5..f6b7b7b5 100644 --- a/old_docs/API_docs_v57/methods/messages_setTyping.md +++ b/old_docs/API_docs_v57/methods/messages_setTyping.md @@ -37,16 +37,13 @@ description: messages.setTyping parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v57/methods/messages_startBot.md b/old_docs/API_docs_v57/methods/messages_startBot.md index 8d98e390..b33ab013 100644 --- a/old_docs/API_docs_v57/methods/messages_startBot.md +++ b/old_docs/API_docs_v57/methods/messages_startBot.md @@ -35,13 +35,10 @@ description: messages.startBot parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v57/methods/messages_toggleChatAdmins.md b/old_docs/API_docs_v57/methods/messages_toggleChatAdmins.md index 3bf8a419..97328065 100644 --- a/old_docs/API_docs_v57/methods/messages_toggleChatAdmins.md +++ b/old_docs/API_docs_v57/methods/messages_toggleChatAdmins.md @@ -32,13 +32,10 @@ description: messages.toggleChatAdmins parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v57/methods/messages_uninstallStickerSet.md b/old_docs/API_docs_v57/methods/messages_uninstallStickerSet.md index 6763e64f..76a3e3e2 100644 --- a/old_docs/API_docs_v57/methods/messages_uninstallStickerSet.md +++ b/old_docs/API_docs_v57/methods/messages_uninstallStickerSet.md @@ -30,13 +30,10 @@ description: messages.uninstallStickerSet parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v57/methods/photos_deletePhotos.md b/old_docs/API_docs_v57/methods/photos_deletePhotos.md index e9cd459d..61768b1e 100644 --- a/old_docs/API_docs_v57/methods/photos_deletePhotos.md +++ b/old_docs/API_docs_v57/methods/photos_deletePhotos.md @@ -23,13 +23,10 @@ description: photos.deletePhotos parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v57/methods/photos_getUserPhotos.md b/old_docs/API_docs_v57/methods/photos_getUserPhotos.md index d6c2a380..095363e7 100644 --- a/old_docs/API_docs_v57/methods/photos_getUserPhotos.md +++ b/old_docs/API_docs_v57/methods/photos_getUserPhotos.md @@ -34,16 +34,13 @@ description: photos.getUserPhotos parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v57/methods/photos_updateProfilePhoto.md b/old_docs/API_docs_v57/methods/photos_updateProfilePhoto.md index ea3b78ec..d90aca22 100644 --- a/old_docs/API_docs_v57/methods/photos_updateProfilePhoto.md +++ b/old_docs/API_docs_v57/methods/photos_updateProfilePhoto.md @@ -23,13 +23,10 @@ description: photos.updateProfilePhoto parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v57/methods/photos_uploadProfilePhoto.md b/old_docs/API_docs_v57/methods/photos_uploadProfilePhoto.md index 58541f23..987e721c 100644 --- a/old_docs/API_docs_v57/methods/photos_uploadProfilePhoto.md +++ b/old_docs/API_docs_v57/methods/photos_uploadProfilePhoto.md @@ -34,13 +34,10 @@ description: photos.uploadProfilePhoto parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v57/methods/users_getUsers.md b/old_docs/API_docs_v57/methods/users_getUsers.md index 6a44d258..3a981d57 100644 --- a/old_docs/API_docs_v57/methods/users_getUsers.md +++ b/old_docs/API_docs_v57/methods/users_getUsers.md @@ -33,16 +33,13 @@ description: users.getUsers parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v62/methods/account_changePhone.md b/old_docs/API_docs_v62/methods/account_changePhone.md index 5d1801d0..e47ef6a7 100644 --- a/old_docs/API_docs_v62/methods/account_changePhone.md +++ b/old_docs/API_docs_v62/methods/account_changePhone.md @@ -32,13 +32,10 @@ description: account.changePhone parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v62/methods/account_checkUsername.md b/old_docs/API_docs_v62/methods/account_checkUsername.md index afc59b6c..40cf822f 100644 --- a/old_docs/API_docs_v62/methods/account_checkUsername.md +++ b/old_docs/API_docs_v62/methods/account_checkUsername.md @@ -30,13 +30,10 @@ description: account.checkUsername parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v62/methods/account_confirmPhone.md b/old_docs/API_docs_v62/methods/account_confirmPhone.md index 0d2dc5c6..8dd79d94 100644 --- a/old_docs/API_docs_v62/methods/account_confirmPhone.md +++ b/old_docs/API_docs_v62/methods/account_confirmPhone.md @@ -32,13 +32,10 @@ description: account.confirmPhone parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v62/methods/account_deleteAccount.md b/old_docs/API_docs_v62/methods/account_deleteAccount.md index 5abcd0ec..6f1bbda9 100644 --- a/old_docs/API_docs_v62/methods/account_deleteAccount.md +++ b/old_docs/API_docs_v62/methods/account_deleteAccount.md @@ -23,13 +23,10 @@ description: account.deleteAccount parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v62/methods/account_getAccountTTL.md b/old_docs/API_docs_v62/methods/account_getAccountTTL.md index 3520fbef..538b1d7a 100644 --- a/old_docs/API_docs_v62/methods/account_getAccountTTL.md +++ b/old_docs/API_docs_v62/methods/account_getAccountTTL.md @@ -18,13 +18,10 @@ description: account.getAccountTTL parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v62/methods/account_getAuthorizations.md b/old_docs/API_docs_v62/methods/account_getAuthorizations.md index 91bbce5e..f138d517 100644 --- a/old_docs/API_docs_v62/methods/account_getAuthorizations.md +++ b/old_docs/API_docs_v62/methods/account_getAuthorizations.md @@ -18,13 +18,10 @@ description: account.getAuthorizations parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v62/methods/account_getNotifySettings.md b/old_docs/API_docs_v62/methods/account_getNotifySettings.md index 8ee710d8..a48eed2f 100644 --- a/old_docs/API_docs_v62/methods/account_getNotifySettings.md +++ b/old_docs/API_docs_v62/methods/account_getNotifySettings.md @@ -30,13 +30,10 @@ description: account.getNotifySettings parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v62/methods/account_getPassword.md b/old_docs/API_docs_v62/methods/account_getPassword.md index 4d9fd015..1abf6174 100644 --- a/old_docs/API_docs_v62/methods/account_getPassword.md +++ b/old_docs/API_docs_v62/methods/account_getPassword.md @@ -18,13 +18,10 @@ description: account.getPassword parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v62/methods/account_getPasswordSettings.md b/old_docs/API_docs_v62/methods/account_getPasswordSettings.md index 02cb77f7..aec5b989 100644 --- a/old_docs/API_docs_v62/methods/account_getPasswordSettings.md +++ b/old_docs/API_docs_v62/methods/account_getPasswordSettings.md @@ -30,13 +30,10 @@ description: account.getPasswordSettings parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v62/methods/account_getPrivacy.md b/old_docs/API_docs_v62/methods/account_getPrivacy.md index 52786b79..8bbe9795 100644 --- a/old_docs/API_docs_v62/methods/account_getPrivacy.md +++ b/old_docs/API_docs_v62/methods/account_getPrivacy.md @@ -30,13 +30,10 @@ description: account.getPrivacy parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v62/methods/account_getWallPapers.md b/old_docs/API_docs_v62/methods/account_getWallPapers.md index 88c8a701..a71543d0 100644 --- a/old_docs/API_docs_v62/methods/account_getWallPapers.md +++ b/old_docs/API_docs_v62/methods/account_getWallPapers.md @@ -18,13 +18,10 @@ description: account.getWallPapers parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v62/methods/account_registerDevice.md b/old_docs/API_docs_v62/methods/account_registerDevice.md index 3cc7f98d..8be04ad2 100644 --- a/old_docs/API_docs_v62/methods/account_registerDevice.md +++ b/old_docs/API_docs_v62/methods/account_registerDevice.md @@ -31,13 +31,10 @@ description: account.registerDevice parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v62/methods/account_reportPeer.md b/old_docs/API_docs_v62/methods/account_reportPeer.md index 1545c3b8..1ae9f4d4 100644 --- a/old_docs/API_docs_v62/methods/account_reportPeer.md +++ b/old_docs/API_docs_v62/methods/account_reportPeer.md @@ -31,13 +31,10 @@ description: account.reportPeer parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v62/methods/account_resetAuthorization.md b/old_docs/API_docs_v62/methods/account_resetAuthorization.md index e44334f2..0438cba3 100644 --- a/old_docs/API_docs_v62/methods/account_resetAuthorization.md +++ b/old_docs/API_docs_v62/methods/account_resetAuthorization.md @@ -30,13 +30,10 @@ description: account.resetAuthorization parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v62/methods/account_resetNotifySettings.md b/old_docs/API_docs_v62/methods/account_resetNotifySettings.md index 155ede68..92db4f4f 100644 --- a/old_docs/API_docs_v62/methods/account_resetNotifySettings.md +++ b/old_docs/API_docs_v62/methods/account_resetNotifySettings.md @@ -18,13 +18,10 @@ description: account.resetNotifySettings parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v62/methods/account_sendChangePhoneCode.md b/old_docs/API_docs_v62/methods/account_sendChangePhoneCode.md index 4be218f2..017b5f7f 100644 --- a/old_docs/API_docs_v62/methods/account_sendChangePhoneCode.md +++ b/old_docs/API_docs_v62/methods/account_sendChangePhoneCode.md @@ -32,13 +32,10 @@ description: account.sendChangePhoneCode parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v62/methods/account_sendConfirmPhoneCode.md b/old_docs/API_docs_v62/methods/account_sendConfirmPhoneCode.md index 009fcb09..3665bd50 100644 --- a/old_docs/API_docs_v62/methods/account_sendConfirmPhoneCode.md +++ b/old_docs/API_docs_v62/methods/account_sendConfirmPhoneCode.md @@ -32,13 +32,10 @@ description: account.sendConfirmPhoneCode parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v62/methods/account_setAccountTTL.md b/old_docs/API_docs_v62/methods/account_setAccountTTL.md index f06eb676..d08f59fb 100644 --- a/old_docs/API_docs_v62/methods/account_setAccountTTL.md +++ b/old_docs/API_docs_v62/methods/account_setAccountTTL.md @@ -30,13 +30,10 @@ description: account.setAccountTTL parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v62/methods/account_setPrivacy.md b/old_docs/API_docs_v62/methods/account_setPrivacy.md index 56aebbcc..401aa71c 100644 --- a/old_docs/API_docs_v62/methods/account_setPrivacy.md +++ b/old_docs/API_docs_v62/methods/account_setPrivacy.md @@ -31,13 +31,10 @@ description: account.setPrivacy parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v62/methods/account_unregisterDevice.md b/old_docs/API_docs_v62/methods/account_unregisterDevice.md index 41899b6e..283ec7d2 100644 --- a/old_docs/API_docs_v62/methods/account_unregisterDevice.md +++ b/old_docs/API_docs_v62/methods/account_unregisterDevice.md @@ -31,13 +31,10 @@ description: account.unregisterDevice parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v62/methods/account_updateDeviceLocked.md b/old_docs/API_docs_v62/methods/account_updateDeviceLocked.md index 37aeb59d..ae6125a5 100644 --- a/old_docs/API_docs_v62/methods/account_updateDeviceLocked.md +++ b/old_docs/API_docs_v62/methods/account_updateDeviceLocked.md @@ -23,13 +23,10 @@ description: account.updateDeviceLocked parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v62/methods/account_updateNotifySettings.md b/old_docs/API_docs_v62/methods/account_updateNotifySettings.md index 8389b5c2..fb096250 100644 --- a/old_docs/API_docs_v62/methods/account_updateNotifySettings.md +++ b/old_docs/API_docs_v62/methods/account_updateNotifySettings.md @@ -31,13 +31,10 @@ description: account.updateNotifySettings parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v62/methods/account_updatePasswordSettings.md b/old_docs/API_docs_v62/methods/account_updatePasswordSettings.md index b7c8da4b..ffa8dcd9 100644 --- a/old_docs/API_docs_v62/methods/account_updatePasswordSettings.md +++ b/old_docs/API_docs_v62/methods/account_updatePasswordSettings.md @@ -34,13 +34,10 @@ description: account.updatePasswordSettings parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v62/methods/account_updateProfile.md b/old_docs/API_docs_v62/methods/account_updateProfile.md index a50eaea5..b3d468d1 100644 --- a/old_docs/API_docs_v62/methods/account_updateProfile.md +++ b/old_docs/API_docs_v62/methods/account_updateProfile.md @@ -33,13 +33,10 @@ description: account.updateProfile parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v62/methods/account_updateStatus.md b/old_docs/API_docs_v62/methods/account_updateStatus.md index 7204e582..c8fa0a79 100644 --- a/old_docs/API_docs_v62/methods/account_updateStatus.md +++ b/old_docs/API_docs_v62/methods/account_updateStatus.md @@ -30,13 +30,10 @@ description: account.updateStatus parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v62/methods/account_updateUsername.md b/old_docs/API_docs_v62/methods/account_updateUsername.md index 22be2fd4..2b7576a5 100644 --- a/old_docs/API_docs_v62/methods/account_updateUsername.md +++ b/old_docs/API_docs_v62/methods/account_updateUsername.md @@ -32,13 +32,10 @@ description: account.updateUsername parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v62/methods/auth_bindTempAuthKey.md b/old_docs/API_docs_v62/methods/auth_bindTempAuthKey.md index e3d72dd5..7419abb0 100644 --- a/old_docs/API_docs_v62/methods/auth_bindTempAuthKey.md +++ b/old_docs/API_docs_v62/methods/auth_bindTempAuthKey.md @@ -35,16 +35,13 @@ description: auth.bindTempAuthKey parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v62/methods/auth_cancelCode.md b/old_docs/API_docs_v62/methods/auth_cancelCode.md index dc390329..05d927a1 100644 --- a/old_docs/API_docs_v62/methods/auth_cancelCode.md +++ b/old_docs/API_docs_v62/methods/auth_cancelCode.md @@ -31,13 +31,10 @@ description: auth.cancelCode parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v62/methods/auth_checkPassword.md b/old_docs/API_docs_v62/methods/auth_checkPassword.md index d5559186..6b6b21cc 100644 --- a/old_docs/API_docs_v62/methods/auth_checkPassword.md +++ b/old_docs/API_docs_v62/methods/auth_checkPassword.md @@ -30,13 +30,10 @@ description: auth.checkPassword parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v62/methods/auth_checkPhone.md b/old_docs/API_docs_v62/methods/auth_checkPhone.md index 3455904d..f6cac2e6 100644 --- a/old_docs/API_docs_v62/methods/auth_checkPhone.md +++ b/old_docs/API_docs_v62/methods/auth_checkPhone.md @@ -32,13 +32,10 @@ description: auth.checkPhone parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v62/methods/auth_dropTempAuthKeys.md b/old_docs/API_docs_v62/methods/auth_dropTempAuthKeys.md index aba76766..fedb7bf4 100644 --- a/old_docs/API_docs_v62/methods/auth_dropTempAuthKeys.md +++ b/old_docs/API_docs_v62/methods/auth_dropTempAuthKeys.md @@ -23,16 +23,13 @@ description: auth.dropTempAuthKeys parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v62/methods/auth_exportAuthorization.md b/old_docs/API_docs_v62/methods/auth_exportAuthorization.md index 44c45b70..cbc8203b 100644 --- a/old_docs/API_docs_v62/methods/auth_exportAuthorization.md +++ b/old_docs/API_docs_v62/methods/auth_exportAuthorization.md @@ -30,16 +30,13 @@ description: auth.exportAuthorization parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v62/methods/auth_importAuthorization.md b/old_docs/API_docs_v62/methods/auth_importAuthorization.md index e0fd534f..22166510 100644 --- a/old_docs/API_docs_v62/methods/auth_importAuthorization.md +++ b/old_docs/API_docs_v62/methods/auth_importAuthorization.md @@ -32,16 +32,13 @@ description: auth.importAuthorization parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v62/methods/auth_recoverPassword.md b/old_docs/API_docs_v62/methods/auth_recoverPassword.md index c2ce3fed..931e99fd 100644 --- a/old_docs/API_docs_v62/methods/auth_recoverPassword.md +++ b/old_docs/API_docs_v62/methods/auth_recoverPassword.md @@ -30,13 +30,10 @@ description: auth.recoverPassword parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v62/methods/auth_requestPasswordRecovery.md b/old_docs/API_docs_v62/methods/auth_requestPasswordRecovery.md index 101b1cf7..c6babcd9 100644 --- a/old_docs/API_docs_v62/methods/auth_requestPasswordRecovery.md +++ b/old_docs/API_docs_v62/methods/auth_requestPasswordRecovery.md @@ -25,13 +25,10 @@ description: auth.requestPasswordRecovery parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v62/methods/auth_resendCode.md b/old_docs/API_docs_v62/methods/auth_resendCode.md index 14d08ddd..df4803b8 100644 --- a/old_docs/API_docs_v62/methods/auth_resendCode.md +++ b/old_docs/API_docs_v62/methods/auth_resendCode.md @@ -31,13 +31,10 @@ description: auth.resendCode parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v62/methods/auth_resetAuthorizations.md b/old_docs/API_docs_v62/methods/auth_resetAuthorizations.md index 87a39a22..fe297fa7 100644 --- a/old_docs/API_docs_v62/methods/auth_resetAuthorizations.md +++ b/old_docs/API_docs_v62/methods/auth_resetAuthorizations.md @@ -25,13 +25,10 @@ description: auth.resetAuthorizations parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v62/methods/auth_sendInvites.md b/old_docs/API_docs_v62/methods/auth_sendInvites.md index 604fc65d..ad9636c5 100644 --- a/old_docs/API_docs_v62/methods/auth_sendInvites.md +++ b/old_docs/API_docs_v62/methods/auth_sendInvites.md @@ -31,13 +31,10 @@ description: auth.sendInvites parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v62/methods/channels_checkUsername.md b/old_docs/API_docs_v62/methods/channels_checkUsername.md index d6ea876d..e29ee107 100644 --- a/old_docs/API_docs_v62/methods/channels_checkUsername.md +++ b/old_docs/API_docs_v62/methods/channels_checkUsername.md @@ -33,13 +33,10 @@ description: channels.checkUsername parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v62/methods/channels_createChannel.md b/old_docs/API_docs_v62/methods/channels_createChannel.md index 9ba02e9e..58808b73 100644 --- a/old_docs/API_docs_v62/methods/channels_createChannel.md +++ b/old_docs/API_docs_v62/methods/channels_createChannel.md @@ -34,13 +34,10 @@ description: channels.createChannel parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v62/methods/channels_deleteChannel.md b/old_docs/API_docs_v62/methods/channels_deleteChannel.md index 912ab080..532f3c6c 100644 --- a/old_docs/API_docs_v62/methods/channels_deleteChannel.md +++ b/old_docs/API_docs_v62/methods/channels_deleteChannel.md @@ -31,13 +31,10 @@ description: channels.deleteChannel parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v62/methods/channels_deleteMessages.md b/old_docs/API_docs_v62/methods/channels_deleteMessages.md index b3481294..a42a47a5 100644 --- a/old_docs/API_docs_v62/methods/channels_deleteMessages.md +++ b/old_docs/API_docs_v62/methods/channels_deleteMessages.md @@ -33,16 +33,13 @@ description: channels.deleteMessages parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v62/methods/channels_deleteUserHistory.md b/old_docs/API_docs_v62/methods/channels_deleteUserHistory.md index 66843269..73494485 100644 --- a/old_docs/API_docs_v62/methods/channels_deleteUserHistory.md +++ b/old_docs/API_docs_v62/methods/channels_deleteUserHistory.md @@ -32,13 +32,10 @@ description: channels.deleteUserHistory parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v62/methods/channels_editAbout.md b/old_docs/API_docs_v62/methods/channels_editAbout.md index 4c759a8a..1c3ce933 100644 --- a/old_docs/API_docs_v62/methods/channels_editAbout.md +++ b/old_docs/API_docs_v62/methods/channels_editAbout.md @@ -34,16 +34,13 @@ description: channels.editAbout parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v62/methods/channels_editAdmin.md b/old_docs/API_docs_v62/methods/channels_editAdmin.md index 7707bdfe..42184227 100644 --- a/old_docs/API_docs_v62/methods/channels_editAdmin.md +++ b/old_docs/API_docs_v62/methods/channels_editAdmin.md @@ -41,16 +41,13 @@ description: channels.editAdmin parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v62/methods/channels_editPhoto.md b/old_docs/API_docs_v62/methods/channels_editPhoto.md index 99873537..4a4aeb03 100644 --- a/old_docs/API_docs_v62/methods/channels_editPhoto.md +++ b/old_docs/API_docs_v62/methods/channels_editPhoto.md @@ -33,16 +33,13 @@ description: channels.editPhoto parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v62/methods/channels_editTitle.md b/old_docs/API_docs_v62/methods/channels_editTitle.md index 04e8ce12..8a69d09b 100644 --- a/old_docs/API_docs_v62/methods/channels_editTitle.md +++ b/old_docs/API_docs_v62/methods/channels_editTitle.md @@ -33,16 +33,13 @@ description: channels.editTitle parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v62/methods/channels_exportInvite.md b/old_docs/API_docs_v62/methods/channels_exportInvite.md index 2ed80f6c..79dc6401 100644 --- a/old_docs/API_docs_v62/methods/channels_exportInvite.md +++ b/old_docs/API_docs_v62/methods/channels_exportInvite.md @@ -32,16 +32,13 @@ description: channels.exportInvite parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v62/methods/channels_exportMessageLink.md b/old_docs/API_docs_v62/methods/channels_exportMessageLink.md index 9831c9c0..5b824859 100644 --- a/old_docs/API_docs_v62/methods/channels_exportMessageLink.md +++ b/old_docs/API_docs_v62/methods/channels_exportMessageLink.md @@ -31,13 +31,10 @@ description: channels.exportMessageLink parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v62/methods/channels_getAdminedPublicChannels.md b/old_docs/API_docs_v62/methods/channels_getAdminedPublicChannels.md index 7fceb026..283a9071 100644 --- a/old_docs/API_docs_v62/methods/channels_getAdminedPublicChannels.md +++ b/old_docs/API_docs_v62/methods/channels_getAdminedPublicChannels.md @@ -18,13 +18,10 @@ description: channels.getAdminedPublicChannels parameters, return type and examp ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v62/methods/channels_getChannels.md b/old_docs/API_docs_v62/methods/channels_getChannels.md index 13304938..e80aa6a6 100644 --- a/old_docs/API_docs_v62/methods/channels_getChannels.md +++ b/old_docs/API_docs_v62/methods/channels_getChannels.md @@ -32,16 +32,13 @@ description: channels.getChannels parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v62/methods/channels_getMessages.md b/old_docs/API_docs_v62/methods/channels_getMessages.md index 5480dd86..dc392773 100644 --- a/old_docs/API_docs_v62/methods/channels_getMessages.md +++ b/old_docs/API_docs_v62/methods/channels_getMessages.md @@ -33,16 +33,13 @@ description: channels.getMessages parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v62/methods/channels_getParticipant.md b/old_docs/API_docs_v62/methods/channels_getParticipant.md index 8c7e3cbd..001bf115 100644 --- a/old_docs/API_docs_v62/methods/channels_getParticipant.md +++ b/old_docs/API_docs_v62/methods/channels_getParticipant.md @@ -35,16 +35,13 @@ description: channels.getParticipant parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v62/methods/channels_inviteToChannel.md b/old_docs/API_docs_v62/methods/channels_inviteToChannel.md index cf5480e0..2448fb84 100644 --- a/old_docs/API_docs_v62/methods/channels_inviteToChannel.md +++ b/old_docs/API_docs_v62/methods/channels_inviteToChannel.md @@ -46,13 +46,10 @@ description: channels.inviteToChannel parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v62/methods/channels_joinChannel.md b/old_docs/API_docs_v62/methods/channels_joinChannel.md index f31730a1..e746cf48 100644 --- a/old_docs/API_docs_v62/methods/channels_joinChannel.md +++ b/old_docs/API_docs_v62/methods/channels_joinChannel.md @@ -32,13 +32,10 @@ description: channels.joinChannel parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v62/methods/channels_kickFromChannel.md b/old_docs/API_docs_v62/methods/channels_kickFromChannel.md index c903caa4..c85833ce 100644 --- a/old_docs/API_docs_v62/methods/channels_kickFromChannel.md +++ b/old_docs/API_docs_v62/methods/channels_kickFromChannel.md @@ -25,16 +25,13 @@ description: channels.kickFromChannel parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v62/methods/channels_leaveChannel.md b/old_docs/API_docs_v62/methods/channels_leaveChannel.md index 12902f6d..ff244ded 100644 --- a/old_docs/API_docs_v62/methods/channels_leaveChannel.md +++ b/old_docs/API_docs_v62/methods/channels_leaveChannel.md @@ -34,16 +34,13 @@ description: channels.leaveChannel parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v62/methods/channels_readHistory.md b/old_docs/API_docs_v62/methods/channels_readHistory.md index be979101..6fc6ec0e 100644 --- a/old_docs/API_docs_v62/methods/channels_readHistory.md +++ b/old_docs/API_docs_v62/methods/channels_readHistory.md @@ -32,13 +32,10 @@ description: channels.readHistory parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v62/methods/channels_reportSpam.md b/old_docs/API_docs_v62/methods/channels_reportSpam.md index 22f34443..a37a5833 100644 --- a/old_docs/API_docs_v62/methods/channels_reportSpam.md +++ b/old_docs/API_docs_v62/methods/channels_reportSpam.md @@ -33,13 +33,10 @@ description: channels.reportSpam parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v62/methods/channels_toggleInvites.md b/old_docs/API_docs_v62/methods/channels_toggleInvites.md index c2715b32..d0ae1136 100644 --- a/old_docs/API_docs_v62/methods/channels_toggleInvites.md +++ b/old_docs/API_docs_v62/methods/channels_toggleInvites.md @@ -33,13 +33,10 @@ description: channels.toggleInvites parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v62/methods/channels_toggleSignatures.md b/old_docs/API_docs_v62/methods/channels_toggleSignatures.md index a214b849..6477bc6d 100644 --- a/old_docs/API_docs_v62/methods/channels_toggleSignatures.md +++ b/old_docs/API_docs_v62/methods/channels_toggleSignatures.md @@ -31,13 +31,10 @@ description: channels.toggleSignatures parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v62/methods/channels_updatePinnedMessage.md b/old_docs/API_docs_v62/methods/channels_updatePinnedMessage.md index 6dcabf71..37a0a20d 100644 --- a/old_docs/API_docs_v62/methods/channels_updatePinnedMessage.md +++ b/old_docs/API_docs_v62/methods/channels_updatePinnedMessage.md @@ -35,16 +35,13 @@ description: channels.updatePinnedMessage parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v62/methods/channels_updateUsername.md b/old_docs/API_docs_v62/methods/channels_updateUsername.md index c2ede724..1f1f111e 100644 --- a/old_docs/API_docs_v62/methods/channels_updateUsername.md +++ b/old_docs/API_docs_v62/methods/channels_updateUsername.md @@ -35,13 +35,10 @@ description: channels.updateUsername parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v62/methods/contacts_block.md b/old_docs/API_docs_v62/methods/contacts_block.md index d9d58e37..1c7cbe26 100644 --- a/old_docs/API_docs_v62/methods/contacts_block.md +++ b/old_docs/API_docs_v62/methods/contacts_block.md @@ -30,13 +30,10 @@ description: contacts.block parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v62/methods/contacts_deleteContact.md b/old_docs/API_docs_v62/methods/contacts_deleteContact.md index cd8c17ad..987a1be0 100644 --- a/old_docs/API_docs_v62/methods/contacts_deleteContact.md +++ b/old_docs/API_docs_v62/methods/contacts_deleteContact.md @@ -30,13 +30,10 @@ description: contacts.deleteContact parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v62/methods/contacts_deleteContacts.md b/old_docs/API_docs_v62/methods/contacts_deleteContacts.md index fc65880d..67a922ed 100644 --- a/old_docs/API_docs_v62/methods/contacts_deleteContacts.md +++ b/old_docs/API_docs_v62/methods/contacts_deleteContacts.md @@ -31,13 +31,10 @@ description: contacts.deleteContacts parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v62/methods/contacts_exportCard.md b/old_docs/API_docs_v62/methods/contacts_exportCard.md index 63508076..bf6d1f9f 100644 --- a/old_docs/API_docs_v62/methods/contacts_exportCard.md +++ b/old_docs/API_docs_v62/methods/contacts_exportCard.md @@ -18,13 +18,10 @@ description: contacts.exportCard parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v62/methods/contacts_getBlocked.md b/old_docs/API_docs_v62/methods/contacts_getBlocked.md index f50792b4..faa719da 100644 --- a/old_docs/API_docs_v62/methods/contacts_getBlocked.md +++ b/old_docs/API_docs_v62/methods/contacts_getBlocked.md @@ -24,13 +24,10 @@ description: contacts.getBlocked parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v62/methods/contacts_getContacts.md b/old_docs/API_docs_v62/methods/contacts_getContacts.md index 71313bf2..a6779111 100644 --- a/old_docs/API_docs_v62/methods/contacts_getContacts.md +++ b/old_docs/API_docs_v62/methods/contacts_getContacts.md @@ -23,13 +23,10 @@ description: contacts.getContacts parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v62/methods/contacts_getStatuses.md b/old_docs/API_docs_v62/methods/contacts_getStatuses.md index d914e08d..9bb7f263 100644 --- a/old_docs/API_docs_v62/methods/contacts_getStatuses.md +++ b/old_docs/API_docs_v62/methods/contacts_getStatuses.md @@ -18,13 +18,10 @@ description: contacts.getStatuses parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v62/methods/contacts_getTopPeers.md b/old_docs/API_docs_v62/methods/contacts_getTopPeers.md index 1caa1d77..d29f6e02 100644 --- a/old_docs/API_docs_v62/methods/contacts_getTopPeers.md +++ b/old_docs/API_docs_v62/methods/contacts_getTopPeers.md @@ -37,13 +37,10 @@ description: contacts.getTopPeers parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v62/methods/contacts_importCard.md b/old_docs/API_docs_v62/methods/contacts_importCard.md index a6abf56d..7a2f34e1 100644 --- a/old_docs/API_docs_v62/methods/contacts_importCard.md +++ b/old_docs/API_docs_v62/methods/contacts_importCard.md @@ -31,13 +31,10 @@ description: contacts.importCard parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v62/methods/contacts_importContacts.md b/old_docs/API_docs_v62/methods/contacts_importContacts.md index db2051ac..2f070493 100644 --- a/old_docs/API_docs_v62/methods/contacts_importContacts.md +++ b/old_docs/API_docs_v62/methods/contacts_importContacts.md @@ -24,13 +24,10 @@ description: contacts.importContacts parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v62/methods/contacts_resetTopPeerRating.md b/old_docs/API_docs_v62/methods/contacts_resetTopPeerRating.md index 738494b2..711ea0cb 100644 --- a/old_docs/API_docs_v62/methods/contacts_resetTopPeerRating.md +++ b/old_docs/API_docs_v62/methods/contacts_resetTopPeerRating.md @@ -31,13 +31,10 @@ description: contacts.resetTopPeerRating parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v62/methods/contacts_search.md b/old_docs/API_docs_v62/methods/contacts_search.md index 0203b160..70a0635e 100644 --- a/old_docs/API_docs_v62/methods/contacts_search.md +++ b/old_docs/API_docs_v62/methods/contacts_search.md @@ -33,13 +33,10 @@ description: contacts.search parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v62/methods/contacts_unblock.md b/old_docs/API_docs_v62/methods/contacts_unblock.md index a1977c24..9c01e42a 100644 --- a/old_docs/API_docs_v62/methods/contacts_unblock.md +++ b/old_docs/API_docs_v62/methods/contacts_unblock.md @@ -30,13 +30,10 @@ description: contacts.unblock parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v62/methods/destroy_auth_key.md b/old_docs/API_docs_v62/methods/destroy_auth_key.md index 7d39ceec..1803e375 100644 --- a/old_docs/API_docs_v62/methods/destroy_auth_key.md +++ b/old_docs/API_docs_v62/methods/destroy_auth_key.md @@ -18,16 +18,13 @@ description: destroy_auth_key parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v62/methods/help_getAppChangelog.md b/old_docs/API_docs_v62/methods/help_getAppChangelog.md index b0ab53f1..0f8a12bd 100644 --- a/old_docs/API_docs_v62/methods/help_getAppChangelog.md +++ b/old_docs/API_docs_v62/methods/help_getAppChangelog.md @@ -18,13 +18,10 @@ description: help.getAppChangelog parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v62/methods/help_getAppUpdate.md b/old_docs/API_docs_v62/methods/help_getAppUpdate.md index 0871f59d..89ff22c3 100644 --- a/old_docs/API_docs_v62/methods/help_getAppUpdate.md +++ b/old_docs/API_docs_v62/methods/help_getAppUpdate.md @@ -18,13 +18,10 @@ description: help.getAppUpdate parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v62/methods/help_getConfig.md b/old_docs/API_docs_v62/methods/help_getConfig.md index e3648b5a..bb51b362 100644 --- a/old_docs/API_docs_v62/methods/help_getConfig.md +++ b/old_docs/API_docs_v62/methods/help_getConfig.md @@ -25,16 +25,13 @@ description: help.getConfig parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v62/methods/help_getInviteText.md b/old_docs/API_docs_v62/methods/help_getInviteText.md index 4bcbb77d..6d2674d6 100644 --- a/old_docs/API_docs_v62/methods/help_getInviteText.md +++ b/old_docs/API_docs_v62/methods/help_getInviteText.md @@ -18,13 +18,10 @@ description: help.getInviteText parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v62/methods/help_getNearestDc.md b/old_docs/API_docs_v62/methods/help_getNearestDc.md index c6f5c555..6d8ed3f7 100644 --- a/old_docs/API_docs_v62/methods/help_getNearestDc.md +++ b/old_docs/API_docs_v62/methods/help_getNearestDc.md @@ -18,13 +18,10 @@ description: help.getNearestDc parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v62/methods/help_getSupport.md b/old_docs/API_docs_v62/methods/help_getSupport.md index 209edf03..ca8db03c 100644 --- a/old_docs/API_docs_v62/methods/help_getSupport.md +++ b/old_docs/API_docs_v62/methods/help_getSupport.md @@ -18,13 +18,10 @@ description: help.getSupport parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v62/methods/help_getTermsOfService.md b/old_docs/API_docs_v62/methods/help_getTermsOfService.md index 8bc2e2fa..eb686506 100644 --- a/old_docs/API_docs_v62/methods/help_getTermsOfService.md +++ b/old_docs/API_docs_v62/methods/help_getTermsOfService.md @@ -18,13 +18,10 @@ description: help.getTermsOfService parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v62/methods/help_saveAppLog.md b/old_docs/API_docs_v62/methods/help_saveAppLog.md index 4f06434c..741b9aa1 100644 --- a/old_docs/API_docs_v62/methods/help_saveAppLog.md +++ b/old_docs/API_docs_v62/methods/help_saveAppLog.md @@ -23,13 +23,10 @@ description: help.saveAppLog parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v62/methods/help_setBotUpdatesStatus.md b/old_docs/API_docs_v62/methods/help_setBotUpdatesStatus.md index 55e1d2fe..470187a0 100644 --- a/old_docs/API_docs_v62/methods/help_setBotUpdatesStatus.md +++ b/old_docs/API_docs_v62/methods/help_setBotUpdatesStatus.md @@ -24,16 +24,13 @@ description: help.setBotUpdatesStatus parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v62/methods/initConnection.md b/old_docs/API_docs_v62/methods/initConnection.md index 0d22a1cb..c0307677 100644 --- a/old_docs/API_docs_v62/methods/initConnection.md +++ b/old_docs/API_docs_v62/methods/initConnection.md @@ -36,16 +36,13 @@ description: initConnection parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v62/methods/invokeAfterMsg.md b/old_docs/API_docs_v62/methods/invokeAfterMsg.md index c139fe8c..a382429e 100644 --- a/old_docs/API_docs_v62/methods/invokeAfterMsg.md +++ b/old_docs/API_docs_v62/methods/invokeAfterMsg.md @@ -24,16 +24,13 @@ description: invokeAfterMsg parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v62/methods/invokeAfterMsgs.md b/old_docs/API_docs_v62/methods/invokeAfterMsgs.md index 35004296..169eedaf 100644 --- a/old_docs/API_docs_v62/methods/invokeAfterMsgs.md +++ b/old_docs/API_docs_v62/methods/invokeAfterMsgs.md @@ -24,16 +24,13 @@ description: invokeAfterMsgs parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v62/methods/invokeWithLayer.md b/old_docs/API_docs_v62/methods/invokeWithLayer.md index 706036c4..d9a2c74c 100644 --- a/old_docs/API_docs_v62/methods/invokeWithLayer.md +++ b/old_docs/API_docs_v62/methods/invokeWithLayer.md @@ -41,16 +41,13 @@ description: invokeWithLayer parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v62/methods/invokeWithoutUpdates.md b/old_docs/API_docs_v62/methods/invokeWithoutUpdates.md index 10c6bfcf..f7d01765 100644 --- a/old_docs/API_docs_v62/methods/invokeWithoutUpdates.md +++ b/old_docs/API_docs_v62/methods/invokeWithoutUpdates.md @@ -23,16 +23,13 @@ description: invokeWithoutUpdates parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v62/methods/messages_addChatUser.md b/old_docs/API_docs_v62/methods/messages_addChatUser.md index 00da5a61..b9e6243d 100644 --- a/old_docs/API_docs_v62/methods/messages_addChatUser.md +++ b/old_docs/API_docs_v62/methods/messages_addChatUser.md @@ -40,13 +40,10 @@ description: messages.addChatUser parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v62/methods/messages_checkChatInvite.md b/old_docs/API_docs_v62/methods/messages_checkChatInvite.md index c5eb1c06..c4489469 100644 --- a/old_docs/API_docs_v62/methods/messages_checkChatInvite.md +++ b/old_docs/API_docs_v62/methods/messages_checkChatInvite.md @@ -32,13 +32,10 @@ description: messages.checkChatInvite parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v62/methods/messages_clearRecentStickers.md b/old_docs/API_docs_v62/methods/messages_clearRecentStickers.md index dda76d14..ae45b249 100644 --- a/old_docs/API_docs_v62/methods/messages_clearRecentStickers.md +++ b/old_docs/API_docs_v62/methods/messages_clearRecentStickers.md @@ -23,13 +23,10 @@ description: messages.clearRecentStickers parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v62/methods/messages_createChat.md b/old_docs/API_docs_v62/methods/messages_createChat.md index c643a022..c6c8f420 100644 --- a/old_docs/API_docs_v62/methods/messages_createChat.md +++ b/old_docs/API_docs_v62/methods/messages_createChat.md @@ -32,13 +32,10 @@ description: messages.createChat parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v62/methods/messages_deleteChatUser.md b/old_docs/API_docs_v62/methods/messages_deleteChatUser.md index 3d75d9cf..4b8c2aa5 100644 --- a/old_docs/API_docs_v62/methods/messages_deleteChatUser.md +++ b/old_docs/API_docs_v62/methods/messages_deleteChatUser.md @@ -33,16 +33,13 @@ description: messages.deleteChatUser parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v62/methods/messages_deleteHistory.md b/old_docs/API_docs_v62/methods/messages_deleteHistory.md index ce6ba6e7..ebe2c89c 100644 --- a/old_docs/API_docs_v62/methods/messages_deleteHistory.md +++ b/old_docs/API_docs_v62/methods/messages_deleteHistory.md @@ -32,13 +32,10 @@ description: messages.deleteHistory parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v62/methods/messages_deleteMessages.md b/old_docs/API_docs_v62/methods/messages_deleteMessages.md index 2b88a73f..5472cc72 100644 --- a/old_docs/API_docs_v62/methods/messages_deleteMessages.md +++ b/old_docs/API_docs_v62/methods/messages_deleteMessages.md @@ -31,16 +31,13 @@ description: messages.deleteMessages parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v62/methods/messages_editChatAdmin.md b/old_docs/API_docs_v62/methods/messages_editChatAdmin.md index e64d9da5..1b3ffa9f 100644 --- a/old_docs/API_docs_v62/methods/messages_editChatAdmin.md +++ b/old_docs/API_docs_v62/methods/messages_editChatAdmin.md @@ -32,13 +32,10 @@ description: messages.editChatAdmin parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v62/methods/messages_editChatPhoto.md b/old_docs/API_docs_v62/methods/messages_editChatPhoto.md index d225962d..8c5d9d47 100644 --- a/old_docs/API_docs_v62/methods/messages_editChatPhoto.md +++ b/old_docs/API_docs_v62/methods/messages_editChatPhoto.md @@ -35,16 +35,13 @@ description: messages.editChatPhoto parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v62/methods/messages_editChatTitle.md b/old_docs/API_docs_v62/methods/messages_editChatTitle.md index 5cb1c6d7..238c6d72 100644 --- a/old_docs/API_docs_v62/methods/messages_editChatTitle.md +++ b/old_docs/API_docs_v62/methods/messages_editChatTitle.md @@ -32,16 +32,13 @@ description: messages.editChatTitle parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v62/methods/messages_editInlineBotMessage.md b/old_docs/API_docs_v62/methods/messages_editInlineBotMessage.md index 621c81a3..c3489f9d 100644 --- a/old_docs/API_docs_v62/methods/messages_editInlineBotMessage.md +++ b/old_docs/API_docs_v62/methods/messages_editInlineBotMessage.md @@ -36,16 +36,13 @@ description: messages.editInlineBotMessage parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v62/methods/messages_editMessage.md b/old_docs/API_docs_v62/methods/messages_editMessage.md index b8cdda81..3a23c9ac 100644 --- a/old_docs/API_docs_v62/methods/messages_editMessage.md +++ b/old_docs/API_docs_v62/methods/messages_editMessage.md @@ -45,16 +45,13 @@ description: messages.editMessage parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v62/methods/messages_exportChatInvite.md b/old_docs/API_docs_v62/methods/messages_exportChatInvite.md index 4a6e28ff..78f2ff86 100644 --- a/old_docs/API_docs_v62/methods/messages_exportChatInvite.md +++ b/old_docs/API_docs_v62/methods/messages_exportChatInvite.md @@ -30,13 +30,10 @@ description: messages.exportChatInvite parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v62/methods/messages_forwardMessage.md b/old_docs/API_docs_v62/methods/messages_forwardMessage.md index 4e2362db..fbdbc955 100644 --- a/old_docs/API_docs_v62/methods/messages_forwardMessage.md +++ b/old_docs/API_docs_v62/methods/messages_forwardMessage.md @@ -34,16 +34,13 @@ description: messages.forwardMessage parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v62/methods/messages_forwardMessages.md b/old_docs/API_docs_v62/methods/messages_forwardMessages.md index b5e9b7e7..5a609390 100644 --- a/old_docs/API_docs_v62/methods/messages_forwardMessages.md +++ b/old_docs/API_docs_v62/methods/messages_forwardMessages.md @@ -56,16 +56,13 @@ description: messages.forwardMessages parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v62/methods/messages_getAllChats.md b/old_docs/API_docs_v62/methods/messages_getAllChats.md index c5037003..babcf17d 100644 --- a/old_docs/API_docs_v62/methods/messages_getAllChats.md +++ b/old_docs/API_docs_v62/methods/messages_getAllChats.md @@ -23,13 +23,10 @@ description: messages.getAllChats parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v62/methods/messages_getAllDrafts.md b/old_docs/API_docs_v62/methods/messages_getAllDrafts.md index cc447864..8550c5b8 100644 --- a/old_docs/API_docs_v62/methods/messages_getAllDrafts.md +++ b/old_docs/API_docs_v62/methods/messages_getAllDrafts.md @@ -18,13 +18,10 @@ description: messages.getAllDrafts parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v62/methods/messages_getAllStickers.md b/old_docs/API_docs_v62/methods/messages_getAllStickers.md index dc9e2432..034438a5 100644 --- a/old_docs/API_docs_v62/methods/messages_getAllStickers.md +++ b/old_docs/API_docs_v62/methods/messages_getAllStickers.md @@ -23,13 +23,10 @@ description: messages.getAllStickers parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v62/methods/messages_getArchivedStickers.md b/old_docs/API_docs_v62/methods/messages_getArchivedStickers.md index dddcc748..cdb7f0af 100644 --- a/old_docs/API_docs_v62/methods/messages_getArchivedStickers.md +++ b/old_docs/API_docs_v62/methods/messages_getArchivedStickers.md @@ -25,13 +25,10 @@ description: messages.getArchivedStickers parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v62/methods/messages_getAttachedStickers.md b/old_docs/API_docs_v62/methods/messages_getAttachedStickers.md index 250db6a8..79d4e30d 100644 --- a/old_docs/API_docs_v62/methods/messages_getAttachedStickers.md +++ b/old_docs/API_docs_v62/methods/messages_getAttachedStickers.md @@ -23,13 +23,10 @@ description: messages.getAttachedStickers parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v62/methods/messages_getBotCallbackAnswer.md b/old_docs/API_docs_v62/methods/messages_getBotCallbackAnswer.md index e905723f..afa5358c 100644 --- a/old_docs/API_docs_v62/methods/messages_getBotCallbackAnswer.md +++ b/old_docs/API_docs_v62/methods/messages_getBotCallbackAnswer.md @@ -37,13 +37,10 @@ description: messages.getBotCallbackAnswer parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v62/methods/messages_getChats.md b/old_docs/API_docs_v62/methods/messages_getChats.md index 6fa30cbd..c322613d 100644 --- a/old_docs/API_docs_v62/methods/messages_getChats.md +++ b/old_docs/API_docs_v62/methods/messages_getChats.md @@ -31,16 +31,13 @@ description: messages.getChats parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v62/methods/messages_getCommonChats.md b/old_docs/API_docs_v62/methods/messages_getCommonChats.md index 0c601ca9..8c9e2834 100644 --- a/old_docs/API_docs_v62/methods/messages_getCommonChats.md +++ b/old_docs/API_docs_v62/methods/messages_getCommonChats.md @@ -32,13 +32,10 @@ description: messages.getCommonChats parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v62/methods/messages_getDhConfig.md b/old_docs/API_docs_v62/methods/messages_getDhConfig.md index aac3354d..f97684d2 100644 --- a/old_docs/API_docs_v62/methods/messages_getDhConfig.md +++ b/old_docs/API_docs_v62/methods/messages_getDhConfig.md @@ -31,13 +31,10 @@ description: messages.getDhConfig parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v62/methods/messages_getDialogs.md b/old_docs/API_docs_v62/methods/messages_getDialogs.md index 131b75b7..cef5ecc6 100644 --- a/old_docs/API_docs_v62/methods/messages_getDialogs.md +++ b/old_docs/API_docs_v62/methods/messages_getDialogs.md @@ -37,13 +37,10 @@ description: messages.getDialogs parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v62/methods/messages_getDocumentByHash.md b/old_docs/API_docs_v62/methods/messages_getDocumentByHash.md index dda54bdd..3902ac44 100644 --- a/old_docs/API_docs_v62/methods/messages_getDocumentByHash.md +++ b/old_docs/API_docs_v62/methods/messages_getDocumentByHash.md @@ -32,16 +32,13 @@ description: messages.getDocumentByHash parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v62/methods/messages_getFeaturedStickers.md b/old_docs/API_docs_v62/methods/messages_getFeaturedStickers.md index 9573464a..5aad1810 100644 --- a/old_docs/API_docs_v62/methods/messages_getFeaturedStickers.md +++ b/old_docs/API_docs_v62/methods/messages_getFeaturedStickers.md @@ -23,13 +23,10 @@ description: messages.getFeaturedStickers parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v62/methods/messages_getGameHighScores.md b/old_docs/API_docs_v62/methods/messages_getGameHighScores.md index 935bb95a..d8a94ae3 100644 --- a/old_docs/API_docs_v62/methods/messages_getGameHighScores.md +++ b/old_docs/API_docs_v62/methods/messages_getGameHighScores.md @@ -33,16 +33,13 @@ description: messages.getGameHighScores parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v62/methods/messages_getHistory.md b/old_docs/API_docs_v62/methods/messages_getHistory.md index a48a465e..4c3ef2ee 100644 --- a/old_docs/API_docs_v62/methods/messages_getHistory.md +++ b/old_docs/API_docs_v62/methods/messages_getHistory.md @@ -41,13 +41,10 @@ description: messages.getHistory parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v62/methods/messages_getInlineBotResults.md b/old_docs/API_docs_v62/methods/messages_getInlineBotResults.md index 61366580..61b927fc 100644 --- a/old_docs/API_docs_v62/methods/messages_getInlineBotResults.md +++ b/old_docs/API_docs_v62/methods/messages_getInlineBotResults.md @@ -37,13 +37,10 @@ description: messages.getInlineBotResults parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v62/methods/messages_getInlineGameHighScores.md b/old_docs/API_docs_v62/methods/messages_getInlineGameHighScores.md index 7cc04d0d..40eff3a9 100644 --- a/old_docs/API_docs_v62/methods/messages_getInlineGameHighScores.md +++ b/old_docs/API_docs_v62/methods/messages_getInlineGameHighScores.md @@ -32,16 +32,13 @@ description: messages.getInlineGameHighScores parameters, return type and exampl ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v62/methods/messages_getMaskStickers.md b/old_docs/API_docs_v62/methods/messages_getMaskStickers.md index 0ab194df..ca964647 100644 --- a/old_docs/API_docs_v62/methods/messages_getMaskStickers.md +++ b/old_docs/API_docs_v62/methods/messages_getMaskStickers.md @@ -23,13 +23,10 @@ description: messages.getMaskStickers parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v62/methods/messages_getMessageEditData.md b/old_docs/API_docs_v62/methods/messages_getMessageEditData.md index a8b135c6..15085153 100644 --- a/old_docs/API_docs_v62/methods/messages_getMessageEditData.md +++ b/old_docs/API_docs_v62/methods/messages_getMessageEditData.md @@ -32,13 +32,10 @@ description: messages.getMessageEditData parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v62/methods/messages_getMessages.md b/old_docs/API_docs_v62/methods/messages_getMessages.md index 5a970246..787c46dd 100644 --- a/old_docs/API_docs_v62/methods/messages_getMessages.md +++ b/old_docs/API_docs_v62/methods/messages_getMessages.md @@ -23,16 +23,13 @@ description: messages.getMessages parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v62/methods/messages_getMessagesViews.md b/old_docs/API_docs_v62/methods/messages_getMessagesViews.md index 263f3f95..de5692dc 100644 --- a/old_docs/API_docs_v62/methods/messages_getMessagesViews.md +++ b/old_docs/API_docs_v62/methods/messages_getMessagesViews.md @@ -34,13 +34,10 @@ description: messages.getMessagesViews parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v62/methods/messages_getPeerDialogs.md b/old_docs/API_docs_v62/methods/messages_getPeerDialogs.md index 3da60038..226948ae 100644 --- a/old_docs/API_docs_v62/methods/messages_getPeerDialogs.md +++ b/old_docs/API_docs_v62/methods/messages_getPeerDialogs.md @@ -31,13 +31,10 @@ description: messages.getPeerDialogs parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v62/methods/messages_getPeerSettings.md b/old_docs/API_docs_v62/methods/messages_getPeerSettings.md index d3e3cfc3..2a92f2da 100644 --- a/old_docs/API_docs_v62/methods/messages_getPeerSettings.md +++ b/old_docs/API_docs_v62/methods/messages_getPeerSettings.md @@ -31,13 +31,10 @@ description: messages.getPeerSettings parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v62/methods/messages_getPinnedDialogs.md b/old_docs/API_docs_v62/methods/messages_getPinnedDialogs.md index 110eab05..ec744f01 100644 --- a/old_docs/API_docs_v62/methods/messages_getPinnedDialogs.md +++ b/old_docs/API_docs_v62/methods/messages_getPinnedDialogs.md @@ -18,13 +18,10 @@ description: messages.getPinnedDialogs parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v62/methods/messages_getRecentStickers.md b/old_docs/API_docs_v62/methods/messages_getRecentStickers.md index 10d1a0df..a6ae162f 100644 --- a/old_docs/API_docs_v62/methods/messages_getRecentStickers.md +++ b/old_docs/API_docs_v62/methods/messages_getRecentStickers.md @@ -24,13 +24,10 @@ description: messages.getRecentStickers parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v62/methods/messages_getSavedGifs.md b/old_docs/API_docs_v62/methods/messages_getSavedGifs.md index 7cce4ffe..4986d812 100644 --- a/old_docs/API_docs_v62/methods/messages_getSavedGifs.md +++ b/old_docs/API_docs_v62/methods/messages_getSavedGifs.md @@ -23,13 +23,10 @@ description: messages.getSavedGifs parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v62/methods/messages_getStickerSet.md b/old_docs/API_docs_v62/methods/messages_getStickerSet.md index 59f33916..b480e0fe 100644 --- a/old_docs/API_docs_v62/methods/messages_getStickerSet.md +++ b/old_docs/API_docs_v62/methods/messages_getStickerSet.md @@ -30,16 +30,13 @@ description: messages.getStickerSet parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v62/methods/messages_getWebPage.md b/old_docs/API_docs_v62/methods/messages_getWebPage.md index 35f6e545..e886b020 100644 --- a/old_docs/API_docs_v62/methods/messages_getWebPage.md +++ b/old_docs/API_docs_v62/methods/messages_getWebPage.md @@ -31,13 +31,10 @@ description: messages.getWebPage parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v62/methods/messages_getWebPagePreview.md b/old_docs/API_docs_v62/methods/messages_getWebPagePreview.md index a89600b1..d3908933 100644 --- a/old_docs/API_docs_v62/methods/messages_getWebPagePreview.md +++ b/old_docs/API_docs_v62/methods/messages_getWebPagePreview.md @@ -23,13 +23,10 @@ description: messages.getWebPagePreview parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v62/methods/messages_hideReportSpam.md b/old_docs/API_docs_v62/methods/messages_hideReportSpam.md index 2dfe4dd7..5635665c 100644 --- a/old_docs/API_docs_v62/methods/messages_hideReportSpam.md +++ b/old_docs/API_docs_v62/methods/messages_hideReportSpam.md @@ -30,13 +30,10 @@ description: messages.hideReportSpam parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v62/methods/messages_importChatInvite.md b/old_docs/API_docs_v62/methods/messages_importChatInvite.md index 9d77304d..9dcfa56d 100644 --- a/old_docs/API_docs_v62/methods/messages_importChatInvite.md +++ b/old_docs/API_docs_v62/methods/messages_importChatInvite.md @@ -36,13 +36,10 @@ description: messages.importChatInvite parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v62/methods/messages_installStickerSet.md b/old_docs/API_docs_v62/methods/messages_installStickerSet.md index 3dde52a7..016d5ece 100644 --- a/old_docs/API_docs_v62/methods/messages_installStickerSet.md +++ b/old_docs/API_docs_v62/methods/messages_installStickerSet.md @@ -31,13 +31,10 @@ description: messages.installStickerSet parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v62/methods/messages_migrateChat.md b/old_docs/API_docs_v62/methods/messages_migrateChat.md index 22d2fbf0..a8274e70 100644 --- a/old_docs/API_docs_v62/methods/messages_migrateChat.md +++ b/old_docs/API_docs_v62/methods/messages_migrateChat.md @@ -32,13 +32,10 @@ description: messages.migrateChat parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v62/methods/messages_readEncryptedHistory.md b/old_docs/API_docs_v62/methods/messages_readEncryptedHistory.md index 766ee07d..f38f6b07 100644 --- a/old_docs/API_docs_v62/methods/messages_readEncryptedHistory.md +++ b/old_docs/API_docs_v62/methods/messages_readEncryptedHistory.md @@ -31,16 +31,13 @@ description: messages.readEncryptedHistory parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v62/methods/messages_readFeaturedStickers.md b/old_docs/API_docs_v62/methods/messages_readFeaturedStickers.md index c7ce7aca..02055bf3 100644 --- a/old_docs/API_docs_v62/methods/messages_readFeaturedStickers.md +++ b/old_docs/API_docs_v62/methods/messages_readFeaturedStickers.md @@ -23,13 +23,10 @@ description: messages.readFeaturedStickers parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v62/methods/messages_readHistory.md b/old_docs/API_docs_v62/methods/messages_readHistory.md index 1aa7830a..fef62130 100644 --- a/old_docs/API_docs_v62/methods/messages_readHistory.md +++ b/old_docs/API_docs_v62/methods/messages_readHistory.md @@ -32,13 +32,10 @@ description: messages.readHistory parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v62/methods/messages_readMessageContents.md b/old_docs/API_docs_v62/methods/messages_readMessageContents.md index 4b1abda0..7a6055fc 100644 --- a/old_docs/API_docs_v62/methods/messages_readMessageContents.md +++ b/old_docs/API_docs_v62/methods/messages_readMessageContents.md @@ -23,13 +23,10 @@ description: messages.readMessageContents parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v62/methods/messages_receivedMessages.md b/old_docs/API_docs_v62/methods/messages_receivedMessages.md index 588ac5cf..e2cf3a2f 100644 --- a/old_docs/API_docs_v62/methods/messages_receivedMessages.md +++ b/old_docs/API_docs_v62/methods/messages_receivedMessages.md @@ -23,13 +23,10 @@ description: messages.receivedMessages parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v62/methods/messages_receivedQueue.md b/old_docs/API_docs_v62/methods/messages_receivedQueue.md index 3c7f1d4f..38f504b3 100644 --- a/old_docs/API_docs_v62/methods/messages_receivedQueue.md +++ b/old_docs/API_docs_v62/methods/messages_receivedQueue.md @@ -30,16 +30,13 @@ description: messages.receivedQueue parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v62/methods/messages_reorderPinnedDialogs.md b/old_docs/API_docs_v62/methods/messages_reorderPinnedDialogs.md index 30102fd7..b4bfb84f 100644 --- a/old_docs/API_docs_v62/methods/messages_reorderPinnedDialogs.md +++ b/old_docs/API_docs_v62/methods/messages_reorderPinnedDialogs.md @@ -31,13 +31,10 @@ description: messages.reorderPinnedDialogs parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v62/methods/messages_reorderStickerSets.md b/old_docs/API_docs_v62/methods/messages_reorderStickerSets.md index 5c47f174..fa094550 100644 --- a/old_docs/API_docs_v62/methods/messages_reorderStickerSets.md +++ b/old_docs/API_docs_v62/methods/messages_reorderStickerSets.md @@ -24,13 +24,10 @@ description: messages.reorderStickerSets parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v62/methods/messages_reportEncryptedSpam.md b/old_docs/API_docs_v62/methods/messages_reportEncryptedSpam.md index 30ef3473..aed7a891 100644 --- a/old_docs/API_docs_v62/methods/messages_reportEncryptedSpam.md +++ b/old_docs/API_docs_v62/methods/messages_reportEncryptedSpam.md @@ -30,13 +30,10 @@ description: messages.reportEncryptedSpam parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v62/methods/messages_reportSpam.md b/old_docs/API_docs_v62/methods/messages_reportSpam.md index bfadb9ab..08c96d44 100644 --- a/old_docs/API_docs_v62/methods/messages_reportSpam.md +++ b/old_docs/API_docs_v62/methods/messages_reportSpam.md @@ -30,13 +30,10 @@ description: messages.reportSpam parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v62/methods/messages_saveDraft.md b/old_docs/API_docs_v62/methods/messages_saveDraft.md index 42308b46..f68090c0 100644 --- a/old_docs/API_docs_v62/methods/messages_saveDraft.md +++ b/old_docs/API_docs_v62/methods/messages_saveDraft.md @@ -35,13 +35,10 @@ description: messages.saveDraft parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v62/methods/messages_saveGif.md b/old_docs/API_docs_v62/methods/messages_saveGif.md index 31e48632..d86d539a 100644 --- a/old_docs/API_docs_v62/methods/messages_saveGif.md +++ b/old_docs/API_docs_v62/methods/messages_saveGif.md @@ -31,13 +31,10 @@ description: messages.saveGif parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v62/methods/messages_saveRecentSticker.md b/old_docs/API_docs_v62/methods/messages_saveRecentSticker.md index 8d45be5e..029ca763 100644 --- a/old_docs/API_docs_v62/methods/messages_saveRecentSticker.md +++ b/old_docs/API_docs_v62/methods/messages_saveRecentSticker.md @@ -32,13 +32,10 @@ description: messages.saveRecentSticker parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v62/methods/messages_search.md b/old_docs/API_docs_v62/methods/messages_search.md index 87073d00..1e809cf2 100644 --- a/old_docs/API_docs_v62/methods/messages_search.md +++ b/old_docs/API_docs_v62/methods/messages_search.md @@ -43,13 +43,10 @@ description: messages.search parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v62/methods/messages_searchGifs.md b/old_docs/API_docs_v62/methods/messages_searchGifs.md index 3f4c4838..dd804c99 100644 --- a/old_docs/API_docs_v62/methods/messages_searchGifs.md +++ b/old_docs/API_docs_v62/methods/messages_searchGifs.md @@ -31,13 +31,10 @@ description: messages.searchGifs parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v62/methods/messages_searchGlobal.md b/old_docs/API_docs_v62/methods/messages_searchGlobal.md index 0553dd7a..4b45eed2 100644 --- a/old_docs/API_docs_v62/methods/messages_searchGlobal.md +++ b/old_docs/API_docs_v62/methods/messages_searchGlobal.md @@ -34,13 +34,10 @@ description: messages.searchGlobal parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v62/methods/messages_sendEncrypted.md b/old_docs/API_docs_v62/methods/messages_sendEncrypted.md index 82eeec92..ba9f796b 100644 --- a/old_docs/API_docs_v62/methods/messages_sendEncrypted.md +++ b/old_docs/API_docs_v62/methods/messages_sendEncrypted.md @@ -34,16 +34,13 @@ description: messages.sendEncrypted parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v62/methods/messages_sendEncryptedFile.md b/old_docs/API_docs_v62/methods/messages_sendEncryptedFile.md index 8f7a73d9..db16bf2d 100644 --- a/old_docs/API_docs_v62/methods/messages_sendEncryptedFile.md +++ b/old_docs/API_docs_v62/methods/messages_sendEncryptedFile.md @@ -32,16 +32,13 @@ description: messages.sendEncryptedFile parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v62/methods/messages_sendEncryptedService.md b/old_docs/API_docs_v62/methods/messages_sendEncryptedService.md index d427f6c3..fd4e2627 100644 --- a/old_docs/API_docs_v62/methods/messages_sendEncryptedService.md +++ b/old_docs/API_docs_v62/methods/messages_sendEncryptedService.md @@ -34,16 +34,13 @@ description: messages.sendEncryptedService parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v62/methods/messages_sendInlineBotResult.md b/old_docs/API_docs_v62/methods/messages_sendInlineBotResult.md index 6aeeb67d..d974fe69 100644 --- a/old_docs/API_docs_v62/methods/messages_sendInlineBotResult.md +++ b/old_docs/API_docs_v62/methods/messages_sendInlineBotResult.md @@ -39,13 +39,10 @@ description: messages.sendInlineBotResult parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v62/methods/messages_sendMedia.md b/old_docs/API_docs_v62/methods/messages_sendMedia.md index b3ceb5d4..b58bf325 100644 --- a/old_docs/API_docs_v62/methods/messages_sendMedia.md +++ b/old_docs/API_docs_v62/methods/messages_sendMedia.md @@ -59,16 +59,13 @@ description: messages.sendMedia parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v62/methods/messages_sendMessage.md b/old_docs/API_docs_v62/methods/messages_sendMessage.md index 60b50412..3a515129 100644 --- a/old_docs/API_docs_v62/methods/messages_sendMessage.md +++ b/old_docs/API_docs_v62/methods/messages_sendMessage.md @@ -58,16 +58,13 @@ description: messages.sendMessage parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v62/methods/messages_setBotCallbackAnswer.md b/old_docs/API_docs_v62/methods/messages_setBotCallbackAnswer.md index 2c51854f..2901a558 100644 --- a/old_docs/API_docs_v62/methods/messages_setBotCallbackAnswer.md +++ b/old_docs/API_docs_v62/methods/messages_setBotCallbackAnswer.md @@ -34,16 +34,13 @@ description: messages.setBotCallbackAnswer parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v62/methods/messages_setEncryptedTyping.md b/old_docs/API_docs_v62/methods/messages_setEncryptedTyping.md index a05b94dd..aeae6ff7 100644 --- a/old_docs/API_docs_v62/methods/messages_setEncryptedTyping.md +++ b/old_docs/API_docs_v62/methods/messages_setEncryptedTyping.md @@ -31,13 +31,10 @@ description: messages.setEncryptedTyping parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v62/methods/messages_setGameScore.md b/old_docs/API_docs_v62/methods/messages_setGameScore.md index 3137f7c9..c8ef5c49 100644 --- a/old_docs/API_docs_v62/methods/messages_setGameScore.md +++ b/old_docs/API_docs_v62/methods/messages_setGameScore.md @@ -36,16 +36,13 @@ description: messages.setGameScore parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v62/methods/messages_setInlineBotResults.md b/old_docs/API_docs_v62/methods/messages_setInlineBotResults.md index 8b5625f3..8b49c4c7 100644 --- a/old_docs/API_docs_v62/methods/messages_setInlineBotResults.md +++ b/old_docs/API_docs_v62/methods/messages_setInlineBotResults.md @@ -46,16 +46,13 @@ description: messages.setInlineBotResults parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v62/methods/messages_setInlineGameScore.md b/old_docs/API_docs_v62/methods/messages_setInlineGameScore.md index 36752f35..4c43e7d2 100644 --- a/old_docs/API_docs_v62/methods/messages_setInlineGameScore.md +++ b/old_docs/API_docs_v62/methods/messages_setInlineGameScore.md @@ -35,16 +35,13 @@ description: messages.setInlineGameScore parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v62/methods/messages_setTyping.md b/old_docs/API_docs_v62/methods/messages_setTyping.md index 9ef8caf5..f6b7b7b5 100644 --- a/old_docs/API_docs_v62/methods/messages_setTyping.md +++ b/old_docs/API_docs_v62/methods/messages_setTyping.md @@ -37,16 +37,13 @@ description: messages.setTyping parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v62/methods/messages_startBot.md b/old_docs/API_docs_v62/methods/messages_startBot.md index 8d98e390..b33ab013 100644 --- a/old_docs/API_docs_v62/methods/messages_startBot.md +++ b/old_docs/API_docs_v62/methods/messages_startBot.md @@ -35,13 +35,10 @@ description: messages.startBot parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v62/methods/messages_toggleChatAdmins.md b/old_docs/API_docs_v62/methods/messages_toggleChatAdmins.md index 3bf8a419..97328065 100644 --- a/old_docs/API_docs_v62/methods/messages_toggleChatAdmins.md +++ b/old_docs/API_docs_v62/methods/messages_toggleChatAdmins.md @@ -32,13 +32,10 @@ description: messages.toggleChatAdmins parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v62/methods/messages_toggleDialogPin.md b/old_docs/API_docs_v62/methods/messages_toggleDialogPin.md index f35f2f40..7853df5e 100644 --- a/old_docs/API_docs_v62/methods/messages_toggleDialogPin.md +++ b/old_docs/API_docs_v62/methods/messages_toggleDialogPin.md @@ -31,13 +31,10 @@ description: messages.toggleDialogPin parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v62/methods/messages_uninstallStickerSet.md b/old_docs/API_docs_v62/methods/messages_uninstallStickerSet.md index 6763e64f..76a3e3e2 100644 --- a/old_docs/API_docs_v62/methods/messages_uninstallStickerSet.md +++ b/old_docs/API_docs_v62/methods/messages_uninstallStickerSet.md @@ -30,13 +30,10 @@ description: messages.uninstallStickerSet parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v62/methods/phone_receivedCall.md b/old_docs/API_docs_v62/methods/phone_receivedCall.md index 9d59b1ea..8ca6a4e1 100644 --- a/old_docs/API_docs_v62/methods/phone_receivedCall.md +++ b/old_docs/API_docs_v62/methods/phone_receivedCall.md @@ -31,13 +31,10 @@ description: phone.receivedCall parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v62/methods/photos_deletePhotos.md b/old_docs/API_docs_v62/methods/photos_deletePhotos.md index e9cd459d..61768b1e 100644 --- a/old_docs/API_docs_v62/methods/photos_deletePhotos.md +++ b/old_docs/API_docs_v62/methods/photos_deletePhotos.md @@ -23,13 +23,10 @@ description: photos.deletePhotos parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v62/methods/photos_getUserPhotos.md b/old_docs/API_docs_v62/methods/photos_getUserPhotos.md index d6c2a380..095363e7 100644 --- a/old_docs/API_docs_v62/methods/photos_getUserPhotos.md +++ b/old_docs/API_docs_v62/methods/photos_getUserPhotos.md @@ -34,16 +34,13 @@ description: photos.getUserPhotos parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v62/methods/photos_updateProfilePhoto.md b/old_docs/API_docs_v62/methods/photos_updateProfilePhoto.md index ea3b78ec..d90aca22 100644 --- a/old_docs/API_docs_v62/methods/photos_updateProfilePhoto.md +++ b/old_docs/API_docs_v62/methods/photos_updateProfilePhoto.md @@ -23,13 +23,10 @@ description: photos.updateProfilePhoto parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v62/methods/photos_uploadProfilePhoto.md b/old_docs/API_docs_v62/methods/photos_uploadProfilePhoto.md index 58541f23..987e721c 100644 --- a/old_docs/API_docs_v62/methods/photos_uploadProfilePhoto.md +++ b/old_docs/API_docs_v62/methods/photos_uploadProfilePhoto.md @@ -34,13 +34,10 @@ description: photos.uploadProfilePhoto parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v62/methods/users_getUsers.md b/old_docs/API_docs_v62/methods/users_getUsers.md index 6a44d258..3a981d57 100644 --- a/old_docs/API_docs_v62/methods/users_getUsers.md +++ b/old_docs/API_docs_v62/methods/users_getUsers.md @@ -33,16 +33,13 @@ description: users.getUsers parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v65/methods/account_changePhone.md b/old_docs/API_docs_v65/methods/account_changePhone.md index 5d1801d0..e47ef6a7 100644 --- a/old_docs/API_docs_v65/methods/account_changePhone.md +++ b/old_docs/API_docs_v65/methods/account_changePhone.md @@ -32,13 +32,10 @@ description: account.changePhone parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v65/methods/account_checkUsername.md b/old_docs/API_docs_v65/methods/account_checkUsername.md index afc59b6c..40cf822f 100644 --- a/old_docs/API_docs_v65/methods/account_checkUsername.md +++ b/old_docs/API_docs_v65/methods/account_checkUsername.md @@ -30,13 +30,10 @@ description: account.checkUsername parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v65/methods/account_confirmPhone.md b/old_docs/API_docs_v65/methods/account_confirmPhone.md index 0d2dc5c6..8dd79d94 100644 --- a/old_docs/API_docs_v65/methods/account_confirmPhone.md +++ b/old_docs/API_docs_v65/methods/account_confirmPhone.md @@ -32,13 +32,10 @@ description: account.confirmPhone parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v65/methods/account_deleteAccount.md b/old_docs/API_docs_v65/methods/account_deleteAccount.md index 5abcd0ec..6f1bbda9 100644 --- a/old_docs/API_docs_v65/methods/account_deleteAccount.md +++ b/old_docs/API_docs_v65/methods/account_deleteAccount.md @@ -23,13 +23,10 @@ description: account.deleteAccount parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v65/methods/account_getAccountTTL.md b/old_docs/API_docs_v65/methods/account_getAccountTTL.md index 3520fbef..538b1d7a 100644 --- a/old_docs/API_docs_v65/methods/account_getAccountTTL.md +++ b/old_docs/API_docs_v65/methods/account_getAccountTTL.md @@ -18,13 +18,10 @@ description: account.getAccountTTL parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v65/methods/account_getAuthorizations.md b/old_docs/API_docs_v65/methods/account_getAuthorizations.md index 91bbce5e..f138d517 100644 --- a/old_docs/API_docs_v65/methods/account_getAuthorizations.md +++ b/old_docs/API_docs_v65/methods/account_getAuthorizations.md @@ -18,13 +18,10 @@ description: account.getAuthorizations parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v65/methods/account_getNotifySettings.md b/old_docs/API_docs_v65/methods/account_getNotifySettings.md index 8ee710d8..a48eed2f 100644 --- a/old_docs/API_docs_v65/methods/account_getNotifySettings.md +++ b/old_docs/API_docs_v65/methods/account_getNotifySettings.md @@ -30,13 +30,10 @@ description: account.getNotifySettings parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v65/methods/account_getPassword.md b/old_docs/API_docs_v65/methods/account_getPassword.md index 4d9fd015..1abf6174 100644 --- a/old_docs/API_docs_v65/methods/account_getPassword.md +++ b/old_docs/API_docs_v65/methods/account_getPassword.md @@ -18,13 +18,10 @@ description: account.getPassword parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v65/methods/account_getPasswordSettings.md b/old_docs/API_docs_v65/methods/account_getPasswordSettings.md index 02cb77f7..aec5b989 100644 --- a/old_docs/API_docs_v65/methods/account_getPasswordSettings.md +++ b/old_docs/API_docs_v65/methods/account_getPasswordSettings.md @@ -30,13 +30,10 @@ description: account.getPasswordSettings parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v65/methods/account_getPrivacy.md b/old_docs/API_docs_v65/methods/account_getPrivacy.md index 52786b79..8bbe9795 100644 --- a/old_docs/API_docs_v65/methods/account_getPrivacy.md +++ b/old_docs/API_docs_v65/methods/account_getPrivacy.md @@ -30,13 +30,10 @@ description: account.getPrivacy parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v65/methods/account_getTmpPassword.md b/old_docs/API_docs_v65/methods/account_getTmpPassword.md index 83ab09b1..d9bd30d8 100644 --- a/old_docs/API_docs_v65/methods/account_getTmpPassword.md +++ b/old_docs/API_docs_v65/methods/account_getTmpPassword.md @@ -32,13 +32,10 @@ description: account.getTmpPassword parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v65/methods/account_getWallPapers.md b/old_docs/API_docs_v65/methods/account_getWallPapers.md index 88c8a701..a71543d0 100644 --- a/old_docs/API_docs_v65/methods/account_getWallPapers.md +++ b/old_docs/API_docs_v65/methods/account_getWallPapers.md @@ -18,13 +18,10 @@ description: account.getWallPapers parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v65/methods/account_registerDevice.md b/old_docs/API_docs_v65/methods/account_registerDevice.md index 3cc7f98d..8be04ad2 100644 --- a/old_docs/API_docs_v65/methods/account_registerDevice.md +++ b/old_docs/API_docs_v65/methods/account_registerDevice.md @@ -31,13 +31,10 @@ description: account.registerDevice parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v65/methods/account_reportPeer.md b/old_docs/API_docs_v65/methods/account_reportPeer.md index 1545c3b8..1ae9f4d4 100644 --- a/old_docs/API_docs_v65/methods/account_reportPeer.md +++ b/old_docs/API_docs_v65/methods/account_reportPeer.md @@ -31,13 +31,10 @@ description: account.reportPeer parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v65/methods/account_resetAuthorization.md b/old_docs/API_docs_v65/methods/account_resetAuthorization.md index e44334f2..0438cba3 100644 --- a/old_docs/API_docs_v65/methods/account_resetAuthorization.md +++ b/old_docs/API_docs_v65/methods/account_resetAuthorization.md @@ -30,13 +30,10 @@ description: account.resetAuthorization parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v65/methods/account_resetNotifySettings.md b/old_docs/API_docs_v65/methods/account_resetNotifySettings.md index 155ede68..92db4f4f 100644 --- a/old_docs/API_docs_v65/methods/account_resetNotifySettings.md +++ b/old_docs/API_docs_v65/methods/account_resetNotifySettings.md @@ -18,13 +18,10 @@ description: account.resetNotifySettings parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v65/methods/account_sendChangePhoneCode.md b/old_docs/API_docs_v65/methods/account_sendChangePhoneCode.md index 4be218f2..017b5f7f 100644 --- a/old_docs/API_docs_v65/methods/account_sendChangePhoneCode.md +++ b/old_docs/API_docs_v65/methods/account_sendChangePhoneCode.md @@ -32,13 +32,10 @@ description: account.sendChangePhoneCode parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v65/methods/account_sendConfirmPhoneCode.md b/old_docs/API_docs_v65/methods/account_sendConfirmPhoneCode.md index 009fcb09..3665bd50 100644 --- a/old_docs/API_docs_v65/methods/account_sendConfirmPhoneCode.md +++ b/old_docs/API_docs_v65/methods/account_sendConfirmPhoneCode.md @@ -32,13 +32,10 @@ description: account.sendConfirmPhoneCode parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v65/methods/account_setAccountTTL.md b/old_docs/API_docs_v65/methods/account_setAccountTTL.md index f06eb676..d08f59fb 100644 --- a/old_docs/API_docs_v65/methods/account_setAccountTTL.md +++ b/old_docs/API_docs_v65/methods/account_setAccountTTL.md @@ -30,13 +30,10 @@ description: account.setAccountTTL parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v65/methods/account_setPrivacy.md b/old_docs/API_docs_v65/methods/account_setPrivacy.md index 56aebbcc..401aa71c 100644 --- a/old_docs/API_docs_v65/methods/account_setPrivacy.md +++ b/old_docs/API_docs_v65/methods/account_setPrivacy.md @@ -31,13 +31,10 @@ description: account.setPrivacy parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v65/methods/account_unregisterDevice.md b/old_docs/API_docs_v65/methods/account_unregisterDevice.md index 41899b6e..283ec7d2 100644 --- a/old_docs/API_docs_v65/methods/account_unregisterDevice.md +++ b/old_docs/API_docs_v65/methods/account_unregisterDevice.md @@ -31,13 +31,10 @@ description: account.unregisterDevice parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v65/methods/account_updateDeviceLocked.md b/old_docs/API_docs_v65/methods/account_updateDeviceLocked.md index 37aeb59d..ae6125a5 100644 --- a/old_docs/API_docs_v65/methods/account_updateDeviceLocked.md +++ b/old_docs/API_docs_v65/methods/account_updateDeviceLocked.md @@ -23,13 +23,10 @@ description: account.updateDeviceLocked parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v65/methods/account_updateNotifySettings.md b/old_docs/API_docs_v65/methods/account_updateNotifySettings.md index 8389b5c2..fb096250 100644 --- a/old_docs/API_docs_v65/methods/account_updateNotifySettings.md +++ b/old_docs/API_docs_v65/methods/account_updateNotifySettings.md @@ -31,13 +31,10 @@ description: account.updateNotifySettings parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v65/methods/account_updatePasswordSettings.md b/old_docs/API_docs_v65/methods/account_updatePasswordSettings.md index b7c8da4b..ffa8dcd9 100644 --- a/old_docs/API_docs_v65/methods/account_updatePasswordSettings.md +++ b/old_docs/API_docs_v65/methods/account_updatePasswordSettings.md @@ -34,13 +34,10 @@ description: account.updatePasswordSettings parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v65/methods/account_updateProfile.md b/old_docs/API_docs_v65/methods/account_updateProfile.md index a50eaea5..b3d468d1 100644 --- a/old_docs/API_docs_v65/methods/account_updateProfile.md +++ b/old_docs/API_docs_v65/methods/account_updateProfile.md @@ -33,13 +33,10 @@ description: account.updateProfile parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v65/methods/account_updateStatus.md b/old_docs/API_docs_v65/methods/account_updateStatus.md index 7204e582..c8fa0a79 100644 --- a/old_docs/API_docs_v65/methods/account_updateStatus.md +++ b/old_docs/API_docs_v65/methods/account_updateStatus.md @@ -30,13 +30,10 @@ description: account.updateStatus parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v65/methods/account_updateUsername.md b/old_docs/API_docs_v65/methods/account_updateUsername.md index 22be2fd4..2b7576a5 100644 --- a/old_docs/API_docs_v65/methods/account_updateUsername.md +++ b/old_docs/API_docs_v65/methods/account_updateUsername.md @@ -32,13 +32,10 @@ description: account.updateUsername parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v65/methods/auth_bindTempAuthKey.md b/old_docs/API_docs_v65/methods/auth_bindTempAuthKey.md index e3d72dd5..7419abb0 100644 --- a/old_docs/API_docs_v65/methods/auth_bindTempAuthKey.md +++ b/old_docs/API_docs_v65/methods/auth_bindTempAuthKey.md @@ -35,16 +35,13 @@ description: auth.bindTempAuthKey parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v65/methods/auth_cancelCode.md b/old_docs/API_docs_v65/methods/auth_cancelCode.md index dc390329..05d927a1 100644 --- a/old_docs/API_docs_v65/methods/auth_cancelCode.md +++ b/old_docs/API_docs_v65/methods/auth_cancelCode.md @@ -31,13 +31,10 @@ description: auth.cancelCode parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v65/methods/auth_checkPassword.md b/old_docs/API_docs_v65/methods/auth_checkPassword.md index d5559186..6b6b21cc 100644 --- a/old_docs/API_docs_v65/methods/auth_checkPassword.md +++ b/old_docs/API_docs_v65/methods/auth_checkPassword.md @@ -30,13 +30,10 @@ description: auth.checkPassword parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v65/methods/auth_checkPhone.md b/old_docs/API_docs_v65/methods/auth_checkPhone.md index 3455904d..f6cac2e6 100644 --- a/old_docs/API_docs_v65/methods/auth_checkPhone.md +++ b/old_docs/API_docs_v65/methods/auth_checkPhone.md @@ -32,13 +32,10 @@ description: auth.checkPhone parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v65/methods/auth_dropTempAuthKeys.md b/old_docs/API_docs_v65/methods/auth_dropTempAuthKeys.md index aba76766..fedb7bf4 100644 --- a/old_docs/API_docs_v65/methods/auth_dropTempAuthKeys.md +++ b/old_docs/API_docs_v65/methods/auth_dropTempAuthKeys.md @@ -23,16 +23,13 @@ description: auth.dropTempAuthKeys parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v65/methods/auth_exportAuthorization.md b/old_docs/API_docs_v65/methods/auth_exportAuthorization.md index 44c45b70..cbc8203b 100644 --- a/old_docs/API_docs_v65/methods/auth_exportAuthorization.md +++ b/old_docs/API_docs_v65/methods/auth_exportAuthorization.md @@ -30,16 +30,13 @@ description: auth.exportAuthorization parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v65/methods/auth_importAuthorization.md b/old_docs/API_docs_v65/methods/auth_importAuthorization.md index e0fd534f..22166510 100644 --- a/old_docs/API_docs_v65/methods/auth_importAuthorization.md +++ b/old_docs/API_docs_v65/methods/auth_importAuthorization.md @@ -32,16 +32,13 @@ description: auth.importAuthorization parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v65/methods/auth_recoverPassword.md b/old_docs/API_docs_v65/methods/auth_recoverPassword.md index c2ce3fed..931e99fd 100644 --- a/old_docs/API_docs_v65/methods/auth_recoverPassword.md +++ b/old_docs/API_docs_v65/methods/auth_recoverPassword.md @@ -30,13 +30,10 @@ description: auth.recoverPassword parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v65/methods/auth_requestPasswordRecovery.md b/old_docs/API_docs_v65/methods/auth_requestPasswordRecovery.md index 101b1cf7..c6babcd9 100644 --- a/old_docs/API_docs_v65/methods/auth_requestPasswordRecovery.md +++ b/old_docs/API_docs_v65/methods/auth_requestPasswordRecovery.md @@ -25,13 +25,10 @@ description: auth.requestPasswordRecovery parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v65/methods/auth_resendCode.md b/old_docs/API_docs_v65/methods/auth_resendCode.md index 14d08ddd..df4803b8 100644 --- a/old_docs/API_docs_v65/methods/auth_resendCode.md +++ b/old_docs/API_docs_v65/methods/auth_resendCode.md @@ -31,13 +31,10 @@ description: auth.resendCode parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v65/methods/auth_resetAuthorizations.md b/old_docs/API_docs_v65/methods/auth_resetAuthorizations.md index 87a39a22..fe297fa7 100644 --- a/old_docs/API_docs_v65/methods/auth_resetAuthorizations.md +++ b/old_docs/API_docs_v65/methods/auth_resetAuthorizations.md @@ -25,13 +25,10 @@ description: auth.resetAuthorizations parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v65/methods/auth_sendInvites.md b/old_docs/API_docs_v65/methods/auth_sendInvites.md index 604fc65d..ad9636c5 100644 --- a/old_docs/API_docs_v65/methods/auth_sendInvites.md +++ b/old_docs/API_docs_v65/methods/auth_sendInvites.md @@ -31,13 +31,10 @@ description: auth.sendInvites parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v65/methods/bots_answerWebhookJSONQuery.md b/old_docs/API_docs_v65/methods/bots_answerWebhookJSONQuery.md index ae1efce3..d910db35 100644 --- a/old_docs/API_docs_v65/methods/bots_answerWebhookJSONQuery.md +++ b/old_docs/API_docs_v65/methods/bots_answerWebhookJSONQuery.md @@ -32,16 +32,13 @@ description: bots.answerWebhookJSONQuery parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v65/methods/bots_sendCustomRequest.md b/old_docs/API_docs_v65/methods/bots_sendCustomRequest.md index 927f18c5..abb880ef 100644 --- a/old_docs/API_docs_v65/methods/bots_sendCustomRequest.md +++ b/old_docs/API_docs_v65/methods/bots_sendCustomRequest.md @@ -31,16 +31,13 @@ description: bots.sendCustomRequest parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v65/methods/channels_checkUsername.md b/old_docs/API_docs_v65/methods/channels_checkUsername.md index d6ea876d..e29ee107 100644 --- a/old_docs/API_docs_v65/methods/channels_checkUsername.md +++ b/old_docs/API_docs_v65/methods/channels_checkUsername.md @@ -33,13 +33,10 @@ description: channels.checkUsername parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v65/methods/channels_createChannel.md b/old_docs/API_docs_v65/methods/channels_createChannel.md index 9ba02e9e..58808b73 100644 --- a/old_docs/API_docs_v65/methods/channels_createChannel.md +++ b/old_docs/API_docs_v65/methods/channels_createChannel.md @@ -34,13 +34,10 @@ description: channels.createChannel parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v65/methods/channels_deleteChannel.md b/old_docs/API_docs_v65/methods/channels_deleteChannel.md index 912ab080..532f3c6c 100644 --- a/old_docs/API_docs_v65/methods/channels_deleteChannel.md +++ b/old_docs/API_docs_v65/methods/channels_deleteChannel.md @@ -31,13 +31,10 @@ description: channels.deleteChannel parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v65/methods/channels_deleteMessages.md b/old_docs/API_docs_v65/methods/channels_deleteMessages.md index b3481294..a42a47a5 100644 --- a/old_docs/API_docs_v65/methods/channels_deleteMessages.md +++ b/old_docs/API_docs_v65/methods/channels_deleteMessages.md @@ -33,16 +33,13 @@ description: channels.deleteMessages parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v65/methods/channels_deleteUserHistory.md b/old_docs/API_docs_v65/methods/channels_deleteUserHistory.md index 66843269..73494485 100644 --- a/old_docs/API_docs_v65/methods/channels_deleteUserHistory.md +++ b/old_docs/API_docs_v65/methods/channels_deleteUserHistory.md @@ -32,13 +32,10 @@ description: channels.deleteUserHistory parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v65/methods/channels_editAbout.md b/old_docs/API_docs_v65/methods/channels_editAbout.md index 4c759a8a..1c3ce933 100644 --- a/old_docs/API_docs_v65/methods/channels_editAbout.md +++ b/old_docs/API_docs_v65/methods/channels_editAbout.md @@ -34,16 +34,13 @@ description: channels.editAbout parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v65/methods/channels_editAdmin.md b/old_docs/API_docs_v65/methods/channels_editAdmin.md index 7707bdfe..42184227 100644 --- a/old_docs/API_docs_v65/methods/channels_editAdmin.md +++ b/old_docs/API_docs_v65/methods/channels_editAdmin.md @@ -41,16 +41,13 @@ description: channels.editAdmin parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v65/methods/channels_editPhoto.md b/old_docs/API_docs_v65/methods/channels_editPhoto.md index 99873537..4a4aeb03 100644 --- a/old_docs/API_docs_v65/methods/channels_editPhoto.md +++ b/old_docs/API_docs_v65/methods/channels_editPhoto.md @@ -33,16 +33,13 @@ description: channels.editPhoto parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v65/methods/channels_editTitle.md b/old_docs/API_docs_v65/methods/channels_editTitle.md index 04e8ce12..8a69d09b 100644 --- a/old_docs/API_docs_v65/methods/channels_editTitle.md +++ b/old_docs/API_docs_v65/methods/channels_editTitle.md @@ -33,16 +33,13 @@ description: channels.editTitle parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v65/methods/channels_exportInvite.md b/old_docs/API_docs_v65/methods/channels_exportInvite.md index 2ed80f6c..79dc6401 100644 --- a/old_docs/API_docs_v65/methods/channels_exportInvite.md +++ b/old_docs/API_docs_v65/methods/channels_exportInvite.md @@ -32,16 +32,13 @@ description: channels.exportInvite parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v65/methods/channels_exportMessageLink.md b/old_docs/API_docs_v65/methods/channels_exportMessageLink.md index 9831c9c0..5b824859 100644 --- a/old_docs/API_docs_v65/methods/channels_exportMessageLink.md +++ b/old_docs/API_docs_v65/methods/channels_exportMessageLink.md @@ -31,13 +31,10 @@ description: channels.exportMessageLink parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v65/methods/channels_getAdminedPublicChannels.md b/old_docs/API_docs_v65/methods/channels_getAdminedPublicChannels.md index 7fceb026..283a9071 100644 --- a/old_docs/API_docs_v65/methods/channels_getAdminedPublicChannels.md +++ b/old_docs/API_docs_v65/methods/channels_getAdminedPublicChannels.md @@ -18,13 +18,10 @@ description: channels.getAdminedPublicChannels parameters, return type and examp ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v65/methods/channels_getChannels.md b/old_docs/API_docs_v65/methods/channels_getChannels.md index 13304938..e80aa6a6 100644 --- a/old_docs/API_docs_v65/methods/channels_getChannels.md +++ b/old_docs/API_docs_v65/methods/channels_getChannels.md @@ -32,16 +32,13 @@ description: channels.getChannels parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v65/methods/channels_getMessages.md b/old_docs/API_docs_v65/methods/channels_getMessages.md index 5480dd86..dc392773 100644 --- a/old_docs/API_docs_v65/methods/channels_getMessages.md +++ b/old_docs/API_docs_v65/methods/channels_getMessages.md @@ -33,16 +33,13 @@ description: channels.getMessages parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v65/methods/channels_getParticipant.md b/old_docs/API_docs_v65/methods/channels_getParticipant.md index 8c7e3cbd..001bf115 100644 --- a/old_docs/API_docs_v65/methods/channels_getParticipant.md +++ b/old_docs/API_docs_v65/methods/channels_getParticipant.md @@ -35,16 +35,13 @@ description: channels.getParticipant parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v65/methods/channels_inviteToChannel.md b/old_docs/API_docs_v65/methods/channels_inviteToChannel.md index cf5480e0..2448fb84 100644 --- a/old_docs/API_docs_v65/methods/channels_inviteToChannel.md +++ b/old_docs/API_docs_v65/methods/channels_inviteToChannel.md @@ -46,13 +46,10 @@ description: channels.inviteToChannel parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v65/methods/channels_joinChannel.md b/old_docs/API_docs_v65/methods/channels_joinChannel.md index f31730a1..e746cf48 100644 --- a/old_docs/API_docs_v65/methods/channels_joinChannel.md +++ b/old_docs/API_docs_v65/methods/channels_joinChannel.md @@ -32,13 +32,10 @@ description: channels.joinChannel parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v65/methods/channels_kickFromChannel.md b/old_docs/API_docs_v65/methods/channels_kickFromChannel.md index c903caa4..c85833ce 100644 --- a/old_docs/API_docs_v65/methods/channels_kickFromChannel.md +++ b/old_docs/API_docs_v65/methods/channels_kickFromChannel.md @@ -25,16 +25,13 @@ description: channels.kickFromChannel parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v65/methods/channels_leaveChannel.md b/old_docs/API_docs_v65/methods/channels_leaveChannel.md index 12902f6d..ff244ded 100644 --- a/old_docs/API_docs_v65/methods/channels_leaveChannel.md +++ b/old_docs/API_docs_v65/methods/channels_leaveChannel.md @@ -34,16 +34,13 @@ description: channels.leaveChannel parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v65/methods/channels_readHistory.md b/old_docs/API_docs_v65/methods/channels_readHistory.md index be979101..6fc6ec0e 100644 --- a/old_docs/API_docs_v65/methods/channels_readHistory.md +++ b/old_docs/API_docs_v65/methods/channels_readHistory.md @@ -32,13 +32,10 @@ description: channels.readHistory parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v65/methods/channels_reportSpam.md b/old_docs/API_docs_v65/methods/channels_reportSpam.md index 22f34443..a37a5833 100644 --- a/old_docs/API_docs_v65/methods/channels_reportSpam.md +++ b/old_docs/API_docs_v65/methods/channels_reportSpam.md @@ -33,13 +33,10 @@ description: channels.reportSpam parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v65/methods/channels_toggleInvites.md b/old_docs/API_docs_v65/methods/channels_toggleInvites.md index c2715b32..d0ae1136 100644 --- a/old_docs/API_docs_v65/methods/channels_toggleInvites.md +++ b/old_docs/API_docs_v65/methods/channels_toggleInvites.md @@ -33,13 +33,10 @@ description: channels.toggleInvites parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v65/methods/channels_toggleSignatures.md b/old_docs/API_docs_v65/methods/channels_toggleSignatures.md index a214b849..6477bc6d 100644 --- a/old_docs/API_docs_v65/methods/channels_toggleSignatures.md +++ b/old_docs/API_docs_v65/methods/channels_toggleSignatures.md @@ -31,13 +31,10 @@ description: channels.toggleSignatures parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v65/methods/channels_updatePinnedMessage.md b/old_docs/API_docs_v65/methods/channels_updatePinnedMessage.md index 6dcabf71..37a0a20d 100644 --- a/old_docs/API_docs_v65/methods/channels_updatePinnedMessage.md +++ b/old_docs/API_docs_v65/methods/channels_updatePinnedMessage.md @@ -35,16 +35,13 @@ description: channels.updatePinnedMessage parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v65/methods/channels_updateUsername.md b/old_docs/API_docs_v65/methods/channels_updateUsername.md index c2ede724..1f1f111e 100644 --- a/old_docs/API_docs_v65/methods/channels_updateUsername.md +++ b/old_docs/API_docs_v65/methods/channels_updateUsername.md @@ -35,13 +35,10 @@ description: channels.updateUsername parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v65/methods/contacts_block.md b/old_docs/API_docs_v65/methods/contacts_block.md index d9d58e37..1c7cbe26 100644 --- a/old_docs/API_docs_v65/methods/contacts_block.md +++ b/old_docs/API_docs_v65/methods/contacts_block.md @@ -30,13 +30,10 @@ description: contacts.block parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v65/methods/contacts_deleteContact.md b/old_docs/API_docs_v65/methods/contacts_deleteContact.md index cd8c17ad..987a1be0 100644 --- a/old_docs/API_docs_v65/methods/contacts_deleteContact.md +++ b/old_docs/API_docs_v65/methods/contacts_deleteContact.md @@ -30,13 +30,10 @@ description: contacts.deleteContact parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v65/methods/contacts_deleteContacts.md b/old_docs/API_docs_v65/methods/contacts_deleteContacts.md index fc65880d..67a922ed 100644 --- a/old_docs/API_docs_v65/methods/contacts_deleteContacts.md +++ b/old_docs/API_docs_v65/methods/contacts_deleteContacts.md @@ -31,13 +31,10 @@ description: contacts.deleteContacts parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v65/methods/contacts_exportCard.md b/old_docs/API_docs_v65/methods/contacts_exportCard.md index 63508076..bf6d1f9f 100644 --- a/old_docs/API_docs_v65/methods/contacts_exportCard.md +++ b/old_docs/API_docs_v65/methods/contacts_exportCard.md @@ -18,13 +18,10 @@ description: contacts.exportCard parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v65/methods/contacts_getBlocked.md b/old_docs/API_docs_v65/methods/contacts_getBlocked.md index f50792b4..faa719da 100644 --- a/old_docs/API_docs_v65/methods/contacts_getBlocked.md +++ b/old_docs/API_docs_v65/methods/contacts_getBlocked.md @@ -24,13 +24,10 @@ description: contacts.getBlocked parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v65/methods/contacts_getContacts.md b/old_docs/API_docs_v65/methods/contacts_getContacts.md index 71313bf2..a6779111 100644 --- a/old_docs/API_docs_v65/methods/contacts_getContacts.md +++ b/old_docs/API_docs_v65/methods/contacts_getContacts.md @@ -23,13 +23,10 @@ description: contacts.getContacts parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v65/methods/contacts_getStatuses.md b/old_docs/API_docs_v65/methods/contacts_getStatuses.md index d914e08d..9bb7f263 100644 --- a/old_docs/API_docs_v65/methods/contacts_getStatuses.md +++ b/old_docs/API_docs_v65/methods/contacts_getStatuses.md @@ -18,13 +18,10 @@ description: contacts.getStatuses parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v65/methods/contacts_getTopPeers.md b/old_docs/API_docs_v65/methods/contacts_getTopPeers.md index 1caa1d77..d29f6e02 100644 --- a/old_docs/API_docs_v65/methods/contacts_getTopPeers.md +++ b/old_docs/API_docs_v65/methods/contacts_getTopPeers.md @@ -37,13 +37,10 @@ description: contacts.getTopPeers parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v65/methods/contacts_importCard.md b/old_docs/API_docs_v65/methods/contacts_importCard.md index a6abf56d..7a2f34e1 100644 --- a/old_docs/API_docs_v65/methods/contacts_importCard.md +++ b/old_docs/API_docs_v65/methods/contacts_importCard.md @@ -31,13 +31,10 @@ description: contacts.importCard parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v65/methods/contacts_importContacts.md b/old_docs/API_docs_v65/methods/contacts_importContacts.md index db2051ac..2f070493 100644 --- a/old_docs/API_docs_v65/methods/contacts_importContacts.md +++ b/old_docs/API_docs_v65/methods/contacts_importContacts.md @@ -24,13 +24,10 @@ description: contacts.importContacts parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v65/methods/contacts_resetTopPeerRating.md b/old_docs/API_docs_v65/methods/contacts_resetTopPeerRating.md index 738494b2..711ea0cb 100644 --- a/old_docs/API_docs_v65/methods/contacts_resetTopPeerRating.md +++ b/old_docs/API_docs_v65/methods/contacts_resetTopPeerRating.md @@ -31,13 +31,10 @@ description: contacts.resetTopPeerRating parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v65/methods/contacts_search.md b/old_docs/API_docs_v65/methods/contacts_search.md index 0203b160..70a0635e 100644 --- a/old_docs/API_docs_v65/methods/contacts_search.md +++ b/old_docs/API_docs_v65/methods/contacts_search.md @@ -33,13 +33,10 @@ description: contacts.search parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v65/methods/contacts_unblock.md b/old_docs/API_docs_v65/methods/contacts_unblock.md index a1977c24..9c01e42a 100644 --- a/old_docs/API_docs_v65/methods/contacts_unblock.md +++ b/old_docs/API_docs_v65/methods/contacts_unblock.md @@ -30,13 +30,10 @@ description: contacts.unblock parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v65/methods/contest_saveDeveloperInfo.md b/old_docs/API_docs_v65/methods/contest_saveDeveloperInfo.md index eca7bfcf..c0bb9054 100644 --- a/old_docs/API_docs_v65/methods/contest_saveDeveloperInfo.md +++ b/old_docs/API_docs_v65/methods/contest_saveDeveloperInfo.md @@ -27,16 +27,13 @@ description: contest.saveDeveloperInfo parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v65/methods/destroy_auth_key.md b/old_docs/API_docs_v65/methods/destroy_auth_key.md index 7d39ceec..1803e375 100644 --- a/old_docs/API_docs_v65/methods/destroy_auth_key.md +++ b/old_docs/API_docs_v65/methods/destroy_auth_key.md @@ -18,16 +18,13 @@ description: destroy_auth_key parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v65/methods/destroy_session.md b/old_docs/API_docs_v65/methods/destroy_session.md index 0b732694..39aa2c6e 100644 --- a/old_docs/API_docs_v65/methods/destroy_session.md +++ b/old_docs/API_docs_v65/methods/destroy_session.md @@ -23,16 +23,13 @@ description: destroy_session parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v65/methods/get_future_salts.md b/old_docs/API_docs_v65/methods/get_future_salts.md index d3b306ce..fedf036c 100644 --- a/old_docs/API_docs_v65/methods/get_future_salts.md +++ b/old_docs/API_docs_v65/methods/get_future_salts.md @@ -23,16 +23,13 @@ description: get_future_salts parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v65/methods/help_getAppChangelog.md b/old_docs/API_docs_v65/methods/help_getAppChangelog.md index 9d8c3203..59916787 100644 --- a/old_docs/API_docs_v65/methods/help_getAppChangelog.md +++ b/old_docs/API_docs_v65/methods/help_getAppChangelog.md @@ -23,13 +23,10 @@ description: help.getAppChangelog parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v65/methods/help_getAppUpdate.md b/old_docs/API_docs_v65/methods/help_getAppUpdate.md index 0871f59d..89ff22c3 100644 --- a/old_docs/API_docs_v65/methods/help_getAppUpdate.md +++ b/old_docs/API_docs_v65/methods/help_getAppUpdate.md @@ -18,13 +18,10 @@ description: help.getAppUpdate parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v65/methods/help_getConfig.md b/old_docs/API_docs_v65/methods/help_getConfig.md index e3648b5a..bb51b362 100644 --- a/old_docs/API_docs_v65/methods/help_getConfig.md +++ b/old_docs/API_docs_v65/methods/help_getConfig.md @@ -25,16 +25,13 @@ description: help.getConfig parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v65/methods/help_getInviteText.md b/old_docs/API_docs_v65/methods/help_getInviteText.md index 4bcbb77d..6d2674d6 100644 --- a/old_docs/API_docs_v65/methods/help_getInviteText.md +++ b/old_docs/API_docs_v65/methods/help_getInviteText.md @@ -18,13 +18,10 @@ description: help.getInviteText parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v65/methods/help_getNearestDc.md b/old_docs/API_docs_v65/methods/help_getNearestDc.md index c6f5c555..6d8ed3f7 100644 --- a/old_docs/API_docs_v65/methods/help_getNearestDc.md +++ b/old_docs/API_docs_v65/methods/help_getNearestDc.md @@ -18,13 +18,10 @@ description: help.getNearestDc parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v65/methods/help_getSupport.md b/old_docs/API_docs_v65/methods/help_getSupport.md index 209edf03..ca8db03c 100644 --- a/old_docs/API_docs_v65/methods/help_getSupport.md +++ b/old_docs/API_docs_v65/methods/help_getSupport.md @@ -18,13 +18,10 @@ description: help.getSupport parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v65/methods/help_getTermsOfService.md b/old_docs/API_docs_v65/methods/help_getTermsOfService.md index 8bc2e2fa..eb686506 100644 --- a/old_docs/API_docs_v65/methods/help_getTermsOfService.md +++ b/old_docs/API_docs_v65/methods/help_getTermsOfService.md @@ -18,13 +18,10 @@ description: help.getTermsOfService parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v65/methods/help_saveAppLog.md b/old_docs/API_docs_v65/methods/help_saveAppLog.md index 4f06434c..741b9aa1 100644 --- a/old_docs/API_docs_v65/methods/help_saveAppLog.md +++ b/old_docs/API_docs_v65/methods/help_saveAppLog.md @@ -23,13 +23,10 @@ description: help.saveAppLog parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v65/methods/help_setBotUpdatesStatus.md b/old_docs/API_docs_v65/methods/help_setBotUpdatesStatus.md index 55e1d2fe..470187a0 100644 --- a/old_docs/API_docs_v65/methods/help_setBotUpdatesStatus.md +++ b/old_docs/API_docs_v65/methods/help_setBotUpdatesStatus.md @@ -24,16 +24,13 @@ description: help.setBotUpdatesStatus parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v65/methods/initConnection.md b/old_docs/API_docs_v65/methods/initConnection.md index 0d22a1cb..c0307677 100644 --- a/old_docs/API_docs_v65/methods/initConnection.md +++ b/old_docs/API_docs_v65/methods/initConnection.md @@ -36,16 +36,13 @@ description: initConnection parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v65/methods/invokeAfterMsg.md b/old_docs/API_docs_v65/methods/invokeAfterMsg.md index c139fe8c..a382429e 100644 --- a/old_docs/API_docs_v65/methods/invokeAfterMsg.md +++ b/old_docs/API_docs_v65/methods/invokeAfterMsg.md @@ -24,16 +24,13 @@ description: invokeAfterMsg parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v65/methods/invokeAfterMsgs.md b/old_docs/API_docs_v65/methods/invokeAfterMsgs.md index 35004296..169eedaf 100644 --- a/old_docs/API_docs_v65/methods/invokeAfterMsgs.md +++ b/old_docs/API_docs_v65/methods/invokeAfterMsgs.md @@ -24,16 +24,13 @@ description: invokeAfterMsgs parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v65/methods/invokeWithLayer.md b/old_docs/API_docs_v65/methods/invokeWithLayer.md index 706036c4..d9a2c74c 100644 --- a/old_docs/API_docs_v65/methods/invokeWithLayer.md +++ b/old_docs/API_docs_v65/methods/invokeWithLayer.md @@ -41,16 +41,13 @@ description: invokeWithLayer parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v65/methods/invokeWithoutUpdates.md b/old_docs/API_docs_v65/methods/invokeWithoutUpdates.md index 10c6bfcf..f7d01765 100644 --- a/old_docs/API_docs_v65/methods/invokeWithoutUpdates.md +++ b/old_docs/API_docs_v65/methods/invokeWithoutUpdates.md @@ -23,16 +23,13 @@ description: invokeWithoutUpdates parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v65/methods/messages_addChatUser.md b/old_docs/API_docs_v65/methods/messages_addChatUser.md index 00da5a61..b9e6243d 100644 --- a/old_docs/API_docs_v65/methods/messages_addChatUser.md +++ b/old_docs/API_docs_v65/methods/messages_addChatUser.md @@ -40,13 +40,10 @@ description: messages.addChatUser parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v65/methods/messages_checkChatInvite.md b/old_docs/API_docs_v65/methods/messages_checkChatInvite.md index c5eb1c06..c4489469 100644 --- a/old_docs/API_docs_v65/methods/messages_checkChatInvite.md +++ b/old_docs/API_docs_v65/methods/messages_checkChatInvite.md @@ -32,13 +32,10 @@ description: messages.checkChatInvite parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v65/methods/messages_clearRecentStickers.md b/old_docs/API_docs_v65/methods/messages_clearRecentStickers.md index dda76d14..ae45b249 100644 --- a/old_docs/API_docs_v65/methods/messages_clearRecentStickers.md +++ b/old_docs/API_docs_v65/methods/messages_clearRecentStickers.md @@ -23,13 +23,10 @@ description: messages.clearRecentStickers parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v65/methods/messages_createChat.md b/old_docs/API_docs_v65/methods/messages_createChat.md index c643a022..c6c8f420 100644 --- a/old_docs/API_docs_v65/methods/messages_createChat.md +++ b/old_docs/API_docs_v65/methods/messages_createChat.md @@ -32,13 +32,10 @@ description: messages.createChat parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v65/methods/messages_deleteChatUser.md b/old_docs/API_docs_v65/methods/messages_deleteChatUser.md index 3d75d9cf..4b8c2aa5 100644 --- a/old_docs/API_docs_v65/methods/messages_deleteChatUser.md +++ b/old_docs/API_docs_v65/methods/messages_deleteChatUser.md @@ -33,16 +33,13 @@ description: messages.deleteChatUser parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v65/methods/messages_deleteHistory.md b/old_docs/API_docs_v65/methods/messages_deleteHistory.md index ce6ba6e7..ebe2c89c 100644 --- a/old_docs/API_docs_v65/methods/messages_deleteHistory.md +++ b/old_docs/API_docs_v65/methods/messages_deleteHistory.md @@ -32,13 +32,10 @@ description: messages.deleteHistory parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v65/methods/messages_deleteMessages.md b/old_docs/API_docs_v65/methods/messages_deleteMessages.md index 2b88a73f..5472cc72 100644 --- a/old_docs/API_docs_v65/methods/messages_deleteMessages.md +++ b/old_docs/API_docs_v65/methods/messages_deleteMessages.md @@ -31,16 +31,13 @@ description: messages.deleteMessages parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v65/methods/messages_editChatAdmin.md b/old_docs/API_docs_v65/methods/messages_editChatAdmin.md index e64d9da5..1b3ffa9f 100644 --- a/old_docs/API_docs_v65/methods/messages_editChatAdmin.md +++ b/old_docs/API_docs_v65/methods/messages_editChatAdmin.md @@ -32,13 +32,10 @@ description: messages.editChatAdmin parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v65/methods/messages_editChatPhoto.md b/old_docs/API_docs_v65/methods/messages_editChatPhoto.md index d225962d..8c5d9d47 100644 --- a/old_docs/API_docs_v65/methods/messages_editChatPhoto.md +++ b/old_docs/API_docs_v65/methods/messages_editChatPhoto.md @@ -35,16 +35,13 @@ description: messages.editChatPhoto parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v65/methods/messages_editChatTitle.md b/old_docs/API_docs_v65/methods/messages_editChatTitle.md index 5cb1c6d7..238c6d72 100644 --- a/old_docs/API_docs_v65/methods/messages_editChatTitle.md +++ b/old_docs/API_docs_v65/methods/messages_editChatTitle.md @@ -32,16 +32,13 @@ description: messages.editChatTitle parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v65/methods/messages_editInlineBotMessage.md b/old_docs/API_docs_v65/methods/messages_editInlineBotMessage.md index 621c81a3..c3489f9d 100644 --- a/old_docs/API_docs_v65/methods/messages_editInlineBotMessage.md +++ b/old_docs/API_docs_v65/methods/messages_editInlineBotMessage.md @@ -36,16 +36,13 @@ description: messages.editInlineBotMessage parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v65/methods/messages_editMessage.md b/old_docs/API_docs_v65/methods/messages_editMessage.md index b8cdda81..3a23c9ac 100644 --- a/old_docs/API_docs_v65/methods/messages_editMessage.md +++ b/old_docs/API_docs_v65/methods/messages_editMessage.md @@ -45,16 +45,13 @@ description: messages.editMessage parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v65/methods/messages_exportChatInvite.md b/old_docs/API_docs_v65/methods/messages_exportChatInvite.md index 4a6e28ff..78f2ff86 100644 --- a/old_docs/API_docs_v65/methods/messages_exportChatInvite.md +++ b/old_docs/API_docs_v65/methods/messages_exportChatInvite.md @@ -30,13 +30,10 @@ description: messages.exportChatInvite parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v65/methods/messages_forwardMessage.md b/old_docs/API_docs_v65/methods/messages_forwardMessage.md index 4e2362db..fbdbc955 100644 --- a/old_docs/API_docs_v65/methods/messages_forwardMessage.md +++ b/old_docs/API_docs_v65/methods/messages_forwardMessage.md @@ -34,16 +34,13 @@ description: messages.forwardMessage parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v65/methods/messages_forwardMessages.md b/old_docs/API_docs_v65/methods/messages_forwardMessages.md index b5e9b7e7..5a609390 100644 --- a/old_docs/API_docs_v65/methods/messages_forwardMessages.md +++ b/old_docs/API_docs_v65/methods/messages_forwardMessages.md @@ -56,16 +56,13 @@ description: messages.forwardMessages parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v65/methods/messages_getAllChats.md b/old_docs/API_docs_v65/methods/messages_getAllChats.md index c5037003..babcf17d 100644 --- a/old_docs/API_docs_v65/methods/messages_getAllChats.md +++ b/old_docs/API_docs_v65/methods/messages_getAllChats.md @@ -23,13 +23,10 @@ description: messages.getAllChats parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v65/methods/messages_getAllDrafts.md b/old_docs/API_docs_v65/methods/messages_getAllDrafts.md index cc447864..8550c5b8 100644 --- a/old_docs/API_docs_v65/methods/messages_getAllDrafts.md +++ b/old_docs/API_docs_v65/methods/messages_getAllDrafts.md @@ -18,13 +18,10 @@ description: messages.getAllDrafts parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v65/methods/messages_getAllStickers.md b/old_docs/API_docs_v65/methods/messages_getAllStickers.md index dc9e2432..034438a5 100644 --- a/old_docs/API_docs_v65/methods/messages_getAllStickers.md +++ b/old_docs/API_docs_v65/methods/messages_getAllStickers.md @@ -23,13 +23,10 @@ description: messages.getAllStickers parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v65/methods/messages_getArchivedStickers.md b/old_docs/API_docs_v65/methods/messages_getArchivedStickers.md index dddcc748..cdb7f0af 100644 --- a/old_docs/API_docs_v65/methods/messages_getArchivedStickers.md +++ b/old_docs/API_docs_v65/methods/messages_getArchivedStickers.md @@ -25,13 +25,10 @@ description: messages.getArchivedStickers parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v65/methods/messages_getAttachedStickers.md b/old_docs/API_docs_v65/methods/messages_getAttachedStickers.md index 250db6a8..79d4e30d 100644 --- a/old_docs/API_docs_v65/methods/messages_getAttachedStickers.md +++ b/old_docs/API_docs_v65/methods/messages_getAttachedStickers.md @@ -23,13 +23,10 @@ description: messages.getAttachedStickers parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v65/methods/messages_getBotCallbackAnswer.md b/old_docs/API_docs_v65/methods/messages_getBotCallbackAnswer.md index e905723f..afa5358c 100644 --- a/old_docs/API_docs_v65/methods/messages_getBotCallbackAnswer.md +++ b/old_docs/API_docs_v65/methods/messages_getBotCallbackAnswer.md @@ -37,13 +37,10 @@ description: messages.getBotCallbackAnswer parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v65/methods/messages_getChats.md b/old_docs/API_docs_v65/methods/messages_getChats.md index 6fa30cbd..c322613d 100644 --- a/old_docs/API_docs_v65/methods/messages_getChats.md +++ b/old_docs/API_docs_v65/methods/messages_getChats.md @@ -31,16 +31,13 @@ description: messages.getChats parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v65/methods/messages_getCommonChats.md b/old_docs/API_docs_v65/methods/messages_getCommonChats.md index 0c601ca9..8c9e2834 100644 --- a/old_docs/API_docs_v65/methods/messages_getCommonChats.md +++ b/old_docs/API_docs_v65/methods/messages_getCommonChats.md @@ -32,13 +32,10 @@ description: messages.getCommonChats parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v65/methods/messages_getDhConfig.md b/old_docs/API_docs_v65/methods/messages_getDhConfig.md index aac3354d..f97684d2 100644 --- a/old_docs/API_docs_v65/methods/messages_getDhConfig.md +++ b/old_docs/API_docs_v65/methods/messages_getDhConfig.md @@ -31,13 +31,10 @@ description: messages.getDhConfig parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v65/methods/messages_getDialogs.md b/old_docs/API_docs_v65/methods/messages_getDialogs.md index 131b75b7..cef5ecc6 100644 --- a/old_docs/API_docs_v65/methods/messages_getDialogs.md +++ b/old_docs/API_docs_v65/methods/messages_getDialogs.md @@ -37,13 +37,10 @@ description: messages.getDialogs parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v65/methods/messages_getDocumentByHash.md b/old_docs/API_docs_v65/methods/messages_getDocumentByHash.md index dda54bdd..3902ac44 100644 --- a/old_docs/API_docs_v65/methods/messages_getDocumentByHash.md +++ b/old_docs/API_docs_v65/methods/messages_getDocumentByHash.md @@ -32,16 +32,13 @@ description: messages.getDocumentByHash parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v65/methods/messages_getFeaturedStickers.md b/old_docs/API_docs_v65/methods/messages_getFeaturedStickers.md index 9573464a..5aad1810 100644 --- a/old_docs/API_docs_v65/methods/messages_getFeaturedStickers.md +++ b/old_docs/API_docs_v65/methods/messages_getFeaturedStickers.md @@ -23,13 +23,10 @@ description: messages.getFeaturedStickers parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v65/methods/messages_getGameHighScores.md b/old_docs/API_docs_v65/methods/messages_getGameHighScores.md index 935bb95a..d8a94ae3 100644 --- a/old_docs/API_docs_v65/methods/messages_getGameHighScores.md +++ b/old_docs/API_docs_v65/methods/messages_getGameHighScores.md @@ -33,16 +33,13 @@ description: messages.getGameHighScores parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v65/methods/messages_getHistory.md b/old_docs/API_docs_v65/methods/messages_getHistory.md index a48a465e..4c3ef2ee 100644 --- a/old_docs/API_docs_v65/methods/messages_getHistory.md +++ b/old_docs/API_docs_v65/methods/messages_getHistory.md @@ -41,13 +41,10 @@ description: messages.getHistory parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v65/methods/messages_getInlineBotResults.md b/old_docs/API_docs_v65/methods/messages_getInlineBotResults.md index 61366580..61b927fc 100644 --- a/old_docs/API_docs_v65/methods/messages_getInlineBotResults.md +++ b/old_docs/API_docs_v65/methods/messages_getInlineBotResults.md @@ -37,13 +37,10 @@ description: messages.getInlineBotResults parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v65/methods/messages_getInlineGameHighScores.md b/old_docs/API_docs_v65/methods/messages_getInlineGameHighScores.md index 7cc04d0d..40eff3a9 100644 --- a/old_docs/API_docs_v65/methods/messages_getInlineGameHighScores.md +++ b/old_docs/API_docs_v65/methods/messages_getInlineGameHighScores.md @@ -32,16 +32,13 @@ description: messages.getInlineGameHighScores parameters, return type and exampl ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v65/methods/messages_getMaskStickers.md b/old_docs/API_docs_v65/methods/messages_getMaskStickers.md index 0ab194df..ca964647 100644 --- a/old_docs/API_docs_v65/methods/messages_getMaskStickers.md +++ b/old_docs/API_docs_v65/methods/messages_getMaskStickers.md @@ -23,13 +23,10 @@ description: messages.getMaskStickers parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v65/methods/messages_getMessageEditData.md b/old_docs/API_docs_v65/methods/messages_getMessageEditData.md index a8b135c6..15085153 100644 --- a/old_docs/API_docs_v65/methods/messages_getMessageEditData.md +++ b/old_docs/API_docs_v65/methods/messages_getMessageEditData.md @@ -32,13 +32,10 @@ description: messages.getMessageEditData parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v65/methods/messages_getMessages.md b/old_docs/API_docs_v65/methods/messages_getMessages.md index 5a970246..787c46dd 100644 --- a/old_docs/API_docs_v65/methods/messages_getMessages.md +++ b/old_docs/API_docs_v65/methods/messages_getMessages.md @@ -23,16 +23,13 @@ description: messages.getMessages parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v65/methods/messages_getMessagesViews.md b/old_docs/API_docs_v65/methods/messages_getMessagesViews.md index 263f3f95..de5692dc 100644 --- a/old_docs/API_docs_v65/methods/messages_getMessagesViews.md +++ b/old_docs/API_docs_v65/methods/messages_getMessagesViews.md @@ -34,13 +34,10 @@ description: messages.getMessagesViews parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v65/methods/messages_getPeerDialogs.md b/old_docs/API_docs_v65/methods/messages_getPeerDialogs.md index 3da60038..226948ae 100644 --- a/old_docs/API_docs_v65/methods/messages_getPeerDialogs.md +++ b/old_docs/API_docs_v65/methods/messages_getPeerDialogs.md @@ -31,13 +31,10 @@ description: messages.getPeerDialogs parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v65/methods/messages_getPeerSettings.md b/old_docs/API_docs_v65/methods/messages_getPeerSettings.md index d3e3cfc3..2a92f2da 100644 --- a/old_docs/API_docs_v65/methods/messages_getPeerSettings.md +++ b/old_docs/API_docs_v65/methods/messages_getPeerSettings.md @@ -31,13 +31,10 @@ description: messages.getPeerSettings parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v65/methods/messages_getPinnedDialogs.md b/old_docs/API_docs_v65/methods/messages_getPinnedDialogs.md index 110eab05..ec744f01 100644 --- a/old_docs/API_docs_v65/methods/messages_getPinnedDialogs.md +++ b/old_docs/API_docs_v65/methods/messages_getPinnedDialogs.md @@ -18,13 +18,10 @@ description: messages.getPinnedDialogs parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v65/methods/messages_getRecentStickers.md b/old_docs/API_docs_v65/methods/messages_getRecentStickers.md index 10d1a0df..a6ae162f 100644 --- a/old_docs/API_docs_v65/methods/messages_getRecentStickers.md +++ b/old_docs/API_docs_v65/methods/messages_getRecentStickers.md @@ -24,13 +24,10 @@ description: messages.getRecentStickers parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v65/methods/messages_getSavedGifs.md b/old_docs/API_docs_v65/methods/messages_getSavedGifs.md index 7cce4ffe..4986d812 100644 --- a/old_docs/API_docs_v65/methods/messages_getSavedGifs.md +++ b/old_docs/API_docs_v65/methods/messages_getSavedGifs.md @@ -23,13 +23,10 @@ description: messages.getSavedGifs parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v65/methods/messages_getStickerSet.md b/old_docs/API_docs_v65/methods/messages_getStickerSet.md index 59f33916..b480e0fe 100644 --- a/old_docs/API_docs_v65/methods/messages_getStickerSet.md +++ b/old_docs/API_docs_v65/methods/messages_getStickerSet.md @@ -30,16 +30,13 @@ description: messages.getStickerSet parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v65/methods/messages_getWebPage.md b/old_docs/API_docs_v65/methods/messages_getWebPage.md index 35f6e545..e886b020 100644 --- a/old_docs/API_docs_v65/methods/messages_getWebPage.md +++ b/old_docs/API_docs_v65/methods/messages_getWebPage.md @@ -31,13 +31,10 @@ description: messages.getWebPage parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v65/methods/messages_getWebPagePreview.md b/old_docs/API_docs_v65/methods/messages_getWebPagePreview.md index a89600b1..d3908933 100644 --- a/old_docs/API_docs_v65/methods/messages_getWebPagePreview.md +++ b/old_docs/API_docs_v65/methods/messages_getWebPagePreview.md @@ -23,13 +23,10 @@ description: messages.getWebPagePreview parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v65/methods/messages_hideReportSpam.md b/old_docs/API_docs_v65/methods/messages_hideReportSpam.md index 2dfe4dd7..5635665c 100644 --- a/old_docs/API_docs_v65/methods/messages_hideReportSpam.md +++ b/old_docs/API_docs_v65/methods/messages_hideReportSpam.md @@ -30,13 +30,10 @@ description: messages.hideReportSpam parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v65/methods/messages_importChatInvite.md b/old_docs/API_docs_v65/methods/messages_importChatInvite.md index 9d77304d..9dcfa56d 100644 --- a/old_docs/API_docs_v65/methods/messages_importChatInvite.md +++ b/old_docs/API_docs_v65/methods/messages_importChatInvite.md @@ -36,13 +36,10 @@ description: messages.importChatInvite parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v65/methods/messages_installStickerSet.md b/old_docs/API_docs_v65/methods/messages_installStickerSet.md index 3dde52a7..016d5ece 100644 --- a/old_docs/API_docs_v65/methods/messages_installStickerSet.md +++ b/old_docs/API_docs_v65/methods/messages_installStickerSet.md @@ -31,13 +31,10 @@ description: messages.installStickerSet parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v65/methods/messages_migrateChat.md b/old_docs/API_docs_v65/methods/messages_migrateChat.md index 22d2fbf0..a8274e70 100644 --- a/old_docs/API_docs_v65/methods/messages_migrateChat.md +++ b/old_docs/API_docs_v65/methods/messages_migrateChat.md @@ -32,13 +32,10 @@ description: messages.migrateChat parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v65/methods/messages_readEncryptedHistory.md b/old_docs/API_docs_v65/methods/messages_readEncryptedHistory.md index 766ee07d..f38f6b07 100644 --- a/old_docs/API_docs_v65/methods/messages_readEncryptedHistory.md +++ b/old_docs/API_docs_v65/methods/messages_readEncryptedHistory.md @@ -31,16 +31,13 @@ description: messages.readEncryptedHistory parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v65/methods/messages_readFeaturedStickers.md b/old_docs/API_docs_v65/methods/messages_readFeaturedStickers.md index c7ce7aca..02055bf3 100644 --- a/old_docs/API_docs_v65/methods/messages_readFeaturedStickers.md +++ b/old_docs/API_docs_v65/methods/messages_readFeaturedStickers.md @@ -23,13 +23,10 @@ description: messages.readFeaturedStickers parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v65/methods/messages_readHistory.md b/old_docs/API_docs_v65/methods/messages_readHistory.md index 1aa7830a..fef62130 100644 --- a/old_docs/API_docs_v65/methods/messages_readHistory.md +++ b/old_docs/API_docs_v65/methods/messages_readHistory.md @@ -32,13 +32,10 @@ description: messages.readHistory parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v65/methods/messages_readMessageContents.md b/old_docs/API_docs_v65/methods/messages_readMessageContents.md index 4b1abda0..7a6055fc 100644 --- a/old_docs/API_docs_v65/methods/messages_readMessageContents.md +++ b/old_docs/API_docs_v65/methods/messages_readMessageContents.md @@ -23,13 +23,10 @@ description: messages.readMessageContents parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v65/methods/messages_receivedMessages.md b/old_docs/API_docs_v65/methods/messages_receivedMessages.md index 588ac5cf..e2cf3a2f 100644 --- a/old_docs/API_docs_v65/methods/messages_receivedMessages.md +++ b/old_docs/API_docs_v65/methods/messages_receivedMessages.md @@ -23,13 +23,10 @@ description: messages.receivedMessages parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v65/methods/messages_receivedQueue.md b/old_docs/API_docs_v65/methods/messages_receivedQueue.md index 3c7f1d4f..38f504b3 100644 --- a/old_docs/API_docs_v65/methods/messages_receivedQueue.md +++ b/old_docs/API_docs_v65/methods/messages_receivedQueue.md @@ -30,16 +30,13 @@ description: messages.receivedQueue parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v65/methods/messages_reorderPinnedDialogs.md b/old_docs/API_docs_v65/methods/messages_reorderPinnedDialogs.md index 30102fd7..b4bfb84f 100644 --- a/old_docs/API_docs_v65/methods/messages_reorderPinnedDialogs.md +++ b/old_docs/API_docs_v65/methods/messages_reorderPinnedDialogs.md @@ -31,13 +31,10 @@ description: messages.reorderPinnedDialogs parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v65/methods/messages_reorderStickerSets.md b/old_docs/API_docs_v65/methods/messages_reorderStickerSets.md index 5c47f174..fa094550 100644 --- a/old_docs/API_docs_v65/methods/messages_reorderStickerSets.md +++ b/old_docs/API_docs_v65/methods/messages_reorderStickerSets.md @@ -24,13 +24,10 @@ description: messages.reorderStickerSets parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v65/methods/messages_reportEncryptedSpam.md b/old_docs/API_docs_v65/methods/messages_reportEncryptedSpam.md index 30ef3473..aed7a891 100644 --- a/old_docs/API_docs_v65/methods/messages_reportEncryptedSpam.md +++ b/old_docs/API_docs_v65/methods/messages_reportEncryptedSpam.md @@ -30,13 +30,10 @@ description: messages.reportEncryptedSpam parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v65/methods/messages_reportSpam.md b/old_docs/API_docs_v65/methods/messages_reportSpam.md index bfadb9ab..08c96d44 100644 --- a/old_docs/API_docs_v65/methods/messages_reportSpam.md +++ b/old_docs/API_docs_v65/methods/messages_reportSpam.md @@ -30,13 +30,10 @@ description: messages.reportSpam parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v65/methods/messages_saveDraft.md b/old_docs/API_docs_v65/methods/messages_saveDraft.md index 42308b46..f68090c0 100644 --- a/old_docs/API_docs_v65/methods/messages_saveDraft.md +++ b/old_docs/API_docs_v65/methods/messages_saveDraft.md @@ -35,13 +35,10 @@ description: messages.saveDraft parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v65/methods/messages_saveGif.md b/old_docs/API_docs_v65/methods/messages_saveGif.md index 31e48632..d86d539a 100644 --- a/old_docs/API_docs_v65/methods/messages_saveGif.md +++ b/old_docs/API_docs_v65/methods/messages_saveGif.md @@ -31,13 +31,10 @@ description: messages.saveGif parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v65/methods/messages_saveRecentSticker.md b/old_docs/API_docs_v65/methods/messages_saveRecentSticker.md index 8d45be5e..029ca763 100644 --- a/old_docs/API_docs_v65/methods/messages_saveRecentSticker.md +++ b/old_docs/API_docs_v65/methods/messages_saveRecentSticker.md @@ -32,13 +32,10 @@ description: messages.saveRecentSticker parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v65/methods/messages_search.md b/old_docs/API_docs_v65/methods/messages_search.md index 87073d00..1e809cf2 100644 --- a/old_docs/API_docs_v65/methods/messages_search.md +++ b/old_docs/API_docs_v65/methods/messages_search.md @@ -43,13 +43,10 @@ description: messages.search parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v65/methods/messages_searchGifs.md b/old_docs/API_docs_v65/methods/messages_searchGifs.md index 3f4c4838..dd804c99 100644 --- a/old_docs/API_docs_v65/methods/messages_searchGifs.md +++ b/old_docs/API_docs_v65/methods/messages_searchGifs.md @@ -31,13 +31,10 @@ description: messages.searchGifs parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v65/methods/messages_searchGlobal.md b/old_docs/API_docs_v65/methods/messages_searchGlobal.md index 0553dd7a..4b45eed2 100644 --- a/old_docs/API_docs_v65/methods/messages_searchGlobal.md +++ b/old_docs/API_docs_v65/methods/messages_searchGlobal.md @@ -34,13 +34,10 @@ description: messages.searchGlobal parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v65/methods/messages_sendEncrypted.md b/old_docs/API_docs_v65/methods/messages_sendEncrypted.md index 82eeec92..ba9f796b 100644 --- a/old_docs/API_docs_v65/methods/messages_sendEncrypted.md +++ b/old_docs/API_docs_v65/methods/messages_sendEncrypted.md @@ -34,16 +34,13 @@ description: messages.sendEncrypted parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v65/methods/messages_sendEncryptedFile.md b/old_docs/API_docs_v65/methods/messages_sendEncryptedFile.md index 8f7a73d9..db16bf2d 100644 --- a/old_docs/API_docs_v65/methods/messages_sendEncryptedFile.md +++ b/old_docs/API_docs_v65/methods/messages_sendEncryptedFile.md @@ -32,16 +32,13 @@ description: messages.sendEncryptedFile parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v65/methods/messages_sendEncryptedService.md b/old_docs/API_docs_v65/methods/messages_sendEncryptedService.md index d427f6c3..fd4e2627 100644 --- a/old_docs/API_docs_v65/methods/messages_sendEncryptedService.md +++ b/old_docs/API_docs_v65/methods/messages_sendEncryptedService.md @@ -34,16 +34,13 @@ description: messages.sendEncryptedService parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v65/methods/messages_sendInlineBotResult.md b/old_docs/API_docs_v65/methods/messages_sendInlineBotResult.md index 6aeeb67d..d974fe69 100644 --- a/old_docs/API_docs_v65/methods/messages_sendInlineBotResult.md +++ b/old_docs/API_docs_v65/methods/messages_sendInlineBotResult.md @@ -39,13 +39,10 @@ description: messages.sendInlineBotResult parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v65/methods/messages_sendMedia.md b/old_docs/API_docs_v65/methods/messages_sendMedia.md index b3ceb5d4..b58bf325 100644 --- a/old_docs/API_docs_v65/methods/messages_sendMedia.md +++ b/old_docs/API_docs_v65/methods/messages_sendMedia.md @@ -59,16 +59,13 @@ description: messages.sendMedia parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v65/methods/messages_sendMessage.md b/old_docs/API_docs_v65/methods/messages_sendMessage.md index 60b50412..3a515129 100644 --- a/old_docs/API_docs_v65/methods/messages_sendMessage.md +++ b/old_docs/API_docs_v65/methods/messages_sendMessage.md @@ -58,16 +58,13 @@ description: messages.sendMessage parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v65/methods/messages_setBotCallbackAnswer.md b/old_docs/API_docs_v65/methods/messages_setBotCallbackAnswer.md index 2c51854f..2901a558 100644 --- a/old_docs/API_docs_v65/methods/messages_setBotCallbackAnswer.md +++ b/old_docs/API_docs_v65/methods/messages_setBotCallbackAnswer.md @@ -34,16 +34,13 @@ description: messages.setBotCallbackAnswer parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v65/methods/messages_setBotPrecheckoutResults.md b/old_docs/API_docs_v65/methods/messages_setBotPrecheckoutResults.md index 25ed5ed5..5666e9ff 100644 --- a/old_docs/API_docs_v65/methods/messages_setBotPrecheckoutResults.md +++ b/old_docs/API_docs_v65/methods/messages_setBotPrecheckoutResults.md @@ -32,16 +32,13 @@ description: messages.setBotPrecheckoutResults parameters, return type and examp ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v65/methods/messages_setBotShippingResults.md b/old_docs/API_docs_v65/methods/messages_setBotShippingResults.md index 49ac2896..95376b64 100644 --- a/old_docs/API_docs_v65/methods/messages_setBotShippingResults.md +++ b/old_docs/API_docs_v65/methods/messages_setBotShippingResults.md @@ -32,16 +32,13 @@ description: messages.setBotShippingResults parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v65/methods/messages_setEncryptedTyping.md b/old_docs/API_docs_v65/methods/messages_setEncryptedTyping.md index a05b94dd..aeae6ff7 100644 --- a/old_docs/API_docs_v65/methods/messages_setEncryptedTyping.md +++ b/old_docs/API_docs_v65/methods/messages_setEncryptedTyping.md @@ -31,13 +31,10 @@ description: messages.setEncryptedTyping parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v65/methods/messages_setGameScore.md b/old_docs/API_docs_v65/methods/messages_setGameScore.md index 3137f7c9..c8ef5c49 100644 --- a/old_docs/API_docs_v65/methods/messages_setGameScore.md +++ b/old_docs/API_docs_v65/methods/messages_setGameScore.md @@ -36,16 +36,13 @@ description: messages.setGameScore parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v65/methods/messages_setInlineBotResults.md b/old_docs/API_docs_v65/methods/messages_setInlineBotResults.md index 8b5625f3..8b49c4c7 100644 --- a/old_docs/API_docs_v65/methods/messages_setInlineBotResults.md +++ b/old_docs/API_docs_v65/methods/messages_setInlineBotResults.md @@ -46,16 +46,13 @@ description: messages.setInlineBotResults parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v65/methods/messages_setInlineGameScore.md b/old_docs/API_docs_v65/methods/messages_setInlineGameScore.md index 36752f35..4c43e7d2 100644 --- a/old_docs/API_docs_v65/methods/messages_setInlineGameScore.md +++ b/old_docs/API_docs_v65/methods/messages_setInlineGameScore.md @@ -35,16 +35,13 @@ description: messages.setInlineGameScore parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v65/methods/messages_setTyping.md b/old_docs/API_docs_v65/methods/messages_setTyping.md index 9ef8caf5..f6b7b7b5 100644 --- a/old_docs/API_docs_v65/methods/messages_setTyping.md +++ b/old_docs/API_docs_v65/methods/messages_setTyping.md @@ -37,16 +37,13 @@ description: messages.setTyping parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v65/methods/messages_startBot.md b/old_docs/API_docs_v65/methods/messages_startBot.md index 8d98e390..b33ab013 100644 --- a/old_docs/API_docs_v65/methods/messages_startBot.md +++ b/old_docs/API_docs_v65/methods/messages_startBot.md @@ -35,13 +35,10 @@ description: messages.startBot parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v65/methods/messages_toggleChatAdmins.md b/old_docs/API_docs_v65/methods/messages_toggleChatAdmins.md index 3bf8a419..97328065 100644 --- a/old_docs/API_docs_v65/methods/messages_toggleChatAdmins.md +++ b/old_docs/API_docs_v65/methods/messages_toggleChatAdmins.md @@ -32,13 +32,10 @@ description: messages.toggleChatAdmins parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v65/methods/messages_toggleDialogPin.md b/old_docs/API_docs_v65/methods/messages_toggleDialogPin.md index f35f2f40..7853df5e 100644 --- a/old_docs/API_docs_v65/methods/messages_toggleDialogPin.md +++ b/old_docs/API_docs_v65/methods/messages_toggleDialogPin.md @@ -31,13 +31,10 @@ description: messages.toggleDialogPin parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v65/methods/messages_uninstallStickerSet.md b/old_docs/API_docs_v65/methods/messages_uninstallStickerSet.md index 6763e64f..76a3e3e2 100644 --- a/old_docs/API_docs_v65/methods/messages_uninstallStickerSet.md +++ b/old_docs/API_docs_v65/methods/messages_uninstallStickerSet.md @@ -30,13 +30,10 @@ description: messages.uninstallStickerSet parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v65/methods/payments_clearSavedInfo.md b/old_docs/API_docs_v65/methods/payments_clearSavedInfo.md index a77c50d9..fb9bae07 100644 --- a/old_docs/API_docs_v65/methods/payments_clearSavedInfo.md +++ b/old_docs/API_docs_v65/methods/payments_clearSavedInfo.md @@ -24,13 +24,10 @@ description: payments.clearSavedInfo parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v65/methods/payments_getPaymentForm.md b/old_docs/API_docs_v65/methods/payments_getPaymentForm.md index 15f6e26b..141c47f2 100644 --- a/old_docs/API_docs_v65/methods/payments_getPaymentForm.md +++ b/old_docs/API_docs_v65/methods/payments_getPaymentForm.md @@ -30,13 +30,10 @@ description: payments.getPaymentForm parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v65/methods/payments_getPaymentReceipt.md b/old_docs/API_docs_v65/methods/payments_getPaymentReceipt.md index 51433563..f6aa1ab6 100644 --- a/old_docs/API_docs_v65/methods/payments_getPaymentReceipt.md +++ b/old_docs/API_docs_v65/methods/payments_getPaymentReceipt.md @@ -30,13 +30,10 @@ description: payments.getPaymentReceipt parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v65/methods/payments_getSavedInfo.md b/old_docs/API_docs_v65/methods/payments_getSavedInfo.md index a586dcd9..4104679a 100644 --- a/old_docs/API_docs_v65/methods/payments_getSavedInfo.md +++ b/old_docs/API_docs_v65/methods/payments_getSavedInfo.md @@ -18,13 +18,10 @@ description: payments.getSavedInfo parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v65/methods/payments_sendPaymentForm.md b/old_docs/API_docs_v65/methods/payments_sendPaymentForm.md index a63a3980..180a7279 100644 --- a/old_docs/API_docs_v65/methods/payments_sendPaymentForm.md +++ b/old_docs/API_docs_v65/methods/payments_sendPaymentForm.md @@ -33,13 +33,10 @@ description: payments.sendPaymentForm parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v65/methods/payments_validateRequestedInfo.md b/old_docs/API_docs_v65/methods/payments_validateRequestedInfo.md index d839a2df..acfd1852 100644 --- a/old_docs/API_docs_v65/methods/payments_validateRequestedInfo.md +++ b/old_docs/API_docs_v65/methods/payments_validateRequestedInfo.md @@ -32,13 +32,10 @@ description: payments.validateRequestedInfo parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v65/methods/phone_getCallConfig.md b/old_docs/API_docs_v65/methods/phone_getCallConfig.md index a85fed0e..3f18d7ca 100644 --- a/old_docs/API_docs_v65/methods/phone_getCallConfig.md +++ b/old_docs/API_docs_v65/methods/phone_getCallConfig.md @@ -18,13 +18,10 @@ description: phone.getCallConfig parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v65/methods/phone_receivedCall.md b/old_docs/API_docs_v65/methods/phone_receivedCall.md index 9d59b1ea..8ca6a4e1 100644 --- a/old_docs/API_docs_v65/methods/phone_receivedCall.md +++ b/old_docs/API_docs_v65/methods/phone_receivedCall.md @@ -31,13 +31,10 @@ description: phone.receivedCall parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v65/methods/phone_saveCallDebug.md b/old_docs/API_docs_v65/methods/phone_saveCallDebug.md index 4dee5c97..ea3fa2d7 100644 --- a/old_docs/API_docs_v65/methods/phone_saveCallDebug.md +++ b/old_docs/API_docs_v65/methods/phone_saveCallDebug.md @@ -32,13 +32,10 @@ description: phone.saveCallDebug parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v65/methods/phone_setCallRating.md b/old_docs/API_docs_v65/methods/phone_setCallRating.md index fea236d1..c6e5d7fa 100644 --- a/old_docs/API_docs_v65/methods/phone_setCallRating.md +++ b/old_docs/API_docs_v65/methods/phone_setCallRating.md @@ -32,13 +32,10 @@ description: phone.setCallRating parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v65/methods/photos_deletePhotos.md b/old_docs/API_docs_v65/methods/photos_deletePhotos.md index e9cd459d..61768b1e 100644 --- a/old_docs/API_docs_v65/methods/photos_deletePhotos.md +++ b/old_docs/API_docs_v65/methods/photos_deletePhotos.md @@ -23,13 +23,10 @@ description: photos.deletePhotos parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v65/methods/photos_getUserPhotos.md b/old_docs/API_docs_v65/methods/photos_getUserPhotos.md index d6c2a380..095363e7 100644 --- a/old_docs/API_docs_v65/methods/photos_getUserPhotos.md +++ b/old_docs/API_docs_v65/methods/photos_getUserPhotos.md @@ -34,16 +34,13 @@ description: photos.getUserPhotos parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v65/methods/photos_updateProfilePhoto.md b/old_docs/API_docs_v65/methods/photos_updateProfilePhoto.md index ea3b78ec..d90aca22 100644 --- a/old_docs/API_docs_v65/methods/photos_updateProfilePhoto.md +++ b/old_docs/API_docs_v65/methods/photos_updateProfilePhoto.md @@ -23,13 +23,10 @@ description: photos.updateProfilePhoto parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v65/methods/photos_uploadProfilePhoto.md b/old_docs/API_docs_v65/methods/photos_uploadProfilePhoto.md index 58541f23..987e721c 100644 --- a/old_docs/API_docs_v65/methods/photos_uploadProfilePhoto.md +++ b/old_docs/API_docs_v65/methods/photos_uploadProfilePhoto.md @@ -34,13 +34,10 @@ description: photos.uploadProfilePhoto parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v65/methods/ping.md b/old_docs/API_docs_v65/methods/ping.md index 5bfe9dde..7c20ca86 100644 --- a/old_docs/API_docs_v65/methods/ping.md +++ b/old_docs/API_docs_v65/methods/ping.md @@ -23,16 +23,13 @@ description: ping parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v65/methods/ping_delay_disconnect.md b/old_docs/API_docs_v65/methods/ping_delay_disconnect.md index b4b1e265..e8b62005 100644 --- a/old_docs/API_docs_v65/methods/ping_delay_disconnect.md +++ b/old_docs/API_docs_v65/methods/ping_delay_disconnect.md @@ -24,16 +24,13 @@ description: ping_delay_disconnect parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v65/methods/req_DH_params.md b/old_docs/API_docs_v65/methods/req_DH_params.md index 51632fe0..697540d8 100644 --- a/old_docs/API_docs_v65/methods/req_DH_params.md +++ b/old_docs/API_docs_v65/methods/req_DH_params.md @@ -28,16 +28,13 @@ description: req_DH_params parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v65/methods/req_pq.md b/old_docs/API_docs_v65/methods/req_pq.md index 2f005ce2..7a583643 100644 --- a/old_docs/API_docs_v65/methods/req_pq.md +++ b/old_docs/API_docs_v65/methods/req_pq.md @@ -23,16 +23,13 @@ description: req_pq parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v65/methods/rpc_drop_answer.md b/old_docs/API_docs_v65/methods/rpc_drop_answer.md index 48e894a9..e15ddca9 100644 --- a/old_docs/API_docs_v65/methods/rpc_drop_answer.md +++ b/old_docs/API_docs_v65/methods/rpc_drop_answer.md @@ -23,16 +23,13 @@ description: rpc_drop_answer parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v65/methods/set_client_DH_params.md b/old_docs/API_docs_v65/methods/set_client_DH_params.md index 25f0f387..8721ed40 100644 --- a/old_docs/API_docs_v65/methods/set_client_DH_params.md +++ b/old_docs/API_docs_v65/methods/set_client_DH_params.md @@ -25,16 +25,13 @@ description: set_client_DH_params parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v65/methods/upload_getWebFile.md b/old_docs/API_docs_v65/methods/upload_getWebFile.md index ec7c05b4..8744dac5 100644 --- a/old_docs/API_docs_v65/methods/upload_getWebFile.md +++ b/old_docs/API_docs_v65/methods/upload_getWebFile.md @@ -32,13 +32,10 @@ description: upload.getWebFile parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v65/methods/users_getUsers.md b/old_docs/API_docs_v65/methods/users_getUsers.md index 6a44d258..3a981d57 100644 --- a/old_docs/API_docs_v65/methods/users_getUsers.md +++ b/old_docs/API_docs_v65/methods/users_getUsers.md @@ -33,16 +33,13 @@ description: users.getUsers parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v66/methods/account_changePhone.md b/old_docs/API_docs_v66/methods/account_changePhone.md index 5d1801d0..e47ef6a7 100644 --- a/old_docs/API_docs_v66/methods/account_changePhone.md +++ b/old_docs/API_docs_v66/methods/account_changePhone.md @@ -32,13 +32,10 @@ description: account.changePhone parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v66/methods/account_checkUsername.md b/old_docs/API_docs_v66/methods/account_checkUsername.md index afc59b6c..40cf822f 100644 --- a/old_docs/API_docs_v66/methods/account_checkUsername.md +++ b/old_docs/API_docs_v66/methods/account_checkUsername.md @@ -30,13 +30,10 @@ description: account.checkUsername parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v66/methods/account_confirmPhone.md b/old_docs/API_docs_v66/methods/account_confirmPhone.md index 0d2dc5c6..8dd79d94 100644 --- a/old_docs/API_docs_v66/methods/account_confirmPhone.md +++ b/old_docs/API_docs_v66/methods/account_confirmPhone.md @@ -32,13 +32,10 @@ description: account.confirmPhone parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v66/methods/account_deleteAccount.md b/old_docs/API_docs_v66/methods/account_deleteAccount.md index 5abcd0ec..6f1bbda9 100644 --- a/old_docs/API_docs_v66/methods/account_deleteAccount.md +++ b/old_docs/API_docs_v66/methods/account_deleteAccount.md @@ -23,13 +23,10 @@ description: account.deleteAccount parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v66/methods/account_getAccountTTL.md b/old_docs/API_docs_v66/methods/account_getAccountTTL.md index 3520fbef..538b1d7a 100644 --- a/old_docs/API_docs_v66/methods/account_getAccountTTL.md +++ b/old_docs/API_docs_v66/methods/account_getAccountTTL.md @@ -18,13 +18,10 @@ description: account.getAccountTTL parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v66/methods/account_getAuthorizations.md b/old_docs/API_docs_v66/methods/account_getAuthorizations.md index 91bbce5e..f138d517 100644 --- a/old_docs/API_docs_v66/methods/account_getAuthorizations.md +++ b/old_docs/API_docs_v66/methods/account_getAuthorizations.md @@ -18,13 +18,10 @@ description: account.getAuthorizations parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v66/methods/account_getNotifySettings.md b/old_docs/API_docs_v66/methods/account_getNotifySettings.md index 8ee710d8..a48eed2f 100644 --- a/old_docs/API_docs_v66/methods/account_getNotifySettings.md +++ b/old_docs/API_docs_v66/methods/account_getNotifySettings.md @@ -30,13 +30,10 @@ description: account.getNotifySettings parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v66/methods/account_getPassword.md b/old_docs/API_docs_v66/methods/account_getPassword.md index 4d9fd015..1abf6174 100644 --- a/old_docs/API_docs_v66/methods/account_getPassword.md +++ b/old_docs/API_docs_v66/methods/account_getPassword.md @@ -18,13 +18,10 @@ description: account.getPassword parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v66/methods/account_getPasswordSettings.md b/old_docs/API_docs_v66/methods/account_getPasswordSettings.md index 02cb77f7..aec5b989 100644 --- a/old_docs/API_docs_v66/methods/account_getPasswordSettings.md +++ b/old_docs/API_docs_v66/methods/account_getPasswordSettings.md @@ -30,13 +30,10 @@ description: account.getPasswordSettings parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v66/methods/account_getPrivacy.md b/old_docs/API_docs_v66/methods/account_getPrivacy.md index 52786b79..8bbe9795 100644 --- a/old_docs/API_docs_v66/methods/account_getPrivacy.md +++ b/old_docs/API_docs_v66/methods/account_getPrivacy.md @@ -30,13 +30,10 @@ description: account.getPrivacy parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v66/methods/account_getTmpPassword.md b/old_docs/API_docs_v66/methods/account_getTmpPassword.md index 83ab09b1..d9bd30d8 100644 --- a/old_docs/API_docs_v66/methods/account_getTmpPassword.md +++ b/old_docs/API_docs_v66/methods/account_getTmpPassword.md @@ -32,13 +32,10 @@ description: account.getTmpPassword parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v66/methods/account_getWallPapers.md b/old_docs/API_docs_v66/methods/account_getWallPapers.md index 88c8a701..a71543d0 100644 --- a/old_docs/API_docs_v66/methods/account_getWallPapers.md +++ b/old_docs/API_docs_v66/methods/account_getWallPapers.md @@ -18,13 +18,10 @@ description: account.getWallPapers parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v66/methods/account_registerDevice.md b/old_docs/API_docs_v66/methods/account_registerDevice.md index 3cc7f98d..8be04ad2 100644 --- a/old_docs/API_docs_v66/methods/account_registerDevice.md +++ b/old_docs/API_docs_v66/methods/account_registerDevice.md @@ -31,13 +31,10 @@ description: account.registerDevice parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v66/methods/account_reportPeer.md b/old_docs/API_docs_v66/methods/account_reportPeer.md index 1545c3b8..1ae9f4d4 100644 --- a/old_docs/API_docs_v66/methods/account_reportPeer.md +++ b/old_docs/API_docs_v66/methods/account_reportPeer.md @@ -31,13 +31,10 @@ description: account.reportPeer parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v66/methods/account_resetAuthorization.md b/old_docs/API_docs_v66/methods/account_resetAuthorization.md index e44334f2..0438cba3 100644 --- a/old_docs/API_docs_v66/methods/account_resetAuthorization.md +++ b/old_docs/API_docs_v66/methods/account_resetAuthorization.md @@ -30,13 +30,10 @@ description: account.resetAuthorization parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v66/methods/account_resetNotifySettings.md b/old_docs/API_docs_v66/methods/account_resetNotifySettings.md index 155ede68..92db4f4f 100644 --- a/old_docs/API_docs_v66/methods/account_resetNotifySettings.md +++ b/old_docs/API_docs_v66/methods/account_resetNotifySettings.md @@ -18,13 +18,10 @@ description: account.resetNotifySettings parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v66/methods/account_sendChangePhoneCode.md b/old_docs/API_docs_v66/methods/account_sendChangePhoneCode.md index 4be218f2..017b5f7f 100644 --- a/old_docs/API_docs_v66/methods/account_sendChangePhoneCode.md +++ b/old_docs/API_docs_v66/methods/account_sendChangePhoneCode.md @@ -32,13 +32,10 @@ description: account.sendChangePhoneCode parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v66/methods/account_sendConfirmPhoneCode.md b/old_docs/API_docs_v66/methods/account_sendConfirmPhoneCode.md index 009fcb09..3665bd50 100644 --- a/old_docs/API_docs_v66/methods/account_sendConfirmPhoneCode.md +++ b/old_docs/API_docs_v66/methods/account_sendConfirmPhoneCode.md @@ -32,13 +32,10 @@ description: account.sendConfirmPhoneCode parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v66/methods/account_setAccountTTL.md b/old_docs/API_docs_v66/methods/account_setAccountTTL.md index f06eb676..d08f59fb 100644 --- a/old_docs/API_docs_v66/methods/account_setAccountTTL.md +++ b/old_docs/API_docs_v66/methods/account_setAccountTTL.md @@ -30,13 +30,10 @@ description: account.setAccountTTL parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v66/methods/account_setPrivacy.md b/old_docs/API_docs_v66/methods/account_setPrivacy.md index 56aebbcc..401aa71c 100644 --- a/old_docs/API_docs_v66/methods/account_setPrivacy.md +++ b/old_docs/API_docs_v66/methods/account_setPrivacy.md @@ -31,13 +31,10 @@ description: account.setPrivacy parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v66/methods/account_unregisterDevice.md b/old_docs/API_docs_v66/methods/account_unregisterDevice.md index 41899b6e..283ec7d2 100644 --- a/old_docs/API_docs_v66/methods/account_unregisterDevice.md +++ b/old_docs/API_docs_v66/methods/account_unregisterDevice.md @@ -31,13 +31,10 @@ description: account.unregisterDevice parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v66/methods/account_updateDeviceLocked.md b/old_docs/API_docs_v66/methods/account_updateDeviceLocked.md index 37aeb59d..ae6125a5 100644 --- a/old_docs/API_docs_v66/methods/account_updateDeviceLocked.md +++ b/old_docs/API_docs_v66/methods/account_updateDeviceLocked.md @@ -23,13 +23,10 @@ description: account.updateDeviceLocked parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v66/methods/account_updateNotifySettings.md b/old_docs/API_docs_v66/methods/account_updateNotifySettings.md index 8389b5c2..fb096250 100644 --- a/old_docs/API_docs_v66/methods/account_updateNotifySettings.md +++ b/old_docs/API_docs_v66/methods/account_updateNotifySettings.md @@ -31,13 +31,10 @@ description: account.updateNotifySettings parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v66/methods/account_updatePasswordSettings.md b/old_docs/API_docs_v66/methods/account_updatePasswordSettings.md index b7c8da4b..ffa8dcd9 100644 --- a/old_docs/API_docs_v66/methods/account_updatePasswordSettings.md +++ b/old_docs/API_docs_v66/methods/account_updatePasswordSettings.md @@ -34,13 +34,10 @@ description: account.updatePasswordSettings parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v66/methods/account_updateProfile.md b/old_docs/API_docs_v66/methods/account_updateProfile.md index a50eaea5..b3d468d1 100644 --- a/old_docs/API_docs_v66/methods/account_updateProfile.md +++ b/old_docs/API_docs_v66/methods/account_updateProfile.md @@ -33,13 +33,10 @@ description: account.updateProfile parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v66/methods/account_updateStatus.md b/old_docs/API_docs_v66/methods/account_updateStatus.md index 7204e582..c8fa0a79 100644 --- a/old_docs/API_docs_v66/methods/account_updateStatus.md +++ b/old_docs/API_docs_v66/methods/account_updateStatus.md @@ -30,13 +30,10 @@ description: account.updateStatus parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v66/methods/account_updateUsername.md b/old_docs/API_docs_v66/methods/account_updateUsername.md index 22be2fd4..2b7576a5 100644 --- a/old_docs/API_docs_v66/methods/account_updateUsername.md +++ b/old_docs/API_docs_v66/methods/account_updateUsername.md @@ -32,13 +32,10 @@ description: account.updateUsername parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v66/methods/auth_bindTempAuthKey.md b/old_docs/API_docs_v66/methods/auth_bindTempAuthKey.md index e3d72dd5..7419abb0 100644 --- a/old_docs/API_docs_v66/methods/auth_bindTempAuthKey.md +++ b/old_docs/API_docs_v66/methods/auth_bindTempAuthKey.md @@ -35,16 +35,13 @@ description: auth.bindTempAuthKey parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v66/methods/auth_cancelCode.md b/old_docs/API_docs_v66/methods/auth_cancelCode.md index dc390329..05d927a1 100644 --- a/old_docs/API_docs_v66/methods/auth_cancelCode.md +++ b/old_docs/API_docs_v66/methods/auth_cancelCode.md @@ -31,13 +31,10 @@ description: auth.cancelCode parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v66/methods/auth_checkPassword.md b/old_docs/API_docs_v66/methods/auth_checkPassword.md index d5559186..6b6b21cc 100644 --- a/old_docs/API_docs_v66/methods/auth_checkPassword.md +++ b/old_docs/API_docs_v66/methods/auth_checkPassword.md @@ -30,13 +30,10 @@ description: auth.checkPassword parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v66/methods/auth_checkPhone.md b/old_docs/API_docs_v66/methods/auth_checkPhone.md index 3455904d..f6cac2e6 100644 --- a/old_docs/API_docs_v66/methods/auth_checkPhone.md +++ b/old_docs/API_docs_v66/methods/auth_checkPhone.md @@ -32,13 +32,10 @@ description: auth.checkPhone parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v66/methods/auth_dropTempAuthKeys.md b/old_docs/API_docs_v66/methods/auth_dropTempAuthKeys.md index aba76766..fedb7bf4 100644 --- a/old_docs/API_docs_v66/methods/auth_dropTempAuthKeys.md +++ b/old_docs/API_docs_v66/methods/auth_dropTempAuthKeys.md @@ -23,16 +23,13 @@ description: auth.dropTempAuthKeys parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v66/methods/auth_exportAuthorization.md b/old_docs/API_docs_v66/methods/auth_exportAuthorization.md index 44c45b70..cbc8203b 100644 --- a/old_docs/API_docs_v66/methods/auth_exportAuthorization.md +++ b/old_docs/API_docs_v66/methods/auth_exportAuthorization.md @@ -30,16 +30,13 @@ description: auth.exportAuthorization parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v66/methods/auth_importAuthorization.md b/old_docs/API_docs_v66/methods/auth_importAuthorization.md index e0fd534f..22166510 100644 --- a/old_docs/API_docs_v66/methods/auth_importAuthorization.md +++ b/old_docs/API_docs_v66/methods/auth_importAuthorization.md @@ -32,16 +32,13 @@ description: auth.importAuthorization parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v66/methods/auth_recoverPassword.md b/old_docs/API_docs_v66/methods/auth_recoverPassword.md index c2ce3fed..931e99fd 100644 --- a/old_docs/API_docs_v66/methods/auth_recoverPassword.md +++ b/old_docs/API_docs_v66/methods/auth_recoverPassword.md @@ -30,13 +30,10 @@ description: auth.recoverPassword parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v66/methods/auth_requestPasswordRecovery.md b/old_docs/API_docs_v66/methods/auth_requestPasswordRecovery.md index 101b1cf7..c6babcd9 100644 --- a/old_docs/API_docs_v66/methods/auth_requestPasswordRecovery.md +++ b/old_docs/API_docs_v66/methods/auth_requestPasswordRecovery.md @@ -25,13 +25,10 @@ description: auth.requestPasswordRecovery parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v66/methods/auth_resendCode.md b/old_docs/API_docs_v66/methods/auth_resendCode.md index 14d08ddd..df4803b8 100644 --- a/old_docs/API_docs_v66/methods/auth_resendCode.md +++ b/old_docs/API_docs_v66/methods/auth_resendCode.md @@ -31,13 +31,10 @@ description: auth.resendCode parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v66/methods/auth_resetAuthorizations.md b/old_docs/API_docs_v66/methods/auth_resetAuthorizations.md index 87a39a22..fe297fa7 100644 --- a/old_docs/API_docs_v66/methods/auth_resetAuthorizations.md +++ b/old_docs/API_docs_v66/methods/auth_resetAuthorizations.md @@ -25,13 +25,10 @@ description: auth.resetAuthorizations parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v66/methods/auth_sendInvites.md b/old_docs/API_docs_v66/methods/auth_sendInvites.md index 604fc65d..ad9636c5 100644 --- a/old_docs/API_docs_v66/methods/auth_sendInvites.md +++ b/old_docs/API_docs_v66/methods/auth_sendInvites.md @@ -31,13 +31,10 @@ description: auth.sendInvites parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v66/methods/bots_answerWebhookJSONQuery.md b/old_docs/API_docs_v66/methods/bots_answerWebhookJSONQuery.md index ae1efce3..d910db35 100644 --- a/old_docs/API_docs_v66/methods/bots_answerWebhookJSONQuery.md +++ b/old_docs/API_docs_v66/methods/bots_answerWebhookJSONQuery.md @@ -32,16 +32,13 @@ description: bots.answerWebhookJSONQuery parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v66/methods/bots_sendCustomRequest.md b/old_docs/API_docs_v66/methods/bots_sendCustomRequest.md index 927f18c5..abb880ef 100644 --- a/old_docs/API_docs_v66/methods/bots_sendCustomRequest.md +++ b/old_docs/API_docs_v66/methods/bots_sendCustomRequest.md @@ -31,16 +31,13 @@ description: bots.sendCustomRequest parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v66/methods/channels_checkUsername.md b/old_docs/API_docs_v66/methods/channels_checkUsername.md index d6ea876d..e29ee107 100644 --- a/old_docs/API_docs_v66/methods/channels_checkUsername.md +++ b/old_docs/API_docs_v66/methods/channels_checkUsername.md @@ -33,13 +33,10 @@ description: channels.checkUsername parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v66/methods/channels_createChannel.md b/old_docs/API_docs_v66/methods/channels_createChannel.md index 9ba02e9e..58808b73 100644 --- a/old_docs/API_docs_v66/methods/channels_createChannel.md +++ b/old_docs/API_docs_v66/methods/channels_createChannel.md @@ -34,13 +34,10 @@ description: channels.createChannel parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v66/methods/channels_deleteChannel.md b/old_docs/API_docs_v66/methods/channels_deleteChannel.md index 912ab080..532f3c6c 100644 --- a/old_docs/API_docs_v66/methods/channels_deleteChannel.md +++ b/old_docs/API_docs_v66/methods/channels_deleteChannel.md @@ -31,13 +31,10 @@ description: channels.deleteChannel parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v66/methods/channels_deleteMessages.md b/old_docs/API_docs_v66/methods/channels_deleteMessages.md index b3481294..a42a47a5 100644 --- a/old_docs/API_docs_v66/methods/channels_deleteMessages.md +++ b/old_docs/API_docs_v66/methods/channels_deleteMessages.md @@ -33,16 +33,13 @@ description: channels.deleteMessages parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v66/methods/channels_deleteUserHistory.md b/old_docs/API_docs_v66/methods/channels_deleteUserHistory.md index 66843269..73494485 100644 --- a/old_docs/API_docs_v66/methods/channels_deleteUserHistory.md +++ b/old_docs/API_docs_v66/methods/channels_deleteUserHistory.md @@ -32,13 +32,10 @@ description: channels.deleteUserHistory parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v66/methods/channels_editAbout.md b/old_docs/API_docs_v66/methods/channels_editAbout.md index 4c759a8a..1c3ce933 100644 --- a/old_docs/API_docs_v66/methods/channels_editAbout.md +++ b/old_docs/API_docs_v66/methods/channels_editAbout.md @@ -34,16 +34,13 @@ description: channels.editAbout parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v66/methods/channels_editAdmin.md b/old_docs/API_docs_v66/methods/channels_editAdmin.md index 7707bdfe..42184227 100644 --- a/old_docs/API_docs_v66/methods/channels_editAdmin.md +++ b/old_docs/API_docs_v66/methods/channels_editAdmin.md @@ -41,16 +41,13 @@ description: channels.editAdmin parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v66/methods/channels_editPhoto.md b/old_docs/API_docs_v66/methods/channels_editPhoto.md index 99873537..4a4aeb03 100644 --- a/old_docs/API_docs_v66/methods/channels_editPhoto.md +++ b/old_docs/API_docs_v66/methods/channels_editPhoto.md @@ -33,16 +33,13 @@ description: channels.editPhoto parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v66/methods/channels_editTitle.md b/old_docs/API_docs_v66/methods/channels_editTitle.md index 04e8ce12..8a69d09b 100644 --- a/old_docs/API_docs_v66/methods/channels_editTitle.md +++ b/old_docs/API_docs_v66/methods/channels_editTitle.md @@ -33,16 +33,13 @@ description: channels.editTitle parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v66/methods/channels_exportInvite.md b/old_docs/API_docs_v66/methods/channels_exportInvite.md index 2ed80f6c..79dc6401 100644 --- a/old_docs/API_docs_v66/methods/channels_exportInvite.md +++ b/old_docs/API_docs_v66/methods/channels_exportInvite.md @@ -32,16 +32,13 @@ description: channels.exportInvite parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v66/methods/channels_exportMessageLink.md b/old_docs/API_docs_v66/methods/channels_exportMessageLink.md index 9831c9c0..5b824859 100644 --- a/old_docs/API_docs_v66/methods/channels_exportMessageLink.md +++ b/old_docs/API_docs_v66/methods/channels_exportMessageLink.md @@ -31,13 +31,10 @@ description: channels.exportMessageLink parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v66/methods/channels_getAdminedPublicChannels.md b/old_docs/API_docs_v66/methods/channels_getAdminedPublicChannels.md index 7fceb026..283a9071 100644 --- a/old_docs/API_docs_v66/methods/channels_getAdminedPublicChannels.md +++ b/old_docs/API_docs_v66/methods/channels_getAdminedPublicChannels.md @@ -18,13 +18,10 @@ description: channels.getAdminedPublicChannels parameters, return type and examp ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v66/methods/channels_getChannels.md b/old_docs/API_docs_v66/methods/channels_getChannels.md index 13304938..e80aa6a6 100644 --- a/old_docs/API_docs_v66/methods/channels_getChannels.md +++ b/old_docs/API_docs_v66/methods/channels_getChannels.md @@ -32,16 +32,13 @@ description: channels.getChannels parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v66/methods/channels_getMessages.md b/old_docs/API_docs_v66/methods/channels_getMessages.md index 5480dd86..dc392773 100644 --- a/old_docs/API_docs_v66/methods/channels_getMessages.md +++ b/old_docs/API_docs_v66/methods/channels_getMessages.md @@ -33,16 +33,13 @@ description: channels.getMessages parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v66/methods/channels_getParticipant.md b/old_docs/API_docs_v66/methods/channels_getParticipant.md index 8c7e3cbd..001bf115 100644 --- a/old_docs/API_docs_v66/methods/channels_getParticipant.md +++ b/old_docs/API_docs_v66/methods/channels_getParticipant.md @@ -35,16 +35,13 @@ description: channels.getParticipant parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v66/methods/channels_inviteToChannel.md b/old_docs/API_docs_v66/methods/channels_inviteToChannel.md index cf5480e0..2448fb84 100644 --- a/old_docs/API_docs_v66/methods/channels_inviteToChannel.md +++ b/old_docs/API_docs_v66/methods/channels_inviteToChannel.md @@ -46,13 +46,10 @@ description: channels.inviteToChannel parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v66/methods/channels_joinChannel.md b/old_docs/API_docs_v66/methods/channels_joinChannel.md index f31730a1..e746cf48 100644 --- a/old_docs/API_docs_v66/methods/channels_joinChannel.md +++ b/old_docs/API_docs_v66/methods/channels_joinChannel.md @@ -32,13 +32,10 @@ description: channels.joinChannel parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v66/methods/channels_kickFromChannel.md b/old_docs/API_docs_v66/methods/channels_kickFromChannel.md index c903caa4..c85833ce 100644 --- a/old_docs/API_docs_v66/methods/channels_kickFromChannel.md +++ b/old_docs/API_docs_v66/methods/channels_kickFromChannel.md @@ -25,16 +25,13 @@ description: channels.kickFromChannel parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v66/methods/channels_leaveChannel.md b/old_docs/API_docs_v66/methods/channels_leaveChannel.md index 12902f6d..ff244ded 100644 --- a/old_docs/API_docs_v66/methods/channels_leaveChannel.md +++ b/old_docs/API_docs_v66/methods/channels_leaveChannel.md @@ -34,16 +34,13 @@ description: channels.leaveChannel parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v66/methods/channels_readHistory.md b/old_docs/API_docs_v66/methods/channels_readHistory.md index be979101..6fc6ec0e 100644 --- a/old_docs/API_docs_v66/methods/channels_readHistory.md +++ b/old_docs/API_docs_v66/methods/channels_readHistory.md @@ -32,13 +32,10 @@ description: channels.readHistory parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v66/methods/channels_reportSpam.md b/old_docs/API_docs_v66/methods/channels_reportSpam.md index 22f34443..a37a5833 100644 --- a/old_docs/API_docs_v66/methods/channels_reportSpam.md +++ b/old_docs/API_docs_v66/methods/channels_reportSpam.md @@ -33,13 +33,10 @@ description: channels.reportSpam parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v66/methods/channels_toggleInvites.md b/old_docs/API_docs_v66/methods/channels_toggleInvites.md index c2715b32..d0ae1136 100644 --- a/old_docs/API_docs_v66/methods/channels_toggleInvites.md +++ b/old_docs/API_docs_v66/methods/channels_toggleInvites.md @@ -33,13 +33,10 @@ description: channels.toggleInvites parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v66/methods/channels_toggleSignatures.md b/old_docs/API_docs_v66/methods/channels_toggleSignatures.md index a214b849..6477bc6d 100644 --- a/old_docs/API_docs_v66/methods/channels_toggleSignatures.md +++ b/old_docs/API_docs_v66/methods/channels_toggleSignatures.md @@ -31,13 +31,10 @@ description: channels.toggleSignatures parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v66/methods/channels_updatePinnedMessage.md b/old_docs/API_docs_v66/methods/channels_updatePinnedMessage.md index 6dcabf71..37a0a20d 100644 --- a/old_docs/API_docs_v66/methods/channels_updatePinnedMessage.md +++ b/old_docs/API_docs_v66/methods/channels_updatePinnedMessage.md @@ -35,16 +35,13 @@ description: channels.updatePinnedMessage parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v66/methods/channels_updateUsername.md b/old_docs/API_docs_v66/methods/channels_updateUsername.md index c2ede724..1f1f111e 100644 --- a/old_docs/API_docs_v66/methods/channels_updateUsername.md +++ b/old_docs/API_docs_v66/methods/channels_updateUsername.md @@ -35,13 +35,10 @@ description: channels.updateUsername parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v66/methods/contacts_block.md b/old_docs/API_docs_v66/methods/contacts_block.md index d9d58e37..1c7cbe26 100644 --- a/old_docs/API_docs_v66/methods/contacts_block.md +++ b/old_docs/API_docs_v66/methods/contacts_block.md @@ -30,13 +30,10 @@ description: contacts.block parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v66/methods/contacts_deleteContact.md b/old_docs/API_docs_v66/methods/contacts_deleteContact.md index cd8c17ad..987a1be0 100644 --- a/old_docs/API_docs_v66/methods/contacts_deleteContact.md +++ b/old_docs/API_docs_v66/methods/contacts_deleteContact.md @@ -30,13 +30,10 @@ description: contacts.deleteContact parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v66/methods/contacts_deleteContacts.md b/old_docs/API_docs_v66/methods/contacts_deleteContacts.md index fc65880d..67a922ed 100644 --- a/old_docs/API_docs_v66/methods/contacts_deleteContacts.md +++ b/old_docs/API_docs_v66/methods/contacts_deleteContacts.md @@ -31,13 +31,10 @@ description: contacts.deleteContacts parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v66/methods/contacts_exportCard.md b/old_docs/API_docs_v66/methods/contacts_exportCard.md index 63508076..bf6d1f9f 100644 --- a/old_docs/API_docs_v66/methods/contacts_exportCard.md +++ b/old_docs/API_docs_v66/methods/contacts_exportCard.md @@ -18,13 +18,10 @@ description: contacts.exportCard parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v66/methods/contacts_getBlocked.md b/old_docs/API_docs_v66/methods/contacts_getBlocked.md index f50792b4..faa719da 100644 --- a/old_docs/API_docs_v66/methods/contacts_getBlocked.md +++ b/old_docs/API_docs_v66/methods/contacts_getBlocked.md @@ -24,13 +24,10 @@ description: contacts.getBlocked parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v66/methods/contacts_getContacts.md b/old_docs/API_docs_v66/methods/contacts_getContacts.md index 71313bf2..a6779111 100644 --- a/old_docs/API_docs_v66/methods/contacts_getContacts.md +++ b/old_docs/API_docs_v66/methods/contacts_getContacts.md @@ -23,13 +23,10 @@ description: contacts.getContacts parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v66/methods/contacts_getStatuses.md b/old_docs/API_docs_v66/methods/contacts_getStatuses.md index d914e08d..9bb7f263 100644 --- a/old_docs/API_docs_v66/methods/contacts_getStatuses.md +++ b/old_docs/API_docs_v66/methods/contacts_getStatuses.md @@ -18,13 +18,10 @@ description: contacts.getStatuses parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v66/methods/contacts_getTopPeers.md b/old_docs/API_docs_v66/methods/contacts_getTopPeers.md index 1caa1d77..d29f6e02 100644 --- a/old_docs/API_docs_v66/methods/contacts_getTopPeers.md +++ b/old_docs/API_docs_v66/methods/contacts_getTopPeers.md @@ -37,13 +37,10 @@ description: contacts.getTopPeers parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v66/methods/contacts_importCard.md b/old_docs/API_docs_v66/methods/contacts_importCard.md index a6abf56d..7a2f34e1 100644 --- a/old_docs/API_docs_v66/methods/contacts_importCard.md +++ b/old_docs/API_docs_v66/methods/contacts_importCard.md @@ -31,13 +31,10 @@ description: contacts.importCard parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v66/methods/contacts_importContacts.md b/old_docs/API_docs_v66/methods/contacts_importContacts.md index db2051ac..2f070493 100644 --- a/old_docs/API_docs_v66/methods/contacts_importContacts.md +++ b/old_docs/API_docs_v66/methods/contacts_importContacts.md @@ -24,13 +24,10 @@ description: contacts.importContacts parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v66/methods/contacts_resetTopPeerRating.md b/old_docs/API_docs_v66/methods/contacts_resetTopPeerRating.md index 738494b2..711ea0cb 100644 --- a/old_docs/API_docs_v66/methods/contacts_resetTopPeerRating.md +++ b/old_docs/API_docs_v66/methods/contacts_resetTopPeerRating.md @@ -31,13 +31,10 @@ description: contacts.resetTopPeerRating parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v66/methods/contacts_search.md b/old_docs/API_docs_v66/methods/contacts_search.md index 0203b160..70a0635e 100644 --- a/old_docs/API_docs_v66/methods/contacts_search.md +++ b/old_docs/API_docs_v66/methods/contacts_search.md @@ -33,13 +33,10 @@ description: contacts.search parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v66/methods/contacts_unblock.md b/old_docs/API_docs_v66/methods/contacts_unblock.md index a1977c24..9c01e42a 100644 --- a/old_docs/API_docs_v66/methods/contacts_unblock.md +++ b/old_docs/API_docs_v66/methods/contacts_unblock.md @@ -30,13 +30,10 @@ description: contacts.unblock parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v66/methods/contest_saveDeveloperInfo.md b/old_docs/API_docs_v66/methods/contest_saveDeveloperInfo.md index eca7bfcf..c0bb9054 100644 --- a/old_docs/API_docs_v66/methods/contest_saveDeveloperInfo.md +++ b/old_docs/API_docs_v66/methods/contest_saveDeveloperInfo.md @@ -27,16 +27,13 @@ description: contest.saveDeveloperInfo parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v66/methods/destroy_auth_key.md b/old_docs/API_docs_v66/methods/destroy_auth_key.md index 7d39ceec..1803e375 100644 --- a/old_docs/API_docs_v66/methods/destroy_auth_key.md +++ b/old_docs/API_docs_v66/methods/destroy_auth_key.md @@ -18,16 +18,13 @@ description: destroy_auth_key parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v66/methods/destroy_session.md b/old_docs/API_docs_v66/methods/destroy_session.md index 0b732694..39aa2c6e 100644 --- a/old_docs/API_docs_v66/methods/destroy_session.md +++ b/old_docs/API_docs_v66/methods/destroy_session.md @@ -23,16 +23,13 @@ description: destroy_session parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v66/methods/get_future_salts.md b/old_docs/API_docs_v66/methods/get_future_salts.md index d3b306ce..fedf036c 100644 --- a/old_docs/API_docs_v66/methods/get_future_salts.md +++ b/old_docs/API_docs_v66/methods/get_future_salts.md @@ -23,16 +23,13 @@ description: get_future_salts parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v66/methods/help_getAppChangelog.md b/old_docs/API_docs_v66/methods/help_getAppChangelog.md index 9d8c3203..59916787 100644 --- a/old_docs/API_docs_v66/methods/help_getAppChangelog.md +++ b/old_docs/API_docs_v66/methods/help_getAppChangelog.md @@ -23,13 +23,10 @@ description: help.getAppChangelog parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v66/methods/help_getAppUpdate.md b/old_docs/API_docs_v66/methods/help_getAppUpdate.md index 0871f59d..89ff22c3 100644 --- a/old_docs/API_docs_v66/methods/help_getAppUpdate.md +++ b/old_docs/API_docs_v66/methods/help_getAppUpdate.md @@ -18,13 +18,10 @@ description: help.getAppUpdate parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v66/methods/help_getCdnConfig.md b/old_docs/API_docs_v66/methods/help_getCdnConfig.md index da446958..3079e605 100644 --- a/old_docs/API_docs_v66/methods/help_getCdnConfig.md +++ b/old_docs/API_docs_v66/methods/help_getCdnConfig.md @@ -25,16 +25,13 @@ description: help.getCdnConfig parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v66/methods/help_getConfig.md b/old_docs/API_docs_v66/methods/help_getConfig.md index e3648b5a..bb51b362 100644 --- a/old_docs/API_docs_v66/methods/help_getConfig.md +++ b/old_docs/API_docs_v66/methods/help_getConfig.md @@ -25,16 +25,13 @@ description: help.getConfig parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v66/methods/help_getInviteText.md b/old_docs/API_docs_v66/methods/help_getInviteText.md index 4bcbb77d..6d2674d6 100644 --- a/old_docs/API_docs_v66/methods/help_getInviteText.md +++ b/old_docs/API_docs_v66/methods/help_getInviteText.md @@ -18,13 +18,10 @@ description: help.getInviteText parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v66/methods/help_getNearestDc.md b/old_docs/API_docs_v66/methods/help_getNearestDc.md index c6f5c555..6d8ed3f7 100644 --- a/old_docs/API_docs_v66/methods/help_getNearestDc.md +++ b/old_docs/API_docs_v66/methods/help_getNearestDc.md @@ -18,13 +18,10 @@ description: help.getNearestDc parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v66/methods/help_getSupport.md b/old_docs/API_docs_v66/methods/help_getSupport.md index 209edf03..ca8db03c 100644 --- a/old_docs/API_docs_v66/methods/help_getSupport.md +++ b/old_docs/API_docs_v66/methods/help_getSupport.md @@ -18,13 +18,10 @@ description: help.getSupport parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v66/methods/help_getTermsOfService.md b/old_docs/API_docs_v66/methods/help_getTermsOfService.md index 8bc2e2fa..eb686506 100644 --- a/old_docs/API_docs_v66/methods/help_getTermsOfService.md +++ b/old_docs/API_docs_v66/methods/help_getTermsOfService.md @@ -18,13 +18,10 @@ description: help.getTermsOfService parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v66/methods/help_saveAppLog.md b/old_docs/API_docs_v66/methods/help_saveAppLog.md index 4f06434c..741b9aa1 100644 --- a/old_docs/API_docs_v66/methods/help_saveAppLog.md +++ b/old_docs/API_docs_v66/methods/help_saveAppLog.md @@ -23,13 +23,10 @@ description: help.saveAppLog parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v66/methods/help_setBotUpdatesStatus.md b/old_docs/API_docs_v66/methods/help_setBotUpdatesStatus.md index 55e1d2fe..470187a0 100644 --- a/old_docs/API_docs_v66/methods/help_setBotUpdatesStatus.md +++ b/old_docs/API_docs_v66/methods/help_setBotUpdatesStatus.md @@ -24,16 +24,13 @@ description: help.setBotUpdatesStatus parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v66/methods/initConnection.md b/old_docs/API_docs_v66/methods/initConnection.md index 0d22a1cb..c0307677 100644 --- a/old_docs/API_docs_v66/methods/initConnection.md +++ b/old_docs/API_docs_v66/methods/initConnection.md @@ -36,16 +36,13 @@ description: initConnection parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v66/methods/invokeAfterMsg.md b/old_docs/API_docs_v66/methods/invokeAfterMsg.md index c139fe8c..a382429e 100644 --- a/old_docs/API_docs_v66/methods/invokeAfterMsg.md +++ b/old_docs/API_docs_v66/methods/invokeAfterMsg.md @@ -24,16 +24,13 @@ description: invokeAfterMsg parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v66/methods/invokeAfterMsgs.md b/old_docs/API_docs_v66/methods/invokeAfterMsgs.md index 35004296..169eedaf 100644 --- a/old_docs/API_docs_v66/methods/invokeAfterMsgs.md +++ b/old_docs/API_docs_v66/methods/invokeAfterMsgs.md @@ -24,16 +24,13 @@ description: invokeAfterMsgs parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v66/methods/invokeWithLayer.md b/old_docs/API_docs_v66/methods/invokeWithLayer.md index 706036c4..d9a2c74c 100644 --- a/old_docs/API_docs_v66/methods/invokeWithLayer.md +++ b/old_docs/API_docs_v66/methods/invokeWithLayer.md @@ -41,16 +41,13 @@ description: invokeWithLayer parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v66/methods/invokeWithoutUpdates.md b/old_docs/API_docs_v66/methods/invokeWithoutUpdates.md index 10c6bfcf..f7d01765 100644 --- a/old_docs/API_docs_v66/methods/invokeWithoutUpdates.md +++ b/old_docs/API_docs_v66/methods/invokeWithoutUpdates.md @@ -23,16 +23,13 @@ description: invokeWithoutUpdates parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v66/methods/messages_addChatUser.md b/old_docs/API_docs_v66/methods/messages_addChatUser.md index 00da5a61..b9e6243d 100644 --- a/old_docs/API_docs_v66/methods/messages_addChatUser.md +++ b/old_docs/API_docs_v66/methods/messages_addChatUser.md @@ -40,13 +40,10 @@ description: messages.addChatUser parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v66/methods/messages_checkChatInvite.md b/old_docs/API_docs_v66/methods/messages_checkChatInvite.md index c5eb1c06..c4489469 100644 --- a/old_docs/API_docs_v66/methods/messages_checkChatInvite.md +++ b/old_docs/API_docs_v66/methods/messages_checkChatInvite.md @@ -32,13 +32,10 @@ description: messages.checkChatInvite parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v66/methods/messages_clearRecentStickers.md b/old_docs/API_docs_v66/methods/messages_clearRecentStickers.md index dda76d14..ae45b249 100644 --- a/old_docs/API_docs_v66/methods/messages_clearRecentStickers.md +++ b/old_docs/API_docs_v66/methods/messages_clearRecentStickers.md @@ -23,13 +23,10 @@ description: messages.clearRecentStickers parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v66/methods/messages_createChat.md b/old_docs/API_docs_v66/methods/messages_createChat.md index c643a022..c6c8f420 100644 --- a/old_docs/API_docs_v66/methods/messages_createChat.md +++ b/old_docs/API_docs_v66/methods/messages_createChat.md @@ -32,13 +32,10 @@ description: messages.createChat parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v66/methods/messages_deleteChatUser.md b/old_docs/API_docs_v66/methods/messages_deleteChatUser.md index 3d75d9cf..4b8c2aa5 100644 --- a/old_docs/API_docs_v66/methods/messages_deleteChatUser.md +++ b/old_docs/API_docs_v66/methods/messages_deleteChatUser.md @@ -33,16 +33,13 @@ description: messages.deleteChatUser parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v66/methods/messages_deleteHistory.md b/old_docs/API_docs_v66/methods/messages_deleteHistory.md index ce6ba6e7..ebe2c89c 100644 --- a/old_docs/API_docs_v66/methods/messages_deleteHistory.md +++ b/old_docs/API_docs_v66/methods/messages_deleteHistory.md @@ -32,13 +32,10 @@ description: messages.deleteHistory parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v66/methods/messages_deleteMessages.md b/old_docs/API_docs_v66/methods/messages_deleteMessages.md index 2b88a73f..5472cc72 100644 --- a/old_docs/API_docs_v66/methods/messages_deleteMessages.md +++ b/old_docs/API_docs_v66/methods/messages_deleteMessages.md @@ -31,16 +31,13 @@ description: messages.deleteMessages parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v66/methods/messages_editChatAdmin.md b/old_docs/API_docs_v66/methods/messages_editChatAdmin.md index e64d9da5..1b3ffa9f 100644 --- a/old_docs/API_docs_v66/methods/messages_editChatAdmin.md +++ b/old_docs/API_docs_v66/methods/messages_editChatAdmin.md @@ -32,13 +32,10 @@ description: messages.editChatAdmin parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v66/methods/messages_editChatPhoto.md b/old_docs/API_docs_v66/methods/messages_editChatPhoto.md index d225962d..8c5d9d47 100644 --- a/old_docs/API_docs_v66/methods/messages_editChatPhoto.md +++ b/old_docs/API_docs_v66/methods/messages_editChatPhoto.md @@ -35,16 +35,13 @@ description: messages.editChatPhoto parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v66/methods/messages_editChatTitle.md b/old_docs/API_docs_v66/methods/messages_editChatTitle.md index 5cb1c6d7..238c6d72 100644 --- a/old_docs/API_docs_v66/methods/messages_editChatTitle.md +++ b/old_docs/API_docs_v66/methods/messages_editChatTitle.md @@ -32,16 +32,13 @@ description: messages.editChatTitle parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v66/methods/messages_editInlineBotMessage.md b/old_docs/API_docs_v66/methods/messages_editInlineBotMessage.md index 621c81a3..c3489f9d 100644 --- a/old_docs/API_docs_v66/methods/messages_editInlineBotMessage.md +++ b/old_docs/API_docs_v66/methods/messages_editInlineBotMessage.md @@ -36,16 +36,13 @@ description: messages.editInlineBotMessage parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v66/methods/messages_editMessage.md b/old_docs/API_docs_v66/methods/messages_editMessage.md index b8cdda81..3a23c9ac 100644 --- a/old_docs/API_docs_v66/methods/messages_editMessage.md +++ b/old_docs/API_docs_v66/methods/messages_editMessage.md @@ -45,16 +45,13 @@ description: messages.editMessage parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v66/methods/messages_exportChatInvite.md b/old_docs/API_docs_v66/methods/messages_exportChatInvite.md index 4a6e28ff..78f2ff86 100644 --- a/old_docs/API_docs_v66/methods/messages_exportChatInvite.md +++ b/old_docs/API_docs_v66/methods/messages_exportChatInvite.md @@ -30,13 +30,10 @@ description: messages.exportChatInvite parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v66/methods/messages_forwardMessage.md b/old_docs/API_docs_v66/methods/messages_forwardMessage.md index 4e2362db..fbdbc955 100644 --- a/old_docs/API_docs_v66/methods/messages_forwardMessage.md +++ b/old_docs/API_docs_v66/methods/messages_forwardMessage.md @@ -34,16 +34,13 @@ description: messages.forwardMessage parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v66/methods/messages_forwardMessages.md b/old_docs/API_docs_v66/methods/messages_forwardMessages.md index b5e9b7e7..5a609390 100644 --- a/old_docs/API_docs_v66/methods/messages_forwardMessages.md +++ b/old_docs/API_docs_v66/methods/messages_forwardMessages.md @@ -56,16 +56,13 @@ description: messages.forwardMessages parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v66/methods/messages_getAllChats.md b/old_docs/API_docs_v66/methods/messages_getAllChats.md index c5037003..babcf17d 100644 --- a/old_docs/API_docs_v66/methods/messages_getAllChats.md +++ b/old_docs/API_docs_v66/methods/messages_getAllChats.md @@ -23,13 +23,10 @@ description: messages.getAllChats parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v66/methods/messages_getAllDrafts.md b/old_docs/API_docs_v66/methods/messages_getAllDrafts.md index cc447864..8550c5b8 100644 --- a/old_docs/API_docs_v66/methods/messages_getAllDrafts.md +++ b/old_docs/API_docs_v66/methods/messages_getAllDrafts.md @@ -18,13 +18,10 @@ description: messages.getAllDrafts parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v66/methods/messages_getAllStickers.md b/old_docs/API_docs_v66/methods/messages_getAllStickers.md index dc9e2432..034438a5 100644 --- a/old_docs/API_docs_v66/methods/messages_getAllStickers.md +++ b/old_docs/API_docs_v66/methods/messages_getAllStickers.md @@ -23,13 +23,10 @@ description: messages.getAllStickers parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v66/methods/messages_getArchivedStickers.md b/old_docs/API_docs_v66/methods/messages_getArchivedStickers.md index dddcc748..cdb7f0af 100644 --- a/old_docs/API_docs_v66/methods/messages_getArchivedStickers.md +++ b/old_docs/API_docs_v66/methods/messages_getArchivedStickers.md @@ -25,13 +25,10 @@ description: messages.getArchivedStickers parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v66/methods/messages_getAttachedStickers.md b/old_docs/API_docs_v66/methods/messages_getAttachedStickers.md index 250db6a8..79d4e30d 100644 --- a/old_docs/API_docs_v66/methods/messages_getAttachedStickers.md +++ b/old_docs/API_docs_v66/methods/messages_getAttachedStickers.md @@ -23,13 +23,10 @@ description: messages.getAttachedStickers parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v66/methods/messages_getBotCallbackAnswer.md b/old_docs/API_docs_v66/methods/messages_getBotCallbackAnswer.md index e905723f..afa5358c 100644 --- a/old_docs/API_docs_v66/methods/messages_getBotCallbackAnswer.md +++ b/old_docs/API_docs_v66/methods/messages_getBotCallbackAnswer.md @@ -37,13 +37,10 @@ description: messages.getBotCallbackAnswer parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v66/methods/messages_getChats.md b/old_docs/API_docs_v66/methods/messages_getChats.md index 6fa30cbd..c322613d 100644 --- a/old_docs/API_docs_v66/methods/messages_getChats.md +++ b/old_docs/API_docs_v66/methods/messages_getChats.md @@ -31,16 +31,13 @@ description: messages.getChats parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v66/methods/messages_getCommonChats.md b/old_docs/API_docs_v66/methods/messages_getCommonChats.md index 0c601ca9..8c9e2834 100644 --- a/old_docs/API_docs_v66/methods/messages_getCommonChats.md +++ b/old_docs/API_docs_v66/methods/messages_getCommonChats.md @@ -32,13 +32,10 @@ description: messages.getCommonChats parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v66/methods/messages_getDhConfig.md b/old_docs/API_docs_v66/methods/messages_getDhConfig.md index aac3354d..f97684d2 100644 --- a/old_docs/API_docs_v66/methods/messages_getDhConfig.md +++ b/old_docs/API_docs_v66/methods/messages_getDhConfig.md @@ -31,13 +31,10 @@ description: messages.getDhConfig parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v66/methods/messages_getDialogs.md b/old_docs/API_docs_v66/methods/messages_getDialogs.md index 131b75b7..cef5ecc6 100644 --- a/old_docs/API_docs_v66/methods/messages_getDialogs.md +++ b/old_docs/API_docs_v66/methods/messages_getDialogs.md @@ -37,13 +37,10 @@ description: messages.getDialogs parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v66/methods/messages_getDocumentByHash.md b/old_docs/API_docs_v66/methods/messages_getDocumentByHash.md index dda54bdd..3902ac44 100644 --- a/old_docs/API_docs_v66/methods/messages_getDocumentByHash.md +++ b/old_docs/API_docs_v66/methods/messages_getDocumentByHash.md @@ -32,16 +32,13 @@ description: messages.getDocumentByHash parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v66/methods/messages_getFeaturedStickers.md b/old_docs/API_docs_v66/methods/messages_getFeaturedStickers.md index 9573464a..5aad1810 100644 --- a/old_docs/API_docs_v66/methods/messages_getFeaturedStickers.md +++ b/old_docs/API_docs_v66/methods/messages_getFeaturedStickers.md @@ -23,13 +23,10 @@ description: messages.getFeaturedStickers parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v66/methods/messages_getGameHighScores.md b/old_docs/API_docs_v66/methods/messages_getGameHighScores.md index 935bb95a..d8a94ae3 100644 --- a/old_docs/API_docs_v66/methods/messages_getGameHighScores.md +++ b/old_docs/API_docs_v66/methods/messages_getGameHighScores.md @@ -33,16 +33,13 @@ description: messages.getGameHighScores parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v66/methods/messages_getHistory.md b/old_docs/API_docs_v66/methods/messages_getHistory.md index a48a465e..4c3ef2ee 100644 --- a/old_docs/API_docs_v66/methods/messages_getHistory.md +++ b/old_docs/API_docs_v66/methods/messages_getHistory.md @@ -41,13 +41,10 @@ description: messages.getHistory parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v66/methods/messages_getInlineBotResults.md b/old_docs/API_docs_v66/methods/messages_getInlineBotResults.md index 61366580..61b927fc 100644 --- a/old_docs/API_docs_v66/methods/messages_getInlineBotResults.md +++ b/old_docs/API_docs_v66/methods/messages_getInlineBotResults.md @@ -37,13 +37,10 @@ description: messages.getInlineBotResults parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v66/methods/messages_getInlineGameHighScores.md b/old_docs/API_docs_v66/methods/messages_getInlineGameHighScores.md index 7cc04d0d..40eff3a9 100644 --- a/old_docs/API_docs_v66/methods/messages_getInlineGameHighScores.md +++ b/old_docs/API_docs_v66/methods/messages_getInlineGameHighScores.md @@ -32,16 +32,13 @@ description: messages.getInlineGameHighScores parameters, return type and exampl ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v66/methods/messages_getMaskStickers.md b/old_docs/API_docs_v66/methods/messages_getMaskStickers.md index 0ab194df..ca964647 100644 --- a/old_docs/API_docs_v66/methods/messages_getMaskStickers.md +++ b/old_docs/API_docs_v66/methods/messages_getMaskStickers.md @@ -23,13 +23,10 @@ description: messages.getMaskStickers parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v66/methods/messages_getMessageEditData.md b/old_docs/API_docs_v66/methods/messages_getMessageEditData.md index a8b135c6..15085153 100644 --- a/old_docs/API_docs_v66/methods/messages_getMessageEditData.md +++ b/old_docs/API_docs_v66/methods/messages_getMessageEditData.md @@ -32,13 +32,10 @@ description: messages.getMessageEditData parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v66/methods/messages_getMessages.md b/old_docs/API_docs_v66/methods/messages_getMessages.md index 5a970246..787c46dd 100644 --- a/old_docs/API_docs_v66/methods/messages_getMessages.md +++ b/old_docs/API_docs_v66/methods/messages_getMessages.md @@ -23,16 +23,13 @@ description: messages.getMessages parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v66/methods/messages_getMessagesViews.md b/old_docs/API_docs_v66/methods/messages_getMessagesViews.md index 263f3f95..de5692dc 100644 --- a/old_docs/API_docs_v66/methods/messages_getMessagesViews.md +++ b/old_docs/API_docs_v66/methods/messages_getMessagesViews.md @@ -34,13 +34,10 @@ description: messages.getMessagesViews parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v66/methods/messages_getPeerDialogs.md b/old_docs/API_docs_v66/methods/messages_getPeerDialogs.md index 3da60038..226948ae 100644 --- a/old_docs/API_docs_v66/methods/messages_getPeerDialogs.md +++ b/old_docs/API_docs_v66/methods/messages_getPeerDialogs.md @@ -31,13 +31,10 @@ description: messages.getPeerDialogs parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v66/methods/messages_getPeerSettings.md b/old_docs/API_docs_v66/methods/messages_getPeerSettings.md index d3e3cfc3..2a92f2da 100644 --- a/old_docs/API_docs_v66/methods/messages_getPeerSettings.md +++ b/old_docs/API_docs_v66/methods/messages_getPeerSettings.md @@ -31,13 +31,10 @@ description: messages.getPeerSettings parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v66/methods/messages_getPinnedDialogs.md b/old_docs/API_docs_v66/methods/messages_getPinnedDialogs.md index 110eab05..ec744f01 100644 --- a/old_docs/API_docs_v66/methods/messages_getPinnedDialogs.md +++ b/old_docs/API_docs_v66/methods/messages_getPinnedDialogs.md @@ -18,13 +18,10 @@ description: messages.getPinnedDialogs parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v66/methods/messages_getRecentStickers.md b/old_docs/API_docs_v66/methods/messages_getRecentStickers.md index 10d1a0df..a6ae162f 100644 --- a/old_docs/API_docs_v66/methods/messages_getRecentStickers.md +++ b/old_docs/API_docs_v66/methods/messages_getRecentStickers.md @@ -24,13 +24,10 @@ description: messages.getRecentStickers parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v66/methods/messages_getSavedGifs.md b/old_docs/API_docs_v66/methods/messages_getSavedGifs.md index 7cce4ffe..4986d812 100644 --- a/old_docs/API_docs_v66/methods/messages_getSavedGifs.md +++ b/old_docs/API_docs_v66/methods/messages_getSavedGifs.md @@ -23,13 +23,10 @@ description: messages.getSavedGifs parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v66/methods/messages_getStickerSet.md b/old_docs/API_docs_v66/methods/messages_getStickerSet.md index 59f33916..b480e0fe 100644 --- a/old_docs/API_docs_v66/methods/messages_getStickerSet.md +++ b/old_docs/API_docs_v66/methods/messages_getStickerSet.md @@ -30,16 +30,13 @@ description: messages.getStickerSet parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v66/methods/messages_getWebPage.md b/old_docs/API_docs_v66/methods/messages_getWebPage.md index 35f6e545..e886b020 100644 --- a/old_docs/API_docs_v66/methods/messages_getWebPage.md +++ b/old_docs/API_docs_v66/methods/messages_getWebPage.md @@ -31,13 +31,10 @@ description: messages.getWebPage parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v66/methods/messages_getWebPagePreview.md b/old_docs/API_docs_v66/methods/messages_getWebPagePreview.md index a89600b1..d3908933 100644 --- a/old_docs/API_docs_v66/methods/messages_getWebPagePreview.md +++ b/old_docs/API_docs_v66/methods/messages_getWebPagePreview.md @@ -23,13 +23,10 @@ description: messages.getWebPagePreview parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v66/methods/messages_hideReportSpam.md b/old_docs/API_docs_v66/methods/messages_hideReportSpam.md index 2dfe4dd7..5635665c 100644 --- a/old_docs/API_docs_v66/methods/messages_hideReportSpam.md +++ b/old_docs/API_docs_v66/methods/messages_hideReportSpam.md @@ -30,13 +30,10 @@ description: messages.hideReportSpam parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v66/methods/messages_importChatInvite.md b/old_docs/API_docs_v66/methods/messages_importChatInvite.md index 9d77304d..9dcfa56d 100644 --- a/old_docs/API_docs_v66/methods/messages_importChatInvite.md +++ b/old_docs/API_docs_v66/methods/messages_importChatInvite.md @@ -36,13 +36,10 @@ description: messages.importChatInvite parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v66/methods/messages_installStickerSet.md b/old_docs/API_docs_v66/methods/messages_installStickerSet.md index 3dde52a7..016d5ece 100644 --- a/old_docs/API_docs_v66/methods/messages_installStickerSet.md +++ b/old_docs/API_docs_v66/methods/messages_installStickerSet.md @@ -31,13 +31,10 @@ description: messages.installStickerSet parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v66/methods/messages_migrateChat.md b/old_docs/API_docs_v66/methods/messages_migrateChat.md index 22d2fbf0..a8274e70 100644 --- a/old_docs/API_docs_v66/methods/messages_migrateChat.md +++ b/old_docs/API_docs_v66/methods/messages_migrateChat.md @@ -32,13 +32,10 @@ description: messages.migrateChat parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v66/methods/messages_readEncryptedHistory.md b/old_docs/API_docs_v66/methods/messages_readEncryptedHistory.md index 766ee07d..f38f6b07 100644 --- a/old_docs/API_docs_v66/methods/messages_readEncryptedHistory.md +++ b/old_docs/API_docs_v66/methods/messages_readEncryptedHistory.md @@ -31,16 +31,13 @@ description: messages.readEncryptedHistory parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v66/methods/messages_readFeaturedStickers.md b/old_docs/API_docs_v66/methods/messages_readFeaturedStickers.md index c7ce7aca..02055bf3 100644 --- a/old_docs/API_docs_v66/methods/messages_readFeaturedStickers.md +++ b/old_docs/API_docs_v66/methods/messages_readFeaturedStickers.md @@ -23,13 +23,10 @@ description: messages.readFeaturedStickers parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v66/methods/messages_readHistory.md b/old_docs/API_docs_v66/methods/messages_readHistory.md index 1aa7830a..fef62130 100644 --- a/old_docs/API_docs_v66/methods/messages_readHistory.md +++ b/old_docs/API_docs_v66/methods/messages_readHistory.md @@ -32,13 +32,10 @@ description: messages.readHistory parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v66/methods/messages_readMessageContents.md b/old_docs/API_docs_v66/methods/messages_readMessageContents.md index 4b1abda0..7a6055fc 100644 --- a/old_docs/API_docs_v66/methods/messages_readMessageContents.md +++ b/old_docs/API_docs_v66/methods/messages_readMessageContents.md @@ -23,13 +23,10 @@ description: messages.readMessageContents parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v66/methods/messages_receivedMessages.md b/old_docs/API_docs_v66/methods/messages_receivedMessages.md index 588ac5cf..e2cf3a2f 100644 --- a/old_docs/API_docs_v66/methods/messages_receivedMessages.md +++ b/old_docs/API_docs_v66/methods/messages_receivedMessages.md @@ -23,13 +23,10 @@ description: messages.receivedMessages parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v66/methods/messages_receivedQueue.md b/old_docs/API_docs_v66/methods/messages_receivedQueue.md index 3c7f1d4f..38f504b3 100644 --- a/old_docs/API_docs_v66/methods/messages_receivedQueue.md +++ b/old_docs/API_docs_v66/methods/messages_receivedQueue.md @@ -30,16 +30,13 @@ description: messages.receivedQueue parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v66/methods/messages_reorderPinnedDialogs.md b/old_docs/API_docs_v66/methods/messages_reorderPinnedDialogs.md index 30102fd7..b4bfb84f 100644 --- a/old_docs/API_docs_v66/methods/messages_reorderPinnedDialogs.md +++ b/old_docs/API_docs_v66/methods/messages_reorderPinnedDialogs.md @@ -31,13 +31,10 @@ description: messages.reorderPinnedDialogs parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v66/methods/messages_reorderStickerSets.md b/old_docs/API_docs_v66/methods/messages_reorderStickerSets.md index 5c47f174..fa094550 100644 --- a/old_docs/API_docs_v66/methods/messages_reorderStickerSets.md +++ b/old_docs/API_docs_v66/methods/messages_reorderStickerSets.md @@ -24,13 +24,10 @@ description: messages.reorderStickerSets parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v66/methods/messages_reportEncryptedSpam.md b/old_docs/API_docs_v66/methods/messages_reportEncryptedSpam.md index 30ef3473..aed7a891 100644 --- a/old_docs/API_docs_v66/methods/messages_reportEncryptedSpam.md +++ b/old_docs/API_docs_v66/methods/messages_reportEncryptedSpam.md @@ -30,13 +30,10 @@ description: messages.reportEncryptedSpam parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v66/methods/messages_reportSpam.md b/old_docs/API_docs_v66/methods/messages_reportSpam.md index bfadb9ab..08c96d44 100644 --- a/old_docs/API_docs_v66/methods/messages_reportSpam.md +++ b/old_docs/API_docs_v66/methods/messages_reportSpam.md @@ -30,13 +30,10 @@ description: messages.reportSpam parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v66/methods/messages_saveDraft.md b/old_docs/API_docs_v66/methods/messages_saveDraft.md index 42308b46..f68090c0 100644 --- a/old_docs/API_docs_v66/methods/messages_saveDraft.md +++ b/old_docs/API_docs_v66/methods/messages_saveDraft.md @@ -35,13 +35,10 @@ description: messages.saveDraft parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v66/methods/messages_saveGif.md b/old_docs/API_docs_v66/methods/messages_saveGif.md index 31e48632..d86d539a 100644 --- a/old_docs/API_docs_v66/methods/messages_saveGif.md +++ b/old_docs/API_docs_v66/methods/messages_saveGif.md @@ -31,13 +31,10 @@ description: messages.saveGif parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v66/methods/messages_saveRecentSticker.md b/old_docs/API_docs_v66/methods/messages_saveRecentSticker.md index 8d45be5e..029ca763 100644 --- a/old_docs/API_docs_v66/methods/messages_saveRecentSticker.md +++ b/old_docs/API_docs_v66/methods/messages_saveRecentSticker.md @@ -32,13 +32,10 @@ description: messages.saveRecentSticker parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v66/methods/messages_search.md b/old_docs/API_docs_v66/methods/messages_search.md index 87073d00..1e809cf2 100644 --- a/old_docs/API_docs_v66/methods/messages_search.md +++ b/old_docs/API_docs_v66/methods/messages_search.md @@ -43,13 +43,10 @@ description: messages.search parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v66/methods/messages_searchGifs.md b/old_docs/API_docs_v66/methods/messages_searchGifs.md index 3f4c4838..dd804c99 100644 --- a/old_docs/API_docs_v66/methods/messages_searchGifs.md +++ b/old_docs/API_docs_v66/methods/messages_searchGifs.md @@ -31,13 +31,10 @@ description: messages.searchGifs parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v66/methods/messages_searchGlobal.md b/old_docs/API_docs_v66/methods/messages_searchGlobal.md index 0553dd7a..4b45eed2 100644 --- a/old_docs/API_docs_v66/methods/messages_searchGlobal.md +++ b/old_docs/API_docs_v66/methods/messages_searchGlobal.md @@ -34,13 +34,10 @@ description: messages.searchGlobal parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v66/methods/messages_sendEncrypted.md b/old_docs/API_docs_v66/methods/messages_sendEncrypted.md index 82eeec92..ba9f796b 100644 --- a/old_docs/API_docs_v66/methods/messages_sendEncrypted.md +++ b/old_docs/API_docs_v66/methods/messages_sendEncrypted.md @@ -34,16 +34,13 @@ description: messages.sendEncrypted parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v66/methods/messages_sendEncryptedFile.md b/old_docs/API_docs_v66/methods/messages_sendEncryptedFile.md index 8f7a73d9..db16bf2d 100644 --- a/old_docs/API_docs_v66/methods/messages_sendEncryptedFile.md +++ b/old_docs/API_docs_v66/methods/messages_sendEncryptedFile.md @@ -32,16 +32,13 @@ description: messages.sendEncryptedFile parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v66/methods/messages_sendEncryptedService.md b/old_docs/API_docs_v66/methods/messages_sendEncryptedService.md index d427f6c3..fd4e2627 100644 --- a/old_docs/API_docs_v66/methods/messages_sendEncryptedService.md +++ b/old_docs/API_docs_v66/methods/messages_sendEncryptedService.md @@ -34,16 +34,13 @@ description: messages.sendEncryptedService parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v66/methods/messages_sendInlineBotResult.md b/old_docs/API_docs_v66/methods/messages_sendInlineBotResult.md index 6aeeb67d..d974fe69 100644 --- a/old_docs/API_docs_v66/methods/messages_sendInlineBotResult.md +++ b/old_docs/API_docs_v66/methods/messages_sendInlineBotResult.md @@ -39,13 +39,10 @@ description: messages.sendInlineBotResult parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v66/methods/messages_sendMedia.md b/old_docs/API_docs_v66/methods/messages_sendMedia.md index b3ceb5d4..b58bf325 100644 --- a/old_docs/API_docs_v66/methods/messages_sendMedia.md +++ b/old_docs/API_docs_v66/methods/messages_sendMedia.md @@ -59,16 +59,13 @@ description: messages.sendMedia parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v66/methods/messages_sendMessage.md b/old_docs/API_docs_v66/methods/messages_sendMessage.md index 60b50412..3a515129 100644 --- a/old_docs/API_docs_v66/methods/messages_sendMessage.md +++ b/old_docs/API_docs_v66/methods/messages_sendMessage.md @@ -58,16 +58,13 @@ description: messages.sendMessage parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v66/methods/messages_setBotCallbackAnswer.md b/old_docs/API_docs_v66/methods/messages_setBotCallbackAnswer.md index 2c51854f..2901a558 100644 --- a/old_docs/API_docs_v66/methods/messages_setBotCallbackAnswer.md +++ b/old_docs/API_docs_v66/methods/messages_setBotCallbackAnswer.md @@ -34,16 +34,13 @@ description: messages.setBotCallbackAnswer parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v66/methods/messages_setBotPrecheckoutResults.md b/old_docs/API_docs_v66/methods/messages_setBotPrecheckoutResults.md index 25ed5ed5..5666e9ff 100644 --- a/old_docs/API_docs_v66/methods/messages_setBotPrecheckoutResults.md +++ b/old_docs/API_docs_v66/methods/messages_setBotPrecheckoutResults.md @@ -32,16 +32,13 @@ description: messages.setBotPrecheckoutResults parameters, return type and examp ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v66/methods/messages_setBotShippingResults.md b/old_docs/API_docs_v66/methods/messages_setBotShippingResults.md index 49ac2896..95376b64 100644 --- a/old_docs/API_docs_v66/methods/messages_setBotShippingResults.md +++ b/old_docs/API_docs_v66/methods/messages_setBotShippingResults.md @@ -32,16 +32,13 @@ description: messages.setBotShippingResults parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v66/methods/messages_setEncryptedTyping.md b/old_docs/API_docs_v66/methods/messages_setEncryptedTyping.md index a05b94dd..aeae6ff7 100644 --- a/old_docs/API_docs_v66/methods/messages_setEncryptedTyping.md +++ b/old_docs/API_docs_v66/methods/messages_setEncryptedTyping.md @@ -31,13 +31,10 @@ description: messages.setEncryptedTyping parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v66/methods/messages_setGameScore.md b/old_docs/API_docs_v66/methods/messages_setGameScore.md index 3137f7c9..c8ef5c49 100644 --- a/old_docs/API_docs_v66/methods/messages_setGameScore.md +++ b/old_docs/API_docs_v66/methods/messages_setGameScore.md @@ -36,16 +36,13 @@ description: messages.setGameScore parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v66/methods/messages_setInlineBotResults.md b/old_docs/API_docs_v66/methods/messages_setInlineBotResults.md index 8b5625f3..8b49c4c7 100644 --- a/old_docs/API_docs_v66/methods/messages_setInlineBotResults.md +++ b/old_docs/API_docs_v66/methods/messages_setInlineBotResults.md @@ -46,16 +46,13 @@ description: messages.setInlineBotResults parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v66/methods/messages_setInlineGameScore.md b/old_docs/API_docs_v66/methods/messages_setInlineGameScore.md index 36752f35..4c43e7d2 100644 --- a/old_docs/API_docs_v66/methods/messages_setInlineGameScore.md +++ b/old_docs/API_docs_v66/methods/messages_setInlineGameScore.md @@ -35,16 +35,13 @@ description: messages.setInlineGameScore parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v66/methods/messages_setTyping.md b/old_docs/API_docs_v66/methods/messages_setTyping.md index 9ef8caf5..f6b7b7b5 100644 --- a/old_docs/API_docs_v66/methods/messages_setTyping.md +++ b/old_docs/API_docs_v66/methods/messages_setTyping.md @@ -37,16 +37,13 @@ description: messages.setTyping parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v66/methods/messages_startBot.md b/old_docs/API_docs_v66/methods/messages_startBot.md index 8d98e390..b33ab013 100644 --- a/old_docs/API_docs_v66/methods/messages_startBot.md +++ b/old_docs/API_docs_v66/methods/messages_startBot.md @@ -35,13 +35,10 @@ description: messages.startBot parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v66/methods/messages_toggleChatAdmins.md b/old_docs/API_docs_v66/methods/messages_toggleChatAdmins.md index 3bf8a419..97328065 100644 --- a/old_docs/API_docs_v66/methods/messages_toggleChatAdmins.md +++ b/old_docs/API_docs_v66/methods/messages_toggleChatAdmins.md @@ -32,13 +32,10 @@ description: messages.toggleChatAdmins parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v66/methods/messages_toggleDialogPin.md b/old_docs/API_docs_v66/methods/messages_toggleDialogPin.md index f35f2f40..7853df5e 100644 --- a/old_docs/API_docs_v66/methods/messages_toggleDialogPin.md +++ b/old_docs/API_docs_v66/methods/messages_toggleDialogPin.md @@ -31,13 +31,10 @@ description: messages.toggleDialogPin parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v66/methods/messages_uninstallStickerSet.md b/old_docs/API_docs_v66/methods/messages_uninstallStickerSet.md index 6763e64f..76a3e3e2 100644 --- a/old_docs/API_docs_v66/methods/messages_uninstallStickerSet.md +++ b/old_docs/API_docs_v66/methods/messages_uninstallStickerSet.md @@ -30,13 +30,10 @@ description: messages.uninstallStickerSet parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v66/methods/payments_clearSavedInfo.md b/old_docs/API_docs_v66/methods/payments_clearSavedInfo.md index a77c50d9..fb9bae07 100644 --- a/old_docs/API_docs_v66/methods/payments_clearSavedInfo.md +++ b/old_docs/API_docs_v66/methods/payments_clearSavedInfo.md @@ -24,13 +24,10 @@ description: payments.clearSavedInfo parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v66/methods/payments_getPaymentForm.md b/old_docs/API_docs_v66/methods/payments_getPaymentForm.md index 15f6e26b..141c47f2 100644 --- a/old_docs/API_docs_v66/methods/payments_getPaymentForm.md +++ b/old_docs/API_docs_v66/methods/payments_getPaymentForm.md @@ -30,13 +30,10 @@ description: payments.getPaymentForm parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v66/methods/payments_getPaymentReceipt.md b/old_docs/API_docs_v66/methods/payments_getPaymentReceipt.md index 51433563..f6aa1ab6 100644 --- a/old_docs/API_docs_v66/methods/payments_getPaymentReceipt.md +++ b/old_docs/API_docs_v66/methods/payments_getPaymentReceipt.md @@ -30,13 +30,10 @@ description: payments.getPaymentReceipt parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v66/methods/payments_getSavedInfo.md b/old_docs/API_docs_v66/methods/payments_getSavedInfo.md index a586dcd9..4104679a 100644 --- a/old_docs/API_docs_v66/methods/payments_getSavedInfo.md +++ b/old_docs/API_docs_v66/methods/payments_getSavedInfo.md @@ -18,13 +18,10 @@ description: payments.getSavedInfo parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v66/methods/payments_sendPaymentForm.md b/old_docs/API_docs_v66/methods/payments_sendPaymentForm.md index a63a3980..180a7279 100644 --- a/old_docs/API_docs_v66/methods/payments_sendPaymentForm.md +++ b/old_docs/API_docs_v66/methods/payments_sendPaymentForm.md @@ -33,13 +33,10 @@ description: payments.sendPaymentForm parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v66/methods/payments_validateRequestedInfo.md b/old_docs/API_docs_v66/methods/payments_validateRequestedInfo.md index d839a2df..acfd1852 100644 --- a/old_docs/API_docs_v66/methods/payments_validateRequestedInfo.md +++ b/old_docs/API_docs_v66/methods/payments_validateRequestedInfo.md @@ -32,13 +32,10 @@ description: payments.validateRequestedInfo parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v66/methods/phone_getCallConfig.md b/old_docs/API_docs_v66/methods/phone_getCallConfig.md index a85fed0e..3f18d7ca 100644 --- a/old_docs/API_docs_v66/methods/phone_getCallConfig.md +++ b/old_docs/API_docs_v66/methods/phone_getCallConfig.md @@ -18,13 +18,10 @@ description: phone.getCallConfig parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v66/methods/phone_receivedCall.md b/old_docs/API_docs_v66/methods/phone_receivedCall.md index 9d59b1ea..8ca6a4e1 100644 --- a/old_docs/API_docs_v66/methods/phone_receivedCall.md +++ b/old_docs/API_docs_v66/methods/phone_receivedCall.md @@ -31,13 +31,10 @@ description: phone.receivedCall parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v66/methods/phone_saveCallDebug.md b/old_docs/API_docs_v66/methods/phone_saveCallDebug.md index 4dee5c97..ea3fa2d7 100644 --- a/old_docs/API_docs_v66/methods/phone_saveCallDebug.md +++ b/old_docs/API_docs_v66/methods/phone_saveCallDebug.md @@ -32,13 +32,10 @@ description: phone.saveCallDebug parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v66/methods/phone_setCallRating.md b/old_docs/API_docs_v66/methods/phone_setCallRating.md index fea236d1..c6e5d7fa 100644 --- a/old_docs/API_docs_v66/methods/phone_setCallRating.md +++ b/old_docs/API_docs_v66/methods/phone_setCallRating.md @@ -32,13 +32,10 @@ description: phone.setCallRating parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v66/methods/photos_deletePhotos.md b/old_docs/API_docs_v66/methods/photos_deletePhotos.md index e9cd459d..61768b1e 100644 --- a/old_docs/API_docs_v66/methods/photos_deletePhotos.md +++ b/old_docs/API_docs_v66/methods/photos_deletePhotos.md @@ -23,13 +23,10 @@ description: photos.deletePhotos parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v66/methods/photos_getUserPhotos.md b/old_docs/API_docs_v66/methods/photos_getUserPhotos.md index d6c2a380..095363e7 100644 --- a/old_docs/API_docs_v66/methods/photos_getUserPhotos.md +++ b/old_docs/API_docs_v66/methods/photos_getUserPhotos.md @@ -34,16 +34,13 @@ description: photos.getUserPhotos parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v66/methods/photos_updateProfilePhoto.md b/old_docs/API_docs_v66/methods/photos_updateProfilePhoto.md index ea3b78ec..d90aca22 100644 --- a/old_docs/API_docs_v66/methods/photos_updateProfilePhoto.md +++ b/old_docs/API_docs_v66/methods/photos_updateProfilePhoto.md @@ -23,13 +23,10 @@ description: photos.updateProfilePhoto parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v66/methods/photos_uploadProfilePhoto.md b/old_docs/API_docs_v66/methods/photos_uploadProfilePhoto.md index 58541f23..987e721c 100644 --- a/old_docs/API_docs_v66/methods/photos_uploadProfilePhoto.md +++ b/old_docs/API_docs_v66/methods/photos_uploadProfilePhoto.md @@ -34,13 +34,10 @@ description: photos.uploadProfilePhoto parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v66/methods/ping.md b/old_docs/API_docs_v66/methods/ping.md index 5bfe9dde..7c20ca86 100644 --- a/old_docs/API_docs_v66/methods/ping.md +++ b/old_docs/API_docs_v66/methods/ping.md @@ -23,16 +23,13 @@ description: ping parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v66/methods/ping_delay_disconnect.md b/old_docs/API_docs_v66/methods/ping_delay_disconnect.md index b4b1e265..e8b62005 100644 --- a/old_docs/API_docs_v66/methods/ping_delay_disconnect.md +++ b/old_docs/API_docs_v66/methods/ping_delay_disconnect.md @@ -24,16 +24,13 @@ description: ping_delay_disconnect parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v66/methods/req_DH_params.md b/old_docs/API_docs_v66/methods/req_DH_params.md index 51632fe0..697540d8 100644 --- a/old_docs/API_docs_v66/methods/req_DH_params.md +++ b/old_docs/API_docs_v66/methods/req_DH_params.md @@ -28,16 +28,13 @@ description: req_DH_params parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v66/methods/req_pq.md b/old_docs/API_docs_v66/methods/req_pq.md index 2f005ce2..7a583643 100644 --- a/old_docs/API_docs_v66/methods/req_pq.md +++ b/old_docs/API_docs_v66/methods/req_pq.md @@ -23,16 +23,13 @@ description: req_pq parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v66/methods/rpc_drop_answer.md b/old_docs/API_docs_v66/methods/rpc_drop_answer.md index 48e894a9..e15ddca9 100644 --- a/old_docs/API_docs_v66/methods/rpc_drop_answer.md +++ b/old_docs/API_docs_v66/methods/rpc_drop_answer.md @@ -23,16 +23,13 @@ description: rpc_drop_answer parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v66/methods/set_client_DH_params.md b/old_docs/API_docs_v66/methods/set_client_DH_params.md index 25f0f387..8721ed40 100644 --- a/old_docs/API_docs_v66/methods/set_client_DH_params.md +++ b/old_docs/API_docs_v66/methods/set_client_DH_params.md @@ -25,16 +25,13 @@ description: set_client_DH_params parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v66/methods/upload_getWebFile.md b/old_docs/API_docs_v66/methods/upload_getWebFile.md index ec7c05b4..8744dac5 100644 --- a/old_docs/API_docs_v66/methods/upload_getWebFile.md +++ b/old_docs/API_docs_v66/methods/upload_getWebFile.md @@ -32,13 +32,10 @@ description: upload.getWebFile parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v66/methods/users_getUsers.md b/old_docs/API_docs_v66/methods/users_getUsers.md index 6a44d258..3a981d57 100644 --- a/old_docs/API_docs_v66/methods/users_getUsers.md +++ b/old_docs/API_docs_v66/methods/users_getUsers.md @@ -33,16 +33,13 @@ description: users.getUsers parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v68/methods/account_changePhone.md b/old_docs/API_docs_v68/methods/account_changePhone.md index 5d1801d0..e47ef6a7 100644 --- a/old_docs/API_docs_v68/methods/account_changePhone.md +++ b/old_docs/API_docs_v68/methods/account_changePhone.md @@ -32,13 +32,10 @@ description: account.changePhone parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v68/methods/account_checkUsername.md b/old_docs/API_docs_v68/methods/account_checkUsername.md index afc59b6c..40cf822f 100644 --- a/old_docs/API_docs_v68/methods/account_checkUsername.md +++ b/old_docs/API_docs_v68/methods/account_checkUsername.md @@ -30,13 +30,10 @@ description: account.checkUsername parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v68/methods/account_confirmPhone.md b/old_docs/API_docs_v68/methods/account_confirmPhone.md index 0d2dc5c6..8dd79d94 100644 --- a/old_docs/API_docs_v68/methods/account_confirmPhone.md +++ b/old_docs/API_docs_v68/methods/account_confirmPhone.md @@ -32,13 +32,10 @@ description: account.confirmPhone parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v68/methods/account_deleteAccount.md b/old_docs/API_docs_v68/methods/account_deleteAccount.md index 5abcd0ec..6f1bbda9 100644 --- a/old_docs/API_docs_v68/methods/account_deleteAccount.md +++ b/old_docs/API_docs_v68/methods/account_deleteAccount.md @@ -23,13 +23,10 @@ description: account.deleteAccount parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v68/methods/account_getAccountTTL.md b/old_docs/API_docs_v68/methods/account_getAccountTTL.md index 3520fbef..538b1d7a 100644 --- a/old_docs/API_docs_v68/methods/account_getAccountTTL.md +++ b/old_docs/API_docs_v68/methods/account_getAccountTTL.md @@ -18,13 +18,10 @@ description: account.getAccountTTL parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v68/methods/account_getAuthorizations.md b/old_docs/API_docs_v68/methods/account_getAuthorizations.md index 91bbce5e..f138d517 100644 --- a/old_docs/API_docs_v68/methods/account_getAuthorizations.md +++ b/old_docs/API_docs_v68/methods/account_getAuthorizations.md @@ -18,13 +18,10 @@ description: account.getAuthorizations parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v68/methods/account_getNotifySettings.md b/old_docs/API_docs_v68/methods/account_getNotifySettings.md index 8ee710d8..a48eed2f 100644 --- a/old_docs/API_docs_v68/methods/account_getNotifySettings.md +++ b/old_docs/API_docs_v68/methods/account_getNotifySettings.md @@ -30,13 +30,10 @@ description: account.getNotifySettings parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v68/methods/account_getPassword.md b/old_docs/API_docs_v68/methods/account_getPassword.md index 4d9fd015..1abf6174 100644 --- a/old_docs/API_docs_v68/methods/account_getPassword.md +++ b/old_docs/API_docs_v68/methods/account_getPassword.md @@ -18,13 +18,10 @@ description: account.getPassword parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v68/methods/account_getPasswordSettings.md b/old_docs/API_docs_v68/methods/account_getPasswordSettings.md index 02cb77f7..aec5b989 100644 --- a/old_docs/API_docs_v68/methods/account_getPasswordSettings.md +++ b/old_docs/API_docs_v68/methods/account_getPasswordSettings.md @@ -30,13 +30,10 @@ description: account.getPasswordSettings parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v68/methods/account_getPrivacy.md b/old_docs/API_docs_v68/methods/account_getPrivacy.md index 52786b79..8bbe9795 100644 --- a/old_docs/API_docs_v68/methods/account_getPrivacy.md +++ b/old_docs/API_docs_v68/methods/account_getPrivacy.md @@ -30,13 +30,10 @@ description: account.getPrivacy parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v68/methods/account_getTmpPassword.md b/old_docs/API_docs_v68/methods/account_getTmpPassword.md index 83ab09b1..d9bd30d8 100644 --- a/old_docs/API_docs_v68/methods/account_getTmpPassword.md +++ b/old_docs/API_docs_v68/methods/account_getTmpPassword.md @@ -32,13 +32,10 @@ description: account.getTmpPassword parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v68/methods/account_getWallPapers.md b/old_docs/API_docs_v68/methods/account_getWallPapers.md index 88c8a701..a71543d0 100644 --- a/old_docs/API_docs_v68/methods/account_getWallPapers.md +++ b/old_docs/API_docs_v68/methods/account_getWallPapers.md @@ -18,13 +18,10 @@ description: account.getWallPapers parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v68/methods/account_registerDevice.md b/old_docs/API_docs_v68/methods/account_registerDevice.md index 3cc7f98d..8be04ad2 100644 --- a/old_docs/API_docs_v68/methods/account_registerDevice.md +++ b/old_docs/API_docs_v68/methods/account_registerDevice.md @@ -31,13 +31,10 @@ description: account.registerDevice parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v68/methods/account_reportPeer.md b/old_docs/API_docs_v68/methods/account_reportPeer.md index 1545c3b8..1ae9f4d4 100644 --- a/old_docs/API_docs_v68/methods/account_reportPeer.md +++ b/old_docs/API_docs_v68/methods/account_reportPeer.md @@ -31,13 +31,10 @@ description: account.reportPeer parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v68/methods/account_resetAuthorization.md b/old_docs/API_docs_v68/methods/account_resetAuthorization.md index e44334f2..0438cba3 100644 --- a/old_docs/API_docs_v68/methods/account_resetAuthorization.md +++ b/old_docs/API_docs_v68/methods/account_resetAuthorization.md @@ -30,13 +30,10 @@ description: account.resetAuthorization parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v68/methods/account_resetNotifySettings.md b/old_docs/API_docs_v68/methods/account_resetNotifySettings.md index 155ede68..92db4f4f 100644 --- a/old_docs/API_docs_v68/methods/account_resetNotifySettings.md +++ b/old_docs/API_docs_v68/methods/account_resetNotifySettings.md @@ -18,13 +18,10 @@ description: account.resetNotifySettings parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v68/methods/account_sendChangePhoneCode.md b/old_docs/API_docs_v68/methods/account_sendChangePhoneCode.md index 4be218f2..017b5f7f 100644 --- a/old_docs/API_docs_v68/methods/account_sendChangePhoneCode.md +++ b/old_docs/API_docs_v68/methods/account_sendChangePhoneCode.md @@ -32,13 +32,10 @@ description: account.sendChangePhoneCode parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v68/methods/account_sendConfirmPhoneCode.md b/old_docs/API_docs_v68/methods/account_sendConfirmPhoneCode.md index 009fcb09..3665bd50 100644 --- a/old_docs/API_docs_v68/methods/account_sendConfirmPhoneCode.md +++ b/old_docs/API_docs_v68/methods/account_sendConfirmPhoneCode.md @@ -32,13 +32,10 @@ description: account.sendConfirmPhoneCode parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v68/methods/account_setAccountTTL.md b/old_docs/API_docs_v68/methods/account_setAccountTTL.md index f06eb676..d08f59fb 100644 --- a/old_docs/API_docs_v68/methods/account_setAccountTTL.md +++ b/old_docs/API_docs_v68/methods/account_setAccountTTL.md @@ -30,13 +30,10 @@ description: account.setAccountTTL parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v68/methods/account_setPrivacy.md b/old_docs/API_docs_v68/methods/account_setPrivacy.md index 56aebbcc..401aa71c 100644 --- a/old_docs/API_docs_v68/methods/account_setPrivacy.md +++ b/old_docs/API_docs_v68/methods/account_setPrivacy.md @@ -31,13 +31,10 @@ description: account.setPrivacy parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v68/methods/account_unregisterDevice.md b/old_docs/API_docs_v68/methods/account_unregisterDevice.md index 41899b6e..283ec7d2 100644 --- a/old_docs/API_docs_v68/methods/account_unregisterDevice.md +++ b/old_docs/API_docs_v68/methods/account_unregisterDevice.md @@ -31,13 +31,10 @@ description: account.unregisterDevice parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v68/methods/account_updateDeviceLocked.md b/old_docs/API_docs_v68/methods/account_updateDeviceLocked.md index 37aeb59d..ae6125a5 100644 --- a/old_docs/API_docs_v68/methods/account_updateDeviceLocked.md +++ b/old_docs/API_docs_v68/methods/account_updateDeviceLocked.md @@ -23,13 +23,10 @@ description: account.updateDeviceLocked parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v68/methods/account_updateNotifySettings.md b/old_docs/API_docs_v68/methods/account_updateNotifySettings.md index 8389b5c2..fb096250 100644 --- a/old_docs/API_docs_v68/methods/account_updateNotifySettings.md +++ b/old_docs/API_docs_v68/methods/account_updateNotifySettings.md @@ -31,13 +31,10 @@ description: account.updateNotifySettings parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v68/methods/account_updatePasswordSettings.md b/old_docs/API_docs_v68/methods/account_updatePasswordSettings.md index b7c8da4b..ffa8dcd9 100644 --- a/old_docs/API_docs_v68/methods/account_updatePasswordSettings.md +++ b/old_docs/API_docs_v68/methods/account_updatePasswordSettings.md @@ -34,13 +34,10 @@ description: account.updatePasswordSettings parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v68/methods/account_updateProfile.md b/old_docs/API_docs_v68/methods/account_updateProfile.md index a50eaea5..b3d468d1 100644 --- a/old_docs/API_docs_v68/methods/account_updateProfile.md +++ b/old_docs/API_docs_v68/methods/account_updateProfile.md @@ -33,13 +33,10 @@ description: account.updateProfile parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v68/methods/account_updateStatus.md b/old_docs/API_docs_v68/methods/account_updateStatus.md index 7204e582..c8fa0a79 100644 --- a/old_docs/API_docs_v68/methods/account_updateStatus.md +++ b/old_docs/API_docs_v68/methods/account_updateStatus.md @@ -30,13 +30,10 @@ description: account.updateStatus parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v68/methods/account_updateUsername.md b/old_docs/API_docs_v68/methods/account_updateUsername.md index 22be2fd4..2b7576a5 100644 --- a/old_docs/API_docs_v68/methods/account_updateUsername.md +++ b/old_docs/API_docs_v68/methods/account_updateUsername.md @@ -32,13 +32,10 @@ description: account.updateUsername parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v68/methods/auth_bindTempAuthKey.md b/old_docs/API_docs_v68/methods/auth_bindTempAuthKey.md index e3d72dd5..7419abb0 100644 --- a/old_docs/API_docs_v68/methods/auth_bindTempAuthKey.md +++ b/old_docs/API_docs_v68/methods/auth_bindTempAuthKey.md @@ -35,16 +35,13 @@ description: auth.bindTempAuthKey parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v68/methods/auth_cancelCode.md b/old_docs/API_docs_v68/methods/auth_cancelCode.md index dc390329..05d927a1 100644 --- a/old_docs/API_docs_v68/methods/auth_cancelCode.md +++ b/old_docs/API_docs_v68/methods/auth_cancelCode.md @@ -31,13 +31,10 @@ description: auth.cancelCode parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v68/methods/auth_checkPassword.md b/old_docs/API_docs_v68/methods/auth_checkPassword.md index d5559186..6b6b21cc 100644 --- a/old_docs/API_docs_v68/methods/auth_checkPassword.md +++ b/old_docs/API_docs_v68/methods/auth_checkPassword.md @@ -30,13 +30,10 @@ description: auth.checkPassword parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v68/methods/auth_checkPhone.md b/old_docs/API_docs_v68/methods/auth_checkPhone.md index 3455904d..f6cac2e6 100644 --- a/old_docs/API_docs_v68/methods/auth_checkPhone.md +++ b/old_docs/API_docs_v68/methods/auth_checkPhone.md @@ -32,13 +32,10 @@ description: auth.checkPhone parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v68/methods/auth_dropTempAuthKeys.md b/old_docs/API_docs_v68/methods/auth_dropTempAuthKeys.md index aba76766..fedb7bf4 100644 --- a/old_docs/API_docs_v68/methods/auth_dropTempAuthKeys.md +++ b/old_docs/API_docs_v68/methods/auth_dropTempAuthKeys.md @@ -23,16 +23,13 @@ description: auth.dropTempAuthKeys parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v68/methods/auth_exportAuthorization.md b/old_docs/API_docs_v68/methods/auth_exportAuthorization.md index 44c45b70..cbc8203b 100644 --- a/old_docs/API_docs_v68/methods/auth_exportAuthorization.md +++ b/old_docs/API_docs_v68/methods/auth_exportAuthorization.md @@ -30,16 +30,13 @@ description: auth.exportAuthorization parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v68/methods/auth_importAuthorization.md b/old_docs/API_docs_v68/methods/auth_importAuthorization.md index e0fd534f..22166510 100644 --- a/old_docs/API_docs_v68/methods/auth_importAuthorization.md +++ b/old_docs/API_docs_v68/methods/auth_importAuthorization.md @@ -32,16 +32,13 @@ description: auth.importAuthorization parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v68/methods/auth_recoverPassword.md b/old_docs/API_docs_v68/methods/auth_recoverPassword.md index c2ce3fed..931e99fd 100644 --- a/old_docs/API_docs_v68/methods/auth_recoverPassword.md +++ b/old_docs/API_docs_v68/methods/auth_recoverPassword.md @@ -30,13 +30,10 @@ description: auth.recoverPassword parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v68/methods/auth_requestPasswordRecovery.md b/old_docs/API_docs_v68/methods/auth_requestPasswordRecovery.md index 101b1cf7..c6babcd9 100644 --- a/old_docs/API_docs_v68/methods/auth_requestPasswordRecovery.md +++ b/old_docs/API_docs_v68/methods/auth_requestPasswordRecovery.md @@ -25,13 +25,10 @@ description: auth.requestPasswordRecovery parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v68/methods/auth_resendCode.md b/old_docs/API_docs_v68/methods/auth_resendCode.md index 14d08ddd..df4803b8 100644 --- a/old_docs/API_docs_v68/methods/auth_resendCode.md +++ b/old_docs/API_docs_v68/methods/auth_resendCode.md @@ -31,13 +31,10 @@ description: auth.resendCode parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v68/methods/auth_resetAuthorizations.md b/old_docs/API_docs_v68/methods/auth_resetAuthorizations.md index 87a39a22..fe297fa7 100644 --- a/old_docs/API_docs_v68/methods/auth_resetAuthorizations.md +++ b/old_docs/API_docs_v68/methods/auth_resetAuthorizations.md @@ -25,13 +25,10 @@ description: auth.resetAuthorizations parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v68/methods/auth_sendInvites.md b/old_docs/API_docs_v68/methods/auth_sendInvites.md index 604fc65d..ad9636c5 100644 --- a/old_docs/API_docs_v68/methods/auth_sendInvites.md +++ b/old_docs/API_docs_v68/methods/auth_sendInvites.md @@ -31,13 +31,10 @@ description: auth.sendInvites parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v68/methods/bots_answerWebhookJSONQuery.md b/old_docs/API_docs_v68/methods/bots_answerWebhookJSONQuery.md index ae1efce3..d910db35 100644 --- a/old_docs/API_docs_v68/methods/bots_answerWebhookJSONQuery.md +++ b/old_docs/API_docs_v68/methods/bots_answerWebhookJSONQuery.md @@ -32,16 +32,13 @@ description: bots.answerWebhookJSONQuery parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v68/methods/bots_sendCustomRequest.md b/old_docs/API_docs_v68/methods/bots_sendCustomRequest.md index 927f18c5..abb880ef 100644 --- a/old_docs/API_docs_v68/methods/bots_sendCustomRequest.md +++ b/old_docs/API_docs_v68/methods/bots_sendCustomRequest.md @@ -31,16 +31,13 @@ description: bots.sendCustomRequest parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v68/methods/channels_checkUsername.md b/old_docs/API_docs_v68/methods/channels_checkUsername.md index d6ea876d..e29ee107 100644 --- a/old_docs/API_docs_v68/methods/channels_checkUsername.md +++ b/old_docs/API_docs_v68/methods/channels_checkUsername.md @@ -33,13 +33,10 @@ description: channels.checkUsername parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v68/methods/channels_createChannel.md b/old_docs/API_docs_v68/methods/channels_createChannel.md index 9ba02e9e..58808b73 100644 --- a/old_docs/API_docs_v68/methods/channels_createChannel.md +++ b/old_docs/API_docs_v68/methods/channels_createChannel.md @@ -34,13 +34,10 @@ description: channels.createChannel parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v68/methods/channels_deleteChannel.md b/old_docs/API_docs_v68/methods/channels_deleteChannel.md index 912ab080..532f3c6c 100644 --- a/old_docs/API_docs_v68/methods/channels_deleteChannel.md +++ b/old_docs/API_docs_v68/methods/channels_deleteChannel.md @@ -31,13 +31,10 @@ description: channels.deleteChannel parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v68/methods/channels_deleteMessages.md b/old_docs/API_docs_v68/methods/channels_deleteMessages.md index b3481294..a42a47a5 100644 --- a/old_docs/API_docs_v68/methods/channels_deleteMessages.md +++ b/old_docs/API_docs_v68/methods/channels_deleteMessages.md @@ -33,16 +33,13 @@ description: channels.deleteMessages parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v68/methods/channels_deleteUserHistory.md b/old_docs/API_docs_v68/methods/channels_deleteUserHistory.md index 66843269..73494485 100644 --- a/old_docs/API_docs_v68/methods/channels_deleteUserHistory.md +++ b/old_docs/API_docs_v68/methods/channels_deleteUserHistory.md @@ -32,13 +32,10 @@ description: channels.deleteUserHistory parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v68/methods/channels_editAbout.md b/old_docs/API_docs_v68/methods/channels_editAbout.md index 4c759a8a..1c3ce933 100644 --- a/old_docs/API_docs_v68/methods/channels_editAbout.md +++ b/old_docs/API_docs_v68/methods/channels_editAbout.md @@ -34,16 +34,13 @@ description: channels.editAbout parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v68/methods/channels_editAdmin.md b/old_docs/API_docs_v68/methods/channels_editAdmin.md index e68ba7ea..c6f5454c 100644 --- a/old_docs/API_docs_v68/methods/channels_editAdmin.md +++ b/old_docs/API_docs_v68/methods/channels_editAdmin.md @@ -41,16 +41,13 @@ description: channels.editAdmin parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v68/methods/channels_editBanned.md b/old_docs/API_docs_v68/methods/channels_editBanned.md index 7fb904b9..02ed04bf 100644 --- a/old_docs/API_docs_v68/methods/channels_editBanned.md +++ b/old_docs/API_docs_v68/methods/channels_editBanned.md @@ -36,16 +36,13 @@ description: channels.editBanned parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v68/methods/channels_editPhoto.md b/old_docs/API_docs_v68/methods/channels_editPhoto.md index 99873537..4a4aeb03 100644 --- a/old_docs/API_docs_v68/methods/channels_editPhoto.md +++ b/old_docs/API_docs_v68/methods/channels_editPhoto.md @@ -33,16 +33,13 @@ description: channels.editPhoto parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v68/methods/channels_editTitle.md b/old_docs/API_docs_v68/methods/channels_editTitle.md index 04e8ce12..8a69d09b 100644 --- a/old_docs/API_docs_v68/methods/channels_editTitle.md +++ b/old_docs/API_docs_v68/methods/channels_editTitle.md @@ -33,16 +33,13 @@ description: channels.editTitle parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v68/methods/channels_exportInvite.md b/old_docs/API_docs_v68/methods/channels_exportInvite.md index 2ed80f6c..79dc6401 100644 --- a/old_docs/API_docs_v68/methods/channels_exportInvite.md +++ b/old_docs/API_docs_v68/methods/channels_exportInvite.md @@ -32,16 +32,13 @@ description: channels.exportInvite parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v68/methods/channels_exportMessageLink.md b/old_docs/API_docs_v68/methods/channels_exportMessageLink.md index 9831c9c0..5b824859 100644 --- a/old_docs/API_docs_v68/methods/channels_exportMessageLink.md +++ b/old_docs/API_docs_v68/methods/channels_exportMessageLink.md @@ -31,13 +31,10 @@ description: channels.exportMessageLink parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v68/methods/channels_getAdminLog.md b/old_docs/API_docs_v68/methods/channels_getAdminLog.md index 5283563d..2f7327d1 100644 --- a/old_docs/API_docs_v68/methods/channels_getAdminLog.md +++ b/old_docs/API_docs_v68/methods/channels_getAdminLog.md @@ -38,13 +38,10 @@ description: channels.getAdminLog parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v68/methods/channels_getAdminedPublicChannels.md b/old_docs/API_docs_v68/methods/channels_getAdminedPublicChannels.md index 7fceb026..283a9071 100644 --- a/old_docs/API_docs_v68/methods/channels_getAdminedPublicChannels.md +++ b/old_docs/API_docs_v68/methods/channels_getAdminedPublicChannels.md @@ -18,13 +18,10 @@ description: channels.getAdminedPublicChannels parameters, return type and examp ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v68/methods/channels_getChannels.md b/old_docs/API_docs_v68/methods/channels_getChannels.md index 13304938..e80aa6a6 100644 --- a/old_docs/API_docs_v68/methods/channels_getChannels.md +++ b/old_docs/API_docs_v68/methods/channels_getChannels.md @@ -32,16 +32,13 @@ description: channels.getChannels parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v68/methods/channels_getMessages.md b/old_docs/API_docs_v68/methods/channels_getMessages.md index 5480dd86..dc392773 100644 --- a/old_docs/API_docs_v68/methods/channels_getMessages.md +++ b/old_docs/API_docs_v68/methods/channels_getMessages.md @@ -33,16 +33,13 @@ description: channels.getMessages parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v68/methods/channels_getParticipant.md b/old_docs/API_docs_v68/methods/channels_getParticipant.md index 8c7e3cbd..001bf115 100644 --- a/old_docs/API_docs_v68/methods/channels_getParticipant.md +++ b/old_docs/API_docs_v68/methods/channels_getParticipant.md @@ -35,16 +35,13 @@ description: channels.getParticipant parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v68/methods/channels_inviteToChannel.md b/old_docs/API_docs_v68/methods/channels_inviteToChannel.md index cf5480e0..2448fb84 100644 --- a/old_docs/API_docs_v68/methods/channels_inviteToChannel.md +++ b/old_docs/API_docs_v68/methods/channels_inviteToChannel.md @@ -46,13 +46,10 @@ description: channels.inviteToChannel parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v68/methods/channels_joinChannel.md b/old_docs/API_docs_v68/methods/channels_joinChannel.md index f31730a1..e746cf48 100644 --- a/old_docs/API_docs_v68/methods/channels_joinChannel.md +++ b/old_docs/API_docs_v68/methods/channels_joinChannel.md @@ -32,13 +32,10 @@ description: channels.joinChannel parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v68/methods/channels_leaveChannel.md b/old_docs/API_docs_v68/methods/channels_leaveChannel.md index 12902f6d..ff244ded 100644 --- a/old_docs/API_docs_v68/methods/channels_leaveChannel.md +++ b/old_docs/API_docs_v68/methods/channels_leaveChannel.md @@ -34,16 +34,13 @@ description: channels.leaveChannel parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v68/methods/channels_readHistory.md b/old_docs/API_docs_v68/methods/channels_readHistory.md index be979101..6fc6ec0e 100644 --- a/old_docs/API_docs_v68/methods/channels_readHistory.md +++ b/old_docs/API_docs_v68/methods/channels_readHistory.md @@ -32,13 +32,10 @@ description: channels.readHistory parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v68/methods/channels_reportSpam.md b/old_docs/API_docs_v68/methods/channels_reportSpam.md index 22f34443..a37a5833 100644 --- a/old_docs/API_docs_v68/methods/channels_reportSpam.md +++ b/old_docs/API_docs_v68/methods/channels_reportSpam.md @@ -33,13 +33,10 @@ description: channels.reportSpam parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v68/methods/channels_toggleInvites.md b/old_docs/API_docs_v68/methods/channels_toggleInvites.md index c2715b32..d0ae1136 100644 --- a/old_docs/API_docs_v68/methods/channels_toggleInvites.md +++ b/old_docs/API_docs_v68/methods/channels_toggleInvites.md @@ -33,13 +33,10 @@ description: channels.toggleInvites parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v68/methods/channels_toggleSignatures.md b/old_docs/API_docs_v68/methods/channels_toggleSignatures.md index a214b849..6477bc6d 100644 --- a/old_docs/API_docs_v68/methods/channels_toggleSignatures.md +++ b/old_docs/API_docs_v68/methods/channels_toggleSignatures.md @@ -31,13 +31,10 @@ description: channels.toggleSignatures parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v68/methods/channels_updatePinnedMessage.md b/old_docs/API_docs_v68/methods/channels_updatePinnedMessage.md index 6dcabf71..37a0a20d 100644 --- a/old_docs/API_docs_v68/methods/channels_updatePinnedMessage.md +++ b/old_docs/API_docs_v68/methods/channels_updatePinnedMessage.md @@ -35,16 +35,13 @@ description: channels.updatePinnedMessage parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v68/methods/channels_updateUsername.md b/old_docs/API_docs_v68/methods/channels_updateUsername.md index c2ede724..1f1f111e 100644 --- a/old_docs/API_docs_v68/methods/channels_updateUsername.md +++ b/old_docs/API_docs_v68/methods/channels_updateUsername.md @@ -35,13 +35,10 @@ description: channels.updateUsername parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v68/methods/contacts_block.md b/old_docs/API_docs_v68/methods/contacts_block.md index d9d58e37..1c7cbe26 100644 --- a/old_docs/API_docs_v68/methods/contacts_block.md +++ b/old_docs/API_docs_v68/methods/contacts_block.md @@ -30,13 +30,10 @@ description: contacts.block parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v68/methods/contacts_deleteContact.md b/old_docs/API_docs_v68/methods/contacts_deleteContact.md index cd8c17ad..987a1be0 100644 --- a/old_docs/API_docs_v68/methods/contacts_deleteContact.md +++ b/old_docs/API_docs_v68/methods/contacts_deleteContact.md @@ -30,13 +30,10 @@ description: contacts.deleteContact parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v68/methods/contacts_deleteContacts.md b/old_docs/API_docs_v68/methods/contacts_deleteContacts.md index fc65880d..67a922ed 100644 --- a/old_docs/API_docs_v68/methods/contacts_deleteContacts.md +++ b/old_docs/API_docs_v68/methods/contacts_deleteContacts.md @@ -31,13 +31,10 @@ description: contacts.deleteContacts parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v68/methods/contacts_exportCard.md b/old_docs/API_docs_v68/methods/contacts_exportCard.md index 63508076..bf6d1f9f 100644 --- a/old_docs/API_docs_v68/methods/contacts_exportCard.md +++ b/old_docs/API_docs_v68/methods/contacts_exportCard.md @@ -18,13 +18,10 @@ description: contacts.exportCard parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v68/methods/contacts_getBlocked.md b/old_docs/API_docs_v68/methods/contacts_getBlocked.md index f50792b4..faa719da 100644 --- a/old_docs/API_docs_v68/methods/contacts_getBlocked.md +++ b/old_docs/API_docs_v68/methods/contacts_getBlocked.md @@ -24,13 +24,10 @@ description: contacts.getBlocked parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v68/methods/contacts_getContacts.md b/old_docs/API_docs_v68/methods/contacts_getContacts.md index 71313bf2..a6779111 100644 --- a/old_docs/API_docs_v68/methods/contacts_getContacts.md +++ b/old_docs/API_docs_v68/methods/contacts_getContacts.md @@ -23,13 +23,10 @@ description: contacts.getContacts parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v68/methods/contacts_getStatuses.md b/old_docs/API_docs_v68/methods/contacts_getStatuses.md index d914e08d..9bb7f263 100644 --- a/old_docs/API_docs_v68/methods/contacts_getStatuses.md +++ b/old_docs/API_docs_v68/methods/contacts_getStatuses.md @@ -18,13 +18,10 @@ description: contacts.getStatuses parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v68/methods/contacts_getTopPeers.md b/old_docs/API_docs_v68/methods/contacts_getTopPeers.md index cbd64cc0..f72133a5 100644 --- a/old_docs/API_docs_v68/methods/contacts_getTopPeers.md +++ b/old_docs/API_docs_v68/methods/contacts_getTopPeers.md @@ -38,13 +38,10 @@ description: contacts.getTopPeers parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v68/methods/contacts_importCard.md b/old_docs/API_docs_v68/methods/contacts_importCard.md index a6abf56d..7a2f34e1 100644 --- a/old_docs/API_docs_v68/methods/contacts_importCard.md +++ b/old_docs/API_docs_v68/methods/contacts_importCard.md @@ -31,13 +31,10 @@ description: contacts.importCard parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v68/methods/contacts_importContacts.md b/old_docs/API_docs_v68/methods/contacts_importContacts.md index db2051ac..2f070493 100644 --- a/old_docs/API_docs_v68/methods/contacts_importContacts.md +++ b/old_docs/API_docs_v68/methods/contacts_importContacts.md @@ -24,13 +24,10 @@ description: contacts.importContacts parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v68/methods/contacts_resetTopPeerRating.md b/old_docs/API_docs_v68/methods/contacts_resetTopPeerRating.md index 738494b2..711ea0cb 100644 --- a/old_docs/API_docs_v68/methods/contacts_resetTopPeerRating.md +++ b/old_docs/API_docs_v68/methods/contacts_resetTopPeerRating.md @@ -31,13 +31,10 @@ description: contacts.resetTopPeerRating parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v68/methods/contacts_search.md b/old_docs/API_docs_v68/methods/contacts_search.md index 0203b160..70a0635e 100644 --- a/old_docs/API_docs_v68/methods/contacts_search.md +++ b/old_docs/API_docs_v68/methods/contacts_search.md @@ -33,13 +33,10 @@ description: contacts.search parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v68/methods/contacts_unblock.md b/old_docs/API_docs_v68/methods/contacts_unblock.md index a1977c24..9c01e42a 100644 --- a/old_docs/API_docs_v68/methods/contacts_unblock.md +++ b/old_docs/API_docs_v68/methods/contacts_unblock.md @@ -30,13 +30,10 @@ description: contacts.unblock parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v68/methods/contest_saveDeveloperInfo.md b/old_docs/API_docs_v68/methods/contest_saveDeveloperInfo.md index eca7bfcf..c0bb9054 100644 --- a/old_docs/API_docs_v68/methods/contest_saveDeveloperInfo.md +++ b/old_docs/API_docs_v68/methods/contest_saveDeveloperInfo.md @@ -27,16 +27,13 @@ description: contest.saveDeveloperInfo parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v68/methods/destroy_auth_key.md b/old_docs/API_docs_v68/methods/destroy_auth_key.md index 7d39ceec..1803e375 100644 --- a/old_docs/API_docs_v68/methods/destroy_auth_key.md +++ b/old_docs/API_docs_v68/methods/destroy_auth_key.md @@ -18,16 +18,13 @@ description: destroy_auth_key parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v68/methods/destroy_session.md b/old_docs/API_docs_v68/methods/destroy_session.md index 0b732694..39aa2c6e 100644 --- a/old_docs/API_docs_v68/methods/destroy_session.md +++ b/old_docs/API_docs_v68/methods/destroy_session.md @@ -23,16 +23,13 @@ description: destroy_session parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v68/methods/get_future_salts.md b/old_docs/API_docs_v68/methods/get_future_salts.md index d3b306ce..fedf036c 100644 --- a/old_docs/API_docs_v68/methods/get_future_salts.md +++ b/old_docs/API_docs_v68/methods/get_future_salts.md @@ -23,16 +23,13 @@ description: get_future_salts parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v68/methods/help_getAppChangelog.md b/old_docs/API_docs_v68/methods/help_getAppChangelog.md index 9d8c3203..59916787 100644 --- a/old_docs/API_docs_v68/methods/help_getAppChangelog.md +++ b/old_docs/API_docs_v68/methods/help_getAppChangelog.md @@ -23,13 +23,10 @@ description: help.getAppChangelog parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v68/methods/help_getAppUpdate.md b/old_docs/API_docs_v68/methods/help_getAppUpdate.md index 0871f59d..89ff22c3 100644 --- a/old_docs/API_docs_v68/methods/help_getAppUpdate.md +++ b/old_docs/API_docs_v68/methods/help_getAppUpdate.md @@ -18,13 +18,10 @@ description: help.getAppUpdate parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v68/methods/help_getCdnConfig.md b/old_docs/API_docs_v68/methods/help_getCdnConfig.md index da446958..3079e605 100644 --- a/old_docs/API_docs_v68/methods/help_getCdnConfig.md +++ b/old_docs/API_docs_v68/methods/help_getCdnConfig.md @@ -25,16 +25,13 @@ description: help.getCdnConfig parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v68/methods/help_getConfig.md b/old_docs/API_docs_v68/methods/help_getConfig.md index e3648b5a..bb51b362 100644 --- a/old_docs/API_docs_v68/methods/help_getConfig.md +++ b/old_docs/API_docs_v68/methods/help_getConfig.md @@ -25,16 +25,13 @@ description: help.getConfig parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v68/methods/help_getInviteText.md b/old_docs/API_docs_v68/methods/help_getInviteText.md index 4bcbb77d..6d2674d6 100644 --- a/old_docs/API_docs_v68/methods/help_getInviteText.md +++ b/old_docs/API_docs_v68/methods/help_getInviteText.md @@ -18,13 +18,10 @@ description: help.getInviteText parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v68/methods/help_getNearestDc.md b/old_docs/API_docs_v68/methods/help_getNearestDc.md index c6f5c555..6d8ed3f7 100644 --- a/old_docs/API_docs_v68/methods/help_getNearestDc.md +++ b/old_docs/API_docs_v68/methods/help_getNearestDc.md @@ -18,13 +18,10 @@ description: help.getNearestDc parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v68/methods/help_getSupport.md b/old_docs/API_docs_v68/methods/help_getSupport.md index 209edf03..ca8db03c 100644 --- a/old_docs/API_docs_v68/methods/help_getSupport.md +++ b/old_docs/API_docs_v68/methods/help_getSupport.md @@ -18,13 +18,10 @@ description: help.getSupport parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v68/methods/help_getTermsOfService.md b/old_docs/API_docs_v68/methods/help_getTermsOfService.md index 8bc2e2fa..eb686506 100644 --- a/old_docs/API_docs_v68/methods/help_getTermsOfService.md +++ b/old_docs/API_docs_v68/methods/help_getTermsOfService.md @@ -18,13 +18,10 @@ description: help.getTermsOfService parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v68/methods/help_saveAppLog.md b/old_docs/API_docs_v68/methods/help_saveAppLog.md index 4f06434c..741b9aa1 100644 --- a/old_docs/API_docs_v68/methods/help_saveAppLog.md +++ b/old_docs/API_docs_v68/methods/help_saveAppLog.md @@ -23,13 +23,10 @@ description: help.saveAppLog parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v68/methods/help_setBotUpdatesStatus.md b/old_docs/API_docs_v68/methods/help_setBotUpdatesStatus.md index 55e1d2fe..470187a0 100644 --- a/old_docs/API_docs_v68/methods/help_setBotUpdatesStatus.md +++ b/old_docs/API_docs_v68/methods/help_setBotUpdatesStatus.md @@ -24,16 +24,13 @@ description: help.setBotUpdatesStatus parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v68/methods/initConnection.md b/old_docs/API_docs_v68/methods/initConnection.md index b66ab859..ef40e7f5 100644 --- a/old_docs/API_docs_v68/methods/initConnection.md +++ b/old_docs/API_docs_v68/methods/initConnection.md @@ -38,16 +38,13 @@ description: initConnection parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v68/methods/invokeAfterMsg.md b/old_docs/API_docs_v68/methods/invokeAfterMsg.md index c139fe8c..a382429e 100644 --- a/old_docs/API_docs_v68/methods/invokeAfterMsg.md +++ b/old_docs/API_docs_v68/methods/invokeAfterMsg.md @@ -24,16 +24,13 @@ description: invokeAfterMsg parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v68/methods/invokeAfterMsgs.md b/old_docs/API_docs_v68/methods/invokeAfterMsgs.md index 35004296..169eedaf 100644 --- a/old_docs/API_docs_v68/methods/invokeAfterMsgs.md +++ b/old_docs/API_docs_v68/methods/invokeAfterMsgs.md @@ -24,16 +24,13 @@ description: invokeAfterMsgs parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v68/methods/invokeWithLayer.md b/old_docs/API_docs_v68/methods/invokeWithLayer.md index 706036c4..d9a2c74c 100644 --- a/old_docs/API_docs_v68/methods/invokeWithLayer.md +++ b/old_docs/API_docs_v68/methods/invokeWithLayer.md @@ -41,16 +41,13 @@ description: invokeWithLayer parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v68/methods/invokeWithoutUpdates.md b/old_docs/API_docs_v68/methods/invokeWithoutUpdates.md index 10c6bfcf..f7d01765 100644 --- a/old_docs/API_docs_v68/methods/invokeWithoutUpdates.md +++ b/old_docs/API_docs_v68/methods/invokeWithoutUpdates.md @@ -23,16 +23,13 @@ description: invokeWithoutUpdates parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v68/methods/langpack_getDifference.md b/old_docs/API_docs_v68/methods/langpack_getDifference.md index 2e77cc3b..116e78e2 100644 --- a/old_docs/API_docs_v68/methods/langpack_getDifference.md +++ b/old_docs/API_docs_v68/methods/langpack_getDifference.md @@ -30,13 +30,10 @@ description: langpack.getDifference parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v68/methods/langpack_getLangPack.md b/old_docs/API_docs_v68/methods/langpack_getLangPack.md index 5d4d0b81..b5686e61 100644 --- a/old_docs/API_docs_v68/methods/langpack_getLangPack.md +++ b/old_docs/API_docs_v68/methods/langpack_getLangPack.md @@ -30,13 +30,10 @@ description: langpack.getLangPack parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v68/methods/langpack_getLanguages.md b/old_docs/API_docs_v68/methods/langpack_getLanguages.md index abaa0de3..cb65e5a0 100644 --- a/old_docs/API_docs_v68/methods/langpack_getLanguages.md +++ b/old_docs/API_docs_v68/methods/langpack_getLanguages.md @@ -25,13 +25,10 @@ description: langpack.getLanguages parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v68/methods/langpack_getStrings.md b/old_docs/API_docs_v68/methods/langpack_getStrings.md index 9bb740dc..ce58daf9 100644 --- a/old_docs/API_docs_v68/methods/langpack_getStrings.md +++ b/old_docs/API_docs_v68/methods/langpack_getStrings.md @@ -31,13 +31,10 @@ description: langpack.getStrings parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v68/methods/messages_addChatUser.md b/old_docs/API_docs_v68/methods/messages_addChatUser.md index 00da5a61..b9e6243d 100644 --- a/old_docs/API_docs_v68/methods/messages_addChatUser.md +++ b/old_docs/API_docs_v68/methods/messages_addChatUser.md @@ -40,13 +40,10 @@ description: messages.addChatUser parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v68/methods/messages_checkChatInvite.md b/old_docs/API_docs_v68/methods/messages_checkChatInvite.md index c5eb1c06..c4489469 100644 --- a/old_docs/API_docs_v68/methods/messages_checkChatInvite.md +++ b/old_docs/API_docs_v68/methods/messages_checkChatInvite.md @@ -32,13 +32,10 @@ description: messages.checkChatInvite parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v68/methods/messages_clearRecentStickers.md b/old_docs/API_docs_v68/methods/messages_clearRecentStickers.md index dda76d14..ae45b249 100644 --- a/old_docs/API_docs_v68/methods/messages_clearRecentStickers.md +++ b/old_docs/API_docs_v68/methods/messages_clearRecentStickers.md @@ -23,13 +23,10 @@ description: messages.clearRecentStickers parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v68/methods/messages_createChat.md b/old_docs/API_docs_v68/methods/messages_createChat.md index c643a022..c6c8f420 100644 --- a/old_docs/API_docs_v68/methods/messages_createChat.md +++ b/old_docs/API_docs_v68/methods/messages_createChat.md @@ -32,13 +32,10 @@ description: messages.createChat parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v68/methods/messages_deleteChatUser.md b/old_docs/API_docs_v68/methods/messages_deleteChatUser.md index 3d75d9cf..4b8c2aa5 100644 --- a/old_docs/API_docs_v68/methods/messages_deleteChatUser.md +++ b/old_docs/API_docs_v68/methods/messages_deleteChatUser.md @@ -33,16 +33,13 @@ description: messages.deleteChatUser parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v68/methods/messages_deleteHistory.md b/old_docs/API_docs_v68/methods/messages_deleteHistory.md index ce6ba6e7..ebe2c89c 100644 --- a/old_docs/API_docs_v68/methods/messages_deleteHistory.md +++ b/old_docs/API_docs_v68/methods/messages_deleteHistory.md @@ -32,13 +32,10 @@ description: messages.deleteHistory parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v68/methods/messages_deleteMessages.md b/old_docs/API_docs_v68/methods/messages_deleteMessages.md index 2b88a73f..5472cc72 100644 --- a/old_docs/API_docs_v68/methods/messages_deleteMessages.md +++ b/old_docs/API_docs_v68/methods/messages_deleteMessages.md @@ -31,16 +31,13 @@ description: messages.deleteMessages parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v68/methods/messages_editChatAdmin.md b/old_docs/API_docs_v68/methods/messages_editChatAdmin.md index e64d9da5..1b3ffa9f 100644 --- a/old_docs/API_docs_v68/methods/messages_editChatAdmin.md +++ b/old_docs/API_docs_v68/methods/messages_editChatAdmin.md @@ -32,13 +32,10 @@ description: messages.editChatAdmin parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v68/methods/messages_editChatPhoto.md b/old_docs/API_docs_v68/methods/messages_editChatPhoto.md index d225962d..8c5d9d47 100644 --- a/old_docs/API_docs_v68/methods/messages_editChatPhoto.md +++ b/old_docs/API_docs_v68/methods/messages_editChatPhoto.md @@ -35,16 +35,13 @@ description: messages.editChatPhoto parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v68/methods/messages_editChatTitle.md b/old_docs/API_docs_v68/methods/messages_editChatTitle.md index 5cb1c6d7..238c6d72 100644 --- a/old_docs/API_docs_v68/methods/messages_editChatTitle.md +++ b/old_docs/API_docs_v68/methods/messages_editChatTitle.md @@ -32,16 +32,13 @@ description: messages.editChatTitle parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v68/methods/messages_editInlineBotMessage.md b/old_docs/API_docs_v68/methods/messages_editInlineBotMessage.md index 621c81a3..c3489f9d 100644 --- a/old_docs/API_docs_v68/methods/messages_editInlineBotMessage.md +++ b/old_docs/API_docs_v68/methods/messages_editInlineBotMessage.md @@ -36,16 +36,13 @@ description: messages.editInlineBotMessage parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v68/methods/messages_editMessage.md b/old_docs/API_docs_v68/methods/messages_editMessage.md index b8cdda81..3a23c9ac 100644 --- a/old_docs/API_docs_v68/methods/messages_editMessage.md +++ b/old_docs/API_docs_v68/methods/messages_editMessage.md @@ -45,16 +45,13 @@ description: messages.editMessage parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v68/methods/messages_exportChatInvite.md b/old_docs/API_docs_v68/methods/messages_exportChatInvite.md index 4a6e28ff..78f2ff86 100644 --- a/old_docs/API_docs_v68/methods/messages_exportChatInvite.md +++ b/old_docs/API_docs_v68/methods/messages_exportChatInvite.md @@ -30,13 +30,10 @@ description: messages.exportChatInvite parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v68/methods/messages_forwardMessage.md b/old_docs/API_docs_v68/methods/messages_forwardMessage.md index 4e2362db..fbdbc955 100644 --- a/old_docs/API_docs_v68/methods/messages_forwardMessage.md +++ b/old_docs/API_docs_v68/methods/messages_forwardMessage.md @@ -34,16 +34,13 @@ description: messages.forwardMessage parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v68/methods/messages_forwardMessages.md b/old_docs/API_docs_v68/methods/messages_forwardMessages.md index b5e9b7e7..5a609390 100644 --- a/old_docs/API_docs_v68/methods/messages_forwardMessages.md +++ b/old_docs/API_docs_v68/methods/messages_forwardMessages.md @@ -56,16 +56,13 @@ description: messages.forwardMessages parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v68/methods/messages_getAllChats.md b/old_docs/API_docs_v68/methods/messages_getAllChats.md index c5037003..babcf17d 100644 --- a/old_docs/API_docs_v68/methods/messages_getAllChats.md +++ b/old_docs/API_docs_v68/methods/messages_getAllChats.md @@ -23,13 +23,10 @@ description: messages.getAllChats parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v68/methods/messages_getAllDrafts.md b/old_docs/API_docs_v68/methods/messages_getAllDrafts.md index cc447864..8550c5b8 100644 --- a/old_docs/API_docs_v68/methods/messages_getAllDrafts.md +++ b/old_docs/API_docs_v68/methods/messages_getAllDrafts.md @@ -18,13 +18,10 @@ description: messages.getAllDrafts parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v68/methods/messages_getAllStickers.md b/old_docs/API_docs_v68/methods/messages_getAllStickers.md index dc9e2432..034438a5 100644 --- a/old_docs/API_docs_v68/methods/messages_getAllStickers.md +++ b/old_docs/API_docs_v68/methods/messages_getAllStickers.md @@ -23,13 +23,10 @@ description: messages.getAllStickers parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v68/methods/messages_getArchivedStickers.md b/old_docs/API_docs_v68/methods/messages_getArchivedStickers.md index dddcc748..cdb7f0af 100644 --- a/old_docs/API_docs_v68/methods/messages_getArchivedStickers.md +++ b/old_docs/API_docs_v68/methods/messages_getArchivedStickers.md @@ -25,13 +25,10 @@ description: messages.getArchivedStickers parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v68/methods/messages_getAttachedStickers.md b/old_docs/API_docs_v68/methods/messages_getAttachedStickers.md index 250db6a8..79d4e30d 100644 --- a/old_docs/API_docs_v68/methods/messages_getAttachedStickers.md +++ b/old_docs/API_docs_v68/methods/messages_getAttachedStickers.md @@ -23,13 +23,10 @@ description: messages.getAttachedStickers parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v68/methods/messages_getBotCallbackAnswer.md b/old_docs/API_docs_v68/methods/messages_getBotCallbackAnswer.md index e905723f..afa5358c 100644 --- a/old_docs/API_docs_v68/methods/messages_getBotCallbackAnswer.md +++ b/old_docs/API_docs_v68/methods/messages_getBotCallbackAnswer.md @@ -37,13 +37,10 @@ description: messages.getBotCallbackAnswer parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v68/methods/messages_getChats.md b/old_docs/API_docs_v68/methods/messages_getChats.md index 6fa30cbd..c322613d 100644 --- a/old_docs/API_docs_v68/methods/messages_getChats.md +++ b/old_docs/API_docs_v68/methods/messages_getChats.md @@ -31,16 +31,13 @@ description: messages.getChats parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v68/methods/messages_getCommonChats.md b/old_docs/API_docs_v68/methods/messages_getCommonChats.md index 0c601ca9..8c9e2834 100644 --- a/old_docs/API_docs_v68/methods/messages_getCommonChats.md +++ b/old_docs/API_docs_v68/methods/messages_getCommonChats.md @@ -32,13 +32,10 @@ description: messages.getCommonChats parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v68/methods/messages_getDhConfig.md b/old_docs/API_docs_v68/methods/messages_getDhConfig.md index aac3354d..f97684d2 100644 --- a/old_docs/API_docs_v68/methods/messages_getDhConfig.md +++ b/old_docs/API_docs_v68/methods/messages_getDhConfig.md @@ -31,13 +31,10 @@ description: messages.getDhConfig parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v68/methods/messages_getDialogs.md b/old_docs/API_docs_v68/methods/messages_getDialogs.md index 131b75b7..cef5ecc6 100644 --- a/old_docs/API_docs_v68/methods/messages_getDialogs.md +++ b/old_docs/API_docs_v68/methods/messages_getDialogs.md @@ -37,13 +37,10 @@ description: messages.getDialogs parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v68/methods/messages_getDocumentByHash.md b/old_docs/API_docs_v68/methods/messages_getDocumentByHash.md index dda54bdd..3902ac44 100644 --- a/old_docs/API_docs_v68/methods/messages_getDocumentByHash.md +++ b/old_docs/API_docs_v68/methods/messages_getDocumentByHash.md @@ -32,16 +32,13 @@ description: messages.getDocumentByHash parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v68/methods/messages_getFeaturedStickers.md b/old_docs/API_docs_v68/methods/messages_getFeaturedStickers.md index 9573464a..5aad1810 100644 --- a/old_docs/API_docs_v68/methods/messages_getFeaturedStickers.md +++ b/old_docs/API_docs_v68/methods/messages_getFeaturedStickers.md @@ -23,13 +23,10 @@ description: messages.getFeaturedStickers parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v68/methods/messages_getGameHighScores.md b/old_docs/API_docs_v68/methods/messages_getGameHighScores.md index 935bb95a..d8a94ae3 100644 --- a/old_docs/API_docs_v68/methods/messages_getGameHighScores.md +++ b/old_docs/API_docs_v68/methods/messages_getGameHighScores.md @@ -33,16 +33,13 @@ description: messages.getGameHighScores parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v68/methods/messages_getHistory.md b/old_docs/API_docs_v68/methods/messages_getHistory.md index a48a465e..4c3ef2ee 100644 --- a/old_docs/API_docs_v68/methods/messages_getHistory.md +++ b/old_docs/API_docs_v68/methods/messages_getHistory.md @@ -41,13 +41,10 @@ description: messages.getHistory parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v68/methods/messages_getInlineBotResults.md b/old_docs/API_docs_v68/methods/messages_getInlineBotResults.md index 61366580..61b927fc 100644 --- a/old_docs/API_docs_v68/methods/messages_getInlineBotResults.md +++ b/old_docs/API_docs_v68/methods/messages_getInlineBotResults.md @@ -37,13 +37,10 @@ description: messages.getInlineBotResults parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v68/methods/messages_getInlineGameHighScores.md b/old_docs/API_docs_v68/methods/messages_getInlineGameHighScores.md index 7cc04d0d..40eff3a9 100644 --- a/old_docs/API_docs_v68/methods/messages_getInlineGameHighScores.md +++ b/old_docs/API_docs_v68/methods/messages_getInlineGameHighScores.md @@ -32,16 +32,13 @@ description: messages.getInlineGameHighScores parameters, return type and exampl ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v68/methods/messages_getMaskStickers.md b/old_docs/API_docs_v68/methods/messages_getMaskStickers.md index 0ab194df..ca964647 100644 --- a/old_docs/API_docs_v68/methods/messages_getMaskStickers.md +++ b/old_docs/API_docs_v68/methods/messages_getMaskStickers.md @@ -23,13 +23,10 @@ description: messages.getMaskStickers parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v68/methods/messages_getMessageEditData.md b/old_docs/API_docs_v68/methods/messages_getMessageEditData.md index a8b135c6..15085153 100644 --- a/old_docs/API_docs_v68/methods/messages_getMessageEditData.md +++ b/old_docs/API_docs_v68/methods/messages_getMessageEditData.md @@ -32,13 +32,10 @@ description: messages.getMessageEditData parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v68/methods/messages_getMessages.md b/old_docs/API_docs_v68/methods/messages_getMessages.md index 5a970246..787c46dd 100644 --- a/old_docs/API_docs_v68/methods/messages_getMessages.md +++ b/old_docs/API_docs_v68/methods/messages_getMessages.md @@ -23,16 +23,13 @@ description: messages.getMessages parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v68/methods/messages_getMessagesViews.md b/old_docs/API_docs_v68/methods/messages_getMessagesViews.md index 263f3f95..de5692dc 100644 --- a/old_docs/API_docs_v68/methods/messages_getMessagesViews.md +++ b/old_docs/API_docs_v68/methods/messages_getMessagesViews.md @@ -34,13 +34,10 @@ description: messages.getMessagesViews parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v68/methods/messages_getPeerDialogs.md b/old_docs/API_docs_v68/methods/messages_getPeerDialogs.md index 3da60038..226948ae 100644 --- a/old_docs/API_docs_v68/methods/messages_getPeerDialogs.md +++ b/old_docs/API_docs_v68/methods/messages_getPeerDialogs.md @@ -31,13 +31,10 @@ description: messages.getPeerDialogs parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v68/methods/messages_getPeerSettings.md b/old_docs/API_docs_v68/methods/messages_getPeerSettings.md index d3e3cfc3..2a92f2da 100644 --- a/old_docs/API_docs_v68/methods/messages_getPeerSettings.md +++ b/old_docs/API_docs_v68/methods/messages_getPeerSettings.md @@ -31,13 +31,10 @@ description: messages.getPeerSettings parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v68/methods/messages_getPinnedDialogs.md b/old_docs/API_docs_v68/methods/messages_getPinnedDialogs.md index 110eab05..ec744f01 100644 --- a/old_docs/API_docs_v68/methods/messages_getPinnedDialogs.md +++ b/old_docs/API_docs_v68/methods/messages_getPinnedDialogs.md @@ -18,13 +18,10 @@ description: messages.getPinnedDialogs parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v68/methods/messages_getRecentStickers.md b/old_docs/API_docs_v68/methods/messages_getRecentStickers.md index 10d1a0df..a6ae162f 100644 --- a/old_docs/API_docs_v68/methods/messages_getRecentStickers.md +++ b/old_docs/API_docs_v68/methods/messages_getRecentStickers.md @@ -24,13 +24,10 @@ description: messages.getRecentStickers parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v68/methods/messages_getSavedGifs.md b/old_docs/API_docs_v68/methods/messages_getSavedGifs.md index 7cce4ffe..4986d812 100644 --- a/old_docs/API_docs_v68/methods/messages_getSavedGifs.md +++ b/old_docs/API_docs_v68/methods/messages_getSavedGifs.md @@ -23,13 +23,10 @@ description: messages.getSavedGifs parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v68/methods/messages_getStickerSet.md b/old_docs/API_docs_v68/methods/messages_getStickerSet.md index 59f33916..b480e0fe 100644 --- a/old_docs/API_docs_v68/methods/messages_getStickerSet.md +++ b/old_docs/API_docs_v68/methods/messages_getStickerSet.md @@ -30,16 +30,13 @@ description: messages.getStickerSet parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v68/methods/messages_getWebPage.md b/old_docs/API_docs_v68/methods/messages_getWebPage.md index 35f6e545..e886b020 100644 --- a/old_docs/API_docs_v68/methods/messages_getWebPage.md +++ b/old_docs/API_docs_v68/methods/messages_getWebPage.md @@ -31,13 +31,10 @@ description: messages.getWebPage parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v68/methods/messages_getWebPagePreview.md b/old_docs/API_docs_v68/methods/messages_getWebPagePreview.md index a89600b1..d3908933 100644 --- a/old_docs/API_docs_v68/methods/messages_getWebPagePreview.md +++ b/old_docs/API_docs_v68/methods/messages_getWebPagePreview.md @@ -23,13 +23,10 @@ description: messages.getWebPagePreview parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v68/methods/messages_hideReportSpam.md b/old_docs/API_docs_v68/methods/messages_hideReportSpam.md index 2dfe4dd7..5635665c 100644 --- a/old_docs/API_docs_v68/methods/messages_hideReportSpam.md +++ b/old_docs/API_docs_v68/methods/messages_hideReportSpam.md @@ -30,13 +30,10 @@ description: messages.hideReportSpam parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v68/methods/messages_importChatInvite.md b/old_docs/API_docs_v68/methods/messages_importChatInvite.md index 9d77304d..9dcfa56d 100644 --- a/old_docs/API_docs_v68/methods/messages_importChatInvite.md +++ b/old_docs/API_docs_v68/methods/messages_importChatInvite.md @@ -36,13 +36,10 @@ description: messages.importChatInvite parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v68/methods/messages_installStickerSet.md b/old_docs/API_docs_v68/methods/messages_installStickerSet.md index 3dde52a7..016d5ece 100644 --- a/old_docs/API_docs_v68/methods/messages_installStickerSet.md +++ b/old_docs/API_docs_v68/methods/messages_installStickerSet.md @@ -31,13 +31,10 @@ description: messages.installStickerSet parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v68/methods/messages_migrateChat.md b/old_docs/API_docs_v68/methods/messages_migrateChat.md index 22d2fbf0..a8274e70 100644 --- a/old_docs/API_docs_v68/methods/messages_migrateChat.md +++ b/old_docs/API_docs_v68/methods/messages_migrateChat.md @@ -32,13 +32,10 @@ description: messages.migrateChat parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v68/methods/messages_readEncryptedHistory.md b/old_docs/API_docs_v68/methods/messages_readEncryptedHistory.md index 766ee07d..f38f6b07 100644 --- a/old_docs/API_docs_v68/methods/messages_readEncryptedHistory.md +++ b/old_docs/API_docs_v68/methods/messages_readEncryptedHistory.md @@ -31,16 +31,13 @@ description: messages.readEncryptedHistory parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v68/methods/messages_readFeaturedStickers.md b/old_docs/API_docs_v68/methods/messages_readFeaturedStickers.md index c7ce7aca..02055bf3 100644 --- a/old_docs/API_docs_v68/methods/messages_readFeaturedStickers.md +++ b/old_docs/API_docs_v68/methods/messages_readFeaturedStickers.md @@ -23,13 +23,10 @@ description: messages.readFeaturedStickers parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v68/methods/messages_readHistory.md b/old_docs/API_docs_v68/methods/messages_readHistory.md index 1aa7830a..fef62130 100644 --- a/old_docs/API_docs_v68/methods/messages_readHistory.md +++ b/old_docs/API_docs_v68/methods/messages_readHistory.md @@ -32,13 +32,10 @@ description: messages.readHistory parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v68/methods/messages_readMessageContents.md b/old_docs/API_docs_v68/methods/messages_readMessageContents.md index 4b1abda0..7a6055fc 100644 --- a/old_docs/API_docs_v68/methods/messages_readMessageContents.md +++ b/old_docs/API_docs_v68/methods/messages_readMessageContents.md @@ -23,13 +23,10 @@ description: messages.readMessageContents parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v68/methods/messages_receivedMessages.md b/old_docs/API_docs_v68/methods/messages_receivedMessages.md index 588ac5cf..e2cf3a2f 100644 --- a/old_docs/API_docs_v68/methods/messages_receivedMessages.md +++ b/old_docs/API_docs_v68/methods/messages_receivedMessages.md @@ -23,13 +23,10 @@ description: messages.receivedMessages parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v68/methods/messages_receivedQueue.md b/old_docs/API_docs_v68/methods/messages_receivedQueue.md index 3c7f1d4f..38f504b3 100644 --- a/old_docs/API_docs_v68/methods/messages_receivedQueue.md +++ b/old_docs/API_docs_v68/methods/messages_receivedQueue.md @@ -30,16 +30,13 @@ description: messages.receivedQueue parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v68/methods/messages_reorderPinnedDialogs.md b/old_docs/API_docs_v68/methods/messages_reorderPinnedDialogs.md index 30102fd7..b4bfb84f 100644 --- a/old_docs/API_docs_v68/methods/messages_reorderPinnedDialogs.md +++ b/old_docs/API_docs_v68/methods/messages_reorderPinnedDialogs.md @@ -31,13 +31,10 @@ description: messages.reorderPinnedDialogs parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v68/methods/messages_reorderStickerSets.md b/old_docs/API_docs_v68/methods/messages_reorderStickerSets.md index 5c47f174..fa094550 100644 --- a/old_docs/API_docs_v68/methods/messages_reorderStickerSets.md +++ b/old_docs/API_docs_v68/methods/messages_reorderStickerSets.md @@ -24,13 +24,10 @@ description: messages.reorderStickerSets parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v68/methods/messages_reportEncryptedSpam.md b/old_docs/API_docs_v68/methods/messages_reportEncryptedSpam.md index 30ef3473..aed7a891 100644 --- a/old_docs/API_docs_v68/methods/messages_reportEncryptedSpam.md +++ b/old_docs/API_docs_v68/methods/messages_reportEncryptedSpam.md @@ -30,13 +30,10 @@ description: messages.reportEncryptedSpam parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v68/methods/messages_reportSpam.md b/old_docs/API_docs_v68/methods/messages_reportSpam.md index bfadb9ab..08c96d44 100644 --- a/old_docs/API_docs_v68/methods/messages_reportSpam.md +++ b/old_docs/API_docs_v68/methods/messages_reportSpam.md @@ -30,13 +30,10 @@ description: messages.reportSpam parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v68/methods/messages_saveDraft.md b/old_docs/API_docs_v68/methods/messages_saveDraft.md index 42308b46..f68090c0 100644 --- a/old_docs/API_docs_v68/methods/messages_saveDraft.md +++ b/old_docs/API_docs_v68/methods/messages_saveDraft.md @@ -35,13 +35,10 @@ description: messages.saveDraft parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v68/methods/messages_saveGif.md b/old_docs/API_docs_v68/methods/messages_saveGif.md index 31e48632..d86d539a 100644 --- a/old_docs/API_docs_v68/methods/messages_saveGif.md +++ b/old_docs/API_docs_v68/methods/messages_saveGif.md @@ -31,13 +31,10 @@ description: messages.saveGif parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v68/methods/messages_saveRecentSticker.md b/old_docs/API_docs_v68/methods/messages_saveRecentSticker.md index 8d45be5e..029ca763 100644 --- a/old_docs/API_docs_v68/methods/messages_saveRecentSticker.md +++ b/old_docs/API_docs_v68/methods/messages_saveRecentSticker.md @@ -32,13 +32,10 @@ description: messages.saveRecentSticker parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v68/methods/messages_search.md b/old_docs/API_docs_v68/methods/messages_search.md index ea39ef5d..c003258f 100644 --- a/old_docs/API_docs_v68/methods/messages_search.md +++ b/old_docs/API_docs_v68/methods/messages_search.md @@ -44,13 +44,10 @@ description: messages.search parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v68/methods/messages_searchGifs.md b/old_docs/API_docs_v68/methods/messages_searchGifs.md index 3f4c4838..dd804c99 100644 --- a/old_docs/API_docs_v68/methods/messages_searchGifs.md +++ b/old_docs/API_docs_v68/methods/messages_searchGifs.md @@ -31,13 +31,10 @@ description: messages.searchGifs parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v68/methods/messages_searchGlobal.md b/old_docs/API_docs_v68/methods/messages_searchGlobal.md index 0553dd7a..4b45eed2 100644 --- a/old_docs/API_docs_v68/methods/messages_searchGlobal.md +++ b/old_docs/API_docs_v68/methods/messages_searchGlobal.md @@ -34,13 +34,10 @@ description: messages.searchGlobal parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v68/methods/messages_sendEncrypted.md b/old_docs/API_docs_v68/methods/messages_sendEncrypted.md index 82eeec92..ba9f796b 100644 --- a/old_docs/API_docs_v68/methods/messages_sendEncrypted.md +++ b/old_docs/API_docs_v68/methods/messages_sendEncrypted.md @@ -34,16 +34,13 @@ description: messages.sendEncrypted parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v68/methods/messages_sendEncryptedFile.md b/old_docs/API_docs_v68/methods/messages_sendEncryptedFile.md index 8f7a73d9..db16bf2d 100644 --- a/old_docs/API_docs_v68/methods/messages_sendEncryptedFile.md +++ b/old_docs/API_docs_v68/methods/messages_sendEncryptedFile.md @@ -32,16 +32,13 @@ description: messages.sendEncryptedFile parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v68/methods/messages_sendEncryptedService.md b/old_docs/API_docs_v68/methods/messages_sendEncryptedService.md index d427f6c3..fd4e2627 100644 --- a/old_docs/API_docs_v68/methods/messages_sendEncryptedService.md +++ b/old_docs/API_docs_v68/methods/messages_sendEncryptedService.md @@ -34,16 +34,13 @@ description: messages.sendEncryptedService parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v68/methods/messages_sendInlineBotResult.md b/old_docs/API_docs_v68/methods/messages_sendInlineBotResult.md index 6aeeb67d..d974fe69 100644 --- a/old_docs/API_docs_v68/methods/messages_sendInlineBotResult.md +++ b/old_docs/API_docs_v68/methods/messages_sendInlineBotResult.md @@ -39,13 +39,10 @@ description: messages.sendInlineBotResult parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v68/methods/messages_sendMedia.md b/old_docs/API_docs_v68/methods/messages_sendMedia.md index b3ceb5d4..b58bf325 100644 --- a/old_docs/API_docs_v68/methods/messages_sendMedia.md +++ b/old_docs/API_docs_v68/methods/messages_sendMedia.md @@ -59,16 +59,13 @@ description: messages.sendMedia parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v68/methods/messages_sendMessage.md b/old_docs/API_docs_v68/methods/messages_sendMessage.md index 60b50412..3a515129 100644 --- a/old_docs/API_docs_v68/methods/messages_sendMessage.md +++ b/old_docs/API_docs_v68/methods/messages_sendMessage.md @@ -58,16 +58,13 @@ description: messages.sendMessage parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v68/methods/messages_setBotCallbackAnswer.md b/old_docs/API_docs_v68/methods/messages_setBotCallbackAnswer.md index 2c51854f..2901a558 100644 --- a/old_docs/API_docs_v68/methods/messages_setBotCallbackAnswer.md +++ b/old_docs/API_docs_v68/methods/messages_setBotCallbackAnswer.md @@ -34,16 +34,13 @@ description: messages.setBotCallbackAnswer parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v68/methods/messages_setBotPrecheckoutResults.md b/old_docs/API_docs_v68/methods/messages_setBotPrecheckoutResults.md index 25ed5ed5..5666e9ff 100644 --- a/old_docs/API_docs_v68/methods/messages_setBotPrecheckoutResults.md +++ b/old_docs/API_docs_v68/methods/messages_setBotPrecheckoutResults.md @@ -32,16 +32,13 @@ description: messages.setBotPrecheckoutResults parameters, return type and examp ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v68/methods/messages_setBotShippingResults.md b/old_docs/API_docs_v68/methods/messages_setBotShippingResults.md index 49ac2896..95376b64 100644 --- a/old_docs/API_docs_v68/methods/messages_setBotShippingResults.md +++ b/old_docs/API_docs_v68/methods/messages_setBotShippingResults.md @@ -32,16 +32,13 @@ description: messages.setBotShippingResults parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v68/methods/messages_setEncryptedTyping.md b/old_docs/API_docs_v68/methods/messages_setEncryptedTyping.md index a05b94dd..aeae6ff7 100644 --- a/old_docs/API_docs_v68/methods/messages_setEncryptedTyping.md +++ b/old_docs/API_docs_v68/methods/messages_setEncryptedTyping.md @@ -31,13 +31,10 @@ description: messages.setEncryptedTyping parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v68/methods/messages_setGameScore.md b/old_docs/API_docs_v68/methods/messages_setGameScore.md index 3137f7c9..c8ef5c49 100644 --- a/old_docs/API_docs_v68/methods/messages_setGameScore.md +++ b/old_docs/API_docs_v68/methods/messages_setGameScore.md @@ -36,16 +36,13 @@ description: messages.setGameScore parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v68/methods/messages_setInlineBotResults.md b/old_docs/API_docs_v68/methods/messages_setInlineBotResults.md index 8b5625f3..8b49c4c7 100644 --- a/old_docs/API_docs_v68/methods/messages_setInlineBotResults.md +++ b/old_docs/API_docs_v68/methods/messages_setInlineBotResults.md @@ -46,16 +46,13 @@ description: messages.setInlineBotResults parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v68/methods/messages_setInlineGameScore.md b/old_docs/API_docs_v68/methods/messages_setInlineGameScore.md index 36752f35..4c43e7d2 100644 --- a/old_docs/API_docs_v68/methods/messages_setInlineGameScore.md +++ b/old_docs/API_docs_v68/methods/messages_setInlineGameScore.md @@ -35,16 +35,13 @@ description: messages.setInlineGameScore parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v68/methods/messages_setTyping.md b/old_docs/API_docs_v68/methods/messages_setTyping.md index 9ef8caf5..f6b7b7b5 100644 --- a/old_docs/API_docs_v68/methods/messages_setTyping.md +++ b/old_docs/API_docs_v68/methods/messages_setTyping.md @@ -37,16 +37,13 @@ description: messages.setTyping parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v68/methods/messages_startBot.md b/old_docs/API_docs_v68/methods/messages_startBot.md index 8d98e390..b33ab013 100644 --- a/old_docs/API_docs_v68/methods/messages_startBot.md +++ b/old_docs/API_docs_v68/methods/messages_startBot.md @@ -35,13 +35,10 @@ description: messages.startBot parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v68/methods/messages_toggleChatAdmins.md b/old_docs/API_docs_v68/methods/messages_toggleChatAdmins.md index 3bf8a419..97328065 100644 --- a/old_docs/API_docs_v68/methods/messages_toggleChatAdmins.md +++ b/old_docs/API_docs_v68/methods/messages_toggleChatAdmins.md @@ -32,13 +32,10 @@ description: messages.toggleChatAdmins parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v68/methods/messages_toggleDialogPin.md b/old_docs/API_docs_v68/methods/messages_toggleDialogPin.md index f35f2f40..7853df5e 100644 --- a/old_docs/API_docs_v68/methods/messages_toggleDialogPin.md +++ b/old_docs/API_docs_v68/methods/messages_toggleDialogPin.md @@ -31,13 +31,10 @@ description: messages.toggleDialogPin parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v68/methods/messages_uninstallStickerSet.md b/old_docs/API_docs_v68/methods/messages_uninstallStickerSet.md index 6763e64f..76a3e3e2 100644 --- a/old_docs/API_docs_v68/methods/messages_uninstallStickerSet.md +++ b/old_docs/API_docs_v68/methods/messages_uninstallStickerSet.md @@ -30,13 +30,10 @@ description: messages.uninstallStickerSet parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v68/methods/messages_uploadMedia.md b/old_docs/API_docs_v68/methods/messages_uploadMedia.md index 03f07c26..d4b5ee7d 100644 --- a/old_docs/API_docs_v68/methods/messages_uploadMedia.md +++ b/old_docs/API_docs_v68/methods/messages_uploadMedia.md @@ -33,16 +33,13 @@ description: messages.uploadMedia parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v68/methods/payments_clearSavedInfo.md b/old_docs/API_docs_v68/methods/payments_clearSavedInfo.md index a77c50d9..fb9bae07 100644 --- a/old_docs/API_docs_v68/methods/payments_clearSavedInfo.md +++ b/old_docs/API_docs_v68/methods/payments_clearSavedInfo.md @@ -24,13 +24,10 @@ description: payments.clearSavedInfo parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v68/methods/payments_getPaymentForm.md b/old_docs/API_docs_v68/methods/payments_getPaymentForm.md index 15f6e26b..141c47f2 100644 --- a/old_docs/API_docs_v68/methods/payments_getPaymentForm.md +++ b/old_docs/API_docs_v68/methods/payments_getPaymentForm.md @@ -30,13 +30,10 @@ description: payments.getPaymentForm parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v68/methods/payments_getPaymentReceipt.md b/old_docs/API_docs_v68/methods/payments_getPaymentReceipt.md index 51433563..f6aa1ab6 100644 --- a/old_docs/API_docs_v68/methods/payments_getPaymentReceipt.md +++ b/old_docs/API_docs_v68/methods/payments_getPaymentReceipt.md @@ -30,13 +30,10 @@ description: payments.getPaymentReceipt parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v68/methods/payments_getSavedInfo.md b/old_docs/API_docs_v68/methods/payments_getSavedInfo.md index a586dcd9..4104679a 100644 --- a/old_docs/API_docs_v68/methods/payments_getSavedInfo.md +++ b/old_docs/API_docs_v68/methods/payments_getSavedInfo.md @@ -18,13 +18,10 @@ description: payments.getSavedInfo parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v68/methods/payments_sendPaymentForm.md b/old_docs/API_docs_v68/methods/payments_sendPaymentForm.md index a63a3980..180a7279 100644 --- a/old_docs/API_docs_v68/methods/payments_sendPaymentForm.md +++ b/old_docs/API_docs_v68/methods/payments_sendPaymentForm.md @@ -33,13 +33,10 @@ description: payments.sendPaymentForm parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v68/methods/payments_validateRequestedInfo.md b/old_docs/API_docs_v68/methods/payments_validateRequestedInfo.md index d839a2df..acfd1852 100644 --- a/old_docs/API_docs_v68/methods/payments_validateRequestedInfo.md +++ b/old_docs/API_docs_v68/methods/payments_validateRequestedInfo.md @@ -32,13 +32,10 @@ description: payments.validateRequestedInfo parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v68/methods/phone_getCallConfig.md b/old_docs/API_docs_v68/methods/phone_getCallConfig.md index a85fed0e..3f18d7ca 100644 --- a/old_docs/API_docs_v68/methods/phone_getCallConfig.md +++ b/old_docs/API_docs_v68/methods/phone_getCallConfig.md @@ -18,13 +18,10 @@ description: phone.getCallConfig parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v68/methods/phone_receivedCall.md b/old_docs/API_docs_v68/methods/phone_receivedCall.md index 9d59b1ea..8ca6a4e1 100644 --- a/old_docs/API_docs_v68/methods/phone_receivedCall.md +++ b/old_docs/API_docs_v68/methods/phone_receivedCall.md @@ -31,13 +31,10 @@ description: phone.receivedCall parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v68/methods/phone_saveCallDebug.md b/old_docs/API_docs_v68/methods/phone_saveCallDebug.md index 4dee5c97..ea3fa2d7 100644 --- a/old_docs/API_docs_v68/methods/phone_saveCallDebug.md +++ b/old_docs/API_docs_v68/methods/phone_saveCallDebug.md @@ -32,13 +32,10 @@ description: phone.saveCallDebug parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v68/methods/phone_setCallRating.md b/old_docs/API_docs_v68/methods/phone_setCallRating.md index fea236d1..c6e5d7fa 100644 --- a/old_docs/API_docs_v68/methods/phone_setCallRating.md +++ b/old_docs/API_docs_v68/methods/phone_setCallRating.md @@ -32,13 +32,10 @@ description: phone.setCallRating parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v68/methods/photos_deletePhotos.md b/old_docs/API_docs_v68/methods/photos_deletePhotos.md index e9cd459d..61768b1e 100644 --- a/old_docs/API_docs_v68/methods/photos_deletePhotos.md +++ b/old_docs/API_docs_v68/methods/photos_deletePhotos.md @@ -23,13 +23,10 @@ description: photos.deletePhotos parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v68/methods/photos_getUserPhotos.md b/old_docs/API_docs_v68/methods/photos_getUserPhotos.md index d6c2a380..095363e7 100644 --- a/old_docs/API_docs_v68/methods/photos_getUserPhotos.md +++ b/old_docs/API_docs_v68/methods/photos_getUserPhotos.md @@ -34,16 +34,13 @@ description: photos.getUserPhotos parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v68/methods/photos_updateProfilePhoto.md b/old_docs/API_docs_v68/methods/photos_updateProfilePhoto.md index ea3b78ec..d90aca22 100644 --- a/old_docs/API_docs_v68/methods/photos_updateProfilePhoto.md +++ b/old_docs/API_docs_v68/methods/photos_updateProfilePhoto.md @@ -23,13 +23,10 @@ description: photos.updateProfilePhoto parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v68/methods/photos_uploadProfilePhoto.md b/old_docs/API_docs_v68/methods/photos_uploadProfilePhoto.md index 58541f23..987e721c 100644 --- a/old_docs/API_docs_v68/methods/photos_uploadProfilePhoto.md +++ b/old_docs/API_docs_v68/methods/photos_uploadProfilePhoto.md @@ -34,13 +34,10 @@ description: photos.uploadProfilePhoto parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v68/methods/ping.md b/old_docs/API_docs_v68/methods/ping.md index 5bfe9dde..7c20ca86 100644 --- a/old_docs/API_docs_v68/methods/ping.md +++ b/old_docs/API_docs_v68/methods/ping.md @@ -23,16 +23,13 @@ description: ping parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v68/methods/ping_delay_disconnect.md b/old_docs/API_docs_v68/methods/ping_delay_disconnect.md index b4b1e265..e8b62005 100644 --- a/old_docs/API_docs_v68/methods/ping_delay_disconnect.md +++ b/old_docs/API_docs_v68/methods/ping_delay_disconnect.md @@ -24,16 +24,13 @@ description: ping_delay_disconnect parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v68/methods/req_DH_params.md b/old_docs/API_docs_v68/methods/req_DH_params.md index 51632fe0..697540d8 100644 --- a/old_docs/API_docs_v68/methods/req_DH_params.md +++ b/old_docs/API_docs_v68/methods/req_DH_params.md @@ -28,16 +28,13 @@ description: req_DH_params parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v68/methods/req_pq.md b/old_docs/API_docs_v68/methods/req_pq.md index 2f005ce2..7a583643 100644 --- a/old_docs/API_docs_v68/methods/req_pq.md +++ b/old_docs/API_docs_v68/methods/req_pq.md @@ -23,16 +23,13 @@ description: req_pq parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v68/methods/rpc_drop_answer.md b/old_docs/API_docs_v68/methods/rpc_drop_answer.md index 48e894a9..e15ddca9 100644 --- a/old_docs/API_docs_v68/methods/rpc_drop_answer.md +++ b/old_docs/API_docs_v68/methods/rpc_drop_answer.md @@ -23,16 +23,13 @@ description: rpc_drop_answer parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v68/methods/set_client_DH_params.md b/old_docs/API_docs_v68/methods/set_client_DH_params.md index 25f0f387..8721ed40 100644 --- a/old_docs/API_docs_v68/methods/set_client_DH_params.md +++ b/old_docs/API_docs_v68/methods/set_client_DH_params.md @@ -25,16 +25,13 @@ description: set_client_DH_params parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v68/methods/stickers_addStickerToSet.md b/old_docs/API_docs_v68/methods/stickers_addStickerToSet.md index bf62fa09..581eb1f1 100644 --- a/old_docs/API_docs_v68/methods/stickers_addStickerToSet.md +++ b/old_docs/API_docs_v68/methods/stickers_addStickerToSet.md @@ -32,16 +32,13 @@ description: stickers.addStickerToSet parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v68/methods/stickers_changeStickerPosition.md b/old_docs/API_docs_v68/methods/stickers_changeStickerPosition.md index a5784b3a..c78893dd 100644 --- a/old_docs/API_docs_v68/methods/stickers_changeStickerPosition.md +++ b/old_docs/API_docs_v68/methods/stickers_changeStickerPosition.md @@ -32,16 +32,13 @@ description: stickers.changeStickerPosition parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v68/methods/stickers_createStickerSet.md b/old_docs/API_docs_v68/methods/stickers_createStickerSet.md index 7c5b6821..64a5a978 100644 --- a/old_docs/API_docs_v68/methods/stickers_createStickerSet.md +++ b/old_docs/API_docs_v68/methods/stickers_createStickerSet.md @@ -42,16 +42,13 @@ description: stickers.createStickerSet parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v68/methods/stickers_removeStickerFromSet.md b/old_docs/API_docs_v68/methods/stickers_removeStickerFromSet.md index d485db14..1934bf1b 100644 --- a/old_docs/API_docs_v68/methods/stickers_removeStickerFromSet.md +++ b/old_docs/API_docs_v68/methods/stickers_removeStickerFromSet.md @@ -31,16 +31,13 @@ description: stickers.removeStickerFromSet parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v68/methods/upload_getWebFile.md b/old_docs/API_docs_v68/methods/upload_getWebFile.md index ec7c05b4..8744dac5 100644 --- a/old_docs/API_docs_v68/methods/upload_getWebFile.md +++ b/old_docs/API_docs_v68/methods/upload_getWebFile.md @@ -32,13 +32,10 @@ description: upload.getWebFile parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v68/methods/users_getUsers.md b/old_docs/API_docs_v68/methods/users_getUsers.md index 6a44d258..3a981d57 100644 --- a/old_docs/API_docs_v68/methods/users_getUsers.md +++ b/old_docs/API_docs_v68/methods/users_getUsers.md @@ -33,16 +33,13 @@ description: users.getUsers parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v70/methods/account_changePhone.md b/old_docs/API_docs_v70/methods/account_changePhone.md index 5d1801d0..e47ef6a7 100644 --- a/old_docs/API_docs_v70/methods/account_changePhone.md +++ b/old_docs/API_docs_v70/methods/account_changePhone.md @@ -32,13 +32,10 @@ description: account.changePhone parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v70/methods/account_checkUsername.md b/old_docs/API_docs_v70/methods/account_checkUsername.md index afc59b6c..40cf822f 100644 --- a/old_docs/API_docs_v70/methods/account_checkUsername.md +++ b/old_docs/API_docs_v70/methods/account_checkUsername.md @@ -30,13 +30,10 @@ description: account.checkUsername parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v70/methods/account_confirmPhone.md b/old_docs/API_docs_v70/methods/account_confirmPhone.md index 0d2dc5c6..8dd79d94 100644 --- a/old_docs/API_docs_v70/methods/account_confirmPhone.md +++ b/old_docs/API_docs_v70/methods/account_confirmPhone.md @@ -32,13 +32,10 @@ description: account.confirmPhone parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v70/methods/account_deleteAccount.md b/old_docs/API_docs_v70/methods/account_deleteAccount.md index 5abcd0ec..6f1bbda9 100644 --- a/old_docs/API_docs_v70/methods/account_deleteAccount.md +++ b/old_docs/API_docs_v70/methods/account_deleteAccount.md @@ -23,13 +23,10 @@ description: account.deleteAccount parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v70/methods/account_getAccountTTL.md b/old_docs/API_docs_v70/methods/account_getAccountTTL.md index 3520fbef..538b1d7a 100644 --- a/old_docs/API_docs_v70/methods/account_getAccountTTL.md +++ b/old_docs/API_docs_v70/methods/account_getAccountTTL.md @@ -18,13 +18,10 @@ description: account.getAccountTTL parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v70/methods/account_getAuthorizations.md b/old_docs/API_docs_v70/methods/account_getAuthorizations.md index 91bbce5e..f138d517 100644 --- a/old_docs/API_docs_v70/methods/account_getAuthorizations.md +++ b/old_docs/API_docs_v70/methods/account_getAuthorizations.md @@ -18,13 +18,10 @@ description: account.getAuthorizations parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v70/methods/account_getNotifySettings.md b/old_docs/API_docs_v70/methods/account_getNotifySettings.md index 8ee710d8..a48eed2f 100644 --- a/old_docs/API_docs_v70/methods/account_getNotifySettings.md +++ b/old_docs/API_docs_v70/methods/account_getNotifySettings.md @@ -30,13 +30,10 @@ description: account.getNotifySettings parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v70/methods/account_getPassword.md b/old_docs/API_docs_v70/methods/account_getPassword.md index 4d9fd015..1abf6174 100644 --- a/old_docs/API_docs_v70/methods/account_getPassword.md +++ b/old_docs/API_docs_v70/methods/account_getPassword.md @@ -18,13 +18,10 @@ description: account.getPassword parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v70/methods/account_getPasswordSettings.md b/old_docs/API_docs_v70/methods/account_getPasswordSettings.md index 02cb77f7..aec5b989 100644 --- a/old_docs/API_docs_v70/methods/account_getPasswordSettings.md +++ b/old_docs/API_docs_v70/methods/account_getPasswordSettings.md @@ -30,13 +30,10 @@ description: account.getPasswordSettings parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v70/methods/account_getPrivacy.md b/old_docs/API_docs_v70/methods/account_getPrivacy.md index 52786b79..8bbe9795 100644 --- a/old_docs/API_docs_v70/methods/account_getPrivacy.md +++ b/old_docs/API_docs_v70/methods/account_getPrivacy.md @@ -30,13 +30,10 @@ description: account.getPrivacy parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v70/methods/account_getTmpPassword.md b/old_docs/API_docs_v70/methods/account_getTmpPassword.md index 83ab09b1..d9bd30d8 100644 --- a/old_docs/API_docs_v70/methods/account_getTmpPassword.md +++ b/old_docs/API_docs_v70/methods/account_getTmpPassword.md @@ -32,13 +32,10 @@ description: account.getTmpPassword parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v70/methods/account_getWallPapers.md b/old_docs/API_docs_v70/methods/account_getWallPapers.md index 88c8a701..a71543d0 100644 --- a/old_docs/API_docs_v70/methods/account_getWallPapers.md +++ b/old_docs/API_docs_v70/methods/account_getWallPapers.md @@ -18,13 +18,10 @@ description: account.getWallPapers parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v70/methods/account_registerDevice.md b/old_docs/API_docs_v70/methods/account_registerDevice.md index 3cc7f98d..8be04ad2 100644 --- a/old_docs/API_docs_v70/methods/account_registerDevice.md +++ b/old_docs/API_docs_v70/methods/account_registerDevice.md @@ -31,13 +31,10 @@ description: account.registerDevice parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v70/methods/account_reportPeer.md b/old_docs/API_docs_v70/methods/account_reportPeer.md index 1545c3b8..1ae9f4d4 100644 --- a/old_docs/API_docs_v70/methods/account_reportPeer.md +++ b/old_docs/API_docs_v70/methods/account_reportPeer.md @@ -31,13 +31,10 @@ description: account.reportPeer parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v70/methods/account_resetAuthorization.md b/old_docs/API_docs_v70/methods/account_resetAuthorization.md index e44334f2..0438cba3 100644 --- a/old_docs/API_docs_v70/methods/account_resetAuthorization.md +++ b/old_docs/API_docs_v70/methods/account_resetAuthorization.md @@ -30,13 +30,10 @@ description: account.resetAuthorization parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v70/methods/account_resetNotifySettings.md b/old_docs/API_docs_v70/methods/account_resetNotifySettings.md index 155ede68..92db4f4f 100644 --- a/old_docs/API_docs_v70/methods/account_resetNotifySettings.md +++ b/old_docs/API_docs_v70/methods/account_resetNotifySettings.md @@ -18,13 +18,10 @@ description: account.resetNotifySettings parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v70/methods/account_sendChangePhoneCode.md b/old_docs/API_docs_v70/methods/account_sendChangePhoneCode.md index 4be218f2..017b5f7f 100644 --- a/old_docs/API_docs_v70/methods/account_sendChangePhoneCode.md +++ b/old_docs/API_docs_v70/methods/account_sendChangePhoneCode.md @@ -32,13 +32,10 @@ description: account.sendChangePhoneCode parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v70/methods/account_sendConfirmPhoneCode.md b/old_docs/API_docs_v70/methods/account_sendConfirmPhoneCode.md index 009fcb09..3665bd50 100644 --- a/old_docs/API_docs_v70/methods/account_sendConfirmPhoneCode.md +++ b/old_docs/API_docs_v70/methods/account_sendConfirmPhoneCode.md @@ -32,13 +32,10 @@ description: account.sendConfirmPhoneCode parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v70/methods/account_setAccountTTL.md b/old_docs/API_docs_v70/methods/account_setAccountTTL.md index f06eb676..d08f59fb 100644 --- a/old_docs/API_docs_v70/methods/account_setAccountTTL.md +++ b/old_docs/API_docs_v70/methods/account_setAccountTTL.md @@ -30,13 +30,10 @@ description: account.setAccountTTL parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v70/methods/account_setPrivacy.md b/old_docs/API_docs_v70/methods/account_setPrivacy.md index 56aebbcc..401aa71c 100644 --- a/old_docs/API_docs_v70/methods/account_setPrivacy.md +++ b/old_docs/API_docs_v70/methods/account_setPrivacy.md @@ -31,13 +31,10 @@ description: account.setPrivacy parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v70/methods/account_unregisterDevice.md b/old_docs/API_docs_v70/methods/account_unregisterDevice.md index 41899b6e..283ec7d2 100644 --- a/old_docs/API_docs_v70/methods/account_unregisterDevice.md +++ b/old_docs/API_docs_v70/methods/account_unregisterDevice.md @@ -31,13 +31,10 @@ description: account.unregisterDevice parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v70/methods/account_updateDeviceLocked.md b/old_docs/API_docs_v70/methods/account_updateDeviceLocked.md index 37aeb59d..ae6125a5 100644 --- a/old_docs/API_docs_v70/methods/account_updateDeviceLocked.md +++ b/old_docs/API_docs_v70/methods/account_updateDeviceLocked.md @@ -23,13 +23,10 @@ description: account.updateDeviceLocked parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v70/methods/account_updateNotifySettings.md b/old_docs/API_docs_v70/methods/account_updateNotifySettings.md index 8389b5c2..fb096250 100644 --- a/old_docs/API_docs_v70/methods/account_updateNotifySettings.md +++ b/old_docs/API_docs_v70/methods/account_updateNotifySettings.md @@ -31,13 +31,10 @@ description: account.updateNotifySettings parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v70/methods/account_updatePasswordSettings.md b/old_docs/API_docs_v70/methods/account_updatePasswordSettings.md index b7c8da4b..ffa8dcd9 100644 --- a/old_docs/API_docs_v70/methods/account_updatePasswordSettings.md +++ b/old_docs/API_docs_v70/methods/account_updatePasswordSettings.md @@ -34,13 +34,10 @@ description: account.updatePasswordSettings parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v70/methods/account_updateProfile.md b/old_docs/API_docs_v70/methods/account_updateProfile.md index a50eaea5..b3d468d1 100644 --- a/old_docs/API_docs_v70/methods/account_updateProfile.md +++ b/old_docs/API_docs_v70/methods/account_updateProfile.md @@ -33,13 +33,10 @@ description: account.updateProfile parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v70/methods/account_updateStatus.md b/old_docs/API_docs_v70/methods/account_updateStatus.md index 7204e582..c8fa0a79 100644 --- a/old_docs/API_docs_v70/methods/account_updateStatus.md +++ b/old_docs/API_docs_v70/methods/account_updateStatus.md @@ -30,13 +30,10 @@ description: account.updateStatus parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v70/methods/account_updateUsername.md b/old_docs/API_docs_v70/methods/account_updateUsername.md index 22be2fd4..2b7576a5 100644 --- a/old_docs/API_docs_v70/methods/account_updateUsername.md +++ b/old_docs/API_docs_v70/methods/account_updateUsername.md @@ -32,13 +32,10 @@ description: account.updateUsername parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v70/methods/auth_bindTempAuthKey.md b/old_docs/API_docs_v70/methods/auth_bindTempAuthKey.md index e3d72dd5..7419abb0 100644 --- a/old_docs/API_docs_v70/methods/auth_bindTempAuthKey.md +++ b/old_docs/API_docs_v70/methods/auth_bindTempAuthKey.md @@ -35,16 +35,13 @@ description: auth.bindTempAuthKey parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v70/methods/auth_cancelCode.md b/old_docs/API_docs_v70/methods/auth_cancelCode.md index dc390329..05d927a1 100644 --- a/old_docs/API_docs_v70/methods/auth_cancelCode.md +++ b/old_docs/API_docs_v70/methods/auth_cancelCode.md @@ -31,13 +31,10 @@ description: auth.cancelCode parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v70/methods/auth_checkPassword.md b/old_docs/API_docs_v70/methods/auth_checkPassword.md index d5559186..6b6b21cc 100644 --- a/old_docs/API_docs_v70/methods/auth_checkPassword.md +++ b/old_docs/API_docs_v70/methods/auth_checkPassword.md @@ -30,13 +30,10 @@ description: auth.checkPassword parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v70/methods/auth_checkPhone.md b/old_docs/API_docs_v70/methods/auth_checkPhone.md index 3455904d..f6cac2e6 100644 --- a/old_docs/API_docs_v70/methods/auth_checkPhone.md +++ b/old_docs/API_docs_v70/methods/auth_checkPhone.md @@ -32,13 +32,10 @@ description: auth.checkPhone parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v70/methods/auth_dropTempAuthKeys.md b/old_docs/API_docs_v70/methods/auth_dropTempAuthKeys.md index aba76766..fedb7bf4 100644 --- a/old_docs/API_docs_v70/methods/auth_dropTempAuthKeys.md +++ b/old_docs/API_docs_v70/methods/auth_dropTempAuthKeys.md @@ -23,16 +23,13 @@ description: auth.dropTempAuthKeys parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v70/methods/auth_exportAuthorization.md b/old_docs/API_docs_v70/methods/auth_exportAuthorization.md index 44c45b70..cbc8203b 100644 --- a/old_docs/API_docs_v70/methods/auth_exportAuthorization.md +++ b/old_docs/API_docs_v70/methods/auth_exportAuthorization.md @@ -30,16 +30,13 @@ description: auth.exportAuthorization parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v70/methods/auth_importAuthorization.md b/old_docs/API_docs_v70/methods/auth_importAuthorization.md index e0fd534f..22166510 100644 --- a/old_docs/API_docs_v70/methods/auth_importAuthorization.md +++ b/old_docs/API_docs_v70/methods/auth_importAuthorization.md @@ -32,16 +32,13 @@ description: auth.importAuthorization parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v70/methods/auth_recoverPassword.md b/old_docs/API_docs_v70/methods/auth_recoverPassword.md index c2ce3fed..931e99fd 100644 --- a/old_docs/API_docs_v70/methods/auth_recoverPassword.md +++ b/old_docs/API_docs_v70/methods/auth_recoverPassword.md @@ -30,13 +30,10 @@ description: auth.recoverPassword parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v70/methods/auth_requestPasswordRecovery.md b/old_docs/API_docs_v70/methods/auth_requestPasswordRecovery.md index 101b1cf7..c6babcd9 100644 --- a/old_docs/API_docs_v70/methods/auth_requestPasswordRecovery.md +++ b/old_docs/API_docs_v70/methods/auth_requestPasswordRecovery.md @@ -25,13 +25,10 @@ description: auth.requestPasswordRecovery parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v70/methods/auth_resendCode.md b/old_docs/API_docs_v70/methods/auth_resendCode.md index 14d08ddd..df4803b8 100644 --- a/old_docs/API_docs_v70/methods/auth_resendCode.md +++ b/old_docs/API_docs_v70/methods/auth_resendCode.md @@ -31,13 +31,10 @@ description: auth.resendCode parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v70/methods/auth_resetAuthorizations.md b/old_docs/API_docs_v70/methods/auth_resetAuthorizations.md index 87a39a22..fe297fa7 100644 --- a/old_docs/API_docs_v70/methods/auth_resetAuthorizations.md +++ b/old_docs/API_docs_v70/methods/auth_resetAuthorizations.md @@ -25,13 +25,10 @@ description: auth.resetAuthorizations parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v70/methods/auth_sendInvites.md b/old_docs/API_docs_v70/methods/auth_sendInvites.md index 604fc65d..ad9636c5 100644 --- a/old_docs/API_docs_v70/methods/auth_sendInvites.md +++ b/old_docs/API_docs_v70/methods/auth_sendInvites.md @@ -31,13 +31,10 @@ description: auth.sendInvites parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v70/methods/bots_answerWebhookJSONQuery.md b/old_docs/API_docs_v70/methods/bots_answerWebhookJSONQuery.md index ae1efce3..d910db35 100644 --- a/old_docs/API_docs_v70/methods/bots_answerWebhookJSONQuery.md +++ b/old_docs/API_docs_v70/methods/bots_answerWebhookJSONQuery.md @@ -32,16 +32,13 @@ description: bots.answerWebhookJSONQuery parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v70/methods/bots_sendCustomRequest.md b/old_docs/API_docs_v70/methods/bots_sendCustomRequest.md index 927f18c5..abb880ef 100644 --- a/old_docs/API_docs_v70/methods/bots_sendCustomRequest.md +++ b/old_docs/API_docs_v70/methods/bots_sendCustomRequest.md @@ -31,16 +31,13 @@ description: bots.sendCustomRequest parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v70/methods/channels_checkUsername.md b/old_docs/API_docs_v70/methods/channels_checkUsername.md index d6ea876d..e29ee107 100644 --- a/old_docs/API_docs_v70/methods/channels_checkUsername.md +++ b/old_docs/API_docs_v70/methods/channels_checkUsername.md @@ -33,13 +33,10 @@ description: channels.checkUsername parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v70/methods/channels_createChannel.md b/old_docs/API_docs_v70/methods/channels_createChannel.md index 9ba02e9e..58808b73 100644 --- a/old_docs/API_docs_v70/methods/channels_createChannel.md +++ b/old_docs/API_docs_v70/methods/channels_createChannel.md @@ -34,13 +34,10 @@ description: channels.createChannel parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v70/methods/channels_deleteChannel.md b/old_docs/API_docs_v70/methods/channels_deleteChannel.md index 912ab080..532f3c6c 100644 --- a/old_docs/API_docs_v70/methods/channels_deleteChannel.md +++ b/old_docs/API_docs_v70/methods/channels_deleteChannel.md @@ -31,13 +31,10 @@ description: channels.deleteChannel parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v70/methods/channels_deleteMessages.md b/old_docs/API_docs_v70/methods/channels_deleteMessages.md index b3481294..a42a47a5 100644 --- a/old_docs/API_docs_v70/methods/channels_deleteMessages.md +++ b/old_docs/API_docs_v70/methods/channels_deleteMessages.md @@ -33,16 +33,13 @@ description: channels.deleteMessages parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v70/methods/channels_deleteUserHistory.md b/old_docs/API_docs_v70/methods/channels_deleteUserHistory.md index 66843269..73494485 100644 --- a/old_docs/API_docs_v70/methods/channels_deleteUserHistory.md +++ b/old_docs/API_docs_v70/methods/channels_deleteUserHistory.md @@ -32,13 +32,10 @@ description: channels.deleteUserHistory parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v70/methods/channels_editAbout.md b/old_docs/API_docs_v70/methods/channels_editAbout.md index 4c759a8a..1c3ce933 100644 --- a/old_docs/API_docs_v70/methods/channels_editAbout.md +++ b/old_docs/API_docs_v70/methods/channels_editAbout.md @@ -34,16 +34,13 @@ description: channels.editAbout parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v70/methods/channels_editAdmin.md b/old_docs/API_docs_v70/methods/channels_editAdmin.md index e68ba7ea..c6f5454c 100644 --- a/old_docs/API_docs_v70/methods/channels_editAdmin.md +++ b/old_docs/API_docs_v70/methods/channels_editAdmin.md @@ -41,16 +41,13 @@ description: channels.editAdmin parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v70/methods/channels_editBanned.md b/old_docs/API_docs_v70/methods/channels_editBanned.md index 7fb904b9..02ed04bf 100644 --- a/old_docs/API_docs_v70/methods/channels_editBanned.md +++ b/old_docs/API_docs_v70/methods/channels_editBanned.md @@ -36,16 +36,13 @@ description: channels.editBanned parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v70/methods/channels_editPhoto.md b/old_docs/API_docs_v70/methods/channels_editPhoto.md index 99873537..4a4aeb03 100644 --- a/old_docs/API_docs_v70/methods/channels_editPhoto.md +++ b/old_docs/API_docs_v70/methods/channels_editPhoto.md @@ -33,16 +33,13 @@ description: channels.editPhoto parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v70/methods/channels_editTitle.md b/old_docs/API_docs_v70/methods/channels_editTitle.md index 04e8ce12..8a69d09b 100644 --- a/old_docs/API_docs_v70/methods/channels_editTitle.md +++ b/old_docs/API_docs_v70/methods/channels_editTitle.md @@ -33,16 +33,13 @@ description: channels.editTitle parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v70/methods/channels_exportInvite.md b/old_docs/API_docs_v70/methods/channels_exportInvite.md index 2ed80f6c..79dc6401 100644 --- a/old_docs/API_docs_v70/methods/channels_exportInvite.md +++ b/old_docs/API_docs_v70/methods/channels_exportInvite.md @@ -32,16 +32,13 @@ description: channels.exportInvite parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v70/methods/channels_exportMessageLink.md b/old_docs/API_docs_v70/methods/channels_exportMessageLink.md index 9831c9c0..5b824859 100644 --- a/old_docs/API_docs_v70/methods/channels_exportMessageLink.md +++ b/old_docs/API_docs_v70/methods/channels_exportMessageLink.md @@ -31,13 +31,10 @@ description: channels.exportMessageLink parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v70/methods/channels_getAdminLog.md b/old_docs/API_docs_v70/methods/channels_getAdminLog.md index 5283563d..2f7327d1 100644 --- a/old_docs/API_docs_v70/methods/channels_getAdminLog.md +++ b/old_docs/API_docs_v70/methods/channels_getAdminLog.md @@ -38,13 +38,10 @@ description: channels.getAdminLog parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v70/methods/channels_getAdminedPublicChannels.md b/old_docs/API_docs_v70/methods/channels_getAdminedPublicChannels.md index 7fceb026..283a9071 100644 --- a/old_docs/API_docs_v70/methods/channels_getAdminedPublicChannels.md +++ b/old_docs/API_docs_v70/methods/channels_getAdminedPublicChannels.md @@ -18,13 +18,10 @@ description: channels.getAdminedPublicChannels parameters, return type and examp ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v70/methods/channels_getChannels.md b/old_docs/API_docs_v70/methods/channels_getChannels.md index 13304938..e80aa6a6 100644 --- a/old_docs/API_docs_v70/methods/channels_getChannels.md +++ b/old_docs/API_docs_v70/methods/channels_getChannels.md @@ -32,16 +32,13 @@ description: channels.getChannels parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v70/methods/channels_getMessages.md b/old_docs/API_docs_v70/methods/channels_getMessages.md index 5480dd86..dc392773 100644 --- a/old_docs/API_docs_v70/methods/channels_getMessages.md +++ b/old_docs/API_docs_v70/methods/channels_getMessages.md @@ -33,16 +33,13 @@ description: channels.getMessages parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v70/methods/channels_getParticipant.md b/old_docs/API_docs_v70/methods/channels_getParticipant.md index 8c7e3cbd..001bf115 100644 --- a/old_docs/API_docs_v70/methods/channels_getParticipant.md +++ b/old_docs/API_docs_v70/methods/channels_getParticipant.md @@ -35,16 +35,13 @@ description: channels.getParticipant parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v70/methods/channels_inviteToChannel.md b/old_docs/API_docs_v70/methods/channels_inviteToChannel.md index cf5480e0..2448fb84 100644 --- a/old_docs/API_docs_v70/methods/channels_inviteToChannel.md +++ b/old_docs/API_docs_v70/methods/channels_inviteToChannel.md @@ -46,13 +46,10 @@ description: channels.inviteToChannel parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v70/methods/channels_joinChannel.md b/old_docs/API_docs_v70/methods/channels_joinChannel.md index f31730a1..e746cf48 100644 --- a/old_docs/API_docs_v70/methods/channels_joinChannel.md +++ b/old_docs/API_docs_v70/methods/channels_joinChannel.md @@ -32,13 +32,10 @@ description: channels.joinChannel parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v70/methods/channels_leaveChannel.md b/old_docs/API_docs_v70/methods/channels_leaveChannel.md index 12902f6d..ff244ded 100644 --- a/old_docs/API_docs_v70/methods/channels_leaveChannel.md +++ b/old_docs/API_docs_v70/methods/channels_leaveChannel.md @@ -34,16 +34,13 @@ description: channels.leaveChannel parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v70/methods/channels_readHistory.md b/old_docs/API_docs_v70/methods/channels_readHistory.md index be979101..6fc6ec0e 100644 --- a/old_docs/API_docs_v70/methods/channels_readHistory.md +++ b/old_docs/API_docs_v70/methods/channels_readHistory.md @@ -32,13 +32,10 @@ description: channels.readHistory parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v70/methods/channels_reportSpam.md b/old_docs/API_docs_v70/methods/channels_reportSpam.md index 22f34443..a37a5833 100644 --- a/old_docs/API_docs_v70/methods/channels_reportSpam.md +++ b/old_docs/API_docs_v70/methods/channels_reportSpam.md @@ -33,13 +33,10 @@ description: channels.reportSpam parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v70/methods/channels_toggleInvites.md b/old_docs/API_docs_v70/methods/channels_toggleInvites.md index c2715b32..d0ae1136 100644 --- a/old_docs/API_docs_v70/methods/channels_toggleInvites.md +++ b/old_docs/API_docs_v70/methods/channels_toggleInvites.md @@ -33,13 +33,10 @@ description: channels.toggleInvites parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v70/methods/channels_toggleSignatures.md b/old_docs/API_docs_v70/methods/channels_toggleSignatures.md index a214b849..6477bc6d 100644 --- a/old_docs/API_docs_v70/methods/channels_toggleSignatures.md +++ b/old_docs/API_docs_v70/methods/channels_toggleSignatures.md @@ -31,13 +31,10 @@ description: channels.toggleSignatures parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v70/methods/channels_updatePinnedMessage.md b/old_docs/API_docs_v70/methods/channels_updatePinnedMessage.md index 6dcabf71..37a0a20d 100644 --- a/old_docs/API_docs_v70/methods/channels_updatePinnedMessage.md +++ b/old_docs/API_docs_v70/methods/channels_updatePinnedMessage.md @@ -35,16 +35,13 @@ description: channels.updatePinnedMessage parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v70/methods/channels_updateUsername.md b/old_docs/API_docs_v70/methods/channels_updateUsername.md index c2ede724..1f1f111e 100644 --- a/old_docs/API_docs_v70/methods/channels_updateUsername.md +++ b/old_docs/API_docs_v70/methods/channels_updateUsername.md @@ -35,13 +35,10 @@ description: channels.updateUsername parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v70/methods/contacts_block.md b/old_docs/API_docs_v70/methods/contacts_block.md index d9d58e37..1c7cbe26 100644 --- a/old_docs/API_docs_v70/methods/contacts_block.md +++ b/old_docs/API_docs_v70/methods/contacts_block.md @@ -30,13 +30,10 @@ description: contacts.block parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v70/methods/contacts_deleteContact.md b/old_docs/API_docs_v70/methods/contacts_deleteContact.md index cd8c17ad..987a1be0 100644 --- a/old_docs/API_docs_v70/methods/contacts_deleteContact.md +++ b/old_docs/API_docs_v70/methods/contacts_deleteContact.md @@ -30,13 +30,10 @@ description: contacts.deleteContact parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v70/methods/contacts_deleteContacts.md b/old_docs/API_docs_v70/methods/contacts_deleteContacts.md index fc65880d..67a922ed 100644 --- a/old_docs/API_docs_v70/methods/contacts_deleteContacts.md +++ b/old_docs/API_docs_v70/methods/contacts_deleteContacts.md @@ -31,13 +31,10 @@ description: contacts.deleteContacts parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v70/methods/contacts_exportCard.md b/old_docs/API_docs_v70/methods/contacts_exportCard.md index 63508076..bf6d1f9f 100644 --- a/old_docs/API_docs_v70/methods/contacts_exportCard.md +++ b/old_docs/API_docs_v70/methods/contacts_exportCard.md @@ -18,13 +18,10 @@ description: contacts.exportCard parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v70/methods/contacts_getBlocked.md b/old_docs/API_docs_v70/methods/contacts_getBlocked.md index f50792b4..faa719da 100644 --- a/old_docs/API_docs_v70/methods/contacts_getBlocked.md +++ b/old_docs/API_docs_v70/methods/contacts_getBlocked.md @@ -24,13 +24,10 @@ description: contacts.getBlocked parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v70/methods/contacts_getContacts.md b/old_docs/API_docs_v70/methods/contacts_getContacts.md index 71313bf2..a6779111 100644 --- a/old_docs/API_docs_v70/methods/contacts_getContacts.md +++ b/old_docs/API_docs_v70/methods/contacts_getContacts.md @@ -23,13 +23,10 @@ description: contacts.getContacts parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v70/methods/contacts_getStatuses.md b/old_docs/API_docs_v70/methods/contacts_getStatuses.md index d914e08d..9bb7f263 100644 --- a/old_docs/API_docs_v70/methods/contacts_getStatuses.md +++ b/old_docs/API_docs_v70/methods/contacts_getStatuses.md @@ -18,13 +18,10 @@ description: contacts.getStatuses parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v70/methods/contacts_getTopPeers.md b/old_docs/API_docs_v70/methods/contacts_getTopPeers.md index cbd64cc0..f72133a5 100644 --- a/old_docs/API_docs_v70/methods/contacts_getTopPeers.md +++ b/old_docs/API_docs_v70/methods/contacts_getTopPeers.md @@ -38,13 +38,10 @@ description: contacts.getTopPeers parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v70/methods/contacts_importCard.md b/old_docs/API_docs_v70/methods/contacts_importCard.md index a6abf56d..7a2f34e1 100644 --- a/old_docs/API_docs_v70/methods/contacts_importCard.md +++ b/old_docs/API_docs_v70/methods/contacts_importCard.md @@ -31,13 +31,10 @@ description: contacts.importCard parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v70/methods/contacts_importContacts.md b/old_docs/API_docs_v70/methods/contacts_importContacts.md index db2051ac..2f070493 100644 --- a/old_docs/API_docs_v70/methods/contacts_importContacts.md +++ b/old_docs/API_docs_v70/methods/contacts_importContacts.md @@ -24,13 +24,10 @@ description: contacts.importContacts parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v70/methods/contacts_resetTopPeerRating.md b/old_docs/API_docs_v70/methods/contacts_resetTopPeerRating.md index 738494b2..711ea0cb 100644 --- a/old_docs/API_docs_v70/methods/contacts_resetTopPeerRating.md +++ b/old_docs/API_docs_v70/methods/contacts_resetTopPeerRating.md @@ -31,13 +31,10 @@ description: contacts.resetTopPeerRating parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v70/methods/contacts_search.md b/old_docs/API_docs_v70/methods/contacts_search.md index 0203b160..70a0635e 100644 --- a/old_docs/API_docs_v70/methods/contacts_search.md +++ b/old_docs/API_docs_v70/methods/contacts_search.md @@ -33,13 +33,10 @@ description: contacts.search parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v70/methods/contacts_unblock.md b/old_docs/API_docs_v70/methods/contacts_unblock.md index a1977c24..9c01e42a 100644 --- a/old_docs/API_docs_v70/methods/contacts_unblock.md +++ b/old_docs/API_docs_v70/methods/contacts_unblock.md @@ -30,13 +30,10 @@ description: contacts.unblock parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v70/methods/contest_saveDeveloperInfo.md b/old_docs/API_docs_v70/methods/contest_saveDeveloperInfo.md index eca7bfcf..c0bb9054 100644 --- a/old_docs/API_docs_v70/methods/contest_saveDeveloperInfo.md +++ b/old_docs/API_docs_v70/methods/contest_saveDeveloperInfo.md @@ -27,16 +27,13 @@ description: contest.saveDeveloperInfo parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v70/methods/destroy_auth_key.md b/old_docs/API_docs_v70/methods/destroy_auth_key.md index 7d39ceec..1803e375 100644 --- a/old_docs/API_docs_v70/methods/destroy_auth_key.md +++ b/old_docs/API_docs_v70/methods/destroy_auth_key.md @@ -18,16 +18,13 @@ description: destroy_auth_key parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v70/methods/destroy_session.md b/old_docs/API_docs_v70/methods/destroy_session.md index 0b732694..39aa2c6e 100644 --- a/old_docs/API_docs_v70/methods/destroy_session.md +++ b/old_docs/API_docs_v70/methods/destroy_session.md @@ -23,16 +23,13 @@ description: destroy_session parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v70/methods/get_future_salts.md b/old_docs/API_docs_v70/methods/get_future_salts.md index d3b306ce..fedf036c 100644 --- a/old_docs/API_docs_v70/methods/get_future_salts.md +++ b/old_docs/API_docs_v70/methods/get_future_salts.md @@ -23,16 +23,13 @@ description: get_future_salts parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v70/methods/help_getAppChangelog.md b/old_docs/API_docs_v70/methods/help_getAppChangelog.md index 9d8c3203..59916787 100644 --- a/old_docs/API_docs_v70/methods/help_getAppChangelog.md +++ b/old_docs/API_docs_v70/methods/help_getAppChangelog.md @@ -23,13 +23,10 @@ description: help.getAppChangelog parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v70/methods/help_getAppUpdate.md b/old_docs/API_docs_v70/methods/help_getAppUpdate.md index 0871f59d..89ff22c3 100644 --- a/old_docs/API_docs_v70/methods/help_getAppUpdate.md +++ b/old_docs/API_docs_v70/methods/help_getAppUpdate.md @@ -18,13 +18,10 @@ description: help.getAppUpdate parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v70/methods/help_getCdnConfig.md b/old_docs/API_docs_v70/methods/help_getCdnConfig.md index da446958..3079e605 100644 --- a/old_docs/API_docs_v70/methods/help_getCdnConfig.md +++ b/old_docs/API_docs_v70/methods/help_getCdnConfig.md @@ -25,16 +25,13 @@ description: help.getCdnConfig parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v70/methods/help_getConfig.md b/old_docs/API_docs_v70/methods/help_getConfig.md index e3648b5a..bb51b362 100644 --- a/old_docs/API_docs_v70/methods/help_getConfig.md +++ b/old_docs/API_docs_v70/methods/help_getConfig.md @@ -25,16 +25,13 @@ description: help.getConfig parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v70/methods/help_getInviteText.md b/old_docs/API_docs_v70/methods/help_getInviteText.md index 4bcbb77d..6d2674d6 100644 --- a/old_docs/API_docs_v70/methods/help_getInviteText.md +++ b/old_docs/API_docs_v70/methods/help_getInviteText.md @@ -18,13 +18,10 @@ description: help.getInviteText parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v70/methods/help_getNearestDc.md b/old_docs/API_docs_v70/methods/help_getNearestDc.md index c6f5c555..6d8ed3f7 100644 --- a/old_docs/API_docs_v70/methods/help_getNearestDc.md +++ b/old_docs/API_docs_v70/methods/help_getNearestDc.md @@ -18,13 +18,10 @@ description: help.getNearestDc parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v70/methods/help_getSupport.md b/old_docs/API_docs_v70/methods/help_getSupport.md index 209edf03..ca8db03c 100644 --- a/old_docs/API_docs_v70/methods/help_getSupport.md +++ b/old_docs/API_docs_v70/methods/help_getSupport.md @@ -18,13 +18,10 @@ description: help.getSupport parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v70/methods/help_getTermsOfService.md b/old_docs/API_docs_v70/methods/help_getTermsOfService.md index 8bc2e2fa..eb686506 100644 --- a/old_docs/API_docs_v70/methods/help_getTermsOfService.md +++ b/old_docs/API_docs_v70/methods/help_getTermsOfService.md @@ -18,13 +18,10 @@ description: help.getTermsOfService parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v70/methods/help_saveAppLog.md b/old_docs/API_docs_v70/methods/help_saveAppLog.md index 4f06434c..741b9aa1 100644 --- a/old_docs/API_docs_v70/methods/help_saveAppLog.md +++ b/old_docs/API_docs_v70/methods/help_saveAppLog.md @@ -23,13 +23,10 @@ description: help.saveAppLog parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v70/methods/help_setBotUpdatesStatus.md b/old_docs/API_docs_v70/methods/help_setBotUpdatesStatus.md index 55e1d2fe..470187a0 100644 --- a/old_docs/API_docs_v70/methods/help_setBotUpdatesStatus.md +++ b/old_docs/API_docs_v70/methods/help_setBotUpdatesStatus.md @@ -24,16 +24,13 @@ description: help.setBotUpdatesStatus parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v70/methods/initConnection.md b/old_docs/API_docs_v70/methods/initConnection.md index b66ab859..ef40e7f5 100644 --- a/old_docs/API_docs_v70/methods/initConnection.md +++ b/old_docs/API_docs_v70/methods/initConnection.md @@ -38,16 +38,13 @@ description: initConnection parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v70/methods/invokeAfterMsg.md b/old_docs/API_docs_v70/methods/invokeAfterMsg.md index c139fe8c..a382429e 100644 --- a/old_docs/API_docs_v70/methods/invokeAfterMsg.md +++ b/old_docs/API_docs_v70/methods/invokeAfterMsg.md @@ -24,16 +24,13 @@ description: invokeAfterMsg parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v70/methods/invokeAfterMsgs.md b/old_docs/API_docs_v70/methods/invokeAfterMsgs.md index 35004296..169eedaf 100644 --- a/old_docs/API_docs_v70/methods/invokeAfterMsgs.md +++ b/old_docs/API_docs_v70/methods/invokeAfterMsgs.md @@ -24,16 +24,13 @@ description: invokeAfterMsgs parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v70/methods/invokeWithLayer.md b/old_docs/API_docs_v70/methods/invokeWithLayer.md index 706036c4..d9a2c74c 100644 --- a/old_docs/API_docs_v70/methods/invokeWithLayer.md +++ b/old_docs/API_docs_v70/methods/invokeWithLayer.md @@ -41,16 +41,13 @@ description: invokeWithLayer parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v70/methods/invokeWithoutUpdates.md b/old_docs/API_docs_v70/methods/invokeWithoutUpdates.md index 10c6bfcf..f7d01765 100644 --- a/old_docs/API_docs_v70/methods/invokeWithoutUpdates.md +++ b/old_docs/API_docs_v70/methods/invokeWithoutUpdates.md @@ -23,16 +23,13 @@ description: invokeWithoutUpdates parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v70/methods/langpack_getDifference.md b/old_docs/API_docs_v70/methods/langpack_getDifference.md index 2e77cc3b..116e78e2 100644 --- a/old_docs/API_docs_v70/methods/langpack_getDifference.md +++ b/old_docs/API_docs_v70/methods/langpack_getDifference.md @@ -30,13 +30,10 @@ description: langpack.getDifference parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v70/methods/langpack_getLangPack.md b/old_docs/API_docs_v70/methods/langpack_getLangPack.md index 5d4d0b81..b5686e61 100644 --- a/old_docs/API_docs_v70/methods/langpack_getLangPack.md +++ b/old_docs/API_docs_v70/methods/langpack_getLangPack.md @@ -30,13 +30,10 @@ description: langpack.getLangPack parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v70/methods/langpack_getLanguages.md b/old_docs/API_docs_v70/methods/langpack_getLanguages.md index abaa0de3..cb65e5a0 100644 --- a/old_docs/API_docs_v70/methods/langpack_getLanguages.md +++ b/old_docs/API_docs_v70/methods/langpack_getLanguages.md @@ -25,13 +25,10 @@ description: langpack.getLanguages parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v70/methods/langpack_getStrings.md b/old_docs/API_docs_v70/methods/langpack_getStrings.md index 9bb740dc..ce58daf9 100644 --- a/old_docs/API_docs_v70/methods/langpack_getStrings.md +++ b/old_docs/API_docs_v70/methods/langpack_getStrings.md @@ -31,13 +31,10 @@ description: langpack.getStrings parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v70/methods/messages_addChatUser.md b/old_docs/API_docs_v70/methods/messages_addChatUser.md index 00da5a61..b9e6243d 100644 --- a/old_docs/API_docs_v70/methods/messages_addChatUser.md +++ b/old_docs/API_docs_v70/methods/messages_addChatUser.md @@ -40,13 +40,10 @@ description: messages.addChatUser parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v70/methods/messages_checkChatInvite.md b/old_docs/API_docs_v70/methods/messages_checkChatInvite.md index c5eb1c06..c4489469 100644 --- a/old_docs/API_docs_v70/methods/messages_checkChatInvite.md +++ b/old_docs/API_docs_v70/methods/messages_checkChatInvite.md @@ -32,13 +32,10 @@ description: messages.checkChatInvite parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v70/methods/messages_clearRecentStickers.md b/old_docs/API_docs_v70/methods/messages_clearRecentStickers.md index dda76d14..ae45b249 100644 --- a/old_docs/API_docs_v70/methods/messages_clearRecentStickers.md +++ b/old_docs/API_docs_v70/methods/messages_clearRecentStickers.md @@ -23,13 +23,10 @@ description: messages.clearRecentStickers parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v70/methods/messages_createChat.md b/old_docs/API_docs_v70/methods/messages_createChat.md index c643a022..c6c8f420 100644 --- a/old_docs/API_docs_v70/methods/messages_createChat.md +++ b/old_docs/API_docs_v70/methods/messages_createChat.md @@ -32,13 +32,10 @@ description: messages.createChat parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v70/methods/messages_deleteChatUser.md b/old_docs/API_docs_v70/methods/messages_deleteChatUser.md index 3d75d9cf..4b8c2aa5 100644 --- a/old_docs/API_docs_v70/methods/messages_deleteChatUser.md +++ b/old_docs/API_docs_v70/methods/messages_deleteChatUser.md @@ -33,16 +33,13 @@ description: messages.deleteChatUser parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v70/methods/messages_deleteHistory.md b/old_docs/API_docs_v70/methods/messages_deleteHistory.md index ce6ba6e7..ebe2c89c 100644 --- a/old_docs/API_docs_v70/methods/messages_deleteHistory.md +++ b/old_docs/API_docs_v70/methods/messages_deleteHistory.md @@ -32,13 +32,10 @@ description: messages.deleteHistory parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v70/methods/messages_deleteMessages.md b/old_docs/API_docs_v70/methods/messages_deleteMessages.md index 2b88a73f..5472cc72 100644 --- a/old_docs/API_docs_v70/methods/messages_deleteMessages.md +++ b/old_docs/API_docs_v70/methods/messages_deleteMessages.md @@ -31,16 +31,13 @@ description: messages.deleteMessages parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v70/methods/messages_editChatAdmin.md b/old_docs/API_docs_v70/methods/messages_editChatAdmin.md index e64d9da5..1b3ffa9f 100644 --- a/old_docs/API_docs_v70/methods/messages_editChatAdmin.md +++ b/old_docs/API_docs_v70/methods/messages_editChatAdmin.md @@ -32,13 +32,10 @@ description: messages.editChatAdmin parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v70/methods/messages_editChatPhoto.md b/old_docs/API_docs_v70/methods/messages_editChatPhoto.md index d225962d..8c5d9d47 100644 --- a/old_docs/API_docs_v70/methods/messages_editChatPhoto.md +++ b/old_docs/API_docs_v70/methods/messages_editChatPhoto.md @@ -35,16 +35,13 @@ description: messages.editChatPhoto parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v70/methods/messages_editChatTitle.md b/old_docs/API_docs_v70/methods/messages_editChatTitle.md index 5cb1c6d7..238c6d72 100644 --- a/old_docs/API_docs_v70/methods/messages_editChatTitle.md +++ b/old_docs/API_docs_v70/methods/messages_editChatTitle.md @@ -32,16 +32,13 @@ description: messages.editChatTitle parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v70/methods/messages_editInlineBotMessage.md b/old_docs/API_docs_v70/methods/messages_editInlineBotMessage.md index 621c81a3..c3489f9d 100644 --- a/old_docs/API_docs_v70/methods/messages_editInlineBotMessage.md +++ b/old_docs/API_docs_v70/methods/messages_editInlineBotMessage.md @@ -36,16 +36,13 @@ description: messages.editInlineBotMessage parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v70/methods/messages_editMessage.md b/old_docs/API_docs_v70/methods/messages_editMessage.md index b8cdda81..3a23c9ac 100644 --- a/old_docs/API_docs_v70/methods/messages_editMessage.md +++ b/old_docs/API_docs_v70/methods/messages_editMessage.md @@ -45,16 +45,13 @@ description: messages.editMessage parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v70/methods/messages_exportChatInvite.md b/old_docs/API_docs_v70/methods/messages_exportChatInvite.md index 4a6e28ff..78f2ff86 100644 --- a/old_docs/API_docs_v70/methods/messages_exportChatInvite.md +++ b/old_docs/API_docs_v70/methods/messages_exportChatInvite.md @@ -30,13 +30,10 @@ description: messages.exportChatInvite parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v70/methods/messages_forwardMessage.md b/old_docs/API_docs_v70/methods/messages_forwardMessage.md index 4e2362db..fbdbc955 100644 --- a/old_docs/API_docs_v70/methods/messages_forwardMessage.md +++ b/old_docs/API_docs_v70/methods/messages_forwardMessage.md @@ -34,16 +34,13 @@ description: messages.forwardMessage parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v70/methods/messages_forwardMessages.md b/old_docs/API_docs_v70/methods/messages_forwardMessages.md index b5e9b7e7..5a609390 100644 --- a/old_docs/API_docs_v70/methods/messages_forwardMessages.md +++ b/old_docs/API_docs_v70/methods/messages_forwardMessages.md @@ -56,16 +56,13 @@ description: messages.forwardMessages parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v70/methods/messages_getAllChats.md b/old_docs/API_docs_v70/methods/messages_getAllChats.md index c5037003..babcf17d 100644 --- a/old_docs/API_docs_v70/methods/messages_getAllChats.md +++ b/old_docs/API_docs_v70/methods/messages_getAllChats.md @@ -23,13 +23,10 @@ description: messages.getAllChats parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v70/methods/messages_getAllDrafts.md b/old_docs/API_docs_v70/methods/messages_getAllDrafts.md index cc447864..8550c5b8 100644 --- a/old_docs/API_docs_v70/methods/messages_getAllDrafts.md +++ b/old_docs/API_docs_v70/methods/messages_getAllDrafts.md @@ -18,13 +18,10 @@ description: messages.getAllDrafts parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v70/methods/messages_getAllStickers.md b/old_docs/API_docs_v70/methods/messages_getAllStickers.md index dc9e2432..034438a5 100644 --- a/old_docs/API_docs_v70/methods/messages_getAllStickers.md +++ b/old_docs/API_docs_v70/methods/messages_getAllStickers.md @@ -23,13 +23,10 @@ description: messages.getAllStickers parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v70/methods/messages_getArchivedStickers.md b/old_docs/API_docs_v70/methods/messages_getArchivedStickers.md index dddcc748..cdb7f0af 100644 --- a/old_docs/API_docs_v70/methods/messages_getArchivedStickers.md +++ b/old_docs/API_docs_v70/methods/messages_getArchivedStickers.md @@ -25,13 +25,10 @@ description: messages.getArchivedStickers parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v70/methods/messages_getAttachedStickers.md b/old_docs/API_docs_v70/methods/messages_getAttachedStickers.md index 250db6a8..79d4e30d 100644 --- a/old_docs/API_docs_v70/methods/messages_getAttachedStickers.md +++ b/old_docs/API_docs_v70/methods/messages_getAttachedStickers.md @@ -23,13 +23,10 @@ description: messages.getAttachedStickers parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v70/methods/messages_getBotCallbackAnswer.md b/old_docs/API_docs_v70/methods/messages_getBotCallbackAnswer.md index e905723f..afa5358c 100644 --- a/old_docs/API_docs_v70/methods/messages_getBotCallbackAnswer.md +++ b/old_docs/API_docs_v70/methods/messages_getBotCallbackAnswer.md @@ -37,13 +37,10 @@ description: messages.getBotCallbackAnswer parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v70/methods/messages_getChats.md b/old_docs/API_docs_v70/methods/messages_getChats.md index 6fa30cbd..c322613d 100644 --- a/old_docs/API_docs_v70/methods/messages_getChats.md +++ b/old_docs/API_docs_v70/methods/messages_getChats.md @@ -31,16 +31,13 @@ description: messages.getChats parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v70/methods/messages_getCommonChats.md b/old_docs/API_docs_v70/methods/messages_getCommonChats.md index 0c601ca9..8c9e2834 100644 --- a/old_docs/API_docs_v70/methods/messages_getCommonChats.md +++ b/old_docs/API_docs_v70/methods/messages_getCommonChats.md @@ -32,13 +32,10 @@ description: messages.getCommonChats parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v70/methods/messages_getDhConfig.md b/old_docs/API_docs_v70/methods/messages_getDhConfig.md index aac3354d..f97684d2 100644 --- a/old_docs/API_docs_v70/methods/messages_getDhConfig.md +++ b/old_docs/API_docs_v70/methods/messages_getDhConfig.md @@ -31,13 +31,10 @@ description: messages.getDhConfig parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v70/methods/messages_getDialogs.md b/old_docs/API_docs_v70/methods/messages_getDialogs.md index 131b75b7..cef5ecc6 100644 --- a/old_docs/API_docs_v70/methods/messages_getDialogs.md +++ b/old_docs/API_docs_v70/methods/messages_getDialogs.md @@ -37,13 +37,10 @@ description: messages.getDialogs parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v70/methods/messages_getDocumentByHash.md b/old_docs/API_docs_v70/methods/messages_getDocumentByHash.md index dda54bdd..3902ac44 100644 --- a/old_docs/API_docs_v70/methods/messages_getDocumentByHash.md +++ b/old_docs/API_docs_v70/methods/messages_getDocumentByHash.md @@ -32,16 +32,13 @@ description: messages.getDocumentByHash parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v70/methods/messages_getFeaturedStickers.md b/old_docs/API_docs_v70/methods/messages_getFeaturedStickers.md index 9573464a..5aad1810 100644 --- a/old_docs/API_docs_v70/methods/messages_getFeaturedStickers.md +++ b/old_docs/API_docs_v70/methods/messages_getFeaturedStickers.md @@ -23,13 +23,10 @@ description: messages.getFeaturedStickers parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v70/methods/messages_getGameHighScores.md b/old_docs/API_docs_v70/methods/messages_getGameHighScores.md index 935bb95a..d8a94ae3 100644 --- a/old_docs/API_docs_v70/methods/messages_getGameHighScores.md +++ b/old_docs/API_docs_v70/methods/messages_getGameHighScores.md @@ -33,16 +33,13 @@ description: messages.getGameHighScores parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v70/methods/messages_getHistory.md b/old_docs/API_docs_v70/methods/messages_getHistory.md index a48a465e..4c3ef2ee 100644 --- a/old_docs/API_docs_v70/methods/messages_getHistory.md +++ b/old_docs/API_docs_v70/methods/messages_getHistory.md @@ -41,13 +41,10 @@ description: messages.getHistory parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v70/methods/messages_getInlineBotResults.md b/old_docs/API_docs_v70/methods/messages_getInlineBotResults.md index 61366580..61b927fc 100644 --- a/old_docs/API_docs_v70/methods/messages_getInlineBotResults.md +++ b/old_docs/API_docs_v70/methods/messages_getInlineBotResults.md @@ -37,13 +37,10 @@ description: messages.getInlineBotResults parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v70/methods/messages_getInlineGameHighScores.md b/old_docs/API_docs_v70/methods/messages_getInlineGameHighScores.md index 7cc04d0d..40eff3a9 100644 --- a/old_docs/API_docs_v70/methods/messages_getInlineGameHighScores.md +++ b/old_docs/API_docs_v70/methods/messages_getInlineGameHighScores.md @@ -32,16 +32,13 @@ description: messages.getInlineGameHighScores parameters, return type and exampl ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v70/methods/messages_getMaskStickers.md b/old_docs/API_docs_v70/methods/messages_getMaskStickers.md index 0ab194df..ca964647 100644 --- a/old_docs/API_docs_v70/methods/messages_getMaskStickers.md +++ b/old_docs/API_docs_v70/methods/messages_getMaskStickers.md @@ -23,13 +23,10 @@ description: messages.getMaskStickers parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v70/methods/messages_getMessageEditData.md b/old_docs/API_docs_v70/methods/messages_getMessageEditData.md index a8b135c6..15085153 100644 --- a/old_docs/API_docs_v70/methods/messages_getMessageEditData.md +++ b/old_docs/API_docs_v70/methods/messages_getMessageEditData.md @@ -32,13 +32,10 @@ description: messages.getMessageEditData parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v70/methods/messages_getMessages.md b/old_docs/API_docs_v70/methods/messages_getMessages.md index 5a970246..787c46dd 100644 --- a/old_docs/API_docs_v70/methods/messages_getMessages.md +++ b/old_docs/API_docs_v70/methods/messages_getMessages.md @@ -23,16 +23,13 @@ description: messages.getMessages parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v70/methods/messages_getMessagesViews.md b/old_docs/API_docs_v70/methods/messages_getMessagesViews.md index 263f3f95..de5692dc 100644 --- a/old_docs/API_docs_v70/methods/messages_getMessagesViews.md +++ b/old_docs/API_docs_v70/methods/messages_getMessagesViews.md @@ -34,13 +34,10 @@ description: messages.getMessagesViews parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v70/methods/messages_getPeerDialogs.md b/old_docs/API_docs_v70/methods/messages_getPeerDialogs.md index 3da60038..226948ae 100644 --- a/old_docs/API_docs_v70/methods/messages_getPeerDialogs.md +++ b/old_docs/API_docs_v70/methods/messages_getPeerDialogs.md @@ -31,13 +31,10 @@ description: messages.getPeerDialogs parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v70/methods/messages_getPeerSettings.md b/old_docs/API_docs_v70/methods/messages_getPeerSettings.md index d3e3cfc3..2a92f2da 100644 --- a/old_docs/API_docs_v70/methods/messages_getPeerSettings.md +++ b/old_docs/API_docs_v70/methods/messages_getPeerSettings.md @@ -31,13 +31,10 @@ description: messages.getPeerSettings parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v70/methods/messages_getPinnedDialogs.md b/old_docs/API_docs_v70/methods/messages_getPinnedDialogs.md index 110eab05..ec744f01 100644 --- a/old_docs/API_docs_v70/methods/messages_getPinnedDialogs.md +++ b/old_docs/API_docs_v70/methods/messages_getPinnedDialogs.md @@ -18,13 +18,10 @@ description: messages.getPinnedDialogs parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v70/methods/messages_getRecentStickers.md b/old_docs/API_docs_v70/methods/messages_getRecentStickers.md index 10d1a0df..a6ae162f 100644 --- a/old_docs/API_docs_v70/methods/messages_getRecentStickers.md +++ b/old_docs/API_docs_v70/methods/messages_getRecentStickers.md @@ -24,13 +24,10 @@ description: messages.getRecentStickers parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v70/methods/messages_getSavedGifs.md b/old_docs/API_docs_v70/methods/messages_getSavedGifs.md index 7cce4ffe..4986d812 100644 --- a/old_docs/API_docs_v70/methods/messages_getSavedGifs.md +++ b/old_docs/API_docs_v70/methods/messages_getSavedGifs.md @@ -23,13 +23,10 @@ description: messages.getSavedGifs parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v70/methods/messages_getStickerSet.md b/old_docs/API_docs_v70/methods/messages_getStickerSet.md index 59f33916..b480e0fe 100644 --- a/old_docs/API_docs_v70/methods/messages_getStickerSet.md +++ b/old_docs/API_docs_v70/methods/messages_getStickerSet.md @@ -30,16 +30,13 @@ description: messages.getStickerSet parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v70/methods/messages_getWebPage.md b/old_docs/API_docs_v70/methods/messages_getWebPage.md index 35f6e545..e886b020 100644 --- a/old_docs/API_docs_v70/methods/messages_getWebPage.md +++ b/old_docs/API_docs_v70/methods/messages_getWebPage.md @@ -31,13 +31,10 @@ description: messages.getWebPage parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v70/methods/messages_getWebPagePreview.md b/old_docs/API_docs_v70/methods/messages_getWebPagePreview.md index a89600b1..d3908933 100644 --- a/old_docs/API_docs_v70/methods/messages_getWebPagePreview.md +++ b/old_docs/API_docs_v70/methods/messages_getWebPagePreview.md @@ -23,13 +23,10 @@ description: messages.getWebPagePreview parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v70/methods/messages_hideReportSpam.md b/old_docs/API_docs_v70/methods/messages_hideReportSpam.md index 2dfe4dd7..5635665c 100644 --- a/old_docs/API_docs_v70/methods/messages_hideReportSpam.md +++ b/old_docs/API_docs_v70/methods/messages_hideReportSpam.md @@ -30,13 +30,10 @@ description: messages.hideReportSpam parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v70/methods/messages_importChatInvite.md b/old_docs/API_docs_v70/methods/messages_importChatInvite.md index 9d77304d..9dcfa56d 100644 --- a/old_docs/API_docs_v70/methods/messages_importChatInvite.md +++ b/old_docs/API_docs_v70/methods/messages_importChatInvite.md @@ -36,13 +36,10 @@ description: messages.importChatInvite parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v70/methods/messages_installStickerSet.md b/old_docs/API_docs_v70/methods/messages_installStickerSet.md index 3dde52a7..016d5ece 100644 --- a/old_docs/API_docs_v70/methods/messages_installStickerSet.md +++ b/old_docs/API_docs_v70/methods/messages_installStickerSet.md @@ -31,13 +31,10 @@ description: messages.installStickerSet parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v70/methods/messages_migrateChat.md b/old_docs/API_docs_v70/methods/messages_migrateChat.md index 22d2fbf0..a8274e70 100644 --- a/old_docs/API_docs_v70/methods/messages_migrateChat.md +++ b/old_docs/API_docs_v70/methods/messages_migrateChat.md @@ -32,13 +32,10 @@ description: messages.migrateChat parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v70/methods/messages_readEncryptedHistory.md b/old_docs/API_docs_v70/methods/messages_readEncryptedHistory.md index 766ee07d..f38f6b07 100644 --- a/old_docs/API_docs_v70/methods/messages_readEncryptedHistory.md +++ b/old_docs/API_docs_v70/methods/messages_readEncryptedHistory.md @@ -31,16 +31,13 @@ description: messages.readEncryptedHistory parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v70/methods/messages_readFeaturedStickers.md b/old_docs/API_docs_v70/methods/messages_readFeaturedStickers.md index c7ce7aca..02055bf3 100644 --- a/old_docs/API_docs_v70/methods/messages_readFeaturedStickers.md +++ b/old_docs/API_docs_v70/methods/messages_readFeaturedStickers.md @@ -23,13 +23,10 @@ description: messages.readFeaturedStickers parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v70/methods/messages_readHistory.md b/old_docs/API_docs_v70/methods/messages_readHistory.md index 1aa7830a..fef62130 100644 --- a/old_docs/API_docs_v70/methods/messages_readHistory.md +++ b/old_docs/API_docs_v70/methods/messages_readHistory.md @@ -32,13 +32,10 @@ description: messages.readHistory parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v70/methods/messages_readMessageContents.md b/old_docs/API_docs_v70/methods/messages_readMessageContents.md index 4b1abda0..7a6055fc 100644 --- a/old_docs/API_docs_v70/methods/messages_readMessageContents.md +++ b/old_docs/API_docs_v70/methods/messages_readMessageContents.md @@ -23,13 +23,10 @@ description: messages.readMessageContents parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v70/methods/messages_receivedMessages.md b/old_docs/API_docs_v70/methods/messages_receivedMessages.md index 588ac5cf..e2cf3a2f 100644 --- a/old_docs/API_docs_v70/methods/messages_receivedMessages.md +++ b/old_docs/API_docs_v70/methods/messages_receivedMessages.md @@ -23,13 +23,10 @@ description: messages.receivedMessages parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v70/methods/messages_receivedQueue.md b/old_docs/API_docs_v70/methods/messages_receivedQueue.md index 3c7f1d4f..38f504b3 100644 --- a/old_docs/API_docs_v70/methods/messages_receivedQueue.md +++ b/old_docs/API_docs_v70/methods/messages_receivedQueue.md @@ -30,16 +30,13 @@ description: messages.receivedQueue parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v70/methods/messages_reorderPinnedDialogs.md b/old_docs/API_docs_v70/methods/messages_reorderPinnedDialogs.md index 30102fd7..b4bfb84f 100644 --- a/old_docs/API_docs_v70/methods/messages_reorderPinnedDialogs.md +++ b/old_docs/API_docs_v70/methods/messages_reorderPinnedDialogs.md @@ -31,13 +31,10 @@ description: messages.reorderPinnedDialogs parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v70/methods/messages_reorderStickerSets.md b/old_docs/API_docs_v70/methods/messages_reorderStickerSets.md index 5c47f174..fa094550 100644 --- a/old_docs/API_docs_v70/methods/messages_reorderStickerSets.md +++ b/old_docs/API_docs_v70/methods/messages_reorderStickerSets.md @@ -24,13 +24,10 @@ description: messages.reorderStickerSets parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v70/methods/messages_reportEncryptedSpam.md b/old_docs/API_docs_v70/methods/messages_reportEncryptedSpam.md index 30ef3473..aed7a891 100644 --- a/old_docs/API_docs_v70/methods/messages_reportEncryptedSpam.md +++ b/old_docs/API_docs_v70/methods/messages_reportEncryptedSpam.md @@ -30,13 +30,10 @@ description: messages.reportEncryptedSpam parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v70/methods/messages_reportSpam.md b/old_docs/API_docs_v70/methods/messages_reportSpam.md index bfadb9ab..08c96d44 100644 --- a/old_docs/API_docs_v70/methods/messages_reportSpam.md +++ b/old_docs/API_docs_v70/methods/messages_reportSpam.md @@ -30,13 +30,10 @@ description: messages.reportSpam parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v70/methods/messages_saveDraft.md b/old_docs/API_docs_v70/methods/messages_saveDraft.md index 42308b46..f68090c0 100644 --- a/old_docs/API_docs_v70/methods/messages_saveDraft.md +++ b/old_docs/API_docs_v70/methods/messages_saveDraft.md @@ -35,13 +35,10 @@ description: messages.saveDraft parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v70/methods/messages_saveGif.md b/old_docs/API_docs_v70/methods/messages_saveGif.md index 31e48632..d86d539a 100644 --- a/old_docs/API_docs_v70/methods/messages_saveGif.md +++ b/old_docs/API_docs_v70/methods/messages_saveGif.md @@ -31,13 +31,10 @@ description: messages.saveGif parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v70/methods/messages_saveRecentSticker.md b/old_docs/API_docs_v70/methods/messages_saveRecentSticker.md index 8d45be5e..029ca763 100644 --- a/old_docs/API_docs_v70/methods/messages_saveRecentSticker.md +++ b/old_docs/API_docs_v70/methods/messages_saveRecentSticker.md @@ -32,13 +32,10 @@ description: messages.saveRecentSticker parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v70/methods/messages_search.md b/old_docs/API_docs_v70/methods/messages_search.md index ea39ef5d..c003258f 100644 --- a/old_docs/API_docs_v70/methods/messages_search.md +++ b/old_docs/API_docs_v70/methods/messages_search.md @@ -44,13 +44,10 @@ description: messages.search parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v70/methods/messages_searchGifs.md b/old_docs/API_docs_v70/methods/messages_searchGifs.md index 3f4c4838..dd804c99 100644 --- a/old_docs/API_docs_v70/methods/messages_searchGifs.md +++ b/old_docs/API_docs_v70/methods/messages_searchGifs.md @@ -31,13 +31,10 @@ description: messages.searchGifs parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v70/methods/messages_searchGlobal.md b/old_docs/API_docs_v70/methods/messages_searchGlobal.md index 0553dd7a..4b45eed2 100644 --- a/old_docs/API_docs_v70/methods/messages_searchGlobal.md +++ b/old_docs/API_docs_v70/methods/messages_searchGlobal.md @@ -34,13 +34,10 @@ description: messages.searchGlobal parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v70/methods/messages_sendEncrypted.md b/old_docs/API_docs_v70/methods/messages_sendEncrypted.md index 82eeec92..ba9f796b 100644 --- a/old_docs/API_docs_v70/methods/messages_sendEncrypted.md +++ b/old_docs/API_docs_v70/methods/messages_sendEncrypted.md @@ -34,16 +34,13 @@ description: messages.sendEncrypted parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v70/methods/messages_sendEncryptedFile.md b/old_docs/API_docs_v70/methods/messages_sendEncryptedFile.md index 8f7a73d9..db16bf2d 100644 --- a/old_docs/API_docs_v70/methods/messages_sendEncryptedFile.md +++ b/old_docs/API_docs_v70/methods/messages_sendEncryptedFile.md @@ -32,16 +32,13 @@ description: messages.sendEncryptedFile parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v70/methods/messages_sendEncryptedService.md b/old_docs/API_docs_v70/methods/messages_sendEncryptedService.md index d427f6c3..fd4e2627 100644 --- a/old_docs/API_docs_v70/methods/messages_sendEncryptedService.md +++ b/old_docs/API_docs_v70/methods/messages_sendEncryptedService.md @@ -34,16 +34,13 @@ description: messages.sendEncryptedService parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v70/methods/messages_sendInlineBotResult.md b/old_docs/API_docs_v70/methods/messages_sendInlineBotResult.md index 6aeeb67d..d974fe69 100644 --- a/old_docs/API_docs_v70/methods/messages_sendInlineBotResult.md +++ b/old_docs/API_docs_v70/methods/messages_sendInlineBotResult.md @@ -39,13 +39,10 @@ description: messages.sendInlineBotResult parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v70/methods/messages_sendMedia.md b/old_docs/API_docs_v70/methods/messages_sendMedia.md index b3ceb5d4..b58bf325 100644 --- a/old_docs/API_docs_v70/methods/messages_sendMedia.md +++ b/old_docs/API_docs_v70/methods/messages_sendMedia.md @@ -59,16 +59,13 @@ description: messages.sendMedia parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v70/methods/messages_sendMessage.md b/old_docs/API_docs_v70/methods/messages_sendMessage.md index 60b50412..3a515129 100644 --- a/old_docs/API_docs_v70/methods/messages_sendMessage.md +++ b/old_docs/API_docs_v70/methods/messages_sendMessage.md @@ -58,16 +58,13 @@ description: messages.sendMessage parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v70/methods/messages_sendScreenshotNotification.md b/old_docs/API_docs_v70/methods/messages_sendScreenshotNotification.md index a725a12b..890224e8 100644 --- a/old_docs/API_docs_v70/methods/messages_sendScreenshotNotification.md +++ b/old_docs/API_docs_v70/methods/messages_sendScreenshotNotification.md @@ -31,13 +31,10 @@ description: messages.sendScreenshotNotification parameters, return type and exa ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v70/methods/messages_setBotCallbackAnswer.md b/old_docs/API_docs_v70/methods/messages_setBotCallbackAnswer.md index 2c51854f..2901a558 100644 --- a/old_docs/API_docs_v70/methods/messages_setBotCallbackAnswer.md +++ b/old_docs/API_docs_v70/methods/messages_setBotCallbackAnswer.md @@ -34,16 +34,13 @@ description: messages.setBotCallbackAnswer parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v70/methods/messages_setBotPrecheckoutResults.md b/old_docs/API_docs_v70/methods/messages_setBotPrecheckoutResults.md index 25ed5ed5..5666e9ff 100644 --- a/old_docs/API_docs_v70/methods/messages_setBotPrecheckoutResults.md +++ b/old_docs/API_docs_v70/methods/messages_setBotPrecheckoutResults.md @@ -32,16 +32,13 @@ description: messages.setBotPrecheckoutResults parameters, return type and examp ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v70/methods/messages_setBotShippingResults.md b/old_docs/API_docs_v70/methods/messages_setBotShippingResults.md index 49ac2896..95376b64 100644 --- a/old_docs/API_docs_v70/methods/messages_setBotShippingResults.md +++ b/old_docs/API_docs_v70/methods/messages_setBotShippingResults.md @@ -32,16 +32,13 @@ description: messages.setBotShippingResults parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v70/methods/messages_setEncryptedTyping.md b/old_docs/API_docs_v70/methods/messages_setEncryptedTyping.md index a05b94dd..aeae6ff7 100644 --- a/old_docs/API_docs_v70/methods/messages_setEncryptedTyping.md +++ b/old_docs/API_docs_v70/methods/messages_setEncryptedTyping.md @@ -31,13 +31,10 @@ description: messages.setEncryptedTyping parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v70/methods/messages_setGameScore.md b/old_docs/API_docs_v70/methods/messages_setGameScore.md index 3137f7c9..c8ef5c49 100644 --- a/old_docs/API_docs_v70/methods/messages_setGameScore.md +++ b/old_docs/API_docs_v70/methods/messages_setGameScore.md @@ -36,16 +36,13 @@ description: messages.setGameScore parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v70/methods/messages_setInlineBotResults.md b/old_docs/API_docs_v70/methods/messages_setInlineBotResults.md index 8b5625f3..8b49c4c7 100644 --- a/old_docs/API_docs_v70/methods/messages_setInlineBotResults.md +++ b/old_docs/API_docs_v70/methods/messages_setInlineBotResults.md @@ -46,16 +46,13 @@ description: messages.setInlineBotResults parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v70/methods/messages_setInlineGameScore.md b/old_docs/API_docs_v70/methods/messages_setInlineGameScore.md index 36752f35..4c43e7d2 100644 --- a/old_docs/API_docs_v70/methods/messages_setInlineGameScore.md +++ b/old_docs/API_docs_v70/methods/messages_setInlineGameScore.md @@ -35,16 +35,13 @@ description: messages.setInlineGameScore parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v70/methods/messages_setTyping.md b/old_docs/API_docs_v70/methods/messages_setTyping.md index 9ef8caf5..f6b7b7b5 100644 --- a/old_docs/API_docs_v70/methods/messages_setTyping.md +++ b/old_docs/API_docs_v70/methods/messages_setTyping.md @@ -37,16 +37,13 @@ description: messages.setTyping parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v70/methods/messages_startBot.md b/old_docs/API_docs_v70/methods/messages_startBot.md index 8d98e390..b33ab013 100644 --- a/old_docs/API_docs_v70/methods/messages_startBot.md +++ b/old_docs/API_docs_v70/methods/messages_startBot.md @@ -35,13 +35,10 @@ description: messages.startBot parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v70/methods/messages_toggleChatAdmins.md b/old_docs/API_docs_v70/methods/messages_toggleChatAdmins.md index 3bf8a419..97328065 100644 --- a/old_docs/API_docs_v70/methods/messages_toggleChatAdmins.md +++ b/old_docs/API_docs_v70/methods/messages_toggleChatAdmins.md @@ -32,13 +32,10 @@ description: messages.toggleChatAdmins parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v70/methods/messages_toggleDialogPin.md b/old_docs/API_docs_v70/methods/messages_toggleDialogPin.md index f35f2f40..7853df5e 100644 --- a/old_docs/API_docs_v70/methods/messages_toggleDialogPin.md +++ b/old_docs/API_docs_v70/methods/messages_toggleDialogPin.md @@ -31,13 +31,10 @@ description: messages.toggleDialogPin parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v70/methods/messages_uninstallStickerSet.md b/old_docs/API_docs_v70/methods/messages_uninstallStickerSet.md index 6763e64f..76a3e3e2 100644 --- a/old_docs/API_docs_v70/methods/messages_uninstallStickerSet.md +++ b/old_docs/API_docs_v70/methods/messages_uninstallStickerSet.md @@ -30,13 +30,10 @@ description: messages.uninstallStickerSet parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v70/methods/messages_uploadMedia.md b/old_docs/API_docs_v70/methods/messages_uploadMedia.md index 03f07c26..d4b5ee7d 100644 --- a/old_docs/API_docs_v70/methods/messages_uploadMedia.md +++ b/old_docs/API_docs_v70/methods/messages_uploadMedia.md @@ -33,16 +33,13 @@ description: messages.uploadMedia parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v70/methods/payments_clearSavedInfo.md b/old_docs/API_docs_v70/methods/payments_clearSavedInfo.md index a77c50d9..fb9bae07 100644 --- a/old_docs/API_docs_v70/methods/payments_clearSavedInfo.md +++ b/old_docs/API_docs_v70/methods/payments_clearSavedInfo.md @@ -24,13 +24,10 @@ description: payments.clearSavedInfo parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v70/methods/payments_getPaymentForm.md b/old_docs/API_docs_v70/methods/payments_getPaymentForm.md index 15f6e26b..141c47f2 100644 --- a/old_docs/API_docs_v70/methods/payments_getPaymentForm.md +++ b/old_docs/API_docs_v70/methods/payments_getPaymentForm.md @@ -30,13 +30,10 @@ description: payments.getPaymentForm parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v70/methods/payments_getPaymentReceipt.md b/old_docs/API_docs_v70/methods/payments_getPaymentReceipt.md index 51433563..f6aa1ab6 100644 --- a/old_docs/API_docs_v70/methods/payments_getPaymentReceipt.md +++ b/old_docs/API_docs_v70/methods/payments_getPaymentReceipt.md @@ -30,13 +30,10 @@ description: payments.getPaymentReceipt parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v70/methods/payments_getSavedInfo.md b/old_docs/API_docs_v70/methods/payments_getSavedInfo.md index a586dcd9..4104679a 100644 --- a/old_docs/API_docs_v70/methods/payments_getSavedInfo.md +++ b/old_docs/API_docs_v70/methods/payments_getSavedInfo.md @@ -18,13 +18,10 @@ description: payments.getSavedInfo parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v70/methods/payments_sendPaymentForm.md b/old_docs/API_docs_v70/methods/payments_sendPaymentForm.md index a63a3980..180a7279 100644 --- a/old_docs/API_docs_v70/methods/payments_sendPaymentForm.md +++ b/old_docs/API_docs_v70/methods/payments_sendPaymentForm.md @@ -33,13 +33,10 @@ description: payments.sendPaymentForm parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v70/methods/payments_validateRequestedInfo.md b/old_docs/API_docs_v70/methods/payments_validateRequestedInfo.md index d839a2df..acfd1852 100644 --- a/old_docs/API_docs_v70/methods/payments_validateRequestedInfo.md +++ b/old_docs/API_docs_v70/methods/payments_validateRequestedInfo.md @@ -32,13 +32,10 @@ description: payments.validateRequestedInfo parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v70/methods/phone_getCallConfig.md b/old_docs/API_docs_v70/methods/phone_getCallConfig.md index a85fed0e..3f18d7ca 100644 --- a/old_docs/API_docs_v70/methods/phone_getCallConfig.md +++ b/old_docs/API_docs_v70/methods/phone_getCallConfig.md @@ -18,13 +18,10 @@ description: phone.getCallConfig parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v70/methods/phone_receivedCall.md b/old_docs/API_docs_v70/methods/phone_receivedCall.md index 9d59b1ea..8ca6a4e1 100644 --- a/old_docs/API_docs_v70/methods/phone_receivedCall.md +++ b/old_docs/API_docs_v70/methods/phone_receivedCall.md @@ -31,13 +31,10 @@ description: phone.receivedCall parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v70/methods/phone_saveCallDebug.md b/old_docs/API_docs_v70/methods/phone_saveCallDebug.md index 4dee5c97..ea3fa2d7 100644 --- a/old_docs/API_docs_v70/methods/phone_saveCallDebug.md +++ b/old_docs/API_docs_v70/methods/phone_saveCallDebug.md @@ -32,13 +32,10 @@ description: phone.saveCallDebug parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v70/methods/phone_setCallRating.md b/old_docs/API_docs_v70/methods/phone_setCallRating.md index fea236d1..c6e5d7fa 100644 --- a/old_docs/API_docs_v70/methods/phone_setCallRating.md +++ b/old_docs/API_docs_v70/methods/phone_setCallRating.md @@ -32,13 +32,10 @@ description: phone.setCallRating parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v70/methods/photos_deletePhotos.md b/old_docs/API_docs_v70/methods/photos_deletePhotos.md index e9cd459d..61768b1e 100644 --- a/old_docs/API_docs_v70/methods/photos_deletePhotos.md +++ b/old_docs/API_docs_v70/methods/photos_deletePhotos.md @@ -23,13 +23,10 @@ description: photos.deletePhotos parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v70/methods/photos_getUserPhotos.md b/old_docs/API_docs_v70/methods/photos_getUserPhotos.md index d6c2a380..095363e7 100644 --- a/old_docs/API_docs_v70/methods/photos_getUserPhotos.md +++ b/old_docs/API_docs_v70/methods/photos_getUserPhotos.md @@ -34,16 +34,13 @@ description: photos.getUserPhotos parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v70/methods/photos_updateProfilePhoto.md b/old_docs/API_docs_v70/methods/photos_updateProfilePhoto.md index ea3b78ec..d90aca22 100644 --- a/old_docs/API_docs_v70/methods/photos_updateProfilePhoto.md +++ b/old_docs/API_docs_v70/methods/photos_updateProfilePhoto.md @@ -23,13 +23,10 @@ description: photos.updateProfilePhoto parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v70/methods/photos_uploadProfilePhoto.md b/old_docs/API_docs_v70/methods/photos_uploadProfilePhoto.md index 58541f23..987e721c 100644 --- a/old_docs/API_docs_v70/methods/photos_uploadProfilePhoto.md +++ b/old_docs/API_docs_v70/methods/photos_uploadProfilePhoto.md @@ -34,13 +34,10 @@ description: photos.uploadProfilePhoto parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v70/methods/ping.md b/old_docs/API_docs_v70/methods/ping.md index 5bfe9dde..7c20ca86 100644 --- a/old_docs/API_docs_v70/methods/ping.md +++ b/old_docs/API_docs_v70/methods/ping.md @@ -23,16 +23,13 @@ description: ping parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v70/methods/ping_delay_disconnect.md b/old_docs/API_docs_v70/methods/ping_delay_disconnect.md index b4b1e265..e8b62005 100644 --- a/old_docs/API_docs_v70/methods/ping_delay_disconnect.md +++ b/old_docs/API_docs_v70/methods/ping_delay_disconnect.md @@ -24,16 +24,13 @@ description: ping_delay_disconnect parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v70/methods/req_DH_params.md b/old_docs/API_docs_v70/methods/req_DH_params.md index 51632fe0..697540d8 100644 --- a/old_docs/API_docs_v70/methods/req_DH_params.md +++ b/old_docs/API_docs_v70/methods/req_DH_params.md @@ -28,16 +28,13 @@ description: req_DH_params parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v70/methods/req_pq.md b/old_docs/API_docs_v70/methods/req_pq.md index 2f005ce2..7a583643 100644 --- a/old_docs/API_docs_v70/methods/req_pq.md +++ b/old_docs/API_docs_v70/methods/req_pq.md @@ -23,16 +23,13 @@ description: req_pq parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v70/methods/rpc_drop_answer.md b/old_docs/API_docs_v70/methods/rpc_drop_answer.md index 48e894a9..e15ddca9 100644 --- a/old_docs/API_docs_v70/methods/rpc_drop_answer.md +++ b/old_docs/API_docs_v70/methods/rpc_drop_answer.md @@ -23,16 +23,13 @@ description: rpc_drop_answer parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v70/methods/set_client_DH_params.md b/old_docs/API_docs_v70/methods/set_client_DH_params.md index 25f0f387..8721ed40 100644 --- a/old_docs/API_docs_v70/methods/set_client_DH_params.md +++ b/old_docs/API_docs_v70/methods/set_client_DH_params.md @@ -25,16 +25,13 @@ description: set_client_DH_params parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v70/methods/stickers_addStickerToSet.md b/old_docs/API_docs_v70/methods/stickers_addStickerToSet.md index bf62fa09..581eb1f1 100644 --- a/old_docs/API_docs_v70/methods/stickers_addStickerToSet.md +++ b/old_docs/API_docs_v70/methods/stickers_addStickerToSet.md @@ -32,16 +32,13 @@ description: stickers.addStickerToSet parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v70/methods/stickers_changeStickerPosition.md b/old_docs/API_docs_v70/methods/stickers_changeStickerPosition.md index 942d3a33..391ee3d3 100644 --- a/old_docs/API_docs_v70/methods/stickers_changeStickerPosition.md +++ b/old_docs/API_docs_v70/methods/stickers_changeStickerPosition.md @@ -32,16 +32,13 @@ description: stickers.changeStickerPosition parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v70/methods/stickers_createStickerSet.md b/old_docs/API_docs_v70/methods/stickers_createStickerSet.md index 7c5b6821..64a5a978 100644 --- a/old_docs/API_docs_v70/methods/stickers_createStickerSet.md +++ b/old_docs/API_docs_v70/methods/stickers_createStickerSet.md @@ -42,16 +42,13 @@ description: stickers.createStickerSet parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v70/methods/stickers_removeStickerFromSet.md b/old_docs/API_docs_v70/methods/stickers_removeStickerFromSet.md index 51e52f95..68c2305f 100644 --- a/old_docs/API_docs_v70/methods/stickers_removeStickerFromSet.md +++ b/old_docs/API_docs_v70/methods/stickers_removeStickerFromSet.md @@ -31,16 +31,13 @@ description: stickers.removeStickerFromSet parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v70/methods/upload_getWebFile.md b/old_docs/API_docs_v70/methods/upload_getWebFile.md index ec7c05b4..8744dac5 100644 --- a/old_docs/API_docs_v70/methods/upload_getWebFile.md +++ b/old_docs/API_docs_v70/methods/upload_getWebFile.md @@ -32,13 +32,10 @@ description: upload.getWebFile parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v70/methods/users_getUsers.md b/old_docs/API_docs_v70/methods/users_getUsers.md index 6a44d258..3a981d57 100644 --- a/old_docs/API_docs_v70/methods/users_getUsers.md +++ b/old_docs/API_docs_v70/methods/users_getUsers.md @@ -33,16 +33,13 @@ description: users.getUsers parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v71/methods/account_changePhone.md b/old_docs/API_docs_v71/methods/account_changePhone.md index 5d1801d0..e47ef6a7 100644 --- a/old_docs/API_docs_v71/methods/account_changePhone.md +++ b/old_docs/API_docs_v71/methods/account_changePhone.md @@ -32,13 +32,10 @@ description: account.changePhone parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v71/methods/account_checkUsername.md b/old_docs/API_docs_v71/methods/account_checkUsername.md index afc59b6c..40cf822f 100644 --- a/old_docs/API_docs_v71/methods/account_checkUsername.md +++ b/old_docs/API_docs_v71/methods/account_checkUsername.md @@ -30,13 +30,10 @@ description: account.checkUsername parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v71/methods/account_confirmPhone.md b/old_docs/API_docs_v71/methods/account_confirmPhone.md index 0d2dc5c6..8dd79d94 100644 --- a/old_docs/API_docs_v71/methods/account_confirmPhone.md +++ b/old_docs/API_docs_v71/methods/account_confirmPhone.md @@ -32,13 +32,10 @@ description: account.confirmPhone parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v71/methods/account_deleteAccount.md b/old_docs/API_docs_v71/methods/account_deleteAccount.md index 5abcd0ec..6f1bbda9 100644 --- a/old_docs/API_docs_v71/methods/account_deleteAccount.md +++ b/old_docs/API_docs_v71/methods/account_deleteAccount.md @@ -23,13 +23,10 @@ description: account.deleteAccount parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v71/methods/account_getAccountTTL.md b/old_docs/API_docs_v71/methods/account_getAccountTTL.md index 3520fbef..538b1d7a 100644 --- a/old_docs/API_docs_v71/methods/account_getAccountTTL.md +++ b/old_docs/API_docs_v71/methods/account_getAccountTTL.md @@ -18,13 +18,10 @@ description: account.getAccountTTL parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v71/methods/account_getAuthorizations.md b/old_docs/API_docs_v71/methods/account_getAuthorizations.md index 91bbce5e..f138d517 100644 --- a/old_docs/API_docs_v71/methods/account_getAuthorizations.md +++ b/old_docs/API_docs_v71/methods/account_getAuthorizations.md @@ -18,13 +18,10 @@ description: account.getAuthorizations parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v71/methods/account_getNotifySettings.md b/old_docs/API_docs_v71/methods/account_getNotifySettings.md index 8ee710d8..a48eed2f 100644 --- a/old_docs/API_docs_v71/methods/account_getNotifySettings.md +++ b/old_docs/API_docs_v71/methods/account_getNotifySettings.md @@ -30,13 +30,10 @@ description: account.getNotifySettings parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v71/methods/account_getPassword.md b/old_docs/API_docs_v71/methods/account_getPassword.md index 4d9fd015..1abf6174 100644 --- a/old_docs/API_docs_v71/methods/account_getPassword.md +++ b/old_docs/API_docs_v71/methods/account_getPassword.md @@ -18,13 +18,10 @@ description: account.getPassword parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v71/methods/account_getPasswordSettings.md b/old_docs/API_docs_v71/methods/account_getPasswordSettings.md index 02cb77f7..aec5b989 100644 --- a/old_docs/API_docs_v71/methods/account_getPasswordSettings.md +++ b/old_docs/API_docs_v71/methods/account_getPasswordSettings.md @@ -30,13 +30,10 @@ description: account.getPasswordSettings parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v71/methods/account_getPrivacy.md b/old_docs/API_docs_v71/methods/account_getPrivacy.md index 52786b79..8bbe9795 100644 --- a/old_docs/API_docs_v71/methods/account_getPrivacy.md +++ b/old_docs/API_docs_v71/methods/account_getPrivacy.md @@ -30,13 +30,10 @@ description: account.getPrivacy parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v71/methods/account_getTmpPassword.md b/old_docs/API_docs_v71/methods/account_getTmpPassword.md index 83ab09b1..d9bd30d8 100644 --- a/old_docs/API_docs_v71/methods/account_getTmpPassword.md +++ b/old_docs/API_docs_v71/methods/account_getTmpPassword.md @@ -32,13 +32,10 @@ description: account.getTmpPassword parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v71/methods/account_getWallPapers.md b/old_docs/API_docs_v71/methods/account_getWallPapers.md index 88c8a701..a71543d0 100644 --- a/old_docs/API_docs_v71/methods/account_getWallPapers.md +++ b/old_docs/API_docs_v71/methods/account_getWallPapers.md @@ -18,13 +18,10 @@ description: account.getWallPapers parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v71/methods/account_registerDevice.md b/old_docs/API_docs_v71/methods/account_registerDevice.md index 3cc7f98d..8be04ad2 100644 --- a/old_docs/API_docs_v71/methods/account_registerDevice.md +++ b/old_docs/API_docs_v71/methods/account_registerDevice.md @@ -31,13 +31,10 @@ description: account.registerDevice parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v71/methods/account_reportPeer.md b/old_docs/API_docs_v71/methods/account_reportPeer.md index 1545c3b8..1ae9f4d4 100644 --- a/old_docs/API_docs_v71/methods/account_reportPeer.md +++ b/old_docs/API_docs_v71/methods/account_reportPeer.md @@ -31,13 +31,10 @@ description: account.reportPeer parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v71/methods/account_resetAuthorization.md b/old_docs/API_docs_v71/methods/account_resetAuthorization.md index e44334f2..0438cba3 100644 --- a/old_docs/API_docs_v71/methods/account_resetAuthorization.md +++ b/old_docs/API_docs_v71/methods/account_resetAuthorization.md @@ -30,13 +30,10 @@ description: account.resetAuthorization parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v71/methods/account_resetNotifySettings.md b/old_docs/API_docs_v71/methods/account_resetNotifySettings.md index 155ede68..92db4f4f 100644 --- a/old_docs/API_docs_v71/methods/account_resetNotifySettings.md +++ b/old_docs/API_docs_v71/methods/account_resetNotifySettings.md @@ -18,13 +18,10 @@ description: account.resetNotifySettings parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v71/methods/account_sendChangePhoneCode.md b/old_docs/API_docs_v71/methods/account_sendChangePhoneCode.md index 4be218f2..017b5f7f 100644 --- a/old_docs/API_docs_v71/methods/account_sendChangePhoneCode.md +++ b/old_docs/API_docs_v71/methods/account_sendChangePhoneCode.md @@ -32,13 +32,10 @@ description: account.sendChangePhoneCode parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v71/methods/account_sendConfirmPhoneCode.md b/old_docs/API_docs_v71/methods/account_sendConfirmPhoneCode.md index 009fcb09..3665bd50 100644 --- a/old_docs/API_docs_v71/methods/account_sendConfirmPhoneCode.md +++ b/old_docs/API_docs_v71/methods/account_sendConfirmPhoneCode.md @@ -32,13 +32,10 @@ description: account.sendConfirmPhoneCode parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v71/methods/account_setAccountTTL.md b/old_docs/API_docs_v71/methods/account_setAccountTTL.md index f06eb676..d08f59fb 100644 --- a/old_docs/API_docs_v71/methods/account_setAccountTTL.md +++ b/old_docs/API_docs_v71/methods/account_setAccountTTL.md @@ -30,13 +30,10 @@ description: account.setAccountTTL parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v71/methods/account_setPrivacy.md b/old_docs/API_docs_v71/methods/account_setPrivacy.md index 56aebbcc..401aa71c 100644 --- a/old_docs/API_docs_v71/methods/account_setPrivacy.md +++ b/old_docs/API_docs_v71/methods/account_setPrivacy.md @@ -31,13 +31,10 @@ description: account.setPrivacy parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v71/methods/account_unregisterDevice.md b/old_docs/API_docs_v71/methods/account_unregisterDevice.md index 41899b6e..283ec7d2 100644 --- a/old_docs/API_docs_v71/methods/account_unregisterDevice.md +++ b/old_docs/API_docs_v71/methods/account_unregisterDevice.md @@ -31,13 +31,10 @@ description: account.unregisterDevice parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v71/methods/account_updateDeviceLocked.md b/old_docs/API_docs_v71/methods/account_updateDeviceLocked.md index 37aeb59d..ae6125a5 100644 --- a/old_docs/API_docs_v71/methods/account_updateDeviceLocked.md +++ b/old_docs/API_docs_v71/methods/account_updateDeviceLocked.md @@ -23,13 +23,10 @@ description: account.updateDeviceLocked parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v71/methods/account_updateNotifySettings.md b/old_docs/API_docs_v71/methods/account_updateNotifySettings.md index 8389b5c2..fb096250 100644 --- a/old_docs/API_docs_v71/methods/account_updateNotifySettings.md +++ b/old_docs/API_docs_v71/methods/account_updateNotifySettings.md @@ -31,13 +31,10 @@ description: account.updateNotifySettings parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v71/methods/account_updatePasswordSettings.md b/old_docs/API_docs_v71/methods/account_updatePasswordSettings.md index b7c8da4b..ffa8dcd9 100644 --- a/old_docs/API_docs_v71/methods/account_updatePasswordSettings.md +++ b/old_docs/API_docs_v71/methods/account_updatePasswordSettings.md @@ -34,13 +34,10 @@ description: account.updatePasswordSettings parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v71/methods/account_updateProfile.md b/old_docs/API_docs_v71/methods/account_updateProfile.md index a50eaea5..b3d468d1 100644 --- a/old_docs/API_docs_v71/methods/account_updateProfile.md +++ b/old_docs/API_docs_v71/methods/account_updateProfile.md @@ -33,13 +33,10 @@ description: account.updateProfile parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v71/methods/account_updateStatus.md b/old_docs/API_docs_v71/methods/account_updateStatus.md index 7204e582..c8fa0a79 100644 --- a/old_docs/API_docs_v71/methods/account_updateStatus.md +++ b/old_docs/API_docs_v71/methods/account_updateStatus.md @@ -30,13 +30,10 @@ description: account.updateStatus parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v71/methods/account_updateUsername.md b/old_docs/API_docs_v71/methods/account_updateUsername.md index 22be2fd4..2b7576a5 100644 --- a/old_docs/API_docs_v71/methods/account_updateUsername.md +++ b/old_docs/API_docs_v71/methods/account_updateUsername.md @@ -32,13 +32,10 @@ description: account.updateUsername parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v71/methods/auth_bindTempAuthKey.md b/old_docs/API_docs_v71/methods/auth_bindTempAuthKey.md index e3d72dd5..7419abb0 100644 --- a/old_docs/API_docs_v71/methods/auth_bindTempAuthKey.md +++ b/old_docs/API_docs_v71/methods/auth_bindTempAuthKey.md @@ -35,16 +35,13 @@ description: auth.bindTempAuthKey parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v71/methods/auth_cancelCode.md b/old_docs/API_docs_v71/methods/auth_cancelCode.md index dc390329..05d927a1 100644 --- a/old_docs/API_docs_v71/methods/auth_cancelCode.md +++ b/old_docs/API_docs_v71/methods/auth_cancelCode.md @@ -31,13 +31,10 @@ description: auth.cancelCode parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v71/methods/auth_checkPassword.md b/old_docs/API_docs_v71/methods/auth_checkPassword.md index d5559186..6b6b21cc 100644 --- a/old_docs/API_docs_v71/methods/auth_checkPassword.md +++ b/old_docs/API_docs_v71/methods/auth_checkPassword.md @@ -30,13 +30,10 @@ description: auth.checkPassword parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v71/methods/auth_checkPhone.md b/old_docs/API_docs_v71/methods/auth_checkPhone.md index 3455904d..f6cac2e6 100644 --- a/old_docs/API_docs_v71/methods/auth_checkPhone.md +++ b/old_docs/API_docs_v71/methods/auth_checkPhone.md @@ -32,13 +32,10 @@ description: auth.checkPhone parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v71/methods/auth_dropTempAuthKeys.md b/old_docs/API_docs_v71/methods/auth_dropTempAuthKeys.md index aba76766..fedb7bf4 100644 --- a/old_docs/API_docs_v71/methods/auth_dropTempAuthKeys.md +++ b/old_docs/API_docs_v71/methods/auth_dropTempAuthKeys.md @@ -23,16 +23,13 @@ description: auth.dropTempAuthKeys parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v71/methods/auth_exportAuthorization.md b/old_docs/API_docs_v71/methods/auth_exportAuthorization.md index 44c45b70..cbc8203b 100644 --- a/old_docs/API_docs_v71/methods/auth_exportAuthorization.md +++ b/old_docs/API_docs_v71/methods/auth_exportAuthorization.md @@ -30,16 +30,13 @@ description: auth.exportAuthorization parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v71/methods/auth_importAuthorization.md b/old_docs/API_docs_v71/methods/auth_importAuthorization.md index e0fd534f..22166510 100644 --- a/old_docs/API_docs_v71/methods/auth_importAuthorization.md +++ b/old_docs/API_docs_v71/methods/auth_importAuthorization.md @@ -32,16 +32,13 @@ description: auth.importAuthorization parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v71/methods/auth_recoverPassword.md b/old_docs/API_docs_v71/methods/auth_recoverPassword.md index c2ce3fed..931e99fd 100644 --- a/old_docs/API_docs_v71/methods/auth_recoverPassword.md +++ b/old_docs/API_docs_v71/methods/auth_recoverPassword.md @@ -30,13 +30,10 @@ description: auth.recoverPassword parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v71/methods/auth_requestPasswordRecovery.md b/old_docs/API_docs_v71/methods/auth_requestPasswordRecovery.md index 101b1cf7..c6babcd9 100644 --- a/old_docs/API_docs_v71/methods/auth_requestPasswordRecovery.md +++ b/old_docs/API_docs_v71/methods/auth_requestPasswordRecovery.md @@ -25,13 +25,10 @@ description: auth.requestPasswordRecovery parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v71/methods/auth_resendCode.md b/old_docs/API_docs_v71/methods/auth_resendCode.md index 14d08ddd..df4803b8 100644 --- a/old_docs/API_docs_v71/methods/auth_resendCode.md +++ b/old_docs/API_docs_v71/methods/auth_resendCode.md @@ -31,13 +31,10 @@ description: auth.resendCode parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v71/methods/auth_resetAuthorizations.md b/old_docs/API_docs_v71/methods/auth_resetAuthorizations.md index 87a39a22..fe297fa7 100644 --- a/old_docs/API_docs_v71/methods/auth_resetAuthorizations.md +++ b/old_docs/API_docs_v71/methods/auth_resetAuthorizations.md @@ -25,13 +25,10 @@ description: auth.resetAuthorizations parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v71/methods/auth_sendInvites.md b/old_docs/API_docs_v71/methods/auth_sendInvites.md index 604fc65d..ad9636c5 100644 --- a/old_docs/API_docs_v71/methods/auth_sendInvites.md +++ b/old_docs/API_docs_v71/methods/auth_sendInvites.md @@ -31,13 +31,10 @@ description: auth.sendInvites parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v71/methods/bots_answerWebhookJSONQuery.md b/old_docs/API_docs_v71/methods/bots_answerWebhookJSONQuery.md index ae1efce3..d910db35 100644 --- a/old_docs/API_docs_v71/methods/bots_answerWebhookJSONQuery.md +++ b/old_docs/API_docs_v71/methods/bots_answerWebhookJSONQuery.md @@ -32,16 +32,13 @@ description: bots.answerWebhookJSONQuery parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v71/methods/bots_sendCustomRequest.md b/old_docs/API_docs_v71/methods/bots_sendCustomRequest.md index 927f18c5..abb880ef 100644 --- a/old_docs/API_docs_v71/methods/bots_sendCustomRequest.md +++ b/old_docs/API_docs_v71/methods/bots_sendCustomRequest.md @@ -31,16 +31,13 @@ description: bots.sendCustomRequest parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v71/methods/channels_checkUsername.md b/old_docs/API_docs_v71/methods/channels_checkUsername.md index d6ea876d..e29ee107 100644 --- a/old_docs/API_docs_v71/methods/channels_checkUsername.md +++ b/old_docs/API_docs_v71/methods/channels_checkUsername.md @@ -33,13 +33,10 @@ description: channels.checkUsername parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v71/methods/channels_createChannel.md b/old_docs/API_docs_v71/methods/channels_createChannel.md index 9ba02e9e..58808b73 100644 --- a/old_docs/API_docs_v71/methods/channels_createChannel.md +++ b/old_docs/API_docs_v71/methods/channels_createChannel.md @@ -34,13 +34,10 @@ description: channels.createChannel parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v71/methods/channels_deleteChannel.md b/old_docs/API_docs_v71/methods/channels_deleteChannel.md index 912ab080..532f3c6c 100644 --- a/old_docs/API_docs_v71/methods/channels_deleteChannel.md +++ b/old_docs/API_docs_v71/methods/channels_deleteChannel.md @@ -31,13 +31,10 @@ description: channels.deleteChannel parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v71/methods/channels_deleteMessages.md b/old_docs/API_docs_v71/methods/channels_deleteMessages.md index b3481294..a42a47a5 100644 --- a/old_docs/API_docs_v71/methods/channels_deleteMessages.md +++ b/old_docs/API_docs_v71/methods/channels_deleteMessages.md @@ -33,16 +33,13 @@ description: channels.deleteMessages parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v71/methods/channels_deleteUserHistory.md b/old_docs/API_docs_v71/methods/channels_deleteUserHistory.md index 66843269..73494485 100644 --- a/old_docs/API_docs_v71/methods/channels_deleteUserHistory.md +++ b/old_docs/API_docs_v71/methods/channels_deleteUserHistory.md @@ -32,13 +32,10 @@ description: channels.deleteUserHistory parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v71/methods/channels_editAbout.md b/old_docs/API_docs_v71/methods/channels_editAbout.md index 4c759a8a..1c3ce933 100644 --- a/old_docs/API_docs_v71/methods/channels_editAbout.md +++ b/old_docs/API_docs_v71/methods/channels_editAbout.md @@ -34,16 +34,13 @@ description: channels.editAbout parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v71/methods/channels_editAdmin.md b/old_docs/API_docs_v71/methods/channels_editAdmin.md index e68ba7ea..c6f5454c 100644 --- a/old_docs/API_docs_v71/methods/channels_editAdmin.md +++ b/old_docs/API_docs_v71/methods/channels_editAdmin.md @@ -41,16 +41,13 @@ description: channels.editAdmin parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v71/methods/channels_editBanned.md b/old_docs/API_docs_v71/methods/channels_editBanned.md index 7fb904b9..02ed04bf 100644 --- a/old_docs/API_docs_v71/methods/channels_editBanned.md +++ b/old_docs/API_docs_v71/methods/channels_editBanned.md @@ -36,16 +36,13 @@ description: channels.editBanned parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v71/methods/channels_editPhoto.md b/old_docs/API_docs_v71/methods/channels_editPhoto.md index 99873537..4a4aeb03 100644 --- a/old_docs/API_docs_v71/methods/channels_editPhoto.md +++ b/old_docs/API_docs_v71/methods/channels_editPhoto.md @@ -33,16 +33,13 @@ description: channels.editPhoto parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v71/methods/channels_editTitle.md b/old_docs/API_docs_v71/methods/channels_editTitle.md index 04e8ce12..8a69d09b 100644 --- a/old_docs/API_docs_v71/methods/channels_editTitle.md +++ b/old_docs/API_docs_v71/methods/channels_editTitle.md @@ -33,16 +33,13 @@ description: channels.editTitle parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v71/methods/channels_exportInvite.md b/old_docs/API_docs_v71/methods/channels_exportInvite.md index 2ed80f6c..79dc6401 100644 --- a/old_docs/API_docs_v71/methods/channels_exportInvite.md +++ b/old_docs/API_docs_v71/methods/channels_exportInvite.md @@ -32,16 +32,13 @@ description: channels.exportInvite parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v71/methods/channels_exportMessageLink.md b/old_docs/API_docs_v71/methods/channels_exportMessageLink.md index 9831c9c0..5b824859 100644 --- a/old_docs/API_docs_v71/methods/channels_exportMessageLink.md +++ b/old_docs/API_docs_v71/methods/channels_exportMessageLink.md @@ -31,13 +31,10 @@ description: channels.exportMessageLink parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v71/methods/channels_getAdminLog.md b/old_docs/API_docs_v71/methods/channels_getAdminLog.md index 5283563d..2f7327d1 100644 --- a/old_docs/API_docs_v71/methods/channels_getAdminLog.md +++ b/old_docs/API_docs_v71/methods/channels_getAdminLog.md @@ -38,13 +38,10 @@ description: channels.getAdminLog parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v71/methods/channels_getAdminedPublicChannels.md b/old_docs/API_docs_v71/methods/channels_getAdminedPublicChannels.md index 7fceb026..283a9071 100644 --- a/old_docs/API_docs_v71/methods/channels_getAdminedPublicChannels.md +++ b/old_docs/API_docs_v71/methods/channels_getAdminedPublicChannels.md @@ -18,13 +18,10 @@ description: channels.getAdminedPublicChannels parameters, return type and examp ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v71/methods/channels_getChannels.md b/old_docs/API_docs_v71/methods/channels_getChannels.md index 13304938..e80aa6a6 100644 --- a/old_docs/API_docs_v71/methods/channels_getChannels.md +++ b/old_docs/API_docs_v71/methods/channels_getChannels.md @@ -32,16 +32,13 @@ description: channels.getChannels parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v71/methods/channels_getMessages.md b/old_docs/API_docs_v71/methods/channels_getMessages.md index 5480dd86..dc392773 100644 --- a/old_docs/API_docs_v71/methods/channels_getMessages.md +++ b/old_docs/API_docs_v71/methods/channels_getMessages.md @@ -33,16 +33,13 @@ description: channels.getMessages parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v71/methods/channels_getParticipant.md b/old_docs/API_docs_v71/methods/channels_getParticipant.md index 8c7e3cbd..001bf115 100644 --- a/old_docs/API_docs_v71/methods/channels_getParticipant.md +++ b/old_docs/API_docs_v71/methods/channels_getParticipant.md @@ -35,16 +35,13 @@ description: channels.getParticipant parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v71/methods/channels_inviteToChannel.md b/old_docs/API_docs_v71/methods/channels_inviteToChannel.md index cf5480e0..2448fb84 100644 --- a/old_docs/API_docs_v71/methods/channels_inviteToChannel.md +++ b/old_docs/API_docs_v71/methods/channels_inviteToChannel.md @@ -46,13 +46,10 @@ description: channels.inviteToChannel parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v71/methods/channels_joinChannel.md b/old_docs/API_docs_v71/methods/channels_joinChannel.md index f31730a1..e746cf48 100644 --- a/old_docs/API_docs_v71/methods/channels_joinChannel.md +++ b/old_docs/API_docs_v71/methods/channels_joinChannel.md @@ -32,13 +32,10 @@ description: channels.joinChannel parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v71/methods/channels_leaveChannel.md b/old_docs/API_docs_v71/methods/channels_leaveChannel.md index 12902f6d..ff244ded 100644 --- a/old_docs/API_docs_v71/methods/channels_leaveChannel.md +++ b/old_docs/API_docs_v71/methods/channels_leaveChannel.md @@ -34,16 +34,13 @@ description: channels.leaveChannel parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v71/methods/channels_readHistory.md b/old_docs/API_docs_v71/methods/channels_readHistory.md index be979101..6fc6ec0e 100644 --- a/old_docs/API_docs_v71/methods/channels_readHistory.md +++ b/old_docs/API_docs_v71/methods/channels_readHistory.md @@ -32,13 +32,10 @@ description: channels.readHistory parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v71/methods/channels_readMessageContents.md b/old_docs/API_docs_v71/methods/channels_readMessageContents.md index 90277593..66213852 100644 --- a/old_docs/API_docs_v71/methods/channels_readMessageContents.md +++ b/old_docs/API_docs_v71/methods/channels_readMessageContents.md @@ -32,13 +32,10 @@ description: channels.readMessageContents parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v71/methods/channels_reportSpam.md b/old_docs/API_docs_v71/methods/channels_reportSpam.md index 22f34443..a37a5833 100644 --- a/old_docs/API_docs_v71/methods/channels_reportSpam.md +++ b/old_docs/API_docs_v71/methods/channels_reportSpam.md @@ -33,13 +33,10 @@ description: channels.reportSpam parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v71/methods/channels_setStickers.md b/old_docs/API_docs_v71/methods/channels_setStickers.md index 6712ada0..a05165c2 100644 --- a/old_docs/API_docs_v71/methods/channels_setStickers.md +++ b/old_docs/API_docs_v71/methods/channels_setStickers.md @@ -32,16 +32,13 @@ description: channels.setStickers parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v71/methods/channels_toggleInvites.md b/old_docs/API_docs_v71/methods/channels_toggleInvites.md index c2715b32..d0ae1136 100644 --- a/old_docs/API_docs_v71/methods/channels_toggleInvites.md +++ b/old_docs/API_docs_v71/methods/channels_toggleInvites.md @@ -33,13 +33,10 @@ description: channels.toggleInvites parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v71/methods/channels_toggleSignatures.md b/old_docs/API_docs_v71/methods/channels_toggleSignatures.md index a214b849..6477bc6d 100644 --- a/old_docs/API_docs_v71/methods/channels_toggleSignatures.md +++ b/old_docs/API_docs_v71/methods/channels_toggleSignatures.md @@ -31,13 +31,10 @@ description: channels.toggleSignatures parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v71/methods/channels_updatePinnedMessage.md b/old_docs/API_docs_v71/methods/channels_updatePinnedMessage.md index 6dcabf71..37a0a20d 100644 --- a/old_docs/API_docs_v71/methods/channels_updatePinnedMessage.md +++ b/old_docs/API_docs_v71/methods/channels_updatePinnedMessage.md @@ -35,16 +35,13 @@ description: channels.updatePinnedMessage parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v71/methods/channels_updateUsername.md b/old_docs/API_docs_v71/methods/channels_updateUsername.md index c2ede724..1f1f111e 100644 --- a/old_docs/API_docs_v71/methods/channels_updateUsername.md +++ b/old_docs/API_docs_v71/methods/channels_updateUsername.md @@ -35,13 +35,10 @@ description: channels.updateUsername parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v71/methods/contacts_block.md b/old_docs/API_docs_v71/methods/contacts_block.md index d9d58e37..1c7cbe26 100644 --- a/old_docs/API_docs_v71/methods/contacts_block.md +++ b/old_docs/API_docs_v71/methods/contacts_block.md @@ -30,13 +30,10 @@ description: contacts.block parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v71/methods/contacts_deleteContact.md b/old_docs/API_docs_v71/methods/contacts_deleteContact.md index cd8c17ad..987a1be0 100644 --- a/old_docs/API_docs_v71/methods/contacts_deleteContact.md +++ b/old_docs/API_docs_v71/methods/contacts_deleteContact.md @@ -30,13 +30,10 @@ description: contacts.deleteContact parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v71/methods/contacts_deleteContacts.md b/old_docs/API_docs_v71/methods/contacts_deleteContacts.md index fc65880d..67a922ed 100644 --- a/old_docs/API_docs_v71/methods/contacts_deleteContacts.md +++ b/old_docs/API_docs_v71/methods/contacts_deleteContacts.md @@ -31,13 +31,10 @@ description: contacts.deleteContacts parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v71/methods/contacts_exportCard.md b/old_docs/API_docs_v71/methods/contacts_exportCard.md index 63508076..bf6d1f9f 100644 --- a/old_docs/API_docs_v71/methods/contacts_exportCard.md +++ b/old_docs/API_docs_v71/methods/contacts_exportCard.md @@ -18,13 +18,10 @@ description: contacts.exportCard parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v71/methods/contacts_getBlocked.md b/old_docs/API_docs_v71/methods/contacts_getBlocked.md index f50792b4..faa719da 100644 --- a/old_docs/API_docs_v71/methods/contacts_getBlocked.md +++ b/old_docs/API_docs_v71/methods/contacts_getBlocked.md @@ -24,13 +24,10 @@ description: contacts.getBlocked parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v71/methods/contacts_getContacts.md b/old_docs/API_docs_v71/methods/contacts_getContacts.md index dd231da2..e7783c1b 100644 --- a/old_docs/API_docs_v71/methods/contacts_getContacts.md +++ b/old_docs/API_docs_v71/methods/contacts_getContacts.md @@ -23,13 +23,10 @@ description: contacts.getContacts parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v71/methods/contacts_getStatuses.md b/old_docs/API_docs_v71/methods/contacts_getStatuses.md index d914e08d..9bb7f263 100644 --- a/old_docs/API_docs_v71/methods/contacts_getStatuses.md +++ b/old_docs/API_docs_v71/methods/contacts_getStatuses.md @@ -18,13 +18,10 @@ description: contacts.getStatuses parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v71/methods/contacts_getTopPeers.md b/old_docs/API_docs_v71/methods/contacts_getTopPeers.md index cbd64cc0..f72133a5 100644 --- a/old_docs/API_docs_v71/methods/contacts_getTopPeers.md +++ b/old_docs/API_docs_v71/methods/contacts_getTopPeers.md @@ -38,13 +38,10 @@ description: contacts.getTopPeers parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v71/methods/contacts_importCard.md b/old_docs/API_docs_v71/methods/contacts_importCard.md index a6abf56d..7a2f34e1 100644 --- a/old_docs/API_docs_v71/methods/contacts_importCard.md +++ b/old_docs/API_docs_v71/methods/contacts_importCard.md @@ -31,13 +31,10 @@ description: contacts.importCard parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v71/methods/contacts_importContacts.md b/old_docs/API_docs_v71/methods/contacts_importContacts.md index e7e84bea..7d580e83 100644 --- a/old_docs/API_docs_v71/methods/contacts_importContacts.md +++ b/old_docs/API_docs_v71/methods/contacts_importContacts.md @@ -23,13 +23,10 @@ description: contacts.importContacts parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v71/methods/contacts_resetSaved.md b/old_docs/API_docs_v71/methods/contacts_resetSaved.md index 56838fd8..87f8db12 100644 --- a/old_docs/API_docs_v71/methods/contacts_resetSaved.md +++ b/old_docs/API_docs_v71/methods/contacts_resetSaved.md @@ -18,16 +18,13 @@ description: contacts.resetSaved parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v71/methods/contacts_resetTopPeerRating.md b/old_docs/API_docs_v71/methods/contacts_resetTopPeerRating.md index 738494b2..711ea0cb 100644 --- a/old_docs/API_docs_v71/methods/contacts_resetTopPeerRating.md +++ b/old_docs/API_docs_v71/methods/contacts_resetTopPeerRating.md @@ -31,13 +31,10 @@ description: contacts.resetTopPeerRating parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v71/methods/contacts_search.md b/old_docs/API_docs_v71/methods/contacts_search.md index 0203b160..70a0635e 100644 --- a/old_docs/API_docs_v71/methods/contacts_search.md +++ b/old_docs/API_docs_v71/methods/contacts_search.md @@ -33,13 +33,10 @@ description: contacts.search parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v71/methods/contacts_unblock.md b/old_docs/API_docs_v71/methods/contacts_unblock.md index a1977c24..9c01e42a 100644 --- a/old_docs/API_docs_v71/methods/contacts_unblock.md +++ b/old_docs/API_docs_v71/methods/contacts_unblock.md @@ -30,13 +30,10 @@ description: contacts.unblock parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v71/methods/contest_saveDeveloperInfo.md b/old_docs/API_docs_v71/methods/contest_saveDeveloperInfo.md index eca7bfcf..c0bb9054 100644 --- a/old_docs/API_docs_v71/methods/contest_saveDeveloperInfo.md +++ b/old_docs/API_docs_v71/methods/contest_saveDeveloperInfo.md @@ -27,16 +27,13 @@ description: contest.saveDeveloperInfo parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v71/methods/destroy_auth_key.md b/old_docs/API_docs_v71/methods/destroy_auth_key.md index 7d39ceec..1803e375 100644 --- a/old_docs/API_docs_v71/methods/destroy_auth_key.md +++ b/old_docs/API_docs_v71/methods/destroy_auth_key.md @@ -18,16 +18,13 @@ description: destroy_auth_key parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v71/methods/destroy_session.md b/old_docs/API_docs_v71/methods/destroy_session.md index 0b732694..39aa2c6e 100644 --- a/old_docs/API_docs_v71/methods/destroy_session.md +++ b/old_docs/API_docs_v71/methods/destroy_session.md @@ -23,16 +23,13 @@ description: destroy_session parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v71/methods/get_future_salts.md b/old_docs/API_docs_v71/methods/get_future_salts.md index d3b306ce..fedf036c 100644 --- a/old_docs/API_docs_v71/methods/get_future_salts.md +++ b/old_docs/API_docs_v71/methods/get_future_salts.md @@ -23,16 +23,13 @@ description: get_future_salts parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v71/methods/help_getAppChangelog.md b/old_docs/API_docs_v71/methods/help_getAppChangelog.md index 9d8c3203..59916787 100644 --- a/old_docs/API_docs_v71/methods/help_getAppChangelog.md +++ b/old_docs/API_docs_v71/methods/help_getAppChangelog.md @@ -23,13 +23,10 @@ description: help.getAppChangelog parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v71/methods/help_getAppUpdate.md b/old_docs/API_docs_v71/methods/help_getAppUpdate.md index 0871f59d..89ff22c3 100644 --- a/old_docs/API_docs_v71/methods/help_getAppUpdate.md +++ b/old_docs/API_docs_v71/methods/help_getAppUpdate.md @@ -18,13 +18,10 @@ description: help.getAppUpdate parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v71/methods/help_getCdnConfig.md b/old_docs/API_docs_v71/methods/help_getCdnConfig.md index da446958..3079e605 100644 --- a/old_docs/API_docs_v71/methods/help_getCdnConfig.md +++ b/old_docs/API_docs_v71/methods/help_getCdnConfig.md @@ -25,16 +25,13 @@ description: help.getCdnConfig parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v71/methods/help_getConfig.md b/old_docs/API_docs_v71/methods/help_getConfig.md index e3648b5a..bb51b362 100644 --- a/old_docs/API_docs_v71/methods/help_getConfig.md +++ b/old_docs/API_docs_v71/methods/help_getConfig.md @@ -25,16 +25,13 @@ description: help.getConfig parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v71/methods/help_getInviteText.md b/old_docs/API_docs_v71/methods/help_getInviteText.md index 4bcbb77d..6d2674d6 100644 --- a/old_docs/API_docs_v71/methods/help_getInviteText.md +++ b/old_docs/API_docs_v71/methods/help_getInviteText.md @@ -18,13 +18,10 @@ description: help.getInviteText parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v71/methods/help_getNearestDc.md b/old_docs/API_docs_v71/methods/help_getNearestDc.md index c6f5c555..6d8ed3f7 100644 --- a/old_docs/API_docs_v71/methods/help_getNearestDc.md +++ b/old_docs/API_docs_v71/methods/help_getNearestDc.md @@ -18,13 +18,10 @@ description: help.getNearestDc parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v71/methods/help_getSupport.md b/old_docs/API_docs_v71/methods/help_getSupport.md index 209edf03..ca8db03c 100644 --- a/old_docs/API_docs_v71/methods/help_getSupport.md +++ b/old_docs/API_docs_v71/methods/help_getSupport.md @@ -18,13 +18,10 @@ description: help.getSupport parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v71/methods/help_getTermsOfService.md b/old_docs/API_docs_v71/methods/help_getTermsOfService.md index 8bc2e2fa..eb686506 100644 --- a/old_docs/API_docs_v71/methods/help_getTermsOfService.md +++ b/old_docs/API_docs_v71/methods/help_getTermsOfService.md @@ -18,13 +18,10 @@ description: help.getTermsOfService parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v71/methods/help_saveAppLog.md b/old_docs/API_docs_v71/methods/help_saveAppLog.md index 4f06434c..741b9aa1 100644 --- a/old_docs/API_docs_v71/methods/help_saveAppLog.md +++ b/old_docs/API_docs_v71/methods/help_saveAppLog.md @@ -23,13 +23,10 @@ description: help.saveAppLog parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v71/methods/help_setBotUpdatesStatus.md b/old_docs/API_docs_v71/methods/help_setBotUpdatesStatus.md index 55e1d2fe..470187a0 100644 --- a/old_docs/API_docs_v71/methods/help_setBotUpdatesStatus.md +++ b/old_docs/API_docs_v71/methods/help_setBotUpdatesStatus.md @@ -24,16 +24,13 @@ description: help.setBotUpdatesStatus parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v71/methods/initConnection.md b/old_docs/API_docs_v71/methods/initConnection.md index b66ab859..ef40e7f5 100644 --- a/old_docs/API_docs_v71/methods/initConnection.md +++ b/old_docs/API_docs_v71/methods/initConnection.md @@ -38,16 +38,13 @@ description: initConnection parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v71/methods/invokeAfterMsg.md b/old_docs/API_docs_v71/methods/invokeAfterMsg.md index c139fe8c..a382429e 100644 --- a/old_docs/API_docs_v71/methods/invokeAfterMsg.md +++ b/old_docs/API_docs_v71/methods/invokeAfterMsg.md @@ -24,16 +24,13 @@ description: invokeAfterMsg parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v71/methods/invokeAfterMsgs.md b/old_docs/API_docs_v71/methods/invokeAfterMsgs.md index 35004296..169eedaf 100644 --- a/old_docs/API_docs_v71/methods/invokeAfterMsgs.md +++ b/old_docs/API_docs_v71/methods/invokeAfterMsgs.md @@ -24,16 +24,13 @@ description: invokeAfterMsgs parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v71/methods/invokeWithLayer.md b/old_docs/API_docs_v71/methods/invokeWithLayer.md index 706036c4..d9a2c74c 100644 --- a/old_docs/API_docs_v71/methods/invokeWithLayer.md +++ b/old_docs/API_docs_v71/methods/invokeWithLayer.md @@ -41,16 +41,13 @@ description: invokeWithLayer parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v71/methods/invokeWithoutUpdates.md b/old_docs/API_docs_v71/methods/invokeWithoutUpdates.md index 10c6bfcf..f7d01765 100644 --- a/old_docs/API_docs_v71/methods/invokeWithoutUpdates.md +++ b/old_docs/API_docs_v71/methods/invokeWithoutUpdates.md @@ -23,16 +23,13 @@ description: invokeWithoutUpdates parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v71/methods/langpack_getDifference.md b/old_docs/API_docs_v71/methods/langpack_getDifference.md index 2e77cc3b..116e78e2 100644 --- a/old_docs/API_docs_v71/methods/langpack_getDifference.md +++ b/old_docs/API_docs_v71/methods/langpack_getDifference.md @@ -30,13 +30,10 @@ description: langpack.getDifference parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v71/methods/langpack_getLangPack.md b/old_docs/API_docs_v71/methods/langpack_getLangPack.md index 5d4d0b81..b5686e61 100644 --- a/old_docs/API_docs_v71/methods/langpack_getLangPack.md +++ b/old_docs/API_docs_v71/methods/langpack_getLangPack.md @@ -30,13 +30,10 @@ description: langpack.getLangPack parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v71/methods/langpack_getLanguages.md b/old_docs/API_docs_v71/methods/langpack_getLanguages.md index abaa0de3..cb65e5a0 100644 --- a/old_docs/API_docs_v71/methods/langpack_getLanguages.md +++ b/old_docs/API_docs_v71/methods/langpack_getLanguages.md @@ -25,13 +25,10 @@ description: langpack.getLanguages parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v71/methods/langpack_getStrings.md b/old_docs/API_docs_v71/methods/langpack_getStrings.md index 9bb740dc..ce58daf9 100644 --- a/old_docs/API_docs_v71/methods/langpack_getStrings.md +++ b/old_docs/API_docs_v71/methods/langpack_getStrings.md @@ -31,13 +31,10 @@ description: langpack.getStrings parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v71/methods/messages_addChatUser.md b/old_docs/API_docs_v71/methods/messages_addChatUser.md index 00da5a61..b9e6243d 100644 --- a/old_docs/API_docs_v71/methods/messages_addChatUser.md +++ b/old_docs/API_docs_v71/methods/messages_addChatUser.md @@ -40,13 +40,10 @@ description: messages.addChatUser parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v71/methods/messages_checkChatInvite.md b/old_docs/API_docs_v71/methods/messages_checkChatInvite.md index c5eb1c06..c4489469 100644 --- a/old_docs/API_docs_v71/methods/messages_checkChatInvite.md +++ b/old_docs/API_docs_v71/methods/messages_checkChatInvite.md @@ -32,13 +32,10 @@ description: messages.checkChatInvite parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v71/methods/messages_clearRecentStickers.md b/old_docs/API_docs_v71/methods/messages_clearRecentStickers.md index dda76d14..ae45b249 100644 --- a/old_docs/API_docs_v71/methods/messages_clearRecentStickers.md +++ b/old_docs/API_docs_v71/methods/messages_clearRecentStickers.md @@ -23,13 +23,10 @@ description: messages.clearRecentStickers parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v71/methods/messages_createChat.md b/old_docs/API_docs_v71/methods/messages_createChat.md index c643a022..c6c8f420 100644 --- a/old_docs/API_docs_v71/methods/messages_createChat.md +++ b/old_docs/API_docs_v71/methods/messages_createChat.md @@ -32,13 +32,10 @@ description: messages.createChat parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v71/methods/messages_deleteChatUser.md b/old_docs/API_docs_v71/methods/messages_deleteChatUser.md index 3d75d9cf..4b8c2aa5 100644 --- a/old_docs/API_docs_v71/methods/messages_deleteChatUser.md +++ b/old_docs/API_docs_v71/methods/messages_deleteChatUser.md @@ -33,16 +33,13 @@ description: messages.deleteChatUser parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v71/methods/messages_deleteHistory.md b/old_docs/API_docs_v71/methods/messages_deleteHistory.md index ce6ba6e7..ebe2c89c 100644 --- a/old_docs/API_docs_v71/methods/messages_deleteHistory.md +++ b/old_docs/API_docs_v71/methods/messages_deleteHistory.md @@ -32,13 +32,10 @@ description: messages.deleteHistory parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v71/methods/messages_deleteMessages.md b/old_docs/API_docs_v71/methods/messages_deleteMessages.md index 2b88a73f..5472cc72 100644 --- a/old_docs/API_docs_v71/methods/messages_deleteMessages.md +++ b/old_docs/API_docs_v71/methods/messages_deleteMessages.md @@ -31,16 +31,13 @@ description: messages.deleteMessages parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v71/methods/messages_editChatAdmin.md b/old_docs/API_docs_v71/methods/messages_editChatAdmin.md index e64d9da5..1b3ffa9f 100644 --- a/old_docs/API_docs_v71/methods/messages_editChatAdmin.md +++ b/old_docs/API_docs_v71/methods/messages_editChatAdmin.md @@ -32,13 +32,10 @@ description: messages.editChatAdmin parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v71/methods/messages_editChatPhoto.md b/old_docs/API_docs_v71/methods/messages_editChatPhoto.md index d225962d..8c5d9d47 100644 --- a/old_docs/API_docs_v71/methods/messages_editChatPhoto.md +++ b/old_docs/API_docs_v71/methods/messages_editChatPhoto.md @@ -35,16 +35,13 @@ description: messages.editChatPhoto parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v71/methods/messages_editChatTitle.md b/old_docs/API_docs_v71/methods/messages_editChatTitle.md index 5cb1c6d7..238c6d72 100644 --- a/old_docs/API_docs_v71/methods/messages_editChatTitle.md +++ b/old_docs/API_docs_v71/methods/messages_editChatTitle.md @@ -32,16 +32,13 @@ description: messages.editChatTitle parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v71/methods/messages_editInlineBotMessage.md b/old_docs/API_docs_v71/methods/messages_editInlineBotMessage.md index 621c81a3..c3489f9d 100644 --- a/old_docs/API_docs_v71/methods/messages_editInlineBotMessage.md +++ b/old_docs/API_docs_v71/methods/messages_editInlineBotMessage.md @@ -36,16 +36,13 @@ description: messages.editInlineBotMessage parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v71/methods/messages_editMessage.md b/old_docs/API_docs_v71/methods/messages_editMessage.md index b8cdda81..3a23c9ac 100644 --- a/old_docs/API_docs_v71/methods/messages_editMessage.md +++ b/old_docs/API_docs_v71/methods/messages_editMessage.md @@ -45,16 +45,13 @@ description: messages.editMessage parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v71/methods/messages_exportChatInvite.md b/old_docs/API_docs_v71/methods/messages_exportChatInvite.md index 4a6e28ff..78f2ff86 100644 --- a/old_docs/API_docs_v71/methods/messages_exportChatInvite.md +++ b/old_docs/API_docs_v71/methods/messages_exportChatInvite.md @@ -30,13 +30,10 @@ description: messages.exportChatInvite parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v71/methods/messages_faveSticker.md b/old_docs/API_docs_v71/methods/messages_faveSticker.md index 4ac9d019..4164c935 100644 --- a/old_docs/API_docs_v71/methods/messages_faveSticker.md +++ b/old_docs/API_docs_v71/methods/messages_faveSticker.md @@ -31,16 +31,13 @@ description: messages.faveSticker parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v71/methods/messages_forwardMessage.md b/old_docs/API_docs_v71/methods/messages_forwardMessage.md index 4e2362db..fbdbc955 100644 --- a/old_docs/API_docs_v71/methods/messages_forwardMessage.md +++ b/old_docs/API_docs_v71/methods/messages_forwardMessage.md @@ -34,16 +34,13 @@ description: messages.forwardMessage parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v71/methods/messages_forwardMessages.md b/old_docs/API_docs_v71/methods/messages_forwardMessages.md index b5e9b7e7..5a609390 100644 --- a/old_docs/API_docs_v71/methods/messages_forwardMessages.md +++ b/old_docs/API_docs_v71/methods/messages_forwardMessages.md @@ -56,16 +56,13 @@ description: messages.forwardMessages parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v71/methods/messages_getAllChats.md b/old_docs/API_docs_v71/methods/messages_getAllChats.md index c5037003..babcf17d 100644 --- a/old_docs/API_docs_v71/methods/messages_getAllChats.md +++ b/old_docs/API_docs_v71/methods/messages_getAllChats.md @@ -23,13 +23,10 @@ description: messages.getAllChats parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v71/methods/messages_getAllDrafts.md b/old_docs/API_docs_v71/methods/messages_getAllDrafts.md index cc447864..8550c5b8 100644 --- a/old_docs/API_docs_v71/methods/messages_getAllDrafts.md +++ b/old_docs/API_docs_v71/methods/messages_getAllDrafts.md @@ -18,13 +18,10 @@ description: messages.getAllDrafts parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v71/methods/messages_getAllStickers.md b/old_docs/API_docs_v71/methods/messages_getAllStickers.md index dc9e2432..034438a5 100644 --- a/old_docs/API_docs_v71/methods/messages_getAllStickers.md +++ b/old_docs/API_docs_v71/methods/messages_getAllStickers.md @@ -23,13 +23,10 @@ description: messages.getAllStickers parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v71/methods/messages_getArchivedStickers.md b/old_docs/API_docs_v71/methods/messages_getArchivedStickers.md index dddcc748..cdb7f0af 100644 --- a/old_docs/API_docs_v71/methods/messages_getArchivedStickers.md +++ b/old_docs/API_docs_v71/methods/messages_getArchivedStickers.md @@ -25,13 +25,10 @@ description: messages.getArchivedStickers parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v71/methods/messages_getAttachedStickers.md b/old_docs/API_docs_v71/methods/messages_getAttachedStickers.md index 250db6a8..79d4e30d 100644 --- a/old_docs/API_docs_v71/methods/messages_getAttachedStickers.md +++ b/old_docs/API_docs_v71/methods/messages_getAttachedStickers.md @@ -23,13 +23,10 @@ description: messages.getAttachedStickers parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v71/methods/messages_getBotCallbackAnswer.md b/old_docs/API_docs_v71/methods/messages_getBotCallbackAnswer.md index e905723f..afa5358c 100644 --- a/old_docs/API_docs_v71/methods/messages_getBotCallbackAnswer.md +++ b/old_docs/API_docs_v71/methods/messages_getBotCallbackAnswer.md @@ -37,13 +37,10 @@ description: messages.getBotCallbackAnswer parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v71/methods/messages_getChats.md b/old_docs/API_docs_v71/methods/messages_getChats.md index 6fa30cbd..c322613d 100644 --- a/old_docs/API_docs_v71/methods/messages_getChats.md +++ b/old_docs/API_docs_v71/methods/messages_getChats.md @@ -31,16 +31,13 @@ description: messages.getChats parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v71/methods/messages_getCommonChats.md b/old_docs/API_docs_v71/methods/messages_getCommonChats.md index 0c601ca9..8c9e2834 100644 --- a/old_docs/API_docs_v71/methods/messages_getCommonChats.md +++ b/old_docs/API_docs_v71/methods/messages_getCommonChats.md @@ -32,13 +32,10 @@ description: messages.getCommonChats parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v71/methods/messages_getDhConfig.md b/old_docs/API_docs_v71/methods/messages_getDhConfig.md index aac3354d..f97684d2 100644 --- a/old_docs/API_docs_v71/methods/messages_getDhConfig.md +++ b/old_docs/API_docs_v71/methods/messages_getDhConfig.md @@ -31,13 +31,10 @@ description: messages.getDhConfig parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v71/methods/messages_getDialogs.md b/old_docs/API_docs_v71/methods/messages_getDialogs.md index 131b75b7..cef5ecc6 100644 --- a/old_docs/API_docs_v71/methods/messages_getDialogs.md +++ b/old_docs/API_docs_v71/methods/messages_getDialogs.md @@ -37,13 +37,10 @@ description: messages.getDialogs parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v71/methods/messages_getDocumentByHash.md b/old_docs/API_docs_v71/methods/messages_getDocumentByHash.md index dda54bdd..3902ac44 100644 --- a/old_docs/API_docs_v71/methods/messages_getDocumentByHash.md +++ b/old_docs/API_docs_v71/methods/messages_getDocumentByHash.md @@ -32,16 +32,13 @@ description: messages.getDocumentByHash parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v71/methods/messages_getFavedStickers.md b/old_docs/API_docs_v71/methods/messages_getFavedStickers.md index 482b8fc5..51701826 100644 --- a/old_docs/API_docs_v71/methods/messages_getFavedStickers.md +++ b/old_docs/API_docs_v71/methods/messages_getFavedStickers.md @@ -23,16 +23,13 @@ description: messages.getFavedStickers parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v71/methods/messages_getFeaturedStickers.md b/old_docs/API_docs_v71/methods/messages_getFeaturedStickers.md index 9573464a..5aad1810 100644 --- a/old_docs/API_docs_v71/methods/messages_getFeaturedStickers.md +++ b/old_docs/API_docs_v71/methods/messages_getFeaturedStickers.md @@ -23,13 +23,10 @@ description: messages.getFeaturedStickers parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v71/methods/messages_getGameHighScores.md b/old_docs/API_docs_v71/methods/messages_getGameHighScores.md index 935bb95a..d8a94ae3 100644 --- a/old_docs/API_docs_v71/methods/messages_getGameHighScores.md +++ b/old_docs/API_docs_v71/methods/messages_getGameHighScores.md @@ -33,16 +33,13 @@ description: messages.getGameHighScores parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v71/methods/messages_getHistory.md b/old_docs/API_docs_v71/methods/messages_getHistory.md index a48a465e..4c3ef2ee 100644 --- a/old_docs/API_docs_v71/methods/messages_getHistory.md +++ b/old_docs/API_docs_v71/methods/messages_getHistory.md @@ -41,13 +41,10 @@ description: messages.getHistory parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v71/methods/messages_getInlineBotResults.md b/old_docs/API_docs_v71/methods/messages_getInlineBotResults.md index 61366580..61b927fc 100644 --- a/old_docs/API_docs_v71/methods/messages_getInlineBotResults.md +++ b/old_docs/API_docs_v71/methods/messages_getInlineBotResults.md @@ -37,13 +37,10 @@ description: messages.getInlineBotResults parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v71/methods/messages_getInlineGameHighScores.md b/old_docs/API_docs_v71/methods/messages_getInlineGameHighScores.md index 7cc04d0d..40eff3a9 100644 --- a/old_docs/API_docs_v71/methods/messages_getInlineGameHighScores.md +++ b/old_docs/API_docs_v71/methods/messages_getInlineGameHighScores.md @@ -32,16 +32,13 @@ description: messages.getInlineGameHighScores parameters, return type and exampl ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v71/methods/messages_getMaskStickers.md b/old_docs/API_docs_v71/methods/messages_getMaskStickers.md index 0ab194df..ca964647 100644 --- a/old_docs/API_docs_v71/methods/messages_getMaskStickers.md +++ b/old_docs/API_docs_v71/methods/messages_getMaskStickers.md @@ -23,13 +23,10 @@ description: messages.getMaskStickers parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v71/methods/messages_getMessageEditData.md b/old_docs/API_docs_v71/methods/messages_getMessageEditData.md index a8b135c6..15085153 100644 --- a/old_docs/API_docs_v71/methods/messages_getMessageEditData.md +++ b/old_docs/API_docs_v71/methods/messages_getMessageEditData.md @@ -32,13 +32,10 @@ description: messages.getMessageEditData parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v71/methods/messages_getMessages.md b/old_docs/API_docs_v71/methods/messages_getMessages.md index 5a970246..787c46dd 100644 --- a/old_docs/API_docs_v71/methods/messages_getMessages.md +++ b/old_docs/API_docs_v71/methods/messages_getMessages.md @@ -23,16 +23,13 @@ description: messages.getMessages parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v71/methods/messages_getMessagesViews.md b/old_docs/API_docs_v71/methods/messages_getMessagesViews.md index 263f3f95..de5692dc 100644 --- a/old_docs/API_docs_v71/methods/messages_getMessagesViews.md +++ b/old_docs/API_docs_v71/methods/messages_getMessagesViews.md @@ -34,13 +34,10 @@ description: messages.getMessagesViews parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v71/methods/messages_getPeerDialogs.md b/old_docs/API_docs_v71/methods/messages_getPeerDialogs.md index 3da60038..226948ae 100644 --- a/old_docs/API_docs_v71/methods/messages_getPeerDialogs.md +++ b/old_docs/API_docs_v71/methods/messages_getPeerDialogs.md @@ -31,13 +31,10 @@ description: messages.getPeerDialogs parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v71/methods/messages_getPeerSettings.md b/old_docs/API_docs_v71/methods/messages_getPeerSettings.md index d3e3cfc3..2a92f2da 100644 --- a/old_docs/API_docs_v71/methods/messages_getPeerSettings.md +++ b/old_docs/API_docs_v71/methods/messages_getPeerSettings.md @@ -31,13 +31,10 @@ description: messages.getPeerSettings parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v71/methods/messages_getPinnedDialogs.md b/old_docs/API_docs_v71/methods/messages_getPinnedDialogs.md index 110eab05..ec744f01 100644 --- a/old_docs/API_docs_v71/methods/messages_getPinnedDialogs.md +++ b/old_docs/API_docs_v71/methods/messages_getPinnedDialogs.md @@ -18,13 +18,10 @@ description: messages.getPinnedDialogs parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v71/methods/messages_getRecentStickers.md b/old_docs/API_docs_v71/methods/messages_getRecentStickers.md index 10d1a0df..a6ae162f 100644 --- a/old_docs/API_docs_v71/methods/messages_getRecentStickers.md +++ b/old_docs/API_docs_v71/methods/messages_getRecentStickers.md @@ -24,13 +24,10 @@ description: messages.getRecentStickers parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v71/methods/messages_getSavedGifs.md b/old_docs/API_docs_v71/methods/messages_getSavedGifs.md index 7cce4ffe..4986d812 100644 --- a/old_docs/API_docs_v71/methods/messages_getSavedGifs.md +++ b/old_docs/API_docs_v71/methods/messages_getSavedGifs.md @@ -23,13 +23,10 @@ description: messages.getSavedGifs parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v71/methods/messages_getStickerSet.md b/old_docs/API_docs_v71/methods/messages_getStickerSet.md index 59f33916..b480e0fe 100644 --- a/old_docs/API_docs_v71/methods/messages_getStickerSet.md +++ b/old_docs/API_docs_v71/methods/messages_getStickerSet.md @@ -30,16 +30,13 @@ description: messages.getStickerSet parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v71/methods/messages_getUnreadMentions.md b/old_docs/API_docs_v71/methods/messages_getUnreadMentions.md index 54e8cabf..09b3633e 100644 --- a/old_docs/API_docs_v71/methods/messages_getUnreadMentions.md +++ b/old_docs/API_docs_v71/methods/messages_getUnreadMentions.md @@ -35,13 +35,10 @@ description: messages.getUnreadMentions parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v71/methods/messages_getWebPage.md b/old_docs/API_docs_v71/methods/messages_getWebPage.md index 35f6e545..e886b020 100644 --- a/old_docs/API_docs_v71/methods/messages_getWebPage.md +++ b/old_docs/API_docs_v71/methods/messages_getWebPage.md @@ -31,13 +31,10 @@ description: messages.getWebPage parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v71/methods/messages_getWebPagePreview.md b/old_docs/API_docs_v71/methods/messages_getWebPagePreview.md index a89600b1..d3908933 100644 --- a/old_docs/API_docs_v71/methods/messages_getWebPagePreview.md +++ b/old_docs/API_docs_v71/methods/messages_getWebPagePreview.md @@ -23,13 +23,10 @@ description: messages.getWebPagePreview parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v71/methods/messages_hideReportSpam.md b/old_docs/API_docs_v71/methods/messages_hideReportSpam.md index 2dfe4dd7..5635665c 100644 --- a/old_docs/API_docs_v71/methods/messages_hideReportSpam.md +++ b/old_docs/API_docs_v71/methods/messages_hideReportSpam.md @@ -30,13 +30,10 @@ description: messages.hideReportSpam parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v71/methods/messages_importChatInvite.md b/old_docs/API_docs_v71/methods/messages_importChatInvite.md index 9d77304d..9dcfa56d 100644 --- a/old_docs/API_docs_v71/methods/messages_importChatInvite.md +++ b/old_docs/API_docs_v71/methods/messages_importChatInvite.md @@ -36,13 +36,10 @@ description: messages.importChatInvite parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v71/methods/messages_installStickerSet.md b/old_docs/API_docs_v71/methods/messages_installStickerSet.md index 3dde52a7..016d5ece 100644 --- a/old_docs/API_docs_v71/methods/messages_installStickerSet.md +++ b/old_docs/API_docs_v71/methods/messages_installStickerSet.md @@ -31,13 +31,10 @@ description: messages.installStickerSet parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v71/methods/messages_migrateChat.md b/old_docs/API_docs_v71/methods/messages_migrateChat.md index 22d2fbf0..a8274e70 100644 --- a/old_docs/API_docs_v71/methods/messages_migrateChat.md +++ b/old_docs/API_docs_v71/methods/messages_migrateChat.md @@ -32,13 +32,10 @@ description: messages.migrateChat parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v71/methods/messages_readEncryptedHistory.md b/old_docs/API_docs_v71/methods/messages_readEncryptedHistory.md index 766ee07d..f38f6b07 100644 --- a/old_docs/API_docs_v71/methods/messages_readEncryptedHistory.md +++ b/old_docs/API_docs_v71/methods/messages_readEncryptedHistory.md @@ -31,16 +31,13 @@ description: messages.readEncryptedHistory parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v71/methods/messages_readFeaturedStickers.md b/old_docs/API_docs_v71/methods/messages_readFeaturedStickers.md index c7ce7aca..02055bf3 100644 --- a/old_docs/API_docs_v71/methods/messages_readFeaturedStickers.md +++ b/old_docs/API_docs_v71/methods/messages_readFeaturedStickers.md @@ -23,13 +23,10 @@ description: messages.readFeaturedStickers parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v71/methods/messages_readHistory.md b/old_docs/API_docs_v71/methods/messages_readHistory.md index 1aa7830a..fef62130 100644 --- a/old_docs/API_docs_v71/methods/messages_readHistory.md +++ b/old_docs/API_docs_v71/methods/messages_readHistory.md @@ -32,13 +32,10 @@ description: messages.readHistory parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v71/methods/messages_readMessageContents.md b/old_docs/API_docs_v71/methods/messages_readMessageContents.md index 4b1abda0..7a6055fc 100644 --- a/old_docs/API_docs_v71/methods/messages_readMessageContents.md +++ b/old_docs/API_docs_v71/methods/messages_readMessageContents.md @@ -23,13 +23,10 @@ description: messages.readMessageContents parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v71/methods/messages_receivedMessages.md b/old_docs/API_docs_v71/methods/messages_receivedMessages.md index 588ac5cf..e2cf3a2f 100644 --- a/old_docs/API_docs_v71/methods/messages_receivedMessages.md +++ b/old_docs/API_docs_v71/methods/messages_receivedMessages.md @@ -23,13 +23,10 @@ description: messages.receivedMessages parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v71/methods/messages_receivedQueue.md b/old_docs/API_docs_v71/methods/messages_receivedQueue.md index 3c7f1d4f..38f504b3 100644 --- a/old_docs/API_docs_v71/methods/messages_receivedQueue.md +++ b/old_docs/API_docs_v71/methods/messages_receivedQueue.md @@ -30,16 +30,13 @@ description: messages.receivedQueue parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v71/methods/messages_reorderPinnedDialogs.md b/old_docs/API_docs_v71/methods/messages_reorderPinnedDialogs.md index 30102fd7..b4bfb84f 100644 --- a/old_docs/API_docs_v71/methods/messages_reorderPinnedDialogs.md +++ b/old_docs/API_docs_v71/methods/messages_reorderPinnedDialogs.md @@ -31,13 +31,10 @@ description: messages.reorderPinnedDialogs parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v71/methods/messages_reorderStickerSets.md b/old_docs/API_docs_v71/methods/messages_reorderStickerSets.md index 5c47f174..fa094550 100644 --- a/old_docs/API_docs_v71/methods/messages_reorderStickerSets.md +++ b/old_docs/API_docs_v71/methods/messages_reorderStickerSets.md @@ -24,13 +24,10 @@ description: messages.reorderStickerSets parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v71/methods/messages_reportEncryptedSpam.md b/old_docs/API_docs_v71/methods/messages_reportEncryptedSpam.md index 30ef3473..aed7a891 100644 --- a/old_docs/API_docs_v71/methods/messages_reportEncryptedSpam.md +++ b/old_docs/API_docs_v71/methods/messages_reportEncryptedSpam.md @@ -30,13 +30,10 @@ description: messages.reportEncryptedSpam parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v71/methods/messages_reportSpam.md b/old_docs/API_docs_v71/methods/messages_reportSpam.md index bfadb9ab..08c96d44 100644 --- a/old_docs/API_docs_v71/methods/messages_reportSpam.md +++ b/old_docs/API_docs_v71/methods/messages_reportSpam.md @@ -30,13 +30,10 @@ description: messages.reportSpam parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v71/methods/messages_saveDraft.md b/old_docs/API_docs_v71/methods/messages_saveDraft.md index 42308b46..f68090c0 100644 --- a/old_docs/API_docs_v71/methods/messages_saveDraft.md +++ b/old_docs/API_docs_v71/methods/messages_saveDraft.md @@ -35,13 +35,10 @@ description: messages.saveDraft parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v71/methods/messages_saveGif.md b/old_docs/API_docs_v71/methods/messages_saveGif.md index 31e48632..d86d539a 100644 --- a/old_docs/API_docs_v71/methods/messages_saveGif.md +++ b/old_docs/API_docs_v71/methods/messages_saveGif.md @@ -31,13 +31,10 @@ description: messages.saveGif parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v71/methods/messages_saveRecentSticker.md b/old_docs/API_docs_v71/methods/messages_saveRecentSticker.md index 8d45be5e..029ca763 100644 --- a/old_docs/API_docs_v71/methods/messages_saveRecentSticker.md +++ b/old_docs/API_docs_v71/methods/messages_saveRecentSticker.md @@ -32,13 +32,10 @@ description: messages.saveRecentSticker parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v71/methods/messages_search.md b/old_docs/API_docs_v71/methods/messages_search.md index 14b02f8f..f3be635d 100644 --- a/old_docs/API_docs_v71/methods/messages_search.md +++ b/old_docs/API_docs_v71/methods/messages_search.md @@ -46,13 +46,10 @@ description: messages.search parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v71/methods/messages_searchGifs.md b/old_docs/API_docs_v71/methods/messages_searchGifs.md index 3f4c4838..dd804c99 100644 --- a/old_docs/API_docs_v71/methods/messages_searchGifs.md +++ b/old_docs/API_docs_v71/methods/messages_searchGifs.md @@ -31,13 +31,10 @@ description: messages.searchGifs parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v71/methods/messages_searchGlobal.md b/old_docs/API_docs_v71/methods/messages_searchGlobal.md index 0553dd7a..4b45eed2 100644 --- a/old_docs/API_docs_v71/methods/messages_searchGlobal.md +++ b/old_docs/API_docs_v71/methods/messages_searchGlobal.md @@ -34,13 +34,10 @@ description: messages.searchGlobal parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v71/methods/messages_sendEncrypted.md b/old_docs/API_docs_v71/methods/messages_sendEncrypted.md index 82eeec92..ba9f796b 100644 --- a/old_docs/API_docs_v71/methods/messages_sendEncrypted.md +++ b/old_docs/API_docs_v71/methods/messages_sendEncrypted.md @@ -34,16 +34,13 @@ description: messages.sendEncrypted parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v71/methods/messages_sendEncryptedFile.md b/old_docs/API_docs_v71/methods/messages_sendEncryptedFile.md index 8f7a73d9..db16bf2d 100644 --- a/old_docs/API_docs_v71/methods/messages_sendEncryptedFile.md +++ b/old_docs/API_docs_v71/methods/messages_sendEncryptedFile.md @@ -32,16 +32,13 @@ description: messages.sendEncryptedFile parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v71/methods/messages_sendEncryptedService.md b/old_docs/API_docs_v71/methods/messages_sendEncryptedService.md index d427f6c3..fd4e2627 100644 --- a/old_docs/API_docs_v71/methods/messages_sendEncryptedService.md +++ b/old_docs/API_docs_v71/methods/messages_sendEncryptedService.md @@ -34,16 +34,13 @@ description: messages.sendEncryptedService parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v71/methods/messages_sendInlineBotResult.md b/old_docs/API_docs_v71/methods/messages_sendInlineBotResult.md index 6aeeb67d..d974fe69 100644 --- a/old_docs/API_docs_v71/methods/messages_sendInlineBotResult.md +++ b/old_docs/API_docs_v71/methods/messages_sendInlineBotResult.md @@ -39,13 +39,10 @@ description: messages.sendInlineBotResult parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v71/methods/messages_sendMedia.md b/old_docs/API_docs_v71/methods/messages_sendMedia.md index b3ceb5d4..b58bf325 100644 --- a/old_docs/API_docs_v71/methods/messages_sendMedia.md +++ b/old_docs/API_docs_v71/methods/messages_sendMedia.md @@ -59,16 +59,13 @@ description: messages.sendMedia parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v71/methods/messages_sendMessage.md b/old_docs/API_docs_v71/methods/messages_sendMessage.md index 60b50412..3a515129 100644 --- a/old_docs/API_docs_v71/methods/messages_sendMessage.md +++ b/old_docs/API_docs_v71/methods/messages_sendMessage.md @@ -58,16 +58,13 @@ description: messages.sendMessage parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v71/methods/messages_sendScreenshotNotification.md b/old_docs/API_docs_v71/methods/messages_sendScreenshotNotification.md index a725a12b..890224e8 100644 --- a/old_docs/API_docs_v71/methods/messages_sendScreenshotNotification.md +++ b/old_docs/API_docs_v71/methods/messages_sendScreenshotNotification.md @@ -31,13 +31,10 @@ description: messages.sendScreenshotNotification parameters, return type and exa ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v71/methods/messages_setBotCallbackAnswer.md b/old_docs/API_docs_v71/methods/messages_setBotCallbackAnswer.md index 2c51854f..2901a558 100644 --- a/old_docs/API_docs_v71/methods/messages_setBotCallbackAnswer.md +++ b/old_docs/API_docs_v71/methods/messages_setBotCallbackAnswer.md @@ -34,16 +34,13 @@ description: messages.setBotCallbackAnswer parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v71/methods/messages_setBotPrecheckoutResults.md b/old_docs/API_docs_v71/methods/messages_setBotPrecheckoutResults.md index 25ed5ed5..5666e9ff 100644 --- a/old_docs/API_docs_v71/methods/messages_setBotPrecheckoutResults.md +++ b/old_docs/API_docs_v71/methods/messages_setBotPrecheckoutResults.md @@ -32,16 +32,13 @@ description: messages.setBotPrecheckoutResults parameters, return type and examp ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v71/methods/messages_setBotShippingResults.md b/old_docs/API_docs_v71/methods/messages_setBotShippingResults.md index 49ac2896..95376b64 100644 --- a/old_docs/API_docs_v71/methods/messages_setBotShippingResults.md +++ b/old_docs/API_docs_v71/methods/messages_setBotShippingResults.md @@ -32,16 +32,13 @@ description: messages.setBotShippingResults parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v71/methods/messages_setEncryptedTyping.md b/old_docs/API_docs_v71/methods/messages_setEncryptedTyping.md index a05b94dd..aeae6ff7 100644 --- a/old_docs/API_docs_v71/methods/messages_setEncryptedTyping.md +++ b/old_docs/API_docs_v71/methods/messages_setEncryptedTyping.md @@ -31,13 +31,10 @@ description: messages.setEncryptedTyping parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v71/methods/messages_setGameScore.md b/old_docs/API_docs_v71/methods/messages_setGameScore.md index 3137f7c9..c8ef5c49 100644 --- a/old_docs/API_docs_v71/methods/messages_setGameScore.md +++ b/old_docs/API_docs_v71/methods/messages_setGameScore.md @@ -36,16 +36,13 @@ description: messages.setGameScore parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v71/methods/messages_setInlineBotResults.md b/old_docs/API_docs_v71/methods/messages_setInlineBotResults.md index 8b5625f3..8b49c4c7 100644 --- a/old_docs/API_docs_v71/methods/messages_setInlineBotResults.md +++ b/old_docs/API_docs_v71/methods/messages_setInlineBotResults.md @@ -46,16 +46,13 @@ description: messages.setInlineBotResults parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v71/methods/messages_setInlineGameScore.md b/old_docs/API_docs_v71/methods/messages_setInlineGameScore.md index 36752f35..4c43e7d2 100644 --- a/old_docs/API_docs_v71/methods/messages_setInlineGameScore.md +++ b/old_docs/API_docs_v71/methods/messages_setInlineGameScore.md @@ -35,16 +35,13 @@ description: messages.setInlineGameScore parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v71/methods/messages_setTyping.md b/old_docs/API_docs_v71/methods/messages_setTyping.md index 9ef8caf5..f6b7b7b5 100644 --- a/old_docs/API_docs_v71/methods/messages_setTyping.md +++ b/old_docs/API_docs_v71/methods/messages_setTyping.md @@ -37,16 +37,13 @@ description: messages.setTyping parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v71/methods/messages_startBot.md b/old_docs/API_docs_v71/methods/messages_startBot.md index 8d98e390..b33ab013 100644 --- a/old_docs/API_docs_v71/methods/messages_startBot.md +++ b/old_docs/API_docs_v71/methods/messages_startBot.md @@ -35,13 +35,10 @@ description: messages.startBot parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v71/methods/messages_toggleChatAdmins.md b/old_docs/API_docs_v71/methods/messages_toggleChatAdmins.md index 3bf8a419..97328065 100644 --- a/old_docs/API_docs_v71/methods/messages_toggleChatAdmins.md +++ b/old_docs/API_docs_v71/methods/messages_toggleChatAdmins.md @@ -32,13 +32,10 @@ description: messages.toggleChatAdmins parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v71/methods/messages_toggleDialogPin.md b/old_docs/API_docs_v71/methods/messages_toggleDialogPin.md index f35f2f40..7853df5e 100644 --- a/old_docs/API_docs_v71/methods/messages_toggleDialogPin.md +++ b/old_docs/API_docs_v71/methods/messages_toggleDialogPin.md @@ -31,13 +31,10 @@ description: messages.toggleDialogPin parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v71/methods/messages_uninstallStickerSet.md b/old_docs/API_docs_v71/methods/messages_uninstallStickerSet.md index 6763e64f..76a3e3e2 100644 --- a/old_docs/API_docs_v71/methods/messages_uninstallStickerSet.md +++ b/old_docs/API_docs_v71/methods/messages_uninstallStickerSet.md @@ -30,13 +30,10 @@ description: messages.uninstallStickerSet parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v71/methods/messages_uploadMedia.md b/old_docs/API_docs_v71/methods/messages_uploadMedia.md index 03f07c26..d4b5ee7d 100644 --- a/old_docs/API_docs_v71/methods/messages_uploadMedia.md +++ b/old_docs/API_docs_v71/methods/messages_uploadMedia.md @@ -33,16 +33,13 @@ description: messages.uploadMedia parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v71/methods/payments_clearSavedInfo.md b/old_docs/API_docs_v71/methods/payments_clearSavedInfo.md index a77c50d9..fb9bae07 100644 --- a/old_docs/API_docs_v71/methods/payments_clearSavedInfo.md +++ b/old_docs/API_docs_v71/methods/payments_clearSavedInfo.md @@ -24,13 +24,10 @@ description: payments.clearSavedInfo parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v71/methods/payments_getPaymentForm.md b/old_docs/API_docs_v71/methods/payments_getPaymentForm.md index 15f6e26b..141c47f2 100644 --- a/old_docs/API_docs_v71/methods/payments_getPaymentForm.md +++ b/old_docs/API_docs_v71/methods/payments_getPaymentForm.md @@ -30,13 +30,10 @@ description: payments.getPaymentForm parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v71/methods/payments_getPaymentReceipt.md b/old_docs/API_docs_v71/methods/payments_getPaymentReceipt.md index 51433563..f6aa1ab6 100644 --- a/old_docs/API_docs_v71/methods/payments_getPaymentReceipt.md +++ b/old_docs/API_docs_v71/methods/payments_getPaymentReceipt.md @@ -30,13 +30,10 @@ description: payments.getPaymentReceipt parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v71/methods/payments_getSavedInfo.md b/old_docs/API_docs_v71/methods/payments_getSavedInfo.md index a586dcd9..4104679a 100644 --- a/old_docs/API_docs_v71/methods/payments_getSavedInfo.md +++ b/old_docs/API_docs_v71/methods/payments_getSavedInfo.md @@ -18,13 +18,10 @@ description: payments.getSavedInfo parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v71/methods/payments_sendPaymentForm.md b/old_docs/API_docs_v71/methods/payments_sendPaymentForm.md index a63a3980..180a7279 100644 --- a/old_docs/API_docs_v71/methods/payments_sendPaymentForm.md +++ b/old_docs/API_docs_v71/methods/payments_sendPaymentForm.md @@ -33,13 +33,10 @@ description: payments.sendPaymentForm parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v71/methods/payments_validateRequestedInfo.md b/old_docs/API_docs_v71/methods/payments_validateRequestedInfo.md index d839a2df..acfd1852 100644 --- a/old_docs/API_docs_v71/methods/payments_validateRequestedInfo.md +++ b/old_docs/API_docs_v71/methods/payments_validateRequestedInfo.md @@ -32,13 +32,10 @@ description: payments.validateRequestedInfo parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v71/methods/phone_getCallConfig.md b/old_docs/API_docs_v71/methods/phone_getCallConfig.md index a85fed0e..3f18d7ca 100644 --- a/old_docs/API_docs_v71/methods/phone_getCallConfig.md +++ b/old_docs/API_docs_v71/methods/phone_getCallConfig.md @@ -18,13 +18,10 @@ description: phone.getCallConfig parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v71/methods/phone_receivedCall.md b/old_docs/API_docs_v71/methods/phone_receivedCall.md index 9d59b1ea..8ca6a4e1 100644 --- a/old_docs/API_docs_v71/methods/phone_receivedCall.md +++ b/old_docs/API_docs_v71/methods/phone_receivedCall.md @@ -31,13 +31,10 @@ description: phone.receivedCall parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v71/methods/phone_saveCallDebug.md b/old_docs/API_docs_v71/methods/phone_saveCallDebug.md index 4dee5c97..ea3fa2d7 100644 --- a/old_docs/API_docs_v71/methods/phone_saveCallDebug.md +++ b/old_docs/API_docs_v71/methods/phone_saveCallDebug.md @@ -32,13 +32,10 @@ description: phone.saveCallDebug parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v71/methods/phone_setCallRating.md b/old_docs/API_docs_v71/methods/phone_setCallRating.md index fea236d1..c6e5d7fa 100644 --- a/old_docs/API_docs_v71/methods/phone_setCallRating.md +++ b/old_docs/API_docs_v71/methods/phone_setCallRating.md @@ -32,13 +32,10 @@ description: phone.setCallRating parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v71/methods/photos_deletePhotos.md b/old_docs/API_docs_v71/methods/photos_deletePhotos.md index e9cd459d..61768b1e 100644 --- a/old_docs/API_docs_v71/methods/photos_deletePhotos.md +++ b/old_docs/API_docs_v71/methods/photos_deletePhotos.md @@ -23,13 +23,10 @@ description: photos.deletePhotos parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v71/methods/photos_getUserPhotos.md b/old_docs/API_docs_v71/methods/photos_getUserPhotos.md index d6c2a380..095363e7 100644 --- a/old_docs/API_docs_v71/methods/photos_getUserPhotos.md +++ b/old_docs/API_docs_v71/methods/photos_getUserPhotos.md @@ -34,16 +34,13 @@ description: photos.getUserPhotos parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v71/methods/photos_updateProfilePhoto.md b/old_docs/API_docs_v71/methods/photos_updateProfilePhoto.md index ea3b78ec..d90aca22 100644 --- a/old_docs/API_docs_v71/methods/photos_updateProfilePhoto.md +++ b/old_docs/API_docs_v71/methods/photos_updateProfilePhoto.md @@ -23,13 +23,10 @@ description: photos.updateProfilePhoto parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v71/methods/photos_uploadProfilePhoto.md b/old_docs/API_docs_v71/methods/photos_uploadProfilePhoto.md index 58541f23..987e721c 100644 --- a/old_docs/API_docs_v71/methods/photos_uploadProfilePhoto.md +++ b/old_docs/API_docs_v71/methods/photos_uploadProfilePhoto.md @@ -34,13 +34,10 @@ description: photos.uploadProfilePhoto parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v71/methods/ping.md b/old_docs/API_docs_v71/methods/ping.md index 5bfe9dde..7c20ca86 100644 --- a/old_docs/API_docs_v71/methods/ping.md +++ b/old_docs/API_docs_v71/methods/ping.md @@ -23,16 +23,13 @@ description: ping parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v71/methods/ping_delay_disconnect.md b/old_docs/API_docs_v71/methods/ping_delay_disconnect.md index b4b1e265..e8b62005 100644 --- a/old_docs/API_docs_v71/methods/ping_delay_disconnect.md +++ b/old_docs/API_docs_v71/methods/ping_delay_disconnect.md @@ -24,16 +24,13 @@ description: ping_delay_disconnect parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v71/methods/req_DH_params.md b/old_docs/API_docs_v71/methods/req_DH_params.md index 51632fe0..697540d8 100644 --- a/old_docs/API_docs_v71/methods/req_DH_params.md +++ b/old_docs/API_docs_v71/methods/req_DH_params.md @@ -28,16 +28,13 @@ description: req_DH_params parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v71/methods/req_pq.md b/old_docs/API_docs_v71/methods/req_pq.md index 2f005ce2..7a583643 100644 --- a/old_docs/API_docs_v71/methods/req_pq.md +++ b/old_docs/API_docs_v71/methods/req_pq.md @@ -23,16 +23,13 @@ description: req_pq parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v71/methods/rpc_drop_answer.md b/old_docs/API_docs_v71/methods/rpc_drop_answer.md index 48e894a9..e15ddca9 100644 --- a/old_docs/API_docs_v71/methods/rpc_drop_answer.md +++ b/old_docs/API_docs_v71/methods/rpc_drop_answer.md @@ -23,16 +23,13 @@ description: rpc_drop_answer parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v71/methods/set_client_DH_params.md b/old_docs/API_docs_v71/methods/set_client_DH_params.md index 25f0f387..8721ed40 100644 --- a/old_docs/API_docs_v71/methods/set_client_DH_params.md +++ b/old_docs/API_docs_v71/methods/set_client_DH_params.md @@ -25,16 +25,13 @@ description: set_client_DH_params parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v71/methods/stickers_addStickerToSet.md b/old_docs/API_docs_v71/methods/stickers_addStickerToSet.md index bf62fa09..581eb1f1 100644 --- a/old_docs/API_docs_v71/methods/stickers_addStickerToSet.md +++ b/old_docs/API_docs_v71/methods/stickers_addStickerToSet.md @@ -32,16 +32,13 @@ description: stickers.addStickerToSet parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v71/methods/stickers_changeStickerPosition.md b/old_docs/API_docs_v71/methods/stickers_changeStickerPosition.md index 942d3a33..391ee3d3 100644 --- a/old_docs/API_docs_v71/methods/stickers_changeStickerPosition.md +++ b/old_docs/API_docs_v71/methods/stickers_changeStickerPosition.md @@ -32,16 +32,13 @@ description: stickers.changeStickerPosition parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v71/methods/stickers_createStickerSet.md b/old_docs/API_docs_v71/methods/stickers_createStickerSet.md index 7c5b6821..64a5a978 100644 --- a/old_docs/API_docs_v71/methods/stickers_createStickerSet.md +++ b/old_docs/API_docs_v71/methods/stickers_createStickerSet.md @@ -42,16 +42,13 @@ description: stickers.createStickerSet parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v71/methods/stickers_removeStickerFromSet.md b/old_docs/API_docs_v71/methods/stickers_removeStickerFromSet.md index 51e52f95..68c2305f 100644 --- a/old_docs/API_docs_v71/methods/stickers_removeStickerFromSet.md +++ b/old_docs/API_docs_v71/methods/stickers_removeStickerFromSet.md @@ -31,16 +31,13 @@ description: stickers.removeStickerFromSet parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v71/methods/upload_getWebFile.md b/old_docs/API_docs_v71/methods/upload_getWebFile.md index ec7c05b4..8744dac5 100644 --- a/old_docs/API_docs_v71/methods/upload_getWebFile.md +++ b/old_docs/API_docs_v71/methods/upload_getWebFile.md @@ -32,13 +32,10 @@ description: upload.getWebFile parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v71/methods/users_getUsers.md b/old_docs/API_docs_v71/methods/users_getUsers.md index 6a44d258..3a981d57 100644 --- a/old_docs/API_docs_v71/methods/users_getUsers.md +++ b/old_docs/API_docs_v71/methods/users_getUsers.md @@ -33,16 +33,13 @@ description: users.getUsers parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v72/methods/account_changePhone.md b/old_docs/API_docs_v72/methods/account_changePhone.md index 5d1801d0..e47ef6a7 100644 --- a/old_docs/API_docs_v72/methods/account_changePhone.md +++ b/old_docs/API_docs_v72/methods/account_changePhone.md @@ -32,13 +32,10 @@ description: account.changePhone parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v72/methods/account_checkUsername.md b/old_docs/API_docs_v72/methods/account_checkUsername.md index afc59b6c..40cf822f 100644 --- a/old_docs/API_docs_v72/methods/account_checkUsername.md +++ b/old_docs/API_docs_v72/methods/account_checkUsername.md @@ -30,13 +30,10 @@ description: account.checkUsername parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v72/methods/account_confirmPhone.md b/old_docs/API_docs_v72/methods/account_confirmPhone.md index 0d2dc5c6..8dd79d94 100644 --- a/old_docs/API_docs_v72/methods/account_confirmPhone.md +++ b/old_docs/API_docs_v72/methods/account_confirmPhone.md @@ -32,13 +32,10 @@ description: account.confirmPhone parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v72/methods/account_deleteAccount.md b/old_docs/API_docs_v72/methods/account_deleteAccount.md index 5abcd0ec..6f1bbda9 100644 --- a/old_docs/API_docs_v72/methods/account_deleteAccount.md +++ b/old_docs/API_docs_v72/methods/account_deleteAccount.md @@ -23,13 +23,10 @@ description: account.deleteAccount parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v72/methods/account_getAccountTTL.md b/old_docs/API_docs_v72/methods/account_getAccountTTL.md index 3520fbef..538b1d7a 100644 --- a/old_docs/API_docs_v72/methods/account_getAccountTTL.md +++ b/old_docs/API_docs_v72/methods/account_getAccountTTL.md @@ -18,13 +18,10 @@ description: account.getAccountTTL parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v72/methods/account_getAuthorizations.md b/old_docs/API_docs_v72/methods/account_getAuthorizations.md index 91bbce5e..f138d517 100644 --- a/old_docs/API_docs_v72/methods/account_getAuthorizations.md +++ b/old_docs/API_docs_v72/methods/account_getAuthorizations.md @@ -18,13 +18,10 @@ description: account.getAuthorizations parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v72/methods/account_getNotifySettings.md b/old_docs/API_docs_v72/methods/account_getNotifySettings.md index 8ee710d8..a48eed2f 100644 --- a/old_docs/API_docs_v72/methods/account_getNotifySettings.md +++ b/old_docs/API_docs_v72/methods/account_getNotifySettings.md @@ -30,13 +30,10 @@ description: account.getNotifySettings parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v72/methods/account_getPassword.md b/old_docs/API_docs_v72/methods/account_getPassword.md index 4d9fd015..1abf6174 100644 --- a/old_docs/API_docs_v72/methods/account_getPassword.md +++ b/old_docs/API_docs_v72/methods/account_getPassword.md @@ -18,13 +18,10 @@ description: account.getPassword parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v72/methods/account_getPasswordSettings.md b/old_docs/API_docs_v72/methods/account_getPasswordSettings.md index 02cb77f7..aec5b989 100644 --- a/old_docs/API_docs_v72/methods/account_getPasswordSettings.md +++ b/old_docs/API_docs_v72/methods/account_getPasswordSettings.md @@ -30,13 +30,10 @@ description: account.getPasswordSettings parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v72/methods/account_getPrivacy.md b/old_docs/API_docs_v72/methods/account_getPrivacy.md index 52786b79..8bbe9795 100644 --- a/old_docs/API_docs_v72/methods/account_getPrivacy.md +++ b/old_docs/API_docs_v72/methods/account_getPrivacy.md @@ -30,13 +30,10 @@ description: account.getPrivacy parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v72/methods/account_getTmpPassword.md b/old_docs/API_docs_v72/methods/account_getTmpPassword.md index 83ab09b1..d9bd30d8 100644 --- a/old_docs/API_docs_v72/methods/account_getTmpPassword.md +++ b/old_docs/API_docs_v72/methods/account_getTmpPassword.md @@ -32,13 +32,10 @@ description: account.getTmpPassword parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v72/methods/account_getWallPapers.md b/old_docs/API_docs_v72/methods/account_getWallPapers.md index 88c8a701..a71543d0 100644 --- a/old_docs/API_docs_v72/methods/account_getWallPapers.md +++ b/old_docs/API_docs_v72/methods/account_getWallPapers.md @@ -18,13 +18,10 @@ description: account.getWallPapers parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v72/methods/account_registerDevice.md b/old_docs/API_docs_v72/methods/account_registerDevice.md index 3cc7f98d..8be04ad2 100644 --- a/old_docs/API_docs_v72/methods/account_registerDevice.md +++ b/old_docs/API_docs_v72/methods/account_registerDevice.md @@ -31,13 +31,10 @@ description: account.registerDevice parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v72/methods/account_reportPeer.md b/old_docs/API_docs_v72/methods/account_reportPeer.md index 1545c3b8..1ae9f4d4 100644 --- a/old_docs/API_docs_v72/methods/account_reportPeer.md +++ b/old_docs/API_docs_v72/methods/account_reportPeer.md @@ -31,13 +31,10 @@ description: account.reportPeer parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v72/methods/account_resetAuthorization.md b/old_docs/API_docs_v72/methods/account_resetAuthorization.md index e44334f2..0438cba3 100644 --- a/old_docs/API_docs_v72/methods/account_resetAuthorization.md +++ b/old_docs/API_docs_v72/methods/account_resetAuthorization.md @@ -30,13 +30,10 @@ description: account.resetAuthorization parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v72/methods/account_resetNotifySettings.md b/old_docs/API_docs_v72/methods/account_resetNotifySettings.md index 155ede68..92db4f4f 100644 --- a/old_docs/API_docs_v72/methods/account_resetNotifySettings.md +++ b/old_docs/API_docs_v72/methods/account_resetNotifySettings.md @@ -18,13 +18,10 @@ description: account.resetNotifySettings parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v72/methods/account_sendChangePhoneCode.md b/old_docs/API_docs_v72/methods/account_sendChangePhoneCode.md index 4be218f2..017b5f7f 100644 --- a/old_docs/API_docs_v72/methods/account_sendChangePhoneCode.md +++ b/old_docs/API_docs_v72/methods/account_sendChangePhoneCode.md @@ -32,13 +32,10 @@ description: account.sendChangePhoneCode parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v72/methods/account_sendConfirmPhoneCode.md b/old_docs/API_docs_v72/methods/account_sendConfirmPhoneCode.md index 009fcb09..3665bd50 100644 --- a/old_docs/API_docs_v72/methods/account_sendConfirmPhoneCode.md +++ b/old_docs/API_docs_v72/methods/account_sendConfirmPhoneCode.md @@ -32,13 +32,10 @@ description: account.sendConfirmPhoneCode parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v72/methods/account_setAccountTTL.md b/old_docs/API_docs_v72/methods/account_setAccountTTL.md index f06eb676..d08f59fb 100644 --- a/old_docs/API_docs_v72/methods/account_setAccountTTL.md +++ b/old_docs/API_docs_v72/methods/account_setAccountTTL.md @@ -30,13 +30,10 @@ description: account.setAccountTTL parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v72/methods/account_setPrivacy.md b/old_docs/API_docs_v72/methods/account_setPrivacy.md index 56aebbcc..401aa71c 100644 --- a/old_docs/API_docs_v72/methods/account_setPrivacy.md +++ b/old_docs/API_docs_v72/methods/account_setPrivacy.md @@ -31,13 +31,10 @@ description: account.setPrivacy parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v72/methods/account_unregisterDevice.md b/old_docs/API_docs_v72/methods/account_unregisterDevice.md index 41899b6e..283ec7d2 100644 --- a/old_docs/API_docs_v72/methods/account_unregisterDevice.md +++ b/old_docs/API_docs_v72/methods/account_unregisterDevice.md @@ -31,13 +31,10 @@ description: account.unregisterDevice parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v72/methods/account_updateDeviceLocked.md b/old_docs/API_docs_v72/methods/account_updateDeviceLocked.md index 37aeb59d..ae6125a5 100644 --- a/old_docs/API_docs_v72/methods/account_updateDeviceLocked.md +++ b/old_docs/API_docs_v72/methods/account_updateDeviceLocked.md @@ -23,13 +23,10 @@ description: account.updateDeviceLocked parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v72/methods/account_updateNotifySettings.md b/old_docs/API_docs_v72/methods/account_updateNotifySettings.md index 8389b5c2..fb096250 100644 --- a/old_docs/API_docs_v72/methods/account_updateNotifySettings.md +++ b/old_docs/API_docs_v72/methods/account_updateNotifySettings.md @@ -31,13 +31,10 @@ description: account.updateNotifySettings parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v72/methods/account_updatePasswordSettings.md b/old_docs/API_docs_v72/methods/account_updatePasswordSettings.md index b7c8da4b..ffa8dcd9 100644 --- a/old_docs/API_docs_v72/methods/account_updatePasswordSettings.md +++ b/old_docs/API_docs_v72/methods/account_updatePasswordSettings.md @@ -34,13 +34,10 @@ description: account.updatePasswordSettings parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v72/methods/account_updateProfile.md b/old_docs/API_docs_v72/methods/account_updateProfile.md index a50eaea5..b3d468d1 100644 --- a/old_docs/API_docs_v72/methods/account_updateProfile.md +++ b/old_docs/API_docs_v72/methods/account_updateProfile.md @@ -33,13 +33,10 @@ description: account.updateProfile parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v72/methods/account_updateStatus.md b/old_docs/API_docs_v72/methods/account_updateStatus.md index 7204e582..c8fa0a79 100644 --- a/old_docs/API_docs_v72/methods/account_updateStatus.md +++ b/old_docs/API_docs_v72/methods/account_updateStatus.md @@ -30,13 +30,10 @@ description: account.updateStatus parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v72/methods/account_updateUsername.md b/old_docs/API_docs_v72/methods/account_updateUsername.md index 22be2fd4..2b7576a5 100644 --- a/old_docs/API_docs_v72/methods/account_updateUsername.md +++ b/old_docs/API_docs_v72/methods/account_updateUsername.md @@ -32,13 +32,10 @@ description: account.updateUsername parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v72/methods/auth_bindTempAuthKey.md b/old_docs/API_docs_v72/methods/auth_bindTempAuthKey.md index e3d72dd5..7419abb0 100644 --- a/old_docs/API_docs_v72/methods/auth_bindTempAuthKey.md +++ b/old_docs/API_docs_v72/methods/auth_bindTempAuthKey.md @@ -35,16 +35,13 @@ description: auth.bindTempAuthKey parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v72/methods/auth_cancelCode.md b/old_docs/API_docs_v72/methods/auth_cancelCode.md index dc390329..05d927a1 100644 --- a/old_docs/API_docs_v72/methods/auth_cancelCode.md +++ b/old_docs/API_docs_v72/methods/auth_cancelCode.md @@ -31,13 +31,10 @@ description: auth.cancelCode parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v72/methods/auth_checkPassword.md b/old_docs/API_docs_v72/methods/auth_checkPassword.md index d5559186..6b6b21cc 100644 --- a/old_docs/API_docs_v72/methods/auth_checkPassword.md +++ b/old_docs/API_docs_v72/methods/auth_checkPassword.md @@ -30,13 +30,10 @@ description: auth.checkPassword parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v72/methods/auth_checkPhone.md b/old_docs/API_docs_v72/methods/auth_checkPhone.md index 3455904d..f6cac2e6 100644 --- a/old_docs/API_docs_v72/methods/auth_checkPhone.md +++ b/old_docs/API_docs_v72/methods/auth_checkPhone.md @@ -32,13 +32,10 @@ description: auth.checkPhone parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v72/methods/auth_dropTempAuthKeys.md b/old_docs/API_docs_v72/methods/auth_dropTempAuthKeys.md index aba76766..fedb7bf4 100644 --- a/old_docs/API_docs_v72/methods/auth_dropTempAuthKeys.md +++ b/old_docs/API_docs_v72/methods/auth_dropTempAuthKeys.md @@ -23,16 +23,13 @@ description: auth.dropTempAuthKeys parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v72/methods/auth_exportAuthorization.md b/old_docs/API_docs_v72/methods/auth_exportAuthorization.md index 44c45b70..cbc8203b 100644 --- a/old_docs/API_docs_v72/methods/auth_exportAuthorization.md +++ b/old_docs/API_docs_v72/methods/auth_exportAuthorization.md @@ -30,16 +30,13 @@ description: auth.exportAuthorization parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v72/methods/auth_importAuthorization.md b/old_docs/API_docs_v72/methods/auth_importAuthorization.md index e0fd534f..22166510 100644 --- a/old_docs/API_docs_v72/methods/auth_importAuthorization.md +++ b/old_docs/API_docs_v72/methods/auth_importAuthorization.md @@ -32,16 +32,13 @@ description: auth.importAuthorization parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v72/methods/auth_recoverPassword.md b/old_docs/API_docs_v72/methods/auth_recoverPassword.md index c2ce3fed..931e99fd 100644 --- a/old_docs/API_docs_v72/methods/auth_recoverPassword.md +++ b/old_docs/API_docs_v72/methods/auth_recoverPassword.md @@ -30,13 +30,10 @@ description: auth.recoverPassword parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v72/methods/auth_requestPasswordRecovery.md b/old_docs/API_docs_v72/methods/auth_requestPasswordRecovery.md index 101b1cf7..c6babcd9 100644 --- a/old_docs/API_docs_v72/methods/auth_requestPasswordRecovery.md +++ b/old_docs/API_docs_v72/methods/auth_requestPasswordRecovery.md @@ -25,13 +25,10 @@ description: auth.requestPasswordRecovery parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v72/methods/auth_resendCode.md b/old_docs/API_docs_v72/methods/auth_resendCode.md index 14d08ddd..df4803b8 100644 --- a/old_docs/API_docs_v72/methods/auth_resendCode.md +++ b/old_docs/API_docs_v72/methods/auth_resendCode.md @@ -31,13 +31,10 @@ description: auth.resendCode parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v72/methods/auth_resetAuthorizations.md b/old_docs/API_docs_v72/methods/auth_resetAuthorizations.md index 87a39a22..fe297fa7 100644 --- a/old_docs/API_docs_v72/methods/auth_resetAuthorizations.md +++ b/old_docs/API_docs_v72/methods/auth_resetAuthorizations.md @@ -25,13 +25,10 @@ description: auth.resetAuthorizations parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v72/methods/auth_sendInvites.md b/old_docs/API_docs_v72/methods/auth_sendInvites.md index 604fc65d..ad9636c5 100644 --- a/old_docs/API_docs_v72/methods/auth_sendInvites.md +++ b/old_docs/API_docs_v72/methods/auth_sendInvites.md @@ -31,13 +31,10 @@ description: auth.sendInvites parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v72/methods/bots_answerWebhookJSONQuery.md b/old_docs/API_docs_v72/methods/bots_answerWebhookJSONQuery.md index ae1efce3..d910db35 100644 --- a/old_docs/API_docs_v72/methods/bots_answerWebhookJSONQuery.md +++ b/old_docs/API_docs_v72/methods/bots_answerWebhookJSONQuery.md @@ -32,16 +32,13 @@ description: bots.answerWebhookJSONQuery parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v72/methods/bots_sendCustomRequest.md b/old_docs/API_docs_v72/methods/bots_sendCustomRequest.md index 927f18c5..abb880ef 100644 --- a/old_docs/API_docs_v72/methods/bots_sendCustomRequest.md +++ b/old_docs/API_docs_v72/methods/bots_sendCustomRequest.md @@ -31,16 +31,13 @@ description: bots.sendCustomRequest parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v72/methods/channels_checkUsername.md b/old_docs/API_docs_v72/methods/channels_checkUsername.md index d6ea876d..e29ee107 100644 --- a/old_docs/API_docs_v72/methods/channels_checkUsername.md +++ b/old_docs/API_docs_v72/methods/channels_checkUsername.md @@ -33,13 +33,10 @@ description: channels.checkUsername parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v72/methods/channels_createChannel.md b/old_docs/API_docs_v72/methods/channels_createChannel.md index 9ba02e9e..58808b73 100644 --- a/old_docs/API_docs_v72/methods/channels_createChannel.md +++ b/old_docs/API_docs_v72/methods/channels_createChannel.md @@ -34,13 +34,10 @@ description: channels.createChannel parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v72/methods/channels_deleteChannel.md b/old_docs/API_docs_v72/methods/channels_deleteChannel.md index 912ab080..532f3c6c 100644 --- a/old_docs/API_docs_v72/methods/channels_deleteChannel.md +++ b/old_docs/API_docs_v72/methods/channels_deleteChannel.md @@ -31,13 +31,10 @@ description: channels.deleteChannel parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v72/methods/channels_deleteHistory.md b/old_docs/API_docs_v72/methods/channels_deleteHistory.md index d44d0a13..fac2e305 100644 --- a/old_docs/API_docs_v72/methods/channels_deleteHistory.md +++ b/old_docs/API_docs_v72/methods/channels_deleteHistory.md @@ -24,16 +24,13 @@ description: channels.deleteHistory parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v72/methods/channels_deleteMessages.md b/old_docs/API_docs_v72/methods/channels_deleteMessages.md index b3481294..a42a47a5 100644 --- a/old_docs/API_docs_v72/methods/channels_deleteMessages.md +++ b/old_docs/API_docs_v72/methods/channels_deleteMessages.md @@ -33,16 +33,13 @@ description: channels.deleteMessages parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v72/methods/channels_deleteUserHistory.md b/old_docs/API_docs_v72/methods/channels_deleteUserHistory.md index 66843269..73494485 100644 --- a/old_docs/API_docs_v72/methods/channels_deleteUserHistory.md +++ b/old_docs/API_docs_v72/methods/channels_deleteUserHistory.md @@ -32,13 +32,10 @@ description: channels.deleteUserHistory parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v72/methods/channels_editAbout.md b/old_docs/API_docs_v72/methods/channels_editAbout.md index 4c759a8a..1c3ce933 100644 --- a/old_docs/API_docs_v72/methods/channels_editAbout.md +++ b/old_docs/API_docs_v72/methods/channels_editAbout.md @@ -34,16 +34,13 @@ description: channels.editAbout parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v72/methods/channels_editAdmin.md b/old_docs/API_docs_v72/methods/channels_editAdmin.md index e68ba7ea..c6f5454c 100644 --- a/old_docs/API_docs_v72/methods/channels_editAdmin.md +++ b/old_docs/API_docs_v72/methods/channels_editAdmin.md @@ -41,16 +41,13 @@ description: channels.editAdmin parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v72/methods/channels_editBanned.md b/old_docs/API_docs_v72/methods/channels_editBanned.md index 7fb904b9..02ed04bf 100644 --- a/old_docs/API_docs_v72/methods/channels_editBanned.md +++ b/old_docs/API_docs_v72/methods/channels_editBanned.md @@ -36,16 +36,13 @@ description: channels.editBanned parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v72/methods/channels_editPhoto.md b/old_docs/API_docs_v72/methods/channels_editPhoto.md index 99873537..4a4aeb03 100644 --- a/old_docs/API_docs_v72/methods/channels_editPhoto.md +++ b/old_docs/API_docs_v72/methods/channels_editPhoto.md @@ -33,16 +33,13 @@ description: channels.editPhoto parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v72/methods/channels_editTitle.md b/old_docs/API_docs_v72/methods/channels_editTitle.md index 04e8ce12..8a69d09b 100644 --- a/old_docs/API_docs_v72/methods/channels_editTitle.md +++ b/old_docs/API_docs_v72/methods/channels_editTitle.md @@ -33,16 +33,13 @@ description: channels.editTitle parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v72/methods/channels_exportInvite.md b/old_docs/API_docs_v72/methods/channels_exportInvite.md index 2ed80f6c..79dc6401 100644 --- a/old_docs/API_docs_v72/methods/channels_exportInvite.md +++ b/old_docs/API_docs_v72/methods/channels_exportInvite.md @@ -32,16 +32,13 @@ description: channels.exportInvite parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v72/methods/channels_exportMessageLink.md b/old_docs/API_docs_v72/methods/channels_exportMessageLink.md index 9831c9c0..5b824859 100644 --- a/old_docs/API_docs_v72/methods/channels_exportMessageLink.md +++ b/old_docs/API_docs_v72/methods/channels_exportMessageLink.md @@ -31,13 +31,10 @@ description: channels.exportMessageLink parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v72/methods/channels_getAdminLog.md b/old_docs/API_docs_v72/methods/channels_getAdminLog.md index 5283563d..2f7327d1 100644 --- a/old_docs/API_docs_v72/methods/channels_getAdminLog.md +++ b/old_docs/API_docs_v72/methods/channels_getAdminLog.md @@ -38,13 +38,10 @@ description: channels.getAdminLog parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v72/methods/channels_getAdminedPublicChannels.md b/old_docs/API_docs_v72/methods/channels_getAdminedPublicChannels.md index 7fceb026..283a9071 100644 --- a/old_docs/API_docs_v72/methods/channels_getAdminedPublicChannels.md +++ b/old_docs/API_docs_v72/methods/channels_getAdminedPublicChannels.md @@ -18,13 +18,10 @@ description: channels.getAdminedPublicChannels parameters, return type and examp ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v72/methods/channels_getChannels.md b/old_docs/API_docs_v72/methods/channels_getChannels.md index 13304938..e80aa6a6 100644 --- a/old_docs/API_docs_v72/methods/channels_getChannels.md +++ b/old_docs/API_docs_v72/methods/channels_getChannels.md @@ -32,16 +32,13 @@ description: channels.getChannels parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v72/methods/channels_getMessages.md b/old_docs/API_docs_v72/methods/channels_getMessages.md index 5480dd86..dc392773 100644 --- a/old_docs/API_docs_v72/methods/channels_getMessages.md +++ b/old_docs/API_docs_v72/methods/channels_getMessages.md @@ -33,16 +33,13 @@ description: channels.getMessages parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v72/methods/channels_getParticipant.md b/old_docs/API_docs_v72/methods/channels_getParticipant.md index 8c7e3cbd..001bf115 100644 --- a/old_docs/API_docs_v72/methods/channels_getParticipant.md +++ b/old_docs/API_docs_v72/methods/channels_getParticipant.md @@ -35,16 +35,13 @@ description: channels.getParticipant parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v72/methods/channels_inviteToChannel.md b/old_docs/API_docs_v72/methods/channels_inviteToChannel.md index cf5480e0..2448fb84 100644 --- a/old_docs/API_docs_v72/methods/channels_inviteToChannel.md +++ b/old_docs/API_docs_v72/methods/channels_inviteToChannel.md @@ -46,13 +46,10 @@ description: channels.inviteToChannel parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v72/methods/channels_joinChannel.md b/old_docs/API_docs_v72/methods/channels_joinChannel.md index f31730a1..e746cf48 100644 --- a/old_docs/API_docs_v72/methods/channels_joinChannel.md +++ b/old_docs/API_docs_v72/methods/channels_joinChannel.md @@ -32,13 +32,10 @@ description: channels.joinChannel parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v72/methods/channels_leaveChannel.md b/old_docs/API_docs_v72/methods/channels_leaveChannel.md index 12902f6d..ff244ded 100644 --- a/old_docs/API_docs_v72/methods/channels_leaveChannel.md +++ b/old_docs/API_docs_v72/methods/channels_leaveChannel.md @@ -34,16 +34,13 @@ description: channels.leaveChannel parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v72/methods/channels_readHistory.md b/old_docs/API_docs_v72/methods/channels_readHistory.md index be979101..6fc6ec0e 100644 --- a/old_docs/API_docs_v72/methods/channels_readHistory.md +++ b/old_docs/API_docs_v72/methods/channels_readHistory.md @@ -32,13 +32,10 @@ description: channels.readHistory parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v72/methods/channels_readMessageContents.md b/old_docs/API_docs_v72/methods/channels_readMessageContents.md index 90277593..66213852 100644 --- a/old_docs/API_docs_v72/methods/channels_readMessageContents.md +++ b/old_docs/API_docs_v72/methods/channels_readMessageContents.md @@ -32,13 +32,10 @@ description: channels.readMessageContents parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v72/methods/channels_reportSpam.md b/old_docs/API_docs_v72/methods/channels_reportSpam.md index 22f34443..a37a5833 100644 --- a/old_docs/API_docs_v72/methods/channels_reportSpam.md +++ b/old_docs/API_docs_v72/methods/channels_reportSpam.md @@ -33,13 +33,10 @@ description: channels.reportSpam parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v72/methods/channels_setStickers.md b/old_docs/API_docs_v72/methods/channels_setStickers.md index 6712ada0..a05165c2 100644 --- a/old_docs/API_docs_v72/methods/channels_setStickers.md +++ b/old_docs/API_docs_v72/methods/channels_setStickers.md @@ -32,16 +32,13 @@ description: channels.setStickers parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v72/methods/channels_toggleInvites.md b/old_docs/API_docs_v72/methods/channels_toggleInvites.md index c2715b32..d0ae1136 100644 --- a/old_docs/API_docs_v72/methods/channels_toggleInvites.md +++ b/old_docs/API_docs_v72/methods/channels_toggleInvites.md @@ -33,13 +33,10 @@ description: channels.toggleInvites parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v72/methods/channels_togglePreHistoryHidden.md b/old_docs/API_docs_v72/methods/channels_togglePreHistoryHidden.md index 892b4531..63fdebed 100644 --- a/old_docs/API_docs_v72/methods/channels_togglePreHistoryHidden.md +++ b/old_docs/API_docs_v72/methods/channels_togglePreHistoryHidden.md @@ -24,16 +24,13 @@ description: channels.togglePreHistoryHidden parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v72/methods/channels_toggleSignatures.md b/old_docs/API_docs_v72/methods/channels_toggleSignatures.md index a214b849..6477bc6d 100644 --- a/old_docs/API_docs_v72/methods/channels_toggleSignatures.md +++ b/old_docs/API_docs_v72/methods/channels_toggleSignatures.md @@ -31,13 +31,10 @@ description: channels.toggleSignatures parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v72/methods/channels_updatePinnedMessage.md b/old_docs/API_docs_v72/methods/channels_updatePinnedMessage.md index 6dcabf71..37a0a20d 100644 --- a/old_docs/API_docs_v72/methods/channels_updatePinnedMessage.md +++ b/old_docs/API_docs_v72/methods/channels_updatePinnedMessage.md @@ -35,16 +35,13 @@ description: channels.updatePinnedMessage parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v72/methods/channels_updateUsername.md b/old_docs/API_docs_v72/methods/channels_updateUsername.md index c2ede724..1f1f111e 100644 --- a/old_docs/API_docs_v72/methods/channels_updateUsername.md +++ b/old_docs/API_docs_v72/methods/channels_updateUsername.md @@ -35,13 +35,10 @@ description: channels.updateUsername parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v72/methods/contacts_block.md b/old_docs/API_docs_v72/methods/contacts_block.md index d9d58e37..1c7cbe26 100644 --- a/old_docs/API_docs_v72/methods/contacts_block.md +++ b/old_docs/API_docs_v72/methods/contacts_block.md @@ -30,13 +30,10 @@ description: contacts.block parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v72/methods/contacts_deleteContact.md b/old_docs/API_docs_v72/methods/contacts_deleteContact.md index cd8c17ad..987a1be0 100644 --- a/old_docs/API_docs_v72/methods/contacts_deleteContact.md +++ b/old_docs/API_docs_v72/methods/contacts_deleteContact.md @@ -30,13 +30,10 @@ description: contacts.deleteContact parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v72/methods/contacts_deleteContacts.md b/old_docs/API_docs_v72/methods/contacts_deleteContacts.md index fc65880d..67a922ed 100644 --- a/old_docs/API_docs_v72/methods/contacts_deleteContacts.md +++ b/old_docs/API_docs_v72/methods/contacts_deleteContacts.md @@ -31,13 +31,10 @@ description: contacts.deleteContacts parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v72/methods/contacts_exportCard.md b/old_docs/API_docs_v72/methods/contacts_exportCard.md index 63508076..bf6d1f9f 100644 --- a/old_docs/API_docs_v72/methods/contacts_exportCard.md +++ b/old_docs/API_docs_v72/methods/contacts_exportCard.md @@ -18,13 +18,10 @@ description: contacts.exportCard parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v72/methods/contacts_getBlocked.md b/old_docs/API_docs_v72/methods/contacts_getBlocked.md index f50792b4..faa719da 100644 --- a/old_docs/API_docs_v72/methods/contacts_getBlocked.md +++ b/old_docs/API_docs_v72/methods/contacts_getBlocked.md @@ -24,13 +24,10 @@ description: contacts.getBlocked parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v72/methods/contacts_getContacts.md b/old_docs/API_docs_v72/methods/contacts_getContacts.md index dd231da2..e7783c1b 100644 --- a/old_docs/API_docs_v72/methods/contacts_getContacts.md +++ b/old_docs/API_docs_v72/methods/contacts_getContacts.md @@ -23,13 +23,10 @@ description: contacts.getContacts parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v72/methods/contacts_getStatuses.md b/old_docs/API_docs_v72/methods/contacts_getStatuses.md index d914e08d..9bb7f263 100644 --- a/old_docs/API_docs_v72/methods/contacts_getStatuses.md +++ b/old_docs/API_docs_v72/methods/contacts_getStatuses.md @@ -18,13 +18,10 @@ description: contacts.getStatuses parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v72/methods/contacts_getTopPeers.md b/old_docs/API_docs_v72/methods/contacts_getTopPeers.md index cbd64cc0..f72133a5 100644 --- a/old_docs/API_docs_v72/methods/contacts_getTopPeers.md +++ b/old_docs/API_docs_v72/methods/contacts_getTopPeers.md @@ -38,13 +38,10 @@ description: contacts.getTopPeers parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v72/methods/contacts_importCard.md b/old_docs/API_docs_v72/methods/contacts_importCard.md index a6abf56d..7a2f34e1 100644 --- a/old_docs/API_docs_v72/methods/contacts_importCard.md +++ b/old_docs/API_docs_v72/methods/contacts_importCard.md @@ -31,13 +31,10 @@ description: contacts.importCard parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v72/methods/contacts_importContacts.md b/old_docs/API_docs_v72/methods/contacts_importContacts.md index e7e84bea..7d580e83 100644 --- a/old_docs/API_docs_v72/methods/contacts_importContacts.md +++ b/old_docs/API_docs_v72/methods/contacts_importContacts.md @@ -23,13 +23,10 @@ description: contacts.importContacts parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v72/methods/contacts_resetSaved.md b/old_docs/API_docs_v72/methods/contacts_resetSaved.md index 56838fd8..87f8db12 100644 --- a/old_docs/API_docs_v72/methods/contacts_resetSaved.md +++ b/old_docs/API_docs_v72/methods/contacts_resetSaved.md @@ -18,16 +18,13 @@ description: contacts.resetSaved parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v72/methods/contacts_resetTopPeerRating.md b/old_docs/API_docs_v72/methods/contacts_resetTopPeerRating.md index 738494b2..711ea0cb 100644 --- a/old_docs/API_docs_v72/methods/contacts_resetTopPeerRating.md +++ b/old_docs/API_docs_v72/methods/contacts_resetTopPeerRating.md @@ -31,13 +31,10 @@ description: contacts.resetTopPeerRating parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v72/methods/contacts_search.md b/old_docs/API_docs_v72/methods/contacts_search.md index 0203b160..70a0635e 100644 --- a/old_docs/API_docs_v72/methods/contacts_search.md +++ b/old_docs/API_docs_v72/methods/contacts_search.md @@ -33,13 +33,10 @@ description: contacts.search parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v72/methods/contacts_unblock.md b/old_docs/API_docs_v72/methods/contacts_unblock.md index a1977c24..9c01e42a 100644 --- a/old_docs/API_docs_v72/methods/contacts_unblock.md +++ b/old_docs/API_docs_v72/methods/contacts_unblock.md @@ -30,13 +30,10 @@ description: contacts.unblock parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v72/methods/contest_saveDeveloperInfo.md b/old_docs/API_docs_v72/methods/contest_saveDeveloperInfo.md index eca7bfcf..c0bb9054 100644 --- a/old_docs/API_docs_v72/methods/contest_saveDeveloperInfo.md +++ b/old_docs/API_docs_v72/methods/contest_saveDeveloperInfo.md @@ -27,16 +27,13 @@ description: contest.saveDeveloperInfo parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v72/methods/destroy_auth_key.md b/old_docs/API_docs_v72/methods/destroy_auth_key.md index 7d39ceec..1803e375 100644 --- a/old_docs/API_docs_v72/methods/destroy_auth_key.md +++ b/old_docs/API_docs_v72/methods/destroy_auth_key.md @@ -18,16 +18,13 @@ description: destroy_auth_key parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v72/methods/destroy_session.md b/old_docs/API_docs_v72/methods/destroy_session.md index 0b732694..39aa2c6e 100644 --- a/old_docs/API_docs_v72/methods/destroy_session.md +++ b/old_docs/API_docs_v72/methods/destroy_session.md @@ -23,16 +23,13 @@ description: destroy_session parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v72/methods/get_future_salts.md b/old_docs/API_docs_v72/methods/get_future_salts.md index d3b306ce..fedf036c 100644 --- a/old_docs/API_docs_v72/methods/get_future_salts.md +++ b/old_docs/API_docs_v72/methods/get_future_salts.md @@ -23,16 +23,13 @@ description: get_future_salts parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v72/methods/help_getAppChangelog.md b/old_docs/API_docs_v72/methods/help_getAppChangelog.md index 9d8c3203..59916787 100644 --- a/old_docs/API_docs_v72/methods/help_getAppChangelog.md +++ b/old_docs/API_docs_v72/methods/help_getAppChangelog.md @@ -23,13 +23,10 @@ description: help.getAppChangelog parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v72/methods/help_getAppUpdate.md b/old_docs/API_docs_v72/methods/help_getAppUpdate.md index 0871f59d..89ff22c3 100644 --- a/old_docs/API_docs_v72/methods/help_getAppUpdate.md +++ b/old_docs/API_docs_v72/methods/help_getAppUpdate.md @@ -18,13 +18,10 @@ description: help.getAppUpdate parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v72/methods/help_getCdnConfig.md b/old_docs/API_docs_v72/methods/help_getCdnConfig.md index da446958..3079e605 100644 --- a/old_docs/API_docs_v72/methods/help_getCdnConfig.md +++ b/old_docs/API_docs_v72/methods/help_getCdnConfig.md @@ -25,16 +25,13 @@ description: help.getCdnConfig parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v72/methods/help_getConfig.md b/old_docs/API_docs_v72/methods/help_getConfig.md index e3648b5a..bb51b362 100644 --- a/old_docs/API_docs_v72/methods/help_getConfig.md +++ b/old_docs/API_docs_v72/methods/help_getConfig.md @@ -25,16 +25,13 @@ description: help.getConfig parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v72/methods/help_getInviteText.md b/old_docs/API_docs_v72/methods/help_getInviteText.md index 4bcbb77d..6d2674d6 100644 --- a/old_docs/API_docs_v72/methods/help_getInviteText.md +++ b/old_docs/API_docs_v72/methods/help_getInviteText.md @@ -18,13 +18,10 @@ description: help.getInviteText parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v72/methods/help_getNearestDc.md b/old_docs/API_docs_v72/methods/help_getNearestDc.md index c6f5c555..6d8ed3f7 100644 --- a/old_docs/API_docs_v72/methods/help_getNearestDc.md +++ b/old_docs/API_docs_v72/methods/help_getNearestDc.md @@ -18,13 +18,10 @@ description: help.getNearestDc parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v72/methods/help_getRecentMeUrls.md b/old_docs/API_docs_v72/methods/help_getRecentMeUrls.md index 4d7a2ce9..76d65594 100644 --- a/old_docs/API_docs_v72/methods/help_getRecentMeUrls.md +++ b/old_docs/API_docs_v72/methods/help_getRecentMeUrls.md @@ -23,16 +23,13 @@ description: help.getRecentMeUrls parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v72/methods/help_getSupport.md b/old_docs/API_docs_v72/methods/help_getSupport.md index 209edf03..ca8db03c 100644 --- a/old_docs/API_docs_v72/methods/help_getSupport.md +++ b/old_docs/API_docs_v72/methods/help_getSupport.md @@ -18,13 +18,10 @@ description: help.getSupport parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v72/methods/help_getTermsOfService.md b/old_docs/API_docs_v72/methods/help_getTermsOfService.md index 8bc2e2fa..eb686506 100644 --- a/old_docs/API_docs_v72/methods/help_getTermsOfService.md +++ b/old_docs/API_docs_v72/methods/help_getTermsOfService.md @@ -18,13 +18,10 @@ description: help.getTermsOfService parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v72/methods/help_saveAppLog.md b/old_docs/API_docs_v72/methods/help_saveAppLog.md index 4f06434c..741b9aa1 100644 --- a/old_docs/API_docs_v72/methods/help_saveAppLog.md +++ b/old_docs/API_docs_v72/methods/help_saveAppLog.md @@ -23,13 +23,10 @@ description: help.saveAppLog parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v72/methods/help_setBotUpdatesStatus.md b/old_docs/API_docs_v72/methods/help_setBotUpdatesStatus.md index 55e1d2fe..470187a0 100644 --- a/old_docs/API_docs_v72/methods/help_setBotUpdatesStatus.md +++ b/old_docs/API_docs_v72/methods/help_setBotUpdatesStatus.md @@ -24,16 +24,13 @@ description: help.setBotUpdatesStatus parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v72/methods/initConnection.md b/old_docs/API_docs_v72/methods/initConnection.md index b66ab859..ef40e7f5 100644 --- a/old_docs/API_docs_v72/methods/initConnection.md +++ b/old_docs/API_docs_v72/methods/initConnection.md @@ -38,16 +38,13 @@ description: initConnection parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v72/methods/invokeAfterMsg.md b/old_docs/API_docs_v72/methods/invokeAfterMsg.md index c139fe8c..a382429e 100644 --- a/old_docs/API_docs_v72/methods/invokeAfterMsg.md +++ b/old_docs/API_docs_v72/methods/invokeAfterMsg.md @@ -24,16 +24,13 @@ description: invokeAfterMsg parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v72/methods/invokeAfterMsgs.md b/old_docs/API_docs_v72/methods/invokeAfterMsgs.md index 35004296..169eedaf 100644 --- a/old_docs/API_docs_v72/methods/invokeAfterMsgs.md +++ b/old_docs/API_docs_v72/methods/invokeAfterMsgs.md @@ -24,16 +24,13 @@ description: invokeAfterMsgs parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v72/methods/invokeWithLayer.md b/old_docs/API_docs_v72/methods/invokeWithLayer.md index 706036c4..d9a2c74c 100644 --- a/old_docs/API_docs_v72/methods/invokeWithLayer.md +++ b/old_docs/API_docs_v72/methods/invokeWithLayer.md @@ -41,16 +41,13 @@ description: invokeWithLayer parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v72/methods/invokeWithoutUpdates.md b/old_docs/API_docs_v72/methods/invokeWithoutUpdates.md index 10c6bfcf..f7d01765 100644 --- a/old_docs/API_docs_v72/methods/invokeWithoutUpdates.md +++ b/old_docs/API_docs_v72/methods/invokeWithoutUpdates.md @@ -23,16 +23,13 @@ description: invokeWithoutUpdates parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v72/methods/langpack_getDifference.md b/old_docs/API_docs_v72/methods/langpack_getDifference.md index 2e77cc3b..116e78e2 100644 --- a/old_docs/API_docs_v72/methods/langpack_getDifference.md +++ b/old_docs/API_docs_v72/methods/langpack_getDifference.md @@ -30,13 +30,10 @@ description: langpack.getDifference parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v72/methods/langpack_getLangPack.md b/old_docs/API_docs_v72/methods/langpack_getLangPack.md index 5d4d0b81..b5686e61 100644 --- a/old_docs/API_docs_v72/methods/langpack_getLangPack.md +++ b/old_docs/API_docs_v72/methods/langpack_getLangPack.md @@ -30,13 +30,10 @@ description: langpack.getLangPack parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v72/methods/langpack_getLanguages.md b/old_docs/API_docs_v72/methods/langpack_getLanguages.md index abaa0de3..cb65e5a0 100644 --- a/old_docs/API_docs_v72/methods/langpack_getLanguages.md +++ b/old_docs/API_docs_v72/methods/langpack_getLanguages.md @@ -25,13 +25,10 @@ description: langpack.getLanguages parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v72/methods/langpack_getStrings.md b/old_docs/API_docs_v72/methods/langpack_getStrings.md index 9bb740dc..ce58daf9 100644 --- a/old_docs/API_docs_v72/methods/langpack_getStrings.md +++ b/old_docs/API_docs_v72/methods/langpack_getStrings.md @@ -31,13 +31,10 @@ description: langpack.getStrings parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v72/methods/messages_addChatUser.md b/old_docs/API_docs_v72/methods/messages_addChatUser.md index 00da5a61..b9e6243d 100644 --- a/old_docs/API_docs_v72/methods/messages_addChatUser.md +++ b/old_docs/API_docs_v72/methods/messages_addChatUser.md @@ -40,13 +40,10 @@ description: messages.addChatUser parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v72/methods/messages_checkChatInvite.md b/old_docs/API_docs_v72/methods/messages_checkChatInvite.md index c5eb1c06..c4489469 100644 --- a/old_docs/API_docs_v72/methods/messages_checkChatInvite.md +++ b/old_docs/API_docs_v72/methods/messages_checkChatInvite.md @@ -32,13 +32,10 @@ description: messages.checkChatInvite parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v72/methods/messages_clearRecentStickers.md b/old_docs/API_docs_v72/methods/messages_clearRecentStickers.md index dda76d14..ae45b249 100644 --- a/old_docs/API_docs_v72/methods/messages_clearRecentStickers.md +++ b/old_docs/API_docs_v72/methods/messages_clearRecentStickers.md @@ -23,13 +23,10 @@ description: messages.clearRecentStickers parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v72/methods/messages_createChat.md b/old_docs/API_docs_v72/methods/messages_createChat.md index c643a022..c6c8f420 100644 --- a/old_docs/API_docs_v72/methods/messages_createChat.md +++ b/old_docs/API_docs_v72/methods/messages_createChat.md @@ -32,13 +32,10 @@ description: messages.createChat parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v72/methods/messages_deleteChatUser.md b/old_docs/API_docs_v72/methods/messages_deleteChatUser.md index 3d75d9cf..4b8c2aa5 100644 --- a/old_docs/API_docs_v72/methods/messages_deleteChatUser.md +++ b/old_docs/API_docs_v72/methods/messages_deleteChatUser.md @@ -33,16 +33,13 @@ description: messages.deleteChatUser parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v72/methods/messages_deleteHistory.md b/old_docs/API_docs_v72/methods/messages_deleteHistory.md index ce6ba6e7..ebe2c89c 100644 --- a/old_docs/API_docs_v72/methods/messages_deleteHistory.md +++ b/old_docs/API_docs_v72/methods/messages_deleteHistory.md @@ -32,13 +32,10 @@ description: messages.deleteHistory parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v72/methods/messages_deleteMessages.md b/old_docs/API_docs_v72/methods/messages_deleteMessages.md index 2b88a73f..5472cc72 100644 --- a/old_docs/API_docs_v72/methods/messages_deleteMessages.md +++ b/old_docs/API_docs_v72/methods/messages_deleteMessages.md @@ -31,16 +31,13 @@ description: messages.deleteMessages parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v72/methods/messages_editChatAdmin.md b/old_docs/API_docs_v72/methods/messages_editChatAdmin.md index e64d9da5..1b3ffa9f 100644 --- a/old_docs/API_docs_v72/methods/messages_editChatAdmin.md +++ b/old_docs/API_docs_v72/methods/messages_editChatAdmin.md @@ -32,13 +32,10 @@ description: messages.editChatAdmin parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v72/methods/messages_editChatPhoto.md b/old_docs/API_docs_v72/methods/messages_editChatPhoto.md index d225962d..8c5d9d47 100644 --- a/old_docs/API_docs_v72/methods/messages_editChatPhoto.md +++ b/old_docs/API_docs_v72/methods/messages_editChatPhoto.md @@ -35,16 +35,13 @@ description: messages.editChatPhoto parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v72/methods/messages_editChatTitle.md b/old_docs/API_docs_v72/methods/messages_editChatTitle.md index 5cb1c6d7..238c6d72 100644 --- a/old_docs/API_docs_v72/methods/messages_editChatTitle.md +++ b/old_docs/API_docs_v72/methods/messages_editChatTitle.md @@ -32,16 +32,13 @@ description: messages.editChatTitle parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v72/methods/messages_editInlineBotMessage.md b/old_docs/API_docs_v72/methods/messages_editInlineBotMessage.md index 621c81a3..c3489f9d 100644 --- a/old_docs/API_docs_v72/methods/messages_editInlineBotMessage.md +++ b/old_docs/API_docs_v72/methods/messages_editInlineBotMessage.md @@ -36,16 +36,13 @@ description: messages.editInlineBotMessage parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v72/methods/messages_editMessage.md b/old_docs/API_docs_v72/methods/messages_editMessage.md index 63b7e690..7ea04dbf 100644 --- a/old_docs/API_docs_v72/methods/messages_editMessage.md +++ b/old_docs/API_docs_v72/methods/messages_editMessage.md @@ -47,16 +47,13 @@ description: messages.editMessage parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v72/methods/messages_exportChatInvite.md b/old_docs/API_docs_v72/methods/messages_exportChatInvite.md index 4a6e28ff..78f2ff86 100644 --- a/old_docs/API_docs_v72/methods/messages_exportChatInvite.md +++ b/old_docs/API_docs_v72/methods/messages_exportChatInvite.md @@ -30,13 +30,10 @@ description: messages.exportChatInvite parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v72/methods/messages_faveSticker.md b/old_docs/API_docs_v72/methods/messages_faveSticker.md index 4ac9d019..4164c935 100644 --- a/old_docs/API_docs_v72/methods/messages_faveSticker.md +++ b/old_docs/API_docs_v72/methods/messages_faveSticker.md @@ -31,16 +31,13 @@ description: messages.faveSticker parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v72/methods/messages_forwardMessage.md b/old_docs/API_docs_v72/methods/messages_forwardMessage.md index 4e2362db..fbdbc955 100644 --- a/old_docs/API_docs_v72/methods/messages_forwardMessage.md +++ b/old_docs/API_docs_v72/methods/messages_forwardMessage.md @@ -34,16 +34,13 @@ description: messages.forwardMessage parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v72/methods/messages_forwardMessages.md b/old_docs/API_docs_v72/methods/messages_forwardMessages.md index b5e9b7e7..5a609390 100644 --- a/old_docs/API_docs_v72/methods/messages_forwardMessages.md +++ b/old_docs/API_docs_v72/methods/messages_forwardMessages.md @@ -56,16 +56,13 @@ description: messages.forwardMessages parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v72/methods/messages_getAllChats.md b/old_docs/API_docs_v72/methods/messages_getAllChats.md index c5037003..babcf17d 100644 --- a/old_docs/API_docs_v72/methods/messages_getAllChats.md +++ b/old_docs/API_docs_v72/methods/messages_getAllChats.md @@ -23,13 +23,10 @@ description: messages.getAllChats parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v72/methods/messages_getAllDrafts.md b/old_docs/API_docs_v72/methods/messages_getAllDrafts.md index cc447864..8550c5b8 100644 --- a/old_docs/API_docs_v72/methods/messages_getAllDrafts.md +++ b/old_docs/API_docs_v72/methods/messages_getAllDrafts.md @@ -18,13 +18,10 @@ description: messages.getAllDrafts parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v72/methods/messages_getAllStickers.md b/old_docs/API_docs_v72/methods/messages_getAllStickers.md index dc9e2432..034438a5 100644 --- a/old_docs/API_docs_v72/methods/messages_getAllStickers.md +++ b/old_docs/API_docs_v72/methods/messages_getAllStickers.md @@ -23,13 +23,10 @@ description: messages.getAllStickers parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v72/methods/messages_getArchivedStickers.md b/old_docs/API_docs_v72/methods/messages_getArchivedStickers.md index dddcc748..cdb7f0af 100644 --- a/old_docs/API_docs_v72/methods/messages_getArchivedStickers.md +++ b/old_docs/API_docs_v72/methods/messages_getArchivedStickers.md @@ -25,13 +25,10 @@ description: messages.getArchivedStickers parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v72/methods/messages_getAttachedStickers.md b/old_docs/API_docs_v72/methods/messages_getAttachedStickers.md index 250db6a8..79d4e30d 100644 --- a/old_docs/API_docs_v72/methods/messages_getAttachedStickers.md +++ b/old_docs/API_docs_v72/methods/messages_getAttachedStickers.md @@ -23,13 +23,10 @@ description: messages.getAttachedStickers parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v72/methods/messages_getBotCallbackAnswer.md b/old_docs/API_docs_v72/methods/messages_getBotCallbackAnswer.md index e905723f..afa5358c 100644 --- a/old_docs/API_docs_v72/methods/messages_getBotCallbackAnswer.md +++ b/old_docs/API_docs_v72/methods/messages_getBotCallbackAnswer.md @@ -37,13 +37,10 @@ description: messages.getBotCallbackAnswer parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v72/methods/messages_getChats.md b/old_docs/API_docs_v72/methods/messages_getChats.md index 6fa30cbd..c322613d 100644 --- a/old_docs/API_docs_v72/methods/messages_getChats.md +++ b/old_docs/API_docs_v72/methods/messages_getChats.md @@ -31,16 +31,13 @@ description: messages.getChats parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v72/methods/messages_getCommonChats.md b/old_docs/API_docs_v72/methods/messages_getCommonChats.md index 0c601ca9..8c9e2834 100644 --- a/old_docs/API_docs_v72/methods/messages_getCommonChats.md +++ b/old_docs/API_docs_v72/methods/messages_getCommonChats.md @@ -32,13 +32,10 @@ description: messages.getCommonChats parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v72/methods/messages_getDhConfig.md b/old_docs/API_docs_v72/methods/messages_getDhConfig.md index aac3354d..f97684d2 100644 --- a/old_docs/API_docs_v72/methods/messages_getDhConfig.md +++ b/old_docs/API_docs_v72/methods/messages_getDhConfig.md @@ -31,13 +31,10 @@ description: messages.getDhConfig parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v72/methods/messages_getDialogs.md b/old_docs/API_docs_v72/methods/messages_getDialogs.md index 131b75b7..cef5ecc6 100644 --- a/old_docs/API_docs_v72/methods/messages_getDialogs.md +++ b/old_docs/API_docs_v72/methods/messages_getDialogs.md @@ -37,13 +37,10 @@ description: messages.getDialogs parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v72/methods/messages_getDocumentByHash.md b/old_docs/API_docs_v72/methods/messages_getDocumentByHash.md index dda54bdd..3902ac44 100644 --- a/old_docs/API_docs_v72/methods/messages_getDocumentByHash.md +++ b/old_docs/API_docs_v72/methods/messages_getDocumentByHash.md @@ -32,16 +32,13 @@ description: messages.getDocumentByHash parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v72/methods/messages_getFavedStickers.md b/old_docs/API_docs_v72/methods/messages_getFavedStickers.md index 482b8fc5..51701826 100644 --- a/old_docs/API_docs_v72/methods/messages_getFavedStickers.md +++ b/old_docs/API_docs_v72/methods/messages_getFavedStickers.md @@ -23,16 +23,13 @@ description: messages.getFavedStickers parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v72/methods/messages_getFeaturedStickers.md b/old_docs/API_docs_v72/methods/messages_getFeaturedStickers.md index 9573464a..5aad1810 100644 --- a/old_docs/API_docs_v72/methods/messages_getFeaturedStickers.md +++ b/old_docs/API_docs_v72/methods/messages_getFeaturedStickers.md @@ -23,13 +23,10 @@ description: messages.getFeaturedStickers parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v72/methods/messages_getGameHighScores.md b/old_docs/API_docs_v72/methods/messages_getGameHighScores.md index 935bb95a..d8a94ae3 100644 --- a/old_docs/API_docs_v72/methods/messages_getGameHighScores.md +++ b/old_docs/API_docs_v72/methods/messages_getGameHighScores.md @@ -33,16 +33,13 @@ description: messages.getGameHighScores parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v72/methods/messages_getHistory.md b/old_docs/API_docs_v72/methods/messages_getHistory.md index a48a465e..4c3ef2ee 100644 --- a/old_docs/API_docs_v72/methods/messages_getHistory.md +++ b/old_docs/API_docs_v72/methods/messages_getHistory.md @@ -41,13 +41,10 @@ description: messages.getHistory parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v72/methods/messages_getInlineBotResults.md b/old_docs/API_docs_v72/methods/messages_getInlineBotResults.md index 61366580..61b927fc 100644 --- a/old_docs/API_docs_v72/methods/messages_getInlineBotResults.md +++ b/old_docs/API_docs_v72/methods/messages_getInlineBotResults.md @@ -37,13 +37,10 @@ description: messages.getInlineBotResults parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v72/methods/messages_getInlineGameHighScores.md b/old_docs/API_docs_v72/methods/messages_getInlineGameHighScores.md index 7cc04d0d..40eff3a9 100644 --- a/old_docs/API_docs_v72/methods/messages_getInlineGameHighScores.md +++ b/old_docs/API_docs_v72/methods/messages_getInlineGameHighScores.md @@ -32,16 +32,13 @@ description: messages.getInlineGameHighScores parameters, return type and exampl ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v72/methods/messages_getMaskStickers.md b/old_docs/API_docs_v72/methods/messages_getMaskStickers.md index 0ab194df..ca964647 100644 --- a/old_docs/API_docs_v72/methods/messages_getMaskStickers.md +++ b/old_docs/API_docs_v72/methods/messages_getMaskStickers.md @@ -23,13 +23,10 @@ description: messages.getMaskStickers parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v72/methods/messages_getMessageEditData.md b/old_docs/API_docs_v72/methods/messages_getMessageEditData.md index a8b135c6..15085153 100644 --- a/old_docs/API_docs_v72/methods/messages_getMessageEditData.md +++ b/old_docs/API_docs_v72/methods/messages_getMessageEditData.md @@ -32,13 +32,10 @@ description: messages.getMessageEditData parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v72/methods/messages_getMessages.md b/old_docs/API_docs_v72/methods/messages_getMessages.md index 5a970246..787c46dd 100644 --- a/old_docs/API_docs_v72/methods/messages_getMessages.md +++ b/old_docs/API_docs_v72/methods/messages_getMessages.md @@ -23,16 +23,13 @@ description: messages.getMessages parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v72/methods/messages_getMessagesViews.md b/old_docs/API_docs_v72/methods/messages_getMessagesViews.md index 263f3f95..de5692dc 100644 --- a/old_docs/API_docs_v72/methods/messages_getMessagesViews.md +++ b/old_docs/API_docs_v72/methods/messages_getMessagesViews.md @@ -34,13 +34,10 @@ description: messages.getMessagesViews parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v72/methods/messages_getPeerDialogs.md b/old_docs/API_docs_v72/methods/messages_getPeerDialogs.md index 3da60038..226948ae 100644 --- a/old_docs/API_docs_v72/methods/messages_getPeerDialogs.md +++ b/old_docs/API_docs_v72/methods/messages_getPeerDialogs.md @@ -31,13 +31,10 @@ description: messages.getPeerDialogs parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v72/methods/messages_getPeerSettings.md b/old_docs/API_docs_v72/methods/messages_getPeerSettings.md index d3e3cfc3..2a92f2da 100644 --- a/old_docs/API_docs_v72/methods/messages_getPeerSettings.md +++ b/old_docs/API_docs_v72/methods/messages_getPeerSettings.md @@ -31,13 +31,10 @@ description: messages.getPeerSettings parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v72/methods/messages_getPinnedDialogs.md b/old_docs/API_docs_v72/methods/messages_getPinnedDialogs.md index 110eab05..ec744f01 100644 --- a/old_docs/API_docs_v72/methods/messages_getPinnedDialogs.md +++ b/old_docs/API_docs_v72/methods/messages_getPinnedDialogs.md @@ -18,13 +18,10 @@ description: messages.getPinnedDialogs parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v72/methods/messages_getRecentLocations.md b/old_docs/API_docs_v72/methods/messages_getRecentLocations.md index 7e7e0547..7c65ab83 100644 --- a/old_docs/API_docs_v72/methods/messages_getRecentLocations.md +++ b/old_docs/API_docs_v72/methods/messages_getRecentLocations.md @@ -24,16 +24,13 @@ description: messages.getRecentLocations parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v72/methods/messages_getRecentStickers.md b/old_docs/API_docs_v72/methods/messages_getRecentStickers.md index 10d1a0df..a6ae162f 100644 --- a/old_docs/API_docs_v72/methods/messages_getRecentStickers.md +++ b/old_docs/API_docs_v72/methods/messages_getRecentStickers.md @@ -24,13 +24,10 @@ description: messages.getRecentStickers parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v72/methods/messages_getSavedGifs.md b/old_docs/API_docs_v72/methods/messages_getSavedGifs.md index 7cce4ffe..4986d812 100644 --- a/old_docs/API_docs_v72/methods/messages_getSavedGifs.md +++ b/old_docs/API_docs_v72/methods/messages_getSavedGifs.md @@ -23,13 +23,10 @@ description: messages.getSavedGifs parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v72/methods/messages_getStickerSet.md b/old_docs/API_docs_v72/methods/messages_getStickerSet.md index 59f33916..b480e0fe 100644 --- a/old_docs/API_docs_v72/methods/messages_getStickerSet.md +++ b/old_docs/API_docs_v72/methods/messages_getStickerSet.md @@ -30,16 +30,13 @@ description: messages.getStickerSet parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v72/methods/messages_getUnreadMentions.md b/old_docs/API_docs_v72/methods/messages_getUnreadMentions.md index 54e8cabf..09b3633e 100644 --- a/old_docs/API_docs_v72/methods/messages_getUnreadMentions.md +++ b/old_docs/API_docs_v72/methods/messages_getUnreadMentions.md @@ -35,13 +35,10 @@ description: messages.getUnreadMentions parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v72/methods/messages_getWebPage.md b/old_docs/API_docs_v72/methods/messages_getWebPage.md index 35f6e545..e886b020 100644 --- a/old_docs/API_docs_v72/methods/messages_getWebPage.md +++ b/old_docs/API_docs_v72/methods/messages_getWebPage.md @@ -31,13 +31,10 @@ description: messages.getWebPage parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v72/methods/messages_getWebPagePreview.md b/old_docs/API_docs_v72/methods/messages_getWebPagePreview.md index a89600b1..d3908933 100644 --- a/old_docs/API_docs_v72/methods/messages_getWebPagePreview.md +++ b/old_docs/API_docs_v72/methods/messages_getWebPagePreview.md @@ -23,13 +23,10 @@ description: messages.getWebPagePreview parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v72/methods/messages_hideReportSpam.md b/old_docs/API_docs_v72/methods/messages_hideReportSpam.md index 2dfe4dd7..5635665c 100644 --- a/old_docs/API_docs_v72/methods/messages_hideReportSpam.md +++ b/old_docs/API_docs_v72/methods/messages_hideReportSpam.md @@ -30,13 +30,10 @@ description: messages.hideReportSpam parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v72/methods/messages_importChatInvite.md b/old_docs/API_docs_v72/methods/messages_importChatInvite.md index 9d77304d..9dcfa56d 100644 --- a/old_docs/API_docs_v72/methods/messages_importChatInvite.md +++ b/old_docs/API_docs_v72/methods/messages_importChatInvite.md @@ -36,13 +36,10 @@ description: messages.importChatInvite parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v72/methods/messages_installStickerSet.md b/old_docs/API_docs_v72/methods/messages_installStickerSet.md index 3dde52a7..016d5ece 100644 --- a/old_docs/API_docs_v72/methods/messages_installStickerSet.md +++ b/old_docs/API_docs_v72/methods/messages_installStickerSet.md @@ -31,13 +31,10 @@ description: messages.installStickerSet parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v72/methods/messages_migrateChat.md b/old_docs/API_docs_v72/methods/messages_migrateChat.md index 22d2fbf0..a8274e70 100644 --- a/old_docs/API_docs_v72/methods/messages_migrateChat.md +++ b/old_docs/API_docs_v72/methods/messages_migrateChat.md @@ -32,13 +32,10 @@ description: messages.migrateChat parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v72/methods/messages_readEncryptedHistory.md b/old_docs/API_docs_v72/methods/messages_readEncryptedHistory.md index 766ee07d..f38f6b07 100644 --- a/old_docs/API_docs_v72/methods/messages_readEncryptedHistory.md +++ b/old_docs/API_docs_v72/methods/messages_readEncryptedHistory.md @@ -31,16 +31,13 @@ description: messages.readEncryptedHistory parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v72/methods/messages_readFeaturedStickers.md b/old_docs/API_docs_v72/methods/messages_readFeaturedStickers.md index c7ce7aca..02055bf3 100644 --- a/old_docs/API_docs_v72/methods/messages_readFeaturedStickers.md +++ b/old_docs/API_docs_v72/methods/messages_readFeaturedStickers.md @@ -23,13 +23,10 @@ description: messages.readFeaturedStickers parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v72/methods/messages_readHistory.md b/old_docs/API_docs_v72/methods/messages_readHistory.md index 1aa7830a..fef62130 100644 --- a/old_docs/API_docs_v72/methods/messages_readHistory.md +++ b/old_docs/API_docs_v72/methods/messages_readHistory.md @@ -32,13 +32,10 @@ description: messages.readHistory parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v72/methods/messages_readMentions.md b/old_docs/API_docs_v72/methods/messages_readMentions.md index d0113d26..19d7dc30 100644 --- a/old_docs/API_docs_v72/methods/messages_readMentions.md +++ b/old_docs/API_docs_v72/methods/messages_readMentions.md @@ -23,16 +23,13 @@ description: messages.readMentions parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v72/methods/messages_readMessageContents.md b/old_docs/API_docs_v72/methods/messages_readMessageContents.md index 4b1abda0..7a6055fc 100644 --- a/old_docs/API_docs_v72/methods/messages_readMessageContents.md +++ b/old_docs/API_docs_v72/methods/messages_readMessageContents.md @@ -23,13 +23,10 @@ description: messages.readMessageContents parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v72/methods/messages_receivedMessages.md b/old_docs/API_docs_v72/methods/messages_receivedMessages.md index 588ac5cf..e2cf3a2f 100644 --- a/old_docs/API_docs_v72/methods/messages_receivedMessages.md +++ b/old_docs/API_docs_v72/methods/messages_receivedMessages.md @@ -23,13 +23,10 @@ description: messages.receivedMessages parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v72/methods/messages_receivedQueue.md b/old_docs/API_docs_v72/methods/messages_receivedQueue.md index 3c7f1d4f..38f504b3 100644 --- a/old_docs/API_docs_v72/methods/messages_receivedQueue.md +++ b/old_docs/API_docs_v72/methods/messages_receivedQueue.md @@ -30,16 +30,13 @@ description: messages.receivedQueue parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v72/methods/messages_reorderPinnedDialogs.md b/old_docs/API_docs_v72/methods/messages_reorderPinnedDialogs.md index 30102fd7..b4bfb84f 100644 --- a/old_docs/API_docs_v72/methods/messages_reorderPinnedDialogs.md +++ b/old_docs/API_docs_v72/methods/messages_reorderPinnedDialogs.md @@ -31,13 +31,10 @@ description: messages.reorderPinnedDialogs parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v72/methods/messages_reorderStickerSets.md b/old_docs/API_docs_v72/methods/messages_reorderStickerSets.md index 5c47f174..fa094550 100644 --- a/old_docs/API_docs_v72/methods/messages_reorderStickerSets.md +++ b/old_docs/API_docs_v72/methods/messages_reorderStickerSets.md @@ -24,13 +24,10 @@ description: messages.reorderStickerSets parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v72/methods/messages_reportEncryptedSpam.md b/old_docs/API_docs_v72/methods/messages_reportEncryptedSpam.md index 30ef3473..aed7a891 100644 --- a/old_docs/API_docs_v72/methods/messages_reportEncryptedSpam.md +++ b/old_docs/API_docs_v72/methods/messages_reportEncryptedSpam.md @@ -30,13 +30,10 @@ description: messages.reportEncryptedSpam parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v72/methods/messages_reportSpam.md b/old_docs/API_docs_v72/methods/messages_reportSpam.md index bfadb9ab..08c96d44 100644 --- a/old_docs/API_docs_v72/methods/messages_reportSpam.md +++ b/old_docs/API_docs_v72/methods/messages_reportSpam.md @@ -30,13 +30,10 @@ description: messages.reportSpam parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v72/methods/messages_saveDraft.md b/old_docs/API_docs_v72/methods/messages_saveDraft.md index 42308b46..f68090c0 100644 --- a/old_docs/API_docs_v72/methods/messages_saveDraft.md +++ b/old_docs/API_docs_v72/methods/messages_saveDraft.md @@ -35,13 +35,10 @@ description: messages.saveDraft parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v72/methods/messages_saveGif.md b/old_docs/API_docs_v72/methods/messages_saveGif.md index 31e48632..d86d539a 100644 --- a/old_docs/API_docs_v72/methods/messages_saveGif.md +++ b/old_docs/API_docs_v72/methods/messages_saveGif.md @@ -31,13 +31,10 @@ description: messages.saveGif parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v72/methods/messages_saveRecentSticker.md b/old_docs/API_docs_v72/methods/messages_saveRecentSticker.md index 8d45be5e..029ca763 100644 --- a/old_docs/API_docs_v72/methods/messages_saveRecentSticker.md +++ b/old_docs/API_docs_v72/methods/messages_saveRecentSticker.md @@ -32,13 +32,10 @@ description: messages.saveRecentSticker parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v72/methods/messages_search.md b/old_docs/API_docs_v72/methods/messages_search.md index 14b02f8f..f3be635d 100644 --- a/old_docs/API_docs_v72/methods/messages_search.md +++ b/old_docs/API_docs_v72/methods/messages_search.md @@ -46,13 +46,10 @@ description: messages.search parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v72/methods/messages_searchGifs.md b/old_docs/API_docs_v72/methods/messages_searchGifs.md index 3f4c4838..dd804c99 100644 --- a/old_docs/API_docs_v72/methods/messages_searchGifs.md +++ b/old_docs/API_docs_v72/methods/messages_searchGifs.md @@ -31,13 +31,10 @@ description: messages.searchGifs parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v72/methods/messages_searchGlobal.md b/old_docs/API_docs_v72/methods/messages_searchGlobal.md index 0553dd7a..4b45eed2 100644 --- a/old_docs/API_docs_v72/methods/messages_searchGlobal.md +++ b/old_docs/API_docs_v72/methods/messages_searchGlobal.md @@ -34,13 +34,10 @@ description: messages.searchGlobal parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v72/methods/messages_sendEncrypted.md b/old_docs/API_docs_v72/methods/messages_sendEncrypted.md index 82eeec92..ba9f796b 100644 --- a/old_docs/API_docs_v72/methods/messages_sendEncrypted.md +++ b/old_docs/API_docs_v72/methods/messages_sendEncrypted.md @@ -34,16 +34,13 @@ description: messages.sendEncrypted parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v72/methods/messages_sendEncryptedFile.md b/old_docs/API_docs_v72/methods/messages_sendEncryptedFile.md index 8f7a73d9..db16bf2d 100644 --- a/old_docs/API_docs_v72/methods/messages_sendEncryptedFile.md +++ b/old_docs/API_docs_v72/methods/messages_sendEncryptedFile.md @@ -32,16 +32,13 @@ description: messages.sendEncryptedFile parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v72/methods/messages_sendEncryptedService.md b/old_docs/API_docs_v72/methods/messages_sendEncryptedService.md index d427f6c3..fd4e2627 100644 --- a/old_docs/API_docs_v72/methods/messages_sendEncryptedService.md +++ b/old_docs/API_docs_v72/methods/messages_sendEncryptedService.md @@ -34,16 +34,13 @@ description: messages.sendEncryptedService parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v72/methods/messages_sendInlineBotResult.md b/old_docs/API_docs_v72/methods/messages_sendInlineBotResult.md index 6aeeb67d..d974fe69 100644 --- a/old_docs/API_docs_v72/methods/messages_sendInlineBotResult.md +++ b/old_docs/API_docs_v72/methods/messages_sendInlineBotResult.md @@ -39,13 +39,10 @@ description: messages.sendInlineBotResult parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v72/methods/messages_sendMedia.md b/old_docs/API_docs_v72/methods/messages_sendMedia.md index b3ceb5d4..b58bf325 100644 --- a/old_docs/API_docs_v72/methods/messages_sendMedia.md +++ b/old_docs/API_docs_v72/methods/messages_sendMedia.md @@ -59,16 +59,13 @@ description: messages.sendMedia parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v72/methods/messages_sendMessage.md b/old_docs/API_docs_v72/methods/messages_sendMessage.md index 60b50412..3a515129 100644 --- a/old_docs/API_docs_v72/methods/messages_sendMessage.md +++ b/old_docs/API_docs_v72/methods/messages_sendMessage.md @@ -58,16 +58,13 @@ description: messages.sendMessage parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v72/methods/messages_sendScreenshotNotification.md b/old_docs/API_docs_v72/methods/messages_sendScreenshotNotification.md index a725a12b..890224e8 100644 --- a/old_docs/API_docs_v72/methods/messages_sendScreenshotNotification.md +++ b/old_docs/API_docs_v72/methods/messages_sendScreenshotNotification.md @@ -31,13 +31,10 @@ description: messages.sendScreenshotNotification parameters, return type and exa ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v72/methods/messages_setBotCallbackAnswer.md b/old_docs/API_docs_v72/methods/messages_setBotCallbackAnswer.md index 2c51854f..2901a558 100644 --- a/old_docs/API_docs_v72/methods/messages_setBotCallbackAnswer.md +++ b/old_docs/API_docs_v72/methods/messages_setBotCallbackAnswer.md @@ -34,16 +34,13 @@ description: messages.setBotCallbackAnswer parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v72/methods/messages_setBotPrecheckoutResults.md b/old_docs/API_docs_v72/methods/messages_setBotPrecheckoutResults.md index 25ed5ed5..5666e9ff 100644 --- a/old_docs/API_docs_v72/methods/messages_setBotPrecheckoutResults.md +++ b/old_docs/API_docs_v72/methods/messages_setBotPrecheckoutResults.md @@ -32,16 +32,13 @@ description: messages.setBotPrecheckoutResults parameters, return type and examp ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v72/methods/messages_setBotShippingResults.md b/old_docs/API_docs_v72/methods/messages_setBotShippingResults.md index 49ac2896..95376b64 100644 --- a/old_docs/API_docs_v72/methods/messages_setBotShippingResults.md +++ b/old_docs/API_docs_v72/methods/messages_setBotShippingResults.md @@ -32,16 +32,13 @@ description: messages.setBotShippingResults parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v72/methods/messages_setEncryptedTyping.md b/old_docs/API_docs_v72/methods/messages_setEncryptedTyping.md index a05b94dd..aeae6ff7 100644 --- a/old_docs/API_docs_v72/methods/messages_setEncryptedTyping.md +++ b/old_docs/API_docs_v72/methods/messages_setEncryptedTyping.md @@ -31,13 +31,10 @@ description: messages.setEncryptedTyping parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v72/methods/messages_setGameScore.md b/old_docs/API_docs_v72/methods/messages_setGameScore.md index 3137f7c9..c8ef5c49 100644 --- a/old_docs/API_docs_v72/methods/messages_setGameScore.md +++ b/old_docs/API_docs_v72/methods/messages_setGameScore.md @@ -36,16 +36,13 @@ description: messages.setGameScore parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v72/methods/messages_setInlineBotResults.md b/old_docs/API_docs_v72/methods/messages_setInlineBotResults.md index 8b5625f3..8b49c4c7 100644 --- a/old_docs/API_docs_v72/methods/messages_setInlineBotResults.md +++ b/old_docs/API_docs_v72/methods/messages_setInlineBotResults.md @@ -46,16 +46,13 @@ description: messages.setInlineBotResults parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v72/methods/messages_setInlineGameScore.md b/old_docs/API_docs_v72/methods/messages_setInlineGameScore.md index 36752f35..4c43e7d2 100644 --- a/old_docs/API_docs_v72/methods/messages_setInlineGameScore.md +++ b/old_docs/API_docs_v72/methods/messages_setInlineGameScore.md @@ -35,16 +35,13 @@ description: messages.setInlineGameScore parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v72/methods/messages_setTyping.md b/old_docs/API_docs_v72/methods/messages_setTyping.md index 9ef8caf5..f6b7b7b5 100644 --- a/old_docs/API_docs_v72/methods/messages_setTyping.md +++ b/old_docs/API_docs_v72/methods/messages_setTyping.md @@ -37,16 +37,13 @@ description: messages.setTyping parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v72/methods/messages_startBot.md b/old_docs/API_docs_v72/methods/messages_startBot.md index 8d98e390..b33ab013 100644 --- a/old_docs/API_docs_v72/methods/messages_startBot.md +++ b/old_docs/API_docs_v72/methods/messages_startBot.md @@ -35,13 +35,10 @@ description: messages.startBot parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v72/methods/messages_toggleChatAdmins.md b/old_docs/API_docs_v72/methods/messages_toggleChatAdmins.md index 3bf8a419..97328065 100644 --- a/old_docs/API_docs_v72/methods/messages_toggleChatAdmins.md +++ b/old_docs/API_docs_v72/methods/messages_toggleChatAdmins.md @@ -32,13 +32,10 @@ description: messages.toggleChatAdmins parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v72/methods/messages_toggleDialogPin.md b/old_docs/API_docs_v72/methods/messages_toggleDialogPin.md index f35f2f40..7853df5e 100644 --- a/old_docs/API_docs_v72/methods/messages_toggleDialogPin.md +++ b/old_docs/API_docs_v72/methods/messages_toggleDialogPin.md @@ -31,13 +31,10 @@ description: messages.toggleDialogPin parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v72/methods/messages_uninstallStickerSet.md b/old_docs/API_docs_v72/methods/messages_uninstallStickerSet.md index 6763e64f..76a3e3e2 100644 --- a/old_docs/API_docs_v72/methods/messages_uninstallStickerSet.md +++ b/old_docs/API_docs_v72/methods/messages_uninstallStickerSet.md @@ -30,13 +30,10 @@ description: messages.uninstallStickerSet parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v72/methods/messages_uploadMedia.md b/old_docs/API_docs_v72/methods/messages_uploadMedia.md index 03f07c26..d4b5ee7d 100644 --- a/old_docs/API_docs_v72/methods/messages_uploadMedia.md +++ b/old_docs/API_docs_v72/methods/messages_uploadMedia.md @@ -33,16 +33,13 @@ description: messages.uploadMedia parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v72/methods/payments_clearSavedInfo.md b/old_docs/API_docs_v72/methods/payments_clearSavedInfo.md index a77c50d9..fb9bae07 100644 --- a/old_docs/API_docs_v72/methods/payments_clearSavedInfo.md +++ b/old_docs/API_docs_v72/methods/payments_clearSavedInfo.md @@ -24,13 +24,10 @@ description: payments.clearSavedInfo parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v72/methods/payments_getPaymentForm.md b/old_docs/API_docs_v72/methods/payments_getPaymentForm.md index 15f6e26b..141c47f2 100644 --- a/old_docs/API_docs_v72/methods/payments_getPaymentForm.md +++ b/old_docs/API_docs_v72/methods/payments_getPaymentForm.md @@ -30,13 +30,10 @@ description: payments.getPaymentForm parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v72/methods/payments_getPaymentReceipt.md b/old_docs/API_docs_v72/methods/payments_getPaymentReceipt.md index 51433563..f6aa1ab6 100644 --- a/old_docs/API_docs_v72/methods/payments_getPaymentReceipt.md +++ b/old_docs/API_docs_v72/methods/payments_getPaymentReceipt.md @@ -30,13 +30,10 @@ description: payments.getPaymentReceipt parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v72/methods/payments_getSavedInfo.md b/old_docs/API_docs_v72/methods/payments_getSavedInfo.md index a586dcd9..4104679a 100644 --- a/old_docs/API_docs_v72/methods/payments_getSavedInfo.md +++ b/old_docs/API_docs_v72/methods/payments_getSavedInfo.md @@ -18,13 +18,10 @@ description: payments.getSavedInfo parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v72/methods/payments_sendPaymentForm.md b/old_docs/API_docs_v72/methods/payments_sendPaymentForm.md index a63a3980..180a7279 100644 --- a/old_docs/API_docs_v72/methods/payments_sendPaymentForm.md +++ b/old_docs/API_docs_v72/methods/payments_sendPaymentForm.md @@ -33,13 +33,10 @@ description: payments.sendPaymentForm parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v72/methods/payments_validateRequestedInfo.md b/old_docs/API_docs_v72/methods/payments_validateRequestedInfo.md index d839a2df..acfd1852 100644 --- a/old_docs/API_docs_v72/methods/payments_validateRequestedInfo.md +++ b/old_docs/API_docs_v72/methods/payments_validateRequestedInfo.md @@ -32,13 +32,10 @@ description: payments.validateRequestedInfo parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v72/methods/phone_getCallConfig.md b/old_docs/API_docs_v72/methods/phone_getCallConfig.md index a85fed0e..3f18d7ca 100644 --- a/old_docs/API_docs_v72/methods/phone_getCallConfig.md +++ b/old_docs/API_docs_v72/methods/phone_getCallConfig.md @@ -18,13 +18,10 @@ description: phone.getCallConfig parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v72/methods/phone_receivedCall.md b/old_docs/API_docs_v72/methods/phone_receivedCall.md index 9d59b1ea..8ca6a4e1 100644 --- a/old_docs/API_docs_v72/methods/phone_receivedCall.md +++ b/old_docs/API_docs_v72/methods/phone_receivedCall.md @@ -31,13 +31,10 @@ description: phone.receivedCall parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v72/methods/phone_saveCallDebug.md b/old_docs/API_docs_v72/methods/phone_saveCallDebug.md index 4dee5c97..ea3fa2d7 100644 --- a/old_docs/API_docs_v72/methods/phone_saveCallDebug.md +++ b/old_docs/API_docs_v72/methods/phone_saveCallDebug.md @@ -32,13 +32,10 @@ description: phone.saveCallDebug parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v72/methods/phone_setCallRating.md b/old_docs/API_docs_v72/methods/phone_setCallRating.md index fea236d1..c6e5d7fa 100644 --- a/old_docs/API_docs_v72/methods/phone_setCallRating.md +++ b/old_docs/API_docs_v72/methods/phone_setCallRating.md @@ -32,13 +32,10 @@ description: phone.setCallRating parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v72/methods/photos_deletePhotos.md b/old_docs/API_docs_v72/methods/photos_deletePhotos.md index e9cd459d..61768b1e 100644 --- a/old_docs/API_docs_v72/methods/photos_deletePhotos.md +++ b/old_docs/API_docs_v72/methods/photos_deletePhotos.md @@ -23,13 +23,10 @@ description: photos.deletePhotos parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v72/methods/photos_getUserPhotos.md b/old_docs/API_docs_v72/methods/photos_getUserPhotos.md index d6c2a380..095363e7 100644 --- a/old_docs/API_docs_v72/methods/photos_getUserPhotos.md +++ b/old_docs/API_docs_v72/methods/photos_getUserPhotos.md @@ -34,16 +34,13 @@ description: photos.getUserPhotos parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v72/methods/photos_updateProfilePhoto.md b/old_docs/API_docs_v72/methods/photos_updateProfilePhoto.md index ea3b78ec..d90aca22 100644 --- a/old_docs/API_docs_v72/methods/photos_updateProfilePhoto.md +++ b/old_docs/API_docs_v72/methods/photos_updateProfilePhoto.md @@ -23,13 +23,10 @@ description: photos.updateProfilePhoto parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v72/methods/photos_uploadProfilePhoto.md b/old_docs/API_docs_v72/methods/photos_uploadProfilePhoto.md index 58541f23..987e721c 100644 --- a/old_docs/API_docs_v72/methods/photos_uploadProfilePhoto.md +++ b/old_docs/API_docs_v72/methods/photos_uploadProfilePhoto.md @@ -34,13 +34,10 @@ description: photos.uploadProfilePhoto parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v72/methods/ping.md b/old_docs/API_docs_v72/methods/ping.md index 5bfe9dde..7c20ca86 100644 --- a/old_docs/API_docs_v72/methods/ping.md +++ b/old_docs/API_docs_v72/methods/ping.md @@ -23,16 +23,13 @@ description: ping parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v72/methods/ping_delay_disconnect.md b/old_docs/API_docs_v72/methods/ping_delay_disconnect.md index b4b1e265..e8b62005 100644 --- a/old_docs/API_docs_v72/methods/ping_delay_disconnect.md +++ b/old_docs/API_docs_v72/methods/ping_delay_disconnect.md @@ -24,16 +24,13 @@ description: ping_delay_disconnect parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v72/methods/req_DH_params.md b/old_docs/API_docs_v72/methods/req_DH_params.md index 51632fe0..697540d8 100644 --- a/old_docs/API_docs_v72/methods/req_DH_params.md +++ b/old_docs/API_docs_v72/methods/req_DH_params.md @@ -28,16 +28,13 @@ description: req_DH_params parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v72/methods/req_pq.md b/old_docs/API_docs_v72/methods/req_pq.md index 2f005ce2..7a583643 100644 --- a/old_docs/API_docs_v72/methods/req_pq.md +++ b/old_docs/API_docs_v72/methods/req_pq.md @@ -23,16 +23,13 @@ description: req_pq parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v72/methods/rpc_drop_answer.md b/old_docs/API_docs_v72/methods/rpc_drop_answer.md index 48e894a9..e15ddca9 100644 --- a/old_docs/API_docs_v72/methods/rpc_drop_answer.md +++ b/old_docs/API_docs_v72/methods/rpc_drop_answer.md @@ -23,16 +23,13 @@ description: rpc_drop_answer parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v72/methods/set_client_DH_params.md b/old_docs/API_docs_v72/methods/set_client_DH_params.md index 25f0f387..8721ed40 100644 --- a/old_docs/API_docs_v72/methods/set_client_DH_params.md +++ b/old_docs/API_docs_v72/methods/set_client_DH_params.md @@ -25,16 +25,13 @@ description: set_client_DH_params parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v72/methods/stickers_addStickerToSet.md b/old_docs/API_docs_v72/methods/stickers_addStickerToSet.md index bf62fa09..581eb1f1 100644 --- a/old_docs/API_docs_v72/methods/stickers_addStickerToSet.md +++ b/old_docs/API_docs_v72/methods/stickers_addStickerToSet.md @@ -32,16 +32,13 @@ description: stickers.addStickerToSet parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v72/methods/stickers_changeStickerPosition.md b/old_docs/API_docs_v72/methods/stickers_changeStickerPosition.md index 942d3a33..391ee3d3 100644 --- a/old_docs/API_docs_v72/methods/stickers_changeStickerPosition.md +++ b/old_docs/API_docs_v72/methods/stickers_changeStickerPosition.md @@ -32,16 +32,13 @@ description: stickers.changeStickerPosition parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v72/methods/stickers_createStickerSet.md b/old_docs/API_docs_v72/methods/stickers_createStickerSet.md index 7c5b6821..64a5a978 100644 --- a/old_docs/API_docs_v72/methods/stickers_createStickerSet.md +++ b/old_docs/API_docs_v72/methods/stickers_createStickerSet.md @@ -42,16 +42,13 @@ description: stickers.createStickerSet parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v72/methods/stickers_removeStickerFromSet.md b/old_docs/API_docs_v72/methods/stickers_removeStickerFromSet.md index 51e52f95..68c2305f 100644 --- a/old_docs/API_docs_v72/methods/stickers_removeStickerFromSet.md +++ b/old_docs/API_docs_v72/methods/stickers_removeStickerFromSet.md @@ -31,16 +31,13 @@ description: stickers.removeStickerFromSet parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v72/methods/upload_getWebFile.md b/old_docs/API_docs_v72/methods/upload_getWebFile.md index ec7c05b4..8744dac5 100644 --- a/old_docs/API_docs_v72/methods/upload_getWebFile.md +++ b/old_docs/API_docs_v72/methods/upload_getWebFile.md @@ -32,13 +32,10 @@ description: upload.getWebFile parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/old_docs/API_docs_v72/methods/users_getUsers.md b/old_docs/API_docs_v72/methods/users_getUsers.md index 6a44d258..3a981d57 100644 --- a/old_docs/API_docs_v72/methods/users_getUsers.md +++ b/old_docs/API_docs_v72/methods/users_getUsers.md @@ -33,16 +33,13 @@ description: users.getUsers parameters, return type and example ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = 'mySession.madeline'; if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo 'Enter the code you received: '; - $code = ''; - for ($x = 0; $x < $sentCode['type']['length']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline('Enter the code you received: '); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); } diff --git a/src/danog/MadelineProto/DocsBuilder/Methods.php b/src/danog/MadelineProto/DocsBuilder/Methods.php index 69c72a9d..a8de2ccf 100644 --- a/src/danog/MadelineProto/DocsBuilder/Methods.php +++ b/src/danog/MadelineProto/DocsBuilder/Methods.php @@ -189,16 +189,13 @@ description: '.$description.' ``` $MadelineProto = new \danog\MadelineProto\API(); +$MadelineProto->session = \'mySession.madeline\'; '.($bot ? 'if (isset($token)) { // Login as a bot $MadelineProto->bot_login($token); } ' : '').'if (isset($number)) { // Login as a user - $sentCode = $MadelineProto->phone_login($number); - echo \'Enter the code you received: \'; - $code = \'\'; - for ($x = 0; $x < $sentCode[\'type\'][\'length\']; $x++) { - $code .= fgetc(STDIN); - } + $MadelineProto->phone_login($number); + $code = readline(\'Enter the code you received: \'); // Or do this in two separate steps in an HTTP API $MadelineProto->complete_phone_login($code); }