trevorgerhardt/mapquest — pull request #1 by adamnengland (2013-07-30 00:21:49+00:00)
Title: Adding support for authenticated calls to the mapquest api

I added a few functions that take an API key, to make the library compliant with the latest published docs - http://open.mapquestapi.com/geocoding/

I'm not wild about having the parallel functions, but it is fairly simple to use. Other options if you'd like to minimize the duplication, and don't mind changing the function signatures:

1. Just keep the calls that require a key - this is mapquests documented behavior, and we have no guarantee of how long they'll support use without the key.
2. Change the function signatures to take an "options" object, rather than multiple arguments, for example, instead of
geocode('1 Infinite Loop', function(err, res) {})
we would call
geocode({address: '1 Infinite Loop', callback : function(err, res) {})

This would make it simpler to add optional parameters such as key.