Element API: how can I return entries via username? Struggling to get this feed work with Element API. I'm trying to return all entries created by a specific username. I've tried several different methods, but none of them work. 

Here is the latest version of what I've tried:

'dealers/&lt;username:{username}&gt;.json' =&gt; function($username) {
  return [
    'elementType' =&gt; 'Entry',
    'criteria' =&gt; [
      'section' =&gt; 'listings',
      'username' =&gt; $username
    ],
    'paginate' =&gt; false,
    'transformer' =&gt; function(EntryModel $entry) {
      ...
Completely untested, but something like this should work:

'dealers/&lt;username:(.*)&gt;.json' =&gt; function($username) {
    $author = craft()-&gt;users-&gt;getUserByUsernameOrEmail($username);

    return [
        'elementType' =&gt; 'Entry',
        'criteria' =&gt; [
            'section' =&gt; 'listings',
            'authorId' =&gt; $author-&gt;id
        ],
        'paginate' =&gt; false,
        'transformer' =&gt; function(EntryModel $entry) {
            ...