2017-03-03 198 views
7

我想用谷歌日曆API訪問我的日曆帳戶中的提醒日曆。我似乎無法在文檔中找到任何內容。當我請求我的日曆列表時,除了提醒日曆以外,它還會爲我提供日曆帳戶中的每個日曆。谷歌日曆api提醒

我想用某種方式使用Google日曆API添加提醒。

+1

沒有辦法做到這一點現在。 – luc

+2

將你的明星添加到[功能請求]中(https://code.google.com/a/google.com/p/apps-api-issues/issues/detail?id=4437&can=1&sort=-stars&colspec=Stars% 20Opened%20ID%20Type%20Status%20Summary%20API%20Owner)。 –

+0

對任何人:如@ aaron-alphonsus所寫,請在Google問題跟蹤器上爲**問題提供['Add a API for Reminders'](https://issuetracker.google.com/issues/36760283)問題!這將對此產生一些突出或壓力。謝謝 – Pascal

回答

0

您可以使用您的日曆ID來引用該日曆。

  1. 去谷歌日曆
  2. 轉到日曆日曆您正在嘗試引用
  3. 滾動至底部設置並找到它說的日曆地址:對面就是您的日曆ID。在你的查詢中使用它。例如,在迅速獲得從日曆事件使用這個

    let query = GTLRCalendarQuery_EventsList.query(withCalendarId: "insert your calendar ID here") 
    query.maxResults = 10 
    query.timeMin = GTLRDateTime(date: Date()) 
    query.singleEvents = true 
    query.orderBy = kGTLRCalendarOrderByStartTime 
    
    service.executeQuery(
        query, 
        delegate: self, 
        didFinish:   #selector(displayResultWithTicket(ticket:finishedWithObject:error:)))