Grasshopper

The api is built up in lib/runners.

assets.copy

  • Events: parse, validate, out, copy

assets.delete

  • Events: parse, validate, out, delete

assets.deleteAll

  • Events: parse, validate, out, delete

assets.find

  • Events: parse, validate, out

assets.list

  • Events: parse, validate, out

assets.rename

  • Events: parse, validate, out, rename

assets.save

  • Events: parse, validate, out, save

Content

content.deleteById

  • Events: parse, validate, out, delete

content.getById

  • Events: parse, validate, out

content.getFullById

  • Events: parse, validate, out

content.insert

  • Events: parse, validate, out, save

content.query

  • Events: out

content.queryFull

  • Events: out

content.update

  • Events: parse, validate, out, save

contentTypes.deleteById

  • Events: parse, validate, out, delete

contentTypes.getById

  • Events: parse, validate, out

contentTypes.insert

  • Events: parse, validate, out, save

contentTypes.list

  • Events: parse, validate, out

contentTypes.update

  • Events: parse, validate, out

contentTypes.query

  • Events: out

nodes.deleteById

  • Events: parse, validate, out, delete

nodes.getById

  • Events: parse, validate, out

nodes.getChildren

  • Events: parse, validate, out

nodes.insert

  • Events: parse, validate, out, save

nodes.move

  • Events: parse, validate, out, save

nodes.query

  • Events: parse, validate, out

nodes.saveContentTypes

  • Events: parse, validate, out

nodes.update

  • Events: parse, validate, out, save

tokens.deleteById

  • Events: parse, validate, out, delete

tokens.getNew

  • Events: parse, validate, out

tokens.impersonate

  • Events: parse, validate, out

tokens.logout

  • Events: parse, validate, out

Users

users.deleteById

  • Events: parse, validate, out, delete

users.getByEmail

  • Events: parse, validate, out

users.getById

  • Events: parse, validate, out

users.insert

  • Events: parse, validate, out, save

users.linkIdentity

  • Events: parse, validate, out, save

users.list

  • Events: parse, validate, out

users.query

  • Events: parse, validate, users, out

users.unlinkIdentity

  • Events: parse, validate, out, save

users.update

  • Events: parse, validate, out, save

Available event filters are: nodes, types, contentids, system.

// Event examples grasshopper.core.event.channel('/type/*') .on('save', function(kontx, next) { memoize.clearCache(); next(); }); grasshopper.core.event.channel('/type/' + constants.ids.recipes) .on('parse', function(payload, next) { // do stuff next(); }); grasshopper.core.event.channel('/system/db') .on('start', function(payload, next){ logger.debug('starting grasshopper'); next(); });