它正在向某些团队的频道ID带来消息和回复。
用这个,
https://graph.microsoft.com/beta/teams/{teamId}/channels/{channelId}/messages/{messageId}/replies?$top=50
如果我们得到超过 50 个结果,它会返回 @odata.nextLink contains 'skiptoken'
像这样..
https://graph.microsoft.com/beta/teams/{teamId}/channels/{channelId}/messages/{messageId}/replies?$top=50&$skiptoken=ABCDEFG1234
但是我想做的是在 C# 代码中使用“skiptoken”。
我试过了,
var replies = await graphClient.Teams[teamId].Channels[channel.Id].Messages[chatId].Replies
.Request()
.Top(50)
.Skiptoken(skiptoken)
.GetAsync();
此代码返回错误。
如何使用“skiptoken”?请帮我。 谢谢。
您可以使用以下代码。
var queryOptions = new List<QueryOption>()
{
new QueryOption("$skiptoken", "MSwwLDE1OTgwMzU4MTE4OTQ")
};
var replies = await graphClient.Teams["d3b31e36-d63d-4bbe-9478-b4cc7cb17a3d"].Channels["19:[email protected]"].Messages["1598032654892"].Replies
.Request(queryOptions)
.GetAsync();
你可以使用
等待 graphClient.Teams[teamId].Channels[channel.Id].Messages[chatId].Replies.WithUrl(OdataNextLink).Request().GetAsync()