I'm trying to do an advanced search using the Gmail API, but I can't figure out how to set the parameters of the query. I want to do a search with the query is:chat
, so all the returned messages will be only chat messages.
In the documentation's example, they use a method called setQ("query")
, but that only works in Java. Does someone knows how to set this parameter in C#?
Edit:
In Java, would be like this: service.users().messages().list("me").setQ("is:chat").execute();
Ok, I feel kind of dumb right now, the answer was very simple. It just requires to separate the call in three lines:
ListRequest request = service.Users.Messages.List("me");
request.Q = "is:chat";
ListMessagesResponse response = await request.Execute();
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With