Home Reference Source
public class | source

Reference

Reference

A model representing a record reference in Skygear record.

Constructor Summary

Public Constructor
public

constructor(attrs: Record | String)

Constructs a new Reference object.

Member Summary

Public Members
public get

id: String

ID of the referenced record

Method Summary

Public Methods
public

toJSON(): Object

Serializes Reference to a JSON object.

Public Constructors

public constructor(attrs: Record | String) source

Constructs a new Reference object.

Params:

NameTypeAttributeDescription
attrs Record | String

the referenced record or record id

Public Members

public get id: String source

ID of the referenced record

Public Methods

public toJSON(): Object source

Serializes Reference to a JSON object.

Return:

Object

the JSON object