本文整理汇总了TypeScript中core/api.API类的典型用法代码示例。如果您正苦于以下问题:TypeScript API类的具体用法?TypeScript API怎么用?TypeScript API使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了API类的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的TypeScript代码示例。
示例1: getSnapshotHistory
public static getSnapshotHistory(application: string, account: string, params = {}): IPromise<ISnapshot[]> {
return API.one('applications')
.one(application)
.one('snapshots')
.one(account)
.one('history')
.withParams(params)
.getList();
}
开发者ID:emjburns,项目名称:deck,代码行数:9,代码来源:SnapshotReader.ts
示例2: getApplicationAttributes
public static getApplicationAttributes(name: string): IPromise<any> {
return API.one('applications', name)
.withParams({ expand: false })
.get()
.then((fromServer: Application) => {
this.splitAttributes(fromServer.attributes, ['accounts', 'cloudProviders']);
return fromServer.attributes;
});
}
开发者ID:emjburns,项目名称:deck,代码行数:9,代码来源:ApplicationReader.ts
示例3: getApplication
public static getApplication(name: string, expand = true): IPromise<Application> {
return API.one('applications', name)
.withParams({ expand: expand })
.get()
.then((fromServer: Application) => {
const configs: IDataSourceConfig[] = ApplicationDataSourceRegistry.getDataSources();
const application: Application = new Application(fromServer.name, SchedulerFactory.createScheduler(), configs);
application.attributes = fromServer.attributes;
this.splitAttributes(application.attributes, ['accounts', 'cloudProviders']);
this.setDisabledDataSources(application);
application.refresh();
return application;
});
}
开发者ID:emjburns,项目名称:deck,代码行数:14,代码来源:ApplicationReader.ts
示例4: listApplications
public static listApplications(): IPromise<IApplicationSummary[]> {
return API.all('applications')
.useCache()
.getList();
}
开发者ID:emjburns,项目名称:deck,代码行数:5,代码来源:ApplicationReader.ts
示例5: listProjects
public static listProjects(): IPromise<IProject[]> {
return API.all('projects').getList();
}
开发者ID:emjburns,项目名称:deck,代码行数:3,代码来源:ProjectReader.ts
示例6: getProjectClusters
public static getProjectClusters(projectName: string): IPromise<IProjectCluster[]> {
return API.one('projects', projectName)
.all('clusters')
.getList();
}
开发者ID:emjburns,项目名称:deck,代码行数:5,代码来源:ProjectReader.ts
示例7: getProjectConfig
public static getProjectConfig(projectName: string): IPromise<IProject> {
return API.one('projects', projectName).get();
}
开发者ID:emjburns,项目名称:deck,代码行数:3,代码来源:ProjectReader.ts
示例8: getPubsubSubscriptions
public static getPubsubSubscriptions(): IPromise<IPubsubSubscription[]> {
return API.one('pubsub')
.one('subscriptions')
.get();
}
开发者ID:emjburns,项目名称:deck,代码行数:5,代码来源:PubsubSubscriptionReader.ts
注:本文中的core/api.API类示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论