Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我正在尝试使用 Gmail API 进行高级搜索,但我不知道如何设置查询参数。我想用 query 进行搜索is:chat,所以所有返回的消息都只是聊天消息。
is:chat
在文档的示例中,他们使用了一个名为 的方法setQ("query"),但这仅适用于 Java。有人知道如何在 C# 中设置此参数吗?
setQ("query")
编辑: 在Java中,会是这样的:service.users().messages().list("me").setQ("is:chat").execute();
service.users().messages().list("me").setQ("is:chat").execute();
好吧,我现在感觉有点傻,答案很简单。它只需要将调用分成三行:
ListRequest request = service.Users.Messages.List("me"); request.Q = "is:chat"; ListMessagesResponse response = await request.Execute();