Поддержка серверов

IMBOT: методы, функции, константы класса Битрикс


Блог разработчика

9 Августа 2016 ResizeImageGet и простой водяной знак налету

Сегодня поговорим о том как проще всего воткнуть водяной знак на картинки в Битрикс. Например, на все изображения каталога.

21 Июля 2016 Добавление вкладки в CRM коробки Битрикс24

В этом посте я покажу, как легко и просто добавить вкладку в сущность CRM. И не просто добавить, а вывести там свой контент.

21 Июля 2016 Как просто обращаться из коробки Битрикс24 на сайт на базе Битрикс

К примеру вам хочется внутренним скриптом дернуть с сайта-магазина информацию, которая там, в свою очередь, закрыта некоторыми правами. Например, админскими. Можно конечно мутить свой REST, или иной формат общения, но проще всего воспользоваться штатным инструментом:

Константы модуля imbot

КонстантаПроверяется
BOT_CLIENT_GEO_DATANetwork::getUserGeoData
BOT_IFRAME_URLGiphy::getIframeUrl
BOT_CONTROLLER_URLHttp::query
BOT_CLIENT_URLHttp::getServerAddress

Список функций и методов модуля imbot

Метод
Designer::__construct($portalId, $dialogId, $botId, $userId)
Designer::addMenu(Menu $items)
Designer::getCurrentMenu()
Designer::setCurrentMenu($id)
Designer::execMenuItem($itemId = '')
Designer::getMenuItems()
Designer::run($text)
Menu::__construct($id)
Menu::getId()
Menu::getText()
Menu::getItems()
Menu::setText($text)
Menu::addItem($id, $title, array $action)
Item::void($hideMenu = true)
Item::sendText($text = '', $hideMenu = false)
Item::openMenu($menuId)
Item::transferToQueue($text = '', $hideMenu = true)
Item::transferToUser($userId, $leave = false, $text = '', $hideMenu = true)
Item::transferToBot($botCode, $leave = true, $text = '', $errorText = '')
Item::finishSession($text = '')
Item::execFunction($function, $text = '', $hideMenu = false)
Network::register(array $params = Array())
Network::unRegister($code = '', $serverRequest = true)
Network::isNeedUpdateBotFieldsAfterNewMessage()
Network::onReceiveCommand($command, $params)
Network::clientMessageAdd($messageId, $messageFields)
Network::clientMessageUpdate($messageId, $messageFields)
Network::clientMessageDelete($messageId, $messageFields)
Network::clientStartWriting($params)
Network::clientSessionVote($params)
Network::clientMessageReceived($params)
Network::operatorMessageAdd($messageId, $messageFields)
Network::operatorMessageUpdate($messageId, $messageFields)
Network::operatorMessageDelete($messageId, $messageFields)
Network::operatorStartWriting($params)
Network::operatorMessageReceived($params)
Network::onChatStart($dialogId, $joinFields)
Network::onMessageAdd($messageId, $messageFields)
Network::onMessageUpdate($messageId, $messageFields)
Network::onMessageDelete($messageId, $messageFields)
Network::onStartWriting($params)
Network::onSessionVote($params)
Network::onAnswerAdd($command, $params)
Network::onLocalCommandAdd($messageId, $messageFields)
Network::getUserGeoData()
Network::getLangMessage($messageCode = '')
Network::uploadAvatar($avatarUrl = '')
Network::join($code, $options = array())
Network::search($text, $register = false)
Network::registerConnector($lineId, $fields = array())
Network::updateConnector($lineId, $fields)
Network::unRegisterConnector($lineId)
Network::setNetworkBotId($code, $id)
Network::getNetworkBotId($code)
Network::getBotId()
Network::isFdcCode($text)
Network::setBotId($id)
Network::addFdc($userId)
Network::sendTextFdc($userId, $text = '30-1')
Network::removeFdc($userId)
Network::fdcOnChatStart($dialogId, $joinFields)
Network::fdcOnMessageAdd($messageId, $messageFields)
Network::fdcOnAfterUserAuthorize($params)
Network::fdcAddWelcomeMessageAgent($userId)
OpenlinesListenerExample::register(array $params = Array())
OpenlinesListenerExample::unRegister()
OpenlinesListenerExample::onChatStart($dialogId, $joinFields)
OpenlinesListenerExample::onMessageAdd($messageId, $messageFields)
OpenlinesListenerExample::onBotDelete($bodId)
OpenlinesListenerExample::prepareText($message)
OpenlinesListenerExample::getLastMessageId($dialogId)
OpenlinesListenerExample::setLastMessageId($dialogId, $messageId)
OpenlinesListenerExample::getBotId()
OpenlinesListenerExample::setBotId($id)
Giphy::register(array $params = Array())
Giphy::unRegister()
Giphy::onChatStart($dialogId, $joinFields)
Giphy::onMessageAdd($messageId, $messageFields)
Giphy::onAnswerAdd($command, $params)
Giphy::sendAnswer($messageId, $messageFields)
Giphy::sendMessage($params)
Giphy::onCommandAdd($messageId, $messageFields)
Giphy::onCommandLang($command, $lang = null)
Giphy::onAppLang($icon, $lang = null)
Giphy::getLangMessage($messageCode = '')
Giphy::getIframeUrl()
OpenlinesMenuExample::register(array $params = Array())
OpenlinesMenuExample::unRegister()
OpenlinesMenuExample::onChatStart($dialogId, $joinFields)
OpenlinesMenuExample::onMessageAdd($messageId, $messageFields)
OpenlinesMenuExample::onBotDelete($bodId)
OpenlinesMenuExample::prepareText($message)
OpenlinesMenuExample::itrRun($dialogId, $userId, $message = '')
OpenlinesMenuExample::getBotId()
OpenlinesMenuExample::setBotId($id)
Properties::register(array $params = Array())
Properties::unRegister()
Properties::onChatStart($dialogId, $joinFields)
Properties::onMessageAdd($messageId, $messageFields)
Properties::onAnswerAdd($command, $params)
Properties::sendAnswer($messageId, $messageFields)
Properties::convertOrganizationToAttach(array $organizationFields)
Properties::convertIpToAttach(array $ipFields)
Properties::convertSearchResultsToAttach(array $searchResults, array $messageFields)
Properties::parseRequest($request)
Properties::sendMessage($dialogId, $messageId, $messageText)
Properties::validateRequest($request)
Properties::getLangMessage($messageCode = '')
Support::register(array $params = Array())
Support::checkPublicUrl()
Support::unRegister($code = '', $serverRequest = true)
Support::onChatStart($dialogId, $joinFields)
Support::onMessageAdd($messageId, $messageFields)
Support::getBotId()
Support::isEnabled()
Support::getCode()
PropertiesUa::register(array $params = Array())
PropertiesUa::unRegister()
PropertiesUa::onChatStart($dialogId, $joinFields)
PropertiesUa::onMessageAdd($messageId, $messageFields)
PropertiesUa::onAnswerAdd($command, $params)
PropertiesUa::sendAnswer($messageId, $messageFields)
PropertiesUa::convertUoToAttach(array $uoFields)
PropertiesUa::convertFoToAttach(array $foFields)
PropertiesUa::convertSearchResultsToAttach(array $searchResults, array $messageFields)
PropertiesUa::parseRequest($request)
PropertiesUa::sendMessage($dialogId, $messageId, $messageText)
PropertiesUa::validateRequest($request)
PropertiesUa::getLangMessage($messageCode = '')
Support24::getSupportLevel()
Support24::getLicenceLanguage()
Support24::getBusinessUsers()
Support24::getAdministrators()
Support24::getBotCode()
Support24::getNetworkOptions()
Support24::register(array $params = Array())
Support24::unRegister($code = '', $serverRequest = true)
Support24::isEnabled()
Support24::getBotId()
Support24::getBotName()
Support24::getBotDesc()
Support24::getSessionId()
Support24::setSessionId($sessionId)
Support24::getPartnerId()
Support24::getPartnerName()
Support24::getPartnerCode()
Support24::getPartnerData()
Support24::getSupportLifeTime()
Support24::isActiveFreeSupport()
Support24::isActiveFreeSupportForUser($userId)
Support24::isUserAdmin($userId)
Support24::isUserIntegrator($userId)
Support24::isActivePaidSupport()
Support24::isActivePaidSupportForUser($userId)
Support24::isNeedUpdateBotFieldsAfterNewMessage()
Support24::onAnswerAdd($command, $params)
Support24::onReceiveCommand($command, $params)
Support24::onWelcomeMessage($dialogId, $joinFields)
Support24::onMessageAdd($messageId, $messageFields)
Support24::onStartWriting($params)
Support24::onAfterLicenseChange()
Support24::onAfterUserAuthorize($params)
Support24::updateBotProperties()
Support24::sendMessage($messageFields)
Support24::replacePlaceholders($message, $userId = 0)
Support24::scheduleAction($userId, $action, $code = '', $delayMinutes = 1)
Support24::deleteScheduledAction($userId = null, $action = '', $code = '')
Support24::scheduledActionAgent($userId, $action, $code = '')
Support24::execScheduleAction($userId, $action, $code = '')
Support24::getMessage($code, $supportLevel = null)
ServiceExample::register(array $params = Array())
ServiceExample::unRegister()
ServiceExample::onChatStart($dialogId, $joinFields)
ServiceExample::onMessageAdd($messageId, $messageFields)
ServiceExample::onMessageUpdate($messageId, $messageFields)
ServiceExample::onMessageDelete($messageId, $messageFields)
ServiceExample::onBotDelete($bodId)
ServiceExample::getBotId()
ServiceExample::setBotId($id)
Base::getBotId()
Base::setBotId($id)
Base::getBotOption($userId, $name, $value = false)
Base::setBotOption($userId, $name, $value)
Base::onChatStart($dialogId, $joinFields)
Base::onMessageAdd($messageId, $messageFields)
Base::onAnswerAdd($command, $params)
Base::onCommandAdd($messageId, $messageFields)
Base::onCommandLang($command, $lang = null)
Base::onBotDelete($bodId)
Base::uploadAvatar($lang = LANGUAGE_ID)
Base::uploadIcon($iconName)
Base::getClassName()
Base::getError()
Marta::register(array $params = Array())
Marta::unRegister()
Marta::onChatStart($dialogId, $joinFields)
Marta::onMessageAdd($messageId, $messageFields)
Marta::onSettingsCommandAdd($messageId, $messageFields)
Marta::onLocalCommandAdd($messageId, $messageFields)
Marta::onCommandAdd($messageId, $messageFields)
Marta::onAnswerAdd($command, $params)
Marta::onAfterUserAuthorize($params)
Marta::onAfterTmDayStart($params)
Marta::addPlannerMessageAgent($userId)
Marta::addRenameMessageAgent($userId = null)
Marta::onRenamePortalDomainChange($params)
Marta::onRenamePortalLaterCommand($messageId, $messageFields)
Marta::notifyAboutPlans($dialogId, $userId)
Marta::getHelloMessage($userId, $language = null)
Marta::sendAnswer($messageId, $messageFields)
Marta::sendAnswerCommand($messageId, $messageFields)
Marta::sendMessage($params)
Marta::sendCommand($params)
Marta::getLangMessage($messageCode = '')
Marta::onAppLang($icon, $lang = null)
Marta::addWelcomeMessageAgent()
Event::onUserRead($params)
Event::onMessageLike($params)
Event::onStartWriting($params)
Event::onSessionVote($params)
Controller::sendToBot($botName, $command, $params)
Controller::sendToService($serviceName, $command, $params)
Http::__construct($botId)
Http::getPortalType()
Http::getServerAddress()
Http::requestSign($type, $str)
Http::query($command, $params = array(), $waitResponse = false)
Http::sendMessage($dialogId, $messageId, $messageText, $userName, $userAge = 30)
Http::getError()
Openlines::onReceiveCommand($command, $params)
Openlines::operatorMessageAdd($params)
Openlines::operatorMessageUpdate($params)
Openlines::operatorMessageDelete($params)
Openlines::operatorStartWriting($params)
Openlines::operatorMessageReceived($params)
Log::write($data, $title = '')
Log::writeToFile($fileName, $data, $title = '')
Error::__construct($method, $code, $msg, $params = Array())
imbot::imbot()
imbot::DoInstall()
imbot::InstallEvents()
imbot::CheckModules()
imbot::InstallDB($params = Array())
imbot::InstallFiles()
imbot::UnInstallEvents()
imbot::DoUninstall()
imbot::UnInstallDB($arParams = Array())
imbot::UnInstallFiles($arParams = array())