mirror of
https://github.com/Bayselonarrend/OpenIntegrations.git
synced 2025-03-25 21:39:21 +02:00
70 lines
2.6 KiB
Plaintext
Vendored
70 lines
2.6 KiB
Plaintext
Vendored
URL = "https://b24-ar17wx.bitrix24.by/rest/1/h0m...";
|
|
CalendarID = "188";
|
|
|
|
Tomorrow = OPI_Tools.GetCurrentDate() + 86400;
|
|
Hour = 3600;
|
|
|
|
EventStucture = New Structure;
|
|
|
|
EventStucture.Insert("type" , "user");
|
|
EventStucture.Insert("ownerId" , 1);
|
|
EventStucture.Insert("from" , XMLString(Tomorrow));
|
|
EventStucture.Insert("to" , XMLString(Tomorrow + Hour));
|
|
EventStucture.Insert("section" , CalendarID);
|
|
EventStucture.Insert("name" , "New event");
|
|
EventStucture.Insert("skip_time" , "N");
|
|
EventStucture.Insert("timezone_from", "Europe/Minsk");
|
|
EventStucture.Insert("timezone_to" , "Europe/Minsk");
|
|
EventStucture.Insert("description" , "Event description");
|
|
EventStucture.Insert("color" , "%23000000>");
|
|
EventStucture.Insert("text_color" , "%23FFFFFF");
|
|
EventStucture.Insert("accessibility", "busy");
|
|
EventStucture.Insert("importance" , "high");
|
|
EventStucture.Insert("private_event", "N");
|
|
|
|
RepeatabilityStructure = New Structure;
|
|
RepeatabilityStructure.Insert("FREQ" , "DAILY");
|
|
RepeatabilityStructure.Insert("COUNT" , 3);
|
|
RepeatabilityStructure.Insert("INTERVAL", 10);
|
|
|
|
DaysArray = New Array;
|
|
DaysArray.Add("SA");
|
|
DaysArray.Add("MO");
|
|
|
|
RepeatabilityStructure.Insert("BYDAY" , DaysArray);
|
|
RepeatabilityStructure.Insert("UNTIL" , XMLString(Tomorrow + Hour * 24 * 10));
|
|
|
|
EventStucture.Insert("rrule" , RepeatabilityStructure);
|
|
EventStucture.Insert("is_meeting", "Y");
|
|
EventStucture.Insert("location" , "Office");
|
|
|
|
RemindersArray = New Array;
|
|
|
|
ReminderStructure = New Structure;
|
|
ReminderStructure.Insert("type" , "day");
|
|
ReminderStructure.Insert("count", 1);
|
|
|
|
RemindersArray.Add(ReminderStructure);
|
|
|
|
EventStucture.Insert("remind" , RemindersArray);
|
|
EventStucture.Insert("attendees", StrSplit("1,10", ","));
|
|
EventStucture.Insert("host" , 1);
|
|
|
|
MeetingStructure = New Structure;
|
|
MeetingStructure.Insert("notify" , "Y");
|
|
MeetingStructure.Insert("reinvite" , "Y");
|
|
MeetingStructure.Insert("allow_invite", "N");
|
|
MeetingStructure.Insert("hide_guests" , "N");
|
|
|
|
EventStucture.Insert("meeting", MeetingStructure);
|
|
|
|
Result = OPI_Bitrix24.CreateCalendarEvent(URL, EventStucture);
|
|
|
|
URL = "b24-ar17wx.bitrix24.by";
|
|
Token = "39b8a567006e9f06006b12e400000001000...";
|
|
CalendarID = "190";
|
|
|
|
EventStucture.Insert("section", CalendarID);
|
|
|
|
Result = OPI_Bitrix24.CreateCalendarEvent(URL, EventStucture, Token);
|