php - How to call a RESTful API after drupal node in created, updated or deleted -
i using drupal 7 , wanted know how can call restful api after drupal node in created, updated or deleted in drupal.
drupal supports "hook" funcitions system. is, implement function in module special name, clear cache, drupal notice function , in appropriate time calls it.
i.e.
https://api.drupal.org/api/drupal/modules!node!node.api.php/function/hook_node_update/7.x
meaning, in module should make functions called mymodule_node_update()
(where "mymodule" name of module, meaning have create module first) , when kind of node updated (saved) function called can stuff.
same goes creating/deleting - search hook functions.
https://api.drupal.org/api/drupal/modules!node!node.api.php/function/hook_node_delete/7.x
https://api.drupal.org/api/drupal/modules!node!node.api.php/function/hook_node_insert/7.x
Comments
Post a Comment