Home Reference Source Test Repository
import CollectionDoc from '@npr/npr-one-sdk/model/collection-doc.js'
public class | source

CollectionDoc

Direct Subclass:

Recommendation, Station, User

A base model for any resources following our Collection Doc schema

See:

Test:

Constructor Summary

Public Constructor
public

Member Summary

Public Members
public get

Exposed for legacy reasons.

Protected Members
protected

Method Summary

Protected Methods
protected

Ensure that the given Collection Doc is valid

Public Constructors

public constructor(json: CollectionDocJSON) source

Params:

NameTypeAttributeDescription
json CollectionDocJSON

The decoded JSON object that should be used as the basis for this model

Public Members

public get collectionDoc: CollectionDocJSON source

Exposed for legacy reasons. Prefer model accessor methods were possible.

Test:

Protected Members

protected _raw: Object source

Protected Methods

protected _validate() source

Ensure that the given Collection Doc is valid

Throw:

TypeError

if collection doc is invalid