.template.update()

Function Example

/// Create instance
const connection = urchin(...config); 

const connection.template.update([...templateInput]);

Parameters for TemplateInput

label (* required)descriptiontypedefaultvalid values

publicKey*

reference to target address

PublicKey

title*

name of taxonomy reference

string

""

length 1-200 characters

inputs*

array of objects

[object]

[]

inputs[i].label*

field input label

string

length 1-24

inputs[i].type*

field input type

string

"text"

"text","textArea","select","numeric","file"

inputs[i].options

options when using type "select"

[string]

string length 1-24

inputs[i].validation*

method to validate input

archived

Flag that record is no longer in use

boolean

false

Response Example

[
  {
    title: "Blog Post",
    inputs: [
      {
        label: "headline",
        type: "text"
      },
        {
        label: "stage",
        type: "select",
        options: [
        	"published",
          "draft"
        ]
        },
      {
      	label: "featured image",
        type: "file",
      },
      {
      	label: "body",
        type: "textArea"
      }
      }
    ]
  }
]

Last updated