lib/riak/client/http_backend/configuration.rb in riak-client-1.2.0 vs lib/riak/client/http_backend/configuration.rb in riak-client-1.4.0
- old
+ new
@@ -27,11 +27,14 @@
path(riak_kv_wm_mapred, options)
end
# @return [URI] a URL path for the "buckets list" resource
def bucket_list_path(options={})
- if new_scheme?
+ if options[:stream] && new_scheme?
+ options.delete :stream
+ path(riak_kv_wm_buckets, options.merge(buckets: 'stream'))
+ elsif new_scheme?
path(riak_kv_wm_buckets, options.merge(:buckets => true))
else
path(riak_kv_wm_raw, options.merge(:buckets => true))
end
end
@@ -67,9 +70,22 @@
if new_scheme?
path([riak_kv_wm_buckets, escape(bucket), "keys", key, options].compact)
else
path([riak_kv_wm_raw, escape(bucket), key, options].compact)
end
+ end
+
+ # @return [URI] a URL path for the "counter" resource
+ # @param [String] bucket the bucket of the counter
+ # @param [String] key the key of the counter
+ def counter_path(bucket, key, options={})
+ path([
+ riak_kv_wm_buckets,
+ escape(bucket),
+ "counters",
+ escape(key),
+ options
+ ].compact)
end
# @return [URI] a URL path for the "link-walking" resource
# @param [String] bucket the bucket of the origin object
# @param [String] key the key of the origin object