1
0
mirror of https://github.com/Bayselonarrend/OpenIntegrations.git synced 2026-05-22 10:05:29 +02:00
Files
OpenIntegrations/docs/en/examples/GoogleCalendar/CreateEvent.txt
T
Vitaly the Alpaca (bot) 6473088320 Main build (Jenkins)
2024-11-05 13:10:27 +03:00

25 lines
1.3 KiB
Plaintext

CurrentDate = OPI_Tools.GetCurrentDate();
Token = "ya29.a0AeDClZCyyq2tOx0JRD_XVIaMyzhn2uw2tXz5q_8IavFpdrB2btMzTnCCZO3k0K-cq5rv7dXqrg2-ddLdFJqrq0HqLeTkWJkeFqI6iaoCX...";
Calendar = "f0d578a23e39bff6bc6eb72747799f6540afab06e821ef8b5b02a092ab99176e@group.calendar.google.com";
Name = "New event";
Description = "TestEventDescription";
Hour = 3600;
Image1 = "https://api.athenaeum.digital/test_data/picture.jpg"; // URL, Binary or Path to file
Image2 = "https://api.athenaeum.digital/test_data/picture2.jpg"; // URL, Binary or Path to file
Attachments = New Map;
Attachments.Insert("Image1", Image1);
Attachments.Insert("Image2", Image2);
EventDescription = New Map;
EventDescription.Insert("Description" , Description);
EventDescription.Insert("Title" , Name);
EventDescription.Insert("Venue" , "InOffice");
EventDescription.Insert("StartDate" , CurrentDate);
EventDescription.Insert("EndDate" , EventDescription["StartDate"] + Hour);
EventDescription.Insert("ArrayOfAttachmentURLs" , Attachments);
EventDescription.Insert("SendNotifications" , True);
Result = OPI_GoogleCalendar.CreateEvent(Token, Calendar, EventDescription);