gpt4 book ai didi

ios - Office365获取消息并过滤来自谁

转载 作者:行者123 更新时间:2023-11-29 02:13:10 26 4
gpt4 key购买 nike

我正在尝试从 office365 获取消息并过滤 From 属性。如果我不执行过滤器部分,我会按预期收到消息。我只是不知道要在过滤器字符串中放入什么...

这是我所做的:

MSOutlookFolderFetcher *folderFetcher = [[self.client getMe] getFoldersById:folderID];
NSURLSessionTask *task = [[[[[[folderFetcher getMessages] top:10] skip:0] orderBy:@"DateTimeReceived"] filter:[NSString stringWithFormat:@"From.EmailAddress.Address eq '%@'",emailAddress]] read:^(NSArray<MSOutlookMessage> *messages, MSODataException *error) {


completion(messages);
}];

[task resume];

我收到以下错误:

代码:400

消息:“无法解析 OData 请求 URL。”

这是他们纪录片的链接:http://www.odata.org/documentation/odata-version-2-0/uri-conventions#FilterSystemQueryOption

我已经尝试了几个选项,有引号,没有引号......用“=”和“eq”,正如他们的文档所说......没有任何效果。

有人知道答案吗??

谢谢

最佳答案

Office 365 API 目前不支持对复杂类型进行筛选。不幸的是,From 是一个复杂的类型。来自 https://msdn.microsoft.com/office/office365/APi/complex-types-for-mail-contacts-calendar#UseODataqueryparameters : "请注意,您不能对复杂类型使用 $filter。"

关于ios - Office365获取消息并过滤来自谁,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/29060519/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com