@node-red/runtime.library

getEntries(opts) → {Promise.<Object>}

Returns a complete listing of all entries of a given type in the library.

Parameters:
Name Type Description
opts Object
Name Type Description
user User

the user calling the api

type String

the type of entry

Returns:
Type:
Promise.<Object>
  • the entry listing

getEntry(opts) → {Promise.<(String|Object)>}

Gets an entry from the library.

Parameters:
Name Type Description
opts Object
Name Type Description
user User

the user calling the api

type String

the type of entry

path String

the path of the entry

Returns:
Type:
Promise.<(String|Object)>
  • resolves when complete

saveEntry(opts) → {Promise}

Saves an entry to the library

Parameters:
Name Type Description
opts Object
Name Type Description
user User

the user calling the api

type String

the type of entry

path String

the path of the entry

meta Object

any meta data associated with the entry

body String

the body of the entry

Returns:
Type:
Promise
  • resolves when complete