Issue
I am using the google calendar API in my project (Angular in my case). My problem is that I have a situation in which I need to query events by multiple emails in one request. By using the "q" field in the request - which represents a free search, I can only search for events by one term- in my case, it means one email.
Example for my request:
gapi.client.calendar.events.list({
'calendarId': 'primary',
'maxResults': '9999999',
'q': 'xxx@gmail.com' (and here I want to put more than one email but I can't!)
})
Can I use this field or is there any other way in which I can get events by multiple emails in one request?
Solution
In your situation, how about the following modification?
From:
'q': 'xxx@gmail.com'
To:
'q': 'xxx@gmail.com mail2@gmail.com mail3@gmail.com'
- In this case, those emails are used as "AND". When you want to use these emails as "OR", it is required to request them as each request.
Note:
- In this case,
q
is used as the query parameter. So, when you add a lot of emails and when an error related to the length of the URL occurs, please split the requests. Please be careful about this.
Reference:
Answered By - Tanaike
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.