@acoustic-content-sdk/component-rest 中文文档教程

发布于 4年前 浏览 17 更新于 3年前

npm

基类的实现,实现基于REST的SDK服务。

API Documentation

Home > @acoustic-content-sdk/component-rest

component-rest package

基类的实现,实现基于REST的SDK服务。

Classes

ClassDescription
AbstractAuthStatusServiceChecks for the authentication status based on a REST request
AbstractDeliveryContentResolverServiceBase class to implement DeliveryContentResolver
AbstractDeliveryLayoutMappingResolverServiceBase class to implement DeliveryLayoutMappingResolver
AbstractDeliveryLayoutResolverServiceBase class to implement DeliveryLayoutResolver
AbstractDeliveryPageResolverServiceBase class to implement DeliveryPageResolver
AbstractDeliveryTypeResolverServiceBase class to implement DeliveryTypeResolver
AbstractSiteResolverService

Functions

FunctionDescription
createUrlConfig(aBaseUrl, aApiUrl, aResourceUrl, aDocument)Construcs a UrlConfig object based on some configuration

Variables

VariableDescription
VERSIONVersion and build number of the package

Home > @acoustic-content-sdk/component-rest > AbstractAuthStatusService

AbstractAuthStatusService class

Checks for the authentication status based on a REST request

Signature:

export declare class AbstractAuthStatusService implements AuthStatus 

Constructors

ConstructorModifiersDescription
(constructor)(aFetchText, aLogSvc)Initialization of the service.

Properties

PropertyModifiersTypeDescription
authenticated$Observable<boolean>

主页 > @acoustic-content-sdk/component-rest > AbstractDeliveryContentResolverService

AbstractDeliveryContentResolverService class

Base class to implement DeliveryContentResolver

Signature:

export declare class AbstractDeliveryContentResolverService implements DeliveryContentResolver 

Constructors

ConstructorModifiersDescription
(constructor)(aSearch, aLogSvc)Initialization

Properties

PropertyModifiersTypeDescription
getDeliveryContentItem(aID: string) => Observable<DeliveryContentItem>

主页 > @acoustic-content-sdk/component-rest > AbstractDeliveryLayoutMappingResolverService

AbstractDeliveryLayoutMappingResolverService class

Base class to implement DeliveryLayoutMappingResolver

Signature:

export declare class AbstractDeliveryLayoutMappingResolverService implements DeliveryLayoutMappingResolver 

Constructors

ConstructorModifiersDescription
(constructor)(aSearch, aLogSvc)Initialization

Properties

PropertyModifiersTypeDescription
getDeliveryLayoutMapping(aTypeId: string) => Observable<DeliveryLayoutMapping>

主页 > @acoustic-content-sdk/component-rest > AbstractDeliveryLayoutResolverService

AbstractDeliveryLayoutResolverService class

Base class to implement DeliveryLayoutResolver

Signature:

export declare class AbstractDeliveryLayoutResolverService implements DeliveryLayoutResolver 

Constructors

ConstructorModifiersDescription
(constructor)(aSearch, aLogSvc)Initialization

Properties

PropertyModifiersTypeDescription
getDeliveryLayout(aID: string) => Observable<DeliveryLayout>

主页 > @acoustic-content-sdk/component-rest > AbstractDeliveryPageResolverService

AbstractDeliveryPageResolverService class

Base class to implement DeliveryPageResolver

Signature:

export declare class AbstractDeliveryPageResolverService implements DeliveryPageResolver 

Constructors

ConstructorModifiersDescription
(constructor)(aSearch, aLogSvc)Initialization

Properties

PropertyModifiersTypeDescription
getDeliveryPage(aPath: string) => Observable<DeliveryContentItem>

主页 > @acoustic-content-sdk/component-rest > AbstractDeliveryTypeResolverService

AbstractDeliveryTypeResolverService class

Base class to implement DeliveryTypeResolver

Signature:

export declare class AbstractDeliveryTypeResolverService implements DeliveryTypeResolver 

Constructors

ConstructorModifiersDescription
(constructor)(aSearch, aLogSvc)Initialization

Properties

PropertyModifiersTypeDescription
getDeliveryType(aId: string) => Observable<DeliveryType>

主页 > @acoustic-content-sdk/component-rest > AbstractSiteResolverService

AbstractSiteResolverService class

Signature:

export declare class AbstractSiteResolverService implements DeliverySiteResolver 

Constructors

ConstructorModifiersDescription
(constructor)(aFetchText, aProtected, aLogSvc)Constructs a new instance of the AbstractSiteResolverService class

Properties

PropertyModifiersTypeDescription
getSiteDeliveryContentItem() => Observable<SiteDeliveryContentItem>

Home > ; @acoustic-content-sdk/component-rest > createUrlConfig

createUrlConfig() function

根据一些配置构造一个UrlConfig对象

签名:

export declare function createUrlConfig(aBaseUrl?: HubInfoUrlProvider, aApiUrl?: HubInfoUrlProvider, aResourceUrl?: HubInfoUrlProvider, aDocument?: any): Observable<UrlConfig>;

Parameters

ParameterTypeDescription
aBaseUrlHubInfoUrlProviderthe base URL
aApiUrlHubInfoUrlProviderthe API URL
aResourceUrlHubInfoUrlProviderthe resource URL
aDocumentanythe document

返回:

Observable

the observable of the UrlConfig object

Home > @acoustic-content-sdk/component-rest > VERSION

VERSION variable

Version and build number of the package

Signature:

VERSION: {
    version: {
        major: string;
        minor: string;
        patch: string;
        branch: string;
    };
    build: Date;
}

首页 > @acoustic-content-sdk/component-rest > AbstractAuthStatusService > (构造函数)

AbstractAuthStatusService.(constructor)

服务的初始化。

Signature:

protected constructor(aFetchText: FetchText, aLogSvc?: LoggerService);

Parameters

ParameterTypeDescription
aFetchTextFetchTextthe callback to make a request
aLogSvcLoggerServicethe logger service

Home > @acoustic-content-sdk/component-rest > AbstractAuthStatusService > authenticated$

AbstractAuthStatusService.authenticated$ property

Signature:

authenticated$: Observable<boolean>;

Home > @acoustic-content-sdk/component-rest > AbstractDeliveryContentResolverService > (constructor)

AbstractDeliveryContentResolverService.(constructor)

Initialization

Signature:

protected constructor(aSearch: DeliverySearchResolver, aLogSvc?: LoggerService);

Parameters

ParameterTypeDescription
aSearchDeliverySearchResolversearch service that is uses to back the content service
aLogSvcLoggerServicelogger service

Home > @acoustic-content-sdk/component-rest > AbstractDeliveryContentResolverService > getDeliveryContentItem

AbstractDeliveryContentResolverService.getDeliveryContentItem property

Signature:

getDeliveryContentItem: (aID: string) => Observable<DeliveryContentItem>;

Home > ; @acoustic-content-sdk/component-rest > AbstractDeliveryLayoutMappingResolverService > (constructor)

AbstractDeliveryLayoutMappingResolverService.(constructor)

Initialization

Signature:

protected constructor(aSearch: DeliverySearchResolver, aLogSvc?: LoggerService);

Parameters

ParameterTypeDescription
aSearchDeliverySearchResolversearch service that is uses to back the content service
aLogSvcLoggerServicelogger service

Home > @acoustic-content-sdk/component-rest > AbstractDeliveryLayoutMappingResolverService > getDeliveryLayoutMapping

AbstractDeliveryLayoutMappingResolverService.getDeliveryLayoutMapping property

Signature:

getDeliveryLayoutMapping: (aTypeId: string) => Observable<DeliveryLayoutMapping>;

Home > ; @acoustic-content-sdk/component-rest > AbstractDeliveryLayoutResolverService > (constructor)

AbstractDeliveryLayoutResolverService.(constructor)

Initialization

Signature:

protected constructor(aSearch: DeliverySearchResolver, aLogSvc?: LoggerService);

Parameters

ParameterTypeDescription
aSearchDeliverySearchResolversearch service that is uses to back the content service
aLogSvcLoggerServicelogger service

Home > @acoustic-content-sdk/component-rest > AbstractDeliveryLayoutResolverService > getDeliveryLayout

AbstractDeliveryLayoutResolverService.getDeliveryLayout property

Signature:

getDeliveryLayout: (aID: string) => Observable<DeliveryLayout>;

Home > ; @acoustic-content-sdk/component-rest > AbstractDeliveryPageResolverService > (constructor)

AbstractDeliveryPageResolverService.(constructor)

Initialization

Signature:

protected constructor(aSearch: DeliverySearchResolver, aLogSvc?: LoggerService);

Parameters

ParameterTypeDescription
aSearchDeliverySearchResolversearch service that is uses to back the content service
aLogSvcLoggerServicelogger service

Home > @acoustic-content-sdk/component-rest > AbstractDeliveryPageResolverService > getDeliveryPage

AbstractDeliveryPageResolverService.getDeliveryPage property

Signature:

getDeliveryPage: (aPath: string) => Observable<DeliveryContentItem>;

Home > ; @acoustic-content-sdk/component-rest > AbstractDeliveryTypeResolverService > (constructor)

AbstractDeliveryTypeResolverService.(constructor)

Initialization

Signature:

protected constructor(aSearch: DeliverySearchResolver, aLogSvc?: LoggerService);

Parameters

ParameterTypeDescription
aSearchDeliverySearchResolversearch service that is uses to back the content service
aLogSvcLoggerServicelogger service

Home > @acoustic-content-sdk/component-rest > AbstractDeliveryTypeResolverService > getDeliveryType

AbstractDeliveryTypeResolverService.getDeliveryType property

Signature:

getDeliveryType: (aId: string) => Observable<DeliveryType>;

Home > ; @acoustic-content-sdk/component-rest > AbstractSiteResolverService > (constructor)

AbstractSiteResolverService.(constructor)

Constructs a new instance of the AbstractSiteResolverService class

Signature:

protected constructor(aFetchText: FetchText, aProtected: ProtectedContent, aLogSvc?: LoggerService);

Parameters

ParameterTypeDescription
aFetchTextFetchText
aProtectedProtectedContent
aLogSvcLoggerService

主页 > @acoustic-content-sdk/component-rest > AbstractSiteResolverService > getSiteDeliveryContentItem

AbstractSiteResolverService.getSiteDeliveryContentItem property

签名:

getSiteDeliveryContentItem: () => Observable<SiteDeliveryContentItem>;

npm

Implementation of base classes to implement SDK services based on REST.

API Documentation

Home > @acoustic-content-sdk/component-rest

component-rest package

Implementation of base classes to implement SDK services based on REST.

Classes

ClassDescription
AbstractAuthStatusServiceChecks for the authentication status based on a REST request
AbstractDeliveryContentResolverServiceBase class to implement DeliveryContentResolver
AbstractDeliveryLayoutMappingResolverServiceBase class to implement DeliveryLayoutMappingResolver
AbstractDeliveryLayoutResolverServiceBase class to implement DeliveryLayoutResolver
AbstractDeliveryPageResolverServiceBase class to implement DeliveryPageResolver
AbstractDeliveryTypeResolverServiceBase class to implement DeliveryTypeResolver
AbstractSiteResolverService

Functions

FunctionDescription
createUrlConfig(aBaseUrl, aApiUrl, aResourceUrl, aDocument)Construcs a UrlConfig object based on some configuration

Variables

VariableDescription
VERSIONVersion and build number of the package

Home > @acoustic-content-sdk/component-rest > AbstractAuthStatusService

AbstractAuthStatusService class

Checks for the authentication status based on a REST request

Signature:

export declare class AbstractAuthStatusService implements AuthStatus 

Constructors

ConstructorModifiersDescription
(constructor)(aFetchText, aLogSvc)Initialization of the service.

Properties

PropertyModifiersTypeDescription
authenticated$Observable&lt;boolean&gt;

Home > @acoustic-content-sdk/component-rest > AbstractDeliveryContentResolverService

AbstractDeliveryContentResolverService class

Base class to implement DeliveryContentResolver

Signature:

export declare class AbstractDeliveryContentResolverService implements DeliveryContentResolver 

Constructors

ConstructorModifiersDescription
(constructor)(aSearch, aLogSvc)Initialization

Properties

PropertyModifiersTypeDescription
getDeliveryContentItem(aID: string) =&gt; Observable&lt;DeliveryContentItem&gt;

Home > @acoustic-content-sdk/component-rest > AbstractDeliveryLayoutMappingResolverService

AbstractDeliveryLayoutMappingResolverService class

Base class to implement DeliveryLayoutMappingResolver

Signature:

export declare class AbstractDeliveryLayoutMappingResolverService implements DeliveryLayoutMappingResolver 

Constructors

ConstructorModifiersDescription
(constructor)(aSearch, aLogSvc)Initialization

Properties

PropertyModifiersTypeDescription
getDeliveryLayoutMapping(aTypeId: string) =&gt; Observable&lt;DeliveryLayoutMapping&gt;

Home > @acoustic-content-sdk/component-rest > AbstractDeliveryLayoutResolverService

AbstractDeliveryLayoutResolverService class

Base class to implement DeliveryLayoutResolver

Signature:

export declare class AbstractDeliveryLayoutResolverService implements DeliveryLayoutResolver 

Constructors

ConstructorModifiersDescription
(constructor)(aSearch, aLogSvc)Initialization

Properties

PropertyModifiersTypeDescription
getDeliveryLayout(aID: string) =&gt; Observable&lt;DeliveryLayout&gt;

Home > @acoustic-content-sdk/component-rest > AbstractDeliveryPageResolverService

AbstractDeliveryPageResolverService class

Base class to implement DeliveryPageResolver

Signature:

export declare class AbstractDeliveryPageResolverService implements DeliveryPageResolver 

Constructors

ConstructorModifiersDescription
(constructor)(aSearch, aLogSvc)Initialization

Properties

PropertyModifiersTypeDescription
getDeliveryPage(aPath: string) =&gt; Observable&lt;DeliveryContentItem&gt;

Home > @acoustic-content-sdk/component-rest > AbstractDeliveryTypeResolverService

AbstractDeliveryTypeResolverService class

Base class to implement DeliveryTypeResolver

Signature:

export declare class AbstractDeliveryTypeResolverService implements DeliveryTypeResolver 

Constructors

ConstructorModifiersDescription
(constructor)(aSearch, aLogSvc)Initialization

Properties

PropertyModifiersTypeDescription
getDeliveryType(aId: string) =&gt; Observable&lt;DeliveryType&gt;

Home > @acoustic-content-sdk/component-rest > AbstractSiteResolverService

AbstractSiteResolverService class

Signature:

export declare class AbstractSiteResolverService implements DeliverySiteResolver 

Constructors

ConstructorModifiersDescription
(constructor)(aFetchText, aProtected, aLogSvc)Constructs a new instance of the AbstractSiteResolverService class

Properties

PropertyModifiersTypeDescription
getSiteDeliveryContentItem() =&gt; Observable&lt;SiteDeliveryContentItem&gt;

Home > @acoustic-content-sdk/component-rest > createUrlConfig

createUrlConfig() function

Construcs a UrlConfig object based on some configuration

Signature:

export declare function createUrlConfig(aBaseUrl?: HubInfoUrlProvider, aApiUrl?: HubInfoUrlProvider, aResourceUrl?: HubInfoUrlProvider, aDocument?: any): Observable<UrlConfig>;

Parameters

ParameterTypeDescription
aBaseUrlHubInfoUrlProviderthe base URL
aApiUrlHubInfoUrlProviderthe API URL
aResourceUrlHubInfoUrlProviderthe resource URL
aDocumentanythe document

Returns:

Observable<UrlConfig>

the observable of the UrlConfig object

Home > @acoustic-content-sdk/component-rest > VERSION

VERSION variable

Version and build number of the package

Signature:

VERSION: {
    version: {
        major: string;
        minor: string;
        patch: string;
        branch: string;
    };
    build: Date;
}

Home > @acoustic-content-sdk/component-rest > AbstractAuthStatusService > (constructor)

AbstractAuthStatusService.(constructor)

Initialization of the service.

Signature:

protected constructor(aFetchText: FetchText, aLogSvc?: LoggerService);

Parameters

ParameterTypeDescription
aFetchTextFetchTextthe callback to make a request
aLogSvcLoggerServicethe logger service

Home > @acoustic-content-sdk/component-rest > AbstractAuthStatusService > authenticated$

AbstractAuthStatusService.authenticated$ property

Signature:

authenticated$: Observable<boolean>;

Home > @acoustic-content-sdk/component-rest > AbstractDeliveryContentResolverService > (constructor)

AbstractDeliveryContentResolverService.(constructor)

Initialization

Signature:

protected constructor(aSearch: DeliverySearchResolver, aLogSvc?: LoggerService);

Parameters

ParameterTypeDescription
aSearchDeliverySearchResolversearch service that is uses to back the content service
aLogSvcLoggerServicelogger service

Home > @acoustic-content-sdk/component-rest > AbstractDeliveryContentResolverService > getDeliveryContentItem

AbstractDeliveryContentResolverService.getDeliveryContentItem property

Signature:

getDeliveryContentItem: (aID: string) => Observable<DeliveryContentItem>;

Home > @acoustic-content-sdk/component-rest > AbstractDeliveryLayoutMappingResolverService > (constructor)

AbstractDeliveryLayoutMappingResolverService.(constructor)

Initialization

Signature:

protected constructor(aSearch: DeliverySearchResolver, aLogSvc?: LoggerService);

Parameters

ParameterTypeDescription
aSearchDeliverySearchResolversearch service that is uses to back the content service
aLogSvcLoggerServicelogger service

Home > @acoustic-content-sdk/component-rest > AbstractDeliveryLayoutMappingResolverService > getDeliveryLayoutMapping

AbstractDeliveryLayoutMappingResolverService.getDeliveryLayoutMapping property

Signature:

getDeliveryLayoutMapping: (aTypeId: string) => Observable<DeliveryLayoutMapping>;

Home > @acoustic-content-sdk/component-rest > AbstractDeliveryLayoutResolverService > (constructor)

AbstractDeliveryLayoutResolverService.(constructor)

Initialization

Signature:

protected constructor(aSearch: DeliverySearchResolver, aLogSvc?: LoggerService);

Parameters

ParameterTypeDescription
aSearchDeliverySearchResolversearch service that is uses to back the content service
aLogSvcLoggerServicelogger service

Home > @acoustic-content-sdk/component-rest > AbstractDeliveryLayoutResolverService > getDeliveryLayout

AbstractDeliveryLayoutResolverService.getDeliveryLayout property

Signature:

getDeliveryLayout: (aID: string) => Observable<DeliveryLayout>;

Home > @acoustic-content-sdk/component-rest > AbstractDeliveryPageResolverService > (constructor)

AbstractDeliveryPageResolverService.(constructor)

Initialization

Signature:

protected constructor(aSearch: DeliverySearchResolver, aLogSvc?: LoggerService);

Parameters

ParameterTypeDescription
aSearchDeliverySearchResolversearch service that is uses to back the content service
aLogSvcLoggerServicelogger service

Home > @acoustic-content-sdk/component-rest > AbstractDeliveryPageResolverService > getDeliveryPage

AbstractDeliveryPageResolverService.getDeliveryPage property

Signature:

getDeliveryPage: (aPath: string) => Observable<DeliveryContentItem>;

Home > @acoustic-content-sdk/component-rest > AbstractDeliveryTypeResolverService > (constructor)

AbstractDeliveryTypeResolverService.(constructor)

Initialization

Signature:

protected constructor(aSearch: DeliverySearchResolver, aLogSvc?: LoggerService);

Parameters

ParameterTypeDescription
aSearchDeliverySearchResolversearch service that is uses to back the content service
aLogSvcLoggerServicelogger service

Home > @acoustic-content-sdk/component-rest > AbstractDeliveryTypeResolverService > getDeliveryType

AbstractDeliveryTypeResolverService.getDeliveryType property

Signature:

getDeliveryType: (aId: string) => Observable<DeliveryType>;

Home > @acoustic-content-sdk/component-rest > AbstractSiteResolverService > (constructor)

AbstractSiteResolverService.(constructor)

Constructs a new instance of the AbstractSiteResolverService class

Signature:

protected constructor(aFetchText: FetchText, aProtected: ProtectedContent, aLogSvc?: LoggerService);

Parameters

ParameterTypeDescription
aFetchTextFetchText
aProtectedProtectedContent
aLogSvcLoggerService

Home > @acoustic-content-sdk/component-rest > AbstractSiteResolverService > getSiteDeliveryContentItem

AbstractSiteResolverService.getSiteDeliveryContentItem property

Signature:

getSiteDeliveryContentItem: () => Observable<SiteDeliveryContentItem>;
    我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
    原文