35 lines
804 B
Lua
35 lines
804 B
Lua
local _M = require('bitrix.api')
|
|
local array = require('utils.array')
|
|
|
|
_M.calendar = {}
|
|
_M.calendar.event = {}
|
|
_M.calendar.section = {}
|
|
|
|
--[[
|
|
События (calendar.event.*)
|
|
--]]
|
|
|
|
-- https://apidocs.bitrix24.ru/api-reference/calendar/calendar-event-add.html
|
|
|
|
function _M.calendar.event.add(fields)
|
|
return _M.post('calendar.event.add', { ['fields'] = fields })
|
|
end
|
|
|
|
-- https://apidocs.bitrix24.ru/api-reference/calendar/calendar-event-get.html
|
|
|
|
function _M.calendar.event.get(event_id)
|
|
return _M.post('calendar.event.get', { ['event_id'] = event_id })
|
|
end
|
|
|
|
--[[
|
|
Календари (calendar.section.*)
|
|
--]]
|
|
|
|
-- https://apidocs.bitrix24.ru/api-reference/calendar/calendar-section-get.html
|
|
|
|
function _M.calendar.section.get()
|
|
return _M.post('calendar.section.get', {})
|
|
end
|
|
|
|
return _M
|