Google calendar API - search event by name

懵懂的女人 提交于 2019-12-12 05:04:22

问题


I use a query parameter q=something to search

From the documentation here it is evident that q="Match entire phrase" will return all events that match Match AND entire AND phrase

But I cannot search for an event something like this "abc 1.34 - 3.03 p.m." to be clear whenever there is a minus sign the search breaks understanding it as negation

I tried escaping minus as - by "abc 1.34 \- 3.03 p.m." but I was not successful.

How do I search for the event by exact which has numbers and special chars?


回答1:


You're referencing a deprecated documentation. Instead try Events.list. There is a Try-it section. I placed a query statement in the 'q' parameter and it worked, returned the event to me:

  {
     "kind": "calendar#events",
     "etag": "\"p328xp1nqajltc9g\"",
     "summary": "myname@gmail.com",
     "updated": "2017-10-12T14:25:18.442Z",
     "timeZone": "Underworld",
     "accessRole": "owner",
     "defaultReminders": [
      {
       "method": "popup",
       "minutes": 30
      }
     ],
     "nextSyncToken": "abcdefghijklmno",
     "items": []
    }


来源:https://stackoverflow.com/questions/46703466/google-calendar-api-search-event-by-name

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!