本文整理汇总了TypeScript中core/api/api.service.Api.all方法的典型用法代码示例。如果您正苦于以下问题:TypeScript service.Api.all方法的具体用法?TypeScript service.Api.all怎么用?TypeScript service.Api.all使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类core/api/api.service.Api
的用法示例。
在下文中一共展示了service.Api.all方法的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的TypeScript代码示例。
示例1: getImage
// NB: not currently used or tested; only here to satisfy IImageReader interface
public getImage(imageName: string, region: string, credentials: string): ng.IPromise<IDockerImage> {
return this.API.all('images').one(credentials)
.one(region)
.one(imageName)
.withParams({provider: 'docker'})
.get()
.then((results: IDockerImage[]) => results && results.length ? results[0] : null)
.catch((): IDockerImage => null);
}
示例2: getManifest
public getManifest(account: string,
location: string,
name: string): IPromise<IManifest> {
return this.API.all('manifests')
.all(account)
.all(location)
.one(name)
.get();
}
示例3: listHealthChecks
listHealthChecks (type?: string): ng.IPromise<IGceHealthCheck[]> {
if (type) {
return this.listHealthChecks()
.then((healthCheckWrappers: any[]) => {
return healthCheckWrappers
.filter((wrapper) => wrapper.healthCheck.healthCheckType === type);
});
} else {
return this.API
.all('search')
.useCache(this.infrastructureCaches.healthChecks)
.getList({q: '', type: 'healthChecks'})
.then((searchEndPointWrapper: any[]) => {
let healthCheckWrappers = searchEndPointWrapper[0].results;
healthCheckWrappers.forEach((wrapper: any) => wrapper.healthCheck = JSON.parse(wrapper.healthCheck));
return healthCheckWrappers;
});
}
}
示例4: listHealthChecks
public listHealthChecks (type?: string): ng.IPromise<IGceHealthCheck[]> {
if (type) {
return this.listHealthChecks()
.then((healthChecks: IGceHealthCheck[]) => {
return healthChecks
.filter((healthCheck) => healthCheck.healthCheckType === type);
});
} else {
return this.API
.all('search')
.useCache(this.infrastructureCaches.get('healthChecks'))
.getList({q: '', type: 'healthChecks'})
.then((searchEndPointWrapper: any[]) => {
let healthCheckWrappers = searchEndPointWrapper[0].results;
return healthCheckWrappers.map((wrapper: any) => {
wrapper.healthCheck = JSON.parse(wrapper.healthCheck);
wrapper.healthCheck.account = wrapper.account;
return wrapper.healthCheck as IGceHealthCheck;
});
});
}
}
示例5: listMetrics
public listMetrics(provider: string, account: string, region: string, filters: any): ng.IPromise<ICloudMetricDescriptor[]> {
return this.API.all('cloudMetrics').all(provider).all(account).all(region)
.withParams(filters).getList();
}
示例6: getMetricStatistics
public getMetricStatistics(provider: string, account: string, region: string, name: string, filters: any): ng.IPromise<ICloudMetricStatistics> {
return this.API.all('cloudMetrics').all(provider).all(account).all(region).one(name, 'statistics')
.withParams(filters).get();
}
示例7:
return this.retryService.buildRetrySequence<String[]>(() => this.API.all('images/tags')
.getList(params), (results: string[]) => (results.length > 0), 10, 1000)
示例8: fetchImpactCountForScope
public fetchImpactCountForScope(fastPropertyScope: Scope): IPromise<any> {
return this.API.all('fastproperties').all('impact').post(fastPropertyScope);
}
示例9: listMetricAlarms
public listMetricAlarms(): ng.IPromise<MetricAlarmDescriptor[]> {
return this.API.all('ecs').all('cloudMetrics').all('alarms').getList();
}
示例10: getLoadBalancerDetails
public getLoadBalancerDetails(cloudProvider: string, account: string, region: string, name: string): IPromise<ILoadBalancerSourceData[]> {
return this.API.all('loadBalancers').all(account).all(region).all(name).withParams({'provider': cloudProvider}).get();
}