Use conditional for Element API results? Using the Element API is there a way to get entries by dateUpdated OR dateCreated within the last whatever time, say day?

Or a way to get the entry IDs for both of those criteria then do a query based on just the IDs from both results?

I want to get any entry that was created or updated within the last day using the API but can't quite get it.
If you want the latest of both, unless I'm missing something, you should just be able to query on dateUpdated. 

When you create an entry the first time, its dateUpdated gets set to the same date as the dateCreated... So if you query your entries on dateUpdated only, you will get all entries created + updated in your time frame I guess.

As far as code goes, this should do it:

return [
    'endpoints' =&gt; [
        'entries.json' =&gt; function() {
            $timeframe = (new \DateTime('1 day ago'))-&gt;format(\DateTime::ATOM);
            return [
                'elementType' =&gt; Entry::class,
                'criteria' =&gt; [
                    'section' =&gt; 'entries',
                    'dateUpdated' =&gt; '&gt;=' . $timeframe,
                ],
                'transformer' =&gt; function(Entry $entry) {
                    return [
                        'title' =&gt; $entry-&gt;title,
                        'url' =&gt; $entry-&gt;url,
                    ];
                },
            ];
        },
    ]
];