README.md in keen-0.8.6 vs README.md in keen-0.8.7
- old
+ new
@@ -151,10 +151,16 @@
Keen.query("median", "purchases", :target_property => "price") # => 60
```
This simplifes querying code where the analysis type is dynamic.
+##### Query Options
+
+Each query method or alias takes an optional hash of options as an additional parameter. Possible keys are:
+
+`:response` – Set to `:all_keys` to return the full API response (usually only the value of the `"result"` key is returned).
+
##### Getting Query URLs
Sometimes you just want the URL for a query, but don't actually need to run it. Maybe to paste into a dashboard, or open in your browser. In that case, use the `query_url` method:
``` ruby
@@ -198,10 +204,24 @@
}]) # => true
```
### Other code examples
+#### Overwriting event timestamps
+
+Two time-related properties are included in your event automatically. The properties “keen.timestamp” and “keen.created_at” are set at the time your event is recorded. You have the ability to overwrite the keen.timestamp property. This could be useful, for example, if you are backfilling historical data. Be sure to use [ISO-8601 Format](https://keen.io/docs/event-data-modeling/event-data-intro/#iso-8601-format).
+
+Keen stores all date and time information in UTC!
+
+```ruby
+Keen.publish(:sign_ups, {
+ :keen => { :timestamp => "2012-12-14T20:24:01.123000+00:00" },
+ :username => "lloyd",
+ :referred_by => "harry"
+})
+```
+
#### Batch publishing
The keen-gem supports publishing events in batches via the `publish_batch` method. Here's an example usage:
```ruby
@@ -320,9 +340,12 @@
If you write a script that uses `publish_async`, you need to keep the script alive long enough for the call(s) to complete.
EventMachine itself won't do this because it runs in a different thread. Here's an [example gist](https://gist.github.com/dzello/7472823) that shows how to exit the process after the event has been recorded.
### Changelog
+
+##### 0.8.7
++ Add support for returning all keys back from query API responses
##### 0.8.6
+ Add support for getting [query URLs](https://github.com/keenlabs/keen-gem/pull/47)
+ Make the `query` method public so code supporting dynamic analysis types is easier to write