0
GoogleカレンダーAPIを使用して定期的な予定を作成できません。私は特異イベントを作成することができますが、反復プロパティに「繰り返し」ルールを追加すると「操作を完了できませんでした(無効な値)」というエラーメッセージが表示されます(timezone.name = America /ニューヨーク)APIを使用してGoogleカレンダーで定期的な予定を作成する
私はイベントオブジェクトを作成するために、以下のコードを使用しています、条件がfalseの場合、イベントがGoogleカレンダーに作成される 私の質問はどのように1は、Googleカレンダーを使用して定期的なイベントを作成するんですAPI?誰かが私が下に間違っていることを教えてもらえますか?
ご協力いただきありがとうございます。
let gEvent = GTLCalendarEvent()
let timeZone = NSTimeZone.systemTimeZone()
let startTime = NSDate.dateFromString("2016-10-18 21:31:00 +0000")
let endTime = NSDate.dateFromString("2016-10-18 22:31:00 +0000")
let start = GTLCalendarEventDateTime()
let end = GTLCalendarEventDateTime()
if event.EventRepeat.toBool() == true {
end.dateTime = GTLDateTime(date:endTime, timeZone: nil)
start.dateTime = GTLDateTime(date:startTime, timeZone: nil)
start.timeZone = timeZone.name
end.timeZone = timeZone.name
gEvent.recurrence = ["FREQ=WEEKLY;BYDAY=SU,MO,TU,WE,TH,FR,SA;INTERVAL=1;UNTIL=20171031T040000Z"]
}else{
end.dateTime = GTLDateTime(date:endTime, timeZone: timeZone)
start.dateTime = GTLDateTime(date:startTime, timeZone: timeZone)
}
gEvent.start = start
gEvent.end = end
gEvent.summary = "Example Event"
gEvent.descriptionProperty = "Example Event Description"
return gEvent