FileContainerRestClient class
VSS REST API への要求を行うために使用する (派生する) 基本クラス
- Extends
メソッド
| create |
参照先コンテナーに指定された項目を作成します。 |
| delete |
コンテナー内の指定した項目を削除します。 |
| get |
指定されていない場合は、同じスコープ内の成果物 URI のコンマ区切りリストでフィルター処理されたコンテナーを取得します。指定しない場合は、すべてのコンテナーが返されます |
| get |
指定されたパラメーターまたは HTTP Accept 要求ヘッダーに依存する形式で指定されたファイル コンテナー オブジェクトを取得します。 |
コンストラクターの詳細
FileContainerRestClient(IVssRestClientOptions)
メソッドの詳細
createItems(VssJsonCollectionWrapperV<FileContainerItem[]>, number, string)
参照先コンテナーに指定された項目を作成します。
function createItems(items: VssJsonCollectionWrapperV<FileContainerItem[]>, containerId: number, scope?: string): Promise<FileContainerItem[]>
パラメーター
- containerId
-
number
- scope
-
string
コンテナーのスコープを表す guid。 これは多くの場合、プロジェクト ID です。
戻り値
Promise<FileContainerItem[]>
deleteItem(number, string, string)
コンテナー内の指定した項目を削除します。
function deleteItem(containerId: number, itemPath: string, scope?: string): Promise<void>
パラメーター
- containerId
-
number
コンテナー ID。
- itemPath
-
string
削除するパス。
- scope
-
string
コンテナーのスコープを表す guid。 これは多くの場合、プロジェクト ID です。
戻り値
Promise<void>
getContainers(string, string)
指定されていない場合は、同じスコープ内の成果物 URI のコンマ区切りリストでフィルター処理されたコンテナーを取得します。指定しない場合は、すべてのコンテナーが返されます
function getContainers(scope?: string, artifactUris?: string): Promise<FileContainer[]>
パラメーター
- scope
-
string
コンテナーのスコープを表す guid。 これは多くの場合、プロジェクト ID です。
- artifactUris
-
string
戻り値
Promise<FileContainer[]>
getItems(number, string, string, boolean, string, string, boolean, boolean, boolean, boolean, boolean, boolean)
指定されたパラメーターまたは HTTP Accept 要求ヘッダーに依存する形式で指定されたファイル コンテナー オブジェクトを取得します。
function getItems(containerId: number, scope?: string, itemPath?: string, metadata?: boolean, format?: string, downloadFileName?: string, includeDownloadTickets?: boolean, isShallow?: boolean, ignoreRequestedMediaType?: boolean, includeBlobMetadata?: boolean, saveAbsolutePath?: boolean, preferRedirect?: boolean): Promise<FileContainerItem[]>
パラメーター
- containerId
-
number
要求されたコンテナー ID
- scope
-
string
コンテナーのスコープを表す guid。 これは多くの場合、プロジェクト ID です。
- itemPath
-
string
関心のある項目へのパス
- metadata
-
boolean
true の場合、指定された形式パラメーターまたは HTTP Accept 要求ヘッダーがオーバーライドされ、指定された itemPath に対して非再帰的な情報が提供されます。
- format
-
string
指定すると、HTTP Accept 要求ヘッダーがオーバーライドされ、'json' または 'zip' が返されます。 $formatを指定する場合は、api-version もクエリ パラメーターとして指定する必要があります。
- downloadFileName
-
string
JSON 形式以外を指定して返す場合、このダウンロード名が使用されます (それ以外の場合は itemPath が既定で使用されます)
- includeDownloadTickets
-
boolean
- isShallow
-
boolean
true の場合は、指定された itemPath の直下の子 (フォルダー & ファイル) のみを返します。 False を指定すると、itemPath 内のすべての項目が再帰的に返されます。
- ignoreRequestedMediaType
-
boolean
HTTP Accept 要求ヘッダーを無視する場合は true に設定します。 既定値は false です。
- includeBlobMetadata
-
boolean
- saveAbsolutePath
-
boolean
返されたアーカイブ内の成果物の指定したディレクトリへの絶対パスを保存しない場合は false に設定します。 成果物ディレクトリに対してのみ機能します。 既定値は true です。
- preferRedirect
-
boolean
コンテンツを含むストリームにつながるリダイレクト応答を取得するには、true に設定します。 既定値は false です。
戻り値
Promise<FileContainerItem[]>