Msgraph python sdk - 添加顶部查询参数所需功能缺失

问题描述 投票:0回答:1

当前正在创建一个小型云函数,该函数将使用适用于 Python 的 microsftgraph sdk 从 Outlook 收件箱中提取消息。我试图做到这一点,以便应用程序在第一个请求中提取尽可能多的消息,而实现此目的的方法似乎是添加“top”查询参数并将其设置为 1000 - 最大值。然而,为实现此目的提供的示例似乎使用了一个不存在的函数 - MessagesRequestBuilderGetRequestConfiguration。有谁有任何解决方案或者我错过了什么? https://github.com/microsoftgraph/msgraph-sdk-python/blob/main/docs/general_samples.md

Example code I am using

函数所在的文件应该是: https://github.com/microsoftgraph/msgraph-sdk-python/blob/main/msgraph/ generated/users/item/messages/messages_request_builder.py

我还没有尝试过任何东西,我知道我可能可以自己发送请求,而不是使用客户端库,但理想情况下希望有一种方法让它工作。

python microsoft-graph-api
1个回答
0
投票

我认为它只是在等待文档更新,让它像这样工作:

from kiota_abstractions.base_request_configuration import RequestConfiguration

query_params= MessageRequestBuilder.MessageRequestBuilderGetQueryParams(top=1000)
request_config= RequestConfiguration(query_parameters=query_params)

SomeProcess.get(request_configuration=request_config)
© www.soinside.com 2019 - 2024. All rights reserved.