Icalendar ICS Rails:如何在没有订阅的情况下直接事件到我的日历

时间:2019-05-13 08:45:47

标签: ruby-on-rails-4 icalendar

我正在使用icalendar宝石。

我经历了icalendar方法,但是找不到任何有用的信息。这是我到目前为止的代码:

@calendar = Icalendar::Calendar.new
event = Icalendar::Event.new
event.uid = 'UID333'
event.dtstart = Icalendar::Values::Date.new('20190828')
event.dtend = Icalendar::Values::Date.new('20190829')
event.summary ="THIS IS SUMMARY"
event.description = "THIS IS DESCRIPTUON"
event.location = "THIS IS LOCATION"
@calendar.add_event(event)
@calendar.publish
render plain: @calendar.to_ical

我想在没有订阅的情况下将事件添加到我的Outlook日历中。使用上面的代码,它将在“其他日历”下添加带有“未命名”的订阅事件。我的目标是将其直接添加到我的Outlook默认日历中。这有可能吗?如果可以,那么有没有人举一个例子说明如何做到这一点?

0 个答案:

没有答案