如何从Azure DevOps扩展中调用Wiki REST Api? [英] How can I call the Wiki REST Api from an Azure DevOps extension?

查看:136
本文介绍了如何从Azure DevOps扩展中调用Wiki REST Api?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

d rest客户端调用工作项REST API.

The Add a dashboard widget tutorial explains how to call the work item REST API using a VSS.require("TFS/WorkItemTracking/RestClient")d rest client.

我想做同样的事情,但要使用 Wiki Rest API.当然有一个范围:vso.wiki.

I want to do the same, but for the Wiki Rest API. There certainly is a scope for this: vso.wiki.

但是,我找不到Wiki的"TFS/WorkItemTracking/RestClient"等效项.也许它和"TFS/Wiki/RestClient"一样简单,但是即使是"TFS/Wiki/RestClient",我可以使用的函数的名称和参数是什么?我在任何地方都找不到该文档,也不想每次尝试发布新扩展名并查看其是否起作用时,都要通过反复试验弄清楚这一点.

However, I cannot find the equivalent of "TFS/WorkItemTracking/RestClient" for wiki. Maybe it is as simple as "TFS/Wiki/RestClient", but even if it was, what are the names and parameters of the functions I can use? I don't find that documented anywhere, and I don't want to have to figure that out by trial-and-error, each time publishing a new extension and seeing if it works.

并查看

And looking at REST Clients, there does not even seem to be a Wiki Rest Client.

所以如何从Azure DevOps扩展名访问Wiki Rest API?也许在某个地方,谷歌已经成功向我隐藏了一个例子?

So how can I access the Wiki Rest API from an Azure DevOps extension? Is there perhaps an example somewhere, that google has been successful in hiding from me?

我确实了解

N.B. I do know about the REST API Specs, but the mapping to REST client is not self-evident and apparently.

我偶然发现了 Azure DevOps Web API客户端和合同,但是,简短的grep显示它不包含最新的和最大的(预发行)"pagesBatch"功能,我也没有找到相关的分支/标签.

I stumbled upon Azure DevOps Web API clients and contracts, however, a brief grep revealed it does not contain the latest and greatest (pre-release) "pagesBatch" feature, and I did not find a relevant branch / tag either.

推荐答案

可以在您还可以检查wiki的Restful api

You can also check the restful api for wiki here.

检查

Check here to discover the client libraries for azure devops service rest api in different coding languages.

希望上面有帮助.

这篇关于如何从Azure DevOps扩展中调用Wiki REST Api?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆