Repository: basho/riak-nodejs-client
Pull request #103 (2015-10-14 17:44:46)

Add bucket type property operations to Client
See PR #102 


Patch:
diff --git a/README.md b/README.md
index 36291a3..ffa9477 100644
--- a/README.md
+++ b/README.md
@@ -69,3 +69,4 @@ Thank you to all of our contributors!
 * [Josh Yudaken](https://github.com/qix)
 * [Gabriel Nicolas Avellaneda](https://github.com/GabrielNicolasAvellaneda)
 * [Iain Proctor](https://github.com/iproctor)
+* [Brian Edgerton](https://github.com/brianedgerton)
diff --git a/RELNOTES.md b/RELNOTES.md
index d4c4ef1..ca107ca 100644
--- a/RELNOTES.md
+++ b/RELNOTES.md
@@ -1,6 +1,8 @@
 Release Notes
 =============
 
+* 1.8.0 - Following issues / PRs addressed:
+ * [Expose Get/Set bucket type properties on `Client`](https://github.com/basho/riak-nodejs-client/pull/103)
 * 1.7.0 - Following issues / PRs addressed:
  * [Implement commands to Get/Set bucket type properties](https://github.com/basho/riak-nodejs-client/pull/98)
 * 1.6.0 - Following issues / PRs addressed:
diff --git a/lib/client.js b/lib/client.js
index 1ee3a21..18f0d94 100644
--- a/lib/client.js
+++ b/lib/client.js
@@ -157,6 +157,17 @@ Client.prototype.fetchBucketProps = function(options, callback) {
     this.cluster.execute(cmd);
 };
 
+/**
+ * See {{#crossLink "FetchBucketTypeProps"}}{{/crossLink}}
+ * @method fetchBucketTypeProps
+ * @param {Object} options The options for this operation.
+ * @param {Function} callback The callback to be executed when the operation completes.
+ */
+Client.prototype.fetchBucketTypeProps = function(options, callback) {
+    var cmd = new KV.FetchBucketTypeProps(options, callback);
+    this.cluster.execute(cmd);
+};
+
 /**
  * See {{#crossLink "FetchValue"}}{{/crossLink}}
  * @method fetchValue
@@ -223,6 +234,17 @@ Client.prototype.storeBucketProps = function(options, callback) {
     this.cluster.execute(cmd);
 };
 
+/**
+ * See {{#crossLink "StoreBucketTypeProps"}}{{/crossLink}}
+ * @method storeBucketTypeProps
+ * @param {Object} options The options for this operation.
+ * @param {Function} callback The callback to be executed when the operation completes.
+ */
+Client.prototype.storeBucketTypeProps = function(options, callback) {
+    var cmd = new KV.StoreBucketTypeProps(options, callback);
+    this.cluster.execute(cmd);
+};
+
 /**
  * See {{#crossLink "StoreValue"}}{{/crossLink}}
  * @method storeValue
diff --git a/lib/commands/kv.js b/lib/commands/kv.js
index 81cac6c..ebe7676 100644
--- a/lib/commands/kv.js
+++ b/lib/commands/kv.js
@@ -25,6 +25,7 @@ function KV() { }
 module.exports = KV;
 module.exports.DeleteValue = require('./kv/deletevalue');
 module.exports.FetchBucketProps = require('./kv/fetchbucketprops');
+module.exports.FetchBucketTypeProps = require('./kv/fetchbuckettypeprops');
 module.exports.FetchPreflist = require('./kv/fetchpreflist');
 module.exports.FetchValue = require('./kv/fetchvalue');
 module.exports.ListBuckets = require('./kv/listbuckets');
@@ -32,5 +33,6 @@ module.exports.ListKeys = require('./kv/listkeys');
 module.exports.RiakObject = require('./kv/riakobject');
 module.exports.SecondaryIndexQuery = require('./kv/secondaryindexquery');
 module.exports.StoreBucketProps = require('./kv/storebucketprops');
+module.exports.StoreBucketTypeProps = require('./kv/storebuckettypeprops');
 module.exports.StoreValue = require('./kv/storevalue');
 


Test patch:
diff --git a/test/unit/client.js b/test/unit/client.js
index 904d149..46e3d43 100644
--- a/test/unit/client.js
+++ b/test/unit/client.js
@@ -83,6 +83,11 @@ describe('Client', function() {
             assert(typeofKvFetchBucketProps === 'function', "typeof(Riak.Commands.KV.FetchBucketProps): " + typeofKvFetchBucketProps);
             done();
         });
+        it('Riak.Commands.KV.FetchBucketTypeProps', function(done) {
+            var typeofKvFetchBucketTypeProps = typeof(Riak.Commands.KV.FetchBucketTypeProps);
+            assert(typeofKvFetchBucketTypeProps === 'function', "typeof(Riak.Commands.KV.FetchBucketTypeProps): " + typeofKvFetchBucketTypeProps);
+            done();
+        });
         it('Riak.Commands.KV.FetchValue', function(done) {
             var typeofKvFetchValue = typeof(Riak.Commands.KV.FetchValue);
             assert(typeofKvFetchValue === 'function', "typeof(Riak.Commands.KV.FetchValue): " + typeofKvFetchValue);
@@ -113,6 +118,11 @@ describe('Client', function() {
             assert(typeofKvStoreBucketProps === 'function', "typeof(Riak.Commands.KV.StoreBucketProps): " + typeofKvStoreBucketProps);
             done();
         });
+        it('Riak.Commands.KV.StoreBucketTypeProps', function(done) {
+            var typeofKvStoreBucketTypeProps = typeof(Riak.Commands.KV.StoreBucketTypeProps);
+            assert(typeofKvStoreBucketTypeProps === 'function', "typeof(Riak.Commands.KV.StoreBucketTypeProps): " + typeofKvStoreBucketTypeProps);
+            done();
+        });
         it('Riak.Commands.KV.StoreValue', function(done) {
             var typeofKvStoreValue = typeof(Riak.Commands.KV.StoreValue);
             assert(typeofKvStoreValue === 'function', "typeof(Riak.Commands.KV.StoreValue): " + typeofKvStoreValue);