justafish / drupal_createapi

https://drupal.org/project/createapi
3 stars 9 forks source link

Make the "row" key optional #2

Closed quicksketch closed 10 years ago

quicksketch commented 11 years ago

When using feeds generated by this module, I couldn't figure out why the "row" keys were being added. In the generated feeds, it seems like it's just an unnecessary layer of nesting. Maybe this would be necessary on some sites (though I can't think of why), but for sites that don't want this key, perhaps it should be made optional?

function my_module_createapi_custom_entities_info() {
  $info = array();
  $info['articles'] = array(
    'version' => '1.0',
    'path' => 'articles',
    'wrapper' => 'articles',
    'row' => 'article', // <- Make this optional?
    ...
}

In this example, the "row" key is "nominee". Isn't it generally unneeded?

createapi_keys

justafish commented 10 years ago

Committed, thanks!