bitrix24
is a collection of tools to make writing prolog programs with bitrix24 api .
Run
pack_install(bitrix24).
Test
swipl -g run_tests -t halt prolog/test_bitrix24.plt
yaml structure
app:
application_id: local.63fc74d3bc5678.07353434
client_secret: DbRl2KqHtSwdF7nJpsTbTpXrIMsdfsdr469LxNzDtzgVFsA2San2hYL
[[opt(configdir), type(atom), default('/etc/bitrix24/'), longflags([configdir]),
help('directory for storing settings (for "static" URL)')],
[opt(appdir), type(atom), default('/opt/bitrix24/'), longflags([appdir]),
help('directory for storing settings')]]
add to your app
bitrix24_config:load_config(Opts.configdir),
bitrix24_config:catalog_app(Opts.appdir),
bitrix24_auth:open_db(Opts.appdir),
An example of how to handle application registration
handle_install(Request) :-
member(method(post), Request),
member(content_type('application/x-www-form-urlencoded'), Request), !,
http_read_data(Request, Data, []),
bitrix24_regapp:install(Data),
format('Content-type: text/plain~n~n'),
format('Hello World!~n').