共用方式為


FeatureManagementRestClient class

應該使用 (衍生自) 向 VSS REST API 提出要求的基類

Extends

建構函式

FeatureManagementRestClient(IVssRestClientOptions)

方法

getFeature(string)

依識別碼取得特定功能

getFeatures(string)

取得所有已定義特徵的清單

getFeatureState(string, string)

取得指定使用者/所有使用者範圍的指定功能狀態

getFeatureStateForScope(string, string, string, string)

取得指定具名範圍的指定功能狀態

queryFeatureStates(ContributedFeatureStateQuery)

取得功能識別碼清單的有效狀態

queryFeatureStatesForDefaultScope(ContributedFeatureStateQuery, string)

取得預設範圍之指定功能的狀態

queryFeatureStatesForNamedScope(ContributedFeatureStateQuery, string, string, string)

取得特定具名範圍的指定功能狀態

setFeatureState(ContributedFeatureState, string, string, string, string)

設定功能的狀態

setFeatureStateForScope(ContributedFeatureState, string, string, string, string, string, string)

在特定範圍內設定功能的狀態

建構函式詳細資料

FeatureManagementRestClient(IVssRestClientOptions)

new FeatureManagementRestClient(options: IVssRestClientOptions)

參數

方法詳細資料

getFeature(string)

依識別碼取得特定功能

function getFeature(featureId: string): Promise<ContributedFeature>

參數

featureId

string

功能的貢獻識別碼

傳回

getFeatures(string)

取得所有已定義特徵的清單

function getFeatures(targetContributionId?: string): Promise<ContributedFeature[]>

參數

targetContributionId

string

可選的目標貢獻。 如果 Null/空白,則傳回所有功能。 如果指定,請包含以指定貢獻為目標的特性。

傳回

Promise<ContributedFeature[]>

getFeatureState(string, string)

取得指定使用者/所有使用者範圍的指定功能狀態

function getFeatureState(featureId: string, userScope: string): Promise<ContributedFeatureState>

參數

featureId

string

功能的貢獻識別碼

userScope

string

User-Scope 取得價值。 目前使用者應該是「我」,所有使用者應該是「主機」。

傳回

getFeatureStateForScope(string, string, string, string)

取得指定具名範圍的指定功能狀態

function getFeatureStateForScope(featureId: string, userScope: string, scopeName: string, scopeValue: string): Promise<ContributedFeatureState>

參數

featureId

string

功能的貢獻識別碼

userScope

string

User-Scope 取得價值。 目前使用者應該是「我」,所有使用者應該是「主機」。

scopeName

string

取得功能設定的範圍 (例如「專案」或「團隊」)

scopeValue

string

範圍的值 (例如專案或小組識別碼)

傳回

queryFeatureStates(ContributedFeatureStateQuery)

取得功能識別碼清單的有效狀態

function queryFeatureStates(query: ContributedFeatureStateQuery): Promise<ContributedFeatureStateQuery>

參數

query
ContributedFeatureStateQuery

要查詢的功能以及目前的範圍值

傳回

queryFeatureStatesForDefaultScope(ContributedFeatureStateQuery, string)

取得預設範圍之指定功能的狀態

function queryFeatureStatesForDefaultScope(query: ContributedFeatureStateQuery, userScope: string): Promise<ContributedFeatureStateQuery>

參數

query
ContributedFeatureStateQuery

描述要查詢功能的查詢。

userScope

string

傳回

queryFeatureStatesForNamedScope(ContributedFeatureStateQuery, string, string, string)

取得特定具名範圍的指定功能狀態

function queryFeatureStatesForNamedScope(query: ContributedFeatureStateQuery, userScope: string, scopeName: string, scopeValue: string): Promise<ContributedFeatureStateQuery>

參數

query
ContributedFeatureStateQuery

描述要查詢功能的查詢。

userScope

string

scopeName

string

scopeValue

string

傳回

setFeatureState(ContributedFeatureState, string, string, string, string)

設定功能的狀態

function setFeatureState(feature: ContributedFeatureState, featureId: string, userScope: string, reason?: string, reasonCode?: string): Promise<ContributedFeatureState>

參數

feature
ContributedFeatureState

已張貼的功能狀態物件。 應指定有效值。

featureId

string

功能的貢獻識別碼

userScope

string

User-Scope 設定值的。 目前使用者應該是「我」,所有使用者應該是「主機」。

reason

string

更改狀態的原因

reasonCode

string

簡短原因碼

傳回

setFeatureStateForScope(ContributedFeatureState, string, string, string, string, string, string)

在特定範圍內設定功能的狀態

function setFeatureStateForScope(feature: ContributedFeatureState, featureId: string, userScope: string, scopeName: string, scopeValue: string, reason?: string, reasonCode?: string): Promise<ContributedFeatureState>

參數

feature
ContributedFeatureState

已張貼的功能狀態物件。 應指定有效值。

featureId

string

功能的貢獻識別碼

userScope

string

User-Scope 設定值的。 目前使用者應該是「我」,所有使用者應該是「主機」。

scopeName

string

取得功能設定的範圍 (例如「專案」或「團隊」)

scopeValue

string

範圍的值 (例如專案或小組識別碼)

reason

string

更改狀態的原因

reasonCode

string

簡短原因碼

傳回