mm-node

2.0.1 • Public • Published

Matter In Motion. Node resource extension

NPM Version NPM Downloads

This extension adds a node resource.

Usage

Extensions installation instructions

Node

Node is the simplest way to store chunks of content:

  • type — string, type of the node
  • content — various types of the node content dependent on the node type

API

get

returns a node

Request

  • id — node id

Response

  • id — uuid, node id
  • type — string, node type
  • content — various, node content

update

updates node content

Request

  • to
    • content various, node content to be updated

Response

  • node id

Controller Methods

get(id)

Return a node

  • id — uuid, node id;

create(nodes)

Creates a node or many nodes and return a list of new nodes ids.

  • nodes single node or array of nodes.

update(id, content)

updates a node and return node id that was updated

  • id — node id
  • content — new content. Note that content is updated, i.e., merged with old content.

delete(id)

Deletes a node and return deleted node id

  • id — node id

deleteAll(ids)

Deletes multiple nodes.

  • ids — array of node id

License: MIT.

Package Sidebar

Install

npm i mm-node

Weekly Downloads

1

Version

2.0.1

License

MIT

Unpacked Size

8.86 kB

Total Files

9

Last publish

Collaborators

  • velocityzen