--- API_orig.txt	Tue May 18 13:44:01 2010
+++ API.txt	Tue May 18 15:57:04 2010
@@ -18,10 +18,10 @@
 If all you want is to enable tokens for your module you will simply
 need to implement two functions:
 
-  hook_token_values 
-  hook_token_list
+  hook_token_values()
+  hook_token_list()
 
-See the token.module and it's API.txt for more information about this
+See the token.module and its API.txt for more information about this
 process.
 
 If the token is intended to generate a path expected to contain slashes,
@@ -47,15 +47,17 @@
 settings:
 
 module - The name of your module (e.g., 'node')
+token_type - The $type that will be passed to your token hooks.
 groupheader - The translated label for the settings group (e.g.,
   t('Node path settings')
+patterndefault - A translated default pattern (e.g., t('[cat]/[title].html'))
 patterndescr - The translated label for the default pattern (e.g.,
   t('Default path pattern (applies to all node types with blank patterns below)')
-patterndefault - A translated default pattern (e.g., t('[cat]/[title].html'))
 placeholders - An array whose keys consist of the translated placeholders
   which will appear in patterns (e.g., t('[title]')) and values are 
   the translated description of the placeholders (e.g.,
-  t('The title of the node, with spaces and punctuation.')
+  t('The title of the node, with spaces and punctuation.') The easiest way
+  to get this array is to iterate through each set in token_get_list().
 patternitems - For modules which need to express multiple patterns
   (for example, the node module supports a separate pattern for each
   node type), an array whose keys consist of identifiers for each
@@ -68,8 +70,8 @@
 bulkname - For modules which support a bulk update operation, the
   translated label for the action (e.g., t('Bulk update node paths'))
 bulkdescr - For modules which support a bulk update operation, a 
-  translated, more thorough description of what the operation will do 
-  (e.g., t('Generate aliases for all existing nodes which do not already have aliases.'))
+  translated, more thorough description of what the operation will do (e.g.,
+  t('Generate aliases for all existing nodes which do not already have aliases.'))
 
 
 ==================
@@ -84,17 +86,22 @@
 $module - The name of your module (e.g., 'node')
 $op - Operation being performed on the item ('insert', 'update', or
   'bulkupdate')
-$placeholders - An array whose keys consist of the translated placeholders
-  which appear in patterns and values are the "clean" values to be 
-  substituted into the pattern. Call pathauto_cleanstring() on any
-  values which you do not know to be purely alphanumeric, to substitute
-  any non-alphanumerics with the user's designated separator. Note that
-  if the pattern has multiple slash-separated components (e.g., [catpath]),
-  pathauto_cleanstring() should be called for each component, not the
-  complete string.
-  Example: $placeholders[t('[title]')] = pathauto_cleanstring($node->title);
+$placeholders - An array with two elements: "tokens," which is an array of
+  clean tokens, and "values," which is an array of the corresponding values for
+  the tokens. Call pathauto_cleanstring() on any values which you do not know
+  to be purely alphanumeric to substitute any non-alphanumerics with the
+  user's designated separator. Note that if the pattern has multiple slash-
+  separated components (e.g., [catpath]), pathauto_cleanstring() should be
+  called for each component, not the complete string. The easiest way to get
+  this array is to call pathauto_get_placeholders($type, $object) where $type
+  is the token type and $object is the $data that gets passed to your
+  hook_token_values() implementation. Note that pathauto_get_placeholders() is
+  in pathauto.inc, which you must include.
+  Example: module_load_include('inc', 'pathauto');
+    $placeholders = pathauto_get_placeholders('node', $node);
+    pathauto_create_alias('node', 'insert', $placeholders, 'node/'. $node->nid, $node->type);
 $src - The "real" URI of the content to be aliased (e.g., "node/$node->nid")
-$type - For modules which provided patternitems in hook_autopath(),
+$type - For modules which provided patternitems in hook_pathauto(),
   the relevant identifier for the specific item to be aliased (e.g.,
   $node->type)
 
@@ -105,11 +112,9 @@
 3 - Bulk update function
 ==================
 
-If a module supports bulk updating of aliases, it must provide a
-function of this form, to be called by pathauto when the corresponding
-checkbox is selected and the settings page submitted:
-
-function <module>_pathauto_bulkupdate()
+If a module supports bulk updating of aliases, it must implement
+hook_pathauto_bulkupdate(), which will be called by pathauto when the
+corresponding checkbox is selected and the settings page submitted.
 
 The function should iterate over the content items controlled by the
 module, calling pathauto_create_alias() for each one. It is
@@ -128,7 +133,7 @@
 
 This hook returns an array whose keys match the beginning of the source paths
 (e.g.: "node/", "user/", etc.) and whose values describe the type of page (e.g.:
-"content", "users"). Like all displayed strings, these descriptionsshould be 
+"content", "users"). Like all displayed strings, these descriptions should be
 localized with t(). Use % to match interior pieces of a path; "user/%/track". This
 is a database wildcard, so be careful.
 
