1:- module(bitrix24_imbot, [ 2 bot_register/3, 3 bot_register/4, 4 bot_get/3, 5 bot_get/4, 6 chat_add/3, 7 chat_add/4, 8 chat_get/3, 9 chat_get/4, 10 chat_user_add/3, 11 chat_user_add/4, 12 chat_message_send/3, 13 chat_message_send/4, 14 file_upload/3, 15 file_upload/4 16 ]). 17 18:- use_module(bitrix24_rest). 19 20bot_register(Provider, Params, Result) :- 21 bitrix24_rest:api_call(Provider, 'imbot.v2.Bot.register', Params, Result). 22 23bot_register(Provider, ContextRef, Params, Result) :- 24 bitrix24_rest:api_call(Provider, ContextRef, 'imbot.v2.Bot.register', Params, Result). 25 26bot_get(Provider, Params, Result) :- 27 bitrix24_rest:api_call(Provider, 'imbot.v2.Bot.get', Params, Result). 28 29bot_get(Provider, ContextRef, Params, Result) :- 30 bitrix24_rest:api_call(Provider, ContextRef, 'imbot.v2.Bot.get', Params, Result). 31 32chat_add(Provider, Params, Result) :- 33 bitrix24_rest:api_call(Provider, 'imbot.chat.add', Params, Result). 34 35chat_add(Provider, ContextRef, Params, Result) :- 36 bitrix24_rest:api_call(Provider, ContextRef, 'imbot.chat.add', Params, Result). 37 38chat_get(Provider, Params, Result) :- 39 bitrix24_rest:api_call(Provider, 'imbot.chat.get', Params, Result). 40 41chat_get(Provider, ContextRef, Params, Result) :- 42 bitrix24_rest:api_call(Provider, ContextRef, 'imbot.chat.get', Params, Result). 43 44chat_user_add(Provider, Params, Result) :- 45 bitrix24_rest:api_call(Provider, 'imbot.chat.user.add', Params, Result). 46 47chat_user_add(Provider, ContextRef, Params, Result) :- 48 bitrix24_rest:api_call(Provider, ContextRef, 'imbot.chat.user.add', Params, Result). 49 50chat_message_send(Provider, Params, Result) :- 51 bitrix24_rest:api_call(Provider, 'imbot.v2.Chat.Message.send', Params, Result). 52 53chat_message_send(Provider, ContextRef, Params, Result) :- 54 bitrix24_rest:api_call(Provider, ContextRef, 'imbot.v2.Chat.Message.send', Params, Result). 55 56file_upload(Provider, Params, Result) :- 57 bitrix24_rest:api_call(Provider, 'imbot.v2.File.upload', Params, Result). 58 59file_upload(Provider, ContextRef, Params, Result) :- 60 bitrix24_rest:api_call(Provider, ContextRef, 'imbot.v2.File.upload', Params, Result)