Cell

Instance methods:

Static methods and properties:

Instance Methods

constructor: Cell(credentials, dataTableId, id)

Arguments

  1. credentials (Credentials): Valid credentials corresponding to the current user
  2. dataTableId (String): The ID of the data table that the cell belongs to
  3. id (String): The cell's ID

Returns

(Cell) A Cell instance

fetch

Returns

(Promise --> Object) Resolves to the serialized API response

WARNING: Some cells may have very large values, and so this can be a large request!

update(options)

Arguments

  1. options (Object = { label: String, description: String, value: Object | Array | Number | String | null }

    label: If provided, updates the cell's label

    description: If provided, updates the cell's description

    value: If provided, updates the cell's value. The value must be serializable as JSON, e.g., it cannot included functions.

Returns

(Promise --> Object) Resolves to the serialized API response

delete()

Returns

TODO

publish()

Returns

(Promise --> Object) Resolves to { link: public_url, ... }.

NOTE: Node SDK only.

unpublish()

NOTE: Node SDK only.

Static Methods and Properties

listCells(credentials)

Arguments

  1. credentials (Credentials): Valid credentials corresponding to the current user

Returns

(Promise --> Object) Resolves to the serialized API response

createCell(credentials, label, [options])

Arguments

  1. credentials (Credentials): Valid credentials corresponding to the current user
  2. label (String): The name of the new cell
  3. options (Object = { description: String, value: Object | Array | String | Number | null })

    description: If provided, sets the cell's description

    value: If provided, updates the cell's value. The value must be serializable as JSON, e.g., it cannot included functions.

Returns

(Promise --> Object) Resolves to the serialized API response

serialize

Set to override how the SDK serializes single-entity project API responses, such as Cell.createCell.

By default, this will return an Object with the structure:

type CellResponse = {
  id: String,
  label: String,
  description: String,
  size: Number,
  timeUpdated: Date,
  locked: Boolean,
  authorId: String,
  authorName: String,
  clientId: String,
  clientName: String,
  ?value: Object | Array | String | Number | null
}

NOTE: Currently, only Cell.#fetch returns value.

See Serialization for more information.

serializeList

Set to override how the SDK serializes multiple-entity project API responses, such as Cell.listCells.

By default, this will return an Object with the structure:

type CellssResponse = {
  entities: CellResponse[],
}

See Serialization for more information.

results matching ""

    No results matching ""