littlebits / cloud-client-api-http

Lightweight wrapper for littleBits Cloud HTTP API
GNU General Public License v3.0
32 stars 10 forks source link

transparent support for both snake and camel case #4

Closed jasonkuhrt closed 10 years ago

jasonkuhrt commented 10 years ago

The current solution to options arguments is lame. Firstly we don't base our key names on those in the HTTP API spec because that goes against JS naming conventions (= more unimportant details for developers to remember), secondly, we don't standardize the HTTP API spec key names to camelCase because of the terrible results entailed: subscriberId, durationMs, etc.

So we lose either way: unique names to learn, difficult-to-read names.

However there's a third way: support both. This has several benefits: