array( 'retrieve' => array( 'file' => array('type' => 'inc', 'module' => 'services', 'name' => 'resources/node_resource'), 'callback' => '_node_resource_retrieve', 'args' => array( array( 'name' => 'nid', 'optional' => FALSE, 'source' => array('path' => 0), 'type' => 'int', 'description' => 'The nid of the node to get', ), ), 'access callback' => '_node_resource_access', 'access arguments' => array('view'), 'access arguments append' => TRUE, ), 'create' => array( 'file' => array('type' => 'inc', 'module' => 'services', 'name' => 'resources/node_resource'), 'callback' => '_node_resource_create', 'args' => array( array( 'name' => 'node', 'optional' => FALSE, 'source' => 'data', 'description' => 'The node object to create', 'type' => 'struct', ), ), 'access callback' => '_node_resource_access', 'access arguments' => array('create'), 'access arguments append' => TRUE, ), 'update' => array( 'file' => array('type' => 'inc', 'module' => 'services', 'name' => 'resources/node_resource'), 'callback' => '_node_resource_update', 'args' => array( array( 'name' => 'nid', 'optional' => FALSE, 'source' => array('path' => 0), 'type' => 'int', 'description' => 'The nid of the node to get', ), array( 'name' => 'node', 'optional' => FALSE, 'source' => 'data', 'description' => 'The node data to update', 'type' => 'struct', ), ), 'access callback' => '_node_resource_access', 'access arguments' => array('update'), 'access arguments append' => TRUE, ), 'delete' => array( 'file' => array('type' => 'inc', 'module' => 'services', 'name' => 'resources/node_resource'), 'callback' => '_node_resource_delete', 'args' => array( array( 'name' => 'nid', 'optional' => FALSE, 'source' => array('path' => 0), 'type' => 'int', ), ), 'access callback' => '_node_resource_access', 'access arguments' => array('delete'), 'access arguments append' => TRUE, ), 'index' => array( 'file' => array('type' => 'inc', 'module' => 'services', 'name' => 'resources/node_resource'), 'callback' => '_node_resource_index', 'args' => array( array( 'name' => 'page', 'optional' => TRUE, 'type' => 'int', 'description' => 'The zero-based index of the page to get, defaults to 0.', 'default value' => 1, 'source' => array('param' => 'page'), ), array( 'name' => 'fields', 'optional' => TRUE, 'type' => 'string', 'description' => 'The fields to get.', 'default value' => '*', 'source' => array('param' => 'fields'), ), array( 'name' => 'parameters', 'optional' => TRUE, 'type' => 'struct', 'description' => 'Parameters', 'default value' => NULL, 'source' => array('param' => 'parameters'), ), ), 'access arguments' => array('access content'), ), 'relationships' => array( 'files' => array( 'file' => array('type' => 'inc', 'module' => 'services', 'name' => 'resources/node_resource'), 'help' => t('This method returns files associated with a node.'), 'access callback' => '_node_resource_access', 'access arguments' => array('view'), 'access arguments append' => TRUE, 'callback' => '_node_resource_load_node_files', 'args' => array( array( 'name' => 'nid', 'optional' => FALSE, 'source' => array('path' => 0), 'type' => 'int', 'description' => 'The nid of the node whose files we are getting', ), array( 'name' => 'file_contents', 'type' => 'int', 'description' => t('To return file contents or not.'), 'source' => array('path' => 2), 'optional' => FALSE, 'default value' => TRUE, ), ), ), ), ), ); }