keenlabs/keen-gem — pull request #47 by EdgarOrtegaRamirez (2014-07-30 21:32:58+00:00)
Title: Add the query_url method

Closes #38 (Expose a method that turns parameters into a query URL)

Overview
-
Expose a method that turns parameters into a query URL, so the URL could be used to query asynchronously or from another HTTP library or system.

Solution
-
Rather than duplicate code, I added a extra param to the query method that will return the URL for the query if it's specified.
```ruby
Keen.query_url('users', {analysis_type: 'count'})
# https://api.keen.io/3.0/projects/12345/queries/count?&event_collection=users
```