botframework - 如何在 MS Teams 基于搜索的消息扩展请求中配置查询的分页参数?
问题描述
我正在使用基于 MS 团队搜索的消息扩展。
https://docs.microsoft.com/en-us/microsoftteams/platform/messaging-extensions/how-to/search-commands/respond-to-search?tabs=dotnet#default-query 在默认查询中我得到 - "queryOptions": { "skip": 0, "count": 25 }
有没有办法自定义这个计数。
解决方案
我没有找到任何支持文档来更新,queryOptions
但是您可以在代码中手动处理它,并设置最初要显示的项目数量以及搜索内容时的数量。最初运行消息扩展时,查询参数名称设置为"initialRun"
,所以这里你可以如何使用它
if (query.Parameters[0].Name == "initialRun")
{
// Write the code handling number of results to be return.
}
else
{
// Write the code handling number of results to be return when user search.
}
谢谢
推荐阅读
- css - 反应如何为不同的组件打印横向/纵向
- c - 将文件中的输入存储到C中的结构中
- python - 备份和python脚本损坏的问题
- git - 为什么我的 git push 只推送指向 master 的提交,为什么它不能在提交指向 master 之后推送每个提交?
- node.js - 在通过 https 发布请求发送之前将密码输入存储在一个状态中是否危险?
- c - 如何用C获取窗口的类名
- postgresql - sql文件中的Postgresql命令行变量使用
- java - Java: Gson: fromJson: 获取元素值
- dask - dask_lightgbm 使用的完整训练集?
- python - django中的排除列表无法更新