resource-hook v0.4.2
hook
for managing event hooks ( IF this THEN that )
API
properties
methods
create (options, callback)
get (id, callback)
find (options, callback)
all (callback)
update (options, callback)
updateOrCreate (options, callback)
destroy (id, callback)
start ()
bind ()
properties
for managing event hooks ( IF this THEN that )
id
- type : any
if
type : string
description : the if action
required : true
then
type : string
description : the then action
required : true
with
type : object
description : additional data supplied to
then
methods
hook.create(options, callback)
create a new hook
options
type : object
properties
id
- type : any
if
type : string
description : the if action
required : true
then
type : string
description : the then action
required : true
with
type : object
description : additional data supplied to
then
callback
- type : function
hook.get(id, callback)
get hook by id
id
type : any
description : the id of the object
required : true
callback
- type : function
hook.find(options, callback)
search for instances of hook
options
type : object
properties
id
type : any
default :
required : false
if
type : any
description : the if action
required : false
default :
then
type : any
description : the then action
required : false
default :
with
type : any
description : additional data supplied to
then
default :
required : false
callback
- type : function
hook.all(callback)
gets all instances of hook
callback
- type : function
hook.update(options, callback)
updates a hook by id
options
type : object
properties
id
- type : any
if
type : string
description : the if action
required : true
then
type : string
description : the then action
required : true
with
type : object
description : additional data supplied to
then
callback
- type : function
hook.updateOrCreate(options, callback)
updates a hook by id, and creates if necessary
options
type : object
properties
id
- type : any
if
type : string
description : the if action
required : true
then
type : string
description : the then action
required : true
with
type : object
description : additional data supplied to
then
callback
- type : function
hook.destroy(id, callback)
destroys a hook by id
id
type : string
description : the id of the object
required : true
callback
- type : function
hook.start()
loads all hooks into memory
hook.bind()
README auto-generated with docs