<p>Here's what I came up with: <a href="https://gist.github.com/timkelty/8de8531df688b6ac08d2da0713b6ff00" rel="nofollow">https://gist.github.com/timkelty/8de8531df688b6ac08d2da0713b6ff00</a></p>

<p>This allows you to pass everything through request params, including specifying the transformer class.</p>

<p>Right now it looks for the transformer in the <code>elementapi</code> folder: <code>plugins/elementapi/ElementApi_MyCustomThingTransformer.php</code></p>

<p>If a full-fledged CRUD API is baked into 3.0, I'm assuming this will be irrelevant by then.</p>

CC BY-SA 3.0
2016-05-24T13:53:41.127Z
2016-05-24T13:53:41.127Z
Tim Kelty
<p>It occurred to me that in every case I was using Element API, I wanted a standardized way of requesting, as the only thing that needed to change was my transformers.</p>

<p>It seemed helpful to standardize the way the input requests were made, and rely solely on transformers for customization.</p>

<plugin-elementapi>
Standardize Element API requests
# Standardize Element API requests

(Asked by: username_0 on 2016-05-24)

It occurred to me that in every case I was using Element API, I wanted a standardized way of requesting, as the only thing that needed to change was my transformers.

It seemed helpful to standardize the way the input requests were made, and rely solely on transformers for customization.

**Tags:** plugin-elementapi


---

## 1 answers

### Answer by username_0 on 2016-05-24. Score: 2

Here's what I came up with: <https://gist.github.com/timkelty/8de8531df688b6ac08d2da0713b6ff00>

This allows you to pass everything through request params, including specifying the transformer class.

Right now it looks for the transformer in the `elementapi` folder: `plugins/elementapi/ElementApi_MyCustomThingTransformer.php`

If a full-fledged CRUD API is baked into 3.0, I'm assuming this will be irrelevant by then.


---

