Home Identifier Source Repository
import LinkedSubEntity from 'super-siren/lib/LinkedSubEntity.js'
public class | source

LinkedSubEntity

You can directly use instance of this class. linkedSubEntity

Represents an sub-entity of an entity which is represented as a URL to the actual entity instance.

Static Member Summary

Static Public Members
public static get

Default empty instance of a LinkedSubEntity

Static Method Summary

Static Public Methods
public static

Parses the provided json instance and returns

Static Public Members

public static get empty: LinkedSubEntity: * source

Default empty instance of a LinkedSubEntity

Return:

LinkedSubEntity

Default empty state

Static Public Methods

public static fromJson(json: Object, baseUrl: String): LinkedSubEntity source

Parses the provided json instance and returns the LinkedSubEntity representation of that json

Params:

NameTypeAttributeDescription
json Object

Object representation of the linked sub-entity

baseUrl String
  • optional
  • default: null

Optional baseUrl to use if the href is a relative URL

Return:

LinkedSubEntity

Parsed representation of the linked sub-entity.