Cell
Instance methods:
Static methods and properties:
Instance Methods
constructor: Cell(credentials, dataTableId, id)
Arguments
credentials
(Credentials): Valid credentials corresponding to the current userdataTableId
(String): The ID of the data table that the cell belongs toid
(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
options
(Object ={ label: String, description: String, value: Object | Array | Number | String | null }
label
: If provided, updates the cell's labeldescription
: If provided, updates the cell's descriptionvalue
: 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
credentials
(Credentials): Valid credentials corresponding to the current user
Returns
(Promise --> Object)
Resolves to the serialized API
response
createCell(credentials, label, [options])
Arguments
credentials
(Credentials): Valid credentials corresponding to the current userlabel
(String): The name of the new celloptions
(Object ={ description: String, value: Object | Array | String | Number | null }
)description
: If provided, sets the cell's descriptionvalue
: 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.