本文整理汇总了TypeScript中dotcms-js.CoreWebService类的典型用法代码示例。如果您正苦于以下问题:TypeScript CoreWebService类的具体用法?TypeScript CoreWebService怎么用?TypeScript CoreWebService使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了CoreWebService类的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的TypeScript代码示例。
示例1: updateUser
public updateUser(user: AccountUser): Observable<ResponseView> {
return this.coreWebService.requestView({
body: user,
method: RequestMethod.Put,
url: 'v1/users/current'
});
}
示例2: dismissNotifications
dismissNotifications(items: Object): Observable<any> {
return this.coreWebService.request({
body: items,
method: RequestMethod.Put,
url: this.urls.dismissNotificationsUrl
});
}
示例3: unlock
/**
* Unlock a content asset
*
* @param string inode
* @returns Observable<any>
* @memberof PageViewService
*/
unlock(inode: string): Observable<any> {
return this.coreWebService
.requestView({
method: RequestMethod.Put,
url: `content/unlock/inode/${inode}`
})
.pipe(pluck('bodyJsonObject'));
}
示例4: get
/**
* Get Theme information based on the inode.
*
* @param string inode
* @returns Observable<DotTheme>
* @memberof DotThemesService
*/
get(inode: string): Observable<DotTheme> {
return this.coreWebService
.requestView({
method: RequestMethod.Get,
url: 'v1/themes/id/' + inode
})
.pipe(pluck('entity'));
}
示例5: loadFieldTypes
loadFieldTypes(): Observable<FieldType[]> {
return this.coreWebService
.requestView({
method: RequestMethod.Get,
url: 'v1/fieldTypes'
})
.pipe(pluck('entity'));
}
示例6: fireWorkflowAction
/**
* Updates the workflow actions for a page asset
*
* @param string inode
* @returns Observable<any> // contentlet
* @memberof DotWorkflowService
*/
fireWorkflowAction(inode: string, actionId: string): Observable<any> {
return this.coreWebService
.requestView({
method: RequestMethod.Put,
url: `v1/workflow/actions/${actionId}/fire?inode=${inode}`
})
.pipe(pluck('entity'));
}
示例7: getContentWorkflowActions
/**
* Returns the wokflow or workflow actions for a page asset
*
* @param string inode
* @returns Observable<DotWorkflowAction[]>
* @memberof DotWorkflowService
*/
getContentWorkflowActions(inode: string): Observable<DotWorkflowAction[]> {
return this.coreWebService
.requestView({
method: RequestMethod.Get,
url: `v1/workflow/contentlet/${inode}/actions`
})
.pipe(pluck('entity'));
}
示例8: get
/**
* Method to get Workflows
* @param string id
* @returns Observable<SelectItem[]>
* @memberof DotWorkflowService
*/
get(): Observable<DotWorkflow[]> {
return this.coreWebService
.requestView({
method: RequestMethod.Get,
url: 'v1/workflow/schemes'
})
.pipe(pluck('entity'));
}
示例9: getContentTypes
/**
*Get the content types from the endpoint
*
* @returns {Observable<StructureTypeView[]>}
* @memberof DotContentTypeService
*/
getContentTypes(): Observable<StructureTypeView[]> {
return this.coreWebService
.requestView({
method: RequestMethod.Get,
url: 'v1/contenttype/basetypes'
})
.pipe(pluck('entity'));
}
示例10: getLicense
private getLicense(): Observable<any> {
return this.coreWebService
.requestView({
method: RequestMethod.Get,
url: this.licenseURL
})
.pipe(pluck('entity', 'config', 'license'));
}