如何从Azure DevOps扩展中调用Wiki 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.
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.
希望上面有帮助.