本文整理汇总了TypeScript中core/api/ApiService.API.all方法的典型用法代码示例。如果您正苦于以下问题:TypeScript API.all方法的具体用法?TypeScript API.all怎么用?TypeScript API.all使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类core/api/ApiService.API
的用法示例。
在下文中一共展示了API.all方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的TypeScript代码示例。
示例1: getManifest
public static getManifest(account: string, location: string, name: string): IPromise<IManifest> {
return API.all('manifests')
.all(account)
.all(location)
.one(name)
.get();
}
示例2: cancelTask
public static cancelTask(taskId: string): IPromise<void> {
return API.all('tasks')
.one(taskId, 'cancel')
.put()
.then(() =>
TaskReader.getTask(taskId).then(task =>
TaskReader.waitUntilTaskMatches(task, updatedTask => updatedTask.status === 'CANCELED'),
),
);
}
示例3: getLoadBalancerDetails
public getLoadBalancerDetails(
cloudProvider: string,
account: string,
region: string,
name: string,
): IPromise<ILoadBalancerSourceData[]> {
return API.all('loadBalancers')
.all(account)
.all(region)
.all(name)
.withParams({ provider: cloudProvider })
.get();
}
示例4: listMetrics
public static listMetrics(
provider: string,
account: string,
region: string,
filters: any,
): IPromise<ICloudMetricDescriptor[]> {
return API.all('cloudMetrics')
.all(provider)
.all(account)
.all(region)
.withParams(filters)
.getList();
}
示例5: getMetricStatistics
public static getMetricStatistics(
provider: string,
account: string,
region: string,
name: string,
filters: any,
): IPromise<ICloudMetricStatistics> {
return API.all('cloudMetrics')
.all(provider)
.all(account)
.all(region)
.one(name, 'statistics')
.withParams(filters)
.get();
}
示例6: listLoadBalancers
public listLoadBalancers(cloudProvider: string): IPromise<ILoadBalancersByAccount[]> {
return API.all('loadBalancers')
.withParams({ provider: cloudProvider })
.getList();
}
示例7: postTaskCommand
public static postTaskCommand(taskCommand: ITaskCommand): IPromise<ITaskCreateResult> {
return API.all('tasks').post(taskCommand);
}