* - source: Where this argument should be retrieved from. This can be
* 'data' (indicating the POST data), 'param' (indicating the query
* string) or 'path' (indicating the url path). In the case of path,
* an additional parameter must be passed indicating the index to be used.
This doesn't match up with what I see in, say, the node update resource:
'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' => 'array',
),
),
It looks like 'source' is:
- an array if 'path', of the form 'path' => INDEX
- an array if 'param', of the form 'param' => PARAMNAME
- a string if 'data'.
Comments
Comment #1
ygerasimov commented'data' can be either array or a string. Please propose a patch to improve documentation.
Comment #2
joachim commentedI'll see if I can find the time :)
(Resetting to bug report -- errors in documentation are a bug!)
Comment #3
kylebrowning commentedFixed. thanks.