orchestrate-io/orchestrate-ruby — pull request #84 by mattly (2014-08-18 00:03:22+00:00)
Title: Events for the Object client

Closes #62.

```ruby
kv = app[:items]['key']
now = Time.now
event = kv.events[:checkins][now] << {place: "Github"}
event.value # {"place" => "Github"}
event[:place] # "Github"
300.times{|i| kv.events[:checkins][now - i * 3600] << {place: "somewhere #{i}"}
kv.events[:checkins].after(now - 150 * 3600).before(now - 25 * 3600).to_a # retrieves list using the same enumerable magic we use on KVs, Refs, Graphs, etc.
event = kv.events[:checkins][now - 3 * 3600][1] # retrieves single event
event.update({place: "nowhere"}) # updates value and saves
event.purge # deletes with the purge parameter and `If-Match` against the current known ref.
```