getbit

// Using callbacks (NodeJS or Web Browser)
kuzzle.memoryStorage.getbit('key', 10, function (err, bit) {
  // callback called once the action has completed
});

// Using promises (NodeJS only)
kuzzle.memoryStorage.getbitPromise('key', 10)
  .then(bit => {
    // resolved once the action has completed
  });
kuzzle.memoryStorage.getbit("key", 10, new ResponseListener<Integer>() {
  @Override
  public void onSuccess(int bit) {
    // callback called once the action has completed
  }

  @Override
  public void onError(JSONObject error) {
  }
});
<?php

use \Kuzzle\Kuzzle;


$kuzzle = new Kuzzle('localhost');

try {
  $bit = $kuzzle->memoryStorage()->getbit('key', 10);
}
catch (ErrorException $e) {

}

Callback response:

1

Returns the bit value at offset, in the string value stored in a key.

[Redis documentation]


getbit(key, offset, [options], callback)

ArgumentsTypeDescription
keystringKey identifier
offsetintOffset position in the key's value
optionsJSON ObjectOptional parameters
callbackfunctionCallback

Options

OptionTypeDescriptionDefault
queuablebooleanMark this request as (not) queuabletrue

Callback response

Resolves to the bit value at the provided offset.