README.md in keen-0.9.3 vs README.md in keen-0.9.4
- old
+ new
@@ -14,11 +14,11 @@
or install from Rubygems:
gem install keen
-keen is tested with Ruby 1.8 and 1.9 on:
+keen is tested with Ruby 1.9.3 + and on:
* MRI
* Rubinius
* jRuby (except for asynchronous methods - no TLS support for EM on jRuby)
@@ -175,14 +175,35 @@
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).
`:method` - Set to `:post` to enable post body based query (https://keen.io/docs/data-analysis/post-queries/).
-##### Query Caching
+### Saved Queries
-You can specify a `max_age` parameter as part of your query request, but make sure you send the request as a `:post` request.
+You can manage your saved queries from the Keen ruby client.
+```ruby
+# Create a saved query
+Keen.saved_queries.create("name", saved_query_attributes)
+
+# Get all saved queries
+Keen.saved_queries.all
+
+# Get one saved query
+Keen.saved_queries.get("saved-query-slug")
+
+# Get saved query with results
+Keen.saved_queries.get("saved-query-slug", results: true)
+
+# Update a saved query
+saved_query_attributes = { refresh_rate: 14400 }
+Keen.saved_queries.update("saved-query-slug", saved_query_attributes)
+
+# Delete a saved query
+Keen.saved_queries.delete("saved-query-slug")
+```
+
##### 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
@@ -388,9 +409,13 @@
It's not just us humans that browse the web. Spiders, crawlers, and bots share the pipes too. When it comes to analytics, this can cause a mild headache. Events generated by bots can inflate your metrics and eat up your event quota.
If you want some bot protection, check out the [Voight-Kampff](https://github.com/biola/Voight-Kampff) gem. Use the gem's `request.bot?` method to detect bots and avoid logging events.
### Changelog
+
+##### 0.9.4
++ Add SDK support for Saved Queries
++ Removed support for Ruby MRI 1.8.7
##### 0.9.2
+ Added support for max_age as an integer.
##### 0.9.1